fastapi-rtk 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fastapi-rtk.es.js +5892 -5864
- package/dist/fastapi-rtk.umd.js +56 -56
- package/package.json +1 -1
package/dist/fastapi-rtk.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(O,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("react-router-dom"),require("zustand"),require("@tanstack/react-query"),require("@mantine/hooks"),require("@jsonforms/react"),require("@jsonforms/core"),require("@mantine/dates"),require("clsx"),require("@emotion/react"),require("@mantine/form"),require("mantine-react-table")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@jsonforms/react","@jsonforms/core","@mantine/dates","clsx","@emotion/react","@mantine/form","mantine-react-table"],d):(O=typeof globalThis<"u"?globalThis:O||self,d(O["fastapi-rtk"]={},O.jsxRuntime,O.core,O.React,O.reactRouterDom,O.zustand,O.reactQuery,O.hooks,O.react,O.core$1,O.dates,O.clsx,O.react$1,O.form,O.mantineReactTable))})(this,function(O,d,v,x,Sf,Cf,Ln,Re,De,ue,Hi,Pr,Ef,za,yn){"use strict";var fz=Object.defineProperty;var dz=(O,d,v)=>d in O?fz(O,d,{enumerable:!0,configurable:!0,writable:!0,value:v}):O[d]=v;var sb=(O,d,v)=>dz(O,typeof d!="symbol"?d+"":d,v);function ab(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ft=ab(x),Ua=x.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=>({}),updateEntry:async(e,t)=>({}),deleteEntry:async e=>({}),download:async({label:e,export_mode:t,delimiter:n,quotechar:o})=>null,upload:async(e,{delimiter:t,quotechar:n})=>({}),resetError:()=>null});function Ae(){const e=x.useContext(Ua);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}const xf=0,Af=25,rr=250,ti=",",ja=[{value:",",label:"Comma (,)"},{value:";",label:"Semicolon (;)"},{value:"|",label:"Pipe (|)"},{value:" ",label:"Tab"},{value:" ",label:"Space"}],qi=null,Wa=[{value:'"',label:'Double quotes (")'},{value:"'",label:"Single quotes (')"}];function Tt({path:e,method:t,body:n=void 0,queryParams:o=void 0}){const s=Object.entries(o||{}).reduce((c,[h,p])=>((Array.isArray(p)||typeof p=="object")&&(p=JSON.stringify(p)),c[h]=p,c),{}),a=new Sf.createSearchParams(s);e=e+"?"+a;const u={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:n?JSON.stringify(n):null};return{fetchPath:e,options:u}}function lb(e){return e&&typeof e=="object"&&!Array.isArray(e)}const Bn=(...e)=>{const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(o=>{lb(n[o])&&o!=="ref"&&t[o]?t[o]=Bn(t[o],n[o]):t[o]=n[o]})}),t},Va=e=>e==null?e:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>Va(t)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,Yi=(e,t,n=!0)=>{const o=t.split(".");let s=e;for(const a of o)Array.isArray(s)?s=s.map(u=>Yi(u,a,!1)):s=s==null?void 0:s[a];return n?Va(s):s},Ga=(e,t)=>e===void 0?t:e;function ni(e){return e!=null}const ft=(e,t)=>typeof e=="function"?e(t):e;function Of(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 s=0;s<e.length;s++){let a=e[s];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(s>0&&(a=a.replace(/^[\/]+/,"")),s<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}let n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");const o=n.split("?");return n=o.shift()+(o.length>0?"?":"")+o.join("&"),n}function ot(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return Of(t)}const jo=e=>new Proxy(e,{get(t,n){return t(o=>o[n])}}),If=(e,t)=>Object.entries(t).reduce((n,[o,s])=>typeof s=="object"&&JSON.stringify(s)===JSON.stringify(e[o])||s===e[o]?n:{...n,[o]:s},{});function Ki(e){const[t]=x.useState(()=>Cf.create(()=>({...e}))),[n]=x.useState(()=>jo(t));return x.useEffect(()=>{t.setState(o=>If(o,e))},[e,t]),n}const Ha=x.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 $r(){return x.useContext(Ha)}const qa=x.createContext({baseUrl:"",info:null,loading:!1,error:null});function Pf(){return x.useContext(qa)}async function $f(e,{username:t,password:n}){const o=new FormData;o.append("username",t),o.append("password",n);const{fetchPath:s,options:a}=Tt({path:ot(e,"auth/login"),method:"POST"}),u=await fetch(s,{...a,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(o)});if(!u.ok)throw u.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function Mf(e){const{fetchPath:t,options:n}=Tt({path:ot(e,"auth/logout"),method:"POST"});if(!(await fetch(t,n)).ok)throw new Error("Failed to sign out.")}async function Ff(e,t,{email:n}){const{fetchPath:o,options:s}=Tt({path:ot(e,"auth/forgot-password"),method:"POST",body:{email:n}}),a=await fetch(o,s);if(!a.ok)throw new Error("Couldn't request token to reset password");const u=await a.json(),{token:c}=u,{fetchPath:h,options:p}=Tt({path:ot(e,"auth/reset-password"),method:"POST",body:{token:c,password:t}});if(!(await fetch(h,p)).ok)throw new Error("Couldn't reset password")}async function Df(e,t,n,o){const s=ot(e,"auth/login",t);if(!n){window.location.href=ot(e,"auth/login",t);return}const a=500,u=500,c=window.screenLeft+window.outerWidth/2-a/2,h=window.screenTop+window.outerHeight/2-u/2,p=window.open(s+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${a}, height=${u}, top=${h}, left=${c}`),y=window.setInterval(function(){p.closed!==!1&&(window.clearInterval(y),o==null||o())},200)}async function kf(e,t){const{fetchPath:n,options:o}=Tt({path:ot(e,"info/"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function Nf(e,t){const{fetchPath:n,options:o}=Tt({path:ot(e,"auth/user"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function Lf(e,t){const{fetchPath:n,options:o}=Tt({path:ot(e,"auth/user"),method:"PUT",body:t}),s=await fetch(n,o),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}function Bf(e,t){const n=Ln.useQueryClient(),o=Ln.useQuery({queryKey:["user"],queryFn:({signal:g})=>Nf(e,g),retry:!1,...t}),[s,a]=x.useState(null),u=x.useCallback(({username:g,password:_})=>{a(null),$f(e,{username:g,password:_}).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(C=>a(C))},[e,n]),c=x.useCallback(()=>{a(null),Mf(e).then(()=>n.resetQueries({queryKey:["user"]})).then(()=>n.resetQueries({queryKey:["info"]})).catch(g=>a(g))},[e,n]),h=x.useCallback(g=>{a(null),Lf(e,g).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(_=>a(_))},[e,n]),p=x.useCallback(g=>{a(null),Ff(e,g,o.data).catch(_=>a(_))},[e,o.data]),y=x.useCallback((g,_)=>Df(e,g,_,()=>n.invalidateQueries({queryKey:["user"]})),[e,n]);return{user:o.isError?null:o.data,loading:o.isFetching,error:s?s.message:null,signin:u,signout:c,update:h,resetPassword:p,oauth_signin:y,refetch:o.refetch}}function zf(e,t){const n=Ln.useQuery({queryKey:["info"],queryFn:({signal:o})=>kf(e,o),enabled:!1});return x.useEffect(()=>{t.user&&!n.data&&n.refetch()},[t.user,n]),{baseUrl:e,info:n.data,loading:n.isFetching,error:n.error}}function ub(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:n,authQueryProps:o,children:s}={...t,...e},a=Bf(n,o),u=Ki(a),c=zf(n,a),h=Ki(c);return d.jsx(Ha.Provider,{value:u,children:d.jsx(qa.Provider,{value:h,children:s})})}function cb(e){const[t]=x.useState(()=>new Ln.QueryClient);return d.jsx(Ln.QueryClientProvider,{client:t,children:d.jsx(ub,{...e})})}const Ya=x.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function fb(){const e=x.useContext(Ya);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const Uf={opened:!1,setOpened:()=>{throw new Error("setOpened must be defined in a provider")},view:0,setView:()=>{throw new Error("setView must be defined in a provider")},state:void 0,setState:()=>{throw new Error("setState must be defined in a provider")},reset:()=>{throw new Error("reset must be defined in a provider")},item:void 0,itemLoading:!1,setItem:()=>{throw new Error("setItem must be defined in a provider")},setItemLoading:()=>{throw new Error("setItemLoading must be defined in a provider")}},Wo={errors:[],data:void 0},Ka=x.createContext(Uf),Ja=x.createContext(Uf);function zn(e="add"){const t=x.useContext(e==="add"?Ka:Ja);if(t===void 0)throw new Error("useForms must be used within an ApiProvider");return t}const jf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:ot(e,"/"),method:"POST",body:t}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Wf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:ot(e,t.toString()),method:"DELETE"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Vf=async(e,t,{label:n="",export_mode:o="",delimiter:s=ti,quotechar:a=qi}={})=>{const u={...t,label:n,export_mode:o,delimiter:s,check_validity:!0};a&&(u.quotechar=a);const{fetchPath:c,options:h}=Tt({path:ot(e,"/download"),method:"GET",queryParams:u});if(!(await fetch(c,h)).ok)throw new Error("Download failed");delete u.check_validity;const{fetchPath:y}=Tt({path:ot(e,"/download"),method:"GET",queryParams:u}),g=document.createElement("a");g.href=y,g.download=n,g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g)},Gf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:e,method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a},Hf=async(e,t)=>{const{fetchPath:n,options:o}=Tt({path:ot(e,t.toString()),method:"GET"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},qf=async(e,t,n)=>{const{fetchPath:o,options:s}=Tt({path:e,method:"GET",queryParams:t}),a=await fetch(o,{signal:n,...s});let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Yf=async(e,t,n)=>{const{fetchPath:o,options:s}=Tt({path:ot(e,t.toString()),method:"PUT",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Kf=async(e,t,{delimiter:n=ti,quotechar:o=qi}={})=>{const s=new FormData;s.append("file",t);const a={delimiter:n};o&&(a.quotechar=o);const{fetchPath:u,options:c}=Tt({path:ot(e,"/upload"),method:"POST",queryParams:a}),h=await fetch(u,{...c,headers:void 0,body:s});if(!h.ok)throw new Error("Upload failed");return await h.json()},Jf=async(e,t,n)=>{const{fetchPath:o,options:s}=Tt({path:ot(e,"/bulk",t),method:"POST",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},xt=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Za=e=>{const t={};for(const n of e)switch(n.type){case"RelatedList":t[n.name]=[];break;case"Boolean":t[n.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":t[n.name]=void 0;break;default:t[n.name]=""}return t};var Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mr(e){this._maxSize=e,this.clear()}Mr.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Mr.prototype.get=function(e){return this._values[e]},Mr.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var db=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Zf=/^\d+$/,hb=/^\d/,pb=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,gb=/^\s*(['"]?)(.*?)(\1)\s*$/,Ra=512,Rf=new Mr(Ra),Xf=new Mr(Ra),Qf=new Mr(Ra),Fr={Cache:Mr,split:Qa,normalizePath:Xa,setter:function(e){var t=Xa(e);return Xf.get(e)||Xf.set(e,function(o,s){for(var a=0,u=t.length,c=o;a<u-1;){var h=t[a];if(h==="__proto__"||h==="constructor"||h==="prototype")return o;c=c[t[a++]]}c[t[a]]=s})},getter:function(e,t){var n=Xa(e);return Qf.get(e)||Qf.set(e,function(s){for(var a=0,u=n.length;a<u;)if(s!=null||!t)s=s[n[a++]];else return;return s})},join:function(e){return e.reduce(function(t,n){return t+(el(n)||Zf.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){mb(Array.isArray(e)?e:Qa(e),t,n)}};function Xa(e){return Rf.get(e)||Rf.set(e,Qa(e).map(function(t){return t.replace(gb,"$2")}))}function Qa(e){return e.match(db)||[""]}function mb(e,t,n){var o=e.length,s,a,u,c;for(a=0;a<o;a++)s=e[a],s&&(bb(s)&&(s='"'+s+'"'),c=el(s),u=!c&&/^\d+$/.test(s),t.call(n,s,c,u,a,e))}function el(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function yb(e){return e.match(hb)&&!e.match(Zf)}function vb(e){return pb.test(e)}function bb(e){return!el(e)&&(yb(e)||vb(e))}const _b=/[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,Vo=e=>e.match(_b)||[],Go=e=>e[0].toUpperCase()+e.slice(1),tl=(e,t)=>Vo(e).join(t).toLowerCase(),ed=e=>Vo(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var nl={words:Vo,upperFirst:Go,camelCase:ed,pascalCase:e=>Go(ed(e)),snakeCase:e=>tl(e,"_"),kebabCase:e=>tl(e,"-"),sentenceCase:e=>Go(tl(e," ")),titleCase:e=>Vo(e).map(Go).join(" ")},rl={exports:{}};rl.exports=function(e){return td(Tb(e),e)},rl.exports.array=td;function td(e,t){var n=e.length,o=new Array(n),s={},a=n,u=wb(t),c=Sb(e);for(t.forEach(function(p){if(!c.has(p[0])||!c.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});a--;)s[a]||h(e[a],a,new Set);return o;function h(p,y,g){if(g.has(p)){var _;try{_=", node was:"+JSON.stringify(p)}catch{_=""}throw new Error("Cyclic dependency"+_)}if(!c.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!s[y]){s[y]=!0;var C=u.get(p)||new Set;if(C=Array.from(C),y=C.length){g.add(p);do{var E=C[--y];h(E,c.get(E),g)}while(y);g.delete(p)}o[--n]=p}}}function Tb(e){for(var t=new Set,n=0,o=e.length;n<o;n++){var s=e[n];t.add(s[0]),t.add(s[1])}return Array.from(t)}function wb(e){for(var t=new Map,n=0,o=e.length;n<o;n++){var s=e[n];t.has(s[0])||t.set(s[0],new Set),t.has(s[1])||t.set(s[1],new Set),t.get(s[0]).add(s[1])}return t}function Sb(e){for(var t=new Map,n=0,o=e.length;n<o;n++)t.set(e[n],n);return t}var Cb=rl.exports;const Eb=ir(Cb),xb=Object.prototype.toString,Ab=Error.prototype.toString,Ob=RegExp.prototype.toString,Ib=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Pb=/^Symbol\((.*)\)(.*)$/;function $b(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function nd(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return $b(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return Ib.call(e).replace(Pb,"Symbol($1)");const o=xb.call(e).slice(8,-1);return o==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):o==="Error"||e instanceof Error?"["+Ab.call(e)+"]":o==="RegExp"?Ob.call(e):null}function An(e,t){let n=nd(e,t);return n!==null?n:JSON.stringify(e,function(o,s){let a=nd(this[o],t);return a!==null?a:s},2)}function rd(e){return e==null?[]:[].concat(e)}let id,od,sd,Mb=/\$\{\s*(\w+)\s*\}/g;id=Symbol.toStringTag;class ad{constructor(t,n,o,s){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[id]="Error",this.name="ValidationError",this.value=n,this.path=o,this.type=s,this.errors=[],this.inner=[],rd(t).forEach(a=>{if(wt.isError(a)){this.errors.push(...a.errors);const u=a.inner.length?a.inner:[a];this.inner.push(...u)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}od=Symbol.hasInstance,sd=Symbol.toStringTag;class wt extends Error{static formatError(t,n){const o=n.label||n.path||"this";return n=Object.assign({},n,{path:o,originalPath:n.path}),typeof t=="string"?t.replace(Mb,(s,a)=>An(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,o,s,a){const u=new ad(t,n,o,s);if(a)return u;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[sd]="Error",this.name=u.name,this.message=u.message,this.type=u.type,this.value=u.value,this.path=u.path,this.errors=u.errors,this.inner=u.inner,Error.captureStackTrace&&Error.captureStackTrace(this,wt)}static[od](t){return ad[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let On={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:o})=>{const s=o!=null&&o!==n?` (cast from the value \`${An(o,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${An(n,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${An(n,!0)}\``+s}},jt={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"},or={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"},il={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},ol={isValue:"${path} field must be ${value}"},Ho={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},qo={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"},ld={notType:e=>{const{path:t,value:n,spec:o}=e,s=o.types.length;if(Array.isArray(n)){if(n.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``;if(n.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``}return wt.formatError(On.notType,e)}};var ud=Object.assign(Object.create(null),{mixed:On,string:jt,number:or,date:il,object:Ho,array:qo,boolean:ol,tuple:ld});const Dr=e=>e&&e.__isYupSchema__;class Yo{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:s,otherwise:a}=n,u=typeof o=="function"?o:(...c)=>c.every(h=>h===o);return new Yo(t,(c,h)=>{var p;let y=u(...c)?s:a;return(p=y==null?void 0:y(h))!=null?p:h})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let o=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(o,t,n);if(s===void 0||s===t)return t;if(!Dr(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const Ko={context:"$",value:"."};function Fb(e,t){return new sr(e,t)}class sr{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Ko.context,this.isValue=this.key[0]===Ko.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?Ko.context:this.isValue?Ko.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&Fr.getter(this.path,!0),this.map=n.map}getValue(t,n,o){let s=this.isContext?o:this.isValue?t:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}sr.prototype.__isYupRef=!0;const vn=e=>e==null;function ri(e){function t({value:n,path:o="",options:s,originalValue:a,schema:u},c,h){const{name:p,test:y,params:g,message:_,skipAbsent:C}=e;let{parent:E,context:w,abortEarly:P=u.spec.abortEarly,disableStackTrace:N=u.spec.disableStackTrace}=s;function R(U){return sr.isRef(U)?U.getValue(n,E,w):U}function W(U={}){const ne=Object.assign({value:n,originalValue:a,label:u.spec.label,path:U.path||o,spec:u.spec,disableStackTrace:U.disableStackTrace||N},g,U.params);for(const ye of Object.keys(ne))ne[ye]=R(ne[ye]);const fe=new wt(wt.formatError(U.message||_,ne),n,ne.path,U.type||p,ne.disableStackTrace);return fe.params=ne,fe}const B=P?c:h;let D={path:o,parent:E,type:p,from:s.from,createError:W,resolve:R,options:s,originalValue:a,schema:u};const k=U=>{wt.isError(U)?B(U):U?h(null):B(W())},H=U=>{wt.isError(U)?B(U):c(U)};if(C&&vn(n))return k(!0);let oe;try{var S;if(oe=y.call(D,n,D),typeof((S=oe)==null?void 0:S.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${D.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(oe).then(k,H)}}catch(U){H(U);return}k(oe)}return t.OPTIONS=e,t}function sl(e,t,n,o=n){let s,a,u;return t?(Fr.forEach(t,(c,h,p)=>{let y=h?c.slice(1,c.length-1):c;e=e.resolve({context:o,parent:s,value:n});let g=e.type==="tuple",_=p?parseInt(y,10):0;if(e.innerType||g){if(g&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${u}" must contain an index to the tuple element, e.g. "${u}[0]"`);if(n&&_>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);s=n,n=n&&n[_],e=g?e.spec.types[_]:e.innerType}if(!p){if(!e.fields||!e.fields[y])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${u} which is a type: "${e.type}")`);s=n,n=n&&n[y],e=e.fields[y]}a=y,u=h?"["+c+"]":"."+c}),{schema:e,parent:s,parentPath:a}):{parent:s,parentPath:t,schema:e}}function Db(e,t,n,o){return sl(e,t,n,o).schema}class Jo extends Set{describe(){const t=[];for(const n of this.values())t.push(sr.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const o of this.values())n.push(t(o));return n}clone(){return new Jo(this.values())}merge(t,n){const o=this.clone();return t.forEach(s=>o.add(s)),n.forEach(s=>o.delete(s)),o}}function ii(e,t=new Map){if(Dr(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let o=0;o<e.length;o++)n[o]=ii(e[o],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[o,s]of e.entries())n.set(o,ii(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const o of e)n.add(ii(o,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[o,s]of Object.entries(e))n[o]=ii(s,t)}else throw Error(`Unable to clone ${e}`);return n}class It{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 Jo,this._blacklist=new Jo,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(On.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ii(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let o=t(this);return this._mutate=n,o}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,o=t.clone();const s=Object.assign({},n.spec,o.spec);return o.spec=s,o.internalTests=Object.assign({},n.internalTests,o.internalTests),o._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),o._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),o.tests=n.tests,o.exclusiveTests=n.exclusiveTests,o.withMutation(a=>{t.tests.forEach(u=>{a.test(u.OPTIONS)})}),o.transforms=[...n.transforms,...o.transforms],o}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let o=n.conditions;n=n.clone(),n.conditions=[],n=o.reduce((s,a)=>a.resolve(s,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,o,s,a;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(o=t.abortEarly)!=null?o:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,n={}){let o=this.resolve(Object.assign({value:t},n)),s=n.assert==="ignore-optionality",a=o._cast(t,n);if(n.assert!==!1&&!o.isType(a)){if(s&&vn(a))return a;let u=An(t),c=An(a);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
|
|
1
|
+
(function(O,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("@mantine/core"),require("react"),require("react-router-dom"),require("zustand"),require("@tanstack/react-query"),require("@mantine/hooks"),require("@jsonforms/react"),require("@jsonforms/core"),require("@mantine/dates"),require("clsx"),require("@emotion/react"),require("@mantine/form"),require("mantine-react-table")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","react","react-router-dom","zustand","@tanstack/react-query","@mantine/hooks","@jsonforms/react","@jsonforms/core","@mantine/dates","clsx","@emotion/react","@mantine/form","mantine-react-table"],h):(O=typeof globalThis<"u"?globalThis:O||self,h(O["fastapi-rtk"]={},O.jsxRuntime,O.core,O.React,O.reactRouterDom,O.zustand,O.reactQuery,O.hooks,O.react,O.core$1,O.dates,O.clsx,O.react$1,O.form,O.mantineReactTable))})(this,function(O,h,b,x,If,Pf,Bn,Xe,Fe,ae,Wi,Ir,$f,ja,mn){"use strict";var mz=Object.defineProperty;var yz=(O,h,b)=>h in O?mz(O,h,{enumerable:!0,configurable:!0,writable:!0,value:b}):O[h]=b;var sb=(O,h,b)=>yz(O,typeof h!="symbol"?h+"":h,b);function ab(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Mt=ab(x),Wa=x.createContext({path:"",data:null,info:null,queryParams:null,loading:!1,error:null,streaming:null,specialKey:null,setQueryParams:e=>null,refetch:async e=>null,refetchInfo:async e=>null,getEntry:async e=>({}),addEntry:async e=>({}),updateEntry:async(e,t)=>({}),deleteEntry:async e=>({}),download:async(e,{export_mode:t,delimiter:n,quotechar:o}={})=>null,upload:async(e,{delimiter:t,quotechar:n}={})=>({}),resetError:()=>null});function Oe(){const e=x.useContext(Wa);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e}const Mf=0,Ff=25,Bo=400,zo=",",Va=[{value:",",label:"Comma (,)"},{value:";",label:"Semicolon (;)"},{value:"|",label:"Pipe (|)"},{value:" ",label:"Tab"},{value:" ",label:"Space"}],Ga=null,Ha=[{value:'"',label:'Double quotes (")'},{value:"'",label:"Single quotes (')"}];function _t({path:e,method:t,body:n=void 0,queryParams:o=void 0}){const s=Object.entries(o||{}).reduce((c,[d,p])=>((Array.isArray(p)||typeof p=="object")&&(p=JSON.stringify(p)),c[d]=p,c),{}),a=new If.createSearchParams(s);e=e+"?"+a;const u={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:n?JSON.stringify(n):null};return{fetchPath:e,options:u}}function lb(e){return e&&typeof e=="object"&&!Array.isArray(e)}const xn=(...e)=>{const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(o=>{lb(n[o])&&o!=="ref"&&t[o]?t[o]=xn(t[o],n[o]):t[o]=n[o]})}),t},qa=e=>e==null?e:typeof e=="boolean"?e.toString():Array.isArray(e)?e.map(t=>qa(t)).join(", "):typeof e=="object"?e.name_||JSON.stringify(e):e,Vi=(e,t,n=!0)=>{const o=t.split(".");let s=e;for(const a of o)Array.isArray(s)?s=s.map(u=>Vi(u,a,!1)):s=s==null?void 0:s[a];return n?qa(s):s},Ya=(e,t)=>e===void 0?t:e;function Gi(e){return e!=null}const ct=(e,t)=>typeof e=="function"?e(t):e;function kf(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 s=0;s<e.length;s++){let a=e[s];if(typeof a!="string")throw new TypeError("Url must be a string. Received "+a);a!==""&&(s>0&&(a=a.replace(/^[\/]+/,"")),s<e.length-1?a=a.replace(/[\/]+$/,""):a=a.replace(/[\/]+$/,"/"),t.push(a))}let n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");const o=n.split("?");return n=o.shift()+(o.length>0?"?":"")+o.join("&"),n}function ot(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return kf(t)}const Uo=e=>new Proxy(e,{get(t,n){return t(o=>o[n])}}),Df=(e,t)=>Object.entries(t).reduce((n,[o,s])=>typeof s=="object"&&JSON.stringify(s)===JSON.stringify(e[o])||s===e[o]?n:{...n,[o]:s},{});function Hi(e){const[t]=x.useState(()=>Pf.create(()=>({...e}))),[n]=x.useState(()=>Uo(t));return x.useEffect(()=>{t.setState(o=>Df(o,e))},[e,t]),n}const Ka=x.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 Pr(){return x.useContext(Ka)}const Ja=x.createContext({baseUrl:"",info:null,loading:!1,error:null});function Nf(){return x.useContext(Ja)}async function Lf(e,{username:t,password:n}){const o=new FormData;o.append("username",t),o.append("password",n);const{fetchPath:s,options:a}=_t({path:ot(e,"auth/login"),method:"POST"}),u=await fetch(s,{...a,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(o)});if(!u.ok)throw u.status===400?new Error("Username or password wrong."):new Error("Failed to sign in.")}async function Bf(e){const{fetchPath:t,options:n}=_t({path:ot(e,"auth/logout"),method:"POST"});if(!(await fetch(t,n)).ok)throw new Error("Failed to sign out.")}async function zf(e,t,{email:n}){const{fetchPath:o,options:s}=_t({path:ot(e,"auth/forgot-password"),method:"POST",body:{email:n}}),a=await fetch(o,s);if(!a.ok)throw new Error("Couldn't request token to reset password");const u=await a.json(),{token:c}=u,{fetchPath:d,options:p}=_t({path:ot(e,"auth/reset-password"),method:"POST",body:{token:c,password:t}});if(!(await fetch(d,p)).ok)throw new Error("Couldn't reset password")}async function Uf(e,t,n,o){const s=ot(e,"auth/login",t);if(!n){window.location.href=ot(e,"auth/login",t);return}const a=500,u=500,c=window.screenLeft+window.outerWidth/2-a/2,d=window.screenTop+window.outerHeight/2-u/2,p=window.open(s+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${a}, height=${u}, top=${d}, left=${c}`),y=window.setInterval(function(){p.closed!==!1&&(window.clearInterval(y),o==null||o())},200)}async function jf(e,t){const{fetchPath:n,options:o}=_t({path:ot(e,"info/"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function Wf(e,t){const{fetchPath:n,options:o}=_t({path:ot(e,"auth/user"),method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}async function Vf(e,t){const{fetchPath:n,options:o}=_t({path:ot(e,"auth/user"),method:"PUT",body:t}),s=await fetch(n,o),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a}function Gf(e,t){const n=Bn.useQueryClient(),o=Bn.useQuery({queryKey:["user"],queryFn:({signal:g})=>Wf(e,g),retry:!1,...t}),[s,a]=x.useState(null),u=x.useCallback(({username:g,password:_})=>{a(null),Lf(e,{username:g,password:_}).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(C=>a(C))},[e,n]),c=x.useCallback(()=>{a(null),Bf(e).then(()=>n.resetQueries({queryKey:["user"]})).then(()=>n.resetQueries({queryKey:["info"]})).catch(g=>a(g))},[e,n]),d=x.useCallback(g=>{a(null),Vf(e,g).then(()=>n.invalidateQueries({queryKey:["user"]})).catch(_=>a(_))},[e,n]),p=x.useCallback(g=>{a(null),zf(e,g,o.data).catch(_=>a(_))},[e,o.data]),y=x.useCallback((g,_)=>Uf(e,g,_,()=>n.invalidateQueries({queryKey:["user"]})),[e,n]);return{user:o.isError?null:o.data,loading:o.isFetching,error:s?s.message:null,signin:u,signout:c,update:d,resetPassword:p,oauth_signin:y,refetch:o.refetch}}function Hf(e,t){const n=Bn.useQuery({queryKey:["info"],queryFn:({signal:o})=>jf(e,o),enabled:!1});return x.useEffect(()=>{t.user&&!n.data&&n.refetch()},[t.user,n]),{baseUrl:e,info:n.data,loading:n.isFetching,error:n.error}}function ub(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:n,authQueryProps:o,children:s}={...t,...e},a=Gf(n,o),u=Hi(a),c=Hf(n,a),d=Hi(c);return h.jsx(Ka.Provider,{value:u,children:h.jsx(Ja.Provider,{value:d,children:s})})}function cb(e){const[t]=x.useState(()=>new Bn.QueryClient);return h.jsx(Bn.QueryClientProvider,{client:t,children:h.jsx(ub,{...e})})}const Ra=x.createContext({bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null});function fb(){const e=x.useContext(Ra);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e}const qf={opened:!1,setOpened:()=>{throw new Error("setOpened must be defined in a provider")},view:0,setView:()=>{throw new Error("setView must be defined in a provider")},state:void 0,setState:()=>{throw new Error("setState must be defined in a provider")},reset:()=>{throw new Error("reset must be defined in a provider")},item:void 0,itemLoading:!1,setItem:()=>{throw new Error("setItem must be defined in a provider")},setItemLoading:()=>{throw new Error("setItemLoading must be defined in a provider")}},jo={errors:[],data:void 0},Za=x.createContext(qf),Xa=x.createContext(qf);function zn(e="add"){const t=x.useContext(e==="add"?Za:Xa);if(t===void 0)throw new Error("useForms must be used within an ApiProvider");return t}const Yf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:ot(e,"/"),method:"POST",body:t}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Kf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:ot(e,t.toString()),method:"DELETE"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Jf=async(e,t,{label:n,export_mode:o,delimiter:s,quotechar:a}={})=>{const u={...t,check_validity:!0};n&&(u.label=n),o&&(u.export_mode=o),s&&(u.delimiter=s),a&&(u.quotechar=a);const{fetchPath:c,options:d}=_t({path:ot(e,"/download"),method:"GET",queryParams:u});if(!(await fetch(c,d)).ok)throw new Error("Download failed");delete u.check_validity;const{fetchPath:y}=_t({path:ot(e,"/download"),method:"GET",queryParams:u}),g=document.createElement("a");g.href=y,g.download=n,g.style.display="none",document.body.appendChild(g),g.click(),document.body.removeChild(g)},Rf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:e,method:"GET"}),s=await fetch(n,{signal:t,...o}),a=await s.json();if(!s.ok){const u=typeof a.detail=="string"?a.detail:JSON.stringify(a.detail,null,2);throw new Error(u)}return a},Zf=async(e,t)=>{const{fetchPath:n,options:o}=_t({path:ot(e,t.toString()),method:"GET"}),s=await fetch(n,o);let a=null;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?a=await s.json():a=await s.text(),!s.ok)throw typeof a=="object"?new Error(typeof a.detail=="string"?a.detail:JSON.stringify(a,null,2)):new Error(a);return a},Xf=async(e,t,n)=>{const{fetchPath:o,options:s}=_t({path:e,method:"GET",queryParams:t}),a=await fetch(o,{signal:n,...s});let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Qf=async(e,t,n)=>{const{fetchPath:o,options:s}=_t({path:ot(e,t.toString()),method:"PUT",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},ed=async(e,t,{delimiter:n,quotechar:o}={})=>{const s=new FormData;s.append("file",t);const a={};n&&(a.delimiter=n),o&&(a.quotechar=o);const{fetchPath:u,options:c}=_t({path:ot(e,"/upload"),method:"POST",queryParams:a}),d=await fetch(u,{...c,headers:void 0,body:s});if(!d.ok)throw new Error("Upload failed");return await d.json()},td=async(e,t,n)=>{const{fetchPath:o,options:s}=_t({path:ot(e,"/bulk",t),method:"POST",body:n}),a=await fetch(o,s);let u=null;const c=a.headers.get("content-type");if(c&&c.includes("application/json")?u=await a.json():u=await a.text(),!a.ok)throw typeof u=="object"?new Error(typeof u.detail=="string"?u.detail:JSON.stringify(u,null,2)):new Error(u);return u},Et=e=>e&&typeof e=="object"?Array.isArray(e)?e.join(","):JSON.stringify(e):e,Qa=e=>{const t={};for(const n of e)switch(n.type){case"RelatedList":t[n.name]=[];break;case"Boolean":t[n.name]="false";break;case"Date":case"DateTime":case"Integer":case"Float":case"Geometry":case"Raw":case"Related":t[n.name]=void 0;break;default:t[n.name]=""}return t};var Un=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $r(e){this._maxSize=e,this.clear()}$r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},$r.prototype.get=function(e){return this._values[e]},$r.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var db=/[^.^\]^[]+|(?=\[\]|\.\.)/g,nd=/^\d+$/,hb=/^\d/,pb=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,gb=/^\s*(['"]?)(.*?)(\1)\s*$/,el=512,rd=new $r(el),id=new $r(el),od=new $r(el),Mr={Cache:$r,split:nl,normalizePath:tl,setter:function(e){var t=tl(e);return id.get(e)||id.set(e,function(o,s){for(var a=0,u=t.length,c=o;a<u-1;){var d=t[a];if(d==="__proto__"||d==="constructor"||d==="prototype")return o;c=c[t[a++]]}c[t[a]]=s})},getter:function(e,t){var n=tl(e);return od.get(e)||od.set(e,function(s){for(var a=0,u=n.length;a<u;)if(s!=null||!t)s=s[n[a++]];else return;return s})},join:function(e){return e.reduce(function(t,n){return t+(rl(n)||nd.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){mb(Array.isArray(e)?e:nl(e),t,n)}};function tl(e){return rd.get(e)||rd.set(e,nl(e).map(function(t){return t.replace(gb,"$2")}))}function nl(e){return e.match(db)||[""]}function mb(e,t,n){var o=e.length,s,a,u,c;for(a=0;a<o;a++)s=e[a],s&&(bb(s)&&(s='"'+s+'"'),c=rl(s),u=!c&&/^\d+$/.test(s),t.call(n,s,c,u,a,e))}function rl(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function yb(e){return e.match(hb)&&!e.match(nd)}function vb(e){return pb.test(e)}function bb(e){return!rl(e)&&(yb(e)||vb(e))}const _b=/[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,Wo=e=>e.match(_b)||[],Vo=e=>e[0].toUpperCase()+e.slice(1),il=(e,t)=>Wo(e).join(t).toLowerCase(),sd=e=>Wo(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var ol={words:Wo,upperFirst:Vo,camelCase:sd,pascalCase:e=>Vo(sd(e)),snakeCase:e=>il(e,"_"),kebabCase:e=>il(e,"-"),sentenceCase:e=>Vo(il(e," ")),titleCase:e=>Wo(e).map(Vo).join(" ")},sl={exports:{}};sl.exports=function(e){return ad(wb(e),e)},sl.exports.array=ad;function ad(e,t){var n=e.length,o=new Array(n),s={},a=n,u=Tb(t),c=Sb(e);for(t.forEach(function(p){if(!c.has(p[0])||!c.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});a--;)s[a]||d(e[a],a,new Set);return o;function d(p,y,g){if(g.has(p)){var _;try{_=", node was:"+JSON.stringify(p)}catch{_=""}throw new Error("Cyclic dependency"+_)}if(!c.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!s[y]){s[y]=!0;var C=u.get(p)||new Set;if(C=Array.from(C),y=C.length){g.add(p);do{var E=C[--y];d(E,c.get(E),g)}while(y);g.delete(p)}o[--n]=p}}}function wb(e){for(var t=new Set,n=0,o=e.length;n<o;n++){var s=e[n];t.add(s[0]),t.add(s[1])}return Array.from(t)}function Tb(e){for(var t=new Map,n=0,o=e.length;n<o;n++){var s=e[n];t.has(s[0])||t.set(s[0],new Set),t.has(s[1])||t.set(s[1],new Set),t.get(s[0]).add(s[1])}return t}function Sb(e){for(var t=new Map,n=0,o=e.length;n<o;n++)t.set(e[n],n);return t}var Cb=sl.exports;const Eb=nr(Cb),xb=Object.prototype.toString,Ab=Error.prototype.toString,Ob=RegExp.prototype.toString,Ib=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Pb=/^Symbol\((.*)\)(.*)$/;function $b(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ld(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return $b(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return Ib.call(e).replace(Pb,"Symbol($1)");const o=xb.call(e).slice(8,-1);return o==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):o==="Error"||e instanceof Error?"["+Ab.call(e)+"]":o==="RegExp"?Ob.call(e):null}function An(e,t){let n=ld(e,t);return n!==null?n:JSON.stringify(e,function(o,s){let a=ld(this[o],t);return a!==null?a:s},2)}function ud(e){return e==null?[]:[].concat(e)}let cd,fd,dd,Mb=/\$\{\s*(\w+)\s*\}/g;cd=Symbol.toStringTag;class hd{constructor(t,n,o,s){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[cd]="Error",this.name="ValidationError",this.value=n,this.path=o,this.type=s,this.errors=[],this.inner=[],ud(t).forEach(a=>{if(wt.isError(a)){this.errors.push(...a.errors);const u=a.inner.length?a.inner:[a];this.inner.push(...u)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}fd=Symbol.hasInstance,dd=Symbol.toStringTag;class wt extends Error{static formatError(t,n){const o=n.label||n.path||"this";return n=Object.assign({},n,{path:o,originalPath:n.path}),typeof t=="string"?t.replace(Mb,(s,a)=>An(n[a])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,o,s,a){const u=new hd(t,n,o,s);if(a)return u;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[dd]="Error",this.name=u.name,this.message=u.message,this.type=u.type,this.value=u.value,this.path=u.path,this.errors=u.errors,this.inner=u.inner,Error.captureStackTrace&&Error.captureStackTrace(this,wt)}static[fd](t){return hd[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let On={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:o})=>{const s=o!=null&&o!==n?` (cast from the value \`${An(o,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${An(n,!0)}\``+s:`${e} must match the configured type. The validated value was: \`${An(n,!0)}\``+s}},Ut={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"},rr={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"},al={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},ll={isValue:"${path} field must be ${value}"},Go={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Ho={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"},pd={notType:e=>{const{path:t,value:n,spec:o}=e,s=o.types.length;if(Array.isArray(n)){if(n.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``;if(n.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${An(n,!0)}\``}return wt.formatError(On.notType,e)}};var gd=Object.assign(Object.create(null),{mixed:On,string:Ut,number:rr,date:al,object:Go,array:Ho,boolean:ll,tuple:pd});const Fr=e=>e&&e.__isYupSchema__;class qo{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:s,otherwise:a}=n,u=typeof o=="function"?o:(...c)=>c.every(d=>d===o);return new qo(t,(c,d)=>{var p;let y=u(...c)?s:a;return(p=y==null?void 0:y(d))!=null?p:d})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let o=this.refs.map(a=>a.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(o,t,n);if(s===void 0||s===t)return t;if(!Fr(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const Yo={context:"$",value:"."};function Fb(e,t){return new ir(e,t)}class ir{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Yo.context,this.isValue=this.key[0]===Yo.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?Yo.context:this.isValue?Yo.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&Mr.getter(this.path,!0),this.map=n.map}getValue(t,n,o){let s=this.isContext?o:this.isValue?t:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}ir.prototype.__isYupRef=!0;const yn=e=>e==null;function Qr(e){function t({value:n,path:o="",options:s,originalValue:a,schema:u},c,d){const{name:p,test:y,params:g,message:_,skipAbsent:C}=e;let{parent:E,context:T,abortEarly:P=u.spec.abortEarly,disableStackTrace:N=u.spec.disableStackTrace}=s;function X(j){return ir.isRef(j)?j.getValue(n,E,T):j}function W(j={}){const re=Object.assign({value:n,originalValue:a,label:u.spec.label,path:j.path||o,spec:u.spec,disableStackTrace:j.disableStackTrace||N},g,j.params);for(const he of Object.keys(re))re[he]=X(re[he]);const ce=new wt(wt.formatError(j.message||_,re),n,re.path,j.type||p,re.disableStackTrace);return ce.params=re,ce}const D=P?c:d;let k={path:o,parent:E,type:p,from:s.from,createError:W,resolve:X,options:s,originalValue:a,schema:u};const L=j=>{wt.isError(j)?D(j):j?d(null):D(W())},J=j=>{wt.isError(j)?D(j):c(j)};if(C&&yn(n))return L(!0);let ne;try{var S;if(ne=y.call(k,n,k),typeof((S=ne)==null?void 0:S.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(ne).then(L,J)}}catch(j){J(j);return}L(ne)}return t.OPTIONS=e,t}function ul(e,t,n,o=n){let s,a,u;return t?(Mr.forEach(t,(c,d,p)=>{let y=d?c.slice(1,c.length-1):c;e=e.resolve({context:o,parent:s,value:n});let g=e.type==="tuple",_=p?parseInt(y,10):0;if(e.innerType||g){if(g&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${u}" must contain an index to the tuple element, e.g. "${u}[0]"`);if(n&&_>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);s=n,n=n&&n[_],e=g?e.spec.types[_]:e.innerType}if(!p){if(!e.fields||!e.fields[y])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${u} which is a type: "${e.type}")`);s=n,n=n&&n[y],e=e.fields[y]}a=y,u=d?"["+c+"]":"."+c}),{schema:e,parent:s,parentPath:a}):{parent:s,parentPath:t,schema:e}}function kb(e,t,n,o){return ul(e,t,n,o).schema}class Ko extends Set{describe(){const t=[];for(const n of this.values())t.push(ir.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const o of this.values())n.push(t(o));return n}clone(){return new Ko(this.values())}merge(t,n){const o=this.clone();return t.forEach(s=>o.add(s)),n.forEach(s=>o.delete(s)),o}}function ei(e,t=new Map){if(Fr(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let o=0;o<e.length;o++)n[o]=ei(e[o],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[o,s]of e.entries())n.set(o,ei(s,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const o of e)n.add(ei(o,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[o,s]of Object.entries(e))n[o]=ei(s,t)}else throw Error(`Unable to clone ${e}`);return n}class Ot{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 Ko,this._blacklist=new Ko,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(On.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=ei(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let o=t(this);return this._mutate=n,o}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,o=t.clone();const s=Object.assign({},n.spec,o.spec);return o.spec=s,o.internalTests=Object.assign({},n.internalTests,o.internalTests),o._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),o._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),o.tests=n.tests,o.exclusiveTests=n.exclusiveTests,o.withMutation(a=>{t.tests.forEach(u=>{a.test(u.OPTIONS)})}),o.transforms=[...n.transforms,...o.transforms],o}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let o=n.conditions;n=n.clone(),n.conditions=[],n=o.reduce((s,a)=>a.resolve(s,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,o,s,a;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(o=t.abortEarly)!=null?o:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(a=t.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(t,n={}){let o=this.resolve(Object.assign({value:t},n)),s=n.assert==="ignore-optionality",a=o._cast(t,n);if(n.assert!==!1&&!o.isType(a)){if(s&&yn(a))return a;let u=An(t),c=An(a);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
|
|
2
2
|
|
|
3
3
|
attempted value: ${u}
|
|
4
|
-
`+(c!==u?`result of cast: ${c}`:""))}return a}_cast(t,n){let o=t===void 0?t:this.transforms.reduce((s,a)=>a.call(this,s,t,this),t);return o===void 0&&(o=this.getDefault(n)),o}_validate(t,n={},o,s){let{path:a,originalValue:u=t,strict:c=this.spec.strict}=n,h=t;c||(h=this._cast(h,Object.assign({assert:!1},n)));let p=[];for(let y of Object.values(this.internalTests))y&&p.push(y);this.runTests({path:a,value:h,originalValue:u,options:n,tests:p},o,y=>{if(y.length)return s(y,h);this.runTests({path:a,value:h,originalValue:u,options:n,tests:this.tests},o,s)})}runTests(t,n,o){let s=!1,{tests:a,value:u,originalValue:c,path:h,options:p}=t,y=w=>{s||(s=!0,n(w,u))},g=w=>{s||(s=!0,o(w,u))},_=a.length,C=[];if(!_)return g([]);let E={value:u,originalValue:c,path:h,options:p,schema:this};for(let w=0;w<a.length;w++){const P=a[w];P(E,y,function(R){R&&(Array.isArray(R)?C.push(...R):C.push(R)),--_<=0&&g(C)})}}asNestedTest({key:t,index:n,parent:o,parentPath:s,originalParent:a,options:u}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const h=typeof c=="number";let p=o[c];const y=Object.assign({},u,{strict:!0,parent:o,value:p,originalValue:a[c],key:void 0,[h?"index":"key"]:c,path:h||c.includes(".")?`${s||""}[${h?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(g,_,C)=>this.resolve(y)._validate(p,y,_,C)}validate(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return new Promise((u,c)=>s._validate(t,n,(h,p)=>{wt.isError(h)&&(h.value=p),c(h)},(h,p)=>{h.length?c(new wt(h,p,void 0,void 0,a)):u(p)}))}validateSync(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a,u=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,h)=>{throw wt.isError(c)&&(c.value=h),c},(c,h)=>{if(c.length)throw new wt(c,t,void 0,void 0,u);a=h}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,o=>{if(wt.isError(o))return!1;throw o})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(o){if(wt.isError(o))return!1;throw o}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ii(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const o=this.clone({nullable:t});return o.internalTests.nullable=ri({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),o}optionality(t,n){const o=this.clone({optional:t});return o.internalTests.optionality=ri({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(t=On.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=On.notNull){return this.nullability(!1,t)}required(t=On.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=On.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),s=ri(n),a=n.exclusive||n.name&&o.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(o.exclusiveTests[n.name]=!!n.exclusive),o.tests=o.tests.filter(u=>!(u.OPTIONS.name===n.name&&(a||u.OPTIONS.test===s.OPTIONS.test))),o.tests.push(s),o}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let o=this.clone(),s=rd(t).map(a=>new sr(a));return s.forEach(a=>{a.isSibling&&o.deps.push(a.key)}),o.conditions.push(typeof n=="function"?new Yo(s,n):Yo.fromOptions(s,n)),o}typeError(t){let n=this.clone();return n.internalTests.typeError=ri({message:t,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=On.oneOf){let o=this.clone();return t.forEach(s=>{o._whitelist.add(s),o._blacklist.delete(s)}),o.internalTests.whiteList=ri({message:n,name:"oneOf",skipAbsent:!0,test(s){let a=this.schema._whitelist,u=a.resolveAll(this.resolve);return u.includes(s)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:u}})}}),o}notOneOf(t,n=On.notOneOf){let o=this.clone();return t.forEach(s=>{o._blacklist.add(s),o._whitelist.delete(s)}),o.internalTests.blacklist=ri({message:n,name:"notOneOf",test(s){let a=this.schema._blacklist,u=a.resolveAll(this.resolve);return u.includes(s)?this.createError({params:{values:Array.from(a).join(", "),resolved:u}}):!0}}),o}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:o,meta:s,optional:a,nullable:u}=n.spec;return{meta:s,label:o,optional:a,nullable:u,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(h=>({name:h.OPTIONS.name,params:h.OPTIONS.params})).filter((h,p,y)=>y.findIndex(g=>g.name===h.name)===p)}}}It.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])It.prototype[`${e}At`]=function(t,n,o={}){const{parent:s,parentPath:a,schema:u}=sl(this,t,n,o.context);return u[e](s&&s[a],Object.assign({},o,{parent:s,path:t}))};for(const e of["equals","is"])It.prototype[e]=It.prototype.oneOf;for(const e of["not","nope"])It.prototype[e]=It.prototype.notOneOf;const kb=()=>!0;function Zo(e){return new al(e)}class al extends It{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:kb},t))}}Zo.prototype=al.prototype;function ll(){return new ul}class ul extends It{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(o.spec.coerce&&!o.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=ol.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return vn(n)||n===!0}})}isFalse(t=ol.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return vn(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}ll.prototype=ul.prototype;const Nb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Lb(e){const t=cl(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function cl(e){var t,n;const o=Nb.exec(e);return o?{year:jn(o[1]),month:jn(o[2],1)-1,day:jn(o[3],1),hour:jn(o[4]),minute:jn(o[5]),second:jn(o[6]),millisecond:o[7]?jn(o[7].substring(0,3)):0,precision:(t=(n=o[7])==null?void 0:n.length)!=null?t:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:jn(o[10]),minuteOffset:jn(o[11])}:null}function jn(e,t=0){return Number(e)||t}let Bb=/^[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])?)*$/,zb=/^((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,Ub=/^(?:[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,jb="^\\d{4}-\\d{2}-\\d{2}",Wb="\\d{2}:\\d{2}:\\d{2}",Vb="(([+-]\\d{2}(:?\\d{2})?)|Z)",Gb=new RegExp(`${jb}T${Wb}(\\.\\d+)?${Vb}$`),Hb=e=>vn(e)||e===e.trim(),qb={}.toString();function Ro(){return new fl}class fl extends It{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce||o.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===qb?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||On.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=jt.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n=jt.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n=jt.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}matches(t,n){let o=!1,s,a;return n&&(typeof n=="object"?{excludeEmptyString:o=!1,message:s,name:a}=n:s=n),this.test({name:a||"matches",message:s||jt.matches,params:{regex:t},skipAbsent:!0,test:u=>u===""&&o||u.search(t)!==-1})}email(t=jt.email){return this.matches(Bb,{name:"email",message:t,excludeEmptyString:!0})}url(t=jt.url){return this.matches(zb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=jt.uuid){return this.matches(Ub,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",o,s;return t&&(typeof t=="object"?{message:n="",allowOffset:o=!1,precision:s=void 0}=t:n=t),this.matches(Gb,{name:"datetime",message:n||jt.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||jt.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:a=>{if(!a||o)return!0;const u=cl(a);return u?!!u.z:!1}}).test({name:"datetime_precision",message:n||jt.datetime_precision,params:{precision:s},skipAbsent:!0,test:a=>{if(!a||s==null)return!0;const u=cl(a);return u?u.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=jt.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Hb})}lowercase(t=jt.lowercase){return this.transform(n=>vn(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toLowerCase()})}uppercase(t=jt.uppercase){return this.transform(n=>vn(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>vn(n)||n===n.toUpperCase()})}}Ro.prototype=fl.prototype;let Yb=e=>e!=+e;function cd(){return new dl}class dl extends It{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Yb(t)}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce)return t;let s=t;if(typeof s=="string"){if(s=s.replace(/\s/g,""),s==="")return NaN;s=+s}return o.isType(s)||s===null?s:parseFloat(s)})})}min(t,n=or.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(t)}})}max(t,n=or.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(t)}})}lessThan(t,n=or.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(o){return o<this.resolve(t)}})}moreThan(t,n=or.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(o){return o>this.resolve(t)}})}positive(t=or.positive){return this.moreThan(0,t)}negative(t=or.negative){return this.lessThan(0,t)}integer(t=or.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>vn(t)?t:t|0)}round(t){var n;let o=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(o.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(s=>vn(s)?s:Math[t](s))}}cd.prototype=dl.prototype;let fd=new Date(""),Kb=e=>Object.prototype.toString.call(e)==="[object Date]";function hl(){return new oi}class oi extends It{constructor(){super({type:"date",check(t){return Kb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=Lb(t),isNaN(t)?oi.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let o;if(sr.isRef(t))o=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);o=s}return o}min(t,n=il.min){let o=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(o)}})}max(t,n=il.max){let o=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(o)}})}}oi.INVALID_DATE=fd,hl.prototype=oi.prototype,hl.INVALID_DATE=fd;function Jb(e,t=[]){let n=[],o=new Set,s=new Set(t.map(([u,c])=>`${u}-${c}`));function a(u,c){let h=Fr.split(u)[0];o.add(h),s.has(`${c}-${h}`)||n.push([c,h])}for(const u of Object.keys(e)){let c=e[u];o.add(u),sr.isRef(c)&&c.isSibling?a(c.path,u):Dr(c)&&"deps"in c&&c.deps.forEach(h=>a(h,u))}return Eb.array(Array.from(o),n).reverse()}function dd(e,t){let n=1/0;return e.some((o,s)=>{var a;if((a=t.path)!=null&&a.includes(o))return n=s,!0}),n}function hd(e){return(t,n)=>dd(e,t)-dd(e,n)}const pd=(e,t,n)=>{if(typeof e!="string")return e;let o=e;try{o=JSON.parse(e)}catch{}return n.isType(o)?o:e};function Xo(e){if("fields"in e){const t={};for(const[n,o]of Object.entries(e.fields))t[n]=Xo(o);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Xo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Xo)}):"optional"in e?e.optional():e}const Zb=(e,t)=>{const n=[...Fr.normalizePath(t)];if(n.length===1)return n[0]in e;let o=n.pop(),s=Fr.getter(Fr.join(n),!0)(e);return!!(s&&o in s)};let gd=e=>Object.prototype.toString.call(e)==="[object Object]";function md(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(o=>n.indexOf(o)===-1)}const Rb=hd([]);function Ji(e){return new pl(e)}class pl extends It{constructor(t){super({type:"object",check(n){return gd(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Rb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var o;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let a=this.fields,u=(o=n.stripUnknown)!=null?o:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(g=>!this._nodes.includes(g))),h={},p=Object.assign({},n,{parent:h,__validating:n.__validating||!1}),y=!1;for(const g of c){let _=a[g],C=g in s;if(_){let E,w=s[g];p.path=(n.path?`${n.path}.`:"")+g,_=_.resolve({value:w,context:n.context,parent:h});let P=_ instanceof It?_.spec:void 0,N=P==null?void 0:P.strict;if(P!=null&&P.strip){y=y||g in s;continue}E=!n.__validating||!N?_.cast(s[g],p):s[g],E!==void 0&&(h[g]=E)}else C&&!u&&(h[g]=s[g]);(C!==g in h||h[g]!==s[g])&&(y=!0)}return y?h:s}_validate(t,n={},o,s){let{from:a=[],originalValue:u=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:u},...a],n.__validating=!0,n.originalValue=u,super._validate(t,n,o,(h,p)=>{if(!c||!gd(p)){s(h,p);return}u=u||p;let y=[];for(let g of this._nodes){let _=this.fields[g];!_||sr.isRef(_)||y.push(_.asNestedTest({options:n,key:g,parent:p,parentPath:n.path,originalParent:u}))}this.runTests({tests:y,value:p,originalValue:u,options:n},o,g=>{s(g.sort(this._sortErrors).concat(h),p)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),o=n.fields;for(let[s,a]of Object.entries(this.fields)){const u=o[s];o[s]=u===void 0?a:u}return n.withMutation(s=>s.setFields(o,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(o=>{var s;const a=this.fields[o];let u=t;(s=u)!=null&&s.value&&(u=Object.assign({},u,{parent:u.value,value:u.value[o]})),n[o]=a&&"getDefault"in a?a.getDefault(u):void 0}),n}setFields(t,n){let o=this.clone();return o.fields=t,o._nodes=Jb(t,n),o._sortErrors=hd(Object.keys(t)),n&&(o._excludedEdges=n),o}shape(t,n=[]){return this.clone().withMutation(o=>{let s=o._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...o._excludedEdges,...n]),o.setFields(Object.assign(o.fields,t),s)})}partial(){const t={};for(const[n,o]of Object.entries(this.fields))t[n]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(t)}deepPartial(){return Xo(this)}pick(t){const n={};for(const o of t)this.fields[o]&&(n[o]=this.fields[o]);return this.setFields(n,this._excludedEdges.filter(([o,s])=>t.includes(o)&&t.includes(s)))}omit(t){const n=[];for(const o of Object.keys(this.fields))t.includes(o)||n.push(o);return this.pick(n)}from(t,n,o){let s=Fr.getter(t,!0);return this.transform(a=>{if(!a)return a;let u=a;return Zb(a,t)&&(u=Object.assign({},a),o||delete u[t],u[n]=s(a)),u})}json(){return this.transform(pd)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Ho.exact,test(n){if(n==null)return!0;const o=md(this.schema,n);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Ho.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const a=md(this.schema,s);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,n=Ho.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const o={};for(const s of Object.keys(n))o[t(s)]=n[s];return o})}camelCase(){return this.transformKeys(nl.camelCase)}snakeCase(){return this.transformKeys(nl.snakeCase)}constantCase(){return this.transformKeys(t=>nl.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);o.fields={};for(const[a,u]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),o.fields[a]=u.describe(c)}return o}}Ji.prototype=pl.prototype;function gl(e){return new ml(e)}class ml extends It{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const o=super._cast(t,n);if(!this._typeCheck(o)||!this.innerType)return o;let s=!1;const a=o.map((u,c)=>{const h=this.innerType.cast(u,Object.assign({},n,{path:`${n.path||""}[${c}]`}));return h!==u&&(s=!0),h});return s?a:o}_validate(t,n={},o,s){var a;let u=this.innerType,c=(a=n.recursive)!=null?a:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,o,(h,p)=>{var y;if(!c||!u||!this._typeCheck(p)){s(h,p);return}let g=new Array(p.length);for(let C=0;C<p.length;C++){var _;g[C]=u.asNestedTest({options:n,index:C,parent:p,parentPath:n.path,originalParent:(_=n.originalValue)!=null?_:t})}this.runTests({value:p,tests:g,originalValue:(y=n.originalValue)!=null?y:t,options:n},o,C=>s(C.concat(h),p))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(pd)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Dr(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+An(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=qo.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n){return n=n||qo.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n){return n=n||qo.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(o,s,a)=>!t(o,s,a):o=>!!o;return this.transform(o=>o!=null?o.filter(n):o)}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);if(n.innerType){var s;let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),o.innerType=n.innerType.describe(a)}return o}}gl.prototype=ml.prototype;function yd(e){return new yl(e)}class yl extends It{constructor(t){super({type:"tuple",spec:{types:t},check(n){const o=this.spec.types;return Array.isArray(n)&&n.length===o.length}}),this.withMutation(()=>{this.typeError(ld.notType)})}_cast(t,n){const{types:o}=this.spec,s=super._cast(t,n);if(!this._typeCheck(s))return s;let a=!1;const u=o.map((c,h)=>{const p=c.cast(s[h],Object.assign({},n,{path:`${n.path||""}[${h}]`}));return p!==s[h]&&(a=!0),p});return a?u:s}_validate(t,n={},o,s){let a=this.spec.types;super._validate(t,n,o,(u,c)=>{var h;if(!this._typeCheck(c)){s(u,c);return}let p=[];for(let[g,_]of a.entries()){var y;p[g]=_.asNestedTest({options:n,index:g,parent:c,parentPath:n.path,originalParent:(y=n.originalValue)!=null?y:t})}this.runTests({value:c,tests:p,originalValue:(h=n.originalValue)!=null?h:t,options:n},o,g=>s(g.concat(u),c))})}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);return o.innerType=n.spec.types.map((s,a)=>{var u;let c=t;return(u=c)!=null&&u.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),s.describe(c)}),o}}yd.prototype=yl.prototype;function Xb(e){return new Qo(e)}function vd(e){try{return e()}catch(t){if(wt.isError(t))return Promise.reject(t);throw t}}class Qo{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,o={})=>{let s=this.builder(n,o);if(!Dr(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(o)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const n=new Qo(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}asNestedTest(t){let{key:n,index:o,parent:s,options:a}=t,u=s[o??n];return this._resolve(u,Object.assign({},a,{value:u,parent:s})).asNestedTest(t)}validate(t,n){return vd(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,o){return vd(()=>this._resolve(n,o).validateAt(t,n,o))}validateSyncAt(t,n,o){return this._resolve(n,o).validateSyncAt(t,n,o)}isValid(t,n){try{return this._resolve(t,n).isValid(t,n)}catch(o){if(wt.isError(o))return Promise.resolve(!1);throw o}}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}}function Qb(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{ud[t][n]=e[t][n]})})}function e1(e,t,n){if(!e||!Dr(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const bd=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:ml,BooleanSchema:ul,DateSchema:oi,LazySchema:Qo,MixedSchema:al,NumberSchema:dl,ObjectSchema:pl,Schema:It,StringSchema:fl,TupleSchema:yl,ValidationError:wt,addMethod:e1,array:gl,bool:ll,boolean:ll,date:hl,defaultLocale:ud,getIn:sl,isSchema:Dr,lazy:Xb,mixed:Zo,number:cd,object:Ji,printValue:An,reach:Db,ref:Fb,setLocale:Qb,string:Ro,tuple:yd},Symbol.toStringTag,{value:"Module"})),vl=e=>{const t=e.reduce((n,o)=>{let{name:s,required:a,type:u}=o;switch(u){case"RelatedList":u="array";break;case"Integer":case"Float":u="number";break;case"Related":case"Geometry":case"Raw":u="mixed";break;default:u="string"}let c;try{a?c=bd[u]().typeError(`Field must be of type ${u}`).required("Field is required"):c=bd[u]().typeError(`Field must be of type ${u}`).nullable(!0)}catch(h){console.log(h)}return n[s]=c,n},{});return Ji().shape(t)},_d=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:vl(e.add_columns),defaultValues:Za(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:vl(e.edit_columns),defaultValues:Za(e.edit_columns)}}:null,t1={columns:[],filters:[],page:0,page_size:25};function Zi(e,t={}){return Object.entries(t).reduce((n,[o,s])=>s==null?(delete n[o],n):{...n,[o]:s},e||t1)}function Td({path:e,initialQueryParams:t,relation:n,fetchInfo:o=!0,clearInfoOnRefetch:s=!1,clearDataOnRefetch:a=!1,resetQueryParamsOnPathChange:u=!0,infoQueryProps:c,dataQueryProps:h,streaming:p=!1}){const[y,g]=x.useState(t?Zi(null,t):null),_=x.useRef(e),C=x.useMemo(()=>(_.current=e,n?{...y,filters:[...y.filters,{col:n.foreign_key,opr:n.type,value:xt(n.id)}]}:y),[n,y]),E=x.useCallback(X=>g(K=>{if(typeof X=="function"&&(X=X(K)),!K)return Zi(null,X);const Z=Zi({...K},X);if(X&&((X.filters||X.order_column||X.order_direction)&&!X.page&&(Z.page=0),p)){if(X.page&&X.page!==K.page&&!X.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(X.page_size&&X.page_size!==K.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return Z}),[p]),[w,P]=x.useState(null),N=x.useMemo(()=>w,[w]),R=x.useCallback(()=>P(null),[]),{data:W,isFetching:B,refetch:D,error:k}=Ln.useQuery({queryKey:["info",e],queryFn:({signal:X})=>Gf(ot(e,"_info"),X).then(K=>({..._d(K),path:e})),placeholderData:s?null:Ln.keepPreviousData,enabled:o,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...c}),{data:H,isFetching:ae,refetch:oe,error:S}=Ln.useQuery({queryKey:["data",_.current,JSON.stringify(C)],queryFn:({signal:X})=>C?qf(ot(_.current,"/"),C,X).then(K=>({...K,result:K.result.map((Z,ee)=>({...Z,id:K.ids[ee]})),path:_.current})):null,placeholderData:a?null:Ln.keepPreviousData,retry:!1,...h});x.useEffect(()=>{if(k){P({message:"Couldn't fetch info",originalError:k});return}if(S){P({message:"Couldn't fetch list",originalError:S});return}R()},[k,S,R]);const U=x.useMemo(()=>B||ae,[B,ae]);Re.useDidUpdate(()=>{if(!u)return;const X=Zi(null,t);y!=null&&y.page_size&&(X.page_size=y.page_size),g({...X})},[e]);const ne=x.useCallback(async X=>{try{const K=await Hf(e,xt(X));return R(),K}catch(K){P({message:`Couldn't fetch item with id ${X}`,originalError:K})}},[e,R]),fe=x.useCallback(async X=>{try{const K=await jf(e,X);return R(),K}catch(K){P({message:"Couldn't add item",originalError:K})}},[e,R]),ye=x.useCallback(async(X,K)=>{try{const Z=await Yf(e,xt(X),K);return R(),Z}catch(Z){P({message:`Couldn't update item with id ${X}`,originalError:Z})}},[e,R]),Me=x.useCallback(async X=>{try{const K=await Wf(e,xt(X));return R(),K}catch(K){P({message:`Couldn't delete item with id ${X}`,originalError:K})}},[e,R]),we=x.useCallback(async({label:X,export_mode:K,delimiter:Z,quotechar:ee})=>{try{await Vf(e,C,{label:X,export_mode:K,delimiter:Z,quotechar:ee}),R()}catch(ie){P({message:"Couldn't download",originalError:ie})}},[e,C,R]),Le=x.useCallback(async(X,{delimiter:K,quotechar:Z})=>{try{const ee=await Kf(e,X,{delimiter:K,quotechar:Z});return R(),ee}catch(ee){P({message:"Couldn't upload",originalError:ee})}},[e,R]),[Ie,lt]=Re.useSetState({data:{},isEnd:!1,fetch:()=>null});x.useEffect(()=>{p&<({fetch:()=>E({page:0,streaming:!0})})},[E,lt,p]),x.useEffect(()=>{p&&H&<(X=>{let K=Object.keys(X.data).length;const Z={isEnd:!1};return C.page<K?(K=C.page,Z.data={[C.page]:H.result}):Z.data={...X.data,[C.page]:H.result},H.result.length<C.page_size?(Z.isEnd=!0,Z.fetch=()=>null):Z.fetch=()=>E({page:K+1,streaming:!0}),Z})},[H,E,lt,p]);const q=x.useMemo(()=>{const X={all:"all",actions:"actions"};return H==null||H.list_columns.forEach(K=>{X[K]&&(X[K]=`_${K}`)}),X},[H==null?void 0:H.list_columns]),Y=x.useCallback(()=>C?oe():E(),[oe,C,E]);return{path:e,data:H,info:W,queryParams:C,loading:U,error:N,streaming:Ie,specialKey:q,setQueryParams:E,refetch:Y,refetchInfo:D,getEntry:ne,addEntry:fe,updateEntry:ye,deleteEntry:Me,download:we,upload:Le,resetError:R}}const wd=({path:e})=>{const[t,n]=x.useState([]),[o,s]=x.useState(),a=x.useCallback(async(c,h)=>{try{h===void 0&&(h=t);const p=await Jf(e,c,h);return s(void 0),p}catch(p){s({message:"Couldn't perform bulk action",originalError:p})}},[e,t]);return{bulkActions:x.useMemo(()=>({selectedIds:t,setSelectedIds:n}),[t,n]),dispatchBulkActions:a,error:o}},mt={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},bl=()=>{const[e]=x.useState(()=>Cf.create(t=>({opened:!1,setOpened:n=>t({opened:n}),view:mt.NORMAL,setView:n=>t({view:n}),state:Wo,setState:n=>t({state:n}),reset:()=>t({state:Wo}),item:void 0,itemLoading:!1,setItem:n=>t({item:n,itemLoading:!1}),setItemLoading:n=>t({itemLoading:n})})));return e};function Sd({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:h,children:p,streaming:y}){const{baseUrl:g}=Pf(),_=Td({path:ot(g,e),initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:h,streaming:y}),C=Ki(_),E=wd(C),w=Ki(E),P=bl(),[N]=x.useState(()=>jo(P)),R=bl(),[W]=x.useState(()=>jo(R));return d.jsx(Ua.Provider,{value:C,children:d.jsx(Ya.Provider,{value:w,children:d.jsx(Ka.Provider,{value:N,children:d.jsx(Ja.Provider,{value:W,children:p})})})})}/**
|
|
4
|
+
`+(c!==u?`result of cast: ${c}`:""))}return a}_cast(t,n){let o=t===void 0?t:this.transforms.reduce((s,a)=>a.call(this,s,t,this),t);return o===void 0&&(o=this.getDefault(n)),o}_validate(t,n={},o,s){let{path:a,originalValue:u=t,strict:c=this.spec.strict}=n,d=t;c||(d=this._cast(d,Object.assign({assert:!1},n)));let p=[];for(let y of Object.values(this.internalTests))y&&p.push(y);this.runTests({path:a,value:d,originalValue:u,options:n,tests:p},o,y=>{if(y.length)return s(y,d);this.runTests({path:a,value:d,originalValue:u,options:n,tests:this.tests},o,s)})}runTests(t,n,o){let s=!1,{tests:a,value:u,originalValue:c,path:d,options:p}=t,y=T=>{s||(s=!0,n(T,u))},g=T=>{s||(s=!0,o(T,u))},_=a.length,C=[];if(!_)return g([]);let E={value:u,originalValue:c,path:d,options:p,schema:this};for(let T=0;T<a.length;T++){const P=a[T];P(E,y,function(X){X&&(Array.isArray(X)?C.push(...X):C.push(X)),--_<=0&&g(C)})}}asNestedTest({key:t,index:n,parent:o,parentPath:s,originalParent:a,options:u}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const d=typeof c=="number";let p=o[c];const y=Object.assign({},u,{strict:!0,parent:o,value:p,originalValue:a[c],key:void 0,[d?"index":"key"]:c,path:d||c.includes(".")?`${s||""}[${d?c:`"${c}"`}]`:(s?`${s}.`:"")+t});return(g,_,C)=>this.resolve(y)._validate(p,y,_,C)}validate(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return new Promise((u,c)=>s._validate(t,n,(d,p)=>{wt.isError(d)&&(d.value=p),c(d)},(d,p)=>{d.length?c(new wt(d,p,void 0,void 0,a)):u(p)}))}validateSync(t,n){var o;let s=this.resolve(Object.assign({},n,{value:t})),a,u=(o=n==null?void 0:n.disableStackTrace)!=null?o:s.spec.disableStackTrace;return s._validate(t,Object.assign({},n,{sync:!0}),(c,d)=>{throw wt.isError(c)&&(c.value=d),c},(c,d)=>{if(c.length)throw new wt(c,t,void 0,void 0,u);a=d}),a}isValid(t,n){return this.validate(t,n).then(()=>!0,o=>{if(wt.isError(o))return!1;throw o})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(o){if(wt.isError(o))return!1;throw o}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):ei(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const o=this.clone({nullable:t});return o.internalTests.nullable=Qr({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),o}optionality(t,n){const o=this.clone({optional:t});return o.internalTests.optionality=Qr({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(t=On.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=On.notNull){return this.nullability(!1,t)}required(t=On.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=On.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),s=Qr(n),a=n.exclusive||n.name&&o.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(o.exclusiveTests[n.name]=!!n.exclusive),o.tests=o.tests.filter(u=>!(u.OPTIONS.name===n.name&&(a||u.OPTIONS.test===s.OPTIONS.test))),o.tests.push(s),o}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let o=this.clone(),s=ud(t).map(a=>new ir(a));return s.forEach(a=>{a.isSibling&&o.deps.push(a.key)}),o.conditions.push(typeof n=="function"?new qo(s,n):qo.fromOptions(s,n)),o}typeError(t){let n=this.clone();return n.internalTests.typeError=Qr({message:t,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=On.oneOf){let o=this.clone();return t.forEach(s=>{o._whitelist.add(s),o._blacklist.delete(s)}),o.internalTests.whiteList=Qr({message:n,name:"oneOf",skipAbsent:!0,test(s){let a=this.schema._whitelist,u=a.resolveAll(this.resolve);return u.includes(s)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:u}})}}),o}notOneOf(t,n=On.notOneOf){let o=this.clone();return t.forEach(s=>{o._blacklist.add(s),o._whitelist.delete(s)}),o.internalTests.blacklist=Qr({message:n,name:"notOneOf",test(s){let a=this.schema._blacklist,u=a.resolveAll(this.resolve);return u.includes(s)?this.createError({params:{values:Array.from(a).join(", "),resolved:u}}):!0}}),o}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:o,meta:s,optional:a,nullable:u}=n.spec;return{meta:s,label:o,optional:a,nullable:u,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(d=>({name:d.OPTIONS.name,params:d.OPTIONS.params})).filter((d,p,y)=>y.findIndex(g=>g.name===d.name)===p)}}}Ot.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Ot.prototype[`${e}At`]=function(t,n,o={}){const{parent:s,parentPath:a,schema:u}=ul(this,t,n,o.context);return u[e](s&&s[a],Object.assign({},o,{parent:s,path:t}))};for(const e of["equals","is"])Ot.prototype[e]=Ot.prototype.oneOf;for(const e of["not","nope"])Ot.prototype[e]=Ot.prototype.notOneOf;const Db=()=>!0;function Jo(e){return new cl(e)}class cl extends Ot{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Db},t))}}Jo.prototype=cl.prototype;function fl(){return new dl}class dl extends Ot{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(o.spec.coerce&&!o.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=ll.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return yn(n)||n===!0}})}isFalse(t=ll.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return yn(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}fl.prototype=dl.prototype;const Nb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Lb(e){const t=hl(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function hl(e){var t,n;const o=Nb.exec(e);return o?{year:jn(o[1]),month:jn(o[2],1)-1,day:jn(o[3],1),hour:jn(o[4]),minute:jn(o[5]),second:jn(o[6]),millisecond:o[7]?jn(o[7].substring(0,3)):0,precision:(t=(n=o[7])==null?void 0:n.length)!=null?t:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:jn(o[10]),minuteOffset:jn(o[11])}:null}function jn(e,t=0){return Number(e)||t}let Bb=/^[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])?)*$/,zb=/^((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,Ub=/^(?:[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,jb="^\\d{4}-\\d{2}-\\d{2}",Wb="\\d{2}:\\d{2}:\\d{2}",Vb="(([+-]\\d{2}(:?\\d{2})?)|Z)",Gb=new RegExp(`${jb}T${Wb}(\\.\\d+)?${Vb}$`),Hb=e=>yn(e)||e===e.trim(),qb={}.toString();function Ro(){return new pl}class pl extends Ot{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce||o.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===qb?t:s})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||On.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=Ut.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n=Ut.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n=Ut.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}matches(t,n){let o=!1,s,a;return n&&(typeof n=="object"?{excludeEmptyString:o=!1,message:s,name:a}=n:s=n),this.test({name:a||"matches",message:s||Ut.matches,params:{regex:t},skipAbsent:!0,test:u=>u===""&&o||u.search(t)!==-1})}email(t=Ut.email){return this.matches(Bb,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ut.url){return this.matches(zb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ut.uuid){return this.matches(Ub,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",o,s;return t&&(typeof t=="object"?{message:n="",allowOffset:o=!1,precision:s=void 0}=t:n=t),this.matches(Gb,{name:"datetime",message:n||Ut.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Ut.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:a=>{if(!a||o)return!0;const u=hl(a);return u?!!u.z:!1}}).test({name:"datetime_precision",message:n||Ut.datetime_precision,params:{precision:s},skipAbsent:!0,test:a=>{if(!a||s==null)return!0;const u=hl(a);return u?u.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ut.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:Hb})}lowercase(t=Ut.lowercase){return this.transform(n=>yn(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yn(n)||n===n.toLowerCase()})}uppercase(t=Ut.uppercase){return this.transform(n=>yn(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>yn(n)||n===n.toUpperCase()})}}Ro.prototype=pl.prototype;let Yb=e=>e!=+e;function md(){return new gl}class gl extends Ot{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Yb(t)}}),this.withMutation(()=>{this.transform((t,n,o)=>{if(!o.spec.coerce)return t;let s=t;if(typeof s=="string"){if(s=s.replace(/\s/g,""),s==="")return NaN;s=+s}return o.isType(s)||s===null?s:parseFloat(s)})})}min(t,n=rr.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(t)}})}max(t,n=rr.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(t)}})}lessThan(t,n=rr.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(o){return o<this.resolve(t)}})}moreThan(t,n=rr.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(o){return o>this.resolve(t)}})}positive(t=rr.positive){return this.moreThan(0,t)}negative(t=rr.negative){return this.lessThan(0,t)}integer(t=rr.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>yn(t)?t:t|0)}round(t){var n;let o=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(o.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(s=>yn(s)?s:Math[t](s))}}md.prototype=gl.prototype;let yd=new Date(""),Kb=e=>Object.prototype.toString.call(e)==="[object Date]";function ml(){return new ti}class ti extends Ot{constructor(){super({type:"date",check(t){return Kb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=Lb(t),isNaN(t)?ti.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let o;if(ir.isRef(t))o=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);o=s}return o}min(t,n=al.min){let o=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(o)}})}max(t,n=al.max){let o=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(o)}})}}ti.INVALID_DATE=yd,ml.prototype=ti.prototype,ml.INVALID_DATE=yd;function Jb(e,t=[]){let n=[],o=new Set,s=new Set(t.map(([u,c])=>`${u}-${c}`));function a(u,c){let d=Mr.split(u)[0];o.add(d),s.has(`${c}-${d}`)||n.push([c,d])}for(const u of Object.keys(e)){let c=e[u];o.add(u),ir.isRef(c)&&c.isSibling?a(c.path,u):Fr(c)&&"deps"in c&&c.deps.forEach(d=>a(d,u))}return Eb.array(Array.from(o),n).reverse()}function vd(e,t){let n=1/0;return e.some((o,s)=>{var a;if((a=t.path)!=null&&a.includes(o))return n=s,!0}),n}function bd(e){return(t,n)=>vd(e,t)-vd(e,n)}const _d=(e,t,n)=>{if(typeof e!="string")return e;let o=e;try{o=JSON.parse(e)}catch{}return n.isType(o)?o:e};function Zo(e){if("fields"in e){const t={};for(const[n,o]of Object.entries(e.fields))t[n]=Zo(o);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Zo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Zo)}):"optional"in e?e.optional():e}const Rb=(e,t)=>{const n=[...Mr.normalizePath(t)];if(n.length===1)return n[0]in e;let o=n.pop(),s=Mr.getter(Mr.join(n),!0)(e);return!!(s&&o in s)};let wd=e=>Object.prototype.toString.call(e)==="[object Object]";function Td(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(o=>n.indexOf(o)===-1)}const Zb=bd([]);function qi(e){return new yl(e)}class yl extends Ot{constructor(t){super({type:"object",check(n){return wd(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=Zb,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var o;let s=super._cast(t,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let a=this.fields,u=(o=n.stripUnknown)!=null?o:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(s).filter(g=>!this._nodes.includes(g))),d={},p=Object.assign({},n,{parent:d,__validating:n.__validating||!1}),y=!1;for(const g of c){let _=a[g],C=g in s;if(_){let E,T=s[g];p.path=(n.path?`${n.path}.`:"")+g,_=_.resolve({value:T,context:n.context,parent:d});let P=_ instanceof Ot?_.spec:void 0,N=P==null?void 0:P.strict;if(P!=null&&P.strip){y=y||g in s;continue}E=!n.__validating||!N?_.cast(s[g],p):s[g],E!==void 0&&(d[g]=E)}else C&&!u&&(d[g]=s[g]);(C!==g in d||d[g]!==s[g])&&(y=!0)}return y?d:s}_validate(t,n={},o,s){let{from:a=[],originalValue:u=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:u},...a],n.__validating=!0,n.originalValue=u,super._validate(t,n,o,(d,p)=>{if(!c||!wd(p)){s(d,p);return}u=u||p;let y=[];for(let g of this._nodes){let _=this.fields[g];!_||ir.isRef(_)||y.push(_.asNestedTest({options:n,key:g,parent:p,parentPath:n.path,originalParent:u}))}this.runTests({tests:y,value:p,originalValue:u,options:n},o,g=>{s(g.sort(this._sortErrors).concat(d),p)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),o=n.fields;for(let[s,a]of Object.entries(this.fields)){const u=o[s];o[s]=u===void 0?a:u}return n.withMutation(s=>s.setFields(o,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(o=>{var s;const a=this.fields[o];let u=t;(s=u)!=null&&s.value&&(u=Object.assign({},u,{parent:u.value,value:u.value[o]})),n[o]=a&&"getDefault"in a?a.getDefault(u):void 0}),n}setFields(t,n){let o=this.clone();return o.fields=t,o._nodes=Jb(t,n),o._sortErrors=bd(Object.keys(t)),n&&(o._excludedEdges=n),o}shape(t,n=[]){return this.clone().withMutation(o=>{let s=o._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...o._excludedEdges,...n]),o.setFields(Object.assign(o.fields,t),s)})}partial(){const t={};for(const[n,o]of Object.entries(this.fields))t[n]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(t)}deepPartial(){return Zo(this)}pick(t){const n={};for(const o of t)this.fields[o]&&(n[o]=this.fields[o]);return this.setFields(n,this._excludedEdges.filter(([o,s])=>t.includes(o)&&t.includes(s)))}omit(t){const n=[];for(const o of Object.keys(this.fields))t.includes(o)||n.push(o);return this.pick(n)}from(t,n,o){let s=Mr.getter(t,!0);return this.transform(a=>{if(!a)return a;let u=a;return Rb(a,t)&&(u=Object.assign({},a),o||delete u[t],u[n]=s(a)),u})}json(){return this.transform(_d)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Go.exact,test(n){if(n==null)return!0;const o=Td(this.schema,n);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,n=Go.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const a=Td(this.schema,s);return!t||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,n=Go.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const o={};for(const s of Object.keys(n))o[t(s)]=n[s];return o})}camelCase(){return this.transformKeys(ol.camelCase)}snakeCase(){return this.transformKeys(ol.snakeCase)}constantCase(){return this.transformKeys(t=>ol.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);o.fields={};for(const[a,u]of Object.entries(n.fields)){var s;let c=t;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),o.fields[a]=u.describe(c)}return o}}qi.prototype=yl.prototype;function vl(e){return new bl(e)}class bl extends Ot{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const o=super._cast(t,n);if(!this._typeCheck(o)||!this.innerType)return o;let s=!1;const a=o.map((u,c)=>{const d=this.innerType.cast(u,Object.assign({},n,{path:`${n.path||""}[${c}]`}));return d!==u&&(s=!0),d});return s?a:o}_validate(t,n={},o,s){var a;let u=this.innerType,c=(a=n.recursive)!=null?a:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,o,(d,p)=>{var y;if(!c||!u||!this._typeCheck(p)){s(d,p);return}let g=new Array(p.length);for(let C=0;C<p.length;C++){var _;g[C]=u.asNestedTest({options:n,index:C,parent:p,parentPath:n.path,originalParent:(_=n.originalValue)!=null?_:t})}this.runTests({value:p,tests:g,originalValue:(y=n.originalValue)!=null?y:t,options:n},o,C=>s(C.concat(d),p))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(_d)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Fr(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+An(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=Ho.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,n){return n=n||Ho.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,n){return n=n||Ho.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(o,s,a)=>!t(o,s,a):o=>!!o;return this.transform(o=>o!=null?o.filter(n):o)}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);if(n.innerType){var s;let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[0]})),o.innerType=n.innerType.describe(a)}return o}}vl.prototype=bl.prototype;function Sd(e){return new _l(e)}class _l extends Ot{constructor(t){super({type:"tuple",spec:{types:t},check(n){const o=this.spec.types;return Array.isArray(n)&&n.length===o.length}}),this.withMutation(()=>{this.typeError(pd.notType)})}_cast(t,n){const{types:o}=this.spec,s=super._cast(t,n);if(!this._typeCheck(s))return s;let a=!1;const u=o.map((c,d)=>{const p=c.cast(s[d],Object.assign({},n,{path:`${n.path||""}[${d}]`}));return p!==s[d]&&(a=!0),p});return a?u:s}_validate(t,n={},o,s){let a=this.spec.types;super._validate(t,n,o,(u,c)=>{var d;if(!this._typeCheck(c)){s(u,c);return}let p=[];for(let[g,_]of a.entries()){var y;p[g]=_.asNestedTest({options:n,index:g,parent:c,parentPath:n.path,originalParent:(y=n.originalValue)!=null?y:t})}this.runTests({value:c,tests:p,originalValue:(d=n.originalValue)!=null?d:t,options:n},o,g=>s(g.concat(u),c))})}describe(t){const n=(t?this.resolve(t):this).clone(),o=super.describe(t);return o.innerType=n.spec.types.map((s,a)=>{var u;let c=t;return(u=c)!=null&&u.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[a]})),s.describe(c)}),o}}Sd.prototype=_l.prototype;function Xb(e){return new Xo(e)}function Cd(e){try{return e()}catch(t){if(wt.isError(t))return Promise.reject(t);throw t}}class Xo{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(n,o={})=>{let s=this.builder(n,o);if(!Fr(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(o)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const n=new Xo(this.builder);return n.spec=Object.assign({},this.spec,t),n}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,n){return this._resolve(t,n).cast(t,n)}asNestedTest(t){let{key:n,index:o,parent:s,options:a}=t,u=s[o??n];return this._resolve(u,Object.assign({},a,{value:u,parent:s})).asNestedTest(t)}validate(t,n){return Cd(()=>this._resolve(t,n).validate(t,n))}validateSync(t,n){return this._resolve(t,n).validateSync(t,n)}validateAt(t,n,o){return Cd(()=>this._resolve(n,o).validateAt(t,n,o))}validateSyncAt(t,n,o){return this._resolve(n,o).validateSyncAt(t,n,o)}isValid(t,n){try{return this._resolve(t,n).isValid(t,n)}catch(o){if(wt.isError(o))return Promise.resolve(!1);throw o}}isValidSync(t,n){return this._resolve(t,n).isValidSync(t,n)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}}function Qb(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{gd[t][n]=e[t][n]})})}function e1(e,t,n){if(!e||!Fr(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof n!="function")throw new TypeError("Method function must be provided");e.prototype[t]=n}const Ed=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:bl,BooleanSchema:dl,DateSchema:ti,LazySchema:Xo,MixedSchema:cl,NumberSchema:gl,ObjectSchema:yl,Schema:Ot,StringSchema:pl,TupleSchema:_l,ValidationError:wt,addMethod:e1,array:vl,bool:fl,boolean:fl,date:ml,defaultLocale:gd,getIn:ul,isSchema:Fr,lazy:Xb,mixed:Jo,number:md,object:qi,printValue:An,reach:kb,ref:Fb,setLocale:Qb,string:Ro,tuple:Sd},Symbol.toStringTag,{value:"Module"})),wl=e=>{const t=e.reduce((n,o)=>{let{name:s,required:a,type:u}=o;switch(u){case"RelatedList":u="array";break;case"Integer":case"Float":u="number";break;case"Related":case"Geometry":case"Raw":u="mixed";break;default:u="string"}let c;try{a?c=Ed[u]().typeError(`Field must be of type ${u}`).required("Field is required"):c=Ed[u]().typeError(`Field must be of type ${u}`).nullable(!0)}catch(d){console.log(d)}return n[s]=c,n},{});return qi().shape(t)},xd=e=>e?{...e,add:{columns:e.add_columns,title:e.add_title,schema:wl(e.add_columns),defaultValues:Qa(e.add_columns)},edit:{columns:e.edit_columns,title:e.edit_title,schema:wl(e.edit_columns),defaultValues:Qa(e.edit_columns)}}:null,t1={columns:[],filters:[],page:0,page_size:25};function Yi(e,t={}){return Object.entries(t).reduce((n,[o,s])=>s==null?(delete n[o],n):{...n,[o]:s},e||t1)}function Ad({path:e,initialQueryParams:t,relation:n,fetchInfo:o=!0,clearInfoOnRefetch:s=!1,clearDataOnRefetch:a=!1,resetQueryParamsOnPathChange:u=!0,infoQueryProps:c,dataQueryProps:d,streaming:p=!1}){const[y,g]=x.useState(t?Yi(null,t):null),_=x.useRef(e);x.useEffect(()=>{_.current=e},[e]);const C=x.useRef(e),E=x.useMemo(()=>(C.current=e,y?{...y,...n?{filters:[...y.filters||[],{col:n.foreign_key,opr:n.type,value:Et(n.id)}]}:{}}:null),[y,n]),T=x.useRef(E);x.useEffect(()=>{T.current=E},[E]);const P=x.useCallback(q=>g(H=>{if(typeof q=="function"&&(q=q(H)),!H)return Yi(null,q);const ee=Yi({...H},q);if(q&&((q.filters||q.order_column||q.order_direction)&&!q.page&&(ee.page=0),p)){if(q.page&&q.page!==H.page&&!q.streaming)throw new Error("You cannot change page in streaming mode, use streaming.fetch() instead");if(q.page_size&&q.page_size!==H.page_size)throw new Error("You cannot change page size in streaming mode, use streaming.fetch() instead")}return ee}),[p]),[N,X]=x.useState(null),W=x.useMemo(()=>N,[N]),D=x.useCallback(()=>X(null),[]),{data:k,isFetching:L,refetch:J,error:le}=Bn.useQuery({queryKey:["info",e],queryFn:({signal:q})=>Rf(ot(e,"_info"),q).then(H=>({...xd(H),path:e})),placeholderData:s?null:Bn.keepPreviousData,enabled:o,retry:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,...c}),{data:ne,isFetching:S,refetch:j,error:re}=Bn.useQuery({queryKey:["data",C.current,JSON.stringify(E)],queryFn:({signal:q})=>E?Xf(ot(C.current,"/"),E,q).then(H=>({...H,result:H.result.map((ee,fe)=>({...ee,id:H.ids[fe]})),path:C.current})):null,placeholderData:a?null:Bn.keepPreviousData,retry:!1,...d});x.useEffect(()=>{if(le){X({message:"Couldn't fetch info",originalError:le});return}if(re){X({message:"Couldn't fetch list",originalError:re});return}D()},[le,re,D]);const ce=x.useMemo(()=>L||S,[L,S]);Xe.useDidUpdate(()=>{if(!u)return;const q=Yi(null,t);y!=null&&y.page_size&&(q.page_size=y.page_size),g({...q})},[e]);const he=x.useCallback(async q=>{try{const H=await Zf(_.current,Et(q));return D(),H}catch(H){X({message:`Couldn't fetch item with id ${q}`,originalError:H})}},[D]),Le=x.useCallback(async q=>{try{const H=await Yf(_.current,q);return D(),H}catch(H){X({message:"Couldn't add item",originalError:H})}},[D]),_e=x.useCallback(async(q,H)=>{try{const ee=await Qf(_.current,Et(q),H);return D(),ee}catch(ee){X({message:`Couldn't update item with id ${q}`,originalError:ee})}},[D]),ke=x.useCallback(async q=>{try{const H=await Kf(_.current,Et(q));return D(),H}catch(H){X({message:`Couldn't delete item with id ${q}`,originalError:H})}},[D]),De=x.useCallback(async(q,{export_mode:H,delimiter:ee,quotechar:fe}={})=>{try{await Jf(_.current,T.current,{label:q,export_mode:H,delimiter:ee,quotechar:fe}),D()}catch(be){X({message:"Couldn't download",originalError:be})}},[D]),mt=x.useCallback(async(q,{delimiter:H,quotechar:ee}={})=>{try{const fe=await ed(_.current,q,{delimiter:H,quotechar:ee});return D(),fe}catch(fe){X({message:"Couldn't upload",originalError:fe})}},[D]),[K,Y]=Xe.useSetState({data:{},isEnd:!1,fetch:()=>null});x.useEffect(()=>{p&&Y({fetch:()=>P({page:0,streaming:!0})})},[P,Y,p]),x.useEffect(()=>{p&&ne&&Y(q=>{let H=Object.keys(q.data).length;const ee={isEnd:!1};return E.page<H?(H=E.page,ee.data={[E.page]:ne.result}):ee.data={...q.data,[E.page]:ne.result},ne.result.length<E.page_size?(ee.isEnd=!0,ee.fetch=()=>null):ee.fetch=()=>P({page:H+1,streaming:!0}),ee})},[ne,P,Y,p]);const ge=x.useMemo(()=>{const q={all:"all",actions:"actions"};return ne==null||ne.list_columns.forEach(H=>{q[H]&&(q[H]=`_${H}`)}),q},[ne==null?void 0:ne.list_columns]),Q=x.useCallback(()=>T.current?j():P(),[j,P]);return{path:e,data:ne,info:k,queryParams:E,loading:ce,error:W,streaming:K,specialKey:ge,setQueryParams:P,refetch:Q,refetchInfo:J,getEntry:he,addEntry:Le,updateEntry:_e,deleteEntry:ke,download:De,upload:mt,resetError:D}}const Od=({path:e})=>{const[t,n]=x.useState([]),[o,s]=x.useState(),a=x.useCallback(async(c,d)=>{try{d===void 0&&(d=t);const p=await td(e,c,d);return s(void 0),p}catch(p){s({message:"Couldn't perform bulk action",originalError:p})}},[e,t]);return{bulkActions:x.useMemo(()=>({selectedIds:t,setSelectedIds:n}),[t,n]),dispatchBulkActions:a,error:o}},gt={NORMAL:"normal",FULL_SCREEN:"fullScreen",OVERLAY:"overlay"},Tl=()=>{const[e]=x.useState(()=>Pf.create(t=>({opened:!1,setOpened:n=>t({opened:n}),view:gt.NORMAL,setView:n=>t({view:n}),state:jo,setState:n=>t({state:n}),reset:()=>t({state:jo}),item:void 0,itemLoading:!1,setItem:n=>t({item:n,itemLoading:!1}),setItemLoading:n=>t({itemLoading:n})})));return e};function Id({resource_name:e="",initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:d,children:p,streaming:y}){const{baseUrl:g}=Nf(),_=Ad({path:ot(g,e),initialQueryParams:t,relation:n,fetchInfo:o,clearInfoOnRefetch:s,clearDataOnRefetch:a,resetQueryParamsOnPathChange:u,infoQueryProps:c,dataQueryProps:d,streaming:y}),C=Hi(_),E=Od(C),T=Hi(E),P=Tl(),[N]=x.useState(()=>Uo(P)),X=Tl(),[W]=x.useState(()=>Uo(X));return h.jsx(Wa.Provider,{value:C,children:h.jsx(Ra.Provider,{value:T,children:h.jsx(Za.Provider,{value:N,children:h.jsx(Xa.Provider,{value:W,children:p})})})})}/**
|
|
5
5
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license.
|
|
@@ -11,7 +11,7 @@ attempted value: ${u}
|
|
|
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 rt=(e,t,n,o)=>{const s=x.forwardRef(({color:a="currentColor",size:u=24,stroke:c=2,title:
|
|
14
|
+
*/const rt=(e,t,n,o)=>{const s=x.forwardRef(({color:a="currentColor",size:u=24,stroke:c=2,title:d,className:p,children:y,...g},_)=>x.createElement("svg",{ref:_,...n1[e],width:u,height:u,className:["tabler-icon",`tabler-icon-${t}`,p].join(" "),strokeWidth:c,stroke:a,...g},[d&&x.createElement("title",{key:"svg-title"},d),...o.map(([C,E])=>x.createElement(C,E)),...Array.isArray(y)?y:[y]]));return s.displayName=`${n}`,s};/**
|
|
15
15
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the MIT license.
|
|
@@ -26,12 +26,12 @@ attempted value: ${u}
|
|
|
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
|
|
29
|
+
*/var Sl=rt("outline","chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);/**
|
|
30
30
|
* @license @tabler/icons-react v3.31.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
|
|
34
|
+
*/var Pd=rt("outline","chevron-up","IconChevronUp",[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]]);/**
|
|
35
35
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the MIT license.
|
|
@@ -61,7 +61,7 @@ attempted value: ${u}
|
|
|
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
|
|
64
|
+
*/var $d=rt("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"}]]);/**
|
|
65
65
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the MIT license.
|
|
@@ -71,89 +71,89 @@ attempted value: ${u}
|
|
|
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
|
|
74
|
+
*/var f1=rt("outline","info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);/**
|
|
75
75
|
* @license @tabler/icons-react v3.31.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
|
|
79
|
+
*/var Md=rt("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"}]]);/**
|
|
80
80
|
* @license @tabler/icons-react v3.31.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
|
|
84
|
+
*/var d1=rt("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"}]]);/**
|
|
85
85
|
* @license @tabler/icons-react v3.31.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
|
|
89
|
+
*/var h1=rt("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"}]]);/**
|
|
90
90
|
* @license @tabler/icons-react v3.31.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
|
|
94
|
+
*/var Cl=rt("outline","plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]);/**
|
|
95
95
|
* @license @tabler/icons-react v3.31.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
|
|
99
|
+
*/var Fd=rt("outline","quote","IconQuote",[["path",{d:"M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5",key:"svg-0"}],["path",{d:"M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5",key:"svg-1"}]]);/**
|
|
100
100
|
* @license @tabler/icons-react v3.31.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
|
|
104
|
+
*/var p1=rt("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"}]]);/**
|
|
105
105
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the MIT license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/var
|
|
109
|
+
*/var kd=rt("outline","separator-vertical","IconSeparatorVertical",[["path",{d:"M12 4l0 16",key:"svg-0"}],["path",{d:"M8 8l-4 4l4 4",key:"svg-1"}],["path",{d:"M16 16l4 -4l-4 -4",key:"svg-2"}]]);/**
|
|
110
110
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the MIT license.
|
|
113
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/var
|
|
114
|
+
*/var Dd=rt("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"}]]);/**
|
|
115
115
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
116
116
|
*
|
|
117
117
|
* This source code is licensed under the MIT license.
|
|
118
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/var
|
|
119
|
+
*/var g1=rt("outline","upload","IconUpload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]);/**
|
|
120
120
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
121
121
|
*
|
|
122
122
|
* This source code is licensed under the MIT license.
|
|
123
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/var
|
|
124
|
+
*/var m1=rt("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"}]]);/**
|
|
125
125
|
* @license @tabler/icons-react v3.31.0 - MIT
|
|
126
126
|
*
|
|
127
127
|
* This source code is licensed under the MIT license.
|
|
128
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/var $d=rt("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function ar(e){const t={variant:"transparent",size:"lg",c:"gray",className:"toolbarActionIcon"},n=v.useProps("ActionIcon",t,e);return x.useMemo(()=>({...n,...e}),[n,e])}function m1(e,{autoInvoke:t=!0,initialLoading:n=!1,clearDataOnRefetch:o=!1,...s}={}){const[a,u]=x.useState(null),[c,h]=x.useState(n),[p,y]=x.useState(null),g=x.useRef(null),_=x.useCallback(()=>{if(e)return o&&u(null),y(null),g.current&&g.current.abort(),g.current=new AbortController,h(!0),fetch(e,{signal:g.current.signal,...s}).then(async E=>{const w=await E.json();if(!E.ok){const P=typeof w.detail=="string"?w.detail:JSON.stringify(w.detail,null,2);throw new Error(P)}return u(w),h(!1),w}).catch(E=>(E&&E.name!=="AbortError"&&(y(E),h(!1)),E))},[e]),C=x.useCallback(()=>{var E;g.current&&((E=g.current)==null||E.abort(""),h(!1))},[]);return x.useEffect(()=>(t&&_(),()=>{g.current&&g.current.abort("")}),[_,t]),{data:a,loading:c,error:p,refetch:_,abort:C}}function Md(e){const t=x.useRef(!1);return x.useMemo(()=>e&&!t.current?(t.current=!0,!0):t.current,[e])}function Fd({opened:e,onClose:t,handleAccept:n,handleReject:o}){return d.jsxs(v.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?",d.jsxs(v.Group,{align:"right",mt:"xl",justify:"flex-end",children:[d.jsx(v.Button,{onClick:o,variant:"default",children:"Abbrechen"}),d.jsx(v.Button,{onClick:n,color:"red",children:"Löschen"})]})]})}function Dd({id:e,...t}){const{refetch:n,refetchInfo:o,deleteEntry:s}=Ae(),[a,u]=x.useState(!1),c=ar({onClick:()=>u(!0),size:"sm",...t}),h=()=>u(!1),p=()=>s(e).then(y=>{y&&(n(),o())}).finally(()=>u(!1));return d.jsxs(d.Fragment,{children:[d.jsx(v.Tooltip,{label:"Delete",children:d.jsx(v.ActionIcon,{...c,children:d.jsx(Pd,{})})}),d.jsx(Fd,{opened:a,onClose:h,handleAccept:p,handleReject:h})]})}function kd({id:e,...t}){const{getEntry:n}=Ae(),{setOpened:o,setItem:s,setItemLoading:a}=zn("edit"),u=ar({onClick:()=>{a(!0),o(!0),n(e).then(c=>{c&&s(c)}).finally(()=>a(!1))},size:"sm",...t});return d.jsx(d.Fragment,{children:d.jsx(v.Tooltip,{label:"Edit",children:d.jsx(v.ActionIcon,{...u,children:d.jsx(d1,{})})})})}const Nd=Object.freeze({left:0,top:0,width:16,height:16}),es=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),wl=Object.freeze({...Nd,...es}),Sl=Object.freeze({...wl,body:"",hidden:!1});function y1(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Ld(e,t){const n=y1(e,t);for(const o in Sl)o in es?o in e&&!(o in n)&&(n[o]=es[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function v1(e,t){const n=e.icons,o=e.aliases||Object.create(null),s=Object.create(null);function a(u){if(n[u])return s[u]=[];if(!(u in s)){s[u]=null;const c=o[u]&&o[u].parent,h=c&&a(c);h&&(s[u]=[c].concat(h))}return s[u]}return Object.keys(n).concat(Object.keys(o)).forEach(a),s}function b1(e,t,n){const o=e.icons,s=e.aliases||Object.create(null);let a={};function u(c){a=Ld(o[c]||s[c],a)}return u(t),n.forEach(u),Ld(e,a)}function Bd(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const o=v1(e);for(const s in o){const a=o[s];a&&(t(s,b1(e,s,a)),n.push(s))}return n}const _1={provider:"",aliases:{},not_found:{},...Nd};function Cl(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function zd(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Cl(e,_1))return null;const n=t.icons;for(const s in n){const a=n[s];if(!s||typeof a.body!="string"||!Cl(a,Sl))return null}const o=t.aliases||Object.create(null);for(const s in o){const a=o[s],u=a.parent;if(!s||typeof u!="string"||!n[u]&&!o[u]||!Cl(a,Sl))return null}return t}const Ud=/^[a-z0-9]+(-[a-z0-9]+)*$/,ts=(e,t,n,o="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;o=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),h=s.pop(),p={provider:s.length>0?s[0]:o,prefix:h,name:c};return t&&!ns(p)?null:p}const a=s[0],u=a.split("-");if(u.length>1){const c={provider:o,prefix:u.shift(),name:u.join("-")};return t&&!ns(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:a};return t&&!ns(c,n)?null:c}return null},ns=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,jd=Object.create(null);function T1(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function si(e,t){const n=jd[e]||(jd[e]=Object.create(null));return n[t]||(n[t]=T1(e,t))}function Wd(e,t){return zd(t)?Bd(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function w1(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Ri=!1;function Vd(e){return typeof e=="boolean"&&(Ri=e),Ri}function Gd(e){const t=typeof e=="string"?ts(e,!0,Ri):e;if(t){const n=si(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function S1(e,t){const n=ts(e,!0,Ri);if(!n)return!1;const o=si(n.provider,n.prefix);return t?w1(o,n.name,t):(o.missing.add(n.name),!0)}function C1(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ri&&!t&&!e.prefix){let s=!1;return zd(e)&&(e.prefix="",Bd(e,(a,u)=>{S1(a,u)&&(s=!0)})),s}const n=e.prefix;if(!ns({prefix:n,name:"a"}))return!1;const o=si(t,n);return!!Wd(o,e)}const Hd=Object.freeze({width:null,height:null}),qd=Object.freeze({...Hd,...es}),E1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,x1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Yd(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(E1);if(o===null||!o.length)return e;const s=[];let a=o.shift(),u=x1.test(a);for(;;){if(u){const c=parseFloat(a);isNaN(c)?s.push(a):s.push(Math.ceil(c*t*n)/n)}else s.push(a);if(a=o.shift(),a===void 0)return s.join("");u=!u}}function A1(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const s=e.indexOf(">",o),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const u=e.indexOf(">",a);if(u===-1)break;n+=e.slice(s+1,a).trim(),e=e.slice(0,o).trim()+e.slice(u+1)}return{defs:n,content:e}}function O1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function I1(e,t,n){const o=A1(e);return O1(o.defs,t+o.content+n)}const P1=e=>e==="unset"||e==="undefined"||e==="none";function $1(e,t){const n={...wl,...e},o={...qd,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,o].forEach(w=>{const P=[],N=w.hFlip,R=w.vFlip;let W=w.rotate;N?R?W+=2:(P.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),P.push("scale(-1 1)"),s.top=s.left=0):R&&(P.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),P.push("scale(1 -1)"),s.top=s.left=0);let B;switch(W<0&&(W-=Math.floor(W/4)*4),W=W%4,W){case 1:B=s.height/2+s.top,P.unshift("rotate(90 "+B.toString()+" "+B.toString()+")");break;case 2:P.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:B=s.width/2+s.left,P.unshift("rotate(-90 "+B.toString()+" "+B.toString()+")");break}W%2===1&&(s.left!==s.top&&(B=s.left,s.left=s.top,s.top=B),s.width!==s.height&&(B=s.width,s.width=s.height,s.height=B)),P.length&&(a=I1(a,'<g transform="'+P.join(" ")+'">',"</g>"))});const u=o.width,c=o.height,h=s.width,p=s.height;let y,g;u===null?(g=c===null?"1em":c==="auto"?p:c,y=Yd(g,h/p)):(y=u==="auto"?h:u,g=c===null?Yd(y,p/h):c==="auto"?p:c);const _={},C=(w,P)=>{P1(P)||(_[w]=P.toString())};C("width",y),C("height",g);const E=[s.left,s.top,h,p];return _.viewBox=E.join(" "),{attributes:_,viewBox:E,body:a}}const M1=/\sid="(\S+)"/g,F1="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let D1=0;function k1(e,t=F1){const n=[];let o;for(;o=M1.exec(e);)n.push(o[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(a=>{const u=typeof t=="function"?t(a):t+(D1++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+u+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const El=Object.create(null);function N1(e,t){El[e]=t}function xl(e){return El[e]||El[""]}function Al(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Ol=Object.create(null),Xi=["https://api.simplesvg.com","https://api.unisvg.com"],rs=[];for(;Xi.length>0;)Xi.length===1||Math.random()>.5?rs.push(Xi.shift()):rs.push(Xi.pop());Ol[""]=Al({resources:["https://api.iconify.design"].concat(rs)});function L1(e,t){const n=Al(t);return n===null?!1:(Ol[e]=n,!0)}function Il(e){return Ol[e]}let Kd=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function B1(e,t){const n=Il(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let s=0;n.resources.forEach(u=>{s=Math.max(s,u.length)});const a=t+".json?icons=";o=n.maxURL-s-n.path.length-a.length}return o}function z1(e){return e===404}const U1=(e,t,n)=>{const o=[],s=B1(e,t),a="icons";let u={type:a,provider:e,prefix:t,icons:[]},c=0;return n.forEach((h,p)=>{c+=h.length+1,c>=s&&p>0&&(o.push(u),u={type:a,provider:e,prefix:t,icons:[]},c=h.length),u.icons.push(h)}),o.push(u),o};function j1(e){if(typeof e=="string"){const t=Il(e);if(t)return t.path}return"/"}const W1={prepare:U1,send:(e,t,n)=>{if(!Kd){n("abort",424);return}let o=j1(t.provider);switch(t.type){case"icons":{const a=t.prefix,c=t.icons.join(","),h=new URLSearchParams({icons:c});o+=a+".json?"+h.toString();break}case"custom":{const a=t.uri;o+=a.slice(0,1)==="/"?a.slice(1):a;break}default:n("abort",400);return}let s=503;Kd(e+o).then(a=>{const u=a.status;if(u!==200){setTimeout(()=>{n(z1(u)?"abort":"next",u)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?n("abort",a):n("next",s)});return}setTimeout(()=>{n("success",a)})}).catch(()=>{n("next",s)})}};function V1(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let o={provider:"",prefix:"",name:""};return e.forEach(s=>{if(o.name===s.name&&o.prefix===s.prefix&&o.provider===s.provider)return;o=s;const a=s.provider,u=s.prefix,c=s.name,h=n[a]||(n[a]=Object.create(null)),p=h[u]||(h[u]=si(a,u));let y;c in p.icons?y=t.loaded:u===""||p.missing.has(c)?y=t.missing:y=t.pending;const g={provider:a,prefix:u,name:c};y.push(g)}),t}function Jd(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(s=>s.id!==t))})}function G1(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,s=e.prefix;t.forEach(a=>{const u=a.icons,c=u.pending.length;u.pending=u.pending.filter(h=>{if(h.prefix!==s)return!0;const p=h.name;if(e.icons[p])u.loaded.push({provider:o,prefix:s,name:p});else if(e.missing.has(p))u.missing.push({provider:o,prefix:s,name:p});else return n=!0,!0;return!1}),u.pending.length!==c&&(n||Jd([e],a.id),a.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),a.abort))})}))}let H1=0;function q1(e,t,n){const o=H1++,s=Jd.bind(null,n,o);if(!t.pending.length)return s;const a={id:o,icons:t,callback:e,abort:s};return n.forEach(u=>{(u.loaderCallbacks||(u.loaderCallbacks=[])).push(a)}),s}function Y1(e,t=!0,n=!1){const o=[];return e.forEach(s=>{const a=typeof s=="string"?ts(s,t,n):s;a&&o.push(a)}),o}var K1={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function J1(e,t,n,o){const s=e.resources.length,a=e.random?Math.floor(Math.random()*s):e.index;let u;if(e.random){let k=e.resources.slice(0);for(u=[];k.length>1;){const H=Math.floor(Math.random()*k.length);u.push(k[H]),k=k.slice(0,H).concat(k.slice(H+1))}u=u.concat(k)}else u=e.resources.slice(a).concat(e.resources.slice(0,a));const c=Date.now();let h="pending",p=0,y,g=null,_=[],C=[];typeof o=="function"&&C.push(o);function E(){g&&(clearTimeout(g),g=null)}function w(){h==="pending"&&(h="aborted"),E(),_.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),_=[]}function P(k,H){H&&(C=[]),typeof k=="function"&&C.push(k)}function N(){return{startTime:c,payload:t,status:h,queriesSent:p,queriesPending:_.length,subscribe:P,abort:w}}function R(){h="failed",C.forEach(k=>{k(void 0,y)})}function W(){_.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),_=[]}function B(k,H,ae){const oe=H!=="success";switch(_=_.filter(S=>S!==k),h){case"pending":break;case"failed":if(oe||!e.dataAfterTimeout)return;break;default:return}if(H==="abort"){y=ae,R();return}if(oe){y=ae,_.length||(u.length?D():R());return}if(E(),W(),!e.random){const S=e.resources.indexOf(k.resource);S!==-1&&S!==e.index&&(e.index=S)}h="completed",C.forEach(S=>{S(ae)})}function D(){if(h!=="pending")return;E();const k=u.shift();if(k===void 0){if(_.length){g=setTimeout(()=>{E(),h==="pending"&&(W(),R())},e.timeout);return}R();return}const H={status:"pending",resource:k,callback:(ae,oe)=>{B(H,ae,oe)}};_.push(H),p++,g=setTimeout(D,e.rotate),n(k,t,H.callback)}return setTimeout(D),N}function Zd(e){const t={...K1,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function s(c,h,p){const y=J1(t,c,h,(g,_)=>{o(),p&&p(g,_)});return n.push(y),y}function a(c){return n.find(h=>c(h))||null}return{query:s,find:a,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function Rd(){}const Pl=Object.create(null);function Z1(e){if(!Pl[e]){const t=Il(e);if(!t)return;const n=Zd(t),o={config:t,redundancy:n};Pl[e]=o}return Pl[e]}function R1(e,t,n){let o,s;if(typeof e=="string"){const a=xl(e);if(!a)return n(void 0,424),Rd;s=a.send;const u=Z1(e);u&&(o=u.redundancy)}else{const a=Al(e);if(a){o=Zd(a);const u=e.resources?e.resources[0]:"",c=xl(u);c&&(s=c.send)}}return!o||!s?(n(void 0,424),Rd):o.query(t,s,n)().abort}function Xd(){}function X1(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,G1(e)}))}function Q1(e){const t=[],n=[];return e.forEach(o=>{(o.match(Ud)?t:n).push(o)}),{valid:t,invalid:n}}function Qi(e,t,n){function o(){const s=e.pendingIcons;t.forEach(a=>{s&&s.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!Wd(e,n).length){o();return}}catch(s){console.error(s)}o(),X1(e)}function Qd(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function e_(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,s=e.iconsToLoad;if(delete e.iconsToLoad,!s||!s.length)return;const a=e.loadIcon;if(e.loadIcons&&(s.length>1||!a)){Qd(e.loadIcons(s,o,n),y=>{Qi(e,s,y)});return}if(a){s.forEach(y=>{const g=a(y,o,n);Qd(g,_=>{const C=_?{prefix:o,icons:{[y]:_}}:null;Qi(e,[y],C)})});return}const{valid:u,invalid:c}=Q1(s);if(c.length&&Qi(e,c,null),!u.length)return;const h=o.match(Ud)?xl(n):null;if(!h){Qi(e,u,null);return}h.prepare(n,o,u).forEach(y=>{R1(n,y,g=>{Qi(e,y.icons,g)})})}))}const t_=(e,t)=>{const n=Y1(e,!0,Vd()),o=V1(n);if(!o.pending.length){let h=!0;return t&&setTimeout(()=>{h&&t(o.loaded,o.missing,o.pending,Xd)}),()=>{h=!1}}const s=Object.create(null),a=[];let u,c;return o.pending.forEach(h=>{const{provider:p,prefix:y}=h;if(y===c&&p===u)return;u=p,c=y,a.push(si(p,y));const g=s[p]||(s[p]=Object.create(null));g[y]||(g[y]=[])}),o.pending.forEach(h=>{const{provider:p,prefix:y,name:g}=h,_=si(p,y),C=_.pendingIcons||(_.pendingIcons=new Set);C.has(g)||(C.add(g),s[p][y].push(g))}),a.forEach(h=>{const p=s[h.provider][h.prefix];p.length&&e_(h,p)}),t?q1(t,o,a):Xd};function n_(e,t){const n={...e};for(const o in t){const s=t[o],a=typeof s;o in Hd?(s===null||s&&(a==="string"||a==="number"))&&(n[o]=s):a===typeof n[o]&&(n[o]=o==="rotate"?s%4:s)}return n}const r_=/[\s,]+/;function i_(e,t){t.split(r_).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function o_(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:o(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(e.slice(0,e.length-n.length));return isNaN(a)?0:(a=a/s,a%1===0?o(a):0)}}return t}function s_(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function a_(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function l_(e){return"data:image/svg+xml,"+a_(e)}function u_(e){return'url("'+l_(e)+'")'}let eo;function c_(){try{eo=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{eo=null}}function f_(e){return eo===void 0&&c_(),eo?eo.createHTML(e):e}const eh={...qd,inline:!1},d_={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},h_={display:"inline-block"},$l={backgroundColor:"currentColor"},th={backgroundColor:"transparent"},nh={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},rh={WebkitMask:$l,mask:$l,background:th};for(const e in rh){const t=rh[e];for(const n in nh)t[e+n]=nh[n]}const p_={...eh,inline:!0};function ih(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const g_=(e,t,n)=>{const o=t.inline?p_:eh,s=n_(o,t),a=t.mode||"svg",u={},c=t.style||{},h={...a==="svg"?d_:{}};if(n){const P=ts(n,!1,!0);if(P){const N=["iconify"],R=["provider","prefix"];for(const W of R)P[W]&&N.push("iconify--"+P[W]);h.className=N.join(" ")}}for(let P in t){const N=t[P];if(N!==void 0)switch(P){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":h.ref=N;break;case"className":h[P]=(h[P]?h[P]+" ":"")+N;break;case"inline":case"hFlip":case"vFlip":s[P]=N===!0||N==="true"||N===1;break;case"flip":typeof N=="string"&&i_(s,N);break;case"color":u.color=N;break;case"rotate":typeof N=="string"?s[P]=o_(N):typeof N=="number"&&(s[P]=N);break;case"ariaHidden":case"aria-hidden":N!==!0&&N!=="true"&&delete h["aria-hidden"];break;default:o[P]===void 0&&(h[P]=N)}}const p=$1(e,s),y=p.attributes;if(s.inline&&(u.verticalAlign="-0.125em"),a==="svg"){h.style={...u,...c},Object.assign(h,y);let P=0,N=t.id;return typeof N=="string"&&(N=N.replace(/-/g,"_")),h.dangerouslySetInnerHTML={__html:f_(k1(p.body,N?()=>N+"ID"+P++:"iconifyReact"))},x.createElement("svg",h)}const{body:g,width:_,height:C}=e,E=a==="mask"||(a==="bg"?!1:g.indexOf("currentColor")!==-1),w=s_(g,{...y,width:_+"",height:C+""});return h.style={...u,"--svg":u_(w),width:ih(y.width),height:ih(y.height),...h_,...E?$l:th,...c},x.createElement("span",h)};if(Vd(!0),N1("",W1),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!C1(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;L1(n,s)||console.error(o)}catch{console.error(o)}}}}function oh(e){const[t,n]=x.useState(!!e.ssr),[o,s]=x.useState({});function a(C){if(C){const E=e.icon;if(typeof E=="object")return{name:"",data:E};const w=Gd(E);if(w)return{name:E,data:w}}return{name:""}}const[u,c]=x.useState(a(!!e.ssr));function h(){const C=o.callback;C&&(C(),s({}))}function p(C){if(JSON.stringify(u)!==JSON.stringify(C))return h(),c(C),!0}function y(){var C;const E=e.icon;if(typeof E=="object"){p({name:"",data:E});return}const w=Gd(E);if(p({name:E,data:w}))if(w===void 0){const P=t_([E],y);s({callback:P})}else w&&((C=e.onLoad)===null||C===void 0||C.call(e,E))}x.useEffect(()=>(n(!0),h),[]),x.useEffect(()=>{t&&y()},[e.icon,t]);const{name:g,data:_}=u;return _?g_({...wl,..._},e,g):e.children?e.children:e.fallback?e.fallback:x.createElement("span",{})}const Ml=x.forwardRef((e,t)=>oh({...e,_ref:t}));x.forwardRef((e,t)=>oh({inline:!0,...e,_ref:t}));function sh(e,{data:t,onChange:n}){return e?{checked:t||!1,onChange:o=>n(o.target.checked)}:{data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],value:ni(t)?String(t):null,onChange:o=>n(ni(o)?o===String(!0):void 0)}}function m_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wn=m_,y_=typeof Un=="object"&&Un&&Un.Object===Object&&Un,ah=y_,v_=ah,b_=typeof self=="object"&&self&&self.Object===Object&&self,__=v_||b_||Function("return this")(),bn=__,T_=bn,w_=function(){return T_.Date.now()},S_=w_,C_=/\s/;function E_(e){for(var t=e.length;t--&&C_.test(e.charAt(t)););return t}var x_=E_,A_=x_,O_=/^\s+/;function I_(e){return e&&e.slice(0,A_(e)+1).replace(O_,"")}var P_=I_,$_=bn,M_=$_.Symbol,is=M_,lh=is,uh=Object.prototype,F_=uh.hasOwnProperty,D_=uh.toString,to=lh?lh.toStringTag:void 0;function k_(e){var t=F_.call(e,to),n=e[to];try{e[to]=void 0;var o=!0}catch{}var s=D_.call(e);return o&&(t?e[to]=n:delete e[to]),s}var N_=k_,L_=Object.prototype,B_=L_.toString;function z_(e){return B_.call(e)}var U_=z_,ch=is,j_=N_,W_=U_,V_="[object Null]",G_="[object Undefined]",fh=ch?ch.toStringTag:void 0;function H_(e){return e==null?e===void 0?G_:V_:fh&&fh in Object(e)?j_(e):W_(e)}var ai=H_;function q_(e){return e!=null&&typeof e=="object"}var li=q_,Y_=ai,K_=li,J_="[object Symbol]";function Z_(e){return typeof e=="symbol"||K_(e)&&Y_(e)==J_}var dh=Z_,R_=P_,hh=Wn,X_=dh,ph=NaN,Q_=/^[-+]0x[0-9a-f]+$/i,eT=/^0b[01]+$/i,tT=/^0o[0-7]+$/i,nT=parseInt;function rT(e){if(typeof e=="number")return e;if(X_(e))return ph;if(hh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=R_(e);var n=eT.test(e);return n||tT.test(e)?nT(e.slice(2),n?2:8):Q_.test(e)?ph:+e}var gh=rT,iT=Wn,Fl=S_,mh=gh,oT="Expected a function",sT=Math.max,aT=Math.min;function lT(e,t,n){var o,s,a,u,c,h,p=0,y=!1,g=!1,_=!0;if(typeof e!="function")throw new TypeError(oT);t=mh(t)||0,iT(n)&&(y=!!n.leading,g="maxWait"in n,a=g?sT(mh(n.maxWait)||0,t):a,_="trailing"in n?!!n.trailing:_);function C(k){var H=o,ae=s;return o=s=void 0,p=k,u=e.apply(ae,H),u}function E(k){return p=k,c=setTimeout(N,t),y?C(k):u}function w(k){var H=k-h,ae=k-p,oe=t-H;return g?aT(oe,a-ae):oe}function P(k){var H=k-h,ae=k-p;return h===void 0||H>=t||H<0||g&&ae>=a}function N(){var k=Fl();if(P(k))return R(k);c=setTimeout(N,w(k))}function R(k){return c=void 0,_&&o?C(k):(o=s=void 0,u)}function W(){c!==void 0&&clearTimeout(c),p=0,o=h=s=c=void 0}function B(){return c===void 0?u:R(Fl())}function D(){var k=Fl(),H=P(k);if(o=arguments,s=this,h=k,H){if(c===void 0)return E(h);if(g)return clearTimeout(c),c=setTimeout(N,t),C(h)}return c===void 0&&(c=setTimeout(N,t)),u}return D.cancel=W,D.flush=B,D}var uT=lT;const cT=ir(uT),fT=(e,t,n,o,s,a=300)=>{const[u,c]=x.useState(n??t);x.useEffect(()=>{c(n??t)},[n]);const h=x.useCallback(cT(g=>e(o,g),a),[e,o,a]),p=x.useCallback(g=>{const _=s(g);c(_??t),h(_)},[h,s]),y=x.useCallback(()=>{c(t),e(o,void 0)},[t,e,o]);return[u,p,y]};function lr(e,t){return e===t||Array.isArray(e)&&e.includes(t)}var dT=Object.prototype;function hT(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||dT;return e===n}var os=hT;function pT(e,t){return function(n){return e(t(n))}}var yh=pT,gT=yh,mT=gT(Object.keys,Object),yT=mT,vT=os,bT=yT,_T=Object.prototype,TT=_T.hasOwnProperty;function wT(e){if(!vT(e))return bT(e);var t=[];for(var n in Object(e))TT.call(e,n)&&n!="constructor"&&t.push(n);return t}var ST=wT,CT=ai,ET=Wn,xT="[object AsyncFunction]",AT="[object Function]",OT="[object GeneratorFunction]",IT="[object Proxy]";function PT(e){if(!ET(e))return!1;var t=CT(e);return t==AT||t==OT||t==xT||t==IT}var Dl=PT,$T=bn,MT=$T["__core-js_shared__"],FT=MT,kl=FT,vh=function(){var e=/[^.]+$/.exec(kl&&kl.keys&&kl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function DT(e){return!!vh&&vh in e}var kT=DT,NT=Function.prototype,LT=NT.toString;function BT(e){if(e!=null){try{return LT.call(e)}catch{}try{return e+""}catch{}}return""}var bh=BT,zT=Dl,UT=kT,jT=Wn,WT=bh,VT=/[\\^$.*+?()[\]{}|]/g,GT=/^\[object .+?Constructor\]$/,HT=Function.prototype,qT=Object.prototype,YT=HT.toString,KT=qT.hasOwnProperty,JT=RegExp("^"+YT.call(KT).replace(VT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZT(e){if(!jT(e)||UT(e))return!1;var t=zT(e)?JT:GT;return t.test(WT(e))}var RT=ZT;function XT(e,t){return e==null?void 0:e[t]}var QT=XT,ew=RT,tw=QT;function nw(e,t){var n=tw(e,t);return ew(n)?n:void 0}var kr=nw,rw=kr,iw=bn,ow=rw(iw,"DataView"),sw=ow,aw=kr,lw=bn,uw=aw(lw,"Map"),Nl=uw,cw=kr,fw=bn,dw=cw(fw,"Promise"),hw=dw,pw=kr,gw=bn,mw=pw(gw,"Set"),_h=mw,yw=kr,vw=bn,bw=yw(vw,"WeakMap"),_w=bw,Ll=sw,Bl=Nl,zl=hw,Ul=_h,jl=_w,Th=ai,ui=bh,wh="[object Map]",Tw="[object Object]",Sh="[object Promise]",Ch="[object Set]",Eh="[object WeakMap]",xh="[object DataView]",ww=ui(Ll),Sw=ui(Bl),Cw=ui(zl),Ew=ui(Ul),xw=ui(jl),Nr=Th;(Ll&&Nr(new Ll(new ArrayBuffer(1)))!=xh||Bl&&Nr(new Bl)!=wh||zl&&Nr(zl.resolve())!=Sh||Ul&&Nr(new Ul)!=Ch||jl&&Nr(new jl)!=Eh)&&(Nr=function(e){var t=Th(e),n=t==Tw?e.constructor:void 0,o=n?ui(n):"";if(o)switch(o){case ww:return xh;case Sw:return wh;case Cw:return Sh;case Ew:return Ch;case xw:return Eh}return t});var Aw=Nr,Ow=ai,Iw=li,Pw="[object Arguments]";function $w(e){return Iw(e)&&Ow(e)==Pw}var Mw=$w,Ah=Mw,Fw=li,Oh=Object.prototype,Dw=Oh.hasOwnProperty,kw=Oh.propertyIsEnumerable,Nw=Ah(function(){return arguments}())?Ah:function(e){return Fw(e)&&Dw.call(e,"callee")&&!kw.call(e,"callee")},ss=Nw,Lw=Array.isArray,no=Lw,Bw=9007199254740991;function zw(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bw}var Ih=zw,Uw=Dl,jw=Ih;function Ww(e){return e!=null&&jw(e.length)&&!Uw(e)}var as=Ww,ls={exports:{}};function Vw(){return!1}var Gw=Vw;ls.exports,function(e,t){var n=bn,o=Gw,s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===s,c=u?n.Buffer:void 0,h=c?c.isBuffer:void 0,p=h||o;e.exports=p}(ls,ls.exports);var Wl=ls.exports,Hw=ai,qw=Ih,Yw=li,Kw="[object Arguments]",Jw="[object Array]",Zw="[object Boolean]",Rw="[object Date]",Xw="[object Error]",Qw="[object Function]",eS="[object Map]",tS="[object Number]",nS="[object Object]",rS="[object RegExp]",iS="[object Set]",oS="[object String]",sS="[object WeakMap]",aS="[object ArrayBuffer]",lS="[object DataView]",uS="[object Float32Array]",cS="[object Float64Array]",fS="[object Int8Array]",dS="[object Int16Array]",hS="[object Int32Array]",pS="[object Uint8Array]",gS="[object Uint8ClampedArray]",mS="[object Uint16Array]",yS="[object Uint32Array]",Xe={};Xe[uS]=Xe[cS]=Xe[fS]=Xe[dS]=Xe[hS]=Xe[pS]=Xe[gS]=Xe[mS]=Xe[yS]=!0,Xe[Kw]=Xe[Jw]=Xe[aS]=Xe[Zw]=Xe[lS]=Xe[Rw]=Xe[Xw]=Xe[Qw]=Xe[eS]=Xe[tS]=Xe[nS]=Xe[rS]=Xe[iS]=Xe[oS]=Xe[sS]=!1;function vS(e){return Yw(e)&&qw(e.length)&&!!Xe[Hw(e)]}var bS=vS;function _S(e){return function(t){return e(t)}}var TS=_S,us={exports:{}};us.exports,function(e,t){var n=ah,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a&&n.process,c=function(){try{var h=s&&s.require&&s.require("util").types;return h||u&&u.binding&&u.binding("util")}catch{}}();e.exports=c}(us,us.exports);var wS=us.exports,SS=bS,CS=TS,Ph=wS,$h=Ph&&Ph.isTypedArray,ES=$h?CS($h):SS,Vl=ES,xS=ST,AS=Aw,OS=ss,IS=no,PS=as,$S=Wl,MS=os,FS=Vl,DS="[object Map]",kS="[object Set]",NS=Object.prototype,LS=NS.hasOwnProperty;function BS(e){if(e==null)return!0;if(PS(e)&&(IS(e)||typeof e=="string"||typeof e.splice=="function"||$S(e)||FS(e)||OS(e)))return!e.length;var t=AS(e);if(t==DS||t==kS)return!e.size;if(MS(e))return!xS(e).length;for(var n in e)if(LS.call(e,n))return!1;return!0}var zS=BS;const Mh=ir(zS),US=(e,t,n,o,s,a,u)=>e.map((c,h)=>d.jsx(v.Grid.Col,{span:s==="row"?12/e.length:12,style:{alignContent:"start"},children:d.jsx(De.JsonFormsDispatch,{uischema:c,schema:t,path:n,enabled:o,renderers:a,cells:u})},`${n}-${h}`)),jS=({elements:e,schema:t,path:n,enabled:o,direction:s,renderers:a,cells:u})=>Mh(e)?null:d.jsx(v.Grid,{spacing:s==="row"?2:0,children:US(e,t,n,o,s,a,u)}),cs=x.memo(jS);function Gl(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString()}function Fh(e){const t=new Date(e);return new Date(t.getTime()+t.getTimezoneOffset()*6e4)}function In(e={}){const t=v.useProps("__",{},{});let n=null;return lr(e.schema.type,"null")||(lr(e.schema.type,"array")?n=[]:lr(e.schema.type,"object")?n={}:lr(e.schema.type,"string")&&(n="")),{inputWrapperOrder:["label","input","description","error"],label:e.label,description:e.description,required:e.required,disabled:!e.enabled,onChange:o=>e.handleChange(e.path,o??(t.setNull?n:void 0)),error:e.errors?e.errors.split(`
|
|
130
|
-
`).map(o=>
|
|
129
|
+
*/var Nd=rt("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function or(e){const t={variant:"transparent",size:"lg",c:"gray",className:"toolbarActionIcon"},n=b.useProps("ActionIcon",t,e);return x.useMemo(()=>({...n,...e}),[n,e])}function y1(e,{autoInvoke:t=!0,initialLoading:n=!1,clearDataOnRefetch:o=!1,...s}={}){const[a,u]=x.useState(null),[c,d]=x.useState(n),[p,y]=x.useState(null),g=x.useRef(null),_=x.useCallback(()=>{if(e)return o&&u(null),y(null),g.current&&g.current.abort(),g.current=new AbortController,d(!0),fetch(e,{signal:g.current.signal,...s}).then(async E=>{const T=await E.json();if(!E.ok){const P=typeof T.detail=="string"?T.detail:JSON.stringify(T.detail,null,2);throw new Error(P)}return u(T),d(!1),T}).catch(E=>(E&&E.name!=="AbortError"&&(y(E),d(!1)),E))},[e]),C=x.useCallback(()=>{var E;g.current&&((E=g.current)==null||E.abort(""),d(!1))},[]);return x.useEffect(()=>(t&&_(),()=>{g.current&&g.current.abort("")}),[_,t]),{data:a,loading:c,error:p,refetch:_,abort:C}}function Ld(e){const t=x.useRef(!1);return x.useMemo(()=>e&&!t.current?(t.current=!0,!0):t.current,[e])}function Bd({opened:e,onClose:t,handleAccept:n,handleReject:o}){return h.jsxs(b.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?",h.jsxs(b.Group,{align:"right",mt:"xl",justify:"flex-end",children:[h.jsx(b.Button,{onClick:o,variant:"default",children:"Abbrechen"}),h.jsx(b.Button,{onClick:n,color:"red",children:"Löschen"})]})]})}const El=x.memo(({id:e,...t})=>{const{refetch:n,refetchInfo:o,deleteEntry:s}=Oe(),[a,u]=x.useState(!1),c=or({onClick:()=>u(!0),size:"sm",...t}),d=()=>u(!1),p=()=>s(e).then(y=>{y&&(n(),o())}).finally(()=>u(!1));return h.jsxs(h.Fragment,{children:[h.jsx(b.Tooltip,{label:"Delete",children:h.jsx(b.ActionIcon,{...c,children:h.jsx(Dd,{})})}),h.jsx(Bd,{opened:a,onClose:d,handleAccept:p,handleReject:d})]})});El.displayName="Delete";const xl=x.memo(({id:e,...t})=>{const{getEntry:n}=Oe(),{setOpened:o,setItem:s,setItemLoading:a}=zn("edit"),u=or({onClick:()=>{a(!0),o(!0),n(e).then(c=>{c&&s(c)}).finally(()=>a(!1))},size:"sm",...t});return h.jsx(h.Fragment,{children:h.jsx(b.Tooltip,{label:"Edit",children:h.jsx(b.ActionIcon,{...u,children:h.jsx(h1,{})})})})});xl.displayName="Edit";const zd=Object.freeze({left:0,top:0,width:16,height:16}),Qo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Al=Object.freeze({...zd,...Qo}),Ol=Object.freeze({...Al,body:"",hidden:!1});function v1(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Ud(e,t){const n=v1(e,t);for(const o in Ol)o in Qo?o in e&&!(o in n)&&(n[o]=Qo[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function b1(e,t){const n=e.icons,o=e.aliases||Object.create(null),s=Object.create(null);function a(u){if(n[u])return s[u]=[];if(!(u in s)){s[u]=null;const c=o[u]&&o[u].parent,d=c&&a(c);d&&(s[u]=[c].concat(d))}return s[u]}return Object.keys(n).concat(Object.keys(o)).forEach(a),s}function _1(e,t,n){const o=e.icons,s=e.aliases||Object.create(null);let a={};function u(c){a=Ud(o[c]||s[c],a)}return u(t),n.forEach(u),Ud(e,a)}function jd(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),n.push(s)});const o=b1(e);for(const s in o){const a=o[s];a&&(t(s,_1(e,s,a)),n.push(s))}return n}const w1={provider:"",aliases:{},not_found:{},...zd};function Il(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Wd(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Il(e,w1))return null;const n=t.icons;for(const s in n){const a=n[s];if(!s||typeof a.body!="string"||!Il(a,Ol))return null}const o=t.aliases||Object.create(null);for(const s in o){const a=o[s],u=a.parent;if(!s||typeof u!="string"||!n[u]&&!o[u]||!Il(a,Ol))return null}return t}const Vd=/^[a-z0-9]+(-[a-z0-9]+)*$/,es=(e,t,n,o="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;o=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),d=s.pop(),p={provider:s.length>0?s[0]:o,prefix:d,name:c};return t&&!ts(p)?null:p}const a=s[0],u=a.split("-");if(u.length>1){const c={provider:o,prefix:u.shift(),name:u.join("-")};return t&&!ts(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:a};return t&&!ts(c,n)?null:c}return null},ts=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,Gd=Object.create(null);function T1(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ni(e,t){const n=Gd[e]||(Gd[e]=Object.create(null));return n[t]||(n[t]=T1(e,t))}function Hd(e,t){return Wd(t)?jd(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function S1(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let Ki=!1;function qd(e){return typeof e=="boolean"&&(Ki=e),Ki}function Yd(e){const t=typeof e=="string"?es(e,!0,Ki):e;if(t){const n=ni(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function C1(e,t){const n=es(e,!0,Ki);if(!n)return!1;const o=ni(n.provider,n.prefix);return t?S1(o,n.name,t):(o.missing.add(n.name),!0)}function E1(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Ki&&!t&&!e.prefix){let s=!1;return Wd(e)&&(e.prefix="",jd(e,(a,u)=>{C1(a,u)&&(s=!0)})),s}const n=e.prefix;if(!ts({prefix:n,name:"a"}))return!1;const o=ni(t,n);return!!Hd(o,e)}const Kd=Object.freeze({width:null,height:null}),Jd=Object.freeze({...Kd,...Qo}),x1=/(-?[0-9.]*[0-9]+[0-9.]*)/g,A1=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rd(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(x1);if(o===null||!o.length)return e;const s=[];let a=o.shift(),u=A1.test(a);for(;;){if(u){const c=parseFloat(a);isNaN(c)?s.push(a):s.push(Math.ceil(c*t*n)/n)}else s.push(a);if(a=o.shift(),a===void 0)return s.join("");u=!u}}function O1(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const s=e.indexOf(">",o),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const u=e.indexOf(">",a);if(u===-1)break;n+=e.slice(s+1,a).trim(),e=e.slice(0,o).trim()+e.slice(u+1)}return{defs:n,content:e}}function I1(e,t){return e?"<defs>"+e+"</defs>"+t:t}function P1(e,t,n){const o=O1(e);return I1(o.defs,t+o.content+n)}const $1=e=>e==="unset"||e==="undefined"||e==="none";function M1(e,t){const n={...Al,...e},o={...Jd,...t},s={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,o].forEach(T=>{const P=[],N=T.hFlip,X=T.vFlip;let W=T.rotate;N?X?W+=2:(P.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),P.push("scale(-1 1)"),s.top=s.left=0):X&&(P.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),P.push("scale(1 -1)"),s.top=s.left=0);let D;switch(W<0&&(W-=Math.floor(W/4)*4),W=W%4,W){case 1:D=s.height/2+s.top,P.unshift("rotate(90 "+D.toString()+" "+D.toString()+")");break;case 2:P.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:D=s.width/2+s.left,P.unshift("rotate(-90 "+D.toString()+" "+D.toString()+")");break}W%2===1&&(s.left!==s.top&&(D=s.left,s.left=s.top,s.top=D),s.width!==s.height&&(D=s.width,s.width=s.height,s.height=D)),P.length&&(a=P1(a,'<g transform="'+P.join(" ")+'">',"</g>"))});const u=o.width,c=o.height,d=s.width,p=s.height;let y,g;u===null?(g=c===null?"1em":c==="auto"?p:c,y=Rd(g,d/p)):(y=u==="auto"?d:u,g=c===null?Rd(y,p/d):c==="auto"?p:c);const _={},C=(T,P)=>{$1(P)||(_[T]=P.toString())};C("width",y),C("height",g);const E=[s.left,s.top,d,p];return _.viewBox=E.join(" "),{attributes:_,viewBox:E,body:a}}const F1=/\sid="(\S+)"/g,k1="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let D1=0;function N1(e,t=k1){const n=[];let o;for(;o=F1.exec(e);)n.push(o[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(a=>{const u=typeof t=="function"?t(a):t+(D1++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+u+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const Pl=Object.create(null);function L1(e,t){Pl[e]=t}function $l(e){return Pl[e]||Pl[""]}function Ml(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Fl=Object.create(null),Ji=["https://api.simplesvg.com","https://api.unisvg.com"],ns=[];for(;Ji.length>0;)Ji.length===1||Math.random()>.5?ns.push(Ji.shift()):ns.push(Ji.pop());Fl[""]=Ml({resources:["https://api.iconify.design"].concat(ns)});function B1(e,t){const n=Ml(t);return n===null?!1:(Fl[e]=n,!0)}function kl(e){return Fl[e]}let Zd=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function z1(e,t){const n=kl(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let s=0;n.resources.forEach(u=>{s=Math.max(s,u.length)});const a=t+".json?icons=";o=n.maxURL-s-n.path.length-a.length}return o}function U1(e){return e===404}const j1=(e,t,n)=>{const o=[],s=z1(e,t),a="icons";let u={type:a,provider:e,prefix:t,icons:[]},c=0;return n.forEach((d,p)=>{c+=d.length+1,c>=s&&p>0&&(o.push(u),u={type:a,provider:e,prefix:t,icons:[]},c=d.length),u.icons.push(d)}),o.push(u),o};function W1(e){if(typeof e=="string"){const t=kl(e);if(t)return t.path}return"/"}const V1={prepare:j1,send:(e,t,n)=>{if(!Zd){n("abort",424);return}let o=W1(t.provider);switch(t.type){case"icons":{const a=t.prefix,c=t.icons.join(","),d=new URLSearchParams({icons:c});o+=a+".json?"+d.toString();break}case"custom":{const a=t.uri;o+=a.slice(0,1)==="/"?a.slice(1):a;break}default:n("abort",400);return}let s=503;Zd(e+o).then(a=>{const u=a.status;if(u!==200){setTimeout(()=>{n(U1(u)?"abort":"next",u)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?n("abort",a):n("next",s)});return}setTimeout(()=>{n("success",a)})}).catch(()=>{n("next",s)})}};function G1(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let o={provider:"",prefix:"",name:""};return e.forEach(s=>{if(o.name===s.name&&o.prefix===s.prefix&&o.provider===s.provider)return;o=s;const a=s.provider,u=s.prefix,c=s.name,d=n[a]||(n[a]=Object.create(null)),p=d[u]||(d[u]=ni(a,u));let y;c in p.icons?y=t.loaded:u===""||p.missing.has(c)?y=t.missing:y=t.pending;const g={provider:a,prefix:u,name:c};y.push(g)}),t}function Xd(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(s=>s.id!==t))})}function H1(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,s=e.prefix;t.forEach(a=>{const u=a.icons,c=u.pending.length;u.pending=u.pending.filter(d=>{if(d.prefix!==s)return!0;const p=d.name;if(e.icons[p])u.loaded.push({provider:o,prefix:s,name:p});else if(e.missing.has(p))u.missing.push({provider:o,prefix:s,name:p});else return n=!0,!0;return!1}),u.pending.length!==c&&(n||Xd([e],a.id),a.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),a.abort))})}))}let q1=0;function Y1(e,t,n){const o=q1++,s=Xd.bind(null,n,o);if(!t.pending.length)return s;const a={id:o,icons:t,callback:e,abort:s};return n.forEach(u=>{(u.loaderCallbacks||(u.loaderCallbacks=[])).push(a)}),s}function K1(e,t=!0,n=!1){const o=[];return e.forEach(s=>{const a=typeof s=="string"?es(s,t,n):s;a&&o.push(a)}),o}var J1={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function R1(e,t,n,o){const s=e.resources.length,a=e.random?Math.floor(Math.random()*s):e.index;let u;if(e.random){let L=e.resources.slice(0);for(u=[];L.length>1;){const J=Math.floor(Math.random()*L.length);u.push(L[J]),L=L.slice(0,J).concat(L.slice(J+1))}u=u.concat(L)}else u=e.resources.slice(a).concat(e.resources.slice(0,a));const c=Date.now();let d="pending",p=0,y,g=null,_=[],C=[];typeof o=="function"&&C.push(o);function E(){g&&(clearTimeout(g),g=null)}function T(){d==="pending"&&(d="aborted"),E(),_.forEach(L=>{L.status==="pending"&&(L.status="aborted")}),_=[]}function P(L,J){J&&(C=[]),typeof L=="function"&&C.push(L)}function N(){return{startTime:c,payload:t,status:d,queriesSent:p,queriesPending:_.length,subscribe:P,abort:T}}function X(){d="failed",C.forEach(L=>{L(void 0,y)})}function W(){_.forEach(L=>{L.status==="pending"&&(L.status="aborted")}),_=[]}function D(L,J,le){const ne=J!=="success";switch(_=_.filter(S=>S!==L),d){case"pending":break;case"failed":if(ne||!e.dataAfterTimeout)return;break;default:return}if(J==="abort"){y=le,X();return}if(ne){y=le,_.length||(u.length?k():X());return}if(E(),W(),!e.random){const S=e.resources.indexOf(L.resource);S!==-1&&S!==e.index&&(e.index=S)}d="completed",C.forEach(S=>{S(le)})}function k(){if(d!=="pending")return;E();const L=u.shift();if(L===void 0){if(_.length){g=setTimeout(()=>{E(),d==="pending"&&(W(),X())},e.timeout);return}X();return}const J={status:"pending",resource:L,callback:(le,ne)=>{D(J,le,ne)}};_.push(J),p++,g=setTimeout(k,e.rotate),n(L,t,J.callback)}return setTimeout(k),N}function Qd(e){const t={...J1,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function s(c,d,p){const y=R1(t,c,d,(g,_)=>{o(),p&&p(g,_)});return n.push(y),y}function a(c){return n.find(d=>c(d))||null}return{query:s,find:a,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function eh(){}const Dl=Object.create(null);function Z1(e){if(!Dl[e]){const t=kl(e);if(!t)return;const n=Qd(t),o={config:t,redundancy:n};Dl[e]=o}return Dl[e]}function X1(e,t,n){let o,s;if(typeof e=="string"){const a=$l(e);if(!a)return n(void 0,424),eh;s=a.send;const u=Z1(e);u&&(o=u.redundancy)}else{const a=Ml(e);if(a){o=Qd(a);const u=e.resources?e.resources[0]:"",c=$l(u);c&&(s=c.send)}}return!o||!s?(n(void 0,424),eh):o.query(t,s,n)().abort}function th(){}function Q1(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,H1(e)}))}function e_(e){const t=[],n=[];return e.forEach(o=>{(o.match(Vd)?t:n).push(o)}),{valid:t,invalid:n}}function Ri(e,t,n){function o(){const s=e.pendingIcons;t.forEach(a=>{s&&s.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!Hd(e,n).length){o();return}}catch(s){console.error(s)}o(),Q1(e)}function nh(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function t_(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,s=e.iconsToLoad;if(delete e.iconsToLoad,!s||!s.length)return;const a=e.loadIcon;if(e.loadIcons&&(s.length>1||!a)){nh(e.loadIcons(s,o,n),y=>{Ri(e,s,y)});return}if(a){s.forEach(y=>{const g=a(y,o,n);nh(g,_=>{const C=_?{prefix:o,icons:{[y]:_}}:null;Ri(e,[y],C)})});return}const{valid:u,invalid:c}=e_(s);if(c.length&&Ri(e,c,null),!u.length)return;const d=o.match(Vd)?$l(n):null;if(!d){Ri(e,u,null);return}d.prepare(n,o,u).forEach(y=>{X1(n,y,g=>{Ri(e,y.icons,g)})})}))}const n_=(e,t)=>{const n=K1(e,!0,qd()),o=G1(n);if(!o.pending.length){let d=!0;return t&&setTimeout(()=>{d&&t(o.loaded,o.missing,o.pending,th)}),()=>{d=!1}}const s=Object.create(null),a=[];let u,c;return o.pending.forEach(d=>{const{provider:p,prefix:y}=d;if(y===c&&p===u)return;u=p,c=y,a.push(ni(p,y));const g=s[p]||(s[p]=Object.create(null));g[y]||(g[y]=[])}),o.pending.forEach(d=>{const{provider:p,prefix:y,name:g}=d,_=ni(p,y),C=_.pendingIcons||(_.pendingIcons=new Set);C.has(g)||(C.add(g),s[p][y].push(g))}),a.forEach(d=>{const p=s[d.provider][d.prefix];p.length&&t_(d,p)}),t?Y1(t,o,a):th};function r_(e,t){const n={...e};for(const o in t){const s=t[o],a=typeof s;o in Kd?(s===null||s&&(a==="string"||a==="number"))&&(n[o]=s):a===typeof n[o]&&(n[o]=o==="rotate"?s%4:s)}return n}const i_=/[\s,]+/;function o_(e,t){t.split(i_).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function s_(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:o(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(e.slice(0,e.length-n.length));return isNaN(a)?0:(a=a/s,a%1===0?o(a):0)}}return t}function a_(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function l_(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function u_(e){return"data:image/svg+xml,"+l_(e)}function c_(e){return'url("'+u_(e)+'")'}let Zi;function f_(){try{Zi=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Zi=null}}function d_(e){return Zi===void 0&&f_(),Zi?Zi.createHTML(e):e}const rh={...Jd,inline:!1},h_={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},p_={display:"inline-block"},Nl={backgroundColor:"currentColor"},ih={backgroundColor:"transparent"},oh={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},sh={WebkitMask:Nl,mask:Nl,background:ih};for(const e in sh){const t=sh[e];for(const n in oh)t[e+n]=oh[n]}const g_={...rh,inline:!0};function ah(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const m_=(e,t,n)=>{const o=t.inline?g_:rh,s=r_(o,t),a=t.mode||"svg",u={},c=t.style||{},d={...a==="svg"?h_:{}};if(n){const P=es(n,!1,!0);if(P){const N=["iconify"],X=["provider","prefix"];for(const W of X)P[W]&&N.push("iconify--"+P[W]);d.className=N.join(" ")}}for(let P in t){const N=t[P];if(N!==void 0)switch(P){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=N;break;case"className":d[P]=(d[P]?d[P]+" ":"")+N;break;case"inline":case"hFlip":case"vFlip":s[P]=N===!0||N==="true"||N===1;break;case"flip":typeof N=="string"&&o_(s,N);break;case"color":u.color=N;break;case"rotate":typeof N=="string"?s[P]=s_(N):typeof N=="number"&&(s[P]=N);break;case"ariaHidden":case"aria-hidden":N!==!0&&N!=="true"&&delete d["aria-hidden"];break;default:o[P]===void 0&&(d[P]=N)}}const p=M1(e,s),y=p.attributes;if(s.inline&&(u.verticalAlign="-0.125em"),a==="svg"){d.style={...u,...c},Object.assign(d,y);let P=0,N=t.id;return typeof N=="string"&&(N=N.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:d_(N1(p.body,N?()=>N+"ID"+P++:"iconifyReact"))},x.createElement("svg",d)}const{body:g,width:_,height:C}=e,E=a==="mask"||(a==="bg"?!1:g.indexOf("currentColor")!==-1),T=a_(g,{...y,width:_+"",height:C+""});return d.style={...u,"--svg":c_(T),width:ah(y.width),height:ah(y.height),...p_,...E?Nl:ih,...c},x.createElement("span",d)};if(qd(!0),L1("",V1),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!E1(o))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const o="IconifyProviders["+n+"] is invalid.";try{const s=t[n];if(typeof s!="object"||!s||s.resources===void 0)continue;B1(n,s)||console.error(o)}catch{console.error(o)}}}}function lh(e){const[t,n]=x.useState(!!e.ssr),[o,s]=x.useState({});function a(C){if(C){const E=e.icon;if(typeof E=="object")return{name:"",data:E};const T=Yd(E);if(T)return{name:E,data:T}}return{name:""}}const[u,c]=x.useState(a(!!e.ssr));function d(){const C=o.callback;C&&(C(),s({}))}function p(C){if(JSON.stringify(u)!==JSON.stringify(C))return d(),c(C),!0}function y(){var C;const E=e.icon;if(typeof E=="object"){p({name:"",data:E});return}const T=Yd(E);if(p({name:E,data:T}))if(T===void 0){const P=n_([E],y);s({callback:P})}else T&&((C=e.onLoad)===null||C===void 0||C.call(e,E))}x.useEffect(()=>(n(!0),d),[]),x.useEffect(()=>{t&&y()},[e.icon,t]);const{name:g,data:_}=u;return _?m_({...Al,..._},e,g):e.children?e.children:e.fallback?e.fallback:x.createElement("span",{})}const Ll=x.forwardRef((e,t)=>lh({...e,_ref:t}));x.forwardRef((e,t)=>lh({inline:!0,...e,_ref:t}));function uh(e,{data:t,onChange:n}){return e?{checked:t||!1,onChange:o=>n(o.target.checked)}:{data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],value:Gi(t)?String(t):null,onChange:o=>n(Gi(o)?o===String(!0):void 0)}}function y_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wn=y_,v_=typeof Un=="object"&&Un&&Un.Object===Object&&Un,ch=v_,b_=ch,__=typeof self=="object"&&self&&self.Object===Object&&self,w_=b_||__||Function("return this")(),vn=w_,T_=vn,S_=function(){return T_.Date.now()},C_=S_,E_=/\s/;function x_(e){for(var t=e.length;t--&&E_.test(e.charAt(t)););return t}var A_=x_,O_=A_,I_=/^\s+/;function P_(e){return e&&e.slice(0,O_(e)+1).replace(I_,"")}var $_=P_,M_=vn,F_=M_.Symbol,rs=F_,fh=rs,dh=Object.prototype,k_=dh.hasOwnProperty,D_=dh.toString,Xi=fh?fh.toStringTag:void 0;function N_(e){var t=k_.call(e,Xi),n=e[Xi];try{e[Xi]=void 0;var o=!0}catch{}var s=D_.call(e);return o&&(t?e[Xi]=n:delete e[Xi]),s}var L_=N_,B_=Object.prototype,z_=B_.toString;function U_(e){return z_.call(e)}var j_=U_,hh=rs,W_=L_,V_=j_,G_="[object Null]",H_="[object Undefined]",ph=hh?hh.toStringTag:void 0;function q_(e){return e==null?e===void 0?H_:G_:ph&&ph in Object(e)?W_(e):V_(e)}var ri=q_;function Y_(e){return e!=null&&typeof e=="object"}var ii=Y_,K_=ri,J_=ii,R_="[object Symbol]";function Z_(e){return typeof e=="symbol"||J_(e)&&K_(e)==R_}var gh=Z_,X_=$_,mh=Wn,Q_=gh,yh=NaN,ew=/^[-+]0x[0-9a-f]+$/i,tw=/^0b[01]+$/i,nw=/^0o[0-7]+$/i,rw=parseInt;function iw(e){if(typeof e=="number")return e;if(Q_(e))return yh;if(mh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=mh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=X_(e);var n=tw.test(e);return n||nw.test(e)?rw(e.slice(2),n?2:8):ew.test(e)?yh:+e}var vh=iw,ow=Wn,Bl=C_,bh=vh,sw="Expected a function",aw=Math.max,lw=Math.min;function uw(e,t,n){var o,s,a,u,c,d,p=0,y=!1,g=!1,_=!0;if(typeof e!="function")throw new TypeError(sw);t=bh(t)||0,ow(n)&&(y=!!n.leading,g="maxWait"in n,a=g?aw(bh(n.maxWait)||0,t):a,_="trailing"in n?!!n.trailing:_);function C(L){var J=o,le=s;return o=s=void 0,p=L,u=e.apply(le,J),u}function E(L){return p=L,c=setTimeout(N,t),y?C(L):u}function T(L){var J=L-d,le=L-p,ne=t-J;return g?lw(ne,a-le):ne}function P(L){var J=L-d,le=L-p;return d===void 0||J>=t||J<0||g&&le>=a}function N(){var L=Bl();if(P(L))return X(L);c=setTimeout(N,T(L))}function X(L){return c=void 0,_&&o?C(L):(o=s=void 0,u)}function W(){c!==void 0&&clearTimeout(c),p=0,o=d=s=c=void 0}function D(){return c===void 0?u:X(Bl())}function k(){var L=Bl(),J=P(L);if(o=arguments,s=this,d=L,J){if(c===void 0)return E(d);if(g)return clearTimeout(c),c=setTimeout(N,t),C(d)}return c===void 0&&(c=setTimeout(N,t)),u}return k.cancel=W,k.flush=D,k}var cw=uw;const fw=nr(cw),dw=(e,t,n,o,s,a=300)=>{const[u,c]=x.useState(n??t);x.useEffect(()=>{c(n??t)},[n]);const d=x.useCallback(fw(g=>e(o,g),a),[e,o,a]),p=x.useCallback(g=>{const _=s(g);c(_??t),d(_)},[d,s]),y=x.useCallback(()=>{c(t),e(o,void 0)},[t,e,o]);return[u,p,y]};function sr(e,t){return e===t||Array.isArray(e)&&e.includes(t)}var hw=Object.prototype;function pw(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||hw;return e===n}var is=pw;function gw(e,t){return function(n){return e(t(n))}}var _h=gw,mw=_h,yw=mw(Object.keys,Object),vw=yw,bw=is,_w=vw,ww=Object.prototype,Tw=ww.hasOwnProperty;function Sw(e){if(!bw(e))return _w(e);var t=[];for(var n in Object(e))Tw.call(e,n)&&n!="constructor"&&t.push(n);return t}var Cw=Sw,Ew=ri,xw=Wn,Aw="[object AsyncFunction]",Ow="[object Function]",Iw="[object GeneratorFunction]",Pw="[object Proxy]";function $w(e){if(!xw(e))return!1;var t=Ew(e);return t==Ow||t==Iw||t==Aw||t==Pw}var zl=$w,Mw=vn,Fw=Mw["__core-js_shared__"],kw=Fw,Ul=kw,wh=function(){var e=/[^.]+$/.exec(Ul&&Ul.keys&&Ul.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Dw(e){return!!wh&&wh in e}var Nw=Dw,Lw=Function.prototype,Bw=Lw.toString;function zw(e){if(e!=null){try{return Bw.call(e)}catch{}try{return e+""}catch{}}return""}var Th=zw,Uw=zl,jw=Nw,Ww=Wn,Vw=Th,Gw=/[\\^$.*+?()[\]{}|]/g,Hw=/^\[object .+?Constructor\]$/,qw=Function.prototype,Yw=Object.prototype,Kw=qw.toString,Jw=Yw.hasOwnProperty,Rw=RegExp("^"+Kw.call(Jw).replace(Gw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zw(e){if(!Ww(e)||jw(e))return!1;var t=Uw(e)?Rw:Hw;return t.test(Vw(e))}var Xw=Zw;function Qw(e,t){return e==null?void 0:e[t]}var eT=Qw,tT=Xw,nT=eT;function rT(e,t){var n=nT(e,t);return tT(n)?n:void 0}var kr=rT,iT=kr,oT=vn,sT=iT(oT,"DataView"),aT=sT,lT=kr,uT=vn,cT=lT(uT,"Map"),jl=cT,fT=kr,dT=vn,hT=fT(dT,"Promise"),pT=hT,gT=kr,mT=vn,yT=gT(mT,"Set"),Sh=yT,vT=kr,bT=vn,_T=vT(bT,"WeakMap"),wT=_T,Wl=aT,Vl=jl,Gl=pT,Hl=Sh,ql=wT,Ch=ri,oi=Th,Eh="[object Map]",TT="[object Object]",xh="[object Promise]",Ah="[object Set]",Oh="[object WeakMap]",Ih="[object DataView]",ST=oi(Wl),CT=oi(Vl),ET=oi(Gl),xT=oi(Hl),AT=oi(ql),Dr=Ch;(Wl&&Dr(new Wl(new ArrayBuffer(1)))!=Ih||Vl&&Dr(new Vl)!=Eh||Gl&&Dr(Gl.resolve())!=xh||Hl&&Dr(new Hl)!=Ah||ql&&Dr(new ql)!=Oh)&&(Dr=function(e){var t=Ch(e),n=t==TT?e.constructor:void 0,o=n?oi(n):"";if(o)switch(o){case ST:return Ih;case CT:return Eh;case ET:return xh;case xT:return Ah;case AT:return Oh}return t});var OT=Dr,IT=ri,PT=ii,$T="[object Arguments]";function MT(e){return PT(e)&&IT(e)==$T}var FT=MT,Ph=FT,kT=ii,$h=Object.prototype,DT=$h.hasOwnProperty,NT=$h.propertyIsEnumerable,LT=Ph(function(){return arguments}())?Ph:function(e){return kT(e)&&DT.call(e,"callee")&&!NT.call(e,"callee")},os=LT,BT=Array.isArray,Qi=BT,zT=9007199254740991;function UT(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zT}var Mh=UT,jT=zl,WT=Mh;function VT(e){return e!=null&&WT(e.length)&&!jT(e)}var ss=VT,as={exports:{}};function GT(){return!1}var HT=GT;as.exports,function(e,t){var n=vn,o=HT,s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===s,c=u?n.Buffer:void 0,d=c?c.isBuffer:void 0,p=d||o;e.exports=p}(as,as.exports);var Yl=as.exports,qT=ri,YT=Mh,KT=ii,JT="[object Arguments]",RT="[object Array]",ZT="[object Boolean]",XT="[object Date]",QT="[object Error]",eS="[object Function]",tS="[object Map]",nS="[object Number]",rS="[object Object]",iS="[object RegExp]",oS="[object Set]",sS="[object String]",aS="[object WeakMap]",lS="[object ArrayBuffer]",uS="[object DataView]",cS="[object Float32Array]",fS="[object Float64Array]",dS="[object Int8Array]",hS="[object Int16Array]",pS="[object Int32Array]",gS="[object Uint8Array]",mS="[object Uint8ClampedArray]",yS="[object Uint16Array]",vS="[object Uint32Array]",Qe={};Qe[cS]=Qe[fS]=Qe[dS]=Qe[hS]=Qe[pS]=Qe[gS]=Qe[mS]=Qe[yS]=Qe[vS]=!0,Qe[JT]=Qe[RT]=Qe[lS]=Qe[ZT]=Qe[uS]=Qe[XT]=Qe[QT]=Qe[eS]=Qe[tS]=Qe[nS]=Qe[rS]=Qe[iS]=Qe[oS]=Qe[sS]=Qe[aS]=!1;function bS(e){return KT(e)&&YT(e.length)&&!!Qe[qT(e)]}var _S=bS;function wS(e){return function(t){return e(t)}}var TS=wS,ls={exports:{}};ls.exports,function(e,t){var n=ch,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a&&n.process,c=function(){try{var d=s&&s.require&&s.require("util").types;return d||u&&u.binding&&u.binding("util")}catch{}}();e.exports=c}(ls,ls.exports);var SS=ls.exports,CS=_S,ES=TS,Fh=SS,kh=Fh&&Fh.isTypedArray,xS=kh?ES(kh):CS,Kl=xS,AS=Cw,OS=OT,IS=os,PS=Qi,$S=ss,MS=Yl,FS=is,kS=Kl,DS="[object Map]",NS="[object Set]",LS=Object.prototype,BS=LS.hasOwnProperty;function zS(e){if(e==null)return!0;if($S(e)&&(PS(e)||typeof e=="string"||typeof e.splice=="function"||MS(e)||kS(e)||IS(e)))return!e.length;var t=OS(e);if(t==DS||t==NS)return!e.size;if(FS(e))return!AS(e).length;for(var n in e)if(BS.call(e,n))return!1;return!0}var US=zS;const Dh=nr(US),jS=(e,t,n,o,s,a,u)=>e.map((c,d)=>h.jsx(b.Grid.Col,{span:s==="row"?12/e.length:12,style:{alignContent:"start"},children:h.jsx(Fe.JsonFormsDispatch,{uischema:c,schema:t,path:n,enabled:o,renderers:a,cells:u})},`${n}-${d}`)),WS=({elements:e,schema:t,path:n,enabled:o,direction:s,renderers:a,cells:u})=>Dh(e)?null:h.jsx(b.Grid,{spacing:s==="row"?2:0,children:jS(e,t,n,o,s,a,u)}),us=x.memo(WS);function Jl(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString()}function Nh(e){const t=new Date(e);return new Date(t.getTime()+t.getTimezoneOffset()*6e4)}function In(e={}){const t=b.useProps("__",{},{});let n=null;return sr(e.schema.type,"null")||(sr(e.schema.type,"array")?n=[]:sr(e.schema.type,"object")?n={}:sr(e.schema.type,"string")&&(n="")),{inputWrapperOrder:["label","input","description","error"],label:e.label,description:e.description,required:e.required,disabled:!e.enabled,onChange:o=>e.handleChange(e.path,o??(t.setNull?n:void 0)),error:e.errors?e.errors.split(`
|
|
130
|
+
`).map(o=>h.jsx("span",{style:{display:"block"},children:o},o)):void 0}}function bn(e,t,n,o){const{specialKey:s}=Oe(),a=b.useProps((s==null?void 0:s.all)||"all",{},{}),u=b.useProps(e,{},{}),c=b.useProps(t,{},{}),{component:d,props:p}=x.useMemo(()=>xn(a,u,c),[u,a,c]);return[ct(d,{componentProps:n,jsonFormsProps:o}),{...n,...ct(p,{componentProps:n,jsonFormsProps:o})}]}function cs(e,t,{data:n,toggle:o,onChange:s}){const a=b.useMantineTheme(),u={valueFormat:e==="date"?"DD.MM.YYYY":t?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",value:n?e==="date"||t?Nh(n):new Date(n):null,clearable:!0,onChange:c=>{c&&(e==="date"?c=Jl(c).split("T")[0]:t?c=Jl(c):c=c.toISOString()),s(c||void 0)}};return e!=="date"&&(u.placeholder=t?"DD.MM.YYYY HH:mm (UTC)":"DD.MM.YYYY HH:mm",u.rightSection=h.jsxs(b.Group,{gap:"0.25rem",wrap:"nowrap",children:[h.jsx(b.CloseButton,{variant:"transparent",size:"sm",onClick:()=>s(void 0),style:{visibility:n?void 0:"hidden"}}),h.jsx(b.CloseButton,{title:t?"UTC":"Local",variant:"subtle",size:"sm",onClick:()=>{o(),n&&s(void 0)},icon:h.jsx(Ll,{icon:"tabler:timezone",color:t?a.primaryColor:"gray"})})]}),u.rightSectionWidth="3.75rem"),u}function Lh({data:e,onChange:t}){const[n,o]=x.useState(""),s=x.useMemo(()=>e?typeof e=="object"?JSON.stringify(e,null,2):e:"",[e]);return x.useEffect(()=>{o(s)},[s]),{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",formatOnBlur:!0,value:n,onBlur:()=>{if(!n){t(void 0);return}try{const a=JSON.parse(n);t(a)}catch{}},onChange:o}}function fs(e,t){return{data:x.useMemo(()=>t.oneOf?t.oneOf.map(o=>({value:o.const,label:o.title})):t.enum,[t.enum,t.oneOf]),value:e||null,searchable:!0}}function Bh(e,t,{onChange:n}){const o=fs(e,t);return{...o,value:o.value||[],onChange:s=>s.length?n(s):n(void 0)}}function zh(e,{data:t,onChange:n}){return{value:t||"",allowDecimal:e==="number",hideControls:!0,onChange:o=>n(typeof o=="string"?o||void 0:o??void 0)}}function Uh({data:e,onChange:t}){return{value:e||"",onChange:n=>t(n.target.value||void 0)}}function Rl(e){const t=In(e),{path:n,data:o,schema:s}=e,a=x.useMemo(()=>s.format==="checkbox",[s.format]),u=uh(a,{data:o,onChange:t.onChange}),c=x.useMemo(()=>({...t,...u}),[u,t]),[d,p]=bn("Boolean",n,c,e);return d===void 0?a?h.jsx(b.Checkbox,{...p}):h.jsx(b.Select,{...p}):d}function Zl(e){const t=In(e),{path:n,data:o}=e,s=cs("date",!0,{data:o,onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Date",n,a,e);return u===void 0?h.jsx(Wi.DateInput,{...c}):u}function Xl(e){const t=In(e),{path:n,data:o}=e,s=cs("date-time",!1,{data:o,toggle:()=>null,onChange:t.onChange}),[,{initialUTC:a}]=bn("DateTime",n,{...t,...s},e),[u,{toggle:c}]=Xe.useDisclosure(a),{initialUTC:d,...p}=cs("date-time",u,{data:o,toggle:c,onChange:t.onChange}),y=x.useMemo(()=>({...t,...p}),[t,p]),[g,_]=bn("DateTime",n,y,e);return g===void 0?h.jsx(Wi.DateTimePicker,{..._}):g}function jh(e){const t=In(e),{path:n,data:o}=e,s=Bh(o,e.schema.items,{onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("EnumArray",n,a,e);return u===void 0?h.jsx(b.MultiSelect,{...c}):u}function Ql(e){const t=In(e),{path:n,data:o}=e,s=fs(o,e.schema),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Enum",n,a,e);return u===void 0?h.jsx(b.Select,{...c}):u}function Wh(e){const t=In(e),{path:n,data:o}=e,s=Lh({data:o,onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Text",n,a,e);return u===void 0?h.jsx(b.JsonInput,{...c}):u}function eo(e){const t=In(e),{path:n,data:o}=e,s=zh("number",{data:o,onChange:t.onChange}),a=x.useMemo(()=>({...t,...s}),[t,s]),[u,c]=bn("Number",n,a,e);return u===void 0?h.jsx(b.NumberInput,{...c}):u}var ds={exports:{}};/**
|
|
131
131
|
* @license
|
|
132
132
|
* Lodash <https://lodash.com/>
|
|
133
133
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
134
134
|
* Released under MIT license <https://lodash.com/license>
|
|
135
135
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
136
136
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
137
|
-
*/hs.exports,function(e,t){(function(){var n,o="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",p=500,y="__lodash_placeholder__",g=1,_=2,C=4,E=1,w=2,P=1,N=2,R=4,W=8,B=16,D=32,k=64,H=128,ae=256,oe=512,S=30,U="...",ne=800,fe=16,ye=1,Me=2,we=3,Le=1/0,Ie=9007199254740991,lt=17976931348623157e292,q=NaN,Y=4294967295,X=Y-1,K=Y>>>1,Z=[["ary",H],["bind",P],["bindKey",N],["curry",W],["curryRight",B],["flip",oe],["partial",D],["partialRight",k],["rearg",ae]],ee="[object Arguments]",ie="[object Array]",ve="[object AsyncFunction]",be="[object Boolean]",pe="[object Date]",Ce="[object DOMException]",tt="[object Error]",te="[object Function]",yt="[object GeneratorFunction]",Je="[object Map]",Lt="[object Number]",dr="[object Null]",vt="[object Object]",ke="[object Promise]",qn="[object Proxy]",hr="[object RegExp]",Wt="[object Set]",Ur="[object String]",pr="[object Symbol]",jr="[object Undefined]",an="[object WeakMap]",gr="[object WeakSet]",mr="[object ArrayBuffer]",Yn="[object DataView]",Ei="[object Float32Array]",Wr="[object Float64Array]",xi="[object Int8Array]",yr="[object Int16Array]",vr="[object Int32Array]",Zt="[object Uint8Array]",Fn="[object Uint8ClampedArray]",Vr="[object Uint16Array]",Gr="[object Uint32Array]",ac=/\b__p \+= '';/g,Ai=/\b(__p \+=) '' \+/g,Oi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vs=/&(?:amp|lt|gt|quot|#39);/g,br=/[&<>"']/g,lc=RegExp(Vs.source),uc=RegExp(br.source),gt=/<%-([\s\S]+?)%>/g,_r=/<%([\s\S]+?)%>/g,Gs=/<%=([\s\S]+?)%>/g,Hs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,To=/^\w*$/,qs=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ii=/[\\^$.*+?()[\]{}|]/g,cc=RegExp(Ii.source),Vt=/^\s+/,Pi=/\s/,Ys=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ks=/\{\n\/\* \[wrapped with (.+)\] \*/,wo=/,? & /,Js=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wn=/[()=,{}\[\]\/\s]/,Zs=/\\(\\)?/g,Rs=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,So=/\w*$/,Xs=/^[-+]0x[0-9a-f]+$/i,fc=/^0b[01]+$/i,de=/^\[object .+?Constructor\]$/,$=/^0o[0-7]+$/i,Q=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,We=/($^)/,St=/['\n\r\u2028\u2029\\]/g,ut="\\ud800-\\udfff",Pt="\\u0300-\\u036f",ln="\\ufe20-\\ufe2f",Hr="\\u20d0-\\u20ff",Ct=Pt+ln+Hr,Co="\\u2700-\\u27bf",Eo="a-z\\xdf-\\xf6\\xf8-\\xff",ak="\\xac\\xb1\\xd7\\xf7",lk="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",uk="\\u2000-\\u206f",ck=" \\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",B0="A-Z\\xc0-\\xd6\\xd8-\\xde",z0="\\ufe0e\\ufe0f",U0=ak+lk+uk+ck,dc="['’]",fk="["+ut+"]",j0="["+U0+"]",Qs="["+Ct+"]",W0="\\d+",dk="["+Co+"]",V0="["+Eo+"]",G0="[^"+ut+U0+W0+Co+Eo+B0+"]",hc="\\ud83c[\\udffb-\\udfff]",hk="(?:"+Qs+"|"+hc+")",H0="[^"+ut+"]",pc="(?:\\ud83c[\\udde6-\\uddff]){2}",gc="[\\ud800-\\udbff][\\udc00-\\udfff]",$i="["+B0+"]",q0="\\u200d",Y0="(?:"+V0+"|"+G0+")",pk="(?:"+$i+"|"+G0+")",K0="(?:"+dc+"(?:d|ll|m|re|s|t|ve))?",J0="(?:"+dc+"(?:D|LL|M|RE|S|T|VE))?",Z0=hk+"?",R0="["+z0+"]?",gk="(?:"+q0+"(?:"+[H0,pc,gc].join("|")+")"+R0+Z0+")*",mk="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yk="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",X0=R0+Z0+gk,vk="(?:"+[dk,pc,gc].join("|")+")"+X0,bk="(?:"+[H0+Qs+"?",Qs,pc,gc,fk].join("|")+")",_k=RegExp(dc,"g"),Tk=RegExp(Qs,"g"),mc=RegExp(hc+"(?="+hc+")|"+bk+X0,"g"),wk=RegExp([$i+"?"+V0+"+"+K0+"(?="+[j0,$i,"$"].join("|")+")",pk+"+"+J0+"(?="+[j0,$i+Y0,"$"].join("|")+")",$i+"?"+Y0+"+"+K0,$i+"+"+J0,yk,mk,W0,vk].join("|"),"g"),Sk=RegExp("["+q0+ut+Ct+z0+"]"),Ck=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ek=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xk=-1,Qe={};Qe[Ei]=Qe[Wr]=Qe[xi]=Qe[yr]=Qe[vr]=Qe[Zt]=Qe[Fn]=Qe[Vr]=Qe[Gr]=!0,Qe[ee]=Qe[ie]=Qe[mr]=Qe[be]=Qe[Yn]=Qe[pe]=Qe[tt]=Qe[te]=Qe[Je]=Qe[Lt]=Qe[vt]=Qe[hr]=Qe[Wt]=Qe[Ur]=Qe[an]=!1;var Ze={};Ze[ee]=Ze[ie]=Ze[mr]=Ze[Yn]=Ze[be]=Ze[pe]=Ze[Ei]=Ze[Wr]=Ze[xi]=Ze[yr]=Ze[vr]=Ze[Je]=Ze[Lt]=Ze[vt]=Ze[hr]=Ze[Wt]=Ze[Ur]=Ze[pr]=Ze[Zt]=Ze[Fn]=Ze[Vr]=Ze[Gr]=!0,Ze[tt]=Ze[te]=Ze[an]=!1;var Ak={À:"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"},Ok={"&":"&","<":"<",">":">",'"':""","'":"'"},Ik={"&":"&","<":"<",">":">",""":'"',"'":"'"},Pk={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$k=parseFloat,Mk=parseInt,Q0=typeof Un=="object"&&Un&&Un.Object===Object&&Un,Fk=typeof self=="object"&&self&&self.Object===Object&&self,At=Q0||Fk||Function("return this")(),yc=t&&!t.nodeType&&t,qr=yc&&!0&&e&&!e.nodeType&&e,ey=qr&&qr.exports===yc,vc=ey&&Q0.process,un=function(){try{var M=qr&&qr.require&&qr.require("util").types;return M||vc&&vc.binding&&vc.binding("util")}catch{}}(),ty=un&&un.isArrayBuffer,ny=un&&un.isDate,ry=un&&un.isMap,iy=un&&un.isRegExp,oy=un&&un.isSet,sy=un&&un.isTypedArray;function Rt(M,j,L){switch(L.length){case 0:return M.call(j);case 1:return M.call(j,L[0]);case 2:return M.call(j,L[0],L[1]);case 3:return M.call(j,L[0],L[1],L[2])}return M.apply(j,L)}function Dk(M,j,L,se){for(var _e=-1,Be=M==null?0:M.length;++_e<Be;){var bt=M[_e];j(se,bt,L(bt),M)}return se}function cn(M,j){for(var L=-1,se=M==null?0:M.length;++L<se&&j(M[L],L,M)!==!1;);return M}function kk(M,j){for(var L=M==null?0:M.length;L--&&j(M[L],L,M)!==!1;);return M}function ay(M,j){for(var L=-1,se=M==null?0:M.length;++L<se;)if(!j(M[L],L,M))return!1;return!0}function Tr(M,j){for(var L=-1,se=M==null?0:M.length,_e=0,Be=[];++L<se;){var bt=M[L];j(bt,L,M)&&(Be[_e++]=bt)}return Be}function ea(M,j){var L=M==null?0:M.length;return!!L&&Mi(M,j,0)>-1}function bc(M,j,L){for(var se=-1,_e=M==null?0:M.length;++se<_e;)if(L(j,M[se]))return!0;return!1}function nt(M,j){for(var L=-1,se=M==null?0:M.length,_e=Array(se);++L<se;)_e[L]=j(M[L],L,M);return _e}function wr(M,j){for(var L=-1,se=j.length,_e=M.length;++L<se;)M[_e+L]=j[L];return M}function _c(M,j,L,se){var _e=-1,Be=M==null?0:M.length;for(se&&Be&&(L=M[++_e]);++_e<Be;)L=j(L,M[_e],_e,M);return L}function Nk(M,j,L,se){var _e=M==null?0:M.length;for(se&&_e&&(L=M[--_e]);_e--;)L=j(L,M[_e],_e,M);return L}function Tc(M,j){for(var L=-1,se=M==null?0:M.length;++L<se;)if(j(M[L],L,M))return!0;return!1}var Lk=wc("length");function Bk(M){return M.split("")}function zk(M){return M.match(Js)||[]}function ly(M,j,L){var se;return L(M,function(_e,Be,bt){if(j(_e,Be,bt))return se=Be,!1}),se}function ta(M,j,L,se){for(var _e=M.length,Be=L+(se?1:-1);se?Be--:++Be<_e;)if(j(M[Be],Be,M))return Be;return-1}function Mi(M,j,L){return j===j?Rk(M,j,L):ta(M,uy,L)}function Uk(M,j,L,se){for(var _e=L-1,Be=M.length;++_e<Be;)if(se(M[_e],j))return _e;return-1}function uy(M){return M!==M}function cy(M,j){var L=M==null?0:M.length;return L?Cc(M,j)/L:q}function wc(M){return function(j){return j==null?n:j[M]}}function Sc(M){return function(j){return M==null?n:M[j]}}function fy(M,j,L,se,_e){return _e(M,function(Be,bt,Ke){L=se?(se=!1,Be):j(L,Be,bt,Ke)}),L}function jk(M,j){var L=M.length;for(M.sort(j);L--;)M[L]=M[L].value;return M}function Cc(M,j){for(var L,se=-1,_e=M.length;++se<_e;){var Be=j(M[se]);Be!==n&&(L=L===n?Be:L+Be)}return L}function Ec(M,j){for(var L=-1,se=Array(M);++L<M;)se[L]=j(L);return se}function Wk(M,j){return nt(j,function(L){return[L,M[L]]})}function dy(M){return M&&M.slice(0,my(M)+1).replace(Vt,"")}function Xt(M){return function(j){return M(j)}}function xc(M,j){return nt(j,function(L){return M[L]})}function xo(M,j){return M.has(j)}function hy(M,j){for(var L=-1,se=M.length;++L<se&&Mi(j,M[L],0)>-1;);return L}function py(M,j){for(var L=M.length;L--&&Mi(j,M[L],0)>-1;);return L}function Vk(M,j){for(var L=M.length,se=0;L--;)M[L]===j&&++se;return se}var Gk=Sc(Ak),Hk=Sc(Ok);function qk(M){return"\\"+Pk[M]}function Yk(M,j){return M==null?n:M[j]}function Fi(M){return Sk.test(M)}function Kk(M){return Ck.test(M)}function Jk(M){for(var j,L=[];!(j=M.next()).done;)L.push(j.value);return L}function Ac(M){var j=-1,L=Array(M.size);return M.forEach(function(se,_e){L[++j]=[_e,se]}),L}function gy(M,j){return function(L){return M(j(L))}}function Sr(M,j){for(var L=-1,se=M.length,_e=0,Be=[];++L<se;){var bt=M[L];(bt===j||bt===y)&&(M[L]=y,Be[_e++]=L)}return Be}function na(M){var j=-1,L=Array(M.size);return M.forEach(function(se){L[++j]=se}),L}function Zk(M){var j=-1,L=Array(M.size);return M.forEach(function(se){L[++j]=[se,se]}),L}function Rk(M,j,L){for(var se=L-1,_e=M.length;++se<_e;)if(M[se]===j)return se;return-1}function Xk(M,j,L){for(var se=L+1;se--;)if(M[se]===j)return se;return se}function Di(M){return Fi(M)?eN(M):Lk(M)}function Sn(M){return Fi(M)?tN(M):Bk(M)}function my(M){for(var j=M.length;j--&&Pi.test(M.charAt(j)););return j}var Qk=Sc(Ik);function eN(M){for(var j=mc.lastIndex=0;mc.test(M);)++j;return j}function tN(M){return M.match(mc)||[]}function nN(M){return M.match(wk)||[]}var rN=function M(j){j=j==null?At:ki.defaults(At.Object(),j,ki.pick(At,Ek));var L=j.Array,se=j.Date,_e=j.Error,Be=j.Function,bt=j.Math,Ke=j.Object,Oc=j.RegExp,iN=j.String,fn=j.TypeError,ra=L.prototype,oN=Be.prototype,Ni=Ke.prototype,ia=j["__core-js_shared__"],oa=oN.toString,Ve=Ni.hasOwnProperty,sN=0,yy=function(){var r=/[^.]+$/.exec(ia&&ia.keys&&ia.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),sa=Ni.toString,aN=oa.call(Ke),lN=At._,uN=Oc("^"+oa.call(Ve).replace(Ii,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),aa=ey?j.Buffer:n,Cr=j.Symbol,la=j.Uint8Array,vy=aa?aa.allocUnsafe:n,ua=gy(Ke.getPrototypeOf,Ke),by=Ke.create,_y=Ni.propertyIsEnumerable,ca=ra.splice,Ty=Cr?Cr.isConcatSpreadable:n,Ao=Cr?Cr.iterator:n,Yr=Cr?Cr.toStringTag:n,fa=function(){try{var r=Xr(Ke,"defineProperty");return r({},"",{}),r}catch{}}(),cN=j.clearTimeout!==At.clearTimeout&&j.clearTimeout,fN=se&&se.now!==At.Date.now&&se.now,dN=j.setTimeout!==At.setTimeout&&j.setTimeout,da=bt.ceil,ha=bt.floor,Ic=Ke.getOwnPropertySymbols,hN=aa?aa.isBuffer:n,wy=j.isFinite,pN=ra.join,gN=gy(Ke.keys,Ke),_t=bt.max,$t=bt.min,mN=se.now,yN=j.parseInt,Sy=bt.random,vN=ra.reverse,Pc=Xr(j,"DataView"),Oo=Xr(j,"Map"),$c=Xr(j,"Promise"),Li=Xr(j,"Set"),Io=Xr(j,"WeakMap"),Po=Xr(Ke,"create"),pa=Io&&new Io,Bi={},bN=Qr(Pc),_N=Qr(Oo),TN=Qr($c),wN=Qr(Li),SN=Qr(Io),ga=Cr?Cr.prototype:n,$o=ga?ga.valueOf:n,Cy=ga?ga.toString:n;function b(r){if(ct(r)&&!Te(r)&&!(r instanceof $e)){if(r instanceof dn)return r;if(Ve.call(r,"__wrapped__"))return Ev(r)}return new dn(r)}var zi=function(){function r(){}return function(i){if(!it(i))return{};if(by)return by(i);r.prototype=i;var l=new r;return r.prototype=n,l}}();function ma(){}function dn(r,i){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=n}b.templateSettings={escape:gt,evaluate:_r,interpolate:Gs,variable:"",imports:{_:b}},b.prototype=ma.prototype,b.prototype.constructor=b,dn.prototype=zi(ma.prototype),dn.prototype.constructor=dn;function $e(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Y,this.__views__=[]}function CN(){var r=new $e(this.__wrapped__);return r.__actions__=Gt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Gt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Gt(this.__views__),r}function EN(){if(this.__filtered__){var r=new $e(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function xN(){var r=this.__wrapped__.value(),i=this.__dir__,l=Te(r),f=i<0,m=l?r.length:0,T=BL(0,m,this.__views__),A=T.start,I=T.end,F=I-A,V=f?I:A-1,G=this.__iteratees__,J=G.length,re=0,ce=$t(F,this.__takeCount__);if(!l||!f&&m==F&&ce==F)return Ky(r,this.__actions__);var ge=[];e:for(;F--&&re<ce;){V+=i;for(var Ee=-1,me=r[V];++Ee<J;){var Pe=G[Ee],Fe=Pe.iteratee,tn=Pe.type,Ut=Fe(me);if(tn==Me)me=Ut;else if(!Ut){if(tn==ye)continue e;break e}}ge[re++]=me}return ge}$e.prototype=zi(ma.prototype),$e.prototype.constructor=$e;function Kr(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function AN(){this.__data__=Po?Po(null):{},this.size=0}function ON(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}function IN(r){var i=this.__data__;if(Po){var l=i[r];return l===h?n:l}return Ve.call(i,r)?i[r]:n}function PN(r){var i=this.__data__;return Po?i[r]!==n:Ve.call(i,r)}function $N(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=Po&&i===n?h:i,this}Kr.prototype.clear=AN,Kr.prototype.delete=ON,Kr.prototype.get=IN,Kr.prototype.has=PN,Kr.prototype.set=$N;function Kn(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function MN(){this.__data__=[],this.size=0}function FN(r){var i=this.__data__,l=ya(i,r);if(l<0)return!1;var f=i.length-1;return l==f?i.pop():ca.call(i,l,1),--this.size,!0}function DN(r){var i=this.__data__,l=ya(i,r);return l<0?n:i[l][1]}function kN(r){return ya(this.__data__,r)>-1}function NN(r,i){var l=this.__data__,f=ya(l,r);return f<0?(++this.size,l.push([r,i])):l[f][1]=i,this}Kn.prototype.clear=MN,Kn.prototype.delete=FN,Kn.prototype.get=DN,Kn.prototype.has=kN,Kn.prototype.set=NN;function Jn(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function LN(){this.size=0,this.__data__={hash:new Kr,map:new(Oo||Kn),string:new Kr}}function BN(r){var i=Ia(this,r).delete(r);return this.size-=i?1:0,i}function zN(r){return Ia(this,r).get(r)}function UN(r){return Ia(this,r).has(r)}function jN(r,i){var l=Ia(this,r),f=l.size;return l.set(r,i),this.size+=l.size==f?0:1,this}Jn.prototype.clear=LN,Jn.prototype.delete=BN,Jn.prototype.get=zN,Jn.prototype.has=UN,Jn.prototype.set=jN;function Jr(r){var i=-1,l=r==null?0:r.length;for(this.__data__=new Jn;++i<l;)this.add(r[i])}function WN(r){return this.__data__.set(r,h),this}function VN(r){return this.__data__.has(r)}Jr.prototype.add=Jr.prototype.push=WN,Jr.prototype.has=VN;function Cn(r){var i=this.__data__=new Kn(r);this.size=i.size}function GN(){this.__data__=new Kn,this.size=0}function HN(r){var i=this.__data__,l=i.delete(r);return this.size=i.size,l}function qN(r){return this.__data__.get(r)}function YN(r){return this.__data__.has(r)}function KN(r,i){var l=this.__data__;if(l instanceof Kn){var f=l.__data__;if(!Oo||f.length<s-1)return f.push([r,i]),this.size=++l.size,this;l=this.__data__=new Jn(f)}return l.set(r,i),this.size=l.size,this}Cn.prototype.clear=GN,Cn.prototype.delete=HN,Cn.prototype.get=qN,Cn.prototype.has=YN,Cn.prototype.set=KN;function Ey(r,i){var l=Te(r),f=!l&&ei(r),m=!l&&!f&&Ir(r),T=!l&&!f&&!m&&Vi(r),A=l||f||m||T,I=A?Ec(r.length,iN):[],F=I.length;for(var V in r)(i||Ve.call(r,V))&&!(A&&(V=="length"||m&&(V=="offset"||V=="parent")||T&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Qn(V,F)))&&I.push(V);return I}function xy(r){var i=r.length;return i?r[Wc(0,i-1)]:n}function JN(r,i){return Pa(Gt(r),Zr(i,0,r.length))}function ZN(r){return Pa(Gt(r))}function Mc(r,i,l){(l!==n&&!En(r[i],l)||l===n&&!(i in r))&&Zn(r,i,l)}function Mo(r,i,l){var f=r[i];(!(Ve.call(r,i)&&En(f,l))||l===n&&!(i in r))&&Zn(r,i,l)}function ya(r,i){for(var l=r.length;l--;)if(En(r[l][0],i))return l;return-1}function RN(r,i,l,f){return Er(r,function(m,T,A){i(f,m,l(m),A)}),f}function Ay(r,i){return r&&kn(i,Et(i),r)}function XN(r,i){return r&&kn(i,qt(i),r)}function Zn(r,i,l){i=="__proto__"&&fa?fa(r,i,{configurable:!0,enumerable:!0,value:l,writable:!0}):r[i]=l}function Fc(r,i){for(var l=-1,f=i.length,m=L(f),T=r==null;++l<f;)m[l]=T?n:pf(r,i[l]);return m}function Zr(r,i,l){return r===r&&(l!==n&&(r=r<=l?r:l),i!==n&&(r=r>=i?r:i)),r}function hn(r,i,l,f,m,T){var A,I=i&g,F=i&_,V=i&C;if(l&&(A=m?l(r,f,m,T):l(r)),A!==n)return A;if(!it(r))return r;var G=Te(r);if(G){if(A=UL(r),!I)return Gt(r,A)}else{var J=Mt(r),re=J==te||J==yt;if(Ir(r))return Ry(r,I);if(J==vt||J==ee||re&&!m){if(A=F||re?{}:mv(r),!I)return F?IL(r,XN(A,r)):OL(r,Ay(A,r))}else{if(!Ze[J])return m?r:{};A=jL(r,J,I)}}T||(T=new Cn);var ce=T.get(r);if(ce)return ce;T.set(r,A),Hv(r)?r.forEach(function(me){A.add(hn(me,i,l,me,r,T))}):Vv(r)&&r.forEach(function(me,Pe){A.set(Pe,hn(me,i,l,Pe,r,T))});var ge=V?F?Qc:Xc:F?qt:Et,Ee=G?n:ge(r);return cn(Ee||r,function(me,Pe){Ee&&(Pe=me,me=r[Pe]),Mo(A,Pe,hn(me,i,l,Pe,r,T))}),A}function QN(r){var i=Et(r);return function(l){return Oy(l,r,i)}}function Oy(r,i,l){var f=l.length;if(r==null)return!f;for(r=Ke(r);f--;){var m=l[f],T=i[m],A=r[m];if(A===n&&!(m in r)||!T(A))return!1}return!0}function Iy(r,i,l){if(typeof r!="function")throw new fn(u);return zo(function(){r.apply(n,l)},i)}function Fo(r,i,l,f){var m=-1,T=ea,A=!0,I=r.length,F=[],V=i.length;if(!I)return F;l&&(i=nt(i,Xt(l))),f?(T=bc,A=!1):i.length>=s&&(T=xo,A=!1,i=new Jr(i));e:for(;++m<I;){var G=r[m],J=l==null?G:l(G);if(G=f||G!==0?G:0,A&&J===J){for(var re=V;re--;)if(i[re]===J)continue e;F.push(G)}else T(i,J,f)||F.push(G)}return F}var Er=nv(Dn),Py=nv(kc,!0);function eL(r,i){var l=!0;return Er(r,function(f,m,T){return l=!!i(f,m,T),l}),l}function va(r,i,l){for(var f=-1,m=r.length;++f<m;){var T=r[f],A=i(T);if(A!=null&&(I===n?A===A&&!en(A):l(A,I)))var I=A,F=T}return F}function tL(r,i,l,f){var m=r.length;for(l=Se(l),l<0&&(l=-l>m?0:m+l),f=f===n||f>m?m:Se(f),f<0&&(f+=m),f=l>f?0:Yv(f);l<f;)r[l++]=i;return r}function $y(r,i){var l=[];return Er(r,function(f,m,T){i(f,m,T)&&l.push(f)}),l}function Ot(r,i,l,f,m){var T=-1,A=r.length;for(l||(l=VL),m||(m=[]);++T<A;){var I=r[T];i>0&&l(I)?i>1?Ot(I,i-1,l,f,m):wr(m,I):f||(m[m.length]=I)}return m}var Dc=rv(),My=rv(!0);function Dn(r,i){return r&&Dc(r,i,Et)}function kc(r,i){return r&&My(r,i,Et)}function ba(r,i){return Tr(i,function(l){return er(r[l])})}function Rr(r,i){i=Ar(i,r);for(var l=0,f=i.length;r!=null&&l<f;)r=r[Nn(i[l++])];return l&&l==f?r:n}function Fy(r,i,l){var f=i(r);return Te(r)?f:wr(f,l(r))}function Bt(r){return r==null?r===n?jr:dr:Yr&&Yr in Ke(r)?LL(r):ZL(r)}function Nc(r,i){return r>i}function nL(r,i){return r!=null&&Ve.call(r,i)}function rL(r,i){return r!=null&&i in Ke(r)}function iL(r,i,l){return r>=$t(i,l)&&r<_t(i,l)}function Lc(r,i,l){for(var f=l?bc:ea,m=r[0].length,T=r.length,A=T,I=L(T),F=1/0,V=[];A--;){var G=r[A];A&&i&&(G=nt(G,Xt(i))),F=$t(G.length,F),I[A]=!l&&(i||m>=120&&G.length>=120)?new Jr(A&&G):n}G=r[0];var J=-1,re=I[0];e:for(;++J<m&&V.length<F;){var ce=G[J],ge=i?i(ce):ce;if(ce=l||ce!==0?ce:0,!(re?xo(re,ge):f(V,ge,l))){for(A=T;--A;){var Ee=I[A];if(!(Ee?xo(Ee,ge):f(r[A],ge,l)))continue e}re&&re.push(ge),V.push(ce)}}return V}function oL(r,i,l,f){return Dn(r,function(m,T,A){i(f,l(m),T,A)}),f}function Do(r,i,l){i=Ar(i,r),r=_v(r,i);var f=r==null?r:r[Nn(gn(i))];return f==null?n:Rt(f,r,l)}function Dy(r){return ct(r)&&Bt(r)==ee}function sL(r){return ct(r)&&Bt(r)==mr}function aL(r){return ct(r)&&Bt(r)==pe}function ko(r,i,l,f,m){return r===i?!0:r==null||i==null||!ct(r)&&!ct(i)?r!==r&&i!==i:lL(r,i,l,f,ko,m)}function lL(r,i,l,f,m,T){var A=Te(r),I=Te(i),F=A?ie:Mt(r),V=I?ie:Mt(i);F=F==ee?vt:F,V=V==ee?vt:V;var G=F==vt,J=V==vt,re=F==V;if(re&&Ir(r)){if(!Ir(i))return!1;A=!0,G=!1}if(re&&!G)return T||(T=new Cn),A||Vi(r)?hv(r,i,l,f,m,T):kL(r,i,F,l,f,m,T);if(!(l&E)){var ce=G&&Ve.call(r,"__wrapped__"),ge=J&&Ve.call(i,"__wrapped__");if(ce||ge){var Ee=ce?r.value():r,me=ge?i.value():i;return T||(T=new Cn),m(Ee,me,l,f,T)}}return re?(T||(T=new Cn),NL(r,i,l,f,m,T)):!1}function uL(r){return ct(r)&&Mt(r)==Je}function Bc(r,i,l,f){var m=l.length,T=m,A=!f;if(r==null)return!T;for(r=Ke(r);m--;){var I=l[m];if(A&&I[2]?I[1]!==r[I[0]]:!(I[0]in r))return!1}for(;++m<T;){I=l[m];var F=I[0],V=r[F],G=I[1];if(A&&I[2]){if(V===n&&!(F in r))return!1}else{var J=new Cn;if(f)var re=f(V,G,F,r,i,J);if(!(re===n?ko(G,V,E|w,f,J):re))return!1}}return!0}function ky(r){if(!it(r)||HL(r))return!1;var i=er(r)?uN:de;return i.test(Qr(r))}function cL(r){return ct(r)&&Bt(r)==hr}function fL(r){return ct(r)&&Mt(r)==Wt}function dL(r){return ct(r)&&Na(r.length)&&!!Qe[Bt(r)]}function Ny(r){return typeof r=="function"?r:r==null?Yt:typeof r=="object"?Te(r)?zy(r[0],r[1]):By(r):ib(r)}function zc(r){if(!Bo(r))return gN(r);var i=[];for(var l in Ke(r))Ve.call(r,l)&&l!="constructor"&&i.push(l);return i}function hL(r){if(!it(r))return JL(r);var i=Bo(r),l=[];for(var f in r)f=="constructor"&&(i||!Ve.call(r,f))||l.push(f);return l}function Uc(r,i){return r<i}function Ly(r,i){var l=-1,f=Ht(r)?L(r.length):[];return Er(r,function(m,T,A){f[++l]=i(m,T,A)}),f}function By(r){var i=tf(r);return i.length==1&&i[0][2]?vv(i[0][0],i[0][1]):function(l){return l===r||Bc(l,r,i)}}function zy(r,i){return rf(r)&&yv(i)?vv(Nn(r),i):function(l){var f=pf(l,r);return f===n&&f===i?gf(l,r):ko(i,f,E|w)}}function _a(r,i,l,f,m){r!==i&&Dc(i,function(T,A){if(m||(m=new Cn),it(T))pL(r,i,A,l,_a,f,m);else{var I=f?f(sf(r,A),T,A+"",r,i,m):n;I===n&&(I=T),Mc(r,A,I)}},qt)}function pL(r,i,l,f,m,T,A){var I=sf(r,l),F=sf(i,l),V=A.get(F);if(V){Mc(r,l,V);return}var G=T?T(I,F,l+"",r,i,A):n,J=G===n;if(J){var re=Te(F),ce=!re&&Ir(F),ge=!re&&!ce&&Vi(F);G=F,re||ce||ge?Te(I)?G=I:ht(I)?G=Gt(I):ce?(J=!1,G=Ry(F,!0)):ge?(J=!1,G=Xy(F,!0)):G=[]:Uo(F)||ei(F)?(G=I,ei(I)?G=Kv(I):(!it(I)||er(I))&&(G=mv(F))):J=!1}J&&(A.set(F,G),m(G,F,f,T,A),A.delete(F)),Mc(r,l,G)}function Uy(r,i){var l=r.length;if(l)return i+=i<0?l:0,Qn(i,l)?r[i]:n}function jy(r,i,l){i.length?i=nt(i,function(T){return Te(T)?function(A){return Rr(A,T.length===1?T[0]:T)}:T}):i=[Yt];var f=-1;i=nt(i,Xt(he()));var m=Ly(r,function(T,A,I){var F=nt(i,function(V){return V(T)});return{criteria:F,index:++f,value:T}});return jk(m,function(T,A){return AL(T,A,l)})}function gL(r,i){return Wy(r,i,function(l,f){return gf(r,f)})}function Wy(r,i,l){for(var f=-1,m=i.length,T={};++f<m;){var A=i[f],I=Rr(r,A);l(I,A)&&No(T,Ar(A,r),I)}return T}function mL(r){return function(i){return Rr(i,r)}}function jc(r,i,l,f){var m=f?Uk:Mi,T=-1,A=i.length,I=r;for(r===i&&(i=Gt(i)),l&&(I=nt(r,Xt(l)));++T<A;)for(var F=0,V=i[T],G=l?l(V):V;(F=m(I,G,F,f))>-1;)I!==r&&ca.call(I,F,1),ca.call(r,F,1);return r}function Vy(r,i){for(var l=r?i.length:0,f=l-1;l--;){var m=i[l];if(l==f||m!==T){var T=m;Qn(m)?ca.call(r,m,1):Hc(r,m)}}return r}function Wc(r,i){return r+ha(Sy()*(i-r+1))}function yL(r,i,l,f){for(var m=-1,T=_t(da((i-r)/(l||1)),0),A=L(T);T--;)A[f?T:++m]=r,r+=l;return A}function Vc(r,i){var l="";if(!r||i<1||i>Ie)return l;do i%2&&(l+=r),i=ha(i/2),i&&(r+=r);while(i);return l}function xe(r,i){return af(bv(r,i,Yt),r+"")}function vL(r){return xy(Gi(r))}function bL(r,i){var l=Gi(r);return Pa(l,Zr(i,0,l.length))}function No(r,i,l,f){if(!it(r))return r;i=Ar(i,r);for(var m=-1,T=i.length,A=T-1,I=r;I!=null&&++m<T;){var F=Nn(i[m]),V=l;if(F==="__proto__"||F==="constructor"||F==="prototype")return r;if(m!=A){var G=I[F];V=f?f(G,F,I):n,V===n&&(V=it(G)?G:Qn(i[m+1])?[]:{})}Mo(I,F,V),I=I[F]}return r}var Gy=pa?function(r,i){return pa.set(r,i),r}:Yt,_L=fa?function(r,i){return fa(r,"toString",{configurable:!0,enumerable:!1,value:yf(i),writable:!0})}:Yt;function TL(r){return Pa(Gi(r))}function pn(r,i,l){var f=-1,m=r.length;i<0&&(i=-i>m?0:m+i),l=l>m?m:l,l<0&&(l+=m),m=i>l?0:l-i>>>0,i>>>=0;for(var T=L(m);++f<m;)T[f]=r[f+i];return T}function wL(r,i){var l;return Er(r,function(f,m,T){return l=i(f,m,T),!l}),!!l}function Ta(r,i,l){var f=0,m=r==null?f:r.length;if(typeof i=="number"&&i===i&&m<=K){for(;f<m;){var T=f+m>>>1,A=r[T];A!==null&&!en(A)&&(l?A<=i:A<i)?f=T+1:m=T}return m}return Gc(r,i,Yt,l)}function Gc(r,i,l,f){var m=0,T=r==null?0:r.length;if(T===0)return 0;i=l(i);for(var A=i!==i,I=i===null,F=en(i),V=i===n;m<T;){var G=ha((m+T)/2),J=l(r[G]),re=J!==n,ce=J===null,ge=J===J,Ee=en(J);if(A)var me=f||ge;else V?me=ge&&(f||re):I?me=ge&&re&&(f||!ce):F?me=ge&&re&&!ce&&(f||!Ee):ce||Ee?me=!1:me=f?J<=i:J<i;me?m=G+1:T=G}return $t(T,X)}function Hy(r,i){for(var l=-1,f=r.length,m=0,T=[];++l<f;){var A=r[l],I=i?i(A):A;if(!l||!En(I,F)){var F=I;T[m++]=A===0?0:A}}return T}function qy(r){return typeof r=="number"?r:en(r)?q:+r}function Qt(r){if(typeof r=="string")return r;if(Te(r))return nt(r,Qt)+"";if(en(r))return Cy?Cy.call(r):"";var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function xr(r,i,l){var f=-1,m=ea,T=r.length,A=!0,I=[],F=I;if(l)A=!1,m=bc;else if(T>=s){var V=i?null:FL(r);if(V)return na(V);A=!1,m=xo,F=new Jr}else F=i?[]:I;e:for(;++f<T;){var G=r[f],J=i?i(G):G;if(G=l||G!==0?G:0,A&&J===J){for(var re=F.length;re--;)if(F[re]===J)continue e;i&&F.push(J),I.push(G)}else m(F,J,l)||(F!==I&&F.push(J),I.push(G))}return I}function Hc(r,i){return i=Ar(i,r),r=_v(r,i),r==null||delete r[Nn(gn(i))]}function Yy(r,i,l,f){return No(r,i,l(Rr(r,i)),f)}function wa(r,i,l,f){for(var m=r.length,T=f?m:-1;(f?T--:++T<m)&&i(r[T],T,r););return l?pn(r,f?0:T,f?T+1:m):pn(r,f?T+1:0,f?m:T)}function Ky(r,i){var l=r;return l instanceof $e&&(l=l.value()),_c(i,function(f,m){return m.func.apply(m.thisArg,wr([f],m.args))},l)}function qc(r,i,l){var f=r.length;if(f<2)return f?xr(r[0]):[];for(var m=-1,T=L(f);++m<f;)for(var A=r[m],I=-1;++I<f;)I!=m&&(T[m]=Fo(T[m]||A,r[I],i,l));return xr(Ot(T,1),i,l)}function Jy(r,i,l){for(var f=-1,m=r.length,T=i.length,A={};++f<m;){var I=f<T?i[f]:n;l(A,r[f],I)}return A}function Yc(r){return ht(r)?r:[]}function Kc(r){return typeof r=="function"?r:Yt}function Ar(r,i){return Te(r)?r:rf(r,i)?[r]:Cv(je(r))}var SL=xe;function Or(r,i,l){var f=r.length;return l=l===n?f:l,!i&&l>=f?r:pn(r,i,l)}var Zy=cN||function(r){return At.clearTimeout(r)};function Ry(r,i){if(i)return r.slice();var l=r.length,f=vy?vy(l):new r.constructor(l);return r.copy(f),f}function Jc(r){var i=new r.constructor(r.byteLength);return new la(i).set(new la(r)),i}function CL(r,i){var l=i?Jc(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.byteLength)}function EL(r){var i=new r.constructor(r.source,So.exec(r));return i.lastIndex=r.lastIndex,i}function xL(r){return $o?Ke($o.call(r)):{}}function Xy(r,i){var l=i?Jc(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.length)}function Qy(r,i){if(r!==i){var l=r!==n,f=r===null,m=r===r,T=en(r),A=i!==n,I=i===null,F=i===i,V=en(i);if(!I&&!V&&!T&&r>i||T&&A&&F&&!I&&!V||f&&A&&F||!l&&F||!m)return 1;if(!f&&!T&&!V&&r<i||V&&l&&m&&!f&&!T||I&&l&&m||!A&&m||!F)return-1}return 0}function AL(r,i,l){for(var f=-1,m=r.criteria,T=i.criteria,A=m.length,I=l.length;++f<A;){var F=Qy(m[f],T[f]);if(F){if(f>=I)return F;var V=l[f];return F*(V=="desc"?-1:1)}}return r.index-i.index}function ev(r,i,l,f){for(var m=-1,T=r.length,A=l.length,I=-1,F=i.length,V=_t(T-A,0),G=L(F+V),J=!f;++I<F;)G[I]=i[I];for(;++m<A;)(J||m<T)&&(G[l[m]]=r[m]);for(;V--;)G[I++]=r[m++];return G}function tv(r,i,l,f){for(var m=-1,T=r.length,A=-1,I=l.length,F=-1,V=i.length,G=_t(T-I,0),J=L(G+V),re=!f;++m<G;)J[m]=r[m];for(var ce=m;++F<V;)J[ce+F]=i[F];for(;++A<I;)(re||m<T)&&(J[ce+l[A]]=r[m++]);return J}function Gt(r,i){var l=-1,f=r.length;for(i||(i=L(f));++l<f;)i[l]=r[l];return i}function kn(r,i,l,f){var m=!l;l||(l={});for(var T=-1,A=i.length;++T<A;){var I=i[T],F=f?f(l[I],r[I],I,l,r):n;F===n&&(F=r[I]),m?Zn(l,I,F):Mo(l,I,F)}return l}function OL(r,i){return kn(r,nf(r),i)}function IL(r,i){return kn(r,pv(r),i)}function Sa(r,i){return function(l,f){var m=Te(l)?Dk:RN,T=i?i():{};return m(l,r,he(f,2),T)}}function Ui(r){return xe(function(i,l){var f=-1,m=l.length,T=m>1?l[m-1]:n,A=m>2?l[2]:n;for(T=r.length>3&&typeof T=="function"?(m--,T):n,A&&zt(l[0],l[1],A)&&(T=m<3?n:T,m=1),i=Ke(i);++f<m;){var I=l[f];I&&r(i,I,f,T)}return i})}function nv(r,i){return function(l,f){if(l==null)return l;if(!Ht(l))return r(l,f);for(var m=l.length,T=i?m:-1,A=Ke(l);(i?T--:++T<m)&&f(A[T],T,A)!==!1;);return l}}function rv(r){return function(i,l,f){for(var m=-1,T=Ke(i),A=f(i),I=A.length;I--;){var F=A[r?I:++m];if(l(T[F],F,T)===!1)break}return i}}function PL(r,i,l){var f=i&P,m=Lo(r);function T(){var A=this&&this!==At&&this instanceof T?m:r;return A.apply(f?l:this,arguments)}return T}function iv(r){return function(i){i=je(i);var l=Fi(i)?Sn(i):n,f=l?l[0]:i.charAt(0),m=l?Or(l,1).join(""):i.slice(1);return f[r]()+m}}function ji(r){return function(i){return _c(nb(tb(i).replace(_k,"")),r,"")}}function Lo(r){return function(){var i=arguments;switch(i.length){case 0:return new r;case 1:return new r(i[0]);case 2:return new r(i[0],i[1]);case 3:return new r(i[0],i[1],i[2]);case 4:return new r(i[0],i[1],i[2],i[3]);case 5:return new r(i[0],i[1],i[2],i[3],i[4]);case 6:return new r(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new r(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var l=zi(r.prototype),f=r.apply(l,i);return it(f)?f:l}}function $L(r,i,l){var f=Lo(r);function m(){for(var T=arguments.length,A=L(T),I=T,F=Wi(m);I--;)A[I]=arguments[I];var V=T<3&&A[0]!==F&&A[T-1]!==F?[]:Sr(A,F);if(T-=V.length,T<l)return uv(r,i,Ca,m.placeholder,n,A,V,n,n,l-T);var G=this&&this!==At&&this instanceof m?f:r;return Rt(G,this,A)}return m}function ov(r){return function(i,l,f){var m=Ke(i);if(!Ht(i)){var T=he(l,3);i=Et(i),l=function(I){return T(m[I],I,m)}}var A=r(i,l,f);return A>-1?m[T?i[A]:A]:n}}function sv(r){return Xn(function(i){var l=i.length,f=l,m=dn.prototype.thru;for(r&&i.reverse();f--;){var T=i[f];if(typeof T!="function")throw new fn(u);if(m&&!A&&Oa(T)=="wrapper")var A=new dn([],!0)}for(f=A?f:l;++f<l;){T=i[f];var I=Oa(T),F=I=="wrapper"?ef(T):n;F&&of(F[0])&&F[1]==(H|W|D|ae)&&!F[4].length&&F[9]==1?A=A[Oa(F[0])].apply(A,F[3]):A=T.length==1&&of(T)?A[I]():A.thru(T)}return function(){var V=arguments,G=V[0];if(A&&V.length==1&&Te(G))return A.plant(G).value();for(var J=0,re=l?i[J].apply(this,V):G;++J<l;)re=i[J].call(this,re);return re}})}function Ca(r,i,l,f,m,T,A,I,F,V){var G=i&H,J=i&P,re=i&N,ce=i&(W|B),ge=i&oe,Ee=re?n:Lo(r);function me(){for(var Pe=arguments.length,Fe=L(Pe),tn=Pe;tn--;)Fe[tn]=arguments[tn];if(ce)var Ut=Wi(me),nn=Vk(Fe,Ut);if(f&&(Fe=ev(Fe,f,m,ce)),T&&(Fe=tv(Fe,T,A,ce)),Pe-=nn,ce&&Pe<V){var pt=Sr(Fe,Ut);return uv(r,i,Ca,me.placeholder,l,Fe,pt,I,F,V-Pe)}var xn=J?l:this,nr=re?xn[r]:r;return Pe=Fe.length,I?Fe=RL(Fe,I):ge&&Pe>1&&Fe.reverse(),G&&F<Pe&&(Fe.length=F),this&&this!==At&&this instanceof me&&(nr=Ee||Lo(nr)),nr.apply(xn,Fe)}return me}function av(r,i){return function(l,f){return oL(l,r,i(f),{})}}function Ea(r,i){return function(l,f){var m;if(l===n&&f===n)return i;if(l!==n&&(m=l),f!==n){if(m===n)return f;typeof l=="string"||typeof f=="string"?(l=Qt(l),f=Qt(f)):(l=qy(l),f=qy(f)),m=r(l,f)}return m}}function Zc(r){return Xn(function(i){return i=nt(i,Xt(he())),xe(function(l){var f=this;return r(i,function(m){return Rt(m,f,l)})})})}function xa(r,i){i=i===n?" ":Qt(i);var l=i.length;if(l<2)return l?Vc(i,r):i;var f=Vc(i,da(r/Di(i)));return Fi(i)?Or(Sn(f),0,r).join(""):f.slice(0,r)}function ML(r,i,l,f){var m=i&P,T=Lo(r);function A(){for(var I=-1,F=arguments.length,V=-1,G=f.length,J=L(G+F),re=this&&this!==At&&this instanceof A?T:r;++V<G;)J[V]=f[V];for(;F--;)J[V++]=arguments[++I];return Rt(re,m?l:this,J)}return A}function lv(r){return function(i,l,f){return f&&typeof f!="number"&&zt(i,l,f)&&(l=f=n),i=tr(i),l===n?(l=i,i=0):l=tr(l),f=f===n?i<l?1:-1:tr(f),yL(i,l,f,r)}}function Aa(r){return function(i,l){return typeof i=="string"&&typeof l=="string"||(i=mn(i),l=mn(l)),r(i,l)}}function uv(r,i,l,f,m,T,A,I,F,V){var G=i&W,J=G?A:n,re=G?n:A,ce=G?T:n,ge=G?n:T;i|=G?D:k,i&=~(G?k:D),i&R||(i&=-4);var Ee=[r,i,m,ce,J,ge,re,I,F,V],me=l.apply(n,Ee);return of(r)&&Tv(me,Ee),me.placeholder=f,wv(me,r,i)}function Rc(r){var i=bt[r];return function(l,f){if(l=mn(l),f=f==null?0:$t(Se(f),292),f&&wy(l)){var m=(je(l)+"e").split("e"),T=i(m[0]+"e"+(+m[1]+f));return m=(je(T)+"e").split("e"),+(m[0]+"e"+(+m[1]-f))}return i(l)}}var FL=Li&&1/na(new Li([,-0]))[1]==Le?function(r){return new Li(r)}:_f;function cv(r){return function(i){var l=Mt(i);return l==Je?Ac(i):l==Wt?Zk(i):Wk(i,r(i))}}function Rn(r,i,l,f,m,T,A,I){var F=i&N;if(!F&&typeof r!="function")throw new fn(u);var V=f?f.length:0;if(V||(i&=-97,f=m=n),A=A===n?A:_t(Se(A),0),I=I===n?I:Se(I),V-=m?m.length:0,i&k){var G=f,J=m;f=m=n}var re=F?n:ef(r),ce=[r,i,l,f,m,G,J,T,A,I];if(re&&KL(ce,re),r=ce[0],i=ce[1],l=ce[2],f=ce[3],m=ce[4],I=ce[9]=ce[9]===n?F?0:r.length:_t(ce[9]-V,0),!I&&i&(W|B)&&(i&=-25),!i||i==P)var ge=PL(r,i,l);else i==W||i==B?ge=$L(r,i,I):(i==D||i==(P|D))&&!m.length?ge=ML(r,i,l,f):ge=Ca.apply(n,ce);var Ee=re?Gy:Tv;return wv(Ee(ge,ce),r,i)}function fv(r,i,l,f){return r===n||En(r,Ni[l])&&!Ve.call(f,l)?i:r}function dv(r,i,l,f,m,T){return it(r)&&it(i)&&(T.set(i,r),_a(r,i,n,dv,T),T.delete(i)),r}function DL(r){return Uo(r)?n:r}function hv(r,i,l,f,m,T){var A=l&E,I=r.length,F=i.length;if(I!=F&&!(A&&F>I))return!1;var V=T.get(r),G=T.get(i);if(V&&G)return V==i&&G==r;var J=-1,re=!0,ce=l&w?new Jr:n;for(T.set(r,i),T.set(i,r);++J<I;){var ge=r[J],Ee=i[J];if(f)var me=A?f(Ee,ge,J,i,r,T):f(ge,Ee,J,r,i,T);if(me!==n){if(me)continue;re=!1;break}if(ce){if(!Tc(i,function(Pe,Fe){if(!xo(ce,Fe)&&(ge===Pe||m(ge,Pe,l,f,T)))return ce.push(Fe)})){re=!1;break}}else if(!(ge===Ee||m(ge,Ee,l,f,T))){re=!1;break}}return T.delete(r),T.delete(i),re}function kL(r,i,l,f,m,T,A){switch(l){case Yn:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)return!1;r=r.buffer,i=i.buffer;case mr:return!(r.byteLength!=i.byteLength||!T(new la(r),new la(i)));case be:case pe:case Lt:return En(+r,+i);case tt:return r.name==i.name&&r.message==i.message;case hr:case Ur:return r==i+"";case Je:var I=Ac;case Wt:var F=f&E;if(I||(I=na),r.size!=i.size&&!F)return!1;var V=A.get(r);if(V)return V==i;f|=w,A.set(r,i);var G=hv(I(r),I(i),f,m,T,A);return A.delete(r),G;case pr:if($o)return $o.call(r)==$o.call(i)}return!1}function NL(r,i,l,f,m,T){var A=l&E,I=Xc(r),F=I.length,V=Xc(i),G=V.length;if(F!=G&&!A)return!1;for(var J=F;J--;){var re=I[J];if(!(A?re in i:Ve.call(i,re)))return!1}var ce=T.get(r),ge=T.get(i);if(ce&&ge)return ce==i&&ge==r;var Ee=!0;T.set(r,i),T.set(i,r);for(var me=A;++J<F;){re=I[J];var Pe=r[re],Fe=i[re];if(f)var tn=A?f(Fe,Pe,re,i,r,T):f(Pe,Fe,re,r,i,T);if(!(tn===n?Pe===Fe||m(Pe,Fe,l,f,T):tn)){Ee=!1;break}me||(me=re=="constructor")}if(Ee&&!me){var Ut=r.constructor,nn=i.constructor;Ut!=nn&&"constructor"in r&&"constructor"in i&&!(typeof Ut=="function"&&Ut instanceof Ut&&typeof nn=="function"&&nn instanceof nn)&&(Ee=!1)}return T.delete(r),T.delete(i),Ee}function Xn(r){return af(bv(r,n,Ov),r+"")}function Xc(r){return Fy(r,Et,nf)}function Qc(r){return Fy(r,qt,pv)}var ef=pa?function(r){return pa.get(r)}:_f;function Oa(r){for(var i=r.name+"",l=Bi[i],f=Ve.call(Bi,i)?l.length:0;f--;){var m=l[f],T=m.func;if(T==null||T==r)return m.name}return i}function Wi(r){var i=Ve.call(b,"placeholder")?b:r;return i.placeholder}function he(){var r=b.iteratee||vf;return r=r===vf?Ny:r,arguments.length?r(arguments[0],arguments[1]):r}function Ia(r,i){var l=r.__data__;return GL(i)?l[typeof i=="string"?"string":"hash"]:l.map}function tf(r){for(var i=Et(r),l=i.length;l--;){var f=i[l],m=r[f];i[l]=[f,m,yv(m)]}return i}function Xr(r,i){var l=Yk(r,i);return ky(l)?l:n}function LL(r){var i=Ve.call(r,Yr),l=r[Yr];try{r[Yr]=n;var f=!0}catch{}var m=sa.call(r);return f&&(i?r[Yr]=l:delete r[Yr]),m}var nf=Ic?function(r){return r==null?[]:(r=Ke(r),Tr(Ic(r),function(i){return _y.call(r,i)}))}:Tf,pv=Ic?function(r){for(var i=[];r;)wr(i,nf(r)),r=ua(r);return i}:Tf,Mt=Bt;(Pc&&Mt(new Pc(new ArrayBuffer(1)))!=Yn||Oo&&Mt(new Oo)!=Je||$c&&Mt($c.resolve())!=ke||Li&&Mt(new Li)!=Wt||Io&&Mt(new Io)!=an)&&(Mt=function(r){var i=Bt(r),l=i==vt?r.constructor:n,f=l?Qr(l):"";if(f)switch(f){case bN:return Yn;case _N:return Je;case TN:return ke;case wN:return Wt;case SN:return an}return i});function BL(r,i,l){for(var f=-1,m=l.length;++f<m;){var T=l[f],A=T.size;switch(T.type){case"drop":r+=A;break;case"dropRight":i-=A;break;case"take":i=$t(i,r+A);break;case"takeRight":r=_t(r,i-A);break}}return{start:r,end:i}}function zL(r){var i=r.match(Ks);return i?i[1].split(wo):[]}function gv(r,i,l){i=Ar(i,r);for(var f=-1,m=i.length,T=!1;++f<m;){var A=Nn(i[f]);if(!(T=r!=null&&l(r,A)))break;r=r[A]}return T||++f!=m?T:(m=r==null?0:r.length,!!m&&Na(m)&&Qn(A,m)&&(Te(r)||ei(r)))}function UL(r){var i=r.length,l=new r.constructor(i);return i&&typeof r[0]=="string"&&Ve.call(r,"index")&&(l.index=r.index,l.input=r.input),l}function mv(r){return typeof r.constructor=="function"&&!Bo(r)?zi(ua(r)):{}}function jL(r,i,l){var f=r.constructor;switch(i){case mr:return Jc(r);case be:case pe:return new f(+r);case Yn:return CL(r,l);case Ei:case Wr:case xi:case yr:case vr:case Zt:case Fn:case Vr:case Gr:return Xy(r,l);case Je:return new f;case Lt:case Ur:return new f(r);case hr:return EL(r);case Wt:return new f;case pr:return xL(r)}}function WL(r,i){var l=i.length;if(!l)return r;var f=l-1;return i[f]=(l>1?"& ":"")+i[f],i=i.join(l>2?", ":" "),r.replace(Ys,`{
|
|
137
|
+
*/ds.exports,function(e,t){(function(){var n,o="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",p=500,y="__lodash_placeholder__",g=1,_=2,C=4,E=1,T=2,P=1,N=2,X=4,W=8,D=16,k=32,L=64,J=128,le=256,ne=512,S=30,j="...",re=800,ce=16,he=1,Le=2,_e=3,ke=1/0,De=9007199254740991,mt=17976931348623157e292,K=NaN,Y=4294967295,ge=Y-1,Q=Y>>>1,q=[["ary",J],["bind",P],["bindKey",N],["curry",W],["curryRight",D],["flip",ne],["partial",k],["partialRight",L],["rearg",le]],H="[object Arguments]",ee="[object Array]",fe="[object AsyncFunction]",be="[object Boolean]",me="[object Date]",xe="[object DOMException]",qe="[object Error]",te="[object Function]",yt="[object GeneratorFunction]",Je="[object Map]",Nt="[object Number]",fr="[object Null]",Te="[object Object]",Fn="[object Promise]",wi="[object Proxy]",dr="[object RegExp]",jt="[object Set]",Br="[object String]",hr="[object Symbol]",zr="[object Undefined]",sn="[object WeakMap]",pr="[object WeakSet]",gr="[object ArrayBuffer]",qn="[object DataView]",Ti="[object Float32Array]",Ur="[object Float64Array]",Si="[object Int8Array]",mr="[object Int16Array]",yr="[object Int32Array]",Jt="[object Uint8Array]",kn="[object Uint8ClampedArray]",jr="[object Uint16Array]",Wr="[object Uint32Array]",hc=/\b__p \+= '';/g,Ci=/\b(__p \+=) '' \+/g,Ei=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hs=/&(?:amp|lt|gt|quot|#39);/g,vr=/[&<>"']/g,pc=RegExp(Hs.source),gc=RegExp(vr.source),pt=/<%-([\s\S]+?)%>/g,br=/<%([\s\S]+?)%>/g,qs=/<%=([\s\S]+?)%>/g,Ys=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vo=/^\w*$/,Ks=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xi=/[\\^$.*+?()[\]{}|]/g,mc=RegExp(xi.source),Wt=/^\s+/,Ai=/\s/,Js=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Rs=/\{\n\/\* \[wrapped with (.+)\] \*/,bo=/,? & /,Zs=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wn=/[()=,{}\[\]\/\s]/,Xs=/\\(\\)?/g,Qs=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_o=/\w*$/,ea=/^[-+]0x[0-9a-f]+$/i,yc=/^0b[01]+$/i,de=/^\[object .+?Constructor\]$/,$=/^0o[0-7]+$/i,Z=/^(?:0|[1-9]\d*)$/,se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,We=/($^)/,Tt=/['\n\r\u2028\u2029\\]/g,lt="\\ud800-\\udfff",It="\\u0300-\\u036f",an="\\ufe20-\\ufe2f",Vr="\\u20d0-\\u20ff",St=It+an+Vr,wo="\\u2700-\\u27bf",To="a-z\\xdf-\\xf6\\xf8-\\xff",dD="\\xac\\xb1\\xd7\\xf7",hD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pD="\\u2000-\\u206f",gD=" \\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",B0="A-Z\\xc0-\\xd6\\xd8-\\xde",z0="\\ufe0e\\ufe0f",U0=dD+hD+pD+gD,vc="['’]",mD="["+lt+"]",j0="["+U0+"]",ta="["+St+"]",W0="\\d+",yD="["+wo+"]",V0="["+To+"]",G0="[^"+lt+U0+W0+wo+To+B0+"]",bc="\\ud83c[\\udffb-\\udfff]",vD="(?:"+ta+"|"+bc+")",H0="[^"+lt+"]",_c="(?:\\ud83c[\\udde6-\\uddff]){2}",wc="[\\ud800-\\udbff][\\udc00-\\udfff]",Oi="["+B0+"]",q0="\\u200d",Y0="(?:"+V0+"|"+G0+")",bD="(?:"+Oi+"|"+G0+")",K0="(?:"+vc+"(?:d|ll|m|re|s|t|ve))?",J0="(?:"+vc+"(?:D|LL|M|RE|S|T|VE))?",R0=vD+"?",Z0="["+z0+"]?",_D="(?:"+q0+"(?:"+[H0,_c,wc].join("|")+")"+Z0+R0+")*",wD="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",TD="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",X0=Z0+R0+_D,SD="(?:"+[yD,_c,wc].join("|")+")"+X0,CD="(?:"+[H0+ta+"?",ta,_c,wc,mD].join("|")+")",ED=RegExp(vc,"g"),xD=RegExp(ta,"g"),Tc=RegExp(bc+"(?="+bc+")|"+CD+X0,"g"),AD=RegExp([Oi+"?"+V0+"+"+K0+"(?="+[j0,Oi,"$"].join("|")+")",bD+"+"+J0+"(?="+[j0,Oi+Y0,"$"].join("|")+")",Oi+"?"+Y0+"+"+K0,Oi+"+"+J0,TD,wD,W0,SD].join("|"),"g"),OD=RegExp("["+q0+lt+St+z0+"]"),ID=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,PD=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$D=-1,et={};et[Ti]=et[Ur]=et[Si]=et[mr]=et[yr]=et[Jt]=et[kn]=et[jr]=et[Wr]=!0,et[H]=et[ee]=et[gr]=et[be]=et[qn]=et[me]=et[qe]=et[te]=et[Je]=et[Nt]=et[Te]=et[dr]=et[jt]=et[Br]=et[sn]=!1;var Ze={};Ze[H]=Ze[ee]=Ze[gr]=Ze[qn]=Ze[be]=Ze[me]=Ze[Ti]=Ze[Ur]=Ze[Si]=Ze[mr]=Ze[yr]=Ze[Je]=Ze[Nt]=Ze[Te]=Ze[dr]=Ze[jt]=Ze[Br]=Ze[hr]=Ze[Jt]=Ze[kn]=Ze[jr]=Ze[Wr]=!0,Ze[qe]=Ze[te]=Ze[sn]=!1;var MD={À:"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"},FD={"&":"&","<":"<",">":">",'"':""","'":"'"},kD={"&":"&","<":"<",">":">",""":'"',"'":"'"},DD={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ND=parseFloat,LD=parseInt,Q0=typeof Un=="object"&&Un&&Un.Object===Object&&Un,BD=typeof self=="object"&&self&&self.Object===Object&&self,xt=Q0||BD||Function("return this")(),Sc=t&&!t.nodeType&&t,Gr=Sc&&!0&&e&&!e.nodeType&&e,ey=Gr&&Gr.exports===Sc,Cc=ey&&Q0.process,ln=function(){try{var M=Gr&&Gr.require&&Gr.require("util").types;return M||Cc&&Cc.binding&&Cc.binding("util")}catch{}}(),ty=ln&&ln.isArrayBuffer,ny=ln&&ln.isDate,ry=ln&&ln.isMap,iy=ln&&ln.isRegExp,oy=ln&&ln.isSet,sy=ln&&ln.isTypedArray;function Rt(M,U,B){switch(B.length){case 0:return M.call(U);case 1:return M.call(U,B[0]);case 2:return M.call(U,B[0],B[1]);case 3:return M.call(U,B[0],B[1],B[2])}return M.apply(U,B)}function zD(M,U,B,oe){for(var we=-1,Be=M==null?0:M.length;++we<Be;){var vt=M[we];U(oe,vt,B(vt),M)}return oe}function un(M,U){for(var B=-1,oe=M==null?0:M.length;++B<oe&&U(M[B],B,M)!==!1;);return M}function UD(M,U){for(var B=M==null?0:M.length;B--&&U(M[B],B,M)!==!1;);return M}function ay(M,U){for(var B=-1,oe=M==null?0:M.length;++B<oe;)if(!U(M[B],B,M))return!1;return!0}function _r(M,U){for(var B=-1,oe=M==null?0:M.length,we=0,Be=[];++B<oe;){var vt=M[B];U(vt,B,M)&&(Be[we++]=vt)}return Be}function na(M,U){var B=M==null?0:M.length;return!!B&&Ii(M,U,0)>-1}function Ec(M,U,B){for(var oe=-1,we=M==null?0:M.length;++oe<we;)if(B(U,M[oe]))return!0;return!1}function nt(M,U){for(var B=-1,oe=M==null?0:M.length,we=Array(oe);++B<oe;)we[B]=U(M[B],B,M);return we}function wr(M,U){for(var B=-1,oe=U.length,we=M.length;++B<oe;)M[we+B]=U[B];return M}function xc(M,U,B,oe){var we=-1,Be=M==null?0:M.length;for(oe&&Be&&(B=M[++we]);++we<Be;)B=U(B,M[we],we,M);return B}function jD(M,U,B,oe){var we=M==null?0:M.length;for(oe&&we&&(B=M[--we]);we--;)B=U(B,M[we],we,M);return B}function Ac(M,U){for(var B=-1,oe=M==null?0:M.length;++B<oe;)if(U(M[B],B,M))return!0;return!1}var WD=Oc("length");function VD(M){return M.split("")}function GD(M){return M.match(Zs)||[]}function ly(M,U,B){var oe;return B(M,function(we,Be,vt){if(U(we,Be,vt))return oe=Be,!1}),oe}function ra(M,U,B,oe){for(var we=M.length,Be=B+(oe?1:-1);oe?Be--:++Be<we;)if(U(M[Be],Be,M))return Be;return-1}function Ii(M,U,B){return U===U?nN(M,U,B):ra(M,uy,B)}function HD(M,U,B,oe){for(var we=B-1,Be=M.length;++we<Be;)if(oe(M[we],U))return we;return-1}function uy(M){return M!==M}function cy(M,U){var B=M==null?0:M.length;return B?Pc(M,U)/B:K}function Oc(M){return function(U){return U==null?n:U[M]}}function Ic(M){return function(U){return M==null?n:M[U]}}function fy(M,U,B,oe,we){return we(M,function(Be,vt,Re){B=oe?(oe=!1,Be):U(B,Be,vt,Re)}),B}function qD(M,U){var B=M.length;for(M.sort(U);B--;)M[B]=M[B].value;return M}function Pc(M,U){for(var B,oe=-1,we=M.length;++oe<we;){var Be=U(M[oe]);Be!==n&&(B=B===n?Be:B+Be)}return B}function $c(M,U){for(var B=-1,oe=Array(M);++B<M;)oe[B]=U(B);return oe}function YD(M,U){return nt(U,function(B){return[B,M[B]]})}function dy(M){return M&&M.slice(0,my(M)+1).replace(Wt,"")}function Zt(M){return function(U){return M(U)}}function Mc(M,U){return nt(U,function(B){return M[B]})}function So(M,U){return M.has(U)}function hy(M,U){for(var B=-1,oe=M.length;++B<oe&&Ii(U,M[B],0)>-1;);return B}function py(M,U){for(var B=M.length;B--&&Ii(U,M[B],0)>-1;);return B}function KD(M,U){for(var B=M.length,oe=0;B--;)M[B]===U&&++oe;return oe}var JD=Ic(MD),RD=Ic(FD);function ZD(M){return"\\"+DD[M]}function XD(M,U){return M==null?n:M[U]}function Pi(M){return OD.test(M)}function QD(M){return ID.test(M)}function eN(M){for(var U,B=[];!(U=M.next()).done;)B.push(U.value);return B}function Fc(M){var U=-1,B=Array(M.size);return M.forEach(function(oe,we){B[++U]=[we,oe]}),B}function gy(M,U){return function(B){return M(U(B))}}function Tr(M,U){for(var B=-1,oe=M.length,we=0,Be=[];++B<oe;){var vt=M[B];(vt===U||vt===y)&&(M[B]=y,Be[we++]=B)}return Be}function ia(M){var U=-1,B=Array(M.size);return M.forEach(function(oe){B[++U]=oe}),B}function tN(M){var U=-1,B=Array(M.size);return M.forEach(function(oe){B[++U]=[oe,oe]}),B}function nN(M,U,B){for(var oe=B-1,we=M.length;++oe<we;)if(M[oe]===U)return oe;return-1}function rN(M,U,B){for(var oe=B+1;oe--;)if(M[oe]===U)return oe;return oe}function $i(M){return Pi(M)?oN(M):WD(M)}function Tn(M){return Pi(M)?sN(M):VD(M)}function my(M){for(var U=M.length;U--&&Ai.test(M.charAt(U)););return U}var iN=Ic(kD);function oN(M){for(var U=Tc.lastIndex=0;Tc.test(M);)++U;return U}function sN(M){return M.match(Tc)||[]}function aN(M){return M.match(AD)||[]}var lN=function M(U){U=U==null?xt:Mi.defaults(xt.Object(),U,Mi.pick(xt,PD));var B=U.Array,oe=U.Date,we=U.Error,Be=U.Function,vt=U.Math,Re=U.Object,kc=U.RegExp,uN=U.String,cn=U.TypeError,oa=B.prototype,cN=Be.prototype,Fi=Re.prototype,sa=U["__core-js_shared__"],aa=cN.toString,Ve=Fi.hasOwnProperty,fN=0,yy=function(){var r=/[^.]+$/.exec(sa&&sa.keys&&sa.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),la=Fi.toString,dN=aa.call(Re),hN=xt._,pN=kc("^"+aa.call(Ve).replace(xi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ua=ey?U.Buffer:n,Sr=U.Symbol,ca=U.Uint8Array,vy=ua?ua.allocUnsafe:n,fa=gy(Re.getPrototypeOf,Re),by=Re.create,_y=Fi.propertyIsEnumerable,da=oa.splice,wy=Sr?Sr.isConcatSpreadable:n,Co=Sr?Sr.iterator:n,Hr=Sr?Sr.toStringTag:n,ha=function(){try{var r=Rr(Re,"defineProperty");return r({},"",{}),r}catch{}}(),gN=U.clearTimeout!==xt.clearTimeout&&U.clearTimeout,mN=oe&&oe.now!==xt.Date.now&&oe.now,yN=U.setTimeout!==xt.setTimeout&&U.setTimeout,pa=vt.ceil,ga=vt.floor,Dc=Re.getOwnPropertySymbols,vN=ua?ua.isBuffer:n,Ty=U.isFinite,bN=oa.join,_N=gy(Re.keys,Re),bt=vt.max,Pt=vt.min,wN=oe.now,TN=U.parseInt,Sy=vt.random,SN=oa.reverse,Nc=Rr(U,"DataView"),Eo=Rr(U,"Map"),Lc=Rr(U,"Promise"),ki=Rr(U,"Set"),xo=Rr(U,"WeakMap"),Ao=Rr(Re,"create"),ma=xo&&new xo,Di={},CN=Zr(Nc),EN=Zr(Eo),xN=Zr(Lc),AN=Zr(ki),ON=Zr(xo),ya=Sr?Sr.prototype:n,Oo=ya?ya.valueOf:n,Cy=ya?ya.toString:n;function v(r){if(ut(r)&&!Se(r)&&!(r instanceof $e)){if(r instanceof fn)return r;if(Ve.call(r,"__wrapped__"))return Ev(r)}return new fn(r)}var Ni=function(){function r(){}return function(i){if(!it(i))return{};if(by)return by(i);r.prototype=i;var l=new r;return r.prototype=n,l}}();function va(){}function fn(r,i){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=n}v.templateSettings={escape:pt,evaluate:br,interpolate:qs,variable:"",imports:{_:v}},v.prototype=va.prototype,v.prototype.constructor=v,fn.prototype=Ni(va.prototype),fn.prototype.constructor=fn;function $e(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Y,this.__views__=[]}function IN(){var r=new $e(this.__wrapped__);return r.__actions__=Vt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Vt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Vt(this.__views__),r}function PN(){if(this.__filtered__){var r=new $e(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function $N(){var r=this.__wrapped__.value(),i=this.__dir__,l=Se(r),f=i<0,m=l?r.length:0,w=VL(0,m,this.__views__),A=w.start,I=w.end,F=I-A,V=f?I:A-1,G=this.__iteratees__,R=G.length,ie=0,ue=Pt(F,this.__takeCount__);if(!l||!f&&m==F&&ue==F)return Ky(r,this.__actions__);var ye=[];e:for(;F--&&ie<ue;){V+=i;for(var Ee=-1,ve=r[V];++Ee<R;){var Pe=G[Ee],Me=Pe.iteratee,en=Pe.type,zt=Me(ve);if(en==Le)ve=zt;else if(!zt){if(en==he)continue e;break e}}ye[ie++]=ve}return ye}$e.prototype=Ni(va.prototype),$e.prototype.constructor=$e;function qr(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function MN(){this.__data__=Ao?Ao(null):{},this.size=0}function FN(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}function kN(r){var i=this.__data__;if(Ao){var l=i[r];return l===d?n:l}return Ve.call(i,r)?i[r]:n}function DN(r){var i=this.__data__;return Ao?i[r]!==n:Ve.call(i,r)}function NN(r,i){var l=this.__data__;return this.size+=this.has(r)?0:1,l[r]=Ao&&i===n?d:i,this}qr.prototype.clear=MN,qr.prototype.delete=FN,qr.prototype.get=kN,qr.prototype.has=DN,qr.prototype.set=NN;function Yn(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function LN(){this.__data__=[],this.size=0}function BN(r){var i=this.__data__,l=ba(i,r);if(l<0)return!1;var f=i.length-1;return l==f?i.pop():da.call(i,l,1),--this.size,!0}function zN(r){var i=this.__data__,l=ba(i,r);return l<0?n:i[l][1]}function UN(r){return ba(this.__data__,r)>-1}function jN(r,i){var l=this.__data__,f=ba(l,r);return f<0?(++this.size,l.push([r,i])):l[f][1]=i,this}Yn.prototype.clear=LN,Yn.prototype.delete=BN,Yn.prototype.get=zN,Yn.prototype.has=UN,Yn.prototype.set=jN;function Kn(r){var i=-1,l=r==null?0:r.length;for(this.clear();++i<l;){var f=r[i];this.set(f[0],f[1])}}function WN(){this.size=0,this.__data__={hash:new qr,map:new(Eo||Yn),string:new qr}}function VN(r){var i=$a(this,r).delete(r);return this.size-=i?1:0,i}function GN(r){return $a(this,r).get(r)}function HN(r){return $a(this,r).has(r)}function qN(r,i){var l=$a(this,r),f=l.size;return l.set(r,i),this.size+=l.size==f?0:1,this}Kn.prototype.clear=WN,Kn.prototype.delete=VN,Kn.prototype.get=GN,Kn.prototype.has=HN,Kn.prototype.set=qN;function Yr(r){var i=-1,l=r==null?0:r.length;for(this.__data__=new Kn;++i<l;)this.add(r[i])}function YN(r){return this.__data__.set(r,d),this}function KN(r){return this.__data__.has(r)}Yr.prototype.add=Yr.prototype.push=YN,Yr.prototype.has=KN;function Sn(r){var i=this.__data__=new Yn(r);this.size=i.size}function JN(){this.__data__=new Yn,this.size=0}function RN(r){var i=this.__data__,l=i.delete(r);return this.size=i.size,l}function ZN(r){return this.__data__.get(r)}function XN(r){return this.__data__.has(r)}function QN(r,i){var l=this.__data__;if(l instanceof Yn){var f=l.__data__;if(!Eo||f.length<s-1)return f.push([r,i]),this.size=++l.size,this;l=this.__data__=new Kn(f)}return l.set(r,i),this.size=l.size,this}Sn.prototype.clear=JN,Sn.prototype.delete=RN,Sn.prototype.get=ZN,Sn.prototype.has=XN,Sn.prototype.set=QN;function Ey(r,i){var l=Se(r),f=!l&&Xr(r),m=!l&&!f&&Or(r),w=!l&&!f&&!m&&Ui(r),A=l||f||m||w,I=A?$c(r.length,uN):[],F=I.length;for(var V in r)(i||Ve.call(r,V))&&!(A&&(V=="length"||m&&(V=="offset"||V=="parent")||w&&(V=="buffer"||V=="byteLength"||V=="byteOffset")||Xn(V,F)))&&I.push(V);return I}function xy(r){var i=r.length;return i?r[Kc(0,i-1)]:n}function eL(r,i){return Ma(Vt(r),Kr(i,0,r.length))}function tL(r){return Ma(Vt(r))}function Bc(r,i,l){(l!==n&&!Cn(r[i],l)||l===n&&!(i in r))&&Jn(r,i,l)}function Io(r,i,l){var f=r[i];(!(Ve.call(r,i)&&Cn(f,l))||l===n&&!(i in r))&&Jn(r,i,l)}function ba(r,i){for(var l=r.length;l--;)if(Cn(r[l][0],i))return l;return-1}function nL(r,i,l,f){return Cr(r,function(m,w,A){i(f,m,l(m),A)}),f}function Ay(r,i){return r&&Nn(i,Ct(i),r)}function rL(r,i){return r&&Nn(i,Ht(i),r)}function Jn(r,i,l){i=="__proto__"&&ha?ha(r,i,{configurable:!0,enumerable:!0,value:l,writable:!0}):r[i]=l}function zc(r,i){for(var l=-1,f=i.length,m=B(f),w=r==null;++l<f;)m[l]=w?n:_f(r,i[l]);return m}function Kr(r,i,l){return r===r&&(l!==n&&(r=r<=l?r:l),i!==n&&(r=r>=i?r:i)),r}function dn(r,i,l,f,m,w){var A,I=i&g,F=i&_,V=i&C;if(l&&(A=m?l(r,f,m,w):l(r)),A!==n)return A;if(!it(r))return r;var G=Se(r);if(G){if(A=HL(r),!I)return Vt(r,A)}else{var R=$t(r),ie=R==te||R==yt;if(Or(r))return Zy(r,I);if(R==Te||R==H||ie&&!m){if(A=F||ie?{}:mv(r),!I)return F?kL(r,rL(A,r)):FL(r,Ay(A,r))}else{if(!Ze[R])return m?r:{};A=qL(r,R,I)}}w||(w=new Sn);var ue=w.get(r);if(ue)return ue;w.set(r,A),Hv(r)?r.forEach(function(ve){A.add(dn(ve,i,l,ve,r,w))}):Vv(r)&&r.forEach(function(ve,Pe){A.set(Pe,dn(ve,i,l,Pe,r,w))});var ye=V?F?sf:of:F?Ht:Ct,Ee=G?n:ye(r);return un(Ee||r,function(ve,Pe){Ee&&(Pe=ve,ve=r[Pe]),Io(A,Pe,dn(ve,i,l,Pe,r,w))}),A}function iL(r){var i=Ct(r);return function(l){return Oy(l,r,i)}}function Oy(r,i,l){var f=l.length;if(r==null)return!f;for(r=Re(r);f--;){var m=l[f],w=i[m],A=r[m];if(A===n&&!(m in r)||!w(A))return!1}return!0}function Iy(r,i,l){if(typeof r!="function")throw new cn(u);return No(function(){r.apply(n,l)},i)}function Po(r,i,l,f){var m=-1,w=na,A=!0,I=r.length,F=[],V=i.length;if(!I)return F;l&&(i=nt(i,Zt(l))),f?(w=Ec,A=!1):i.length>=s&&(w=So,A=!1,i=new Yr(i));e:for(;++m<I;){var G=r[m],R=l==null?G:l(G);if(G=f||G!==0?G:0,A&&R===R){for(var ie=V;ie--;)if(i[ie]===R)continue e;F.push(G)}else w(i,R,f)||F.push(G)}return F}var Cr=nv(Dn),Py=nv(jc,!0);function oL(r,i){var l=!0;return Cr(r,function(f,m,w){return l=!!i(f,m,w),l}),l}function _a(r,i,l){for(var f=-1,m=r.length;++f<m;){var w=r[f],A=i(w);if(A!=null&&(I===n?A===A&&!Qt(A):l(A,I)))var I=A,F=w}return F}function sL(r,i,l,f){var m=r.length;for(l=Ce(l),l<0&&(l=-l>m?0:m+l),f=f===n||f>m?m:Ce(f),f<0&&(f+=m),f=l>f?0:Yv(f);l<f;)r[l++]=i;return r}function $y(r,i){var l=[];return Cr(r,function(f,m,w){i(f,m,w)&&l.push(f)}),l}function At(r,i,l,f,m){var w=-1,A=r.length;for(l||(l=KL),m||(m=[]);++w<A;){var I=r[w];i>0&&l(I)?i>1?At(I,i-1,l,f,m):wr(m,I):f||(m[m.length]=I)}return m}var Uc=rv(),My=rv(!0);function Dn(r,i){return r&&Uc(r,i,Ct)}function jc(r,i){return r&&My(r,i,Ct)}function wa(r,i){return _r(i,function(l){return Qn(r[l])})}function Jr(r,i){i=xr(i,r);for(var l=0,f=i.length;r!=null&&l<f;)r=r[Ln(i[l++])];return l&&l==f?r:n}function Fy(r,i,l){var f=i(r);return Se(r)?f:wr(f,l(r))}function Lt(r){return r==null?r===n?zr:fr:Hr&&Hr in Re(r)?WL(r):t5(r)}function Wc(r,i){return r>i}function aL(r,i){return r!=null&&Ve.call(r,i)}function lL(r,i){return r!=null&&i in Re(r)}function uL(r,i,l){return r>=Pt(i,l)&&r<bt(i,l)}function Vc(r,i,l){for(var f=l?Ec:na,m=r[0].length,w=r.length,A=w,I=B(w),F=1/0,V=[];A--;){var G=r[A];A&&i&&(G=nt(G,Zt(i))),F=Pt(G.length,F),I[A]=!l&&(i||m>=120&&G.length>=120)?new Yr(A&&G):n}G=r[0];var R=-1,ie=I[0];e:for(;++R<m&&V.length<F;){var ue=G[R],ye=i?i(ue):ue;if(ue=l||ue!==0?ue:0,!(ie?So(ie,ye):f(V,ye,l))){for(A=w;--A;){var Ee=I[A];if(!(Ee?So(Ee,ye):f(r[A],ye,l)))continue e}ie&&ie.push(ye),V.push(ue)}}return V}function cL(r,i,l,f){return Dn(r,function(m,w,A){i(f,l(m),w,A)}),f}function $o(r,i,l){i=xr(i,r),r=_v(r,i);var f=r==null?r:r[Ln(pn(i))];return f==null?n:Rt(f,r,l)}function ky(r){return ut(r)&&Lt(r)==H}function fL(r){return ut(r)&&Lt(r)==gr}function dL(r){return ut(r)&&Lt(r)==me}function Mo(r,i,l,f,m){return r===i?!0:r==null||i==null||!ut(r)&&!ut(i)?r!==r&&i!==i:hL(r,i,l,f,Mo,m)}function hL(r,i,l,f,m,w){var A=Se(r),I=Se(i),F=A?ee:$t(r),V=I?ee:$t(i);F=F==H?Te:F,V=V==H?Te:V;var G=F==Te,R=V==Te,ie=F==V;if(ie&&Or(r)){if(!Or(i))return!1;A=!0,G=!1}if(ie&&!G)return w||(w=new Sn),A||Ui(r)?hv(r,i,l,f,m,w):UL(r,i,F,l,f,m,w);if(!(l&E)){var ue=G&&Ve.call(r,"__wrapped__"),ye=R&&Ve.call(i,"__wrapped__");if(ue||ye){var Ee=ue?r.value():r,ve=ye?i.value():i;return w||(w=new Sn),m(Ee,ve,l,f,w)}}return ie?(w||(w=new Sn),jL(r,i,l,f,m,w)):!1}function pL(r){return ut(r)&&$t(r)==Je}function Gc(r,i,l,f){var m=l.length,w=m,A=!f;if(r==null)return!w;for(r=Re(r);m--;){var I=l[m];if(A&&I[2]?I[1]!==r[I[0]]:!(I[0]in r))return!1}for(;++m<w;){I=l[m];var F=I[0],V=r[F],G=I[1];if(A&&I[2]){if(V===n&&!(F in r))return!1}else{var R=new Sn;if(f)var ie=f(V,G,F,r,i,R);if(!(ie===n?Mo(G,V,E|T,f,R):ie))return!1}}return!0}function Dy(r){if(!it(r)||RL(r))return!1;var i=Qn(r)?pN:de;return i.test(Zr(r))}function gL(r){return ut(r)&&Lt(r)==dr}function mL(r){return ut(r)&&$t(r)==jt}function yL(r){return ut(r)&&Ba(r.length)&&!!et[Lt(r)]}function Ny(r){return typeof r=="function"?r:r==null?qt:typeof r=="object"?Se(r)?zy(r[0],r[1]):By(r):ib(r)}function Hc(r){if(!Do(r))return _N(r);var i=[];for(var l in Re(r))Ve.call(r,l)&&l!="constructor"&&i.push(l);return i}function vL(r){if(!it(r))return e5(r);var i=Do(r),l=[];for(var f in r)f=="constructor"&&(i||!Ve.call(r,f))||l.push(f);return l}function qc(r,i){return r<i}function Ly(r,i){var l=-1,f=Gt(r)?B(r.length):[];return Cr(r,function(m,w,A){f[++l]=i(m,w,A)}),f}function By(r){var i=lf(r);return i.length==1&&i[0][2]?vv(i[0][0],i[0][1]):function(l){return l===r||Gc(l,r,i)}}function zy(r,i){return cf(r)&&yv(i)?vv(Ln(r),i):function(l){var f=_f(l,r);return f===n&&f===i?wf(l,r):Mo(i,f,E|T)}}function Ta(r,i,l,f,m){r!==i&&Uc(i,function(w,A){if(m||(m=new Sn),it(w))bL(r,i,A,l,Ta,f,m);else{var I=f?f(df(r,A),w,A+"",r,i,m):n;I===n&&(I=w),Bc(r,A,I)}},Ht)}function bL(r,i,l,f,m,w,A){var I=df(r,l),F=df(i,l),V=A.get(F);if(V){Bc(r,l,V);return}var G=w?w(I,F,l+"",r,i,A):n,R=G===n;if(R){var ie=Se(F),ue=!ie&&Or(F),ye=!ie&&!ue&&Ui(F);G=F,ie||ue||ye?Se(I)?G=I:dt(I)?G=Vt(I):ue?(R=!1,G=Zy(F,!0)):ye?(R=!1,G=Xy(F,!0)):G=[]:Lo(F)||Xr(F)?(G=I,Xr(I)?G=Kv(I):(!it(I)||Qn(I))&&(G=mv(F))):R=!1}R&&(A.set(F,G),m(G,F,f,w,A),A.delete(F)),Bc(r,l,G)}function Uy(r,i){var l=r.length;if(l)return i+=i<0?l:0,Xn(i,l)?r[i]:n}function jy(r,i,l){i.length?i=nt(i,function(w){return Se(w)?function(A){return Jr(A,w.length===1?w[0]:w)}:w}):i=[qt];var f=-1;i=nt(i,Zt(pe()));var m=Ly(r,function(w,A,I){var F=nt(i,function(V){return V(w)});return{criteria:F,index:++f,value:w}});return qD(m,function(w,A){return ML(w,A,l)})}function _L(r,i){return Wy(r,i,function(l,f){return wf(r,f)})}function Wy(r,i,l){for(var f=-1,m=i.length,w={};++f<m;){var A=i[f],I=Jr(r,A);l(I,A)&&Fo(w,xr(A,r),I)}return w}function wL(r){return function(i){return Jr(i,r)}}function Yc(r,i,l,f){var m=f?HD:Ii,w=-1,A=i.length,I=r;for(r===i&&(i=Vt(i)),l&&(I=nt(r,Zt(l)));++w<A;)for(var F=0,V=i[w],G=l?l(V):V;(F=m(I,G,F,f))>-1;)I!==r&&da.call(I,F,1),da.call(r,F,1);return r}function Vy(r,i){for(var l=r?i.length:0,f=l-1;l--;){var m=i[l];if(l==f||m!==w){var w=m;Xn(m)?da.call(r,m,1):Zc(r,m)}}return r}function Kc(r,i){return r+ga(Sy()*(i-r+1))}function TL(r,i,l,f){for(var m=-1,w=bt(pa((i-r)/(l||1)),0),A=B(w);w--;)A[f?w:++m]=r,r+=l;return A}function Jc(r,i){var l="";if(!r||i<1||i>De)return l;do i%2&&(l+=r),i=ga(i/2),i&&(r+=r);while(i);return l}function Ae(r,i){return hf(bv(r,i,qt),r+"")}function SL(r){return xy(ji(r))}function CL(r,i){var l=ji(r);return Ma(l,Kr(i,0,l.length))}function Fo(r,i,l,f){if(!it(r))return r;i=xr(i,r);for(var m=-1,w=i.length,A=w-1,I=r;I!=null&&++m<w;){var F=Ln(i[m]),V=l;if(F==="__proto__"||F==="constructor"||F==="prototype")return r;if(m!=A){var G=I[F];V=f?f(G,F,I):n,V===n&&(V=it(G)?G:Xn(i[m+1])?[]:{})}Io(I,F,V),I=I[F]}return r}var Gy=ma?function(r,i){return ma.set(r,i),r}:qt,EL=ha?function(r,i){return ha(r,"toString",{configurable:!0,enumerable:!1,value:Sf(i),writable:!0})}:qt;function xL(r){return Ma(ji(r))}function hn(r,i,l){var f=-1,m=r.length;i<0&&(i=-i>m?0:m+i),l=l>m?m:l,l<0&&(l+=m),m=i>l?0:l-i>>>0,i>>>=0;for(var w=B(m);++f<m;)w[f]=r[f+i];return w}function AL(r,i){var l;return Cr(r,function(f,m,w){return l=i(f,m,w),!l}),!!l}function Sa(r,i,l){var f=0,m=r==null?f:r.length;if(typeof i=="number"&&i===i&&m<=Q){for(;f<m;){var w=f+m>>>1,A=r[w];A!==null&&!Qt(A)&&(l?A<=i:A<i)?f=w+1:m=w}return m}return Rc(r,i,qt,l)}function Rc(r,i,l,f){var m=0,w=r==null?0:r.length;if(w===0)return 0;i=l(i);for(var A=i!==i,I=i===null,F=Qt(i),V=i===n;m<w;){var G=ga((m+w)/2),R=l(r[G]),ie=R!==n,ue=R===null,ye=R===R,Ee=Qt(R);if(A)var ve=f||ye;else V?ve=ye&&(f||ie):I?ve=ye&&ie&&(f||!ue):F?ve=ye&&ie&&!ue&&(f||!Ee):ue||Ee?ve=!1:ve=f?R<=i:R<i;ve?m=G+1:w=G}return Pt(w,ge)}function Hy(r,i){for(var l=-1,f=r.length,m=0,w=[];++l<f;){var A=r[l],I=i?i(A):A;if(!l||!Cn(I,F)){var F=I;w[m++]=A===0?0:A}}return w}function qy(r){return typeof r=="number"?r:Qt(r)?K:+r}function Xt(r){if(typeof r=="string")return r;if(Se(r))return nt(r,Xt)+"";if(Qt(r))return Cy?Cy.call(r):"";var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function Er(r,i,l){var f=-1,m=na,w=r.length,A=!0,I=[],F=I;if(l)A=!1,m=Ec;else if(w>=s){var V=i?null:BL(r);if(V)return ia(V);A=!1,m=So,F=new Yr}else F=i?[]:I;e:for(;++f<w;){var G=r[f],R=i?i(G):G;if(G=l||G!==0?G:0,A&&R===R){for(var ie=F.length;ie--;)if(F[ie]===R)continue e;i&&F.push(R),I.push(G)}else m(F,R,l)||(F!==I&&F.push(R),I.push(G))}return I}function Zc(r,i){return i=xr(i,r),r=_v(r,i),r==null||delete r[Ln(pn(i))]}function Yy(r,i,l,f){return Fo(r,i,l(Jr(r,i)),f)}function Ca(r,i,l,f){for(var m=r.length,w=f?m:-1;(f?w--:++w<m)&&i(r[w],w,r););return l?hn(r,f?0:w,f?w+1:m):hn(r,f?w+1:0,f?m:w)}function Ky(r,i){var l=r;return l instanceof $e&&(l=l.value()),xc(i,function(f,m){return m.func.apply(m.thisArg,wr([f],m.args))},l)}function Xc(r,i,l){var f=r.length;if(f<2)return f?Er(r[0]):[];for(var m=-1,w=B(f);++m<f;)for(var A=r[m],I=-1;++I<f;)I!=m&&(w[m]=Po(w[m]||A,r[I],i,l));return Er(At(w,1),i,l)}function Jy(r,i,l){for(var f=-1,m=r.length,w=i.length,A={};++f<m;){var I=f<w?i[f]:n;l(A,r[f],I)}return A}function Qc(r){return dt(r)?r:[]}function ef(r){return typeof r=="function"?r:qt}function xr(r,i){return Se(r)?r:cf(r,i)?[r]:Cv(je(r))}var OL=Ae;function Ar(r,i,l){var f=r.length;return l=l===n?f:l,!i&&l>=f?r:hn(r,i,l)}var Ry=gN||function(r){return xt.clearTimeout(r)};function Zy(r,i){if(i)return r.slice();var l=r.length,f=vy?vy(l):new r.constructor(l);return r.copy(f),f}function tf(r){var i=new r.constructor(r.byteLength);return new ca(i).set(new ca(r)),i}function IL(r,i){var l=i?tf(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.byteLength)}function PL(r){var i=new r.constructor(r.source,_o.exec(r));return i.lastIndex=r.lastIndex,i}function $L(r){return Oo?Re(Oo.call(r)):{}}function Xy(r,i){var l=i?tf(r.buffer):r.buffer;return new r.constructor(l,r.byteOffset,r.length)}function Qy(r,i){if(r!==i){var l=r!==n,f=r===null,m=r===r,w=Qt(r),A=i!==n,I=i===null,F=i===i,V=Qt(i);if(!I&&!V&&!w&&r>i||w&&A&&F&&!I&&!V||f&&A&&F||!l&&F||!m)return 1;if(!f&&!w&&!V&&r<i||V&&l&&m&&!f&&!w||I&&l&&m||!A&&m||!F)return-1}return 0}function ML(r,i,l){for(var f=-1,m=r.criteria,w=i.criteria,A=m.length,I=l.length;++f<A;){var F=Qy(m[f],w[f]);if(F){if(f>=I)return F;var V=l[f];return F*(V=="desc"?-1:1)}}return r.index-i.index}function ev(r,i,l,f){for(var m=-1,w=r.length,A=l.length,I=-1,F=i.length,V=bt(w-A,0),G=B(F+V),R=!f;++I<F;)G[I]=i[I];for(;++m<A;)(R||m<w)&&(G[l[m]]=r[m]);for(;V--;)G[I++]=r[m++];return G}function tv(r,i,l,f){for(var m=-1,w=r.length,A=-1,I=l.length,F=-1,V=i.length,G=bt(w-I,0),R=B(G+V),ie=!f;++m<G;)R[m]=r[m];for(var ue=m;++F<V;)R[ue+F]=i[F];for(;++A<I;)(ie||m<w)&&(R[ue+l[A]]=r[m++]);return R}function Vt(r,i){var l=-1,f=r.length;for(i||(i=B(f));++l<f;)i[l]=r[l];return i}function Nn(r,i,l,f){var m=!l;l||(l={});for(var w=-1,A=i.length;++w<A;){var I=i[w],F=f?f(l[I],r[I],I,l,r):n;F===n&&(F=r[I]),m?Jn(l,I,F):Io(l,I,F)}return l}function FL(r,i){return Nn(r,uf(r),i)}function kL(r,i){return Nn(r,pv(r),i)}function Ea(r,i){return function(l,f){var m=Se(l)?zD:nL,w=i?i():{};return m(l,r,pe(f,2),w)}}function Li(r){return Ae(function(i,l){var f=-1,m=l.length,w=m>1?l[m-1]:n,A=m>2?l[2]:n;for(w=r.length>3&&typeof w=="function"?(m--,w):n,A&&Bt(l[0],l[1],A)&&(w=m<3?n:w,m=1),i=Re(i);++f<m;){var I=l[f];I&&r(i,I,f,w)}return i})}function nv(r,i){return function(l,f){if(l==null)return l;if(!Gt(l))return r(l,f);for(var m=l.length,w=i?m:-1,A=Re(l);(i?w--:++w<m)&&f(A[w],w,A)!==!1;);return l}}function rv(r){return function(i,l,f){for(var m=-1,w=Re(i),A=f(i),I=A.length;I--;){var F=A[r?I:++m];if(l(w[F],F,w)===!1)break}return i}}function DL(r,i,l){var f=i&P,m=ko(r);function w(){var A=this&&this!==xt&&this instanceof w?m:r;return A.apply(f?l:this,arguments)}return w}function iv(r){return function(i){i=je(i);var l=Pi(i)?Tn(i):n,f=l?l[0]:i.charAt(0),m=l?Ar(l,1).join(""):i.slice(1);return f[r]()+m}}function Bi(r){return function(i){return xc(nb(tb(i).replace(ED,"")),r,"")}}function ko(r){return function(){var i=arguments;switch(i.length){case 0:return new r;case 1:return new r(i[0]);case 2:return new r(i[0],i[1]);case 3:return new r(i[0],i[1],i[2]);case 4:return new r(i[0],i[1],i[2],i[3]);case 5:return new r(i[0],i[1],i[2],i[3],i[4]);case 6:return new r(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new r(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var l=Ni(r.prototype),f=r.apply(l,i);return it(f)?f:l}}function NL(r,i,l){var f=ko(r);function m(){for(var w=arguments.length,A=B(w),I=w,F=zi(m);I--;)A[I]=arguments[I];var V=w<3&&A[0]!==F&&A[w-1]!==F?[]:Tr(A,F);if(w-=V.length,w<l)return uv(r,i,xa,m.placeholder,n,A,V,n,n,l-w);var G=this&&this!==xt&&this instanceof m?f:r;return Rt(G,this,A)}return m}function ov(r){return function(i,l,f){var m=Re(i);if(!Gt(i)){var w=pe(l,3);i=Ct(i),l=function(I){return w(m[I],I,m)}}var A=r(i,l,f);return A>-1?m[w?i[A]:A]:n}}function sv(r){return Zn(function(i){var l=i.length,f=l,m=fn.prototype.thru;for(r&&i.reverse();f--;){var w=i[f];if(typeof w!="function")throw new cn(u);if(m&&!A&&Pa(w)=="wrapper")var A=new fn([],!0)}for(f=A?f:l;++f<l;){w=i[f];var I=Pa(w),F=I=="wrapper"?af(w):n;F&&ff(F[0])&&F[1]==(J|W|k|le)&&!F[4].length&&F[9]==1?A=A[Pa(F[0])].apply(A,F[3]):A=w.length==1&&ff(w)?A[I]():A.thru(w)}return function(){var V=arguments,G=V[0];if(A&&V.length==1&&Se(G))return A.plant(G).value();for(var R=0,ie=l?i[R].apply(this,V):G;++R<l;)ie=i[R].call(this,ie);return ie}})}function xa(r,i,l,f,m,w,A,I,F,V){var G=i&J,R=i&P,ie=i&N,ue=i&(W|D),ye=i&ne,Ee=ie?n:ko(r);function ve(){for(var Pe=arguments.length,Me=B(Pe),en=Pe;en--;)Me[en]=arguments[en];if(ue)var zt=zi(ve),tn=KD(Me,zt);if(f&&(Me=ev(Me,f,m,ue)),w&&(Me=tv(Me,w,A,ue)),Pe-=tn,ue&&Pe<V){var ht=Tr(Me,zt);return uv(r,i,xa,ve.placeholder,l,Me,ht,I,F,V-Pe)}var En=R?l:this,tr=ie?En[r]:r;return Pe=Me.length,I?Me=n5(Me,I):ye&&Pe>1&&Me.reverse(),G&&F<Pe&&(Me.length=F),this&&this!==xt&&this instanceof ve&&(tr=Ee||ko(tr)),tr.apply(En,Me)}return ve}function av(r,i){return function(l,f){return cL(l,r,i(f),{})}}function Aa(r,i){return function(l,f){var m;if(l===n&&f===n)return i;if(l!==n&&(m=l),f!==n){if(m===n)return f;typeof l=="string"||typeof f=="string"?(l=Xt(l),f=Xt(f)):(l=qy(l),f=qy(f)),m=r(l,f)}return m}}function nf(r){return Zn(function(i){return i=nt(i,Zt(pe())),Ae(function(l){var f=this;return r(i,function(m){return Rt(m,f,l)})})})}function Oa(r,i){i=i===n?" ":Xt(i);var l=i.length;if(l<2)return l?Jc(i,r):i;var f=Jc(i,pa(r/$i(i)));return Pi(i)?Ar(Tn(f),0,r).join(""):f.slice(0,r)}function LL(r,i,l,f){var m=i&P,w=ko(r);function A(){for(var I=-1,F=arguments.length,V=-1,G=f.length,R=B(G+F),ie=this&&this!==xt&&this instanceof A?w:r;++V<G;)R[V]=f[V];for(;F--;)R[V++]=arguments[++I];return Rt(ie,m?l:this,R)}return A}function lv(r){return function(i,l,f){return f&&typeof f!="number"&&Bt(i,l,f)&&(l=f=n),i=er(i),l===n?(l=i,i=0):l=er(l),f=f===n?i<l?1:-1:er(f),TL(i,l,f,r)}}function Ia(r){return function(i,l){return typeof i=="string"&&typeof l=="string"||(i=gn(i),l=gn(l)),r(i,l)}}function uv(r,i,l,f,m,w,A,I,F,V){var G=i&W,R=G?A:n,ie=G?n:A,ue=G?w:n,ye=G?n:w;i|=G?k:L,i&=~(G?L:k),i&X||(i&=-4);var Ee=[r,i,m,ue,R,ye,ie,I,F,V],ve=l.apply(n,Ee);return ff(r)&&wv(ve,Ee),ve.placeholder=f,Tv(ve,r,i)}function rf(r){var i=vt[r];return function(l,f){if(l=gn(l),f=f==null?0:Pt(Ce(f),292),f&&Ty(l)){var m=(je(l)+"e").split("e"),w=i(m[0]+"e"+(+m[1]+f));return m=(je(w)+"e").split("e"),+(m[0]+"e"+(+m[1]-f))}return i(l)}}var BL=ki&&1/ia(new ki([,-0]))[1]==ke?function(r){return new ki(r)}:xf;function cv(r){return function(i){var l=$t(i);return l==Je?Fc(i):l==jt?tN(i):YD(i,r(i))}}function Rn(r,i,l,f,m,w,A,I){var F=i&N;if(!F&&typeof r!="function")throw new cn(u);var V=f?f.length:0;if(V||(i&=-97,f=m=n),A=A===n?A:bt(Ce(A),0),I=I===n?I:Ce(I),V-=m?m.length:0,i&L){var G=f,R=m;f=m=n}var ie=F?n:af(r),ue=[r,i,l,f,m,G,R,w,A,I];if(ie&&QL(ue,ie),r=ue[0],i=ue[1],l=ue[2],f=ue[3],m=ue[4],I=ue[9]=ue[9]===n?F?0:r.length:bt(ue[9]-V,0),!I&&i&(W|D)&&(i&=-25),!i||i==P)var ye=DL(r,i,l);else i==W||i==D?ye=NL(r,i,I):(i==k||i==(P|k))&&!m.length?ye=LL(r,i,l,f):ye=xa.apply(n,ue);var Ee=ie?Gy:wv;return Tv(Ee(ye,ue),r,i)}function fv(r,i,l,f){return r===n||Cn(r,Fi[l])&&!Ve.call(f,l)?i:r}function dv(r,i,l,f,m,w){return it(r)&&it(i)&&(w.set(i,r),Ta(r,i,n,dv,w),w.delete(i)),r}function zL(r){return Lo(r)?n:r}function hv(r,i,l,f,m,w){var A=l&E,I=r.length,F=i.length;if(I!=F&&!(A&&F>I))return!1;var V=w.get(r),G=w.get(i);if(V&&G)return V==i&&G==r;var R=-1,ie=!0,ue=l&T?new Yr:n;for(w.set(r,i),w.set(i,r);++R<I;){var ye=r[R],Ee=i[R];if(f)var ve=A?f(Ee,ye,R,i,r,w):f(ye,Ee,R,r,i,w);if(ve!==n){if(ve)continue;ie=!1;break}if(ue){if(!Ac(i,function(Pe,Me){if(!So(ue,Me)&&(ye===Pe||m(ye,Pe,l,f,w)))return ue.push(Me)})){ie=!1;break}}else if(!(ye===Ee||m(ye,Ee,l,f,w))){ie=!1;break}}return w.delete(r),w.delete(i),ie}function UL(r,i,l,f,m,w,A){switch(l){case qn:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)return!1;r=r.buffer,i=i.buffer;case gr:return!(r.byteLength!=i.byteLength||!w(new ca(r),new ca(i)));case be:case me:case Nt:return Cn(+r,+i);case qe:return r.name==i.name&&r.message==i.message;case dr:case Br:return r==i+"";case Je:var I=Fc;case jt:var F=f&E;if(I||(I=ia),r.size!=i.size&&!F)return!1;var V=A.get(r);if(V)return V==i;f|=T,A.set(r,i);var G=hv(I(r),I(i),f,m,w,A);return A.delete(r),G;case hr:if(Oo)return Oo.call(r)==Oo.call(i)}return!1}function jL(r,i,l,f,m,w){var A=l&E,I=of(r),F=I.length,V=of(i),G=V.length;if(F!=G&&!A)return!1;for(var R=F;R--;){var ie=I[R];if(!(A?ie in i:Ve.call(i,ie)))return!1}var ue=w.get(r),ye=w.get(i);if(ue&&ye)return ue==i&&ye==r;var Ee=!0;w.set(r,i),w.set(i,r);for(var ve=A;++R<F;){ie=I[R];var Pe=r[ie],Me=i[ie];if(f)var en=A?f(Me,Pe,ie,i,r,w):f(Pe,Me,ie,r,i,w);if(!(en===n?Pe===Me||m(Pe,Me,l,f,w):en)){Ee=!1;break}ve||(ve=ie=="constructor")}if(Ee&&!ve){var zt=r.constructor,tn=i.constructor;zt!=tn&&"constructor"in r&&"constructor"in i&&!(typeof zt=="function"&&zt instanceof zt&&typeof tn=="function"&&tn instanceof tn)&&(Ee=!1)}return w.delete(r),w.delete(i),Ee}function Zn(r){return hf(bv(r,n,Ov),r+"")}function of(r){return Fy(r,Ct,uf)}function sf(r){return Fy(r,Ht,pv)}var af=ma?function(r){return ma.get(r)}:xf;function Pa(r){for(var i=r.name+"",l=Di[i],f=Ve.call(Di,i)?l.length:0;f--;){var m=l[f],w=m.func;if(w==null||w==r)return m.name}return i}function zi(r){var i=Ve.call(v,"placeholder")?v:r;return i.placeholder}function pe(){var r=v.iteratee||Cf;return r=r===Cf?Ny:r,arguments.length?r(arguments[0],arguments[1]):r}function $a(r,i){var l=r.__data__;return JL(i)?l[typeof i=="string"?"string":"hash"]:l.map}function lf(r){for(var i=Ct(r),l=i.length;l--;){var f=i[l],m=r[f];i[l]=[f,m,yv(m)]}return i}function Rr(r,i){var l=XD(r,i);return Dy(l)?l:n}function WL(r){var i=Ve.call(r,Hr),l=r[Hr];try{r[Hr]=n;var f=!0}catch{}var m=la.call(r);return f&&(i?r[Hr]=l:delete r[Hr]),m}var uf=Dc?function(r){return r==null?[]:(r=Re(r),_r(Dc(r),function(i){return _y.call(r,i)}))}:Af,pv=Dc?function(r){for(var i=[];r;)wr(i,uf(r)),r=fa(r);return i}:Af,$t=Lt;(Nc&&$t(new Nc(new ArrayBuffer(1)))!=qn||Eo&&$t(new Eo)!=Je||Lc&&$t(Lc.resolve())!=Fn||ki&&$t(new ki)!=jt||xo&&$t(new xo)!=sn)&&($t=function(r){var i=Lt(r),l=i==Te?r.constructor:n,f=l?Zr(l):"";if(f)switch(f){case CN:return qn;case EN:return Je;case xN:return Fn;case AN:return jt;case ON:return sn}return i});function VL(r,i,l){for(var f=-1,m=l.length;++f<m;){var w=l[f],A=w.size;switch(w.type){case"drop":r+=A;break;case"dropRight":i-=A;break;case"take":i=Pt(i,r+A);break;case"takeRight":r=bt(r,i-A);break}}return{start:r,end:i}}function GL(r){var i=r.match(Rs);return i?i[1].split(bo):[]}function gv(r,i,l){i=xr(i,r);for(var f=-1,m=i.length,w=!1;++f<m;){var A=Ln(i[f]);if(!(w=r!=null&&l(r,A)))break;r=r[A]}return w||++f!=m?w:(m=r==null?0:r.length,!!m&&Ba(m)&&Xn(A,m)&&(Se(r)||Xr(r)))}function HL(r){var i=r.length,l=new r.constructor(i);return i&&typeof r[0]=="string"&&Ve.call(r,"index")&&(l.index=r.index,l.input=r.input),l}function mv(r){return typeof r.constructor=="function"&&!Do(r)?Ni(fa(r)):{}}function qL(r,i,l){var f=r.constructor;switch(i){case gr:return tf(r);case be:case me:return new f(+r);case qn:return IL(r,l);case Ti:case Ur:case Si:case mr:case yr:case Jt:case kn:case jr:case Wr:return Xy(r,l);case Je:return new f;case Nt:case Br:return new f(r);case dr:return PL(r);case jt:return new f;case hr:return $L(r)}}function YL(r,i){var l=i.length;if(!l)return r;var f=l-1;return i[f]=(l>1?"& ":"")+i[f],i=i.join(l>2?", ":" "),r.replace(Js,`{
|
|
138
138
|
/* [wrapped with `+i+`] */
|
|
139
|
-
`)}function VL(r){return Te(r)||ei(r)||!!(Ty&&r&&r[Ty])}function Qn(r,i){var l=typeof r;return i=i??Ie,!!i&&(l=="number"||l!="symbol"&&Q.test(r))&&r>-1&&r%1==0&&r<i}function zt(r,i,l){if(!it(l))return!1;var f=typeof i;return(f=="number"?Ht(l)&&Qn(i,l.length):f=="string"&&i in l)?En(l[i],r):!1}function rf(r,i){if(Te(r))return!1;var l=typeof r;return l=="number"||l=="symbol"||l=="boolean"||r==null||en(r)?!0:To.test(r)||!Hs.test(r)||i!=null&&r in Ke(i)}function GL(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}function of(r){var i=Oa(r),l=b[i];if(typeof l!="function"||!(i in $e.prototype))return!1;if(r===l)return!0;var f=ef(l);return!!f&&r===f[0]}function HL(r){return!!yy&&yy in r}var qL=ia?er:wf;function Bo(r){var i=r&&r.constructor,l=typeof i=="function"&&i.prototype||Ni;return r===l}function yv(r){return r===r&&!it(r)}function vv(r,i){return function(l){return l==null?!1:l[r]===i&&(i!==n||r in Ke(l))}}function YL(r){var i=Da(r,function(f){return l.size===p&&l.clear(),f}),l=i.cache;return i}function KL(r,i){var l=r[1],f=i[1],m=l|f,T=m<(P|N|H),A=f==H&&l==W||f==H&&l==ae&&r[7].length<=i[8]||f==(H|ae)&&i[7].length<=i[8]&&l==W;if(!(T||A))return r;f&P&&(r[2]=i[2],m|=l&P?0:R);var I=i[3];if(I){var F=r[3];r[3]=F?ev(F,I,i[4]):I,r[4]=F?Sr(r[3],y):i[4]}return I=i[5],I&&(F=r[5],r[5]=F?tv(F,I,i[6]):I,r[6]=F?Sr(r[5],y):i[6]),I=i[7],I&&(r[7]=I),f&H&&(r[8]=r[8]==null?i[8]:$t(r[8],i[8])),r[9]==null&&(r[9]=i[9]),r[0]=i[0],r[1]=m,r}function JL(r){var i=[];if(r!=null)for(var l in Ke(r))i.push(l);return i}function ZL(r){return sa.call(r)}function bv(r,i,l){return i=_t(i===n?r.length-1:i,0),function(){for(var f=arguments,m=-1,T=_t(f.length-i,0),A=L(T);++m<T;)A[m]=f[i+m];m=-1;for(var I=L(i+1);++m<i;)I[m]=f[m];return I[i]=l(A),Rt(r,this,I)}}function _v(r,i){return i.length<2?r:Rr(r,pn(i,0,-1))}function RL(r,i){for(var l=r.length,f=$t(i.length,l),m=Gt(r);f--;){var T=i[f];r[f]=Qn(T,l)?m[T]:n}return r}function sf(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}var Tv=Sv(Gy),zo=dN||function(r,i){return At.setTimeout(r,i)},af=Sv(_L);function wv(r,i,l){var f=i+"";return af(r,WL(f,XL(zL(f),l)))}function Sv(r){var i=0,l=0;return function(){var f=mN(),m=fe-(f-l);if(l=f,m>0){if(++i>=ne)return arguments[0]}else i=0;return r.apply(n,arguments)}}function Pa(r,i){var l=-1,f=r.length,m=f-1;for(i=i===n?f:i;++l<i;){var T=Wc(l,m),A=r[T];r[T]=r[l],r[l]=A}return r.length=i,r}var Cv=YL(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(qs,function(l,f,m,T){i.push(m?T.replace(Zs,"$1"):f||l)}),i});function Nn(r){if(typeof r=="string"||en(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function Qr(r){if(r!=null){try{return oa.call(r)}catch{}try{return r+""}catch{}}return""}function XL(r,i){return cn(Z,function(l){var f="_."+l[0];i&l[1]&&!ea(r,f)&&r.push(f)}),r.sort()}function Ev(r){if(r instanceof $e)return r.clone();var i=new dn(r.__wrapped__,r.__chain__);return i.__actions__=Gt(r.__actions__),i.__index__=r.__index__,i.__values__=r.__values__,i}function QL(r,i,l){(l?zt(r,i,l):i===n)?i=1:i=_t(Se(i),0);var f=r==null?0:r.length;if(!f||i<1)return[];for(var m=0,T=0,A=L(da(f/i));m<f;)A[T++]=pn(r,m,m+=i);return A}function e5(r){for(var i=-1,l=r==null?0:r.length,f=0,m=[];++i<l;){var T=r[i];T&&(m[f++]=T)}return m}function t5(){var r=arguments.length;if(!r)return[];for(var i=L(r-1),l=arguments[0],f=r;f--;)i[f-1]=arguments[f];return wr(Te(l)?Gt(l):[l],Ot(i,1))}var n5=xe(function(r,i){return ht(r)?Fo(r,Ot(i,1,ht,!0)):[]}),r5=xe(function(r,i){var l=gn(i);return ht(l)&&(l=n),ht(r)?Fo(r,Ot(i,1,ht,!0),he(l,2)):[]}),i5=xe(function(r,i){var l=gn(i);return ht(l)&&(l=n),ht(r)?Fo(r,Ot(i,1,ht,!0),n,l):[]});function o5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Se(i),pn(r,i<0?0:i,f)):[]}function s5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Se(i),i=f-i,pn(r,0,i<0?0:i)):[]}function a5(r,i){return r&&r.length?wa(r,he(i,3),!0,!0):[]}function l5(r,i){return r&&r.length?wa(r,he(i,3),!0):[]}function u5(r,i,l,f){var m=r==null?0:r.length;return m?(l&&typeof l!="number"&&zt(r,i,l)&&(l=0,f=m),tL(r,i,l,f)):[]}function xv(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Se(l);return m<0&&(m=_t(f+m,0)),ta(r,he(i,3),m)}function Av(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f-1;return l!==n&&(m=Se(l),m=l<0?_t(f+m,0):$t(m,f-1)),ta(r,he(i,3),m,!0)}function Ov(r){var i=r==null?0:r.length;return i?Ot(r,1):[]}function c5(r){var i=r==null?0:r.length;return i?Ot(r,Le):[]}function f5(r,i){var l=r==null?0:r.length;return l?(i=i===n?1:Se(i),Ot(r,i)):[]}function d5(r){for(var i=-1,l=r==null?0:r.length,f={};++i<l;){var m=r[i];f[m[0]]=m[1]}return f}function Iv(r){return r&&r.length?r[0]:n}function h5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Se(l);return m<0&&(m=_t(f+m,0)),Mi(r,i,m)}function p5(r){var i=r==null?0:r.length;return i?pn(r,0,-1):[]}var g5=xe(function(r){var i=nt(r,Yc);return i.length&&i[0]===r[0]?Lc(i):[]}),m5=xe(function(r){var i=gn(r),l=nt(r,Yc);return i===gn(l)?i=n:l.pop(),l.length&&l[0]===r[0]?Lc(l,he(i,2)):[]}),y5=xe(function(r){var i=gn(r),l=nt(r,Yc);return i=typeof i=="function"?i:n,i&&l.pop(),l.length&&l[0]===r[0]?Lc(l,n,i):[]});function v5(r,i){return r==null?"":pN.call(r,i)}function gn(r){var i=r==null?0:r.length;return i?r[i-1]:n}function b5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f;return l!==n&&(m=Se(l),m=m<0?_t(f+m,0):$t(m,f-1)),i===i?Xk(r,i,m):ta(r,uy,m,!0)}function _5(r,i){return r&&r.length?Uy(r,Se(i)):n}var T5=xe(Pv);function Pv(r,i){return r&&r.length&&i&&i.length?jc(r,i):r}function w5(r,i,l){return r&&r.length&&i&&i.length?jc(r,i,he(l,2)):r}function S5(r,i,l){return r&&r.length&&i&&i.length?jc(r,i,n,l):r}var C5=Xn(function(r,i){var l=r==null?0:r.length,f=Fc(r,i);return Vy(r,nt(i,function(m){return Qn(m,l)?+m:m}).sort(Qy)),f});function E5(r,i){var l=[];if(!(r&&r.length))return l;var f=-1,m=[],T=r.length;for(i=he(i,3);++f<T;){var A=r[f];i(A,f,r)&&(l.push(A),m.push(f))}return Vy(r,m),l}function lf(r){return r==null?r:vN.call(r)}function x5(r,i,l){var f=r==null?0:r.length;return f?(l&&typeof l!="number"&&zt(r,i,l)?(i=0,l=f):(i=i==null?0:Se(i),l=l===n?f:Se(l)),pn(r,i,l)):[]}function A5(r,i){return Ta(r,i)}function O5(r,i,l){return Gc(r,i,he(l,2))}function I5(r,i){var l=r==null?0:r.length;if(l){var f=Ta(r,i);if(f<l&&En(r[f],i))return f}return-1}function P5(r,i){return Ta(r,i,!0)}function $5(r,i,l){return Gc(r,i,he(l,2),!0)}function M5(r,i){var l=r==null?0:r.length;if(l){var f=Ta(r,i,!0)-1;if(En(r[f],i))return f}return-1}function F5(r){return r&&r.length?Hy(r):[]}function D5(r,i){return r&&r.length?Hy(r,he(i,2)):[]}function k5(r){var i=r==null?0:r.length;return i?pn(r,1,i):[]}function N5(r,i,l){return r&&r.length?(i=l||i===n?1:Se(i),pn(r,0,i<0?0:i)):[]}function L5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Se(i),i=f-i,pn(r,i<0?0:i,f)):[]}function B5(r,i){return r&&r.length?wa(r,he(i,3),!1,!0):[]}function z5(r,i){return r&&r.length?wa(r,he(i,3)):[]}var U5=xe(function(r){return xr(Ot(r,1,ht,!0))}),j5=xe(function(r){var i=gn(r);return ht(i)&&(i=n),xr(Ot(r,1,ht,!0),he(i,2))}),W5=xe(function(r){var i=gn(r);return i=typeof i=="function"?i:n,xr(Ot(r,1,ht,!0),n,i)});function V5(r){return r&&r.length?xr(r):[]}function G5(r,i){return r&&r.length?xr(r,he(i,2)):[]}function H5(r,i){return i=typeof i=="function"?i:n,r&&r.length?xr(r,n,i):[]}function uf(r){if(!(r&&r.length))return[];var i=0;return r=Tr(r,function(l){if(ht(l))return i=_t(l.length,i),!0}),Ec(i,function(l){return nt(r,wc(l))})}function $v(r,i){if(!(r&&r.length))return[];var l=uf(r);return i==null?l:nt(l,function(f){return Rt(i,n,f)})}var q5=xe(function(r,i){return ht(r)?Fo(r,i):[]}),Y5=xe(function(r){return qc(Tr(r,ht))}),K5=xe(function(r){var i=gn(r);return ht(i)&&(i=n),qc(Tr(r,ht),he(i,2))}),J5=xe(function(r){var i=gn(r);return i=typeof i=="function"?i:n,qc(Tr(r,ht),n,i)}),Z5=xe(uf);function R5(r,i){return Jy(r||[],i||[],Mo)}function X5(r,i){return Jy(r||[],i||[],No)}var Q5=xe(function(r){var i=r.length,l=i>1?r[i-1]:n;return l=typeof l=="function"?(r.pop(),l):n,$v(r,l)});function Mv(r){var i=b(r);return i.__chain__=!0,i}function e3(r,i){return i(r),r}function $a(r,i){return i(r)}var t3=Xn(function(r){var i=r.length,l=i?r[0]:0,f=this.__wrapped__,m=function(T){return Fc(T,r)};return i>1||this.__actions__.length||!(f instanceof $e)||!Qn(l)?this.thru(m):(f=f.slice(l,+l+(i?1:0)),f.__actions__.push({func:$a,args:[m],thisArg:n}),new dn(f,this.__chain__).thru(function(T){return i&&!T.length&&T.push(n),T}))});function n3(){return Mv(this)}function r3(){return new dn(this.value(),this.__chain__)}function i3(){this.__values__===n&&(this.__values__=qv(this.value()));var r=this.__index__>=this.__values__.length,i=r?n:this.__values__[this.__index__++];return{done:r,value:i}}function o3(){return this}function s3(r){for(var i,l=this;l instanceof ma;){var f=Ev(l);f.__index__=0,f.__values__=n,i?m.__wrapped__=f:i=f;var m=f;l=l.__wrapped__}return m.__wrapped__=r,i}function a3(){var r=this.__wrapped__;if(r instanceof $e){var i=r;return this.__actions__.length&&(i=new $e(this)),i=i.reverse(),i.__actions__.push({func:$a,args:[lf],thisArg:n}),new dn(i,this.__chain__)}return this.thru(lf)}function l3(){return Ky(this.__wrapped__,this.__actions__)}var u3=Sa(function(r,i,l){Ve.call(r,l)?++r[l]:Zn(r,l,1)});function c3(r,i,l){var f=Te(r)?ay:eL;return l&&zt(r,i,l)&&(i=n),f(r,he(i,3))}function f3(r,i){var l=Te(r)?Tr:$y;return l(r,he(i,3))}var d3=ov(xv),h3=ov(Av);function p3(r,i){return Ot(Ma(r,i),1)}function g3(r,i){return Ot(Ma(r,i),Le)}function m3(r,i,l){return l=l===n?1:Se(l),Ot(Ma(r,i),l)}function Fv(r,i){var l=Te(r)?cn:Er;return l(r,he(i,3))}function Dv(r,i){var l=Te(r)?kk:Py;return l(r,he(i,3))}var y3=Sa(function(r,i,l){Ve.call(r,l)?r[l].push(i):Zn(r,l,[i])});function v3(r,i,l,f){r=Ht(r)?r:Gi(r),l=l&&!f?Se(l):0;var m=r.length;return l<0&&(l=_t(m+l,0)),La(r)?l<=m&&r.indexOf(i,l)>-1:!!m&&Mi(r,i,l)>-1}var b3=xe(function(r,i,l){var f=-1,m=typeof i=="function",T=Ht(r)?L(r.length):[];return Er(r,function(A){T[++f]=m?Rt(i,A,l):Do(A,i,l)}),T}),_3=Sa(function(r,i,l){Zn(r,l,i)});function Ma(r,i){var l=Te(r)?nt:Ly;return l(r,he(i,3))}function T3(r,i,l,f){return r==null?[]:(Te(i)||(i=i==null?[]:[i]),l=f?n:l,Te(l)||(l=l==null?[]:[l]),jy(r,i,l))}var w3=Sa(function(r,i,l){r[l?0:1].push(i)},function(){return[[],[]]});function S3(r,i,l){var f=Te(r)?_c:fy,m=arguments.length<3;return f(r,he(i,4),l,m,Er)}function C3(r,i,l){var f=Te(r)?Nk:fy,m=arguments.length<3;return f(r,he(i,4),l,m,Py)}function E3(r,i){var l=Te(r)?Tr:$y;return l(r,ka(he(i,3)))}function x3(r){var i=Te(r)?xy:vL;return i(r)}function A3(r,i,l){(l?zt(r,i,l):i===n)?i=1:i=Se(i);var f=Te(r)?JN:bL;return f(r,i)}function O3(r){var i=Te(r)?ZN:TL;return i(r)}function I3(r){if(r==null)return 0;if(Ht(r))return La(r)?Di(r):r.length;var i=Mt(r);return i==Je||i==Wt?r.size:zc(r).length}function P3(r,i,l){var f=Te(r)?Tc:wL;return l&&zt(r,i,l)&&(i=n),f(r,he(i,3))}var $3=xe(function(r,i){if(r==null)return[];var l=i.length;return l>1&&zt(r,i[0],i[1])?i=[]:l>2&&zt(i[0],i[1],i[2])&&(i=[i[0]]),jy(r,Ot(i,1),[])}),Fa=fN||function(){return At.Date.now()};function M3(r,i){if(typeof i!="function")throw new fn(u);return r=Se(r),function(){if(--r<1)return i.apply(this,arguments)}}function kv(r,i,l){return i=l?n:i,i=r&&i==null?r.length:i,Rn(r,H,n,n,n,n,i)}function Nv(r,i){var l;if(typeof i!="function")throw new fn(u);return r=Se(r),function(){return--r>0&&(l=i.apply(this,arguments)),r<=1&&(i=n),l}}var cf=xe(function(r,i,l){var f=P;if(l.length){var m=Sr(l,Wi(cf));f|=D}return Rn(r,f,i,l,m)}),Lv=xe(function(r,i,l){var f=P|N;if(l.length){var m=Sr(l,Wi(Lv));f|=D}return Rn(i,f,r,l,m)});function Bv(r,i,l){i=l?n:i;var f=Rn(r,W,n,n,n,n,n,i);return f.placeholder=Bv.placeholder,f}function zv(r,i,l){i=l?n:i;var f=Rn(r,B,n,n,n,n,n,i);return f.placeholder=zv.placeholder,f}function Uv(r,i,l){var f,m,T,A,I,F,V=0,G=!1,J=!1,re=!0;if(typeof r!="function")throw new fn(u);i=mn(i)||0,it(l)&&(G=!!l.leading,J="maxWait"in l,T=J?_t(mn(l.maxWait)||0,i):T,re="trailing"in l?!!l.trailing:re);function ce(pt){var xn=f,nr=m;return f=m=n,V=pt,A=r.apply(nr,xn),A}function ge(pt){return V=pt,I=zo(Pe,i),G?ce(pt):A}function Ee(pt){var xn=pt-F,nr=pt-V,ob=i-xn;return J?$t(ob,T-nr):ob}function me(pt){var xn=pt-F,nr=pt-V;return F===n||xn>=i||xn<0||J&&nr>=T}function Pe(){var pt=Fa();if(me(pt))return Fe(pt);I=zo(Pe,Ee(pt))}function Fe(pt){return I=n,re&&f?ce(pt):(f=m=n,A)}function tn(){I!==n&&Zy(I),V=0,f=F=m=I=n}function Ut(){return I===n?A:Fe(Fa())}function nn(){var pt=Fa(),xn=me(pt);if(f=arguments,m=this,F=pt,xn){if(I===n)return ge(F);if(J)return Zy(I),I=zo(Pe,i),ce(F)}return I===n&&(I=zo(Pe,i)),A}return nn.cancel=tn,nn.flush=Ut,nn}var F3=xe(function(r,i){return Iy(r,1,i)}),D3=xe(function(r,i,l){return Iy(r,mn(i)||0,l)});function k3(r){return Rn(r,oe)}function Da(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new fn(u);var l=function(){var f=arguments,m=i?i.apply(this,f):f[0],T=l.cache;if(T.has(m))return T.get(m);var A=r.apply(this,f);return l.cache=T.set(m,A)||T,A};return l.cache=new(Da.Cache||Jn),l}Da.Cache=Jn;function ka(r){if(typeof r!="function")throw new fn(u);return function(){var i=arguments;switch(i.length){case 0:return!r.call(this);case 1:return!r.call(this,i[0]);case 2:return!r.call(this,i[0],i[1]);case 3:return!r.call(this,i[0],i[1],i[2])}return!r.apply(this,i)}}function N3(r){return Nv(2,r)}var L3=SL(function(r,i){i=i.length==1&&Te(i[0])?nt(i[0],Xt(he())):nt(Ot(i,1),Xt(he()));var l=i.length;return xe(function(f){for(var m=-1,T=$t(f.length,l);++m<T;)f[m]=i[m].call(this,f[m]);return Rt(r,this,f)})}),ff=xe(function(r,i){var l=Sr(i,Wi(ff));return Rn(r,D,n,i,l)}),jv=xe(function(r,i){var l=Sr(i,Wi(jv));return Rn(r,k,n,i,l)}),B3=Xn(function(r,i){return Rn(r,ae,n,n,n,i)});function z3(r,i){if(typeof r!="function")throw new fn(u);return i=i===n?i:Se(i),xe(r,i)}function U3(r,i){if(typeof r!="function")throw new fn(u);return i=i==null?0:_t(Se(i),0),xe(function(l){var f=l[i],m=Or(l,0,i);return f&&wr(m,f),Rt(r,this,m)})}function j3(r,i,l){var f=!0,m=!0;if(typeof r!="function")throw new fn(u);return it(l)&&(f="leading"in l?!!l.leading:f,m="trailing"in l?!!l.trailing:m),Uv(r,i,{leading:f,maxWait:i,trailing:m})}function W3(r){return kv(r,1)}function V3(r,i){return ff(Kc(i),r)}function G3(){if(!arguments.length)return[];var r=arguments[0];return Te(r)?r:[r]}function H3(r){return hn(r,C)}function q3(r,i){return i=typeof i=="function"?i:n,hn(r,C,i)}function Y3(r){return hn(r,g|C)}function K3(r,i){return i=typeof i=="function"?i:n,hn(r,g|C,i)}function J3(r,i){return i==null||Oy(r,i,Et(i))}function En(r,i){return r===i||r!==r&&i!==i}var Z3=Aa(Nc),R3=Aa(function(r,i){return r>=i}),ei=Dy(function(){return arguments}())?Dy:function(r){return ct(r)&&Ve.call(r,"callee")&&!_y.call(r,"callee")},Te=L.isArray,X3=ty?Xt(ty):sL;function Ht(r){return r!=null&&Na(r.length)&&!er(r)}function ht(r){return ct(r)&&Ht(r)}function Q3(r){return r===!0||r===!1||ct(r)&&Bt(r)==be}var Ir=hN||wf,e4=ny?Xt(ny):aL;function t4(r){return ct(r)&&r.nodeType===1&&!Uo(r)}function n4(r){if(r==null)return!0;if(Ht(r)&&(Te(r)||typeof r=="string"||typeof r.splice=="function"||Ir(r)||Vi(r)||ei(r)))return!r.length;var i=Mt(r);if(i==Je||i==Wt)return!r.size;if(Bo(r))return!zc(r).length;for(var l in r)if(Ve.call(r,l))return!1;return!0}function r4(r,i){return ko(r,i)}function i4(r,i,l){l=typeof l=="function"?l:n;var f=l?l(r,i):n;return f===n?ko(r,i,n,l):!!f}function df(r){if(!ct(r))return!1;var i=Bt(r);return i==tt||i==Ce||typeof r.message=="string"&&typeof r.name=="string"&&!Uo(r)}function o4(r){return typeof r=="number"&&wy(r)}function er(r){if(!it(r))return!1;var i=Bt(r);return i==te||i==yt||i==ve||i==qn}function Wv(r){return typeof r=="number"&&r==Se(r)}function Na(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ie}function it(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}function ct(r){return r!=null&&typeof r=="object"}var Vv=ry?Xt(ry):uL;function s4(r,i){return r===i||Bc(r,i,tf(i))}function a4(r,i,l){return l=typeof l=="function"?l:n,Bc(r,i,tf(i),l)}function l4(r){return Gv(r)&&r!=+r}function u4(r){if(qL(r))throw new _e(a);return ky(r)}function c4(r){return r===null}function f4(r){return r==null}function Gv(r){return typeof r=="number"||ct(r)&&Bt(r)==Lt}function Uo(r){if(!ct(r)||Bt(r)!=vt)return!1;var i=ua(r);if(i===null)return!0;var l=Ve.call(i,"constructor")&&i.constructor;return typeof l=="function"&&l instanceof l&&oa.call(l)==aN}var hf=iy?Xt(iy):cL;function d4(r){return Wv(r)&&r>=-9007199254740991&&r<=Ie}var Hv=oy?Xt(oy):fL;function La(r){return typeof r=="string"||!Te(r)&&ct(r)&&Bt(r)==Ur}function en(r){return typeof r=="symbol"||ct(r)&&Bt(r)==pr}var Vi=sy?Xt(sy):dL;function h4(r){return r===n}function p4(r){return ct(r)&&Mt(r)==an}function g4(r){return ct(r)&&Bt(r)==gr}var m4=Aa(Uc),y4=Aa(function(r,i){return r<=i});function qv(r){if(!r)return[];if(Ht(r))return La(r)?Sn(r):Gt(r);if(Ao&&r[Ao])return Jk(r[Ao]());var i=Mt(r),l=i==Je?Ac:i==Wt?na:Gi;return l(r)}function tr(r){if(!r)return r===0?r:0;if(r=mn(r),r===Le||r===-1/0){var i=r<0?-1:1;return i*lt}return r===r?r:0}function Se(r){var i=tr(r),l=i%1;return i===i?l?i-l:i:0}function Yv(r){return r?Zr(Se(r),0,Y):0}function mn(r){if(typeof r=="number")return r;if(en(r))return q;if(it(r)){var i=typeof r.valueOf=="function"?r.valueOf():r;r=it(i)?i+"":i}if(typeof r!="string")return r===0?r:+r;r=dy(r);var l=fc.test(r);return l||$.test(r)?Mk(r.slice(2),l?2:8):Xs.test(r)?q:+r}function Kv(r){return kn(r,qt(r))}function v4(r){return r?Zr(Se(r),-9007199254740991,Ie):r===0?r:0}function je(r){return r==null?"":Qt(r)}var b4=Ui(function(r,i){if(Bo(i)||Ht(i)){kn(i,Et(i),r);return}for(var l in i)Ve.call(i,l)&&Mo(r,l,i[l])}),Jv=Ui(function(r,i){kn(i,qt(i),r)}),Ba=Ui(function(r,i,l,f){kn(i,qt(i),r,f)}),_4=Ui(function(r,i,l,f){kn(i,Et(i),r,f)}),T4=Xn(Fc);function w4(r,i){var l=zi(r);return i==null?l:Ay(l,i)}var S4=xe(function(r,i){r=Ke(r);var l=-1,f=i.length,m=f>2?i[2]:n;for(m&&zt(i[0],i[1],m)&&(f=1);++l<f;)for(var T=i[l],A=qt(T),I=-1,F=A.length;++I<F;){var V=A[I],G=r[V];(G===n||En(G,Ni[V])&&!Ve.call(r,V))&&(r[V]=T[V])}return r}),C4=xe(function(r){return r.push(n,dv),Rt(Zv,n,r)});function E4(r,i){return ly(r,he(i,3),Dn)}function x4(r,i){return ly(r,he(i,3),kc)}function A4(r,i){return r==null?r:Dc(r,he(i,3),qt)}function O4(r,i){return r==null?r:My(r,he(i,3),qt)}function I4(r,i){return r&&Dn(r,he(i,3))}function P4(r,i){return r&&kc(r,he(i,3))}function $4(r){return r==null?[]:ba(r,Et(r))}function M4(r){return r==null?[]:ba(r,qt(r))}function pf(r,i,l){var f=r==null?n:Rr(r,i);return f===n?l:f}function F4(r,i){return r!=null&&gv(r,i,nL)}function gf(r,i){return r!=null&&gv(r,i,rL)}var D4=av(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=sa.call(i)),r[i]=l},yf(Yt)),k4=av(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=sa.call(i)),Ve.call(r,i)?r[i].push(l):r[i]=[l]},he),N4=xe(Do);function Et(r){return Ht(r)?Ey(r):zc(r)}function qt(r){return Ht(r)?Ey(r,!0):hL(r)}function L4(r,i){var l={};return i=he(i,3),Dn(r,function(f,m,T){Zn(l,i(f,m,T),f)}),l}function B4(r,i){var l={};return i=he(i,3),Dn(r,function(f,m,T){Zn(l,m,i(f,m,T))}),l}var z4=Ui(function(r,i,l){_a(r,i,l)}),Zv=Ui(function(r,i,l,f){_a(r,i,l,f)}),U4=Xn(function(r,i){var l={};if(r==null)return l;var f=!1;i=nt(i,function(T){return T=Ar(T,r),f||(f=T.length>1),T}),kn(r,Qc(r),l),f&&(l=hn(l,g|_|C,DL));for(var m=i.length;m--;)Hc(l,i[m]);return l});function j4(r,i){return Rv(r,ka(he(i)))}var W4=Xn(function(r,i){return r==null?{}:gL(r,i)});function Rv(r,i){if(r==null)return{};var l=nt(Qc(r),function(f){return[f]});return i=he(i),Wy(r,l,function(f,m){return i(f,m[0])})}function V4(r,i,l){i=Ar(i,r);var f=-1,m=i.length;for(m||(m=1,r=n);++f<m;){var T=r==null?n:r[Nn(i[f])];T===n&&(f=m,T=l),r=er(T)?T.call(r):T}return r}function G4(r,i,l){return r==null?r:No(r,i,l)}function H4(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:No(r,i,l,f)}var Xv=cv(Et),Qv=cv(qt);function q4(r,i,l){var f=Te(r),m=f||Ir(r)||Vi(r);if(i=he(i,4),l==null){var T=r&&r.constructor;m?l=f?new T:[]:it(r)?l=er(T)?zi(ua(r)):{}:l={}}return(m?cn:Dn)(r,function(A,I,F){return i(l,A,I,F)}),l}function Y4(r,i){return r==null?!0:Hc(r,i)}function K4(r,i,l){return r==null?r:Yy(r,i,Kc(l))}function J4(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:Yy(r,i,Kc(l),f)}function Gi(r){return r==null?[]:xc(r,Et(r))}function Z4(r){return r==null?[]:xc(r,qt(r))}function R4(r,i,l){return l===n&&(l=i,i=n),l!==n&&(l=mn(l),l=l===l?l:0),i!==n&&(i=mn(i),i=i===i?i:0),Zr(mn(r),i,l)}function X4(r,i,l){return i=tr(i),l===n?(l=i,i=0):l=tr(l),r=mn(r),iL(r,i,l)}function Q4(r,i,l){if(l&&typeof l!="boolean"&&zt(r,i,l)&&(i=l=n),l===n&&(typeof i=="boolean"?(l=i,i=n):typeof r=="boolean"&&(l=r,r=n)),r===n&&i===n?(r=0,i=1):(r=tr(r),i===n?(i=r,r=0):i=tr(i)),r>i){var f=r;r=i,i=f}if(l||r%1||i%1){var m=Sy();return $t(r+m*(i-r+$k("1e-"+((m+"").length-1))),i)}return Wc(r,i)}var eB=ji(function(r,i,l){return i=i.toLowerCase(),r+(l?eb(i):i)});function eb(r){return mf(je(r).toLowerCase())}function tb(r){return r=je(r),r&&r.replace(le,Gk).replace(Tk,"")}function tB(r,i,l){r=je(r),i=Qt(i);var f=r.length;l=l===n?f:Zr(Se(l),0,f);var m=l;return l-=i.length,l>=0&&r.slice(l,m)==i}function nB(r){return r=je(r),r&&uc.test(r)?r.replace(br,Hk):r}function rB(r){return r=je(r),r&&cc.test(r)?r.replace(Ii,"\\$&"):r}var iB=ji(function(r,i,l){return r+(l?"-":"")+i.toLowerCase()}),oB=ji(function(r,i,l){return r+(l?" ":"")+i.toLowerCase()}),sB=iv("toLowerCase");function aB(r,i,l){r=je(r),i=Se(i);var f=i?Di(r):0;if(!i||f>=i)return r;var m=(i-f)/2;return xa(ha(m),l)+r+xa(da(m),l)}function lB(r,i,l){r=je(r),i=Se(i);var f=i?Di(r):0;return i&&f<i?r+xa(i-f,l):r}function uB(r,i,l){r=je(r),i=Se(i);var f=i?Di(r):0;return i&&f<i?xa(i-f,l)+r:r}function cB(r,i,l){return l||i==null?i=0:i&&(i=+i),yN(je(r).replace(Vt,""),i||0)}function fB(r,i,l){return(l?zt(r,i,l):i===n)?i=1:i=Se(i),Vc(je(r),i)}function dB(){var r=arguments,i=je(r[0]);return r.length<3?i:i.replace(r[1],r[2])}var hB=ji(function(r,i,l){return r+(l?"_":"")+i.toLowerCase()});function pB(r,i,l){return l&&typeof l!="number"&&zt(r,i,l)&&(i=l=n),l=l===n?Y:l>>>0,l?(r=je(r),r&&(typeof i=="string"||i!=null&&!hf(i))&&(i=Qt(i),!i&&Fi(r))?Or(Sn(r),0,l):r.split(i,l)):[]}var gB=ji(function(r,i,l){return r+(l?" ":"")+mf(i)});function mB(r,i,l){return r=je(r),l=l==null?0:Zr(Se(l),0,r.length),i=Qt(i),r.slice(l,l+i.length)==i}function yB(r,i,l){var f=b.templateSettings;l&&zt(r,i,l)&&(i=n),r=je(r),i=Ba({},i,f,fv);var m=Ba({},i.imports,f.imports,fv),T=Et(m),A=xc(m,T),I,F,V=0,G=i.interpolate||We,J="__p += '",re=Oc((i.escape||We).source+"|"+G.source+"|"+(G===Gs?Rs:We).source+"|"+(i.evaluate||We).source+"|$","g"),ce="//# sourceURL="+(Ve.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xk+"]")+`
|
|
140
|
-
`;r.replace(
|
|
139
|
+
`)}function KL(r){return Se(r)||Xr(r)||!!(wy&&r&&r[wy])}function Xn(r,i){var l=typeof r;return i=i??De,!!i&&(l=="number"||l!="symbol"&&Z.test(r))&&r>-1&&r%1==0&&r<i}function Bt(r,i,l){if(!it(l))return!1;var f=typeof i;return(f=="number"?Gt(l)&&Xn(i,l.length):f=="string"&&i in l)?Cn(l[i],r):!1}function cf(r,i){if(Se(r))return!1;var l=typeof r;return l=="number"||l=="symbol"||l=="boolean"||r==null||Qt(r)?!0:vo.test(r)||!Ys.test(r)||i!=null&&r in Re(i)}function JL(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}function ff(r){var i=Pa(r),l=v[i];if(typeof l!="function"||!(i in $e.prototype))return!1;if(r===l)return!0;var f=af(l);return!!f&&r===f[0]}function RL(r){return!!yy&&yy in r}var ZL=sa?Qn:Of;function Do(r){var i=r&&r.constructor,l=typeof i=="function"&&i.prototype||Fi;return r===l}function yv(r){return r===r&&!it(r)}function vv(r,i){return function(l){return l==null?!1:l[r]===i&&(i!==n||r in Re(l))}}function XL(r){var i=Na(r,function(f){return l.size===p&&l.clear(),f}),l=i.cache;return i}function QL(r,i){var l=r[1],f=i[1],m=l|f,w=m<(P|N|J),A=f==J&&l==W||f==J&&l==le&&r[7].length<=i[8]||f==(J|le)&&i[7].length<=i[8]&&l==W;if(!(w||A))return r;f&P&&(r[2]=i[2],m|=l&P?0:X);var I=i[3];if(I){var F=r[3];r[3]=F?ev(F,I,i[4]):I,r[4]=F?Tr(r[3],y):i[4]}return I=i[5],I&&(F=r[5],r[5]=F?tv(F,I,i[6]):I,r[6]=F?Tr(r[5],y):i[6]),I=i[7],I&&(r[7]=I),f&J&&(r[8]=r[8]==null?i[8]:Pt(r[8],i[8])),r[9]==null&&(r[9]=i[9]),r[0]=i[0],r[1]=m,r}function e5(r){var i=[];if(r!=null)for(var l in Re(r))i.push(l);return i}function t5(r){return la.call(r)}function bv(r,i,l){return i=bt(i===n?r.length-1:i,0),function(){for(var f=arguments,m=-1,w=bt(f.length-i,0),A=B(w);++m<w;)A[m]=f[i+m];m=-1;for(var I=B(i+1);++m<i;)I[m]=f[m];return I[i]=l(A),Rt(r,this,I)}}function _v(r,i){return i.length<2?r:Jr(r,hn(i,0,-1))}function n5(r,i){for(var l=r.length,f=Pt(i.length,l),m=Vt(r);f--;){var w=i[f];r[f]=Xn(w,l)?m[w]:n}return r}function df(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}var wv=Sv(Gy),No=yN||function(r,i){return xt.setTimeout(r,i)},hf=Sv(EL);function Tv(r,i,l){var f=i+"";return hf(r,YL(f,r5(GL(f),l)))}function Sv(r){var i=0,l=0;return function(){var f=wN(),m=ce-(f-l);if(l=f,m>0){if(++i>=re)return arguments[0]}else i=0;return r.apply(n,arguments)}}function Ma(r,i){var l=-1,f=r.length,m=f-1;for(i=i===n?f:i;++l<i;){var w=Kc(l,m),A=r[w];r[w]=r[l],r[l]=A}return r.length=i,r}var Cv=XL(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(Ks,function(l,f,m,w){i.push(m?w.replace(Xs,"$1"):f||l)}),i});function Ln(r){if(typeof r=="string"||Qt(r))return r;var i=r+"";return i=="0"&&1/r==-1/0?"-0":i}function Zr(r){if(r!=null){try{return aa.call(r)}catch{}try{return r+""}catch{}}return""}function r5(r,i){return un(q,function(l){var f="_."+l[0];i&l[1]&&!na(r,f)&&r.push(f)}),r.sort()}function Ev(r){if(r instanceof $e)return r.clone();var i=new fn(r.__wrapped__,r.__chain__);return i.__actions__=Vt(r.__actions__),i.__index__=r.__index__,i.__values__=r.__values__,i}function i5(r,i,l){(l?Bt(r,i,l):i===n)?i=1:i=bt(Ce(i),0);var f=r==null?0:r.length;if(!f||i<1)return[];for(var m=0,w=0,A=B(pa(f/i));m<f;)A[w++]=hn(r,m,m+=i);return A}function o5(r){for(var i=-1,l=r==null?0:r.length,f=0,m=[];++i<l;){var w=r[i];w&&(m[f++]=w)}return m}function s5(){var r=arguments.length;if(!r)return[];for(var i=B(r-1),l=arguments[0],f=r;f--;)i[f-1]=arguments[f];return wr(Se(l)?Vt(l):[l],At(i,1))}var a5=Ae(function(r,i){return dt(r)?Po(r,At(i,1,dt,!0)):[]}),l5=Ae(function(r,i){var l=pn(i);return dt(l)&&(l=n),dt(r)?Po(r,At(i,1,dt,!0),pe(l,2)):[]}),u5=Ae(function(r,i){var l=pn(i);return dt(l)&&(l=n),dt(r)?Po(r,At(i,1,dt,!0),n,l):[]});function c5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Ce(i),hn(r,i<0?0:i,f)):[]}function f5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Ce(i),i=f-i,hn(r,0,i<0?0:i)):[]}function d5(r,i){return r&&r.length?Ca(r,pe(i,3),!0,!0):[]}function h5(r,i){return r&&r.length?Ca(r,pe(i,3),!0):[]}function p5(r,i,l,f){var m=r==null?0:r.length;return m?(l&&typeof l!="number"&&Bt(r,i,l)&&(l=0,f=m),sL(r,i,l,f)):[]}function xv(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Ce(l);return m<0&&(m=bt(f+m,0)),ra(r,pe(i,3),m)}function Av(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f-1;return l!==n&&(m=Ce(l),m=l<0?bt(f+m,0):Pt(m,f-1)),ra(r,pe(i,3),m,!0)}function Ov(r){var i=r==null?0:r.length;return i?At(r,1):[]}function g5(r){var i=r==null?0:r.length;return i?At(r,ke):[]}function m5(r,i){var l=r==null?0:r.length;return l?(i=i===n?1:Ce(i),At(r,i)):[]}function y5(r){for(var i=-1,l=r==null?0:r.length,f={};++i<l;){var m=r[i];f[m[0]]=m[1]}return f}function Iv(r){return r&&r.length?r[0]:n}function v5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=l==null?0:Ce(l);return m<0&&(m=bt(f+m,0)),Ii(r,i,m)}function b5(r){var i=r==null?0:r.length;return i?hn(r,0,-1):[]}var _5=Ae(function(r){var i=nt(r,Qc);return i.length&&i[0]===r[0]?Vc(i):[]}),w5=Ae(function(r){var i=pn(r),l=nt(r,Qc);return i===pn(l)?i=n:l.pop(),l.length&&l[0]===r[0]?Vc(l,pe(i,2)):[]}),T5=Ae(function(r){var i=pn(r),l=nt(r,Qc);return i=typeof i=="function"?i:n,i&&l.pop(),l.length&&l[0]===r[0]?Vc(l,n,i):[]});function S5(r,i){return r==null?"":bN.call(r,i)}function pn(r){var i=r==null?0:r.length;return i?r[i-1]:n}function C5(r,i,l){var f=r==null?0:r.length;if(!f)return-1;var m=f;return l!==n&&(m=Ce(l),m=m<0?bt(f+m,0):Pt(m,f-1)),i===i?rN(r,i,m):ra(r,uy,m,!0)}function E5(r,i){return r&&r.length?Uy(r,Ce(i)):n}var x5=Ae(Pv);function Pv(r,i){return r&&r.length&&i&&i.length?Yc(r,i):r}function A5(r,i,l){return r&&r.length&&i&&i.length?Yc(r,i,pe(l,2)):r}function O5(r,i,l){return r&&r.length&&i&&i.length?Yc(r,i,n,l):r}var I5=Zn(function(r,i){var l=r==null?0:r.length,f=zc(r,i);return Vy(r,nt(i,function(m){return Xn(m,l)?+m:m}).sort(Qy)),f});function P5(r,i){var l=[];if(!(r&&r.length))return l;var f=-1,m=[],w=r.length;for(i=pe(i,3);++f<w;){var A=r[f];i(A,f,r)&&(l.push(A),m.push(f))}return Vy(r,m),l}function pf(r){return r==null?r:SN.call(r)}function $5(r,i,l){var f=r==null?0:r.length;return f?(l&&typeof l!="number"&&Bt(r,i,l)?(i=0,l=f):(i=i==null?0:Ce(i),l=l===n?f:Ce(l)),hn(r,i,l)):[]}function M5(r,i){return Sa(r,i)}function F5(r,i,l){return Rc(r,i,pe(l,2))}function k5(r,i){var l=r==null?0:r.length;if(l){var f=Sa(r,i);if(f<l&&Cn(r[f],i))return f}return-1}function D5(r,i){return Sa(r,i,!0)}function N5(r,i,l){return Rc(r,i,pe(l,2),!0)}function L5(r,i){var l=r==null?0:r.length;if(l){var f=Sa(r,i,!0)-1;if(Cn(r[f],i))return f}return-1}function B5(r){return r&&r.length?Hy(r):[]}function z5(r,i){return r&&r.length?Hy(r,pe(i,2)):[]}function U5(r){var i=r==null?0:r.length;return i?hn(r,1,i):[]}function j5(r,i,l){return r&&r.length?(i=l||i===n?1:Ce(i),hn(r,0,i<0?0:i)):[]}function W5(r,i,l){var f=r==null?0:r.length;return f?(i=l||i===n?1:Ce(i),i=f-i,hn(r,i<0?0:i,f)):[]}function V5(r,i){return r&&r.length?Ca(r,pe(i,3),!1,!0):[]}function G5(r,i){return r&&r.length?Ca(r,pe(i,3)):[]}var H5=Ae(function(r){return Er(At(r,1,dt,!0))}),q5=Ae(function(r){var i=pn(r);return dt(i)&&(i=n),Er(At(r,1,dt,!0),pe(i,2))}),Y5=Ae(function(r){var i=pn(r);return i=typeof i=="function"?i:n,Er(At(r,1,dt,!0),n,i)});function K5(r){return r&&r.length?Er(r):[]}function J5(r,i){return r&&r.length?Er(r,pe(i,2)):[]}function R5(r,i){return i=typeof i=="function"?i:n,r&&r.length?Er(r,n,i):[]}function gf(r){if(!(r&&r.length))return[];var i=0;return r=_r(r,function(l){if(dt(l))return i=bt(l.length,i),!0}),$c(i,function(l){return nt(r,Oc(l))})}function $v(r,i){if(!(r&&r.length))return[];var l=gf(r);return i==null?l:nt(l,function(f){return Rt(i,n,f)})}var Z5=Ae(function(r,i){return dt(r)?Po(r,i):[]}),X5=Ae(function(r){return Xc(_r(r,dt))}),Q5=Ae(function(r){var i=pn(r);return dt(i)&&(i=n),Xc(_r(r,dt),pe(i,2))}),e3=Ae(function(r){var i=pn(r);return i=typeof i=="function"?i:n,Xc(_r(r,dt),n,i)}),t3=Ae(gf);function n3(r,i){return Jy(r||[],i||[],Io)}function r3(r,i){return Jy(r||[],i||[],Fo)}var i3=Ae(function(r){var i=r.length,l=i>1?r[i-1]:n;return l=typeof l=="function"?(r.pop(),l):n,$v(r,l)});function Mv(r){var i=v(r);return i.__chain__=!0,i}function o3(r,i){return i(r),r}function Fa(r,i){return i(r)}var s3=Zn(function(r){var i=r.length,l=i?r[0]:0,f=this.__wrapped__,m=function(w){return zc(w,r)};return i>1||this.__actions__.length||!(f instanceof $e)||!Xn(l)?this.thru(m):(f=f.slice(l,+l+(i?1:0)),f.__actions__.push({func:Fa,args:[m],thisArg:n}),new fn(f,this.__chain__).thru(function(w){return i&&!w.length&&w.push(n),w}))});function a3(){return Mv(this)}function l3(){return new fn(this.value(),this.__chain__)}function u3(){this.__values__===n&&(this.__values__=qv(this.value()));var r=this.__index__>=this.__values__.length,i=r?n:this.__values__[this.__index__++];return{done:r,value:i}}function c3(){return this}function f3(r){for(var i,l=this;l instanceof va;){var f=Ev(l);f.__index__=0,f.__values__=n,i?m.__wrapped__=f:i=f;var m=f;l=l.__wrapped__}return m.__wrapped__=r,i}function d3(){var r=this.__wrapped__;if(r instanceof $e){var i=r;return this.__actions__.length&&(i=new $e(this)),i=i.reverse(),i.__actions__.push({func:Fa,args:[pf],thisArg:n}),new fn(i,this.__chain__)}return this.thru(pf)}function h3(){return Ky(this.__wrapped__,this.__actions__)}var p3=Ea(function(r,i,l){Ve.call(r,l)?++r[l]:Jn(r,l,1)});function g3(r,i,l){var f=Se(r)?ay:oL;return l&&Bt(r,i,l)&&(i=n),f(r,pe(i,3))}function m3(r,i){var l=Se(r)?_r:$y;return l(r,pe(i,3))}var y3=ov(xv),v3=ov(Av);function b3(r,i){return At(ka(r,i),1)}function _3(r,i){return At(ka(r,i),ke)}function w3(r,i,l){return l=l===n?1:Ce(l),At(ka(r,i),l)}function Fv(r,i){var l=Se(r)?un:Cr;return l(r,pe(i,3))}function kv(r,i){var l=Se(r)?UD:Py;return l(r,pe(i,3))}var T3=Ea(function(r,i,l){Ve.call(r,l)?r[l].push(i):Jn(r,l,[i])});function S3(r,i,l,f){r=Gt(r)?r:ji(r),l=l&&!f?Ce(l):0;var m=r.length;return l<0&&(l=bt(m+l,0)),za(r)?l<=m&&r.indexOf(i,l)>-1:!!m&&Ii(r,i,l)>-1}var C3=Ae(function(r,i,l){var f=-1,m=typeof i=="function",w=Gt(r)?B(r.length):[];return Cr(r,function(A){w[++f]=m?Rt(i,A,l):$o(A,i,l)}),w}),E3=Ea(function(r,i,l){Jn(r,l,i)});function ka(r,i){var l=Se(r)?nt:Ly;return l(r,pe(i,3))}function x3(r,i,l,f){return r==null?[]:(Se(i)||(i=i==null?[]:[i]),l=f?n:l,Se(l)||(l=l==null?[]:[l]),jy(r,i,l))}var A3=Ea(function(r,i,l){r[l?0:1].push(i)},function(){return[[],[]]});function O3(r,i,l){var f=Se(r)?xc:fy,m=arguments.length<3;return f(r,pe(i,4),l,m,Cr)}function I3(r,i,l){var f=Se(r)?jD:fy,m=arguments.length<3;return f(r,pe(i,4),l,m,Py)}function P3(r,i){var l=Se(r)?_r:$y;return l(r,La(pe(i,3)))}function $3(r){var i=Se(r)?xy:SL;return i(r)}function M3(r,i,l){(l?Bt(r,i,l):i===n)?i=1:i=Ce(i);var f=Se(r)?eL:CL;return f(r,i)}function F3(r){var i=Se(r)?tL:xL;return i(r)}function k3(r){if(r==null)return 0;if(Gt(r))return za(r)?$i(r):r.length;var i=$t(r);return i==Je||i==jt?r.size:Hc(r).length}function D3(r,i,l){var f=Se(r)?Ac:AL;return l&&Bt(r,i,l)&&(i=n),f(r,pe(i,3))}var N3=Ae(function(r,i){if(r==null)return[];var l=i.length;return l>1&&Bt(r,i[0],i[1])?i=[]:l>2&&Bt(i[0],i[1],i[2])&&(i=[i[0]]),jy(r,At(i,1),[])}),Da=mN||function(){return xt.Date.now()};function L3(r,i){if(typeof i!="function")throw new cn(u);return r=Ce(r),function(){if(--r<1)return i.apply(this,arguments)}}function Dv(r,i,l){return i=l?n:i,i=r&&i==null?r.length:i,Rn(r,J,n,n,n,n,i)}function Nv(r,i){var l;if(typeof i!="function")throw new cn(u);return r=Ce(r),function(){return--r>0&&(l=i.apply(this,arguments)),r<=1&&(i=n),l}}var mf=Ae(function(r,i,l){var f=P;if(l.length){var m=Tr(l,zi(mf));f|=k}return Rn(r,f,i,l,m)}),Lv=Ae(function(r,i,l){var f=P|N;if(l.length){var m=Tr(l,zi(Lv));f|=k}return Rn(i,f,r,l,m)});function Bv(r,i,l){i=l?n:i;var f=Rn(r,W,n,n,n,n,n,i);return f.placeholder=Bv.placeholder,f}function zv(r,i,l){i=l?n:i;var f=Rn(r,D,n,n,n,n,n,i);return f.placeholder=zv.placeholder,f}function Uv(r,i,l){var f,m,w,A,I,F,V=0,G=!1,R=!1,ie=!0;if(typeof r!="function")throw new cn(u);i=gn(i)||0,it(l)&&(G=!!l.leading,R="maxWait"in l,w=R?bt(gn(l.maxWait)||0,i):w,ie="trailing"in l?!!l.trailing:ie);function ue(ht){var En=f,tr=m;return f=m=n,V=ht,A=r.apply(tr,En),A}function ye(ht){return V=ht,I=No(Pe,i),G?ue(ht):A}function Ee(ht){var En=ht-F,tr=ht-V,ob=i-En;return R?Pt(ob,w-tr):ob}function ve(ht){var En=ht-F,tr=ht-V;return F===n||En>=i||En<0||R&&tr>=w}function Pe(){var ht=Da();if(ve(ht))return Me(ht);I=No(Pe,Ee(ht))}function Me(ht){return I=n,ie&&f?ue(ht):(f=m=n,A)}function en(){I!==n&&Ry(I),V=0,f=F=m=I=n}function zt(){return I===n?A:Me(Da())}function tn(){var ht=Da(),En=ve(ht);if(f=arguments,m=this,F=ht,En){if(I===n)return ye(F);if(R)return Ry(I),I=No(Pe,i),ue(F)}return I===n&&(I=No(Pe,i)),A}return tn.cancel=en,tn.flush=zt,tn}var B3=Ae(function(r,i){return Iy(r,1,i)}),z3=Ae(function(r,i,l){return Iy(r,gn(i)||0,l)});function U3(r){return Rn(r,ne)}function Na(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new cn(u);var l=function(){var f=arguments,m=i?i.apply(this,f):f[0],w=l.cache;if(w.has(m))return w.get(m);var A=r.apply(this,f);return l.cache=w.set(m,A)||w,A};return l.cache=new(Na.Cache||Kn),l}Na.Cache=Kn;function La(r){if(typeof r!="function")throw new cn(u);return function(){var i=arguments;switch(i.length){case 0:return!r.call(this);case 1:return!r.call(this,i[0]);case 2:return!r.call(this,i[0],i[1]);case 3:return!r.call(this,i[0],i[1],i[2])}return!r.apply(this,i)}}function j3(r){return Nv(2,r)}var W3=OL(function(r,i){i=i.length==1&&Se(i[0])?nt(i[0],Zt(pe())):nt(At(i,1),Zt(pe()));var l=i.length;return Ae(function(f){for(var m=-1,w=Pt(f.length,l);++m<w;)f[m]=i[m].call(this,f[m]);return Rt(r,this,f)})}),yf=Ae(function(r,i){var l=Tr(i,zi(yf));return Rn(r,k,n,i,l)}),jv=Ae(function(r,i){var l=Tr(i,zi(jv));return Rn(r,L,n,i,l)}),V3=Zn(function(r,i){return Rn(r,le,n,n,n,i)});function G3(r,i){if(typeof r!="function")throw new cn(u);return i=i===n?i:Ce(i),Ae(r,i)}function H3(r,i){if(typeof r!="function")throw new cn(u);return i=i==null?0:bt(Ce(i),0),Ae(function(l){var f=l[i],m=Ar(l,0,i);return f&&wr(m,f),Rt(r,this,m)})}function q3(r,i,l){var f=!0,m=!0;if(typeof r!="function")throw new cn(u);return it(l)&&(f="leading"in l?!!l.leading:f,m="trailing"in l?!!l.trailing:m),Uv(r,i,{leading:f,maxWait:i,trailing:m})}function Y3(r){return Dv(r,1)}function K3(r,i){return yf(ef(i),r)}function J3(){if(!arguments.length)return[];var r=arguments[0];return Se(r)?r:[r]}function R3(r){return dn(r,C)}function Z3(r,i){return i=typeof i=="function"?i:n,dn(r,C,i)}function X3(r){return dn(r,g|C)}function Q3(r,i){return i=typeof i=="function"?i:n,dn(r,g|C,i)}function e4(r,i){return i==null||Oy(r,i,Ct(i))}function Cn(r,i){return r===i||r!==r&&i!==i}var t4=Ia(Wc),n4=Ia(function(r,i){return r>=i}),Xr=ky(function(){return arguments}())?ky:function(r){return ut(r)&&Ve.call(r,"callee")&&!_y.call(r,"callee")},Se=B.isArray,r4=ty?Zt(ty):fL;function Gt(r){return r!=null&&Ba(r.length)&&!Qn(r)}function dt(r){return ut(r)&&Gt(r)}function i4(r){return r===!0||r===!1||ut(r)&&Lt(r)==be}var Or=vN||Of,o4=ny?Zt(ny):dL;function s4(r){return ut(r)&&r.nodeType===1&&!Lo(r)}function a4(r){if(r==null)return!0;if(Gt(r)&&(Se(r)||typeof r=="string"||typeof r.splice=="function"||Or(r)||Ui(r)||Xr(r)))return!r.length;var i=$t(r);if(i==Je||i==jt)return!r.size;if(Do(r))return!Hc(r).length;for(var l in r)if(Ve.call(r,l))return!1;return!0}function l4(r,i){return Mo(r,i)}function u4(r,i,l){l=typeof l=="function"?l:n;var f=l?l(r,i):n;return f===n?Mo(r,i,n,l):!!f}function vf(r){if(!ut(r))return!1;var i=Lt(r);return i==qe||i==xe||typeof r.message=="string"&&typeof r.name=="string"&&!Lo(r)}function c4(r){return typeof r=="number"&&Ty(r)}function Qn(r){if(!it(r))return!1;var i=Lt(r);return i==te||i==yt||i==fe||i==wi}function Wv(r){return typeof r=="number"&&r==Ce(r)}function Ba(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=De}function it(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}function ut(r){return r!=null&&typeof r=="object"}var Vv=ry?Zt(ry):pL;function f4(r,i){return r===i||Gc(r,i,lf(i))}function d4(r,i,l){return l=typeof l=="function"?l:n,Gc(r,i,lf(i),l)}function h4(r){return Gv(r)&&r!=+r}function p4(r){if(ZL(r))throw new we(a);return Dy(r)}function g4(r){return r===null}function m4(r){return r==null}function Gv(r){return typeof r=="number"||ut(r)&&Lt(r)==Nt}function Lo(r){if(!ut(r)||Lt(r)!=Te)return!1;var i=fa(r);if(i===null)return!0;var l=Ve.call(i,"constructor")&&i.constructor;return typeof l=="function"&&l instanceof l&&aa.call(l)==dN}var bf=iy?Zt(iy):gL;function y4(r){return Wv(r)&&r>=-9007199254740991&&r<=De}var Hv=oy?Zt(oy):mL;function za(r){return typeof r=="string"||!Se(r)&&ut(r)&&Lt(r)==Br}function Qt(r){return typeof r=="symbol"||ut(r)&&Lt(r)==hr}var Ui=sy?Zt(sy):yL;function v4(r){return r===n}function b4(r){return ut(r)&&$t(r)==sn}function _4(r){return ut(r)&&Lt(r)==pr}var w4=Ia(qc),T4=Ia(function(r,i){return r<=i});function qv(r){if(!r)return[];if(Gt(r))return za(r)?Tn(r):Vt(r);if(Co&&r[Co])return eN(r[Co]());var i=$t(r),l=i==Je?Fc:i==jt?ia:ji;return l(r)}function er(r){if(!r)return r===0?r:0;if(r=gn(r),r===ke||r===-1/0){var i=r<0?-1:1;return i*mt}return r===r?r:0}function Ce(r){var i=er(r),l=i%1;return i===i?l?i-l:i:0}function Yv(r){return r?Kr(Ce(r),0,Y):0}function gn(r){if(typeof r=="number")return r;if(Qt(r))return K;if(it(r)){var i=typeof r.valueOf=="function"?r.valueOf():r;r=it(i)?i+"":i}if(typeof r!="string")return r===0?r:+r;r=dy(r);var l=yc.test(r);return l||$.test(r)?LD(r.slice(2),l?2:8):ea.test(r)?K:+r}function Kv(r){return Nn(r,Ht(r))}function S4(r){return r?Kr(Ce(r),-9007199254740991,De):r===0?r:0}function je(r){return r==null?"":Xt(r)}var C4=Li(function(r,i){if(Do(i)||Gt(i)){Nn(i,Ct(i),r);return}for(var l in i)Ve.call(i,l)&&Io(r,l,i[l])}),Jv=Li(function(r,i){Nn(i,Ht(i),r)}),Ua=Li(function(r,i,l,f){Nn(i,Ht(i),r,f)}),E4=Li(function(r,i,l,f){Nn(i,Ct(i),r,f)}),x4=Zn(zc);function A4(r,i){var l=Ni(r);return i==null?l:Ay(l,i)}var O4=Ae(function(r,i){r=Re(r);var l=-1,f=i.length,m=f>2?i[2]:n;for(m&&Bt(i[0],i[1],m)&&(f=1);++l<f;)for(var w=i[l],A=Ht(w),I=-1,F=A.length;++I<F;){var V=A[I],G=r[V];(G===n||Cn(G,Fi[V])&&!Ve.call(r,V))&&(r[V]=w[V])}return r}),I4=Ae(function(r){return r.push(n,dv),Rt(Rv,n,r)});function P4(r,i){return ly(r,pe(i,3),Dn)}function $4(r,i){return ly(r,pe(i,3),jc)}function M4(r,i){return r==null?r:Uc(r,pe(i,3),Ht)}function F4(r,i){return r==null?r:My(r,pe(i,3),Ht)}function k4(r,i){return r&&Dn(r,pe(i,3))}function D4(r,i){return r&&jc(r,pe(i,3))}function N4(r){return r==null?[]:wa(r,Ct(r))}function L4(r){return r==null?[]:wa(r,Ht(r))}function _f(r,i,l){var f=r==null?n:Jr(r,i);return f===n?l:f}function B4(r,i){return r!=null&&gv(r,i,aL)}function wf(r,i){return r!=null&&gv(r,i,lL)}var z4=av(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=la.call(i)),r[i]=l},Sf(qt)),U4=av(function(r,i,l){i!=null&&typeof i.toString!="function"&&(i=la.call(i)),Ve.call(r,i)?r[i].push(l):r[i]=[l]},pe),j4=Ae($o);function Ct(r){return Gt(r)?Ey(r):Hc(r)}function Ht(r){return Gt(r)?Ey(r,!0):vL(r)}function W4(r,i){var l={};return i=pe(i,3),Dn(r,function(f,m,w){Jn(l,i(f,m,w),f)}),l}function V4(r,i){var l={};return i=pe(i,3),Dn(r,function(f,m,w){Jn(l,m,i(f,m,w))}),l}var G4=Li(function(r,i,l){Ta(r,i,l)}),Rv=Li(function(r,i,l,f){Ta(r,i,l,f)}),H4=Zn(function(r,i){var l={};if(r==null)return l;var f=!1;i=nt(i,function(w){return w=xr(w,r),f||(f=w.length>1),w}),Nn(r,sf(r),l),f&&(l=dn(l,g|_|C,zL));for(var m=i.length;m--;)Zc(l,i[m]);return l});function q4(r,i){return Zv(r,La(pe(i)))}var Y4=Zn(function(r,i){return r==null?{}:_L(r,i)});function Zv(r,i){if(r==null)return{};var l=nt(sf(r),function(f){return[f]});return i=pe(i),Wy(r,l,function(f,m){return i(f,m[0])})}function K4(r,i,l){i=xr(i,r);var f=-1,m=i.length;for(m||(m=1,r=n);++f<m;){var w=r==null?n:r[Ln(i[f])];w===n&&(f=m,w=l),r=Qn(w)?w.call(r):w}return r}function J4(r,i,l){return r==null?r:Fo(r,i,l)}function R4(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:Fo(r,i,l,f)}var Xv=cv(Ct),Qv=cv(Ht);function Z4(r,i,l){var f=Se(r),m=f||Or(r)||Ui(r);if(i=pe(i,4),l==null){var w=r&&r.constructor;m?l=f?new w:[]:it(r)?l=Qn(w)?Ni(fa(r)):{}:l={}}return(m?un:Dn)(r,function(A,I,F){return i(l,A,I,F)}),l}function X4(r,i){return r==null?!0:Zc(r,i)}function Q4(r,i,l){return r==null?r:Yy(r,i,ef(l))}function eB(r,i,l,f){return f=typeof f=="function"?f:n,r==null?r:Yy(r,i,ef(l),f)}function ji(r){return r==null?[]:Mc(r,Ct(r))}function tB(r){return r==null?[]:Mc(r,Ht(r))}function nB(r,i,l){return l===n&&(l=i,i=n),l!==n&&(l=gn(l),l=l===l?l:0),i!==n&&(i=gn(i),i=i===i?i:0),Kr(gn(r),i,l)}function rB(r,i,l){return i=er(i),l===n?(l=i,i=0):l=er(l),r=gn(r),uL(r,i,l)}function iB(r,i,l){if(l&&typeof l!="boolean"&&Bt(r,i,l)&&(i=l=n),l===n&&(typeof i=="boolean"?(l=i,i=n):typeof r=="boolean"&&(l=r,r=n)),r===n&&i===n?(r=0,i=1):(r=er(r),i===n?(i=r,r=0):i=er(i)),r>i){var f=r;r=i,i=f}if(l||r%1||i%1){var m=Sy();return Pt(r+m*(i-r+ND("1e-"+((m+"").length-1))),i)}return Kc(r,i)}var oB=Bi(function(r,i,l){return i=i.toLowerCase(),r+(l?eb(i):i)});function eb(r){return Tf(je(r).toLowerCase())}function tb(r){return r=je(r),r&&r.replace(se,JD).replace(xD,"")}function sB(r,i,l){r=je(r),i=Xt(i);var f=r.length;l=l===n?f:Kr(Ce(l),0,f);var m=l;return l-=i.length,l>=0&&r.slice(l,m)==i}function aB(r){return r=je(r),r&&gc.test(r)?r.replace(vr,RD):r}function lB(r){return r=je(r),r&&mc.test(r)?r.replace(xi,"\\$&"):r}var uB=Bi(function(r,i,l){return r+(l?"-":"")+i.toLowerCase()}),cB=Bi(function(r,i,l){return r+(l?" ":"")+i.toLowerCase()}),fB=iv("toLowerCase");function dB(r,i,l){r=je(r),i=Ce(i);var f=i?$i(r):0;if(!i||f>=i)return r;var m=(i-f)/2;return Oa(ga(m),l)+r+Oa(pa(m),l)}function hB(r,i,l){r=je(r),i=Ce(i);var f=i?$i(r):0;return i&&f<i?r+Oa(i-f,l):r}function pB(r,i,l){r=je(r),i=Ce(i);var f=i?$i(r):0;return i&&f<i?Oa(i-f,l)+r:r}function gB(r,i,l){return l||i==null?i=0:i&&(i=+i),TN(je(r).replace(Wt,""),i||0)}function mB(r,i,l){return(l?Bt(r,i,l):i===n)?i=1:i=Ce(i),Jc(je(r),i)}function yB(){var r=arguments,i=je(r[0]);return r.length<3?i:i.replace(r[1],r[2])}var vB=Bi(function(r,i,l){return r+(l?"_":"")+i.toLowerCase()});function bB(r,i,l){return l&&typeof l!="number"&&Bt(r,i,l)&&(i=l=n),l=l===n?Y:l>>>0,l?(r=je(r),r&&(typeof i=="string"||i!=null&&!bf(i))&&(i=Xt(i),!i&&Pi(r))?Ar(Tn(r),0,l):r.split(i,l)):[]}var _B=Bi(function(r,i,l){return r+(l?" ":"")+Tf(i)});function wB(r,i,l){return r=je(r),l=l==null?0:Kr(Ce(l),0,r.length),i=Xt(i),r.slice(l,l+i.length)==i}function TB(r,i,l){var f=v.templateSettings;l&&Bt(r,i,l)&&(i=n),r=je(r),i=Ua({},i,f,fv);var m=Ua({},i.imports,f.imports,fv),w=Ct(m),A=Mc(m,w),I,F,V=0,G=i.interpolate||We,R="__p += '",ie=kc((i.escape||We).source+"|"+G.source+"|"+(G===qs?Qs:We).source+"|"+(i.evaluate||We).source+"|$","g"),ue="//# sourceURL="+(Ve.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$D+"]")+`
|
|
140
|
+
`;r.replace(ie,function(ve,Pe,Me,en,zt,tn){return Me||(Me=en),R+=r.slice(V,tn).replace(Tt,ZD),Pe&&(I=!0,R+=`' +
|
|
141
141
|
__e(`+Pe+`) +
|
|
142
|
-
'`),
|
|
143
|
-
`+
|
|
144
|
-
__p += '`),
|
|
145
|
-
((__t = (`+
|
|
146
|
-
'`),V=
|
|
147
|
-
`;var
|
|
148
|
-
`+
|
|
142
|
+
'`),zt&&(F=!0,R+=`';
|
|
143
|
+
`+zt+`;
|
|
144
|
+
__p += '`),Me&&(R+=`' +
|
|
145
|
+
((__t = (`+Me+`)) == null ? '' : __t) +
|
|
146
|
+
'`),V=tn+ve.length,ve}),R+=`';
|
|
147
|
+
`;var ye=Ve.call(i,"variable")&&i.variable;if(!ye)R=`with (obj) {
|
|
148
|
+
`+R+`
|
|
149
149
|
}
|
|
150
|
-
`;else if(wn.test(
|
|
151
|
-
`+(
|
|
150
|
+
`;else if(wn.test(ye))throw new we(c);R=(F?R.replace(hc,""):R).replace(Ci,"$1").replace(Ei,"$1;"),R="function("+(ye||"obj")+`) {
|
|
151
|
+
`+(ye?"":`obj || (obj = {});
|
|
152
152
|
`)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(F?`, __j = Array.prototype.join;
|
|
153
153
|
function print() { __p += __j.call(arguments, '') }
|
|
154
154
|
`:`;
|
|
155
|
-
`)+
|
|
156
|
-
}`;var Ee=rb(function(){return Be(T,ce+"return "+J).apply(n,A)});if(Ee.source=J,df(Ee))throw Ee;return Ee}function vB(r){return je(r).toLowerCase()}function bB(r){return je(r).toUpperCase()}function _B(r,i,l){if(r=je(r),r&&(l||i===n))return dy(r);if(!r||!(i=Qt(i)))return r;var f=Sn(r),m=Sn(i),T=hy(f,m),A=py(f,m)+1;return Or(f,T,A).join("")}function TB(r,i,l){if(r=je(r),r&&(l||i===n))return r.slice(0,my(r)+1);if(!r||!(i=Qt(i)))return r;var f=Sn(r),m=py(f,Sn(i))+1;return Or(f,0,m).join("")}function wB(r,i,l){if(r=je(r),r&&(l||i===n))return r.replace(Vt,"");if(!r||!(i=Qt(i)))return r;var f=Sn(r),m=hy(f,Sn(i));return Or(f,m).join("")}function SB(r,i){var l=S,f=U;if(it(i)){var m="separator"in i?i.separator:m;l="length"in i?Se(i.length):l,f="omission"in i?Qt(i.omission):f}r=je(r);var T=r.length;if(Fi(r)){var A=Sn(r);T=A.length}if(l>=T)return r;var I=l-Di(f);if(I<1)return f;var F=A?Or(A,0,I).join(""):r.slice(0,I);if(m===n)return F+f;if(A&&(I+=F.length-I),hf(m)){if(r.slice(I).search(m)){var V,G=F;for(m.global||(m=Oc(m.source,je(So.exec(m))+"g")),m.lastIndex=0;V=m.exec(G);)var J=V.index;F=F.slice(0,J===n?I:J)}}else if(r.indexOf(Qt(m),I)!=I){var re=F.lastIndexOf(m);re>-1&&(F=F.slice(0,re))}return F+f}function CB(r){return r=je(r),r&&lc.test(r)?r.replace(Vs,Qk):r}var EB=ji(function(r,i,l){return r+(l?" ":"")+i.toUpperCase()}),mf=iv("toUpperCase");function nb(r,i,l){return r=je(r),i=l?n:i,i===n?Kk(r)?nN(r):zk(r):r.match(i)||[]}var rb=xe(function(r,i){try{return Rt(r,n,i)}catch(l){return df(l)?l:new _e(l)}}),xB=Xn(function(r,i){return cn(i,function(l){l=Nn(l),Zn(r,l,cf(r[l],r))}),r});function AB(r){var i=r==null?0:r.length,l=he();return r=i?nt(r,function(f){if(typeof f[1]!="function")throw new fn(u);return[l(f[0]),f[1]]}):[],xe(function(f){for(var m=-1;++m<i;){var T=r[m];if(Rt(T[0],this,f))return Rt(T[1],this,f)}})}function OB(r){return QN(hn(r,g))}function yf(r){return function(){return r}}function IB(r,i){return r==null||r!==r?i:r}var PB=sv(),$B=sv(!0);function Yt(r){return r}function vf(r){return Ny(typeof r=="function"?r:hn(r,g))}function MB(r){return By(hn(r,g))}function FB(r,i){return zy(r,hn(i,g))}var DB=xe(function(r,i){return function(l){return Do(l,r,i)}}),kB=xe(function(r,i){return function(l){return Do(r,l,i)}});function bf(r,i,l){var f=Et(i),m=ba(i,f);l==null&&!(it(i)&&(m.length||!f.length))&&(l=i,i=r,r=this,m=ba(i,Et(i)));var T=!(it(l)&&"chain"in l)||!!l.chain,A=er(r);return cn(m,function(I){var F=i[I];r[I]=F,A&&(r.prototype[I]=function(){var V=this.__chain__;if(T||V){var G=r(this.__wrapped__),J=G.__actions__=Gt(this.__actions__);return J.push({func:F,args:arguments,thisArg:r}),G.__chain__=V,G}return F.apply(r,wr([this.value()],arguments))})}),r}function NB(){return At._===this&&(At._=lN),this}function _f(){}function LB(r){return r=Se(r),xe(function(i){return Uy(i,r)})}var BB=Zc(nt),zB=Zc(ay),UB=Zc(Tc);function ib(r){return rf(r)?wc(Nn(r)):mL(r)}function jB(r){return function(i){return r==null?n:Rr(r,i)}}var WB=lv(),VB=lv(!0);function Tf(){return[]}function wf(){return!1}function GB(){return{}}function HB(){return""}function qB(){return!0}function YB(r,i){if(r=Se(r),r<1||r>Ie)return[];var l=Y,f=$t(r,Y);i=he(i),r-=Y;for(var m=Ec(f,i);++l<r;)i(l);return m}function KB(r){return Te(r)?nt(r,Nn):en(r)?[r]:Gt(Cv(je(r)))}function JB(r){var i=++sN;return je(r)+i}var ZB=Ea(function(r,i){return r+i},0),RB=Rc("ceil"),XB=Ea(function(r,i){return r/i},1),QB=Rc("floor");function ez(r){return r&&r.length?va(r,Yt,Nc):n}function tz(r,i){return r&&r.length?va(r,he(i,2),Nc):n}function nz(r){return cy(r,Yt)}function rz(r,i){return cy(r,he(i,2))}function iz(r){return r&&r.length?va(r,Yt,Uc):n}function oz(r,i){return r&&r.length?va(r,he(i,2),Uc):n}var sz=Ea(function(r,i){return r*i},1),az=Rc("round"),lz=Ea(function(r,i){return r-i},0);function uz(r){return r&&r.length?Cc(r,Yt):0}function cz(r,i){return r&&r.length?Cc(r,he(i,2)):0}return b.after=M3,b.ary=kv,b.assign=b4,b.assignIn=Jv,b.assignInWith=Ba,b.assignWith=_4,b.at=T4,b.before=Nv,b.bind=cf,b.bindAll=xB,b.bindKey=Lv,b.castArray=G3,b.chain=Mv,b.chunk=QL,b.compact=e5,b.concat=t5,b.cond=AB,b.conforms=OB,b.constant=yf,b.countBy=u3,b.create=w4,b.curry=Bv,b.curryRight=zv,b.debounce=Uv,b.defaults=S4,b.defaultsDeep=C4,b.defer=F3,b.delay=D3,b.difference=n5,b.differenceBy=r5,b.differenceWith=i5,b.drop=o5,b.dropRight=s5,b.dropRightWhile=a5,b.dropWhile=l5,b.fill=u5,b.filter=f3,b.flatMap=p3,b.flatMapDeep=g3,b.flatMapDepth=m3,b.flatten=Ov,b.flattenDeep=c5,b.flattenDepth=f5,b.flip=k3,b.flow=PB,b.flowRight=$B,b.fromPairs=d5,b.functions=$4,b.functionsIn=M4,b.groupBy=y3,b.initial=p5,b.intersection=g5,b.intersectionBy=m5,b.intersectionWith=y5,b.invert=D4,b.invertBy=k4,b.invokeMap=b3,b.iteratee=vf,b.keyBy=_3,b.keys=Et,b.keysIn=qt,b.map=Ma,b.mapKeys=L4,b.mapValues=B4,b.matches=MB,b.matchesProperty=FB,b.memoize=Da,b.merge=z4,b.mergeWith=Zv,b.method=DB,b.methodOf=kB,b.mixin=bf,b.negate=ka,b.nthArg=LB,b.omit=U4,b.omitBy=j4,b.once=N3,b.orderBy=T3,b.over=BB,b.overArgs=L3,b.overEvery=zB,b.overSome=UB,b.partial=ff,b.partialRight=jv,b.partition=w3,b.pick=W4,b.pickBy=Rv,b.property=ib,b.propertyOf=jB,b.pull=T5,b.pullAll=Pv,b.pullAllBy=w5,b.pullAllWith=S5,b.pullAt=C5,b.range=WB,b.rangeRight=VB,b.rearg=B3,b.reject=E3,b.remove=E5,b.rest=z3,b.reverse=lf,b.sampleSize=A3,b.set=G4,b.setWith=H4,b.shuffle=O3,b.slice=x5,b.sortBy=$3,b.sortedUniq=F5,b.sortedUniqBy=D5,b.split=pB,b.spread=U3,b.tail=k5,b.take=N5,b.takeRight=L5,b.takeRightWhile=B5,b.takeWhile=z5,b.tap=e3,b.throttle=j3,b.thru=$a,b.toArray=qv,b.toPairs=Xv,b.toPairsIn=Qv,b.toPath=KB,b.toPlainObject=Kv,b.transform=q4,b.unary=W3,b.union=U5,b.unionBy=j5,b.unionWith=W5,b.uniq=V5,b.uniqBy=G5,b.uniqWith=H5,b.unset=Y4,b.unzip=uf,b.unzipWith=$v,b.update=K4,b.updateWith=J4,b.values=Gi,b.valuesIn=Z4,b.without=q5,b.words=nb,b.wrap=V3,b.xor=Y5,b.xorBy=K5,b.xorWith=J5,b.zip=Z5,b.zipObject=R5,b.zipObjectDeep=X5,b.zipWith=Q5,b.entries=Xv,b.entriesIn=Qv,b.extend=Jv,b.extendWith=Ba,bf(b,b),b.add=ZB,b.attempt=rb,b.camelCase=eB,b.capitalize=eb,b.ceil=RB,b.clamp=R4,b.clone=H3,b.cloneDeep=Y3,b.cloneDeepWith=K3,b.cloneWith=q3,b.conformsTo=J3,b.deburr=tb,b.defaultTo=IB,b.divide=XB,b.endsWith=tB,b.eq=En,b.escape=nB,b.escapeRegExp=rB,b.every=c3,b.find=d3,b.findIndex=xv,b.findKey=E4,b.findLast=h3,b.findLastIndex=Av,b.findLastKey=x4,b.floor=QB,b.forEach=Fv,b.forEachRight=Dv,b.forIn=A4,b.forInRight=O4,b.forOwn=I4,b.forOwnRight=P4,b.get=pf,b.gt=Z3,b.gte=R3,b.has=F4,b.hasIn=gf,b.head=Iv,b.identity=Yt,b.includes=v3,b.indexOf=h5,b.inRange=X4,b.invoke=N4,b.isArguments=ei,b.isArray=Te,b.isArrayBuffer=X3,b.isArrayLike=Ht,b.isArrayLikeObject=ht,b.isBoolean=Q3,b.isBuffer=Ir,b.isDate=e4,b.isElement=t4,b.isEmpty=n4,b.isEqual=r4,b.isEqualWith=i4,b.isError=df,b.isFinite=o4,b.isFunction=er,b.isInteger=Wv,b.isLength=Na,b.isMap=Vv,b.isMatch=s4,b.isMatchWith=a4,b.isNaN=l4,b.isNative=u4,b.isNil=f4,b.isNull=c4,b.isNumber=Gv,b.isObject=it,b.isObjectLike=ct,b.isPlainObject=Uo,b.isRegExp=hf,b.isSafeInteger=d4,b.isSet=Hv,b.isString=La,b.isSymbol=en,b.isTypedArray=Vi,b.isUndefined=h4,b.isWeakMap=p4,b.isWeakSet=g4,b.join=v5,b.kebabCase=iB,b.last=gn,b.lastIndexOf=b5,b.lowerCase=oB,b.lowerFirst=sB,b.lt=m4,b.lte=y4,b.max=ez,b.maxBy=tz,b.mean=nz,b.meanBy=rz,b.min=iz,b.minBy=oz,b.stubArray=Tf,b.stubFalse=wf,b.stubObject=GB,b.stubString=HB,b.stubTrue=qB,b.multiply=sz,b.nth=_5,b.noConflict=NB,b.noop=_f,b.now=Fa,b.pad=aB,b.padEnd=lB,b.padStart=uB,b.parseInt=cB,b.random=Q4,b.reduce=S3,b.reduceRight=C3,b.repeat=fB,b.replace=dB,b.result=V4,b.round=az,b.runInContext=M,b.sample=x3,b.size=I3,b.snakeCase=hB,b.some=P3,b.sortedIndex=A5,b.sortedIndexBy=O5,b.sortedIndexOf=I5,b.sortedLastIndex=P5,b.sortedLastIndexBy=$5,b.sortedLastIndexOf=M5,b.startCase=gB,b.startsWith=mB,b.subtract=lz,b.sum=uz,b.sumBy=cz,b.template=yB,b.times=YB,b.toFinite=tr,b.toInteger=Se,b.toLength=Yv,b.toLower=vB,b.toNumber=mn,b.toSafeInteger=v4,b.toString=je,b.toUpper=bB,b.trim=_B,b.trimEnd=TB,b.trimStart=wB,b.truncate=SB,b.unescape=CB,b.uniqueId=JB,b.upperCase=EB,b.upperFirst=mf,b.each=Fv,b.eachRight=Dv,b.first=Iv,bf(b,function(){var r={};return Dn(b,function(i,l){Ve.call(b.prototype,l)||(r[l]=i)}),r}(),{chain:!1}),b.VERSION=o,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){b[r].placeholder=b}),cn(["drop","take"],function(r,i){$e.prototype[r]=function(l){l=l===n?1:_t(Se(l),0);var f=this.__filtered__&&!i?new $e(this):this.clone();return f.__filtered__?f.__takeCount__=$t(l,f.__takeCount__):f.__views__.push({size:$t(l,Y),type:r+(f.__dir__<0?"Right":"")}),f},$e.prototype[r+"Right"]=function(l){return this.reverse()[r](l).reverse()}}),cn(["filter","map","takeWhile"],function(r,i){var l=i+1,f=l==ye||l==we;$e.prototype[r]=function(m){var T=this.clone();return T.__iteratees__.push({iteratee:he(m,3),type:l}),T.__filtered__=T.__filtered__||f,T}}),cn(["head","last"],function(r,i){var l="take"+(i?"Right":"");$e.prototype[r]=function(){return this[l](1).value()[0]}}),cn(["initial","tail"],function(r,i){var l="drop"+(i?"":"Right");$e.prototype[r]=function(){return this.__filtered__?new $e(this):this[l](1)}}),$e.prototype.compact=function(){return this.filter(Yt)},$e.prototype.find=function(r){return this.filter(r).head()},$e.prototype.findLast=function(r){return this.reverse().find(r)},$e.prototype.invokeMap=xe(function(r,i){return typeof r=="function"?new $e(this):this.map(function(l){return Do(l,r,i)})}),$e.prototype.reject=function(r){return this.filter(ka(he(r)))},$e.prototype.slice=function(r,i){r=Se(r);var l=this;return l.__filtered__&&(r>0||i<0)?new $e(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),i!==n&&(i=Se(i),l=i<0?l.dropRight(-i):l.take(i-r)),l)},$e.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},$e.prototype.toArray=function(){return this.take(Y)},Dn($e.prototype,function(r,i){var l=/^(?:filter|find|map|reject)|While$/.test(i),f=/^(?:head|last)$/.test(i),m=b[f?"take"+(i=="last"?"Right":""):i],T=f||/^find/.test(i);m&&(b.prototype[i]=function(){var A=this.__wrapped__,I=f?[1]:arguments,F=A instanceof $e,V=I[0],G=F||Te(A),J=function(Pe){var Fe=m.apply(b,wr([Pe],I));return f&&re?Fe[0]:Fe};G&&l&&typeof V=="function"&&V.length!=1&&(F=G=!1);var re=this.__chain__,ce=!!this.__actions__.length,ge=T&&!re,Ee=F&&!ce;if(!T&&G){A=Ee?A:new $e(this);var me=r.apply(A,I);return me.__actions__.push({func:$a,args:[J],thisArg:n}),new dn(me,re)}return ge&&Ee?r.apply(this,I):(me=this.thru(J),ge?f?me.value()[0]:me.value():me)})}),cn(["pop","push","shift","sort","splice","unshift"],function(r){var i=ra[r],l=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);b.prototype[r]=function(){var m=arguments;if(f&&!this.__chain__){var T=this.value();return i.apply(Te(T)?T:[],m)}return this[l](function(A){return i.apply(Te(A)?A:[],m)})}}),Dn($e.prototype,function(r,i){var l=b[i];if(l){var f=l.name+"";Ve.call(Bi,f)||(Bi[f]=[]),Bi[f].push({name:i,func:l})}}),Bi[Ca(n,N).name]=[{name:"wrapper",func:n}],$e.prototype.clone=CN,$e.prototype.reverse=EN,$e.prototype.value=xN,b.prototype.at=t3,b.prototype.chain=n3,b.prototype.commit=r3,b.prototype.next=i3,b.prototype.plant=s3,b.prototype.reverse=a3,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=l3,b.prototype.first=b.prototype.head,Ao&&(b.prototype[Ao]=o3),b},ki=rN();qr?((qr.exports=ki)._=ki,yc._=ki):At._=ki}).call(Un)}(hs,hs.exports);var WS=hs.exports;function Uh(e){const{renderers:t,cells:n,uischemas:o,schema:s,label:a,path:u,visible:c,enabled:h,uischema:p,rootSchema:y}=e,g=x.useMemo(()=>ue.findUISchema(o,s,p.scope,u,()=>WS.isEmpty(u)?ue.Generate.uiSchema(s,"VerticalLayout",void 0,y):{...ue.Generate.uiSchema(s,"Group",void 0,y),label:a},p,y),[o,s,u,a,p,y]);return c?d.jsx(De.JsonFormsDispatch,{visible:c,enabled:h,schema:s,uischema:g,path:u,renderers:t,cells:n}):null}function Jl(e){const t=In(e),{path:n,data:o,schema:s}=e,a=ds(o,s),u=x.useMemo(()=>{var _;const y=o===null,g=(_=t.error)==null?void 0:_.filter(C=>C.key==="is a required property"||!y?C:!1);return g!=null&&g.length?{error:g}:{error:y&&t.required?"is a required property":void 0}},[t.error,t.required,o]),c=x.useMemo(()=>({...t,...a,...u}),[t,u,a]),[h,p]=_n("OneOfEnum",n,c,e);return h===void 0?d.jsx(v.Select,{...p}):h}function Zl(e){const t=In(e),{path:n,data:o,schema:s}=e,a=Lh({data:o,onChange:t.onChange}),u=x.useMemo(()=>({...t,...a}),[t,a]),[c,h]=_n("Text",n,u,e);return c===void 0?s.format==="password"?d.jsx(v.PasswordInput,{...h}):d.jsx(v.TextInput,{...h}):c}const jh=ue.rankWith(1,ue.isBooleanControl),Wh=De.withJsonFormsCellProps(e=>d.jsx(Hl,{...e})),Vh=ue.rankWith(1,ue.isDateControl),Gh=De.withJsonFormsCellProps(e=>d.jsx(ql,{...e})),Hh=ue.rankWith(1,ue.isDateTimeControl),qh=De.withJsonFormsControlProps(e=>d.jsx(Yl,{...e})),Yh=ue.rankWith(2,ue.isEnumControl),Kh=De.withJsonFormsEnumProps(De.withTranslateProps(e=>d.jsx(Kl,{...e})),!1),Jh=ue.rankWith(1,ue.isIntegerControl),Zh=De.withJsonFormsCellProps(e=>d.jsx(ro,{...e})),Rh=ue.rankWith(1,ue.isNumberControl),Xh=De.withJsonFormsCellProps(e=>d.jsx(ro,{...e})),Qh=ue.rankWith(2,ue.isOneOfControl),ep=De.withJsonFormsOneOfEnumProps(De.withTranslateProps(e=>d.jsx(Jl,{...e})),!1),tp=ue.rankWith(1,ue.isStringControl),np=De.withJsonFormsCellProps(e=>d.jsx(Zl,{...e})),rp=x.memo(function({open:t,onClose:n,onConfirm:o,onCancel:s,title:a,message:u,acceptText:c,declineText:h}){return d.jsxs(v.Modal,{opened:t,withCloseButton:!1,centered:!0,title:a,keepMounted:!0,onClose:n,children:[u,d.jsxs(v.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[d.jsx(v.Button,{onClick:s,children:h}),d.jsx(v.Button,{onClick:o,children:c})]})]})});var Rl={exports:{}},Ge={};/**
|
|
155
|
+
`)+R+`return __p
|
|
156
|
+
}`;var Ee=rb(function(){return Be(w,ue+"return "+R).apply(n,A)});if(Ee.source=R,vf(Ee))throw Ee;return Ee}function SB(r){return je(r).toLowerCase()}function CB(r){return je(r).toUpperCase()}function EB(r,i,l){if(r=je(r),r&&(l||i===n))return dy(r);if(!r||!(i=Xt(i)))return r;var f=Tn(r),m=Tn(i),w=hy(f,m),A=py(f,m)+1;return Ar(f,w,A).join("")}function xB(r,i,l){if(r=je(r),r&&(l||i===n))return r.slice(0,my(r)+1);if(!r||!(i=Xt(i)))return r;var f=Tn(r),m=py(f,Tn(i))+1;return Ar(f,0,m).join("")}function AB(r,i,l){if(r=je(r),r&&(l||i===n))return r.replace(Wt,"");if(!r||!(i=Xt(i)))return r;var f=Tn(r),m=hy(f,Tn(i));return Ar(f,m).join("")}function OB(r,i){var l=S,f=j;if(it(i)){var m="separator"in i?i.separator:m;l="length"in i?Ce(i.length):l,f="omission"in i?Xt(i.omission):f}r=je(r);var w=r.length;if(Pi(r)){var A=Tn(r);w=A.length}if(l>=w)return r;var I=l-$i(f);if(I<1)return f;var F=A?Ar(A,0,I).join(""):r.slice(0,I);if(m===n)return F+f;if(A&&(I+=F.length-I),bf(m)){if(r.slice(I).search(m)){var V,G=F;for(m.global||(m=kc(m.source,je(_o.exec(m))+"g")),m.lastIndex=0;V=m.exec(G);)var R=V.index;F=F.slice(0,R===n?I:R)}}else if(r.indexOf(Xt(m),I)!=I){var ie=F.lastIndexOf(m);ie>-1&&(F=F.slice(0,ie))}return F+f}function IB(r){return r=je(r),r&&pc.test(r)?r.replace(Hs,iN):r}var PB=Bi(function(r,i,l){return r+(l?" ":"")+i.toUpperCase()}),Tf=iv("toUpperCase");function nb(r,i,l){return r=je(r),i=l?n:i,i===n?QD(r)?aN(r):GD(r):r.match(i)||[]}var rb=Ae(function(r,i){try{return Rt(r,n,i)}catch(l){return vf(l)?l:new we(l)}}),$B=Zn(function(r,i){return un(i,function(l){l=Ln(l),Jn(r,l,mf(r[l],r))}),r});function MB(r){var i=r==null?0:r.length,l=pe();return r=i?nt(r,function(f){if(typeof f[1]!="function")throw new cn(u);return[l(f[0]),f[1]]}):[],Ae(function(f){for(var m=-1;++m<i;){var w=r[m];if(Rt(w[0],this,f))return Rt(w[1],this,f)}})}function FB(r){return iL(dn(r,g))}function Sf(r){return function(){return r}}function kB(r,i){return r==null||r!==r?i:r}var DB=sv(),NB=sv(!0);function qt(r){return r}function Cf(r){return Ny(typeof r=="function"?r:dn(r,g))}function LB(r){return By(dn(r,g))}function BB(r,i){return zy(r,dn(i,g))}var zB=Ae(function(r,i){return function(l){return $o(l,r,i)}}),UB=Ae(function(r,i){return function(l){return $o(r,l,i)}});function Ef(r,i,l){var f=Ct(i),m=wa(i,f);l==null&&!(it(i)&&(m.length||!f.length))&&(l=i,i=r,r=this,m=wa(i,Ct(i)));var w=!(it(l)&&"chain"in l)||!!l.chain,A=Qn(r);return un(m,function(I){var F=i[I];r[I]=F,A&&(r.prototype[I]=function(){var V=this.__chain__;if(w||V){var G=r(this.__wrapped__),R=G.__actions__=Vt(this.__actions__);return R.push({func:F,args:arguments,thisArg:r}),G.__chain__=V,G}return F.apply(r,wr([this.value()],arguments))})}),r}function jB(){return xt._===this&&(xt._=hN),this}function xf(){}function WB(r){return r=Ce(r),Ae(function(i){return Uy(i,r)})}var VB=nf(nt),GB=nf(ay),HB=nf(Ac);function ib(r){return cf(r)?Oc(Ln(r)):wL(r)}function qB(r){return function(i){return r==null?n:Jr(r,i)}}var YB=lv(),KB=lv(!0);function Af(){return[]}function Of(){return!1}function JB(){return{}}function RB(){return""}function ZB(){return!0}function XB(r,i){if(r=Ce(r),r<1||r>De)return[];var l=Y,f=Pt(r,Y);i=pe(i),r-=Y;for(var m=$c(f,i);++l<r;)i(l);return m}function QB(r){return Se(r)?nt(r,Ln):Qt(r)?[r]:Vt(Cv(je(r)))}function ez(r){var i=++fN;return je(r)+i}var tz=Aa(function(r,i){return r+i},0),nz=rf("ceil"),rz=Aa(function(r,i){return r/i},1),iz=rf("floor");function oz(r){return r&&r.length?_a(r,qt,Wc):n}function sz(r,i){return r&&r.length?_a(r,pe(i,2),Wc):n}function az(r){return cy(r,qt)}function lz(r,i){return cy(r,pe(i,2))}function uz(r){return r&&r.length?_a(r,qt,qc):n}function cz(r,i){return r&&r.length?_a(r,pe(i,2),qc):n}var fz=Aa(function(r,i){return r*i},1),dz=rf("round"),hz=Aa(function(r,i){return r-i},0);function pz(r){return r&&r.length?Pc(r,qt):0}function gz(r,i){return r&&r.length?Pc(r,pe(i,2)):0}return v.after=L3,v.ary=Dv,v.assign=C4,v.assignIn=Jv,v.assignInWith=Ua,v.assignWith=E4,v.at=x4,v.before=Nv,v.bind=mf,v.bindAll=$B,v.bindKey=Lv,v.castArray=J3,v.chain=Mv,v.chunk=i5,v.compact=o5,v.concat=s5,v.cond=MB,v.conforms=FB,v.constant=Sf,v.countBy=p3,v.create=A4,v.curry=Bv,v.curryRight=zv,v.debounce=Uv,v.defaults=O4,v.defaultsDeep=I4,v.defer=B3,v.delay=z3,v.difference=a5,v.differenceBy=l5,v.differenceWith=u5,v.drop=c5,v.dropRight=f5,v.dropRightWhile=d5,v.dropWhile=h5,v.fill=p5,v.filter=m3,v.flatMap=b3,v.flatMapDeep=_3,v.flatMapDepth=w3,v.flatten=Ov,v.flattenDeep=g5,v.flattenDepth=m5,v.flip=U3,v.flow=DB,v.flowRight=NB,v.fromPairs=y5,v.functions=N4,v.functionsIn=L4,v.groupBy=T3,v.initial=b5,v.intersection=_5,v.intersectionBy=w5,v.intersectionWith=T5,v.invert=z4,v.invertBy=U4,v.invokeMap=C3,v.iteratee=Cf,v.keyBy=E3,v.keys=Ct,v.keysIn=Ht,v.map=ka,v.mapKeys=W4,v.mapValues=V4,v.matches=LB,v.matchesProperty=BB,v.memoize=Na,v.merge=G4,v.mergeWith=Rv,v.method=zB,v.methodOf=UB,v.mixin=Ef,v.negate=La,v.nthArg=WB,v.omit=H4,v.omitBy=q4,v.once=j3,v.orderBy=x3,v.over=VB,v.overArgs=W3,v.overEvery=GB,v.overSome=HB,v.partial=yf,v.partialRight=jv,v.partition=A3,v.pick=Y4,v.pickBy=Zv,v.property=ib,v.propertyOf=qB,v.pull=x5,v.pullAll=Pv,v.pullAllBy=A5,v.pullAllWith=O5,v.pullAt=I5,v.range=YB,v.rangeRight=KB,v.rearg=V3,v.reject=P3,v.remove=P5,v.rest=G3,v.reverse=pf,v.sampleSize=M3,v.set=J4,v.setWith=R4,v.shuffle=F3,v.slice=$5,v.sortBy=N3,v.sortedUniq=B5,v.sortedUniqBy=z5,v.split=bB,v.spread=H3,v.tail=U5,v.take=j5,v.takeRight=W5,v.takeRightWhile=V5,v.takeWhile=G5,v.tap=o3,v.throttle=q3,v.thru=Fa,v.toArray=qv,v.toPairs=Xv,v.toPairsIn=Qv,v.toPath=QB,v.toPlainObject=Kv,v.transform=Z4,v.unary=Y3,v.union=H5,v.unionBy=q5,v.unionWith=Y5,v.uniq=K5,v.uniqBy=J5,v.uniqWith=R5,v.unset=X4,v.unzip=gf,v.unzipWith=$v,v.update=Q4,v.updateWith=eB,v.values=ji,v.valuesIn=tB,v.without=Z5,v.words=nb,v.wrap=K3,v.xor=X5,v.xorBy=Q5,v.xorWith=e3,v.zip=t3,v.zipObject=n3,v.zipObjectDeep=r3,v.zipWith=i3,v.entries=Xv,v.entriesIn=Qv,v.extend=Jv,v.extendWith=Ua,Ef(v,v),v.add=tz,v.attempt=rb,v.camelCase=oB,v.capitalize=eb,v.ceil=nz,v.clamp=nB,v.clone=R3,v.cloneDeep=X3,v.cloneDeepWith=Q3,v.cloneWith=Z3,v.conformsTo=e4,v.deburr=tb,v.defaultTo=kB,v.divide=rz,v.endsWith=sB,v.eq=Cn,v.escape=aB,v.escapeRegExp=lB,v.every=g3,v.find=y3,v.findIndex=xv,v.findKey=P4,v.findLast=v3,v.findLastIndex=Av,v.findLastKey=$4,v.floor=iz,v.forEach=Fv,v.forEachRight=kv,v.forIn=M4,v.forInRight=F4,v.forOwn=k4,v.forOwnRight=D4,v.get=_f,v.gt=t4,v.gte=n4,v.has=B4,v.hasIn=wf,v.head=Iv,v.identity=qt,v.includes=S3,v.indexOf=v5,v.inRange=rB,v.invoke=j4,v.isArguments=Xr,v.isArray=Se,v.isArrayBuffer=r4,v.isArrayLike=Gt,v.isArrayLikeObject=dt,v.isBoolean=i4,v.isBuffer=Or,v.isDate=o4,v.isElement=s4,v.isEmpty=a4,v.isEqual=l4,v.isEqualWith=u4,v.isError=vf,v.isFinite=c4,v.isFunction=Qn,v.isInteger=Wv,v.isLength=Ba,v.isMap=Vv,v.isMatch=f4,v.isMatchWith=d4,v.isNaN=h4,v.isNative=p4,v.isNil=m4,v.isNull=g4,v.isNumber=Gv,v.isObject=it,v.isObjectLike=ut,v.isPlainObject=Lo,v.isRegExp=bf,v.isSafeInteger=y4,v.isSet=Hv,v.isString=za,v.isSymbol=Qt,v.isTypedArray=Ui,v.isUndefined=v4,v.isWeakMap=b4,v.isWeakSet=_4,v.join=S5,v.kebabCase=uB,v.last=pn,v.lastIndexOf=C5,v.lowerCase=cB,v.lowerFirst=fB,v.lt=w4,v.lte=T4,v.max=oz,v.maxBy=sz,v.mean=az,v.meanBy=lz,v.min=uz,v.minBy=cz,v.stubArray=Af,v.stubFalse=Of,v.stubObject=JB,v.stubString=RB,v.stubTrue=ZB,v.multiply=fz,v.nth=E5,v.noConflict=jB,v.noop=xf,v.now=Da,v.pad=dB,v.padEnd=hB,v.padStart=pB,v.parseInt=gB,v.random=iB,v.reduce=O3,v.reduceRight=I3,v.repeat=mB,v.replace=yB,v.result=K4,v.round=dz,v.runInContext=M,v.sample=$3,v.size=k3,v.snakeCase=vB,v.some=D3,v.sortedIndex=M5,v.sortedIndexBy=F5,v.sortedIndexOf=k5,v.sortedLastIndex=D5,v.sortedLastIndexBy=N5,v.sortedLastIndexOf=L5,v.startCase=_B,v.startsWith=wB,v.subtract=hz,v.sum=pz,v.sumBy=gz,v.template=TB,v.times=XB,v.toFinite=er,v.toInteger=Ce,v.toLength=Yv,v.toLower=SB,v.toNumber=gn,v.toSafeInteger=S4,v.toString=je,v.toUpper=CB,v.trim=EB,v.trimEnd=xB,v.trimStart=AB,v.truncate=OB,v.unescape=IB,v.uniqueId=ez,v.upperCase=PB,v.upperFirst=Tf,v.each=Fv,v.eachRight=kv,v.first=Iv,Ef(v,function(){var r={};return Dn(v,function(i,l){Ve.call(v.prototype,l)||(r[l]=i)}),r}(),{chain:!1}),v.VERSION=o,un(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){v[r].placeholder=v}),un(["drop","take"],function(r,i){$e.prototype[r]=function(l){l=l===n?1:bt(Ce(l),0);var f=this.__filtered__&&!i?new $e(this):this.clone();return f.__filtered__?f.__takeCount__=Pt(l,f.__takeCount__):f.__views__.push({size:Pt(l,Y),type:r+(f.__dir__<0?"Right":"")}),f},$e.prototype[r+"Right"]=function(l){return this.reverse()[r](l).reverse()}}),un(["filter","map","takeWhile"],function(r,i){var l=i+1,f=l==he||l==_e;$e.prototype[r]=function(m){var w=this.clone();return w.__iteratees__.push({iteratee:pe(m,3),type:l}),w.__filtered__=w.__filtered__||f,w}}),un(["head","last"],function(r,i){var l="take"+(i?"Right":"");$e.prototype[r]=function(){return this[l](1).value()[0]}}),un(["initial","tail"],function(r,i){var l="drop"+(i?"":"Right");$e.prototype[r]=function(){return this.__filtered__?new $e(this):this[l](1)}}),$e.prototype.compact=function(){return this.filter(qt)},$e.prototype.find=function(r){return this.filter(r).head()},$e.prototype.findLast=function(r){return this.reverse().find(r)},$e.prototype.invokeMap=Ae(function(r,i){return typeof r=="function"?new $e(this):this.map(function(l){return $o(l,r,i)})}),$e.prototype.reject=function(r){return this.filter(La(pe(r)))},$e.prototype.slice=function(r,i){r=Ce(r);var l=this;return l.__filtered__&&(r>0||i<0)?new $e(l):(r<0?l=l.takeRight(-r):r&&(l=l.drop(r)),i!==n&&(i=Ce(i),l=i<0?l.dropRight(-i):l.take(i-r)),l)},$e.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},$e.prototype.toArray=function(){return this.take(Y)},Dn($e.prototype,function(r,i){var l=/^(?:filter|find|map|reject)|While$/.test(i),f=/^(?:head|last)$/.test(i),m=v[f?"take"+(i=="last"?"Right":""):i],w=f||/^find/.test(i);m&&(v.prototype[i]=function(){var A=this.__wrapped__,I=f?[1]:arguments,F=A instanceof $e,V=I[0],G=F||Se(A),R=function(Pe){var Me=m.apply(v,wr([Pe],I));return f&&ie?Me[0]:Me};G&&l&&typeof V=="function"&&V.length!=1&&(F=G=!1);var ie=this.__chain__,ue=!!this.__actions__.length,ye=w&&!ie,Ee=F&&!ue;if(!w&&G){A=Ee?A:new $e(this);var ve=r.apply(A,I);return ve.__actions__.push({func:Fa,args:[R],thisArg:n}),new fn(ve,ie)}return ye&&Ee?r.apply(this,I):(ve=this.thru(R),ye?f?ve.value()[0]:ve.value():ve)})}),un(["pop","push","shift","sort","splice","unshift"],function(r){var i=oa[r],l=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",f=/^(?:pop|shift)$/.test(r);v.prototype[r]=function(){var m=arguments;if(f&&!this.__chain__){var w=this.value();return i.apply(Se(w)?w:[],m)}return this[l](function(A){return i.apply(Se(A)?A:[],m)})}}),Dn($e.prototype,function(r,i){var l=v[i];if(l){var f=l.name+"";Ve.call(Di,f)||(Di[f]=[]),Di[f].push({name:i,func:l})}}),Di[xa(n,N).name]=[{name:"wrapper",func:n}],$e.prototype.clone=IN,$e.prototype.reverse=PN,$e.prototype.value=$N,v.prototype.at=s3,v.prototype.chain=a3,v.prototype.commit=l3,v.prototype.next=u3,v.prototype.plant=f3,v.prototype.reverse=d3,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=h3,v.prototype.first=v.prototype.head,Co&&(v.prototype[Co]=c3),v},Mi=lN();Gr?((Gr.exports=Mi)._=Mi,Sc._=Mi):xt._=Mi}).call(Un)}(ds,ds.exports);var VS=ds.exports;function Vh(e){const{renderers:t,cells:n,uischemas:o,schema:s,label:a,path:u,visible:c,enabled:d,uischema:p,rootSchema:y}=e,g=x.useMemo(()=>ae.findUISchema(o,s,p.scope,u,()=>VS.isEmpty(u)?ae.Generate.uiSchema(s,"VerticalLayout",void 0,y):{...ae.Generate.uiSchema(s,"Group",void 0,y),label:a},p,y),[o,s,u,a,p,y]);return c?h.jsx(Fe.JsonFormsDispatch,{visible:c,enabled:d,schema:s,uischema:g,path:u,renderers:t,cells:n}):null}function eu(e){const t=In(e),{path:n,data:o,schema:s}=e,a=fs(o,s),u=x.useMemo(()=>{var _;const y=o===null,g=(_=t.error)==null?void 0:_.filter(C=>C.key==="is a required property"||!y?C:!1);return g!=null&&g.length?{error:g}:{error:y&&t.required?"is a required property":void 0}},[t.error,t.required,o]),c=x.useMemo(()=>({...t,...a,...u}),[t,u,a]),[d,p]=bn("OneOfEnum",n,c,e);return d===void 0?h.jsx(b.Select,{...p}):d}function tu(e){const t=In(e),{path:n,data:o,schema:s}=e,a=Uh({data:o,onChange:t.onChange}),u=x.useMemo(()=>({...t,...a}),[t,a]),[c,d]=bn("Text",n,u,e);return c===void 0?s.format==="password"?h.jsx(b.PasswordInput,{...d}):h.jsx(b.TextInput,{...d}):c}const Gh=ae.rankWith(1,ae.isBooleanControl),Hh=Fe.withJsonFormsCellProps(e=>h.jsx(Rl,{...e})),qh=ae.rankWith(1,ae.isDateControl),Yh=Fe.withJsonFormsCellProps(e=>h.jsx(Zl,{...e})),Kh=ae.rankWith(1,ae.isDateTimeControl),Jh=Fe.withJsonFormsControlProps(e=>h.jsx(Xl,{...e})),Rh=ae.rankWith(2,ae.isEnumControl),Zh=Fe.withJsonFormsEnumProps(Fe.withTranslateProps(e=>h.jsx(Ql,{...e})),!1),Xh=ae.rankWith(1,ae.isIntegerControl),Qh=Fe.withJsonFormsCellProps(e=>h.jsx(eo,{...e})),ep=ae.rankWith(1,ae.isNumberControl),tp=Fe.withJsonFormsCellProps(e=>h.jsx(eo,{...e})),np=ae.rankWith(2,ae.isOneOfControl),rp=Fe.withJsonFormsOneOfEnumProps(Fe.withTranslateProps(e=>h.jsx(eu,{...e})),!1),ip=ae.rankWith(1,ae.isStringControl),op=Fe.withJsonFormsCellProps(e=>h.jsx(tu,{...e})),sp=x.memo(function({open:t,onClose:n,onConfirm:o,onCancel:s,title:a,message:u,acceptText:c,declineText:d}){return h.jsxs(b.Modal,{opened:t,withCloseButton:!1,centered:!0,title:a,keepMounted:!0,onClose:n,children:[u,h.jsxs(b.Flex,{justify:"flex-end",align:"center",gap:"sm",children:[h.jsx(b.Button,{onClick:s,children:d}),h.jsx(b.Button,{onClick:o,children:c})]})]})});var nu={exports:{}},Ge={};/**
|
|
157
157
|
* @license React
|
|
158
158
|
* react-is.production.js
|
|
159
159
|
*
|
|
@@ -161,7 +161,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
161
161
|
*
|
|
162
162
|
* This source code is licensed under the MIT license found in the
|
|
163
163
|
* LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/var
|
|
164
|
+
*/var ap;function GS(){if(ap)return Ge;ap=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),_=Symbol.for("react.view_transition"),C=Symbol.for("react.client.reference");function E(T){if(typeof T=="object"&&T!==null){var P=T.$$typeof;switch(P){case e:switch(T=T.type,T){case n:case s:case o:case d:case p:case _:return T;default:switch(T=T&&T.$$typeof,T){case u:case c:case g:case y:return T;case a:return T;default:return P}}case t:return P}}}return Ge.ContextConsumer=a,Ge.ContextProvider=u,Ge.Element=e,Ge.ForwardRef=c,Ge.Fragment=n,Ge.Lazy=g,Ge.Memo=y,Ge.Portal=t,Ge.Profiler=s,Ge.StrictMode=o,Ge.Suspense=d,Ge.SuspenseList=p,Ge.isContextConsumer=function(T){return E(T)===a},Ge.isContextProvider=function(T){return E(T)===u},Ge.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===e},Ge.isForwardRef=function(T){return E(T)===c},Ge.isFragment=function(T){return E(T)===n},Ge.isLazy=function(T){return E(T)===g},Ge.isMemo=function(T){return E(T)===y},Ge.isPortal=function(T){return E(T)===t},Ge.isProfiler=function(T){return E(T)===s},Ge.isStrictMode=function(T){return E(T)===o},Ge.isSuspense=function(T){return E(T)===d},Ge.isSuspenseList=function(T){return E(T)===p},Ge.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===s||T===o||T===d||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===g||T.$$typeof===y||T.$$typeof===u||T.$$typeof===a||T.$$typeof===c||T.$$typeof===C||T.getModuleId!==void 0)},Ge.typeOf=E,Ge}var He={};/**
|
|
165
165
|
* @license React
|
|
166
166
|
* react-is.development.js
|
|
167
167
|
*
|
|
@@ -169,42 +169,42 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the MIT license found in the
|
|
171
171
|
* LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/var
|
|
172
|
+
*/var lp;function HS(){return lp||(lp=1,process.env.NODE_ENV!=="production"&&function(){function e(T){if(typeof T=="object"&&T!==null){var P=T.$$typeof;switch(P){case t:switch(T=T.type,T){case o:case a:case s:case p:case y:case C:return T;default:switch(T=T&&T.$$typeof,T){case c:case d:case _:case g:return T;case u:return T;default:return P}}case n:return P}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),C=Symbol.for("react.view_transition"),E=Symbol.for("react.client.reference");He.ContextConsumer=u,He.ContextProvider=c,He.Element=t,He.ForwardRef=d,He.Fragment=o,He.Lazy=_,He.Memo=g,He.Portal=n,He.Profiler=a,He.StrictMode=s,He.Suspense=p,He.SuspenseList=y,He.isContextConsumer=function(T){return e(T)===u},He.isContextProvider=function(T){return e(T)===c},He.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},He.isForwardRef=function(T){return e(T)===d},He.isFragment=function(T){return e(T)===o},He.isLazy=function(T){return e(T)===_},He.isMemo=function(T){return e(T)===g},He.isPortal=function(T){return e(T)===n},He.isProfiler=function(T){return e(T)===a},He.isStrictMode=function(T){return e(T)===s},He.isSuspense=function(T){return e(T)===p},He.isSuspenseList=function(T){return e(T)===y},He.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===o||T===a||T===s||T===p||T===y||typeof T=="object"&&T!==null&&(T.$$typeof===_||T.$$typeof===g||T.$$typeof===c||T.$$typeof===u||T.$$typeof===d||T.$$typeof===E||T.getModuleId!==void 0)},He.typeOf=e}()),He}process.env.NODE_ENV==="production"?nu.exports=GS():nu.exports=HS();var hs=nu.exports;function Vn(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 up(e){if(Mt.isValidElement(e)||hs.isValidElementType(e)||!Vn(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=up(e[n])}),t}function Yt(e,t,n={clone:!0}){const o=n.clone?{...e}:e;return Vn(e)&&Vn(t)&&Object.keys(t).forEach(s=>{Mt.isValidElement(t[s])||hs.isValidElementType(t[s])?o[s]=t[s]:Vn(t[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Vn(e[s])?o[s]=Yt(e[s],t[s],n):n.clone?o[s]=Vn(t[s])?up(t[s]):t[s]:o[s]=t[s]}),o}var ru={exports:{}},ps={exports:{}},ze={};/** @license React v16.13.1
|
|
173
173
|
* react-is.production.min.js
|
|
174
174
|
*
|
|
175
175
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
176
176
|
*
|
|
177
177
|
* This source code is licensed under the MIT license found in the
|
|
178
178
|
* LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/var
|
|
179
|
+
*/var cp;function qS(){if(cp)return ze;cp=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,X=e?Symbol.for("react.scope"):60119;function W(k){if(typeof k=="object"&&k!==null){var L=k.$$typeof;switch(L){case t:switch(k=k.type,k){case d:case p:case o:case a:case s:case g:return k;default:switch(k=k&&k.$$typeof,k){case c:case y:case E:case C:case u:return k;default:return L}}case n:return L}}}function D(k){return W(k)===p}return ze.AsyncMode=d,ze.ConcurrentMode=p,ze.ContextConsumer=c,ze.ContextProvider=u,ze.Element=t,ze.ForwardRef=y,ze.Fragment=o,ze.Lazy=E,ze.Memo=C,ze.Portal=n,ze.Profiler=a,ze.StrictMode=s,ze.Suspense=g,ze.isAsyncMode=function(k){return D(k)||W(k)===d},ze.isConcurrentMode=D,ze.isContextConsumer=function(k){return W(k)===c},ze.isContextProvider=function(k){return W(k)===u},ze.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===t},ze.isForwardRef=function(k){return W(k)===y},ze.isFragment=function(k){return W(k)===o},ze.isLazy=function(k){return W(k)===E},ze.isMemo=function(k){return W(k)===C},ze.isPortal=function(k){return W(k)===n},ze.isProfiler=function(k){return W(k)===a},ze.isStrictMode=function(k){return W(k)===s},ze.isSuspense=function(k){return W(k)===g},ze.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===o||k===p||k===a||k===s||k===g||k===_||typeof k=="object"&&k!==null&&(k.$$typeof===E||k.$$typeof===C||k.$$typeof===u||k.$$typeof===c||k.$$typeof===y||k.$$typeof===P||k.$$typeof===N||k.$$typeof===X||k.$$typeof===T)},ze.typeOf=W,ze}var Ue={};/** @license React v16.13.1
|
|
180
180
|
* react-is.development.js
|
|
181
181
|
*
|
|
182
182
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the MIT license found in the
|
|
185
185
|
* LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/var
|
|
186
|
+
*/var fp;function YS(){return fp||(fp=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,s=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,E=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,P=e?Symbol.for("react.fundamental"):60117,N=e?Symbol.for("react.responder"):60118,X=e?Symbol.for("react.scope"):60119;function W(te){return typeof te=="string"||typeof te=="function"||te===o||te===p||te===a||te===s||te===g||te===_||typeof te=="object"&&te!==null&&(te.$$typeof===E||te.$$typeof===C||te.$$typeof===u||te.$$typeof===c||te.$$typeof===y||te.$$typeof===P||te.$$typeof===N||te.$$typeof===X||te.$$typeof===T)}function D(te){if(typeof te=="object"&&te!==null){var yt=te.$$typeof;switch(yt){case t:var Je=te.type;switch(Je){case d:case p:case o:case a:case s:case g:return Je;default:var Nt=Je&&Je.$$typeof;switch(Nt){case c:case y:case E:case C:case u:return Nt;default:return yt}}case n:return yt}}}var k=d,L=p,J=c,le=u,ne=t,S=y,j=o,re=E,ce=C,he=n,Le=a,_e=s,ke=g,De=!1;function mt(te){return De||(De=!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.")),K(te)||D(te)===d}function K(te){return D(te)===p}function Y(te){return D(te)===c}function ge(te){return D(te)===u}function Q(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function q(te){return D(te)===y}function H(te){return D(te)===o}function ee(te){return D(te)===E}function fe(te){return D(te)===C}function be(te){return D(te)===n}function me(te){return D(te)===a}function xe(te){return D(te)===s}function qe(te){return D(te)===g}Ue.AsyncMode=k,Ue.ConcurrentMode=L,Ue.ContextConsumer=J,Ue.ContextProvider=le,Ue.Element=ne,Ue.ForwardRef=S,Ue.Fragment=j,Ue.Lazy=re,Ue.Memo=ce,Ue.Portal=he,Ue.Profiler=Le,Ue.StrictMode=_e,Ue.Suspense=ke,Ue.isAsyncMode=mt,Ue.isConcurrentMode=K,Ue.isContextConsumer=Y,Ue.isContextProvider=ge,Ue.isElement=Q,Ue.isForwardRef=q,Ue.isFragment=H,Ue.isLazy=ee,Ue.isMemo=fe,Ue.isPortal=be,Ue.isProfiler=me,Ue.isStrictMode=xe,Ue.isSuspense=qe,Ue.isValidElementType=W,Ue.typeOf=D}()),Ue}var dp;function hp(){return dp||(dp=1,process.env.NODE_ENV==="production"?ps.exports=qS():ps.exports=YS()),ps.exports}/*
|
|
187
187
|
object-assign
|
|
188
188
|
(c) Sindre Sorhus
|
|
189
189
|
@license MIT
|
|
190
|
-
*/var
|
|
191
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
192
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
190
|
+
*/var iu,pp;function KS(){if(pp)return iu;pp=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var u={},c=0;c<10;c++)u["_"+String.fromCharCode(c)]=c;var d=Object.getOwnPropertyNames(u).map(function(y){return u[y]});if(d.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(y){p[y]=y}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return iu=s()?Object.assign:function(a,u){for(var c,d=o(a),p,y=1;y<arguments.length;y++){c=Object(arguments[y]);for(var g in c)t.call(c,g)&&(d[g]=c[g]);if(e){p=e(c);for(var _=0;_<p.length;_++)n.call(c,p[_])&&(d[p[_]]=c[p[_]])}}return d},iu}var ou,gp;function su(){if(gp)return ou;gp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ou=e,ou}var au,mp;function yp(){return mp||(mp=1,au=Function.call.bind(Object.prototype.hasOwnProperty)),au}var lu,vp;function JS(){if(vp)return lu;vp=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=su(),n={},o=yp();e=function(a){var u="Warning: "+a;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function s(a,u,c,d,p){if(process.env.NODE_ENV!=="production"){for(var y in a)if(o(a,y)){var g;try{if(typeof a[y]!="function"){var _=Error((d||"React class")+": "+c+" type `"+y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[y]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}g=a[y](u,y,d,c,null,t)}catch(E){g=E}if(g&&!(g instanceof Error)&&e((d||"React class")+": type specification of "+c+" `"+y+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in n)){n[g.message]=!0;var C=p?p():"";e("Failed "+c+" type: "+g.message+(C??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},lu=s,lu}var uu,bp;function RS(){if(bp)return uu;bp=1;var e=hp(),t=KS(),n=su(),o=yp(),s=JS(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(c){var d="Warning: "+c;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function u(){return null}return uu=function(c,d){var p=typeof Symbol=="function"&&Symbol.iterator,y="@@iterator";function g(K){var Y=K&&(p&&K[p]||K[y]);if(typeof Y=="function")return Y}var _="<<anonymous>>",C={array:N("array"),bigint:N("bigint"),bool:N("boolean"),func:N("function"),number:N("number"),object:N("object"),string:N("string"),symbol:N("symbol"),any:X(),arrayOf:W,element:D(),elementType:k(),instanceOf:L,node:S(),objectOf:le,oneOf:J,oneOfType:ne,shape:re,exact:ce};function E(K,Y){return K===Y?K!==0||1/K===1/Y:K!==K&&Y!==Y}function T(K,Y){this.message=K,this.data=Y&&typeof Y=="object"?Y:{},this.stack=""}T.prototype=Error.prototype;function P(K){if(process.env.NODE_ENV!=="production")var Y={},ge=0;function Q(H,ee,fe,be,me,xe,qe){if(be=be||_,xe=xe||fe,qe!==n){if(d){var te=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 te.name="Invariant Violation",te}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var yt=be+":"+fe;!Y[yt]&&ge<3&&(a("You are manually calling a React.PropTypes validation function for the `"+xe+"` prop on `"+be+"`. 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."),Y[yt]=!0,ge++)}}return ee[fe]==null?H?ee[fe]===null?new T("The "+me+" `"+xe+"` is marked as required "+("in `"+be+"`, but its value is `null`.")):new T("The "+me+" `"+xe+"` is marked as required in "+("`"+be+"`, but its value is `undefined`.")):null:K(ee,fe,be,me,xe)}var q=Q.bind(null,!1);return q.isRequired=Q.bind(null,!0),q}function N(K){function Y(ge,Q,q,H,ee,fe){var be=ge[Q],me=_e(be);if(me!==K){var xe=ke(be);return new T("Invalid "+H+" `"+ee+"` of type "+("`"+xe+"` supplied to `"+q+"`, expected ")+("`"+K+"`."),{expectedType:K})}return null}return P(Y)}function X(){return P(u)}function W(K){function Y(ge,Q,q,H,ee){if(typeof K!="function")return new T("Property `"+ee+"` of component `"+q+"` has invalid PropType notation inside arrayOf.");var fe=ge[Q];if(!Array.isArray(fe)){var be=_e(fe);return new T("Invalid "+H+" `"+ee+"` of type "+("`"+be+"` supplied to `"+q+"`, expected an array."))}for(var me=0;me<fe.length;me++){var xe=K(fe,me,q,H,ee+"["+me+"]",n);if(xe instanceof Error)return xe}return null}return P(Y)}function D(){function K(Y,ge,Q,q,H){var ee=Y[ge];if(!c(ee)){var fe=_e(ee);return new T("Invalid "+q+" `"+H+"` of type "+("`"+fe+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return P(K)}function k(){function K(Y,ge,Q,q,H){var ee=Y[ge];if(!e.isValidElementType(ee)){var fe=_e(ee);return new T("Invalid "+q+" `"+H+"` of type "+("`"+fe+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return P(K)}function L(K){function Y(ge,Q,q,H,ee){if(!(ge[Q]instanceof K)){var fe=K.name||_,be=mt(ge[Q]);return new T("Invalid "+H+" `"+ee+"` of type "+("`"+be+"` supplied to `"+q+"`, expected ")+("instance of `"+fe+"`."))}return null}return P(Y)}function J(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("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])."):a("Invalid argument supplied to oneOf, expected an array.")),u;function Y(ge,Q,q,H,ee){for(var fe=ge[Q],be=0;be<K.length;be++)if(E(fe,K[be]))return null;var me=JSON.stringify(K,function(qe,te){var yt=ke(te);return yt==="symbol"?String(te):te});return new T("Invalid "+H+" `"+ee+"` of value `"+String(fe)+"` "+("supplied to `"+q+"`, expected one of "+me+"."))}return P(Y)}function le(K){function Y(ge,Q,q,H,ee){if(typeof K!="function")return new T("Property `"+ee+"` of component `"+q+"` has invalid PropType notation inside objectOf.");var fe=ge[Q],be=_e(fe);if(be!=="object")return new T("Invalid "+H+" `"+ee+"` of type "+("`"+be+"` supplied to `"+q+"`, expected an object."));for(var me in fe)if(o(fe,me)){var xe=K(fe,me,q,H,ee+"."+me,n);if(xe instanceof Error)return xe}return null}return P(Y)}function ne(K){if(!Array.isArray(K))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var Y=0;Y<K.length;Y++){var ge=K[Y];if(typeof ge!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+De(ge)+" at index "+Y+"."),u}function Q(q,H,ee,fe,be){for(var me=[],xe=0;xe<K.length;xe++){var qe=K[xe],te=qe(q,H,ee,fe,be,n);if(te==null)return null;te.data&&o(te.data,"expectedType")&&me.push(te.data.expectedType)}var yt=me.length>0?", expected one of type ["+me.join(", ")+"]":"";return new T("Invalid "+fe+" `"+be+"` supplied to "+("`"+ee+"`"+yt+"."))}return P(Q)}function S(){function K(Y,ge,Q,q,H){return he(Y[ge])?null:new T("Invalid "+q+" `"+H+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return P(K)}function j(K,Y,ge,Q,q){return new T((K||"React class")+": "+Y+" type `"+ge+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+q+"`.")}function re(K){function Y(ge,Q,q,H,ee){var fe=ge[Q],be=_e(fe);if(be!=="object")return new T("Invalid "+H+" `"+ee+"` of type `"+be+"` "+("supplied to `"+q+"`, expected `object`."));for(var me in K){var xe=K[me];if(typeof xe!="function")return j(q,H,ee,me,ke(xe));var qe=xe(fe,me,q,H,ee+"."+me,n);if(qe)return qe}return null}return P(Y)}function ce(K){function Y(ge,Q,q,H,ee){var fe=ge[Q],be=_e(fe);if(be!=="object")return new T("Invalid "+H+" `"+ee+"` of type `"+be+"` "+("supplied to `"+q+"`, expected `object`."));var me=t({},ge[Q],K);for(var xe in me){var qe=K[xe];if(o(K,xe)&&typeof qe!="function")return j(q,H,ee,xe,ke(qe));if(!qe)return new T("Invalid "+H+" `"+ee+"` key `"+xe+"` supplied to `"+q+"`.\nBad object: "+JSON.stringify(ge[Q],null," ")+`
|
|
191
|
+
Valid keys: `+JSON.stringify(Object.keys(K),null," "));var te=qe(fe,xe,q,H,ee+"."+xe,n);if(te)return te}return null}return P(Y)}function he(K){switch(typeof K){case"number":case"string":case"undefined":return!0;case"boolean":return!K;case"object":if(Array.isArray(K))return K.every(he);if(K===null||c(K))return!0;var Y=g(K);if(Y){var ge=Y.call(K),Q;if(Y!==K.entries){for(;!(Q=ge.next()).done;)if(!he(Q.value))return!1}else for(;!(Q=ge.next()).done;){var q=Q.value;if(q&&!he(q[1]))return!1}}else return!1;return!0;default:return!1}}function Le(K,Y){return K==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function _e(K){var Y=typeof K;return Array.isArray(K)?"array":K instanceof RegExp?"object":Le(Y,K)?"symbol":Y}function ke(K){if(typeof K>"u"||K===null)return""+K;var Y=_e(K);if(Y==="object"){if(K instanceof Date)return"date";if(K instanceof RegExp)return"regexp"}return Y}function De(K){var Y=ke(K);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function mt(K){return!K.constructor||!K.constructor.name?_:K.constructor.name}return C.checkPropTypes=s,C.resetWarningCache=s.resetWarningCache,C.PropTypes=C,C},uu}var cu,_p;function ZS(){if(_p)return cu;_p=1;var e=su();function t(){}function n(){}return n.resetWarningCache=t,cu=function(){function o(u,c,d,p,y,g){if(g!==e){var _=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 _.name="Invariant Violation",_}}o.isRequired=o;function s(){return o}var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:s,element:o,elementType:o,instanceOf:s,node:o,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},cu}if(process.env.NODE_ENV!=="production"){var XS=hp(),QS=!0;ru.exports=RS()(XS.isElement,QS)}else ru.exports=ZS()();var eC=ru.exports;const Ne=nr(eC);function ar(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${n} for the full message.`}function wp(e,t=""){return e.displayName||e.name||t}function Tp(e,t,n){const o=wp(t);return e.displayName||(o!==""?`${n}(${o})`:n)}function tC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return wp(e,"Component");if(typeof e=="object")switch(e.$$typeof){case hs.ForwardRef:return Tp(e,e.render,"ForwardRef");case hs.Memo:return Tp(e,e.type,"memo");default:return}}}function Nr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":ar(7));return e.charAt(0).toUpperCase()+e.slice(1)}function fu(e,t){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const s=o;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],u=t[s];if(!u)n[s]=a||{};else if(!a)n[s]=u;else{n[s]={...u};for(const c in a)if(Object.prototype.hasOwnProperty.call(a,c)){const d=c;n[s][d]=fu(a[d],u[d])}}}else n[s]===void 0&&(n[s]=e[s])}return n}function nC(e,t,n=void 0){const o={};for(const s in e){const a=e[s];let u="",c=!0;for(let d=0;d<a.length;d+=1){const p=a[d];p&&(u+=(c===!0?"":" ")+t(p),c=!1,n&&n[p]&&(u+=" "+n[p]))}o[s]=u}return o}const Sp=e=>e,rC=(()=>{let e=Sp;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Sp}}})(),iC={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 du(e,t,n="Mui"){const o=iC[t];return o?`${n}-${o}`:`${rC.generate(e)}-${t}`}function oC(e,t,n="Mui"){const o={};return t.forEach(s=>{o[s]=du(e,s,n)}),o}function sC(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function to(e,t){return t?Yt(e,t,{clone:!1}):e}const lr=process.env.NODE_ENV!=="production"?Ne.oneOfType([Ne.number,Ne.string,Ne.object,Ne.array]):{};function aC(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(o=>o.startsWith("@container")).sort((o,s)=>{var u,c;const a=/min-width:\s*([0-9.]+)/;return+(((u=o.match(a))==null?void 0:u[1])||0)-+(((c=s.match(a))==null?void 0:c[1])||0)});return n.length?n.reduce((o,s)=>{const a=t[s];return delete o[s],o[s]=a,o},{...t}):t}function lC(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function uC(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
192
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:ar(18,`(${t})`));return null}const[,o,s]=n,a=Number.isNaN(+o)?o||0:+o;return e.containerQueries(s).up(a)}function cC(e){const t=(a,u)=>a.replace("@media",u?`@container ${u}`:"@container");function n(a,u){a.up=(...c)=>t(e.breakpoints.up(...c),u),a.down=(...c)=>t(e.breakpoints.down(...c),u),a.between=(...c)=>t(e.breakpoints.between(...c),u),a.only=(...c)=>t(e.breakpoints.only(...c),u),a.not=(...c)=>{const d=t(e.breakpoints.not(...c),u);return d.includes("not all and")?d.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):d}}const o={},s=a=>(n(o,a),o);return n(s),{...e,containerQueries:s}}const gs={xs:0,sm:600,md:900,lg:1200,xl:1536},Cp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${gs[e]}px)`},fC={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:gs[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Gn(e,t,n){const o=e.theme||{};if(Array.isArray(t)){const a=o.breakpoints||Cp;return t.reduce((u,c,d)=>(u[a.up(a.keys[d])]=n(t[d]),u),{})}if(typeof t=="object"){const a=o.breakpoints||Cp;return Object.keys(t).reduce((u,c)=>{if(lC(a.keys,c)){const d=uC(o.containerQueries?o:fC,c);d&&(u[d]=n(t[c],c))}else if(Object.keys(a.values||gs).includes(c)){const d=a.up(c);u[d]=n(t[c],c)}else{const d=c;u[d]=t[d]}return u},{})}return n(t)}function dC(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((o,s)=>{const a=e.up(s);return o[a]={},o},{}))||{}}function hC(e,t){return e.reduce((n,o)=>{const s=n[o];return(!s||Object.keys(s).length===0)&&delete n[o],n},t)}function ms(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const o=`vars.${t}`.split(".").reduce((s,a)=>s&&s[a]?s[a]:null,e);if(o!=null)return o}return t.split(".").reduce((o,s)=>o&&o[s]!=null?o[s]:null,e)}function ys(e,t,n,o=n){let s;return typeof e=="function"?s=e(n):Array.isArray(e)?s=e[n]||o:s=ms(e,n)||o,t&&(s=t(s,o,e)),s}function ft(e){const{prop:t,cssProperty:n=e.prop,themeKey:o,transform:s}=e,a=u=>{if(u[t]==null)return null;const c=u[t],d=u.theme,p=ms(d,o)||{};return Gn(u,c,g=>{let _=ys(p,s,g);return g===_&&typeof g=="string"&&(_=ys(p,s,`${t}${g==="default"?"":Nr(g)}`,g)),n===!1?_:{[n]:_}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:lr}:{},a.filterProps=[t],a}function pC(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const gC={m:"margin",p:"padding"},mC={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Ep={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},yC=pC(e=>{if(e.length>2)if(Ep[e])e=Ep[e];else return[e];const[t,n]=e.split(""),o=gC[t],s=mC[n]||"";return Array.isArray(s)?s.map(a=>o+a):[o+s]}),vs=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],bs=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],vC=[...vs,...bs];function no(e,t,n,o){const s=ms(e,t,!0)??n;return typeof s=="number"||typeof s=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${o} argument to be a number or a string, got ${a}.`),typeof s=="string"?`calc(${a} * ${s})`:s*a):Array.isArray(s)?a=>{if(typeof a=="string")return a;const u=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(u)?u>s.length-1&&console.error([`MUI: The value provided (${u}) overflows.`,`The supported values are: ${JSON.stringify(s)}.`,`${u} > ${s.length-1}, you need to add the missing values.`].join(`
|
|
193
193
|
`)):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(`
|
|
194
194
|
`)));const c=s[u];return a>=0?c:typeof c=="number"?-c:`-${c}`}:typeof s=="function"?s:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${s}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
195
|
-
`)),()=>{})}function lu(e){return oo(e,"spacing",8,"spacing")}function so(e,t){return typeof t=="string"||t==null?t:e(t)}function vC(e,t){return n=>e.reduce((o,s)=>(o[s]=so(t,n),o),{})}function bC(e,t,n,o){if(!t.includes(n))return null;const s=mC(n),a=vC(s,o),u=e[n];return Gn(e,u,a)}function Sp(e,t){const n=lu(e.theme);return Object.keys(e).map(o=>bC(e,t,o,n)).reduce(io,{})}function st(e){return Sp(e,bs)}st.propTypes=process.env.NODE_ENV!=="production"?bs.reduce((e,t)=>(e[t]=cr,e),{}):{},st.filterProps=bs;function at(e){return Sp(e,_s)}at.propTypes=process.env.NODE_ENV!=="production"?_s.reduce((e,t)=>(e[t]=cr,e),{}):{},at.filterProps=_s,process.env.NODE_ENV!=="production"&&yC.reduce((e,t)=>(e[t]=cr,e),{});function Ts(...e){const t=e.reduce((o,s)=>(s.filterProps.forEach(a=>{o[a]=s}),o),{}),n=o=>Object.keys(o).reduce((s,a)=>t[a]?io(s,t[a](o)):s,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,s)=>Object.assign(o,s.propTypes),{}):{},n.filterProps=e.reduce((o,s)=>o.concat(s.filterProps),[]),n}function rn(e){return typeof e!="number"?e:`${e}px solid`}function on(e,t){return dt({prop:e,themeKey:"borders",transform:t})}const _C=on("border",rn),TC=on("borderTop",rn),wC=on("borderRight",rn),SC=on("borderBottom",rn),CC=on("borderLeft",rn),EC=on("borderColor"),xC=on("borderTopColor"),AC=on("borderRightColor"),OC=on("borderBottomColor"),IC=on("borderLeftColor"),PC=on("outline",rn),$C=on("outlineColor"),ws=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=oo(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:so(t,o)});return Gn(e,e.borderRadius,n)}return null};ws.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:cr}:{},ws.filterProps=["borderRadius"],Ts(_C,TC,wC,SC,CC,EC,xC,AC,OC,IC,ws,PC,$C);const Ss=e=>{if(e.gap!==void 0&&e.gap!==null){const t=oo(e.theme,"spacing",8,"gap"),n=o=>({gap:so(t,o)});return Gn(e,e.gap,n)}return null};Ss.propTypes=process.env.NODE_ENV!=="production"?{gap:cr}:{},Ss.filterProps=["gap"];const Cs=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=oo(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:so(t,o)});return Gn(e,e.columnGap,n)}return null};Cs.propTypes=process.env.NODE_ENV!=="production"?{columnGap:cr}:{},Cs.filterProps=["columnGap"];const Es=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=oo(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:so(t,o)});return Gn(e,e.rowGap,n)}return null};Es.propTypes=process.env.NODE_ENV!=="production"?{rowGap:cr}:{},Es.filterProps=["rowGap"];const MC=dt({prop:"gridColumn"}),FC=dt({prop:"gridRow"}),DC=dt({prop:"gridAutoFlow"}),kC=dt({prop:"gridAutoColumns"}),NC=dt({prop:"gridAutoRows"}),LC=dt({prop:"gridTemplateColumns"}),BC=dt({prop:"gridTemplateRows"}),zC=dt({prop:"gridTemplateAreas"}),UC=dt({prop:"gridArea"});Ts(Ss,Cs,Es,MC,FC,DC,kC,NC,LC,BC,zC,UC);function ci(e,t){return t==="grey"?t:e}const jC=dt({prop:"color",themeKey:"palette",transform:ci}),WC=dt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ci}),VC=dt({prop:"backgroundColor",themeKey:"palette",transform:ci});Ts(jC,WC,VC);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const GC=dt({prop:"width",transform:Jt}),uu=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var s,a,u,c,h;const o=((u=(a=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:a.values)==null?void 0:u[n])||ms[n];return o?((h=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:h.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Jt(n)}};return Gn(e,e.maxWidth,t)}return null};uu.filterProps=["maxWidth"];const HC=dt({prop:"minWidth",transform:Jt}),qC=dt({prop:"height",transform:Jt}),YC=dt({prop:"maxHeight",transform:Jt}),KC=dt({prop:"minHeight",transform:Jt});dt({prop:"size",cssProperty:"width",transform:Jt}),dt({prop:"size",cssProperty:"height",transform:Jt});const JC=dt({prop:"boxSizing"});Ts(GC,uu,HC,qC,YC,KC,JC);const xs={border:{themeKey:"borders",transform:rn},borderTop:{themeKey:"borders",transform:rn},borderRight:{themeKey:"borders",transform:rn},borderBottom:{themeKey:"borders",transform:rn},borderLeft:{themeKey:"borders",transform:rn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:rn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ws},color:{themeKey:"palette",transform:ci},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ci},backgroundColor:{themeKey:"palette",transform:ci},p:{style:at},pt:{style:at},pr:{style:at},pb:{style:at},pl:{style:at},px:{style:at},py:{style:at},padding:{style:at},paddingTop:{style:at},paddingRight:{style:at},paddingBottom:{style:at},paddingLeft:{style:at},paddingX:{style:at},paddingY:{style:at},paddingInline:{style:at},paddingInlineStart:{style:at},paddingInlineEnd:{style:at},paddingBlock:{style:at},paddingBlockStart:{style:at},paddingBlockEnd:{style:at},m:{style:st},mt:{style:st},mr:{style:st},mb:{style:st},ml:{style:st},mx:{style:st},my:{style:st},margin:{style:st},marginTop:{style:st},marginRight:{style:st},marginBottom:{style:st},marginLeft:{style:st},marginX:{style:st},marginY:{style:st},marginInline:{style:st},marginInlineStart:{style:st},marginInlineEnd:{style:st},marginBlock:{style:st},marginBlockStart:{style:st},marginBlockEnd:{style:st},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:Ss},rowGap:{style:Es},columnGap:{style:Cs},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Jt},maxWidth:{style:uu},minWidth:{transform:Jt},height:{transform:Jt},maxHeight:{transform:Jt},minHeight:{transform:Jt},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 ZC(...e){const t=e.reduce((o,s)=>o.concat(Object.keys(s)),[]),n=new Set(t);return e.every(o=>n.size===Object.keys(o).length)}function RC(e,t){return typeof e=="function"?e(t):e}function XC(){function e(n,o,s,a){const u={[n]:o,theme:s},c=a[n];if(!c)return{[n]:o};const{cssProperty:h=n,themeKey:p,transform:y,style:g}=c;if(o==null)return null;if(p==="typography"&&o==="inherit")return{[n]:o};const _=ys(s,p)||{};return g?g(u):Gn(u,o,E=>{let w=vs(_,y,E);return E===w&&typeof E=="string"&&(w=vs(_,y,`${n}${E==="default"?"":Lr(E)}`,E)),h===!1?w:{[h]:w}})}function t(n){const{sx:o,theme:s={}}=n||{};if(!o)return null;const a=s.unstable_sxConfig??xs;function u(c){let h=c;if(typeof c=="function")h=c(s);else if(typeof c!="object")return c;if(!h)return null;const p=fC(s.breakpoints),y=Object.keys(p);let g=p;return Object.keys(h).forEach(_=>{const C=RC(h[_],s);if(C!=null)if(typeof C=="object")if(a[_])g=io(g,e(_,C,s,a));else{const E=Gn({theme:s},C,w=>({[_]:w}));ZC(E,C)?g[_]=t({sx:C,theme:s}):g=io(g,E)}else g=io(g,e(_,C,s,a))}),sC(s,dC(y,g))}return Array.isArray(o)?o.map(u):u(o)}return t}const fi=XC();fi.filterProps=["sx"];function cu(){return cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},cu.apply(null,arguments)}function QC(e){for(var t=0,n,o=0,s=e.length;s>=4;++o,s-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&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 eE={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 Cp(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var tE=/[A-Z]|^ms/g,nE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ep=function(t){return t.charCodeAt(1)===45},xp=function(t){return t!=null&&typeof t!="boolean"},fu=Cp(function(e){return Ep(e)?e:e.replace(tE,"-$&").toLowerCase()}),Ap=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(nE,function(o,s,a){return Pn={name:s,styles:a,next:Pn},s})}return eE[t]!==1&&!Ep(t)&&typeof n=="number"&&n!==0?n+"px":n};function ao(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Pn={name:s.name,styles:s.styles,next:Pn},s.name;var a=n;if(a.styles!==void 0){var u=a.next;if(u!==void 0)for(;u!==void 0;)Pn={name:u.name,styles:u.styles,next:Pn},u=u.next;var c=a.styles+";";return c}return rE(e,t,n)}case"function":{if(e!==void 0){var h=Pn,p=n(e);return Pn=h,ao(e,t,p)}break}}var y=n;if(t==null)return y;var g=t[y];return g!==void 0?g:y}function rE(e,t,n){var o="";if(Array.isArray(n))for(var s=0;s<n.length;s++)o+=ao(e,t,n[s])+";";else for(var a in n){var u=n[a];if(typeof u!="object"){var c=u;t!=null&&t[c]!==void 0?o+=a+"{"+t[c]+"}":xp(c)&&(o+=fu(a)+":"+Ap(a,c)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var h=0;h<u.length;h++)xp(u[h])&&(o+=fu(a)+":"+Ap(a,u[h])+";");else{var p=ao(e,t,u);switch(a){case"animation":case"animationName":{o+=fu(a)+":"+p+";";break}default:o+=a+"{"+p+"}"}}}return o}var Op=/label:\s*([^\s;{]+)\s*(;|$)/g,Pn;function Ip(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,s="";Pn=void 0;var a=e[0];if(a==null||a.raw===void 0)o=!1,s+=ao(n,t,a);else{var u=a;s+=u[0]}for(var c=1;c<e.length;c++)if(s+=ao(n,t,e[c]),o){var h=a;s+=h[c]}Op.lastIndex=0;for(var p="",y;(y=Op.exec(s))!==null;)p+="-"+y[1];var g=QC(s)+p;return{name:g,styles:s,next:Pn}}var iE=function(t){return t()},oE=Ft.useInsertionEffect?Ft.useInsertionEffect:!1,sE=oE||iE,aE=!0;function lE(e,t,n){var o="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(o+=s+" ")}),o}var Pp=function(t,n,o){var s=t.key+"-"+n.name;(o===!1||aE===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},uE=function(t,n,o){Pp(t,n,o);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+s:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}},cE=/^((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)-.*))$/,fE=Cp(function(e){return cE.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),dE=fE,hE=function(t){return t!=="theme"},$p=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?dE:hE},Mp=function(t,n,o){var s;if(n){var a=n.shouldForwardProp;s=t.__emotion_forwardProp&&a?function(u){return t.__emotion_forwardProp(u)&&a(u)}:a}return typeof s!="function"&&o&&(s=t.__emotion_forwardProp),s},pE=function(t){var n=t.cache,o=t.serialized,s=t.isStringTag;return Pp(n,o,s),sE(function(){return uE(n,o,s)}),null},gE=function e(t,n){var o=t.__emotion_real===t,s=o&&t.__emotion_base||t,a,u;n!==void 0&&(a=n.label,u=n.target);var c=Mp(t,n,o),h=c||$p(s),p=!h("as");return function(){var y=arguments,g=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&g.push("label:"+a+";"),y[0]==null||y[0].raw===void 0)g.push.apply(g,y);else{var _=y[0];g.push(_[0]);for(var C=y.length,E=1;E<C;E++)g.push(y[E],_[E])}var w=Ef.withEmotionCache(function(P,N,R){var W=p&&P.as||s,B="",D=[],k=P;if(P.theme==null){k={};for(var H in P)k[H]=P[H];k.theme=Ft.useContext(Ef.ThemeContext)}typeof P.className=="string"?B=lE(N.registered,D,P.className):P.className!=null&&(B=P.className+" ");var ae=Ip(g.concat(D),N.registered,k);B+=N.key+"-"+ae.name,u!==void 0&&(B+=" "+u);var oe=p&&c===void 0?$p(W):h,S={};for(var U in P)p&&U==="as"||oe(U)&&(S[U]=P[U]);return S.className=B,R&&(S.ref=R),Ft.createElement(Ft.Fragment,null,Ft.createElement(pE,{cache:N,serialized:ae,isStringTag:typeof W=="string"}),Ft.createElement(W,S))});return w.displayName=a!==void 0?a:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",w.defaultProps=t.defaultProps,w.__emotion_real=w,w.__emotion_base=s,w.__emotion_styles=g,w.__emotion_forwardProp=c,Object.defineProperty(w,"toString",{value:function(){return"."+u}}),w.withComponent=function(P,N){var R=e(P,cu({},n,N,{shouldForwardProp:Mp(w,N,!0)}));return R.apply(void 0,g)},w}},mE=["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"],du=gE.bind(null);mE.forEach(function(e){du[e]=du(e)});/**
|
|
195
|
+
`)),()=>{})}function hu(e){return no(e,"spacing",8,"spacing")}function ro(e,t){return typeof t=="string"||t==null?t:e(t)}function bC(e,t){return n=>e.reduce((o,s)=>(o[s]=ro(t,n),o),{})}function _C(e,t,n,o){if(!t.includes(n))return null;const s=yC(n),a=bC(s,o),u=e[n];return Gn(e,u,a)}function xp(e,t){const n=hu(e.theme);return Object.keys(e).map(o=>_C(e,t,o,n)).reduce(to,{})}function st(e){return xp(e,vs)}st.propTypes=process.env.NODE_ENV!=="production"?vs.reduce((e,t)=>(e[t]=lr,e),{}):{},st.filterProps=vs;function at(e){return xp(e,bs)}at.propTypes=process.env.NODE_ENV!=="production"?bs.reduce((e,t)=>(e[t]=lr,e),{}):{},at.filterProps=bs,process.env.NODE_ENV!=="production"&&vC.reduce((e,t)=>(e[t]=lr,e),{});function _s(...e){const t=e.reduce((o,s)=>(s.filterProps.forEach(a=>{o[a]=s}),o),{}),n=o=>Object.keys(o).reduce((s,a)=>t[a]?to(s,t[a](o)):s,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,s)=>Object.assign(o,s.propTypes),{}):{},n.filterProps=e.reduce((o,s)=>o.concat(s.filterProps),[]),n}function nn(e){return typeof e!="number"?e:`${e}px solid`}function rn(e,t){return ft({prop:e,themeKey:"borders",transform:t})}const wC=rn("border",nn),TC=rn("borderTop",nn),SC=rn("borderRight",nn),CC=rn("borderBottom",nn),EC=rn("borderLeft",nn),xC=rn("borderColor"),AC=rn("borderTopColor"),OC=rn("borderRightColor"),IC=rn("borderBottomColor"),PC=rn("borderLeftColor"),$C=rn("outline",nn),MC=rn("outlineColor"),ws=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=no(e.theme,"shape.borderRadius",4,"borderRadius"),n=o=>({borderRadius:ro(t,o)});return Gn(e,e.borderRadius,n)}return null};ws.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:lr}:{},ws.filterProps=["borderRadius"],_s(wC,TC,SC,CC,EC,xC,AC,OC,IC,PC,ws,$C,MC);const Ts=e=>{if(e.gap!==void 0&&e.gap!==null){const t=no(e.theme,"spacing",8,"gap"),n=o=>({gap:ro(t,o)});return Gn(e,e.gap,n)}return null};Ts.propTypes=process.env.NODE_ENV!=="production"?{gap:lr}:{},Ts.filterProps=["gap"];const Ss=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=no(e.theme,"spacing",8,"columnGap"),n=o=>({columnGap:ro(t,o)});return Gn(e,e.columnGap,n)}return null};Ss.propTypes=process.env.NODE_ENV!=="production"?{columnGap:lr}:{},Ss.filterProps=["columnGap"];const Cs=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=no(e.theme,"spacing",8,"rowGap"),n=o=>({rowGap:ro(t,o)});return Gn(e,e.rowGap,n)}return null};Cs.propTypes=process.env.NODE_ENV!=="production"?{rowGap:lr}:{},Cs.filterProps=["rowGap"];const FC=ft({prop:"gridColumn"}),kC=ft({prop:"gridRow"}),DC=ft({prop:"gridAutoFlow"}),NC=ft({prop:"gridAutoColumns"}),LC=ft({prop:"gridAutoRows"}),BC=ft({prop:"gridTemplateColumns"}),zC=ft({prop:"gridTemplateRows"}),UC=ft({prop:"gridTemplateAreas"}),jC=ft({prop:"gridArea"});_s(Ts,Ss,Cs,FC,kC,DC,NC,LC,BC,zC,UC,jC);function si(e,t){return t==="grey"?t:e}const WC=ft({prop:"color",themeKey:"palette",transform:si}),VC=ft({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:si}),GC=ft({prop:"backgroundColor",themeKey:"palette",transform:si});_s(WC,VC,GC);function Kt(e){return e<=1&&e!==0?`${e*100}%`:e}const HC=ft({prop:"width",transform:Kt}),pu=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var s,a,u,c,d;const o=((u=(a=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:a.values)==null?void 0:u[n])||gs[n];return o?((d=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:d.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Kt(n)}};return Gn(e,e.maxWidth,t)}return null};pu.filterProps=["maxWidth"];const qC=ft({prop:"minWidth",transform:Kt}),YC=ft({prop:"height",transform:Kt}),KC=ft({prop:"maxHeight",transform:Kt}),JC=ft({prop:"minHeight",transform:Kt});ft({prop:"size",cssProperty:"width",transform:Kt}),ft({prop:"size",cssProperty:"height",transform:Kt});const RC=ft({prop:"boxSizing"});_s(HC,pu,qC,YC,KC,JC,RC);const Es={border:{themeKey:"borders",transform:nn},borderTop:{themeKey:"borders",transform:nn},borderRight:{themeKey:"borders",transform:nn},borderBottom:{themeKey:"borders",transform:nn},borderLeft:{themeKey:"borders",transform:nn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:nn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ws},color:{themeKey:"palette",transform:si},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:si},backgroundColor:{themeKey:"palette",transform:si},p:{style:at},pt:{style:at},pr:{style:at},pb:{style:at},pl:{style:at},px:{style:at},py:{style:at},padding:{style:at},paddingTop:{style:at},paddingRight:{style:at},paddingBottom:{style:at},paddingLeft:{style:at},paddingX:{style:at},paddingY:{style:at},paddingInline:{style:at},paddingInlineStart:{style:at},paddingInlineEnd:{style:at},paddingBlock:{style:at},paddingBlockStart:{style:at},paddingBlockEnd:{style:at},m:{style:st},mt:{style:st},mr:{style:st},mb:{style:st},ml:{style:st},mx:{style:st},my:{style:st},margin:{style:st},marginTop:{style:st},marginRight:{style:st},marginBottom:{style:st},marginLeft:{style:st},marginX:{style:st},marginY:{style:st},marginInline:{style:st},marginInlineStart:{style:st},marginInlineEnd:{style:st},marginBlock:{style:st},marginBlockStart:{style:st},marginBlockEnd:{style:st},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:Ts},rowGap:{style:Cs},columnGap:{style:Ss},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Kt},maxWidth:{style:pu},minWidth:{transform:Kt},height:{transform:Kt},maxHeight:{transform:Kt},minHeight:{transform:Kt},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 ZC(...e){const t=e.reduce((o,s)=>o.concat(Object.keys(s)),[]),n=new Set(t);return e.every(o=>n.size===Object.keys(o).length)}function XC(e,t){return typeof e=="function"?e(t):e}function QC(){function e(n,o,s,a){const u={[n]:o,theme:s},c=a[n];if(!c)return{[n]:o};const{cssProperty:d=n,themeKey:p,transform:y,style:g}=c;if(o==null)return null;if(p==="typography"&&o==="inherit")return{[n]:o};const _=ms(s,p)||{};return g?g(u):Gn(u,o,E=>{let T=ys(_,y,E);return E===T&&typeof E=="string"&&(T=ys(_,y,`${n}${E==="default"?"":Nr(E)}`,E)),d===!1?T:{[d]:T}})}function t(n){const{sx:o,theme:s={}}=n||{};if(!o)return null;const a=s.unstable_sxConfig??Es;function u(c){let d=c;if(typeof c=="function")d=c(s);else if(typeof c!="object")return c;if(!d)return null;const p=dC(s.breakpoints),y=Object.keys(p);let g=p;return Object.keys(d).forEach(_=>{const C=XC(d[_],s);if(C!=null)if(typeof C=="object")if(a[_])g=to(g,e(_,C,s,a));else{const E=Gn({theme:s},C,T=>({[_]:T}));ZC(E,C)?g[_]=t({sx:C,theme:s}):g=to(g,E)}else g=to(g,e(_,C,s,a))}),aC(s,hC(y,g))}return Array.isArray(o)?o.map(u):u(o)}return t}const ai=QC();ai.filterProps=["sx"];function gu(){return gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},gu.apply(null,arguments)}function eE(e){for(var t=0,n,o=0,s=e.length;s>=4;++o,s-=4)n=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&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 tE={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 Ap(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var nE=/[A-Z]|^ms/g,rE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Op=function(t){return t.charCodeAt(1)===45},Ip=function(t){return t!=null&&typeof t!="boolean"},mu=Ap(function(e){return Op(e)?e:e.replace(nE,"-$&").toLowerCase()}),Pp=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(rE,function(o,s,a){return Pn={name:s,styles:a,next:Pn},s})}return tE[t]!==1&&!Op(t)&&typeof n=="number"&&n!==0?n+"px":n};function io(e,t,n){if(n==null)return"";var o=n;if(o.__emotion_styles!==void 0)return o;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Pn={name:s.name,styles:s.styles,next:Pn},s.name;var a=n;if(a.styles!==void 0){var u=a.next;if(u!==void 0)for(;u!==void 0;)Pn={name:u.name,styles:u.styles,next:Pn},u=u.next;var c=a.styles+";";return c}return iE(e,t,n)}case"function":{if(e!==void 0){var d=Pn,p=n(e);return Pn=d,io(e,t,p)}break}}var y=n;if(t==null)return y;var g=t[y];return g!==void 0?g:y}function iE(e,t,n){var o="";if(Array.isArray(n))for(var s=0;s<n.length;s++)o+=io(e,t,n[s])+";";else for(var a in n){var u=n[a];if(typeof u!="object"){var c=u;t!=null&&t[c]!==void 0?o+=a+"{"+t[c]+"}":Ip(c)&&(o+=mu(a)+":"+Pp(a,c)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var d=0;d<u.length;d++)Ip(u[d])&&(o+=mu(a)+":"+Pp(a,u[d])+";");else{var p=io(e,t,u);switch(a){case"animation":case"animationName":{o+=mu(a)+":"+p+";";break}default:o+=a+"{"+p+"}"}}}return o}var $p=/label:\s*([^\s;{]+)\s*(;|$)/g,Pn;function Mp(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var o=!0,s="";Pn=void 0;var a=e[0];if(a==null||a.raw===void 0)o=!1,s+=io(n,t,a);else{var u=a;s+=u[0]}for(var c=1;c<e.length;c++)if(s+=io(n,t,e[c]),o){var d=a;s+=d[c]}$p.lastIndex=0;for(var p="",y;(y=$p.exec(s))!==null;)p+="-"+y[1];var g=eE(s)+p;return{name:g,styles:s,next:Pn}}var oE=function(t){return t()},sE=Mt.useInsertionEffect?Mt.useInsertionEffect:!1,aE=sE||oE,lE=!0;function uE(e,t,n){var o="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(o+=s+" ")}),o}var Fp=function(t,n,o){var s=t.key+"-"+n.name;(o===!1||lE===!1)&&t.registered[s]===void 0&&(t.registered[s]=n.styles)},cE=function(t,n,o){Fp(t,n,o);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+s:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}},fE=/^((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)-.*))$/,dE=Ap(function(e){return fE.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),hE=dE,pE=function(t){return t!=="theme"},kp=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?hE:pE},Dp=function(t,n,o){var s;if(n){var a=n.shouldForwardProp;s=t.__emotion_forwardProp&&a?function(u){return t.__emotion_forwardProp(u)&&a(u)}:a}return typeof s!="function"&&o&&(s=t.__emotion_forwardProp),s},gE=function(t){var n=t.cache,o=t.serialized,s=t.isStringTag;return Fp(n,o,s),aE(function(){return cE(n,o,s)}),null},mE=function e(t,n){var o=t.__emotion_real===t,s=o&&t.__emotion_base||t,a,u;n!==void 0&&(a=n.label,u=n.target);var c=Dp(t,n,o),d=c||kp(s),p=!d("as");return function(){var y=arguments,g=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&g.push("label:"+a+";"),y[0]==null||y[0].raw===void 0)g.push.apply(g,y);else{var _=y[0];g.push(_[0]);for(var C=y.length,E=1;E<C;E++)g.push(y[E],_[E])}var T=$f.withEmotionCache(function(P,N,X){var W=p&&P.as||s,D="",k=[],L=P;if(P.theme==null){L={};for(var J in P)L[J]=P[J];L.theme=Mt.useContext($f.ThemeContext)}typeof P.className=="string"?D=uE(N.registered,k,P.className):P.className!=null&&(D=P.className+" ");var le=Mp(g.concat(k),N.registered,L);D+=N.key+"-"+le.name,u!==void 0&&(D+=" "+u);var ne=p&&c===void 0?kp(W):d,S={};for(var j in P)p&&j==="as"||ne(j)&&(S[j]=P[j]);return S.className=D,X&&(S.ref=X),Mt.createElement(Mt.Fragment,null,Mt.createElement(gE,{cache:N,serialized:le,isStringTag:typeof W=="string"}),Mt.createElement(W,S))});return T.displayName=a!==void 0?a:"Styled("+(typeof s=="string"?s:s.displayName||s.name||"Component")+")",T.defaultProps=t.defaultProps,T.__emotion_real=T,T.__emotion_base=s,T.__emotion_styles=g,T.__emotion_forwardProp=c,Object.defineProperty(T,"toString",{value:function(){return"."+u}}),T.withComponent=function(P,N){var X=e(P,gu({},n,N,{shouldForwardProp:Dp(T,N,!0)}));return X.apply(void 0,g)},T}},yE=["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"],yu=mE.bind(null);yE.forEach(function(e){yu[e]=yu(e)});/**
|
|
196
196
|
* @mui/styled-engine v6.4.11
|
|
197
197
|
*
|
|
198
198
|
* @license MIT
|
|
199
199
|
* This source code is licensed under the MIT license found in the
|
|
200
200
|
* LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/function
|
|
202
|
-
`)):o.some(a=>a===void 0)&&console.error(`MUI: the styled(${s})(...args) API requires all its args to be defined.`),n(...o)}:n}function
|
|
203
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
204
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
205
|
-
`))}return P}const _=({color:
|
|
206
|
-
The color object needs to have a \`main\` property or a \`${N}\` property.`:
|
|
207
|
-
\`color.main\` should be a string, but \`${JSON.stringify(
|
|
201
|
+
*/function vE(e,t){const n=yu(e,t);return process.env.NODE_ENV!=="production"?(...o)=>{const s=typeof e=="string"?`"${e}"`:"component";return o.length===0?console.error([`MUI: Seems like you called \`styled(${s})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
202
|
+
`)):o.some(a=>a===void 0)&&console.error(`MUI: the styled(${s})(...args) API requires all its args to be defined.`),n(...o)}:n}function bE(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Np=[];function Lp(e){return Np[0]=e,Mp(Np)}const _E=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,o)=>n.val-o.val),t.reduce((n,o)=>({...n,[o.key]:o.val}),{})};function wE(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5,...s}=e,a=_E(t),u=Object.keys(a);function c(_){return`@media (min-width:${typeof t[_]=="number"?t[_]:_}${n})`}function d(_){return`@media (max-width:${(typeof t[_]=="number"?t[_]:_)-o/100}${n})`}function p(_,C){const E=u.indexOf(C);return`@media (min-width:${typeof t[_]=="number"?t[_]:_}${n}) and (max-width:${(E!==-1&&typeof t[u[E]]=="number"?t[u[E]]:C)-o/100}${n})`}function y(_){return u.indexOf(_)+1<u.length?p(_,u[u.indexOf(_)+1]):c(_)}function g(_){const C=u.indexOf(_);return C===0?c(u[1]):C===u.length-1?d(u[C]):p(_,u[u.indexOf(_)+1]).replace("@media","@media not all and")}return{keys:u,values:a,up:c,down:d,between:p,only:y,not:g,unit:n,...s}}const TE={borderRadius:4};function Bp(e=8,t=hu({spacing:e})){if(e.mui)return e;const n=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(a=>{const u=t(a);return typeof u=="number"?`${u}px`:u}).join(" "));return n.mui=!0,n}function SE(e,t){var o;const n=this;if(n.vars){if(!((o=n.colorSchemes)!=null&&o[e])||typeof n.getColorSchemeSelector!="function")return{};let s=n.getColorSchemeSelector(e);return s==="&"?t:((s.includes("data-")||s.includes("."))&&(s=`*:where(${s.replace(/\s*&$/,"")}) &`),{[s]:t})}return n.palette.mode===e?t:{}}function zp(e={},...t){const{breakpoints:n={},palette:o={},spacing:s,shape:a={},...u}=e,c=wE(n),d=Bp(s);let p=Yt({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...o},spacing:d,shape:{...TE,...a}},u);return p=cC(p),p.applyStyles=SE,p=t.reduce((y,g)=>Yt(y,g),p),p.unstable_sxConfig={...Es,...u==null?void 0:u.unstable_sxConfig},p.unstable_sx=function(g){return ai({sx:g,theme:this})},p}function Up(e){const{variants:t,...n}=e,o={variants:t,style:Lp(n),isProcessed:!0};return o.style===n||t&&t.forEach(s=>{typeof s.style!="function"&&(s.style=Lp(s.style))}),o}const CE=zp();function vu(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function EE(e){return e?(t,n)=>n[e]:null}function xE(e,t,n){e.theme=PE(e.theme)?n:e.theme[t]||e.theme}function xs(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(o=>xs(e,o));if(Array.isArray(n==null?void 0:n.variants)){let o;if(n.isProcessed)o=n.style;else{const{variants:s,...a}=n;o=a}return jp(e,n.variants,[o])}return n!=null&&n.isProcessed?n.style:n}function jp(e,t,n=[]){var s;let o;e:for(let a=0;a<t.length;a+=1){const u=t[a];if(typeof u.props=="function"){if(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),!u.props(o))continue}else for(const c in u.props)if(e[c]!==u.props[c]&&((s=e.ownerState)==null?void 0:s[c])!==u.props[c])continue e;typeof u.style=="function"?(o??(o={...e,...e.ownerState,ownerState:e.ownerState}),n.push(u.style(o))):n.push(u.style)}return n}function AE(e={}){const{themeId:t,defaultTheme:n=CE,rootShouldForwardProp:o=vu,slotShouldForwardProp:s=vu}=e;function a(c){xE(c,t,n)}return(c,d={})=>{bE(c,k=>k.filter(L=>L!==ai));const{name:p,slot:y,skipVariantsResolver:g,skipSx:_,overridesResolver:C=EE(Wp(y)),...E}=d,T=g!==void 0?g:y&&y!=="Root"&&y!=="root"||!1,P=_||!1;let N=vu;y==="Root"||y==="root"?N=o:y?N=s:$E(c)&&(N=void 0);const X=vE(c,{shouldForwardProp:N,label:IE(p,y),...E}),W=k=>{if(typeof k=="function"&&k.__emotion_real!==k)return function(J){return xs(J,k)};if(Vn(k)){const L=Up(k);return L.variants?function(le){return xs(le,L)}:L.style}return k},D=(...k)=>{const L=[],J=k.map(W),le=[];if(L.push(a),p&&C&&le.push(function(re){var _e,ke;const he=(ke=(_e=re.theme.components)==null?void 0:_e[p])==null?void 0:ke.styleOverrides;if(!he)return null;const Le={};for(const De in he)Le[De]=xs(re,he[De]);return C(re,Le)}),p&&!T&&le.push(function(re){var Le,_e;const ce=re.theme,he=(_e=(Le=ce==null?void 0:ce.components)==null?void 0:Le[p])==null?void 0:_e.variants;return he?jp(re,he):null}),P||le.push(ai),Array.isArray(J[0])){const j=J.shift(),re=new Array(L.length).fill(""),ce=new Array(le.length).fill("");let he;he=[...re,...j,...ce],he.raw=[...re,...j.raw,...ce],L.unshift(he)}const ne=[...L,...J,...le],S=X(...ne);return c.muiName&&(S.muiName=c.muiName),process.env.NODE_ENV!=="production"&&(S.displayName=OE(p,y,c)),S};return X.withConfig&&(D.withConfig=X.withConfig),D}}function OE(e,t,n){return e?`${e}${Nr(t||"")}`:`Styled(${tC(n)})`}function IE(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Wp(t||"Root")}`),n}function PE(e){for(const t in e)return!1;return!0}function $E(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wp(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function bu(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),sC(e,t,n)}function ME(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(o=>o+o)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((o,s)=>s<3?parseInt(o,16):Math.round(parseInt(o,16)/255*1e3)/1e3).join(", ")})`:""}function ur(e){if(e.type)return e;if(e.charAt(0)==="#")return ur(ME(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
203
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:ar(9,e));let o=e.substring(t+1,e.length-1),s;if(n==="color"){if(o=o.split(" "),s=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(s))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${s}\` color space.
|
|
204
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:ar(10,s))}else o=o.split(",");return o=o.map(a=>parseFloat(a)),{type:n,values:o,colorSpace:s}}const FE=e=>{const t=ur(e);return t.values.slice(0,3).map((n,o)=>t.type.includes("hsl")&&o!==0?`${n}%`:n).join(" ")},oo=(e,t)=>{try{return FE(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function As(e){const{type:t,colorSpace:n}=e;let{values:o}=e;return t.includes("rgb")?o=o.map((s,a)=>a<3?parseInt(s,10):s):t.includes("hsl")&&(o[1]=`${o[1]}%`,o[2]=`${o[2]}%`),t.includes("color")?o=`${n} ${o.join(" ")}`:o=`${o.join(", ")}`,`${t}(${o})`}function Vp(e){e=ur(e);const{values:t}=e,n=t[0],o=t[1]/100,s=t[2]/100,a=o*Math.min(s,1-s),u=(p,y=(p+n/30)%12)=>s-a*Math.max(Math.min(y-3,9-y,1),-1);let c="rgb";const d=[Math.round(u(0)*255),Math.round(u(8)*255),Math.round(u(4)*255)];return e.type==="hsla"&&(c+="a",d.push(t[3])),As({type:c,values:d})}function _u(e){e=ur(e);let t=e.type==="hsl"||e.type==="hsla"?ur(Vp(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Gp(e,t){const n=_u(e),o=_u(t);return(Math.max(n,o)+.05)/(Math.min(n,o)+.05)}function kE(e,t){return e=ur(e),t=bu(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,As(e)}function Os(e,t,n){try{return kE(e,t)}catch{return e}}function wu(e,t){if(e=ur(e),t=bu(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return As(e)}function Ye(e,t,n){try{return wu(e,t)}catch{return e}}function Tu(e,t){if(e=ur(e),t=bu(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return As(e)}function Ke(e,t,n){try{return Tu(e,t)}catch{return e}}function DE(e,t=.15){return _u(e)>.5?wu(e,t):Tu(e,t)}function Is(e,t,n){try{return DE(e,t)}catch{return e}}const NE=Mt.createContext(void 0);process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object);function LE(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n])return o;const s=t.components[n];return s.defaultProps?fu(s.defaultProps,o):!s.styleOverrides&&!s.variants?fu(s,o):o}function BE({props:e,name:t}){const n=Mt.useContext(NE);return LE({props:e,name:t,theme:{components:n}})}const Hp={theme:void 0};function zE(e){let t,n;return function(s){let a=t;return(a===void 0||s.theme!==n)&&(Hp.theme=s.theme,a=Up(e(Hp)),t=a,n=s.theme),a}}function UE(e=""){function t(...o){if(!o.length)return"";const s=o[0];return typeof s=="string"&&!s.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}-`:""}${s}${t(...o.slice(1))})`:`, ${s}`}return(o,...s)=>`var(--${e?`${e}-`:""}${o}${t(...s)})`}const qp=(e,t,n,o=[])=>{let s=e;t.forEach((a,u)=>{u===t.length-1?Array.isArray(s)?s[Number(a)]=n:s&&typeof s=="object"&&(s[a]=n):s&&typeof s=="object"&&(s[a]||(s[a]=o.includes(a)?[]:{}),s=s[a])})},jE=(e,t,n)=>{function o(s,a=[],u=[]){Object.entries(s).forEach(([c,d])=>{(!n||n&&!n([...a,c]))&&d!=null&&(typeof d=="object"&&Object.keys(d).length>0?o(d,[...a,c],Array.isArray(d)?[...u,c]:u):t([...a,c],d,u))})}o(e)},WE=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(o=>e.includes(o))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Su(e,t){const{prefix:n,shouldSkipGeneratingVar:o}=t||{},s={},a={},u={};return jE(e,(c,d,p)=>{if((typeof d=="string"||typeof d=="number")&&(!o||!o(c,d))){const y=`--${n?`${n}-`:""}${c.join("-")}`,g=WE(c,d);Object.assign(s,{[y]:g}),qp(a,c,`var(${y})`,p),qp(u,c,`var(${y}, ${g})`,p)}},c=>c[0]==="vars"),{css:s,vars:a,varsWithDefaults:u}}function VE(e,t={}){const{getSelector:n=P,disableCssColorScheme:o,colorSchemeSelector:s}=t,{colorSchemes:a={},components:u,defaultColorScheme:c="light",...d}=e,{vars:p,css:y,varsWithDefaults:g}=Su(d,t);let _=g;const C={},{[c]:E,...T}=a;if(Object.entries(T||{}).forEach(([W,D])=>{const{vars:k,css:L,varsWithDefaults:J}=Su(D,t);_=Yt(_,J),C[W]={css:L,vars:k}}),E){const{css:W,vars:D,varsWithDefaults:k}=Su(E,t);_=Yt(_,k),C[c]={css:W,vars:D}}function P(W,D){var L,J;let k=s;if(s==="class"&&(k=".%s"),s==="data"&&(k="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(k=`[${s}="%s"]`),W){if(k==="media")return e.defaultColorScheme===W?":root":{[`@media (prefers-color-scheme: ${((J=(L=a[W])==null?void 0:L.palette)==null?void 0:J.mode)||W})`]:{":root":D}};if(k)return e.defaultColorScheme===W?`:root, ${k.replace("%s",String(W))}`:k.replace("%s",String(W))}return":root"}return{vars:_,generateThemeVars:()=>{let W={...p};return Object.entries(C).forEach(([,{vars:D}])=>{W=Yt(W,D)}),W},generateStyleSheets:()=>{var le,ne;const W=[],D=e.defaultColorScheme||"light";function k(S,j){Object.keys(j).length&&W.push(typeof S=="string"?{[S]:{...j}}:S)}k(n(void 0,{...y}),y);const{[D]:L,...J}=C;if(L){const{css:S}=L,j=(ne=(le=a[D])==null?void 0:le.palette)==null?void 0:ne.mode,re=!o&&j?{colorScheme:j,...S}:{...S};k(n(D,{...re}),re)}return Object.entries(J).forEach(([S,{css:j}])=>{var he,Le;const re=(Le=(he=a[S])==null?void 0:he.palette)==null?void 0:Le.mode,ce=!o&&re?{colorScheme:re,...j}:{...j};k(n(S,{...ce}),ce)}),W}}}function GE(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const so={black:"#000",white:"#fff"},HE={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"},li={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},ui={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ao={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ci={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},fi={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},di={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function Yp(){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:so.white,default:so.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 qE=Yp();function Kp(){return{text:{primary:so.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:so.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 Jp=Kp();function Rp(e,t,n,o){const s=o.light||o,a=o.dark||o*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Tu(e.main,s):t==="dark"&&(e.dark=wu(e.main,a)))}function YE(e="light"){return e==="dark"?{main:ci[200],light:ci[50],dark:ci[400]}:{main:ci[700],light:ci[400],dark:ci[800]}}function KE(e="light"){return e==="dark"?{main:li[200],light:li[50],dark:li[400]}:{main:li[500],light:li[300],dark:li[700]}}function JE(e="light"){return e==="dark"?{main:ui[500],light:ui[300],dark:ui[700]}:{main:ui[700],light:ui[400],dark:ui[800]}}function RE(e="light"){return e==="dark"?{main:fi[400],light:fi[300],dark:fi[700]}:{main:fi[700],light:fi[500],dark:fi[900]}}function ZE(e="light"){return e==="dark"?{main:di[400],light:di[300],dark:di[700]}:{main:di[800],light:di[500],dark:di[900]}}function XE(e="light"){return e==="dark"?{main:ao[400],light:ao[300],dark:ao[700]}:{main:"#ed6c02",light:ao[500],dark:ao[900]}}function Cu(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:o=.2,...s}=e,a=e.primary||YE(t),u=e.secondary||KE(t),c=e.error||JE(t),d=e.info||RE(t),p=e.success||ZE(t),y=e.warning||XE(t);function g(T){const P=Gp(T,Jp.text.primary)>=n?Jp.text.primary:qE.text.primary;if(process.env.NODE_ENV!=="production"){const N=Gp(T,P);N<3&&console.error([`MUI: The contrast ratio of ${N}:1 for ${P} on ${T}`,"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(`
|
|
205
|
+
`))}return P}const _=({color:T,name:P,mainShade:N=500,lightShade:X=300,darkShade:W=700})=>{if(T={...T},!T.main&&T[N]&&(T.main=T[N]),!T.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${P?` (${P})`:""} provided to augmentColor(color) is invalid.
|
|
206
|
+
The color object needs to have a \`main\` property or a \`${N}\` property.`:ar(11,P?` (${P})`:"",N));if(typeof T.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${P?` (${P})`:""} provided to augmentColor(color) is invalid.
|
|
207
|
+
\`color.main\` should be a string, but \`${JSON.stringify(T.main)}\` was provided instead.
|
|
208
208
|
|
|
209
209
|
Did you intend to use one of the following approaches?
|
|
210
210
|
|
|
@@ -216,17 +216,17 @@ const theme1 = createTheme({ palette: {
|
|
|
216
216
|
|
|
217
217
|
const theme2 = createTheme({ palette: {
|
|
218
218
|
primary: { main: green[500] },
|
|
219
|
-
} });`:
|
|
220
|
-
`)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(s)?s:[s]).map(y=>`${y} ${typeof u=="string"?u:
|
|
219
|
+
} });`:ar(12,P?` (${P})`:"",JSON.stringify(T.main)));return Rp(T,"light",X,o),Rp(T,"dark",W,o),T.contrastText||(T.contrastText=g(T.main)),T};let C;return t==="light"?C=Yp():t==="dark"&&(C=Kp()),process.env.NODE_ENV!=="production"&&(C||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Yt({common:{...so},mode:t,primary:_({color:a,name:"primary"}),secondary:_({color:u,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:_({color:c,name:"error"}),warning:_({color:y,name:"warning"}),info:_({color:d,name:"info"}),success:_({color:p,name:"success"}),grey:HE,contrastThreshold:n,getContrastText:g,augmentColor:_,tonalOffset:o,...C},s)}function QE(e){const t={};return Object.entries(e).forEach(o=>{const[s,a]=o;typeof a=="object"&&(t[s]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),t}function ex(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function tx(e){return Math.round(e*1e5)/1e5}const Zp={textTransform:"uppercase"},Xp='"Roboto", "Helvetica", "Arial", sans-serif';function nx(e,t){const{fontFamily:n=Xp,fontSize:o=14,fontWeightLight:s=300,fontWeightRegular:a=400,fontWeightMedium:u=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:p,pxToRem:y,...g}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof d!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const _=o/14,C=y||(P=>`${P/d*_}rem`),E=(P,N,X,W,D)=>({fontFamily:n,fontWeight:P,fontSize:C(N),lineHeight:X,...n===Xp?{letterSpacing:`${tx(W/N)}em`}:{},...D,...p}),T={h1:E(s,96,1.167,-1.5),h2:E(s,60,1.2,-.5),h3:E(a,48,1.167,0),h4:E(a,34,1.235,.25),h5:E(a,24,1.334,0),h6:E(u,20,1.6,.15),subtitle1:E(a,16,1.75,.15),subtitle2:E(u,14,1.57,.1),body1:E(a,16,1.5,.15),body2:E(a,14,1.43,.15),button:E(u,14,1.75,.4,Zp),caption:E(a,12,1.66,.4),overline:E(a,12,2.66,1,Zp),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Yt({htmlFontSize:d,pxToRem:C,fontFamily:n,fontSize:o,fontWeightLight:s,fontWeightRegular:a,fontWeightMedium:u,fontWeightBold:c,...T},g,{clone:!1})}const rx=.2,ix=.14,ox=.12;function tt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${rx})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ix})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${ox})`].join(",")}const sx=["none",tt(0,2,1,-1,0,1,1,0,0,1,3,0),tt(0,3,1,-2,0,2,2,0,0,1,5,0),tt(0,3,3,-2,0,3,4,0,0,1,8,0),tt(0,2,4,-1,0,4,5,0,0,1,10,0),tt(0,3,5,-1,0,5,8,0,0,1,14,0),tt(0,3,5,-1,0,6,10,0,0,1,18,0),tt(0,4,5,-2,0,7,10,1,0,2,16,1),tt(0,5,5,-3,0,8,10,1,0,3,14,2),tt(0,5,6,-3,0,9,12,1,0,3,16,2),tt(0,6,6,-3,0,10,14,1,0,4,18,3),tt(0,6,7,-4,0,11,15,1,0,4,20,3),tt(0,7,8,-4,0,12,17,2,0,5,22,4),tt(0,7,8,-4,0,13,19,2,0,5,24,4),tt(0,7,9,-4,0,14,21,2,0,5,26,4),tt(0,8,9,-5,0,15,22,2,0,6,28,5),tt(0,8,10,-5,0,16,24,2,0,6,30,5),tt(0,8,11,-5,0,17,26,2,0,6,32,5),tt(0,9,11,-5,0,18,28,2,0,7,34,6),tt(0,9,12,-6,0,19,29,2,0,7,36,6),tt(0,10,13,-6,0,20,31,3,0,8,38,7),tt(0,10,13,-6,0,21,33,3,0,8,40,7),tt(0,10,14,-6,0,22,35,3,0,8,42,7),tt(0,11,14,-7,0,23,36,3,0,9,44,8),tt(0,11,15,-7,0,24,38,3,0,9,46,8)],ax={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)"},lx={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Qp(e){return`${Math.round(e)}ms`}function ux(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function cx(e){const t={...ax,...e.easing},n={...lx,...e.duration};return{getAutoHeightDuration:ux,create:(s=["all"],a={})=>{const{duration:u=n.standard,easing:c=t.easeInOut,delay:d=0,...p}=a;if(process.env.NODE_ENV!=="production"){const y=_=>typeof _=="string",g=_=>!Number.isNaN(parseFloat(_));!y(s)&&!Array.isArray(s)&&console.error('MUI: Argument "props" must be a string or Array.'),!g(u)&&!y(u)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${u}.`),y(c)||console.error('MUI: Argument "easing" must be a string.'),!g(d)&&!y(d)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof a!="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(`
|
|
220
|
+
`)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(s)?s:[s]).map(y=>`${y} ${typeof u=="string"?u:Qp(u)} ${c} ${typeof d=="string"?d:Qp(d)}`).join(",")},...e,easing:t,duration:n}}const fx={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function dx(e){return Vn(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function eg(e={}){const t={...e};function n(o){const s=Object.entries(o);for(let a=0;a<s.length;a++){const[u,c]=s[a];!dx(c)||u.startsWith("unstable_")?delete o[u]:Vn(c)&&(o[u]={...c},n(o[u]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
221
221
|
|
|
222
222
|
const theme = ${JSON.stringify(t,null,2)};
|
|
223
223
|
|
|
224
224
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
225
225
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
226
226
|
|
|
227
|
-
export default theme;`}function
|
|
228
|
-
`))}
|
|
229
|
-
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 bx(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const $n=e=>{try{return e()}catch{}},_x=(e="mui")=>zE(e);function Tu(e,t,n,o){if(!t)return;t=t===!0?{}:t;const s=o==="dark"?"dark":"light";if(!n){e[o]=px({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:a,...u}=_u({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[o]={...t,palette:a,opacity:{...Xp(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||Qp(s)},u}function Tx(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:s=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:u=gx,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:h=":root",...p}=e,y=Object.keys(n)[0],g=o||(n.light&&y!=="light"?"light":y),_=_x(a),{[g]:C,light:E,dark:w,...P}=n,N={...P};let R=C;if((g==="dark"&&!("dark"in n)||g==="light"&&!("light"in n))&&(R=!0),!R)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${g}\` option is either missing or invalid.`:ur(21,g));const W=Tu(N,R,p,g);E&&!N.light&&Tu(N,E,void 0,"light"),w&&!N.dark&&Tu(N,w,void 0,"dark");let B={defaultColorScheme:g,...W,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:h,getCssVar:_,colorSchemes:N,font:{...XE(W.typography),...W.font},spacing:bx(p.spacing)};Object.keys(B.colorSchemes).forEach(oe=>{const S=B.colorSchemes[oe].palette,U=ne=>{const fe=ne.split("-"),ye=fe[1],Me=fe[2];return _(ne,S[ye][Me])};if(S.mode==="light"&&(z(S.common,"background","#fff"),z(S.common,"onBackground","#000")),S.mode==="dark"&&(z(S.common,"background","#000"),z(S.common,"onBackground","#fff")),vx(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){z(S.Alert,"errorColor",qe(S.error.light,.6)),z(S.Alert,"infoColor",qe(S.info.light,.6)),z(S.Alert,"successColor",qe(S.success.light,.6)),z(S.Alert,"warningColor",qe(S.warning.light,.6)),z(S.Alert,"errorFilledBg",U("palette-error-main")),z(S.Alert,"infoFilledBg",U("palette-info-main")),z(S.Alert,"successFilledBg",U("palette-success-main")),z(S.Alert,"warningFilledBg",U("palette-warning-main")),z(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.main))),z(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.main))),z(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.main))),z(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.main))),z(S.Alert,"errorStandardBg",Ye(S.error.light,.9)),z(S.Alert,"infoStandardBg",Ye(S.info.light,.9)),z(S.Alert,"successStandardBg",Ye(S.success.light,.9)),z(S.Alert,"warningStandardBg",Ye(S.warning.light,.9)),z(S.Alert,"errorIconColor",U("palette-error-main")),z(S.Alert,"infoIconColor",U("palette-info-main")),z(S.Alert,"successIconColor",U("palette-success-main")),z(S.Alert,"warningIconColor",U("palette-warning-main")),z(S.AppBar,"defaultBg",U("palette-grey-100")),z(S.Avatar,"defaultBg",U("palette-grey-400")),z(S.Button,"inheritContainedBg",U("palette-grey-300")),z(S.Button,"inheritContainedHoverBg",U("palette-grey-A100")),z(S.Chip,"defaultBorder",U("palette-grey-400")),z(S.Chip,"defaultAvatarColor",U("palette-grey-700")),z(S.Chip,"defaultIconColor",U("palette-grey-700")),z(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),z(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),z(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),z(S.LinearProgress,"primaryBg",Ye(S.primary.main,.62)),z(S.LinearProgress,"secondaryBg",Ye(S.secondary.main,.62)),z(S.LinearProgress,"errorBg",Ye(S.error.main,.62)),z(S.LinearProgress,"infoBg",Ye(S.info.main,.62)),z(S.LinearProgress,"successBg",Ye(S.success.main,.62)),z(S.LinearProgress,"warningBg",Ye(S.warning.main,.62)),z(S.Skeleton,"bg",`rgba(${U("palette-text-primaryChannel")} / 0.11)`),z(S.Slider,"primaryTrack",Ye(S.primary.main,.62)),z(S.Slider,"secondaryTrack",Ye(S.secondary.main,.62)),z(S.Slider,"errorTrack",Ye(S.error.main,.62)),z(S.Slider,"infoTrack",Ye(S.info.main,.62)),z(S.Slider,"successTrack",Ye(S.success.main,.62)),z(S.Slider,"warningTrack",Ye(S.warning.main,.62));const ne=Ps(S.background.default,.8);z(S.SnackbarContent,"bg",ne),z(S.SnackbarContent,"color",$n(()=>S.getContrastText(ne))),z(S.SpeedDialAction,"fabHoverBg",Ps(S.background.paper,.15)),z(S.StepConnector,"border",U("palette-grey-400")),z(S.StepContent,"border",U("palette-grey-400")),z(S.Switch,"defaultColor",U("palette-common-white")),z(S.Switch,"defaultDisabledColor",U("palette-grey-100")),z(S.Switch,"primaryDisabledColor",Ye(S.primary.main,.62)),z(S.Switch,"secondaryDisabledColor",Ye(S.secondary.main,.62)),z(S.Switch,"errorDisabledColor",Ye(S.error.main,.62)),z(S.Switch,"infoDisabledColor",Ye(S.info.main,.62)),z(S.Switch,"successDisabledColor",Ye(S.success.main,.62)),z(S.Switch,"warningDisabledColor",Ye(S.warning.main,.62)),z(S.TableCell,"border",Ye(Is(S.divider,1),.88)),z(S.Tooltip,"bg",Is(S.grey[700],.92))}if(S.mode==="dark"){z(S.Alert,"errorColor",Ye(S.error.light,.6)),z(S.Alert,"infoColor",Ye(S.info.light,.6)),z(S.Alert,"successColor",Ye(S.success.light,.6)),z(S.Alert,"warningColor",Ye(S.warning.light,.6)),z(S.Alert,"errorFilledBg",U("palette-error-dark")),z(S.Alert,"infoFilledBg",U("palette-info-dark")),z(S.Alert,"successFilledBg",U("palette-success-dark")),z(S.Alert,"warningFilledBg",U("palette-warning-dark")),z(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.dark))),z(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.dark))),z(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.dark))),z(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.dark))),z(S.Alert,"errorStandardBg",qe(S.error.light,.9)),z(S.Alert,"infoStandardBg",qe(S.info.light,.9)),z(S.Alert,"successStandardBg",qe(S.success.light,.9)),z(S.Alert,"warningStandardBg",qe(S.warning.light,.9)),z(S.Alert,"errorIconColor",U("palette-error-main")),z(S.Alert,"infoIconColor",U("palette-info-main")),z(S.Alert,"successIconColor",U("palette-success-main")),z(S.Alert,"warningIconColor",U("palette-warning-main")),z(S.AppBar,"defaultBg",U("palette-grey-900")),z(S.AppBar,"darkBg",U("palette-background-paper")),z(S.AppBar,"darkColor",U("palette-text-primary")),z(S.Avatar,"defaultBg",U("palette-grey-600")),z(S.Button,"inheritContainedBg",U("palette-grey-800")),z(S.Button,"inheritContainedHoverBg",U("palette-grey-700")),z(S.Chip,"defaultBorder",U("palette-grey-700")),z(S.Chip,"defaultAvatarColor",U("palette-grey-300")),z(S.Chip,"defaultIconColor",U("palette-grey-300")),z(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),z(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),z(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),z(S.LinearProgress,"primaryBg",qe(S.primary.main,.5)),z(S.LinearProgress,"secondaryBg",qe(S.secondary.main,.5)),z(S.LinearProgress,"errorBg",qe(S.error.main,.5)),z(S.LinearProgress,"infoBg",qe(S.info.main,.5)),z(S.LinearProgress,"successBg",qe(S.success.main,.5)),z(S.LinearProgress,"warningBg",qe(S.warning.main,.5)),z(S.Skeleton,"bg",`rgba(${U("palette-text-primaryChannel")} / 0.13)`),z(S.Slider,"primaryTrack",qe(S.primary.main,.5)),z(S.Slider,"secondaryTrack",qe(S.secondary.main,.5)),z(S.Slider,"errorTrack",qe(S.error.main,.5)),z(S.Slider,"infoTrack",qe(S.info.main,.5)),z(S.Slider,"successTrack",qe(S.success.main,.5)),z(S.Slider,"warningTrack",qe(S.warning.main,.5));const ne=Ps(S.background.default,.98);z(S.SnackbarContent,"bg",ne),z(S.SnackbarContent,"color",$n(()=>S.getContrastText(ne))),z(S.SpeedDialAction,"fabHoverBg",Ps(S.background.paper,.15)),z(S.StepConnector,"border",U("palette-grey-600")),z(S.StepContent,"border",U("palette-grey-600")),z(S.Switch,"defaultColor",U("palette-grey-300")),z(S.Switch,"defaultDisabledColor",U("palette-grey-600")),z(S.Switch,"primaryDisabledColor",qe(S.primary.main,.55)),z(S.Switch,"secondaryDisabledColor",qe(S.secondary.main,.55)),z(S.Switch,"errorDisabledColor",qe(S.error.main,.55)),z(S.Switch,"infoDisabledColor",qe(S.info.main,.55)),z(S.Switch,"successDisabledColor",qe(S.success.main,.55)),z(S.Switch,"warningDisabledColor",qe(S.warning.main,.55)),z(S.TableCell,"border",qe(Is(S.divider,1),.68)),z(S.Tooltip,"bg",Is(S.grey[700],.92))}Hn(S.background,"default"),Hn(S.background,"paper"),Hn(S.common,"background"),Hn(S.common,"onBackground"),Hn(S,"divider"),Object.keys(S).forEach(ne=>{const fe=S[ne];ne!=="tonalOffset"&&fe&&typeof fe=="object"&&(fe.main&&z(S[ne],"mainChannel",lo(fo(fe.main))),fe.light&&z(S[ne],"lightChannel",lo(fo(fe.light))),fe.dark&&z(S[ne],"darkChannel",lo(fo(fe.dark))),fe.contrastText&&z(S[ne],"contrastTextChannel",lo(fo(fe.contrastText))),ne==="text"&&(Hn(S[ne],"primary"),Hn(S[ne],"secondary")),ne==="action"&&(fe.active&&Hn(S[ne],"active"),fe.selected&&Hn(S[ne],"selected")))})}),B=t.reduce((oe,S)=>Kt(oe,S),B);const D={prefix:a,disableCssColorScheme:s,shouldSkipGeneratingVar:u,getSelector:yx(B)},{vars:k,generateThemeVars:H,generateStyleSheets:ae}=WE(B,D);return B.vars=k,Object.entries(B.colorSchemes[B.defaultColorScheme]).forEach(([oe,S])=>{B[oe]=S}),B.generateThemeVars=H,B.generateStyleSheets=ae,B.generateSpacing=function(){return kp(p.spacing,lu(this))},B.getColorSchemeSelector=VE(c),B.spacing=B.generateSpacing(),B.shouldSkipGeneratingVar=u,B.unstable_sxConfig={...xs,...p==null?void 0:p.unstable_sxConfig},B.unstable_sx=function(S){return fi({sx:S,theme:this})},B.toRuntimeSource=Rp,B}function eg(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:bu({...n===!0?{}:n.palette,mode:t})})}function wx(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:a=n==null?void 0:n.mode,...u}=e,c=a||"light",h=s==null?void 0:s[c],p={...s,...n?{[c]:{...typeof h!="boolean"&&h,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return _u(e,...t);let y=n;"palette"in e||p[c]&&(p[c]!==!0?y=p[c].palette:c==="dark"&&(y={mode:"dark"}));const g=_u({...e,palette:y},...t);return g.defaultColorScheme=c,g.colorSchemes=p,g.palette.mode==="light"&&(g.colorSchemes.light={...p.light!==!0&&p.light,palette:g.palette},eg(g,"dark",p.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:g.palette},eg(g,"light",p.light)),g}return!n&&!("light"in p)&&c==="light"&&(p.light=!0),Tx({...u,colorSchemes:p,defaultColorScheme:c,...typeof o!="boolean"&&o},...t)}const Sx=wx(),Cx="$$material";function Ex(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const xx=xE({themeId:Cx,defaultTheme:Sx,rootShouldForwardProp:e=>Ex(e)&&e!=="classes"}),Ax=BE;process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object.isRequired);function Ox(e){return LE(e)}function Ix(e){return au("MuiSvgIcon",e)}iC("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Px=e=>{const{color:t,fontSize:n,classes:o}=e,s={root:["root",t!=="inherit"&&`color${Lr(t)}`,`fontSize${Lr(n)}`]};return tC(s,Ix,o)},$x=xx("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Lr(n.color)}`],t[`fontSize${Lr(n.fontSize)}`]]}})(Ax(({theme:e})=>{var t,n,o,s,a,u,c,h,p,y,g,_,C,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(o=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:o.shorter}),variants:[{props:w=>!w.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((u=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:u.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((h=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:h.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((y=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:y.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,w])=>w&&w.main).map(([w])=>{var P,N;return{props:{color:w},style:{color:(N=(P=(e.vars??e).palette)==null?void 0:P[w])==null?void 0:N.main}}}),{props:{color:"action"},style:{color:(_=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:_.active}},{props:{color:"disabled"},style:{color:(E=(C=(e.vars??e).palette)==null?void 0:C.action)==null?void 0:E.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),$s=Ft.forwardRef(function(t,n){const o=Ox({props:t,name:"MuiSvgIcon"}),{children:s,className:a,color:u="inherit",component:c="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:y=!1,titleAccess:g,viewBox:_="0 0 24 24",...C}=o,E=Ft.isValidElement(s)&&s.type==="svg",w={...o,color:u,component:c,fontSize:h,instanceFontSize:t.fontSize,inheritViewBox:y,viewBox:_,hasSvgAsChild:E},P={};y||(P.viewBox=_);const N=Px(w);return d.jsxs($x,{as:c,className:Pr(N.root,a),focusable:"false",color:p,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...P,...C,...E&&s.props,ownerState:w,children:[E?s.props.children:s,g?d.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&($s.propTypes={children:Ne.node,classes:Ne.object,className:Ne.string,color:Ne.oneOfType([Ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Ne.string]),component:Ne.elementType,fontSize:Ne.oneOfType([Ne.oneOf(["inherit","large","medium","small"]),Ne.string]),htmlColor:Ne.string,inheritViewBox:Ne.bool,shapeRendering:Ne.string,sx:Ne.oneOfType([Ne.arrayOf(Ne.oneOfType([Ne.func,Ne.object,Ne.bool])),Ne.func,Ne.object]),titleAccess:Ne.string,viewBox:Ne.string}),$s.muiName="SvgIcon";function wu(e,t){function n(o,s){return d.jsx($s,{"data-testid":`${t}Icon`,ref:s,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=$s.muiName,Ft.memo(Ft.forwardRef(n))}const Mx=wu(d.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),Fx=wu(d.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),Dx=wu(d.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");function kx(){this.__data__=[],this.size=0}var Nx=kx;function Lx(e,t){return e===t||e!==e&&t!==t}var Ms=Lx,Bx=Ms;function zx(e,t){for(var n=e.length;n--;)if(Bx(e[n][0],t))return n;return-1}var Fs=zx,Ux=Fs,jx=Array.prototype,Wx=jx.splice;function Vx(e){var t=this.__data__,n=Ux(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Wx.call(t,n,1),--this.size,!0}var Gx=Vx,Hx=Fs;function qx(e){var t=this.__data__,n=Hx(t,e);return n<0?void 0:t[n][1]}var Yx=qx,Kx=Fs;function Jx(e){return Kx(this.__data__,e)>-1}var Zx=Jx,Rx=Fs;function Xx(e,t){var n=this.__data__,o=Rx(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var Qx=Xx,eA=Nx,tA=Gx,nA=Yx,rA=Zx,iA=Qx;function yi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}yi.prototype.clear=eA,yi.prototype.delete=tA,yi.prototype.get=nA,yi.prototype.has=rA,yi.prototype.set=iA;var Ds=yi,oA=Ds;function sA(){this.__data__=new oA,this.size=0}var aA=sA;function lA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var uA=lA;function cA(e){return this.__data__.get(e)}var fA=cA;function dA(e){return this.__data__.has(e)}var hA=dA,pA=kr,gA=pA(Object,"create"),ks=gA,tg=ks;function mA(){this.__data__=tg?tg(null):{},this.size=0}var yA=mA;function vA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var bA=vA,_A=ks,TA="__lodash_hash_undefined__",wA=Object.prototype,SA=wA.hasOwnProperty;function CA(e){var t=this.__data__;if(_A){var n=t[e];return n===TA?void 0:n}return SA.call(t,e)?t[e]:void 0}var EA=CA,xA=ks,AA=Object.prototype,OA=AA.hasOwnProperty;function IA(e){var t=this.__data__;return xA?t[e]!==void 0:OA.call(t,e)}var PA=IA,$A=ks,MA="__lodash_hash_undefined__";function FA(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=$A&&t===void 0?MA:t,this}var DA=FA,kA=yA,NA=bA,LA=EA,BA=PA,zA=DA;function vi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}vi.prototype.clear=kA,vi.prototype.delete=NA,vi.prototype.get=LA,vi.prototype.has=BA,vi.prototype.set=zA;var UA=vi,ng=UA,jA=Ds,WA=Nl;function VA(){this.size=0,this.__data__={hash:new ng,map:new(WA||jA),string:new ng}}var GA=VA;function HA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var qA=HA,YA=qA;function KA(e,t){var n=e.__data__;return YA(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Ns=KA,JA=Ns;function ZA(e){var t=JA(this,e).delete(e);return this.size-=t?1:0,t}var RA=ZA,XA=Ns;function QA(e){return XA(this,e).get(e)}var eO=QA,tO=Ns;function nO(e){return tO(this,e).has(e)}var rO=nO,iO=Ns;function oO(e,t){var n=iO(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var sO=oO,aO=GA,lO=RA,uO=eO,cO=rO,fO=sO;function bi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}bi.prototype.clear=aO,bi.prototype.delete=lO,bi.prototype.get=uO,bi.prototype.has=cO,bi.prototype.set=fO;var rg=bi,dO=Ds,hO=Nl,pO=rg,gO=200;function mO(e,t){var n=this.__data__;if(n instanceof dO){var o=n.__data__;if(!hO||o.length<gO-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new pO(o)}return n.set(e,t),this.size=n.size,this}var yO=mO,vO=Ds,bO=aA,_O=uA,TO=fA,wO=hA,SO=yO;function _i(e){var t=this.__data__=new vO(e);this.size=t.size}_i.prototype.clear=bO,_i.prototype.delete=_O,_i.prototype.get=TO,_i.prototype.has=wO,_i.prototype.set=SO;var CO=_i,EO=kr,xO=function(){try{var e=EO(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ig=xO,og=ig;function AO(e,t,n){t=="__proto__"&&og?og(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Su=AO,OO=Su,IO=Ms;function PO(e,t,n){(n!==void 0&&!IO(e[t],n)||n===void 0&&!(t in e))&&OO(e,t,n)}var sg=PO;function $O(e){return function(t,n,o){for(var s=-1,a=Object(t),u=o(t),c=u.length;c--;){var h=u[e?c:++s];if(n(a[h],h,a)===!1)break}return t}}var MO=$O,FO=MO,DO=FO(),kO=DO,Ls={exports:{}};Ls.exports,function(e,t){var n=bn,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a?n.Buffer:void 0,c=u?u.allocUnsafe:void 0;function h(p,y){if(y)return p.slice();var g=p.length,_=c?c(g):new p.constructor(g);return p.copy(_),_}e.exports=h}(Ls,Ls.exports);var NO=Ls.exports,LO=bn,BO=LO.Uint8Array,zO=BO,ag=zO;function UO(e){var t=new e.constructor(e.byteLength);return new ag(t).set(new ag(e)),t}var jO=UO,WO=jO;function VO(e,t){var n=t?WO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var GO=VO;function HO(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var qO=HO,YO=Wn,lg=Object.create,KO=function(){function e(){}return function(t){if(!YO(t))return{};if(lg)return lg(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),JO=KO,ZO=yh,RO=ZO(Object.getPrototypeOf,Object),ug=RO,XO=JO,QO=ug,e2=os;function t2(e){return typeof e.constructor=="function"&&!e2(e)?XO(QO(e)):{}}var n2=t2,r2=as,i2=li;function o2(e){return i2(e)&&r2(e)}var cg=o2,s2=ai,a2=ug,l2=li,u2="[object Object]",c2=Function.prototype,f2=Object.prototype,fg=c2.toString,d2=f2.hasOwnProperty,h2=fg.call(Object);function p2(e){if(!l2(e)||s2(e)!=u2)return!1;var t=a2(e);if(t===null)return!0;var n=d2.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fg.call(n)==h2}var g2=p2;function m2(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var dg=m2,y2=Su,v2=Ms,b2=Object.prototype,_2=b2.hasOwnProperty;function T2(e,t,n){var o=e[t];(!(_2.call(e,t)&&v2(o,n))||n===void 0&&!(t in e))&&y2(e,t,n)}var w2=T2,S2=w2,C2=Su;function E2(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],h=o?o(n[c],e[c],c,n,e):void 0;h===void 0&&(h=e[c]),s?C2(n,c,h):S2(n,c,h)}return n}var x2=E2;function A2(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var O2=A2,I2=9007199254740991,P2=/^(?:0|[1-9]\d*)$/;function $2(e,t){var n=typeof e;return t=t??I2,!!t&&(n=="number"||n!="symbol"&&P2.test(e))&&e>-1&&e%1==0&&e<t}var hg=$2,M2=O2,F2=ss,D2=no,k2=Wl,N2=hg,L2=Vl,B2=Object.prototype,z2=B2.hasOwnProperty;function U2(e,t){var n=D2(e),o=!n&&F2(e),s=!n&&!o&&k2(e),a=!n&&!o&&!s&&L2(e),u=n||o||s||a,c=u?M2(e.length,String):[],h=c.length;for(var p in e)(t||z2.call(e,p))&&!(u&&(p=="length"||s&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||N2(p,h)))&&c.push(p);return c}var j2=U2;function W2(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var V2=W2,G2=Wn,H2=os,q2=V2,Y2=Object.prototype,K2=Y2.hasOwnProperty;function J2(e){if(!G2(e))return q2(e);var t=H2(e),n=[];for(var o in e)o=="constructor"&&(t||!K2.call(e,o))||n.push(o);return n}var Z2=J2,R2=j2,X2=Z2,Q2=as;function eI(e){return Q2(e)?R2(e,!0):X2(e)}var pg=eI,tI=x2,nI=pg;function rI(e){return tI(e,nI(e))}var iI=rI,gg=sg,oI=NO,sI=GO,aI=qO,lI=n2,mg=ss,yg=no,uI=cg,cI=Wl,fI=Dl,dI=Wn,hI=g2,pI=Vl,vg=dg,gI=iI;function mI(e,t,n,o,s,a,u){var c=vg(e,n),h=vg(t,n),p=u.get(h);if(p){gg(e,n,p);return}var y=a?a(c,h,n+"",e,t,u):void 0,g=y===void 0;if(g){var _=yg(h),C=!_&&cI(h),E=!_&&!C&&pI(h);y=h,_||C||E?yg(c)?y=c:uI(c)?y=aI(c):C?(g=!1,y=oI(h,!0)):E?(g=!1,y=sI(h,!0)):y=[]:hI(h)||mg(h)?(y=c,mg(c)?y=gI(c):(!dI(c)||fI(c))&&(y=lI(h))):g=!1}g&&(u.set(h,y),s(y,h,o,a,u),u.delete(h)),gg(e,n,y)}var yI=mI,vI=CO,bI=sg,_I=kO,TI=yI,wI=Wn,SI=pg,CI=dg;function bg(e,t,n,o,s){e!==t&&_I(t,function(a,u){if(s||(s=new vI),wI(a))TI(e,t,u,n,bg,o,s);else{var c=o?o(CI(e,u),a,u+"",e,t,s):void 0;c===void 0&&(c=a),bI(e,u,c)}},SI)}var EI=bg;function xI(e){return e}var _g=xI;function AI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var OI=AI,II=OI,Tg=Math.max;function PI(e,t,n){return t=Tg(t===void 0?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=Tg(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(u),II(e,this,c)}}var $I=PI;function MI(e){return function(){return e}}var FI=MI,DI=FI,wg=ig,kI=_g,NI=wg?function(e,t){return wg(e,"toString",{configurable:!0,enumerable:!1,value:DI(t),writable:!0})}:kI,LI=NI,BI=800,zI=16,UI=Date.now;function jI(e){var t=0,n=0;return function(){var o=UI(),s=zI-(o-n);if(n=o,s>0){if(++t>=BI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var WI=jI,VI=LI,GI=WI,HI=GI(VI),qI=HI,YI=_g,KI=$I,JI=qI;function ZI(e,t){return JI(KI(e,t,YI),e+"")}var Sg=ZI,RI=Ms,XI=as,QI=hg,eP=Wn;function tP(e,t,n){if(!eP(n))return!1;var o=typeof t;return(o=="number"?XI(n)&&QI(t,n.length):o=="string"&&t in n)?RI(n[t],e):!1}var Cg=tP,nP=Sg,rP=Cg;function iP(e){return nP(function(t,n){var o=-1,s=n.length,a=s>1?n[s-1]:void 0,u=s>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(s--,a):void 0,u&&rP(n[0],n[1],u)&&(a=s<3?void 0:a,s=1),t=Object(t);++o<s;){var c=n[o];c&&e(t,c,o,a)}return t})}var oP=iP,sP=EI,aP=oP,lP=aP(function(e,t,n){sP(e,t,n)}),uP=lP;const cP=ir(uP);var fP=Math.ceil,dP=Math.max;function hP(e,t,n,o){for(var s=-1,a=dP(fP((t-e)/(n||1)),0),u=Array(a);a--;)u[o?a:++s]=e,e+=n;return u}var pP=hP,gP=gh,mP=1/0,yP=17976931348623157e292;function vP(e){if(!e)return e===0?e:0;if(e=gP(e),e===mP||e===-1/0){var t=e<0?-1:1;return t*yP}return e===e?e:0}var bP=vP,_P=pP,TP=Cg,Cu=bP;function wP(e){return function(t,n,o){return o&&typeof o!="number"&&TP(t,n,o)&&(n=o=void 0),t=Cu(t),n===void 0?(n=t,t=0):n=Cu(n),o=o===void 0?t<n?1:-1:Cu(o),_P(t,n,o,e)}}var SP=wP,CP=SP,EP=CP(),xP=EP;const AP=ir(xP);function OP(e,t,n,o){var s=-1,a=e==null?0:e.length;for(o&&a&&(n=e[++s]);++s<a;)n=t(n,e[s],s,e);return n}var IP=OP;function PP(e){return function(t){return e==null?void 0:e[t]}}var $P=PP,MP=$P,FP={À:"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"},DP=MP(FP),kP=DP;function NP(e,t){for(var n=-1,o=e==null?0:e.length,s=Array(o);++n<o;)s[n]=t(e[n],n,e);return s}var LP=NP,Eg=is,BP=LP,zP=no,UP=dh,xg=Eg?Eg.prototype:void 0,Ag=xg?xg.toString:void 0;function Og(e){if(typeof e=="string")return e;if(zP(e))return BP(e,Og)+"";if(UP(e))return Ag?Ag.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var jP=Og,WP=jP;function VP(e){return e==null?"":WP(e)}var Eu=VP,GP=kP,HP=Eu,qP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,YP="\\u0300-\\u036f",KP="\\ufe20-\\ufe2f",JP="\\u20d0-\\u20ff",ZP=YP+KP+JP,RP="["+ZP+"]",XP=RegExp(RP,"g");function QP(e){return e=HP(e),e&&e.replace(qP,GP).replace(XP,"")}var e$=QP,t$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function n$(e){return e.match(t$)||[]}var r$=n$,i$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function o$(e){return i$.test(e)}var s$=o$,Ig="\\ud800-\\udfff",a$="\\u0300-\\u036f",l$="\\ufe20-\\ufe2f",u$="\\u20d0-\\u20ff",c$=a$+l$+u$,Pg="\\u2700-\\u27bf",$g="a-z\\xdf-\\xf6\\xf8-\\xff",f$="\\xac\\xb1\\xd7\\xf7",d$="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",h$="\\u2000-\\u206f",p$=" \\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",Mg="A-Z\\xc0-\\xd6\\xd8-\\xde",g$="\\ufe0e\\ufe0f",Fg=f$+d$+h$+p$,Dg="['’]",kg="["+Fg+"]",m$="["+c$+"]",Ng="\\d+",y$="["+Pg+"]",Lg="["+$g+"]",Bg="[^"+Ig+Fg+Ng+Pg+$g+Mg+"]",v$="\\ud83c[\\udffb-\\udfff]",b$="(?:"+m$+"|"+v$+")",_$="[^"+Ig+"]",zg="(?:\\ud83c[\\udde6-\\uddff]){2}",Ug="[\\ud800-\\udbff][\\udc00-\\udfff]",Ti="["+Mg+"]",T$="\\u200d",jg="(?:"+Lg+"|"+Bg+")",w$="(?:"+Ti+"|"+Bg+")",Wg="(?:"+Dg+"(?:d|ll|m|re|s|t|ve))?",Vg="(?:"+Dg+"(?:D|LL|M|RE|S|T|VE))?",Gg=b$+"?",Hg="["+g$+"]?",S$="(?:"+T$+"(?:"+[_$,zg,Ug].join("|")+")"+Hg+Gg+")*",C$="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",E$="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",x$=Hg+Gg+S$,A$="(?:"+[y$,zg,Ug].join("|")+")"+x$,O$=RegExp([Ti+"?"+Lg+"+"+Wg+"(?="+[kg,Ti,"$"].join("|")+")",w$+"+"+Vg+"(?="+[kg,Ti+jg,"$"].join("|")+")",Ti+"?"+jg+"+"+Wg,Ti+"+"+Vg,E$,C$,Ng,A$].join("|"),"g");function I$(e){return e.match(O$)||[]}var P$=I$,$$=r$,M$=s$,F$=Eu,D$=P$;function k$(e,t,n){return e=F$(e),t=n?void 0:t,t===void 0?M$(e)?D$(e):$$(e):e.match(t)||[]}var N$=k$,L$=IP,B$=e$,z$=N$,U$="['’]",j$=RegExp(U$,"g");function W$(e){return function(t){return L$(z$(B$(t).replace(j$,"")),e,"")}}var V$=W$;function G$(e,t,n){var o=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++o<s;)a[o]=e[o+t];return a}var H$=G$,q$=H$;function Y$(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:q$(e,t,n)}var K$=Y$,J$="\\ud800-\\udfff",Z$="\\u0300-\\u036f",R$="\\ufe20-\\ufe2f",X$="\\u20d0-\\u20ff",Q$=Z$+R$+X$,eM="\\ufe0e\\ufe0f",tM="\\u200d",nM=RegExp("["+tM+J$+Q$+eM+"]");function rM(e){return nM.test(e)}var qg=rM;function iM(e){return e.split("")}var oM=iM,Yg="\\ud800-\\udfff",sM="\\u0300-\\u036f",aM="\\ufe20-\\ufe2f",lM="\\u20d0-\\u20ff",uM=sM+aM+lM,cM="\\ufe0e\\ufe0f",fM="["+Yg+"]",xu="["+uM+"]",Au="\\ud83c[\\udffb-\\udfff]",dM="(?:"+xu+"|"+Au+")",Kg="[^"+Yg+"]",Jg="(?:\\ud83c[\\udde6-\\uddff]){2}",Zg="[\\ud800-\\udbff][\\udc00-\\udfff]",hM="\\u200d",Rg=dM+"?",Xg="["+cM+"]?",pM="(?:"+hM+"(?:"+[Kg,Jg,Zg].join("|")+")"+Xg+Rg+")*",gM=Xg+Rg+pM,mM="(?:"+[Kg+xu+"?",xu,Jg,Zg,fM].join("|")+")",yM=RegExp(Au+"(?="+Au+")|"+mM+gM,"g");function vM(e){return e.match(yM)||[]}var bM=vM,_M=oM,TM=qg,wM=bM;function SM(e){return TM(e)?wM(e):_M(e)}var CM=SM,EM=K$,xM=qg,AM=CM,OM=Eu;function IM(e){return function(t){t=OM(t);var n=xM(t)?AM(t):void 0,o=n?n[0]:t.charAt(0),s=n?EM(n,1).join(""):t.slice(1);return o[e]()+s}}var PM=IM,$M=PM,MM=$M("toUpperCase"),FM=MM,DM=V$,kM=FM,NM=DM(function(e,t,n){return e+(n?" ":"")+kM(t)}),LM=NM;const BM=ir(LM);function zM(e,t){for(var n=-1,o=t.length,s=e.length;++n<o;)e[s+n]=t[n];return e}var UM=zM,Qg=is,jM=ss,WM=no,em=Qg?Qg.isConcatSpreadable:void 0;function VM(e){return WM(e)||jM(e)||!!(em&&e&&e[em])}var GM=VM,HM=UM,qM=GM;function tm(e,t,n,o,s){var a=-1,u=e.length;for(n||(n=qM),s||(s=[]);++a<u;){var c=e[a];t>0&&n(c)?t>1?tm(c,t-1,n,o,s):HM(s,c):o||(s[s.length]=c)}return s}var YM=tm,KM="__lodash_hash_undefined__";function JM(e){return this.__data__.set(e,KM),this}var ZM=JM;function RM(e){return this.__data__.has(e)}var XM=RM,QM=rg,eF=ZM,tF=XM;function Bs(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new QM;++t<n;)this.add(e[t])}Bs.prototype.add=Bs.prototype.push=eF,Bs.prototype.has=tF;var nF=Bs;function rF(e,t,n,o){for(var s=e.length,a=n+(o?1:-1);o?a--:++a<s;)if(t(e[a],a,e))return a;return-1}var iF=rF;function oF(e){return e!==e}var sF=oF;function aF(e,t,n){for(var o=n-1,s=e.length;++o<s;)if(e[o]===t)return o;return-1}var lF=aF,uF=iF,cF=sF,fF=lF;function dF(e,t,n){return t===t?fF(e,t,n):uF(e,cF,n)}var hF=dF,pF=hF;function gF(e,t){var n=e==null?0:e.length;return!!n&&pF(e,t,0)>-1}var mF=gF;function yF(e,t,n){for(var o=-1,s=e==null?0:e.length;++o<s;)if(n(t,e[o]))return!0;return!1}var vF=yF;function bF(e,t){return e.has(t)}var _F=bF;function TF(){}var wF=TF;function SF(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var nm=SF,Ou=_h,CF=wF,EF=nm,xF=1/0,AF=Ou&&1/EF(new Ou([,-0]))[1]==xF?function(e){return new Ou(e)}:CF,OF=AF,IF=nF,PF=mF,$F=vF,MF=_F,FF=OF,DF=nm,kF=200;function NF(e,t,n){var o=-1,s=PF,a=e.length,u=!0,c=[],h=c;if(n)u=!1,s=$F;else if(a>=kF){var p=t?null:FF(e);if(p)return DF(p);u=!1,s=MF,h=new IF}else h=t?[]:c;e:for(;++o<a;){var y=e[o],g=t?t(y):y;if(y=n||y!==0?y:0,u&&g===g){for(var _=h.length;_--;)if(h[_]===g)continue e;t&&h.push(g),c.push(y)}else s(h,g,n)||(h!==c&&h.push(g),c.push(y))}return c}var LF=NF,BF=YM,zF=Sg,UF=LF,jF=cg,WF=zF(function(e){return UF(BF(e,1,jF,!0))}),VF=WF;const GF=ir(VF),wi=({children:e,...t})=>d.jsx(v.Table.Td,{...t,children:e}),rm=({errorMessages:e,id:t})=>d.jsx(v.Tooltip,{id:t,title:e,children:d.jsx(v.Indicator,{label:e.split(`
|
|
230
|
-
`).length,children:d.jsx(s1,{})})}),HF={paddingLeft:0,paddingRight:0},im=x.memo(function({numColumns:t,errors:n,label:o,description:s,path:a,addItem:u,schema:c,enabled:h,translations:p,rootSchema:y}){const g={bg:"transparent",size:"sm",c:"gray"},_=v.useProps("ActionIcon",g,{});return d.jsxs(v.Table.Tr,{children:[d.jsx(wi,{colSpan:t,children:d.jsxs(v.Stack,{children:[d.jsxs(v.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[d.jsx(v.Grid.Col,{span:"content",children:d.jsx(v.Text,{children:o})}),d.jsx(v.Grid.Col,{span:"content",children:n.length!==0?d.jsx(v.Grid.Col,{span:"content",children:d.jsx(rm,{id:"tooltip-validation",errorMessages:n})}):null})]}),s&&d.jsx(v.Text,{size:"sm",children:s})]})}),h?d.jsx(wi,{align:"right",style:HF,children:d.jsx(v.Tooltip,{id:"tooltip-add",title:p.addTooltip,position:"bottom",children:d.jsx(v.ActionIcon,{bg:_.bg,size:_.size,c:_.c,onClick:u(a,ue.createDefaultValue(c,y)),children:d.jsx(Tl,{})})})}):null]})}),om={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},sm=(e,t,n,o,s)=>{if(t.type==="object")return am(t).map(a=>{var h,p;const u=ue.Paths.compose(n,a),c={propName:a,schema:t,title:((p=(h=t.properties)==null?void 0:h[a])==null?void 0:p.title)??BM(a),rowPath:n,cellPath:u,enabled:o,cells:s};return d.jsx(e,{...c},u)});{const a={schema:t,rowPath:n,cellPath:n,enabled:o};return d.jsx(e,{...a},n)}},am=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],qF=({numColumns:e,translations:t})=>d.jsx(v.Table.Tr,{children:d.jsx(wi,{colSpan:e,children:d.jsx(v.Text,{align:"center",children:t.noDataMessage})})}),YF=x.memo(function({title:t}){return d.jsx(v.Table.Th,{children:t})}),KF=(e,t)=>{const n=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),o=ue.formatErrorMessage(GF(ue.errorsAt(n,t.schema,s=>s===n)(e.core.errors).map(s=>s.message)));return{rowPath:t.rowPath,propName:t.propName,schema:t.schema,rootSchema:e.core.schema,errors:o,path:n,enabled:t.enabled,cells:t.cells||e.cells,renderers:t.renderers||e.renderers}},lm=e=>({type:"Control",scope:e,label:!1}),JF=x.memo(function({path:t,propName:n,schema:o,rootSchema:s,errors:a,enabled:u,renderers:c,cells:h,isValid:p}){return d.jsxs(wi,{children:[o.properties?d.jsx(De.DispatchCell,{schema:ue.Resolve.schema(o,`#/properties/${ue.encode(n)}`,s),uischema:lm(`#/properties/${ue.encode(n)}`),path:t,enabled:u,renderers:c,cells:h}):d.jsx(De.DispatchCell,{schema:o,uischema:lm("#"),path:t,enabled:u,renderers:c,cells:h}),d.jsx(v.Text,{size:"xs",children:p?"":a})]})}),ZF=e=>{const t=De.useJsonForms(),n=KF(t,e),o=Mh(n.errors);return d.jsx(JF,{...n,isValid:o})},RF=({childPath:e,schema:t,rowIndex:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:u,enableDown:c,showSortButtons:h,enabled:p,cells:y,path:g,translations:_})=>{const C={bg:"transparent",size:"sm",c:"gray"},E=v.useProps("ActionIcon",C,{}),w=x.useMemo(()=>s(g,n),[s,g,n]),P=x.useMemo(()=>a(g,n),[a,g,n]);return d.jsxs(v.Table.Tr,{children:[sm(ZF,t,e,p,y),p?d.jsx(wi,{style:h?om.fixedCell:om.fixedCellSmall,children:d.jsxs(v.Grid,{justify:"flex-end",align:"center",children:[h?d.jsxs(x.Fragment,{children:[d.jsx(v.Grid.Col,{span:"content",children:d.jsx(v.Tooltip,{id:"tooltip-up",title:_.up,position:"bottom",opened:u?void 0:!1,children:d.jsx(v.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.upAriaLabel,onClick:w,disabled:!u,children:d.jsx(Fx,{})})})}),d.jsx(v.Grid.Col,{span:"content",children:d.jsx(v.Tooltip,{id:"tooltip-down",title:_.down,position:"bottom",opened:c?void 0:!1,children:d.jsx(v.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.downAriaLabel,onClick:P,disabled:!c,children:d.jsx(Mx,{})})})})]}):null,d.jsx(v.Grid.Col,{span:"content",children:d.jsx(v.Tooltip,{id:"tooltip-remove",title:_.removeTooltip,position:"bottom",children:d.jsx(v.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.removeAriaLabel,onClick:()=>o(e,n),children:d.jsx(Dx,{})})})})]})}):null]},e)},um=x.memo(RF),XF=({data:e,path:t,schema:n,openDeleteDialog:o,moveUp:s,moveDown:a,uischema:u,config:c,enabled:h,cells:p,translations:y})=>{if(e===0)return d.jsx(qF,{numColumns:am(n).length+1,translations:y});const _=cP({},c,u.options);return d.jsx(x.Fragment,{children:AP(e).map(C=>{const E=ue.Paths.compose(t,`${C}`);return d.jsx(um,{childPath:E,rowIndex:C,schema:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:C!==0,enableDown:C!==e-1,showSortButtons:_.showSortButtons||_.showArrayTableSortButtons,enabled:h,cells:p,path:t,translations:y},E)})})};class cm extends x.Component{constructor(){super(...arguments);sb(this,"addItem",(n,o)=>this.props.addItem(n,o))}render(){const{label:n,description:o,path:s,schema:a,rootSchema:u,uischema:c,errors:h,openDeleteDialog:p,visible:y,enabled:g,cells:_,translations:C}=this.props,E=c,w=a.type==="object",P=w?sm(YF,a,s,g,_):void 0;return y?d.jsxs(v.Table,{children:[d.jsxs(v.Table.Thead,{children:[d.jsx(im,{errors:h,label:n,description:o,addItem:this.addItem,numColumns:w?P.length:1,path:s,uischema:E,schema:a,rootSchema:u,enabled:g,translations:C}),w&&d.jsxs(v.Table.Tr,{children:[P,g?d.jsx(v.Table.Th,{}):null]})]}),d.jsx(v.Table.Tbody,{children:d.jsx(XF,{openDeleteDialog:p,translations:C,...this.props})})]}):null}}const QF=e=>{const[t,n]=x.useState(!1),[o,s]=x.useState(void 0),[a,u]=x.useState(void 0),{removeItems:c,visible:h}=e,p=x.useCallback((C,E)=>{n(!0),s(C),u(E)},[n,s,u]),y=x.useCallback(()=>n(!1),[n]),g=x.useCallback(()=>{const C=o.substring(0,o.lastIndexOf("."));c(C,[a])(),n(!1)},[n,o,a]),_=x.useCallback(()=>n(!1),[n]);return h?d.jsxs(d.Fragment,{children:[d.jsx(cm,{...e,openDeleteDialog:p}),d.jsx(rp,{open:t,onCancel:y,onConfirm:g,onClose:_,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},fm=ue.rankWith(1,ue.or(ue.isObjectArrayControl,ue.isPrimitiveArrayControl)),dm=De.withJsonFormsArrayLayoutProps(QF),eD=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),tD=e=>e.type==="string"&&e.enum!==void 0;function hm(e,t){if(!e.scope||e.type!=="Control")return!1;const n=ue.resolveSchema(t,e.scope);return!!(lr(n.type,"array")&&!Array.isArray(n.items)&&n.uniqueItems===!0&&(eD(n.items)||tD(n.items)))}function pm(e,t){if(!e.scope||e.type!=="Control")return!1;const n=ue.resolveSchema(t,e.scope);return!!(lr(n.type,"object")&&!n.properties)}const gm=ue.rankWith(1,hm),mm=De.withJsonFormsMultiEnumProps(e=>d.jsx(Bh,{...e})),ym=ue.rankWith(1,ue.isObjectControl),vm=De.withJsonFormsDetailProps(e=>d.jsx(Uh,{...e})),bm=ue.rankWith(1,ue.isBooleanControl),_m=De.withJsonFormsControlProps(e=>d.jsx(Hl,{...e})),Tm=ue.rankWith(1,ue.isDateControl),wm=De.withJsonFormsControlProps(e=>d.jsx(ql,{...e})),Sm=ue.rankWith(1,ue.isDateTimeControl),Cm=De.withJsonFormsControlProps(e=>d.jsx(Yl,{...e})),Em=ue.rankWith(2,ue.isEnumControl),xm=De.withJsonFormsEnumProps(De.withTranslateProps(e=>d.jsx(Kl,{...e})),!1),Am=ue.rankWith(1,ue.isIntegerControl),Om=De.withJsonFormsControlProps(e=>d.jsx(ro,{...e})),Im=ue.rankWith(2,pm),Pm=De.withJsonFormsControlProps(e=>d.jsx(zh,{...e})),$m=ue.rankWith(1,ue.isNumberControl),Mm=De.withJsonFormsControlProps(e=>d.jsx(ro,{...e})),Fm=ue.rankWith(2,ue.isOneOfControl),Dm=De.withJsonFormsOneOfEnumProps(De.withTranslateProps(e=>d.jsx(Jl,{...e})),!1),km=ue.rankWith(1,ue.isStringControl),Nm=De.withJsonFormsControlProps(e=>d.jsx(Zl,{...e})),nD=e=>{const{text:t,visible:n}=e;return n?d.jsx(v.Title,{fw:"bold",size:"xl",children:t}):null},Lm=ue.rankWith(1,ue.isLabelable),Bm=De.withJsonFormsLabelProps(nD),rD=({uischema:e,schema:t,path:n,enabled:o,renderers:s,cells:a,label:u})=>{const h={elements:e.elements,schema:t,path:n,enabled:o,direction:"column"};return d.jsx(v.Fieldset,{legend:u,children:d.jsx(cs,{...h,renderers:s,cells:a})})},zm=ue.rankWith(1,ue.uiTypeIs("Group")),Um=De.withJsonFormsLayoutProps(rD),iD=({uischema:e,renderers:t,cells:n,schema:o,path:s,enabled:a})=>{const c={elements:e.elements,schema:o,path:s,enabled:a,direction:"row"};return d.jsx(cs,{...c,renderers:t,cells:n})},jm=ue.rankWith(1,ue.uiTypeIs("HorizontalLayout")),Wm=De.withJsonFormsLayoutProps(iD),oD=({uischema:e,schema:t,path:n,enabled:o,renderers:s,cells:a})=>{const c={elements:e.elements,schema:t,path:n,enabled:o,direction:"column"};return d.jsx(cs,{...c,renderers:s,cells:a})},Vm=ue.rankWith(1,ue.uiTypeIs("VerticalLayout")),Gm=De.withJsonFormsLayoutProps(oD),Hm=[{tester:tp,cell:np},{tester:Rh,cell:Xh},{tester:Jh,cell:Zh},{tester:jh,cell:Wh},{tester:Vh,cell:Gh},{tester:Hh,cell:qh},{tester:Yh,cell:Kh},{tester:Qh,cell:ep}],qm=[{tester:Tm,renderer:wm},{tester:Sm,renderer:Cm},{tester:$m,renderer:Mm},{tester:Am,renderer:Om},{tester:km,renderer:Nm},{tester:bm,renderer:_m},{tester:Em,renderer:xm},{tester:Fm,renderer:Dm},{tester:Im,renderer:Pm},{tester:fm,renderer:dm},{tester:gm,renderer:mm},{tester:ym,renderer:vm},{tester:jm,renderer:Wm},{tester:Vm,renderer:Gm},{tester:zm,renderer:Um},{tester:Lm,renderer:Bm}];function Iu({schema:e,uischema:t,state:n,setState:o,view:s,setView:a,jsonForms:u,onSubmit:c,buttonText:h,loading:p,...y}){const g=x.useMemo(()=>v.createTheme({components:{...Object.entries(u||{}).reduce((_,[C,E])=>(_[C]||(_[C]={defaultProps:{}}),_[C].defaultProps=E,_),{})}}),[u]);return d.jsx(v.Modal,{size:"lg",centered:!0,fullScreen:s===mt.FULL_SCREEN,radius:s!==mt.NORMAL?0:void 0,transitionProps:s!==mt.NORMAL?{transition:"fade",duration:200}:void 0,...y,title:d.jsxs(d.Fragment,{children:[y.title,d.jsx(v.Group,{children:d.jsxs(v.Group,{gap:"xs",pr:"xs",children:[d.jsx(v.CloseButton,{onClick:()=>a(s!==mt.OVERLAY?mt.OVERLAY:mt.NORMAL),title:s!==mt.OVERLAY?"Overlay":"Exit overlay",icon:d.jsx(Ml,{icon:s!==mt.OVERLAY?"tabler:stack-forward":"tabler:stack",fontSize:"1.25rem"})}),d.jsx(v.CloseButton,{onClick:()=>a(s!==mt.FULL_SCREEN?mt.FULL_SCREEN:mt.NORMAL),title:s!==mt.FULL_SCREEN?"Full screen":"Exit full screen",icon:d.jsx(Ml,{icon:s!==mt.FULL_SCREEN?"tabler:maximize":"tabler:minimize",fontSize:"1.25rem"})})]})})]}),classNames:{content:"mrt-table-container"},styles:Bn(y.styles,{title:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}}),children:d.jsxs(v.Box,{component:"form",pos:"relative",onSubmit:c,children:[d.jsx(v.LoadingOverlay,{visible:p}),d.jsx(v.MantineThemeProvider,{inherit:!0,theme:g,children:d.jsx(De.JsonForms,{schema:e,uischema:t??void 0,renderers:qm,cells:Hm,data:n.data,onChange:o})}),d.jsx(v.Group,{justify:"end",mt:"xl",children:d.jsx(v.Button,{type:"submit",children:h})})]})})}const Pu={styles:{content:{height:450}}},$u={withinPortal:!1,h:"100%",w:"100%",pos:"absolute",styles:{overlay:{display:"none"},inner:{position:"relative",height:"100%",width:"100%",padding:0},content:{position:"absolute",height:"100%",width:"100%"}}};function Ym(e,t){const n={};return Object.entries(t.properties||{}).forEach(([o,s])=>{var c,h;const a=s.items?s.items:s,u=a.oneOf?a.oneOf.map(p=>({value:p.const,label:p.title})):a.enum;if(u){const p=u.map(y=>y.value);if(lr(s.type,"array")){const y=((c=e[o])==null?void 0:c.map(g=>g.id_||g))||[];n[o]=p.filter(g=>y.includes(g))}else n[o]=p.find(y=>{var g;return y===(((g=e[o])==null?void 0:g.id_)||e[o])})}else n[o]=(((h=e[o])==null?void 0:h.id_)||e[o])??void 0}),n}function Mu({jsonForms:e,...t}){const{info:n,refetch:o,refetchInfo:s,updateEntry:a}=Ae(),{opened:u,setOpened:c,item:h,itemLoading:p,state:y,setState:g,reset:_,view:C,setView:E}=zn("edit"),{jsonForms:w}=v.useProps("EditDialog",{},{}),P=x.useMemo(()=>Bn({__:{setNull:!0}},w,e),[w,e]),N=x.useCallback(W=>{W==null||W.preventDefault(),a(h==null?void 0:h.id,y.data).then(B=>{B&&(o(),s())}).finally(()=>c(!1))},[a,h==null?void 0:h.id,y.data,o,s,c]),R=x.useMemo(()=>({...Wo,data:Ym((h==null?void 0:h.result)||{},n.edit_schema)}),[n.edit_schema,h==null?void 0:h.result]);return x.useEffect(()=>{g({data:R.data})},[R,g]),d.jsx(Iu,{schema:n.edit_schema,uischema:n.edit_uischema,state:y,setState:g,view:C,setView:E,jsonForms:P,onSubmit:N,buttonText:"Edit",loading:p,opened:u,onClose:()=>c(!1),onExitTransitionEnd:_,...C===mt.OVERLAY?$u:{},...C===mt.NORMAL?Pu:{},...t,title:t.title??(n==null?void 0:n.edit_title)})}function Fu(){const{error:e,resetError:t}=Ae();return d.jsx(v.Modal,{opened:e,onClose:t,title:d.jsxs(v.Group,{children:[d.jsx(r1,{size:16,color:"red"}),d.jsx(v.Text,{children:e?e.message:"Error"})]}),centered:!0,children:e?d.jsx(v.Text,{children:e.originalError.detail||e.originalError.message}):null})}/*! @license DOMPurify 3.2.5 | (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.5/LICENSE */const{entries:Km,setPrototypeOf:Jm,isFrozen:sD,getPrototypeOf:aD,getOwnPropertyDescriptor:lD}=Object;let{freeze:Dt,seal:sn,create:Zm}=Object,{apply:Du,construct:ku}=typeof Reflect<"u"&&Reflect;Dt||(Dt=function(t){return t}),sn||(sn=function(t){return t}),Du||(Du=function(t,n,o){return t.apply(n,o)}),ku||(ku=function(t,n){return new t(...n)});const zs=Nt(Array.prototype.forEach),uD=Nt(Array.prototype.lastIndexOf),Rm=Nt(Array.prototype.pop),ho=Nt(Array.prototype.push),cD=Nt(Array.prototype.splice),Us=Nt(String.prototype.toLowerCase),Nu=Nt(String.prototype.toString),Xm=Nt(String.prototype.match),po=Nt(String.prototype.replace),fD=Nt(String.prototype.indexOf),dD=Nt(String.prototype.trim),Tn=Nt(Object.prototype.hasOwnProperty),kt=Nt(RegExp.prototype.test),go=hD(TypeError);function Nt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return Du(e,t,o)}}function hD(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ku(e,n)}}function Oe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Us;Jm&&Jm(e,null);let o=t.length;for(;o--;){let s=t[o];if(typeof s=="string"){const a=n(s);a!==s&&(sD(t)||(t[o]=a),s=a)}e[s]=!0}return e}function pD(e){for(let t=0;t<e.length;t++)Tn(e,t)||(e[t]=null);return e}function Br(e){const t=Zm(null);for(const[n,o]of Km(e))Tn(e,n)&&(Array.isArray(o)?t[n]=pD(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Br(o):t[n]=o);return t}function mo(e,t){for(;e!==null;){const o=lD(e,t);if(o){if(o.get)return Nt(o.get);if(typeof o.value=="function")return Nt(o.value)}e=aD(e)}function n(){return null}return n}const Qm=Dt(["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"]),Lu=Dt(["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"]),Bu=Dt(["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"]),gD=Dt(["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"]),zu=Dt(["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"]),mD=Dt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),e0=Dt(["#text"]),t0=Dt(["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"]),Uu=Dt(["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"]),n0=Dt(["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"]),js=Dt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yD=sn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vD=sn(/<%[\w\W]*|[\w\W]*%>/gm),bD=sn(/\$\{[\w\W]*/gm),_D=sn(/^data-[\-\w.\u00B7-\uFFFF]+$/),TD=sn(/^aria-[\-\w]+$/),r0=sn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wD=sn(/^(?:\w+script|data):/i),SD=sn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),i0=sn(/^html$/i),CD=sn(/^[a-z][.\w]*(-[.\w]+)+$/i);var o0=Object.freeze({__proto__:null,ARIA_ATTR:TD,ATTR_WHITESPACE:SD,CUSTOM_ELEMENT:CD,DATA_ATTR:_D,DOCTYPE_NAME:i0,ERB_EXPR:vD,IS_ALLOWED_URI:r0,IS_SCRIPT_OR_DATA:wD,MUSTACHE_EXPR:yD,TMPLIT_EXPR:bD});const yo={element:1,text:3,progressingInstruction:7,comment:8,document:9},ED=function(){return typeof window>"u"?null:window},xD=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(o=n.getAttribute(s));const a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},s0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function a0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ED();const t=de=>a0(de);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==yo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const o=n,s=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:u,Node:c,Element:h,NodeFilter:p,NamedNodeMap:y=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:_,trustedTypes:C}=e,E=h.prototype,w=mo(E,"cloneNode"),P=mo(E,"remove"),N=mo(E,"nextSibling"),R=mo(E,"childNodes"),W=mo(E,"parentNode");if(typeof u=="function"){const de=n.createElement("template");de.content&&de.content.ownerDocument&&(n=de.content.ownerDocument)}let B,D="";const{implementation:k,createNodeIterator:H,createDocumentFragment:ae,getElementsByTagName:oe}=n,{importNode:S}=o;let U=s0();t.isSupported=typeof Km=="function"&&typeof W=="function"&&k&&k.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ne,ERB_EXPR:fe,TMPLIT_EXPR:ye,DATA_ATTR:Me,ARIA_ATTR:we,IS_SCRIPT_OR_DATA:Le,ATTR_WHITESPACE:Ie,CUSTOM_ELEMENT:lt}=o0;let{IS_ALLOWED_URI:q}=o0,Y=null;const X=Oe({},[...Qm,...Lu,...Bu,...zu,...e0]);let K=null;const Z=Oe({},[...t0,...Uu,...n0,...js]);let ee=Object.seal(Zm(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}})),ie=null,ve=null,be=!0,pe=!0,Ce=!1,tt=!0,te=!1,yt=!0,Je=!1,Lt=!1,dr=!1,vt=!1,ke=!1,qn=!1,hr=!0,Wt=!1;const Ur="user-content-";let pr=!0,jr=!1,an={},gr=null;const mr=Oe({},["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 Yn=null;const Ei=Oe({},["audio","video","img","source","image","track"]);let Wr=null;const xi=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),yr="http://www.w3.org/1998/Math/MathML",vr="http://www.w3.org/2000/svg",Zt="http://www.w3.org/1999/xhtml";let Fn=Zt,Vr=!1,Gr=null;const ac=Oe({},[yr,vr,Zt],Nu);let Ai=Oe({},["mi","mo","mn","ms","mtext"]),Oi=Oe({},["annotation-xml"]);const Vs=Oe({},["title","style","font","a","script"]);let br=null;const lc=["application/xhtml+xml","text/html"],uc="text/html";let gt=null,_r=null;const Gs=n.createElement("form"),Hs=function($){return $ instanceof RegExp||$ instanceof Function},To=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(_r&&_r===$)){if((!$||typeof $!="object")&&($={}),$=Br($),br=lc.indexOf($.PARSER_MEDIA_TYPE)===-1?uc:$.PARSER_MEDIA_TYPE,gt=br==="application/xhtml+xml"?Nu:Us,Y=Tn($,"ALLOWED_TAGS")?Oe({},$.ALLOWED_TAGS,gt):X,K=Tn($,"ALLOWED_ATTR")?Oe({},$.ALLOWED_ATTR,gt):Z,Gr=Tn($,"ALLOWED_NAMESPACES")?Oe({},$.ALLOWED_NAMESPACES,Nu):ac,Wr=Tn($,"ADD_URI_SAFE_ATTR")?Oe(Br(xi),$.ADD_URI_SAFE_ATTR,gt):xi,Yn=Tn($,"ADD_DATA_URI_TAGS")?Oe(Br(Ei),$.ADD_DATA_URI_TAGS,gt):Ei,gr=Tn($,"FORBID_CONTENTS")?Oe({},$.FORBID_CONTENTS,gt):mr,ie=Tn($,"FORBID_TAGS")?Oe({},$.FORBID_TAGS,gt):{},ve=Tn($,"FORBID_ATTR")?Oe({},$.FORBID_ATTR,gt):{},an=Tn($,"USE_PROFILES")?$.USE_PROFILES:!1,be=$.ALLOW_ARIA_ATTR!==!1,pe=$.ALLOW_DATA_ATTR!==!1,Ce=$.ALLOW_UNKNOWN_PROTOCOLS||!1,tt=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=$.SAFE_FOR_TEMPLATES||!1,yt=$.SAFE_FOR_XML!==!1,Je=$.WHOLE_DOCUMENT||!1,vt=$.RETURN_DOM||!1,ke=$.RETURN_DOM_FRAGMENT||!1,qn=$.RETURN_TRUSTED_TYPE||!1,dr=$.FORCE_BODY||!1,hr=$.SANITIZE_DOM!==!1,Wt=$.SANITIZE_NAMED_PROPS||!1,pr=$.KEEP_CONTENT!==!1,jr=$.IN_PLACE||!1,q=$.ALLOWED_URI_REGEXP||r0,Fn=$.NAMESPACE||Zt,Ai=$.MATHML_TEXT_INTEGRATION_POINTS||Ai,Oi=$.HTML_INTEGRATION_POINTS||Oi,ee=$.CUSTOM_ELEMENT_HANDLING||{},$.CUSTOM_ELEMENT_HANDLING&&Hs($.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ee.tagNameCheck=$.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$.CUSTOM_ELEMENT_HANDLING&&Hs($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ee.attributeNameCheck=$.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=$.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(pe=!1),ke&&(vt=!0),an&&(Y=Oe({},e0),K=[],an.html===!0&&(Oe(Y,Qm),Oe(K,t0)),an.svg===!0&&(Oe(Y,Lu),Oe(K,Uu),Oe(K,js)),an.svgFilters===!0&&(Oe(Y,Bu),Oe(K,Uu),Oe(K,js)),an.mathMl===!0&&(Oe(Y,zu),Oe(K,n0),Oe(K,js))),$.ADD_TAGS&&(Y===X&&(Y=Br(Y)),Oe(Y,$.ADD_TAGS,gt)),$.ADD_ATTR&&(K===Z&&(K=Br(K)),Oe(K,$.ADD_ATTR,gt)),$.ADD_URI_SAFE_ATTR&&Oe(Wr,$.ADD_URI_SAFE_ATTR,gt),$.FORBID_CONTENTS&&(gr===mr&&(gr=Br(gr)),Oe(gr,$.FORBID_CONTENTS,gt)),pr&&(Y["#text"]=!0),Je&&Oe(Y,["html","head","body"]),Y.table&&(Oe(Y,["tbody"]),delete ie.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw go('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');B=$.TRUSTED_TYPES_POLICY,D=B.createHTML("")}else B===void 0&&(B=xD(C,s)),B!==null&&typeof D=="string"&&(D=B.createHTML(""));Dt&&Dt($),_r=$}},qs=Oe({},[...Lu,...Bu,...gD]),Ii=Oe({},[...zu,...mD]),cc=function($){let Q=W($);(!Q||!Q.tagName)&&(Q={namespaceURI:Fn,tagName:"template"});const le=Us($.tagName),We=Us(Q.tagName);return Gr[$.namespaceURI]?$.namespaceURI===vr?Q.namespaceURI===Zt?le==="svg":Q.namespaceURI===yr?le==="svg"&&(We==="annotation-xml"||Ai[We]):!!qs[le]:$.namespaceURI===yr?Q.namespaceURI===Zt?le==="math":Q.namespaceURI===vr?le==="math"&&Oi[We]:!!Ii[le]:$.namespaceURI===Zt?Q.namespaceURI===vr&&!Oi[We]||Q.namespaceURI===yr&&!Ai[We]?!1:!Ii[le]&&(Vs[le]||!qs[le]):!!(br==="application/xhtml+xml"&&Gr[$.namespaceURI]):!1},Vt=function($){ho(t.removed,{element:$});try{W($).removeChild($)}catch{P($)}},Pi=function($,Q){try{ho(t.removed,{attribute:Q.getAttributeNode($),from:Q})}catch{ho(t.removed,{attribute:null,from:Q})}if(Q.removeAttribute($),$==="is")if(vt||ke)try{Vt(Q)}catch{}else try{Q.setAttribute($,"")}catch{}},Ys=function($){let Q=null,le=null;if(dr)$="<remove></remove>"+$;else{const ut=Xm($,/^[\r\n\t ]+/);le=ut&&ut[0]}br==="application/xhtml+xml"&&Fn===Zt&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const We=B?B.createHTML($):$;if(Fn===Zt)try{Q=new _().parseFromString(We,br)}catch{}if(!Q||!Q.documentElement){Q=k.createDocument(Fn,"template",null);try{Q.documentElement.innerHTML=Vr?D:We}catch{}}const St=Q.body||Q.documentElement;return $&&le&&St.insertBefore(n.createTextNode(le),St.childNodes[0]||null),Fn===Zt?oe.call(Q,Je?"html":"body")[0]:Je?Q.documentElement:St},Ks=function($){return H.call($.ownerDocument||$,$,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},wo=function($){return $ instanceof g&&(typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||!($.attributes instanceof y)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function")},Js=function($){return typeof c=="function"&&$ instanceof c};function wn(de,$,Q){zs(de,le=>{le.call(t,$,Q,_r)})}const Zs=function($){let Q=null;if(wn(U.beforeSanitizeElements,$,null),wo($))return Vt($),!0;const le=gt($.nodeName);if(wn(U.uponSanitizeElement,$,{tagName:le,allowedTags:Y}),$.hasChildNodes()&&!Js($.firstElementChild)&&kt(/<[/\w!]/g,$.innerHTML)&&kt(/<[/\w!]/g,$.textContent)||$.nodeType===yo.progressingInstruction||yt&&$.nodeType===yo.comment&&kt(/<[/\w]/g,$.data))return Vt($),!0;if(!Y[le]||ie[le]){if(!ie[le]&&So(le)&&(ee.tagNameCheck instanceof RegExp&&kt(ee.tagNameCheck,le)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(le)))return!1;if(pr&&!gr[le]){const We=W($)||$.parentNode,St=R($)||$.childNodes;if(St&&We){const ut=St.length;for(let Pt=ut-1;Pt>=0;--Pt){const ln=w(St[Pt],!0);ln.__removalCount=($.__removalCount||0)+1,We.insertBefore(ln,N($))}}}return Vt($),!0}return $ instanceof h&&!cc($)||(le==="noscript"||le==="noembed"||le==="noframes")&&kt(/<\/no(script|embed|frames)/i,$.innerHTML)?(Vt($),!0):(te&&$.nodeType===yo.text&&(Q=$.textContent,zs([ne,fe,ye],We=>{Q=po(Q,We," ")}),$.textContent!==Q&&(ho(t.removed,{element:$.cloneNode()}),$.textContent=Q)),wn(U.afterSanitizeElements,$,null),!1)},Rs=function($,Q,le){if(hr&&(Q==="id"||Q==="name")&&(le in n||le in Gs))return!1;if(!(pe&&!ve[Q]&&kt(Me,Q))){if(!(be&&kt(we,Q))){if(!K[Q]||ve[Q]){if(!(So($)&&(ee.tagNameCheck instanceof RegExp&&kt(ee.tagNameCheck,$)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck($))&&(ee.attributeNameCheck instanceof RegExp&&kt(ee.attributeNameCheck,Q)||ee.attributeNameCheck instanceof Function&&ee.attributeNameCheck(Q))||Q==="is"&&ee.allowCustomizedBuiltInElements&&(ee.tagNameCheck instanceof RegExp&&kt(ee.tagNameCheck,le)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(le))))return!1}else if(!Wr[Q]){if(!kt(q,po(le,Ie,""))){if(!((Q==="src"||Q==="xlink:href"||Q==="href")&&$!=="script"&&fD(le,"data:")===0&&Yn[$])){if(!(Ce&&!kt(Le,po(le,Ie,"")))){if(le)return!1}}}}}}return!0},So=function($){return $!=="annotation-xml"&&Xm($,lt)},Xs=function($){wn(U.beforeSanitizeAttributes,$,null);const{attributes:Q}=$;if(!Q||wo($))return;const le={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0};let We=Q.length;for(;We--;){const St=Q[We],{name:ut,namespaceURI:Pt,value:ln}=St,Hr=gt(ut);let Ct=ut==="value"?ln:dD(ln);if(le.attrName=Hr,le.attrValue=Ct,le.keepAttr=!0,le.forceKeepAttr=void 0,wn(U.uponSanitizeAttribute,$,le),Ct=le.attrValue,Wt&&(Hr==="id"||Hr==="name")&&(Pi(ut,$),Ct=Ur+Ct),yt&&kt(/((--!?|])>)|<\/(style|title)/i,Ct)){Pi(ut,$);continue}if(le.forceKeepAttr||(Pi(ut,$),!le.keepAttr))continue;if(!tt&&kt(/\/>/i,Ct)){Pi(ut,$);continue}te&&zs([ne,fe,ye],Eo=>{Ct=po(Ct,Eo," ")});const Co=gt($.nodeName);if(Rs(Co,Hr,Ct)){if(B&&typeof C=="object"&&typeof C.getAttributeType=="function"&&!Pt)switch(C.getAttributeType(Co,Hr)){case"TrustedHTML":{Ct=B.createHTML(Ct);break}case"TrustedScriptURL":{Ct=B.createScriptURL(Ct);break}}try{Pt?$.setAttributeNS(Pt,ut,Ct):$.setAttribute(ut,Ct),wo($)?Vt($):Rm(t.removed)}catch{}}}wn(U.afterSanitizeAttributes,$,null)},fc=function de($){let Q=null;const le=Ks($);for(wn(U.beforeSanitizeShadowDOM,$,null);Q=le.nextNode();)wn(U.uponSanitizeShadowNode,Q,null),Zs(Q),Xs(Q),Q.content instanceof a&&de(Q.content);wn(U.afterSanitizeShadowDOM,$,null)};return t.sanitize=function(de){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=null,le=null,We=null,St=null;if(Vr=!de,Vr&&(de="<!-->"),typeof de!="string"&&!Js(de))if(typeof de.toString=="function"){if(de=de.toString(),typeof de!="string")throw go("dirty is not a string, aborting")}else throw go("toString is not a function");if(!t.isSupported)return de;if(Lt||To($),t.removed=[],typeof de=="string"&&(jr=!1),jr){if(de.nodeName){const ln=gt(de.nodeName);if(!Y[ln]||ie[ln])throw go("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof c)Q=Ys("<!---->"),le=Q.ownerDocument.importNode(de,!0),le.nodeType===yo.element&&le.nodeName==="BODY"||le.nodeName==="HTML"?Q=le:Q.appendChild(le);else{if(!vt&&!te&&!Je&&de.indexOf("<")===-1)return B&&qn?B.createHTML(de):de;if(Q=Ys(de),!Q)return vt?null:qn?D:""}Q&&dr&&Vt(Q.firstChild);const ut=Ks(jr?de:Q);for(;We=ut.nextNode();)Zs(We),Xs(We),We.content instanceof a&&fc(We.content);if(jr)return de;if(vt){if(ke)for(St=ae.call(Q.ownerDocument);Q.firstChild;)St.appendChild(Q.firstChild);else St=Q;return(K.shadowroot||K.shadowrootmode)&&(St=S.call(o,St,!0)),St}let Pt=Je?Q.outerHTML:Q.innerHTML;return Je&&Y["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&&kt(i0,Q.ownerDocument.doctype.name)&&(Pt="<!DOCTYPE "+Q.ownerDocument.doctype.name+`>
|
|
231
|
-
`+Pt),te&&zs([ne,fe,ye],ln=>{Pt=po(Pt,ln," ")}),B&&qn?B.createHTML(Pt):Pt},t.setConfig=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};To(de),Lt=!0},t.clearConfig=function(){_r=null,Lt=!1},t.isValidAttribute=function(de,$,Q){_r||To({});const le=gt(de),We=gt($);return Rs(le,We,Q)},t.addHook=function(de,$){typeof $=="function"&&ho(U[de],$)},t.removeHook=function(de,$){if($!==void 0){const Q=uD(U[de],$);return Q===-1?void 0:cD(U[de],Q,1)[0]}return Rm(U[de])},t.removeHooks=function(de){U[de]=[]},t.removeAllHooks=function(){U=s0()},t}var l0=a0();const Mn=x.forwardRef(({fallback:e,functionProps:t,children:n},o)=>{if(n=ft(n,t),n===null)return null;const s=n||e;return x.isValidElement(s)?x.cloneElement(s,{ref:o}):s});Mn.displayName="FallbackWrapper";const AD={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},vo=x.memo(({id:e,entry:t,loading:n,rightBorder:o,children:s,onClickEntry:a,customElement:u,sanitize:c,...h})=>{const p={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:y}=v.useProps("Field",p,h),g={};Object.entries(y).forEach(([C,E])=>{typeof E=="function"&&(g[C]=E(t))});const _=v.useStyles({name:"Field",props:h,classes:AD});return d.jsx(v.Table.Td,{..._("field"),onClick:a?()=>a(e,t):null,...h,children:d.jsx(v.Box,{w:"100%",children:d.jsx(v.Skeleton,{visible:n,children:d.jsx(Mn,{fallback:Array.isArray(s)?s.map((C,E)=>d.jsx(v.Text,{...y,...g,children:c?l0.sanitize(C):C},E)):x.isValidElement(s)?s:d.jsx(v.Text,{...y,...g,children:c?l0.sanitize(s):s}),functionProps:t,children:u})})})})});vo.displayName="Field";const u0={row:"_row_138r2_1",selected:"_selected_138r2_5"};function c0({entry:e,selected:t,children:n}){const o=v.useStyles({name:"Row",classes:u0}),s=v.useProps("Row",{},{});Object.entries(s).forEach(([c,h])=>{typeof h=="function"&&(s[c]=h(e))});var{className:a,style:u}=o("row");return a=`${a} ${t?u0.selected:""}`,d.jsx(v.Table.Tr,{className:a,style:{...u},...s,children:n})}function OD({bodyCustomizer:e,actionColumn:t,id:n,entry:o}){let s=e==null?void 0:e[t];return typeof s=="function"&&(s=s({id:n,...o})),s===null?null:s||d.jsx(Zu,{id:n})}function f0({data:e,loading:t,hideActions:n,hideCheckbox:o,selection:s,toggleRow:a,onClickEntry:u,bodyCustomizer:c,bodySeparator:h}){const p=e.list_columns.includes("actions")?"_actions":"actions",y=x.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return d.jsx(v.Table.Tbody,{children:e.result.length?e.result.map((g,_)=>{const C=e.ids[_];return d.jsxs(c0,{entry:{...g,id:C},children:[o?null:d.jsx(vo,{loading:t,children:d.jsx(v.Checkbox,{pl:2,checked:s.includes(C),onChange:()=>{a(C)}})},_),n?null:d.jsx(vo,{loading:t,children:d.jsx(OD,{bodyCustomizer:c,actionColumn:p,id:xt(C),entry:g})}),e.list_columns.map((E,w)=>{let P=c==null?void 0:c[E];typeof P=="function"&&(P=P({id:C,...g}));let N=Yi(g,E);typeof N=="number"?N=N.toLocaleString():N==null&&(N="");const R=(h==null?void 0:h[E])||(h==null?void 0:h[y]);return R&&(N=N.split(R)),P===null?null:d.jsx(vo,{id:C,entry:g,loading:t,onClickEntry:u,customElement:P,sanitize:!0,children:N},w)})]},xt(C))}):d.jsx("tr",{children:d.jsx("td",{style:{padding:"8px"},colSpan:n?e.list_columns.length:e.list_columns.length+1,children:d.jsx(v.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const d0={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function Ws({column:e,label:t,orderColumn:n,related:o,toggleAll:s,allChecked:a,classNames:u,styles:c,customElement:h,...p}){const{queryParams:y,setQueryParams:g,loading:_}=Ae(),C={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},E=v.useStyles({name:"FieldTitle",classes:d0,classNames:u,styles:c,props:p}),w=v.useProps("FieldTitle",C,p),{hovered:P,ref:N}=Re.useHover(),R=n&&y.order_column===n,W=E("wrapper");return W.style.cursor=n?W.style.cursor:"auto",d.jsx(v.Table.Th,{className:d0.fieldTitleRoot,...E("root"),onClick:n&&!_?()=>g({order_column:n,order_direction:y.order_direction==="asc"?"desc":"asc"}):null,children:d.jsx(v.Box,{ref:N,...W,children:e==="Checkbox"?d.jsx(v.Checkbox,{pb:5,pl:2,onChange:s,checked:a}):d.jsxs(d.Fragment,{children:[d.jsx(v.Box,{w:"100%",fw:w.fw,size:"xl",c:P&&n?w.hoverColor:R?w.selectedColor:w.color,children:h||t||e}),o?d.jsx(v.Tooltip,{label:"Related Field",children:d.jsx(v.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:d.jsx(v.Box,{...E("icon"),children:R?y.order_direction==="asc"?d.jsx(_l,{size:14,strokeWidth:1.5}):d.jsx(Cd,{size:14,strokeWidth:1.5}):null})})}):d.jsx(v.Box,{...E("icon"),children:R?y.order_direction==="asc"?d.jsx(_l,{size:14,strokeWidth:1.5}):d.jsx(Cd,{size:14,strokeWidth:1.5}):null})]})})})}const ju=x.memo(({data:e,info:t,settings:n,hideActions:o,hideCheckbox:s,allChecked:a,toggleAll:u,headerCustomizer:c})=>{const h=e.list_columns.includes("actions")?"_actions":"actions";let p=c==null?void 0:c[h];return typeof p=="function"&&(p=p()),d.jsx(v.Table.Thead,{children:d.jsxs(v.Table.Tr,{children:[s?null:d.jsx(Ws,{data:e,column:"Checkbox",allChecked:a,toggleAll:u}),o?null:d.jsx(Ws,{column:"Actions",customElement:p}),e.list_columns.map((y,g)=>{var C;let _=c==null?void 0:c[y];return typeof _=="function"&&(_=_(e.label_columns[y])),_===null?null:d.jsx(Ws,{column:y,label:e.label_columns[y],orderColumn:e.order_columns.find(E=>E===y)||e.order_columns.find(E=>E.startsWith(`${y}.`)),related:((C=t.filters[y])==null?void 0:C.schema.type)==="Nested",customElement:_},y)})]})})});ju.displayName="Header";const ID={scrollbar:"_scrollbar_isyo2_1"};function h0({bulkActions:e,hideActions:t,loading:n,onSelectCheckbox:o,onClickEntry:s,hideCheckbox:a,hideDownload:u,headerCustomizer:c,bodyCustomizer:h,bodySeparator:p,...y}){const g=v.useMantineTheme(),_=v.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),C=v.useProps("DatagridTable",_,y),{data:E,info:w}=Ae(),[P,N]=x.useState([]),[R,W]=x.useState(!1),B=k=>{N(H=>H.includes(k)?H.filter(ae=>ae!==k):[...H,k])},D=()=>{N(k=>k.length===E.ids.length?[]:E.ids.map((H,ae)=>H))};return x.useEffect(()=>{W(P.length===E.result.length&&P.length>0),o&&o(P),e==null||e.setSelectedIds(P.map(k=>k))},[P]),x.useEffect(()=>{N([]),o&&o([])},[E]),d.jsx(v.ScrollArea,{options:{className:g.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:ID,children:d.jsxs(v.Table,{stickyHeader:!0,...C,children:[d.jsx(ju,{data:E,info:w,hideActions:t,hideCheckbox:a,allChecked:R,setSelection:N,toggleAll:D,headerCustomizer:c}),d.jsx(f0,{data:E,loading:n,hideActions:t,hideCheckbox:a,selection:P,setSelection:N,toggleRow:B,onClickEntry:s,bodyCustomizer:h,bodySeparator:p})]})})}const Wu=x.memo(({counter:e,...t})=>{const{data:n,queryParams:o,setQueryParams:s}=Ae(),a=v.useMantineTheme(),u=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],c=String(o.page_size),[h,p]=x.useState(o.page);x.useEffect(()=>{p(o.page)},[o.page]);const y=_=>{p(_-1),s({page:_-1})},g=_=>{s({page_size:parseInt(_,10),page:0})};return d.jsxs(d.Fragment,{children:[d.jsx(v.Divider,{}),d.jsxs(v.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[d.jsxs(v.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[d.jsx(v.Text,{children:"Rows per page:"}),d.jsx(v.Select,{value:c,defaultValue:c,onChange:_=>g(_),data:u,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"}}}})})]}),d.jsx(v.Pagination,{size:"sm",total:Math.ceil(n.count/c),value:h+1,onChange:y,...t}),e&&n?d.jsxs(d.Fragment,{children:[d.jsx(v.Text,{c:a.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),d.jsx(v.Text,{c:a.primaryColor,size:"md",fw:700,pl:10,children:n.count})]}):null]})]})});Wu.displayName="Pagination";function PD(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(n){const o={};return n instanceof wt&&n.inner.forEach(s=>{o[s.path.replaceAll("[",".").replaceAll("]","")]=s.message}),o}}}function $D({form:e,name:t,items:n,...o}){return d.jsx(v.Autocomplete,{data:n,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function p0({form:e,name:t,...n}){return d.jsx(d.Fragment,{children:d.jsx(Hi.DateInput,{...e.getInputProps(t),onChange:o=>{if(o instanceof Date){const s=new Date(o.getTime()-o.getTimezoneOffset()*6e4);e.setFieldValue(t,s.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function g0({form:e,name:t,...n}){return d.jsx(d.Fragment,{children:d.jsx(Hi.DateTimePicker,{...e.getInputProps(t),onChange:o=>{if(o instanceof Date){const s=new Date(o);e.setFieldValue(t,s.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function bo({form:e,name:t,...n}){const o=e.getInputProps(t).value,s=x.useMemo(()=>o&&typeof o=="object"?JSON.stringify(o):o||"",[o]);return t==="password"?d.jsx(v.PasswordInput,{...e.getInputProps(t),value:s,...n}):d.jsx(v.TextInput,{...e.getInputProps(t),value:s,...n})}function Vu({form:e,name:t,filter:n,...o}){const[s,a]=x.useState(""),u=e.getInputProps(t).value,c=x.useMemo(()=>u?typeof u=="object"?JSON.stringify(u,null,2):u:"",[u]);return x.useEffect(()=>{a(c)},[c]),n?d.jsx(bo,{form:e,name:t,...o}):d.jsx(v.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...o,value:s,onChange:h=>{if(a(h),!h){e.getInputProps(t).onChange(null);return}try{const p=JSON.parse(h);e.getInputProps(t).onChange(p)}catch{}}})}function m0({form:e,name:t,filter:n,...o}){const[s,a]=x.useState(!!n);return d.jsxs(v.InputWrapper,{label:o.label,description:o.description,children:[!n&&d.jsxs(v.Group,{align:"center",gap:"xs",py:"0.25rem",children:[d.jsx(v.Checkbox,{checked:s,onChange:u=>a(u.currentTarget.checked)}),d.jsx(v.Text,{size:"xs",children:"WKT"})]}),s?d.jsx(bo,{form:e,name:t,...o,label:void 0,description:void 0}):d.jsx(Vu,{form:e,name:t,...o,label:void 0,description:void 0})]})}function y0({form:e,name:t,items:n,...o}){const s=n.map(u=>({value:String(xt(u.id)),label:u.value})),a=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(u=>String(typeof u=="object"?xt(u.id):u)):[];return d.jsx(v.MultiSelect,{data:s,searchable:!0,...e.getInputProps(t),value:a||[],...o})}function v0({form:e,name:t,items:n,filter:o,...s}){var u;const a=n.map(c=>({value:String(xt(c.id)),label:c.value}));return d.jsx(v.Select,{data:a,searchable:!0,...e.getInputProps(t),onChange:c=>{if(o){e.setFieldValue(t,c);return}const h=n.find(p=>String(xt(p.id))===c)||null;e.setFieldValue(t,h)},value:o?e.getInputProps(t).value:String(xt((u=e.getInputProps(t).value)==null?void 0:u.id))||"",...s})}function Gu({form:e,name:t,items:n,...o}){return d.jsx(v.Select,{data:n,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function Hu({form:e,name:t,schema:n,filter:o,withinPortal:s=!0,...a}){if(!n.type)return null;switch(n.type){case"Boolean":return d.jsx(Gu,{form:e,name:t,items:[{label:"true",value:o?"1":"true"},{label:"false",value:o?"0":"false"}],...a});case"RelatedList":return d.jsx(y0,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});case"Related":return d.jsx(v0,{form:e,name:t,items:n.values,filter:o,comboboxProps:{withinPortal:s},...a});case"DateTime":return d.jsx(g0,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:n,popoverProps:{withinPortal:s},...a});case"Date":return d.jsx(p0,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:n,popoverProps:{withinPortal:s},...a});case"Geometry":return d.jsx(m0,{form:e,name:t,filter:o,...a});case"Raw":return d.jsx(Vu,{form:e,name:t,filter:o,...a});case"Integer":case"Float":return d.jsx(bo,{form:e,name:t,...a});case"Enum":return d.jsx(Gu,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});default:return d.jsx(bo,{form:e,name:t,...a})}}function MD({form:e,name:t,items:n,onChange:o,...s}){return d.jsx(v.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function qu({form:e,name:t,label:n,comboboxProps:o,...s}){const a=v.useCombobox({onDropdownClose:()=>a.resetSelectedOption(),onDropdownOpen:()=>a.updateSelectedOptionIndex("active")}),[u,c]=x.useState([]),[h,p]=x.useState(""),y=C=>{h!==""&&(u.includes(h)||c(E=>[...E,h]),p(""))},g=C=>c(E=>E.filter(w=>w!==C)),_=u.map(C=>d.jsx(v.Pill,{withRemoveButton:!0,onRemove:()=>g(C),children:C},C));return x.useEffect(()=>{const C=e.getInputProps(t).value;if(C)try{c([...C])}catch(E){console.error("Error parsing JSON:",E)}},[]),x.useEffect(()=>{e.getInputProps(t).onChange(u)},[u]),d.jsx(v.InputWrapper,{label:n,children:d.jsxs(v.Combobox,{store:a,onOptionSubmit:y,...o,children:[d.jsx(v.Combobox.DropdownTarget,{children:d.jsx(v.PillsInput,{onClick:()=>a.openDropdown(),children:d.jsxs(v.Pill.Group,{children:[_,d.jsx(v.Combobox.EventsTarget,{children:d.jsx(v.PillsInput.Field,{onFocus:()=>a.openDropdown(),onBlur:()=>a.closeDropdown(),value:h,placeholder:"Search values",onChange:C=>{a.updateSelectedOptionIndex(),p(C.currentTarget.value)},onKeyDown:C=>{C.key==="Backspace"&&h.length===0&&(C.preventDefault(),g(u[u.length-1]))}})})]})})}),d.jsx(v.Combobox.Dropdown,{children:d.jsx(v.Combobox.Options,{children:d.jsxs(v.Combobox.Option,{value:"$create",children:["+ Create ",h]})})})]})})}function FD({form:e,name:t,items:n,onChange:o,...s}){return d.jsx(v.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function b0({onClose:e,...t}){const{info:n,queryParams:o,setQueryParams:s,path:a}=Ae(),u=za.useForm({initialValues:{filters:[]},validate:PD(Ji({filters:gl().of(Ji({col:Ro().transform(g=>g||void 0).required("Field is required"),opr:Ro().transform(g=>g||void 0).required("col is required"),value:Zo().when("col",{is:g=>g&&n.filters[g].schema.required,then:()=>Zo().required("Value is required")})}))}))}),c={bg:"transparent",size:"sm",c:"gray"},h=v.useProps("ActionIcon",c,t);x.useEffect(()=>{u.setValues({filters:[]}),u.reset()},[a]),x.useEffect(()=>{if(o.filters&&o.filters.length){const g=o.filters.filter(_=>!_.id).map(_=>({..._,key:Re.randomId()}));u.setFieldValue("filters",g)}},[o.filters]);const p=g=>{const _=g.filters.map(({key:E,...w})=>w),C=JSON.parse(JSON.stringify(_));s({filters:C,page:0}),e()},y=u.values.filters.map((g,_)=>d.jsxs(v.Box,{px:"sm",children:[d.jsxs(v.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[d.jsx(v.Box,{style:{width:"192px"},children:n&&n.filters&&d.jsx(MD,{form:u,name:`filters.${_}.col`,items:Object.entries(n.filters).map(([C,E])=>({label:E.label,value:String(C)})),onChange:C=>{u.setFieldValue(`filters.${_}`,{col:C,opr:"",value:"",key:Re.randomId()})}})}),d.jsx(v.Box,{style:{width:"192px"},children:g.col?d.jsx(FD,{form:u,name:`filters.${_}.opr`,items:n.filters[g.col].filters.filter(C=>!C.id).map(C=>({label:C.name,value:C.operator})),onChange:C=>{u.setFieldValue(`filters.${_}`,{col:u.values.filters[_].col,opr:C,value:"",key:Re.randomId()})}}):null}),d.jsx(v.Box,{style:{width:"192px"},children:g.col?g.opr==="in"?d.jsx(qu,{form:u,name:`filters.${_}.value`}):d.jsx(Hu,{form:u,name:`filters.${_}.value`,schema:n.filters[g.col].schema,filter:!0}):null}),d.jsx(v.ActionIcon,{bg:h.bg,size:h.size,c:h.c,onClick:()=>{u.removeListItem("filters",_)},children:d.jsx(Pd,{})})]}),u.values.filters.length>1&&_<u.values.filters.length-1?d.jsx(v.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},g.key));return d.jsxs(v.Box,{component:"form",onSubmit:u.onSubmit(p),children:[y.length===0&&d.jsx(v.Box,{style:{width:"642px"},children:d.jsx(v.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),d.jsx(v.ScrollArea.Autosize,{mah:"40vh",mt:20,children:y}),d.jsx(v.Divider,{my:"sm"}),d.jsxs(v.Box,{style:{display:"flex",justifyContent:"space-between"},children:[d.jsx(v.Button,{variant:"subtle",leftSection:d.jsx(Tl,{}),onClick:()=>{u.insertListItem("filters",{col:"",opr:"",value:"",key:Re.randomId()})},children:"Add Filter"}),d.jsx(v.Group,{spacing:"md",children:d.jsx(v.Button,{type:"submit",children:"Apply"})})]})]})}function _0(...e){const{queryParams:t}=Ae(),n={bg:"transparent",size:"sm",c:"gray"},o=v.useProps("ActionIcon",n,e),[s,a]=x.useState(!1);return d.jsxs(v.Popover,{opened:s,position:"bottom-end",onClose:()=>a(!1),closeOnClickOutside:!1,children:[d.jsx(v.Popover.Target,{children:d.jsx(v.Tooltip,{opened:s?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(u=>!u.id).length)!=0?d.jsx(v.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:d.jsx(v.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:d.jsx(Ed,{})})}):d.jsx(v.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:d.jsx(Ed,{})})})}),d.jsxs(v.Popover.Dropdown,{px:"xs",children:[d.jsx(v.Box,{style:{position:"absolute",top:4,right:4},children:d.jsx(v.CloseButton,{title:"Filters",onClick:()=>a(!1)})}),d.jsx(b0,{onClose:()=>{a(!1)}})]})]})}const Yu=x.memo(({hideAdd:e,hideFilter:t,hideDownload:n,toolbarCustomizer:o})=>{const{info:s}=Ae(),a=x.useMemo(()=>{const c={};return Object.entries(o).forEach(([h,p])=>{c[h]=p,typeof c[h]=="function"&&(c[h]=c[h]())}),c},[o]),u=s.permissions.includes("can_post");return d.jsxs(v.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!n&&(a.download||d.jsx(Qu,{size:"sm"})),u&&!e?a.add||d.jsx(Ru,{size:"sm"}):null,t?null:a.filter||d.jsx(_0,{})]})});Yu.displayName="Toolbar";function Ku({children:e,cond:t}){return Md(t)?e:null}const Ju=x.forwardRef((e,t)=>{const{path:n,data:o,loading:s,info:a,setQueryParams:u}=Ae(),{hideToolbar:c=!1,hideFilter:h=!1,hideAdd:p=!1,hideSettings:y=!1,hideActions:g=!1,hidePagination:_=!1,hideError:C=!1,hideDownload:E=!0,onSelectCheckbox:w=null,onClickEntry:P=null,fetchOnMount:N=!0,bulkActions:R=null,styles:W,headerCustomizer:B={},bodyCustomizer:D={},toolbarCustomizer:k={},counter:H=!1,bodySeparator:ae,form:oe}=e;x.useEffect(()=>{!o&&N&&u({})},[o]);const{setView:S}=zn("add"),{setView:U}=zn("edit");if(x.useEffect(()=>{var fe,ye;(fe=oe==null?void 0:oe.add)!=null&&fe.initialView&&S(oe.add.initialView),(ye=oe==null?void 0:oe.edit)!=null&&ye.initialView&&U(oe.edit.initialView)},[]),!a)return;const ne=R===null;return d.jsxs(v.Paper,{ref:t,h:"100%",display:"flex",pos:"relative",style:{flexDirection:"column",...W},children:[d.jsxs(Ku,{cond:!!a,children:[d.jsx(Xu,{jsonForms:oe==null?void 0:oe.add}),d.jsx(Mu,{jsonForms:oe==null?void 0:oe.edit})]}),c?null:d.jsx(Yu,{hideFilter:h,hideAdd:p,hideSettings:y,hideDownload:E,toolbarCustomizer:k}),o?d.jsx(h0,{bulkActions:R,hideActions:g,loading:s,onSelectCheckbox:w,onClickEntry:P,hideCheckbox:ne,hideDownload:E,headerCustomizer:B,bodyCustomizer:D,bodySeparator:ae}):null,!_&&o?d.jsx(Wu,{counter:H}):null,C?null:d.jsx(Fu,{})]})});Ju.displayName="DataGrid";function DD({relatedPath:e,...t}){const{path:n}=Ae();return ot(n?n.substring(0,n.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),d.jsx(Sd,{resource_name:e.replace("/",""),relation:t,children:d.jsx(Ju,{hideToolbar:!0,hideDownload:!1})})}const kD=x.memo(DD);function T0({item:e,info:t,loading:n,opened:o,onClose:s,...a}){const u={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:c,tabs:h,tabsList:p,tabsPanel:y}=v.useProps("ViewDialog",u,a);return d.jsxs(v.Modal,{opened:o,onClose:s,title:`${e==null?void 0:e.show_title} (#${xt(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...c,children:[d.jsx(v.LoadingOverlay,{visible:n}),!n&&e?d.jsxs(v.Tabs,{defaultValue:"details",...h,children:[d.jsxs(v.Tabs.List,{...p,children:[d.jsx(v.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((g,_)=>d.jsx(v.Tabs.Tab,{value:g.name,children:g.name},_))]}),d.jsx(v.Tabs.Panel,{pt:"xs",value:"details",...y,children:d.jsx(v.Paper,{p:"xs",withBorder:!0,children:d.jsx(v.Stack,{spacing:"md",children:d.jsx(v.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((g,_)=>d.jsxs(v.Grid,{maw:500,children:[d.jsx(v.Grid.Col,{span:4,children:d.jsx(v.Text,{size:"md",children:e.label_columns[g]})}),d.jsx(v.Grid.Col,{span:1,children:d.jsx(v.Text,{size:"xs",children:":"})}),d.jsx(v.Grid.Col,{span:6,children:d.jsx(v.Text,{size:"md",children:Yi(e.result,g)})})]},_))})})})}),t.relations.map((g,_)=>d.jsx(v.Tabs.Panel,{pt:"xs",value:g.name,children:d.jsx(v.Paper,{withBorder:!0,children:d.jsx(kD,{relatedPath:g.path,id:xt(e.id),foreign_key:g.foreign_key,type:g.type})})},_))]}):null]})}function w0({id:e,...t}){const{info:n,getEntry:o}=Ae(),[s,a]=x.useState(null),[u,c]=x.useState(!1),[h,p]=x.useState(!1),y=ar({onClick:()=>{c(!0),o(e).then(g=>{g&&(a(g),p(!0))}).finally(()=>c(!1))},size:"sm",...t});return d.jsxs(d.Fragment,{children:[d.jsx(v.Tooltip,{label:"Details",children:d.jsx(v.ActionIcon,{...y,children:d.jsx(a1,{})})}),d.jsx(T0,{item:s,info:n,loading:u,opened:h,onClose:()=>p(!1)})]})}function Zu({id:e}){const{info:t}=Ae();return d.jsxs(v.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?d.jsx(w0,{id:e}):null,t!=null&&t.permissions.includes("can_put")?d.jsx(kd,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?d.jsx(Dd,{id:e}):null]})}function Ru({tooltipProps:e,...t}){const{setOpened:n}=zn("add"),o=ar({onClick:()=>n(!0),...t});return d.jsx(d.Fragment,{children:d.jsx(v.Tooltip,{...e,label:(e==null?void 0:e.label)??"Add Item",children:d.jsx(v.ActionIcon,{...o,children:d.jsx(Tl,{})})})})}function Xu({jsonForms:e,...t}){const{info:n,refetch:o,refetchInfo:s,addEntry:a}=Ae(),{opened:u,setOpened:c,state:h,setState:p,reset:y,view:g,setView:_}=zn("add"),{jsonForms:C}=v.useProps("AddDialog",{},{}),E=x.useMemo(()=>Bn(C,e),[C,e]),w=x.useCallback(P=>{P==null||P.preventDefault(),a(h.data).then(N=>{N&&(o(),s())}).finally(()=>c(!1))},[a,o,s,c,h.data]);return d.jsx(Iu,{schema:n.add_schema,uischema:n.add_uischema,state:h,setState:p,view:g,setView:_,jsonForms:E,onSubmit:w,buttonText:"Add",opened:u,onClose:()=>c(!1),onExitTransitionEnd:y,...g===mt.OVERLAY?$u:{},...g===mt.NORMAL?Pu:{},...t,title:t.title??(n==null?void 0:n.add_title)})}const S0=[{name:"John Doe",age:25,friend:"Jane Doe","friend.name":"Jane Doe","friend.age":30},{name:"Jane Doe",age:30,friend:"John Doe","friend.name":"John Doe","friend.age":25}];function Qu({tooltipProps:e,...t}){const{download:n}=Ae(),[o,{toggle:s,close:a}]=Re.useDisclosure(),[u,c]=x.useState(!1),[h,p]=x.useState(ti),[y,g]=x.useState(qi),_=ar({onClick:s,...t}),C=({label:P,export_mode:N,delimiter:R,quotechar:W})=>{c(!0),n({label:P,export_mode:N,delimiter:R,quotechar:W}).then(()=>{a()}).finally(()=>c(!1))},E=S0.map(P=>d.jsxs(v.Table.Tr,{children:[d.jsx(v.Table.Td,{p:4,children:P.name}),d.jsx(v.Table.Td,{p:4,children:P.age}),d.jsx(v.Table.Td,{p:4,children:P.friend})]},P.name)),w=S0.map(P=>d.jsxs(v.Table.Tr,{children:[d.jsx(v.Table.Td,{p:4,children:P.name}),d.jsx(v.Table.Td,{p:4,children:P.age}),d.jsx(v.Table.Td,{p:4,children:P["friend.name"]}),d.jsx(v.Table.Td,{p:4,children:P["friend.age"]})]},P.name));return d.jsxs(d.Fragment,{children:[d.jsx(v.Modal,{title:"Download data",centered:!0,size:"xl",opened:o,onClose:a,children:d.jsxs(v.Stack,{children:[d.jsxs(v.Group,{grow:!0,children:[d.jsx(v.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:h,onChange:p,data:ja,placeholder:"Select delimiter",leftSection:d.jsx(Id,{})}),d.jsx(v.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:y,onChange:g,data:Wa,placeholder:"Select quote character",leftSection:d.jsx(Od,{})})]}),d.jsxs(v.Group,{grow:!0,children:[d.jsxs(v.Card,{shadow:"md",withBorder:!0,children:[d.jsxs(v.Group,{justify:"space-between",children:[d.jsx(v.Text,{children:"Simplified version of the data"}),d.jsx(v.Tooltip,{label:"This is a simplified version of the data. It shows only the properties of the elements and their relationships",children:d.jsx(v.ThemeIcon,{variant:"transparent",size:"sm",style:{cursor:"pointer"},children:d.jsx(xd,{})})})]}),d.jsxs(v.Table,{withColumnBorders:!0,children:[d.jsx(v.Table.Thead,{children:d.jsxs(v.Table.Tr,{children:[d.jsx(v.Table.Th,{p:4,children:"Name"}),d.jsx(v.Table.Th,{p:4,children:"Age"}),d.jsx(v.Table.Th,{p:4,children:"Friend"})]})}),d.jsx(v.Table.Tbody,{children:E})]}),d.jsx(v.Button,{mt:"md",onClick:()=>C({label:"",export_mode:"simplified",delimiter:h,quotechar:y}),children:"Download simplified"})]}),d.jsxs(v.Card,{shadow:"md",withBorder:!0,children:[d.jsxs(v.Group,{justify:"space-between",children:[d.jsx(v.Text,{children:"Detailed version of the data"}),d.jsx(v.Tooltip,{label:d.jsxs(d.Fragment,{children:[d.jsx(v.Text,{children:"This is a detailed version of the data. It shows all the properties of the elements including all the properties of their relationships"}),d.jsx(v.Text,{children:"It can also be used as a CSV file to be imported into a database"})]}),children:d.jsx(v.ThemeIcon,{variant:"transparent",size:"sm",style:{cursor:"pointer"},children:d.jsx(xd,{})})})]}),d.jsxs(v.Table,{withColumnBorders:!0,children:[d.jsx(v.Table.Thead,{children:d.jsxs(v.Table.Tr,{children:[d.jsx(v.Table.Th,{p:4,children:"name"}),d.jsx(v.Table.Th,{p:4,children:"age"}),d.jsx(v.Table.Th,{p:4,children:"friend.name"}),d.jsx(v.Table.Th,{p:4,children:"friend.age"})]})}),d.jsx(v.Table.Tbody,{children:w})]}),d.jsx(v.Button,{mt:"md",onClick:()=>C({label:"",export_mode:"detailed",delimiter:h,quotechar:y}),children:"Download detailed"})]})]})]})}),u?d.jsx(v.ThemeIcon,{variant:"transparent",size:_.size,c:_.c,children:d.jsx(v.Loader,{size:"100%",color:_.c})}):d.jsx(v.Tooltip,{...e,label:(e==null?void 0:e.label)??"Download",children:d.jsx(v.ActionIcon,{..._,children:d.jsx(o1,{})})})]})}function C0({tooltipProps:e,...t}){const[n,o]=x.useState(!1),{loading:s,refetch:a}=Ae(),u=ar({onClick:()=>{o(!0),a()},...t});return x.useEffect(()=>{s||o(!1)},[s]),n?d.jsx(v.ThemeIcon,{variant:"transparent",size:u.size,c:u.c,children:d.jsx(v.Loader,{size:"100%",color:u.c})}):d.jsx(v.Tooltip,{...e,label:(e==null?void 0:e.refresh)??"Refresh",children:d.jsx(v.ActionIcon,{...u,children:d.jsx(h1,{})})})}function E0({tooltipProps:e,...t}){const{upload:n,refetch:o}=Ae(),[s,{toggle:a,close:u}]=Re.useDisclosure(),[c,h]=x.useState(),[p,y]=x.useState(ti),[g,_]=x.useState(qi),C=ar({onClick:a,...t}),E=x.useCallback(async()=>{await n(c,{delimiter:p,quotechar:g})&&o(),u()},[u,p,c,o,g,n]);return d.jsxs(d.Fragment,{children:[d.jsx(v.Modal,{title:"Import data",centered:!0,opened:s,onClose:u,onExitTransitionEnd:()=>{h(null),y(ti)},children:d.jsxs(v.Stack,{children:[d.jsxs(v.Group,{grow:!0,children:[d.jsx(v.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:p,onChange:y,data:ja,placeholder:"Select delimiter",leftSection:d.jsx(Id,{})}),d.jsx(v.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:g,onChange:_,data:Wa,placeholder:"Select quote character",leftSection:d.jsx(Od,{})})]}),d.jsx(v.FileInput,{label:"CSV file",description:"CSV file containing the data to import",value:c,onChange:h,accept:"text/csv",placeholder:"Upload CSV file",leftSection:d.jsx(l1,{}),clearable:!0,required:!0}),d.jsx(v.Group,{justify:"end",children:d.jsx(v.Button,{onClick:E,disabled:!c,children:"Upload"})})]})}),d.jsx(v.Tooltip,{...e,label:(e==null?void 0:e.label)??"Upload CSV",children:d.jsx(v.ActionIcon,{...C,children:d.jsx(p1,{})})})]})}function ND({children:e,fetch:t=!0,loading:n=d.jsx(v.Center,{children:d.jsx(v.Loader,{})}),end:o=d.jsx(v.Center,{children:"End of data"}),fetchWrapper:s=v.Center,fetchWrapperProps:a}){const{streaming:u,loading:c}=Ae(),{ref:h,inViewport:p}=Re.useInViewport(),y=x.useMemo(()=>Object.values(u.data).flat(),[u.data]),g=x.useMemo(()=>typeof e=="function"?e(y):e,[e,y]);return x.useEffect(()=>{p&&t&&u.fetch()},[p]),d.jsxs(d.Fragment,{children:[g,c&&n,u.isEnd&&o,d.jsx(s,{ref:h,id:"IS-load-trigger",mih:"1%",...a})]})}function LD(e,t){const n=Ae(),o=$r(),s=x.useCallback(({row:a,...u})=>d.jsx(Mn,{fallback:d.jsx(Zu,{id:a.original.id}),functionProps:{api:n,auth:o,data:a.original,mrtProps:{row:a,...u}},children:t}),[n,o,t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:s}}function BD(e,t){return{enableRowSelection:!!e||!!t}}const zr=(e={},...t)=>t.reduce((n,o)=>Bn(n,e[o]),{}),_o=(e,t,n=!1)=>{let o="";n&&(o+="filter");const s=n?e[0].toUpperCase():e[0].toLowerCase();return o+=s+e.slice(1),`${o}*${t}`},x0=(e="")=>{e.startsWith("filter")&&(e=e.slice(6));const[t="",n=""]=e.split("*");return{col:t,operator:n}};function zD({col:e,colFilter:t,onClick:n,...o}){return d.jsxs(v.Menu,{shadow:"md",width:"target",...o,children:[d.jsx(v.Menu.Target,{children:d.jsx(v.Button,{children:"Add filter"})}),d.jsx(v.Menu.Dropdown,{children:t.filters.filter(s=>!s.id).map(s=>d.jsx(v.Menu.Item,{onClick:()=>n({col:e,opr:s.operator,value:""}),children:s.name},`${t.label}-${s.name}`))})]})}function UD({col:e}){const{info:t,queryParams:n,setQueryParams:o}=Ae(),s=za.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),a=x.useMemo(()=>(t==null?void 0:t.filters[e])||{},[e,t==null?void 0:t.filters]),u=x.useMemo(()=>{var y;return((y=a==null?void 0:a.filters)==null?void 0:y.reduce((g,_)=>({...g,[_.operator]:_.name}),{}))||{}},[a==null?void 0:a.filters]),[c]=Re.useDebouncedValue(s.getValues(),rr);Re.useDidUpdate(()=>{const y=c.filters.filter(g=>g.value);o({filters:y})},[c]);const h=s.getValues().filters,p=h.map((y,g)=>y.col===e&&!y.id?d.jsxs(x.Fragment,{children:[d.jsx(v.Grid.Col,{span:1.5,py:0,children:d.jsx(v.Center,{h:"100%",w:"100%",children:d.jsx(v.CloseButton,{onClick:()=>s.removeListItem("filters",g),size:"md",title:"Remove filter",variant:"outline"})})}),d.jsx(v.Grid.Col,{span:10.5,py:0,children:y.opr==="in"?d.jsx(qu,{form:s,name:`filters.${g}.value`,label:u[y.opr],comboboxProps:{withinPortal:!1}}):d.jsx(Hu,{form:s,name:`filters.${g}.value`,label:u[y.opr],schema:a.schema,withinPortal:!1,filter:!0})}),g>=0&&g+1<h.length&&d.jsx(v.Grid.Col,{span:12,py:0,children:d.jsx(v.Divider,{my:"sm",label:"AND",align:"center"})})]},`${y.col}-${g}`):null).filter(Boolean);return d.jsxs(v.Grid,{w:p.length?"25rem":"100%",gap:"md",gutter:"xs",children:[p.length?p:d.jsx(v.Grid.Col,{span:12,children:d.jsx(v.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),d.jsx(v.Grid.Col,{span:12,children:d.jsx(v.Stack,{children:d.jsx(zD,{col:e,colFilter:a||{filters:[]},onClick:y=>s.insertListItem("filters",y),withinPortal:!1})})})]})}function jD({filters:e,col:t,opr:n,table:o}){const s=v.useMantineTheme();return e.map(a=>{const u=a.operator===n;return d.jsx(v.Menu.Item,{color:u?s.primaryColor:void 0,leftSection:d.jsx(v.Text,{size:"xl",ta:"center",w:"2ch",style:{transform:"translateY(-0.1em)"},children:a.name[0]}),onClick:()=>o.setColumnFilterFns(c=>({...c,[t]:_o(t,a.operator)})),value:a.opr,children:a.name},a.operator)})}function WD({enableAdvancedFilters:e,mode:t,setMode:n,col:o,opr:s,filters:a,table:u}){return d.jsxs(d.Fragment,{children:[e&&d.jsxs(d.Fragment,{children:[d.jsx(v.Menu.Item,{component:"div",p:0,children:d.jsx(v.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:t,onChange:n})}),d.jsx(v.Menu.Divider,{})]}),t==="Basic"&&d.jsx(jD,{filters:a,col:o,opr:s,table:u}),t==="Advanced"&&d.jsx(UD,{col:o})]})}const Si=e=>e!=null&&e!=="",A0=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>{const{value:s,onChange:a,leftInputProps:u,rightInputProps:c,groupProps:h,cleariconprops:p,...y}=n,[g,_]=x.useState([null,null]);x.useEffect(()=>{s||_([null,null])},[s]),x.useEffect(()=>{const B=JSON.stringify(g);let D=null;return g.every(Si)&&B!==s?D=setTimeout(()=>{a(JSON.stringify(g))},rr):g.every(k=>!Si(k))&&(D=setTimeout(()=>{a(void 0)},rr)),()=>clearTimeout(D)},[g]);const C=x.useCallback((B,D)=>{_(k=>{const H=[...k];return H[D]=B,H})},[]);let[E,w]=g;const P=Si(w)&&!Si(E),N=Si(E)&&!Si(w),R=typeof E=="number"?d.jsx(v.ActionIcon,{...p,onClick:()=>_(B=>[null,B[1]]),children:d.jsx($d,{})}):null,W=typeof w=="number"?d.jsx(v.ActionIcon,{...p,onClick:()=>_(B=>[B[0],null]),children:d.jsx($d,{})}):null;return d.jsxs(v.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...h,children:[d.jsx(v.NumberInput,{ref:o,styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:R,...y,...t,value:E??"",onChange:B=>C(B,0),placeholder:P?"Start value is required":"Start value",error:P&&" ",...u}),d.jsx(v.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:W,...y,...t,value:w??"",onChange:B=>C(B,1),placeholder:N?"End value is required":"End value",error:N&&" ",...c})]})});A0.displayName="HeaderBetweenInput";const O0=x.forwardRef(({clearIcon:e,mrtprops:{selectprops:t},...n},o)=>d.jsx(v.Select,{ref:o,data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],...t,...n,value:ni(n.value)?String(n.value):null,onChange:s=>n.onChange(ni(s)?s===String(!0):void 0)}));O0.displayName="HeaderBooleanInput";const ec=e=>e==="range"?[null,null]:null,I0=(e,t)=>e==="range"?t.every(n=>n!==null):t!==null,tc=x.forwardRef(({type:e,clearIcon:t,mrtprops:{dateinputprops:n},...o},s)=>{const{value:a,onChange:u,...c}=o,[h,p]=x.useState(ec(e));return x.useEffect(()=>{p(ec(e))},[e]),x.useEffect(()=>{a||p(ec(e))},[e,a]),x.useEffect(()=>{const y=JSON.stringify(e==="range"?h.map(_=>_?_.toISOString():null):(h==null?void 0:h.toISOString())??null);let g=null;return I0(e,h)&&y!==a?g=setTimeout(()=>{u(y)},rr):I0(e,h)||(g=setTimeout(()=>{u(void 0)},rr)),()=>clearTimeout(g)},[h]),d.jsx(Hi.DatePickerInput,{ref:s,type:e,clearable:!0,valueFormat:"DD.MM.YYYY",...c,...n,value:e==="range"?Array.isArray(h)?h:[null,null]:Array.isArray(h)?null:h,onChange:p})});tc.displayName="HeaderDateInput";const P0=x.forwardRef(({data:e,clearIcon:t,mrtprops:{multiselectprops:n},placeholder:o,...s},a)=>{const u=Array.isArray(s.value)?s.value.map(c=>String(typeof c=="object"?xt(c.id):c)):[];return d.jsxs(v.Box,{...s,children:[!u.length&&d.jsx(v.TextInput,{pos:"absolute",placeholder:o,...s,value:void 0,onChange:void 0}),d.jsx(v.MultiSelect,{ref:a,styles:{pill:{maxWidth:"5rem"}},data:e,...n,...s,value:u})]})});P0.displayName="HeaderMultiSelectInput";const $0=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>d.jsx(v.NumberInput,{ref:o,rightSection:e,...t,...n,value:n.value??""}));$0.displayName="HeaderNumberInput";const nc=x.forwardRef(({data:e,clearIcon:t,mrtprops:{selectprops:n},...o},s)=>d.jsx(v.Select,{ref:s,data:e,searchable:!0,...n,...o,value:o.value??null}));nc.displayName="HeaderSelectInput";const rc=x.forwardRef(({clearIcon:e,mrtprops:{multiselectprops:t},...n},o)=>d.jsx(v.TagsInput,{ref:o,styles:{pill:{maxWidth:"5rem"}},...t,...n,value:n.value??[],onChange:s=>n.onChange(s.length?s:void 0)}));rc.displayName="HeaderTagsInput";const ic=x.forwardRef((e,t)=>{const[n,o]=x.useState();return d.jsx(rc,{ref:t,...e,searchValue:n?n.toString():"",onSearchChange:s=>{if(!s){o(void 0);return}const a=Number(s);isNaN(a)||o(a)}})});ic.displayName="HeaderTagsNumberInput";const oc=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>d.jsx(v.TextInput,{ref:o,rightSection:e,...t,...n,value:n.value||""}));oc.displayName="HeaderTextInput";const M0=x.forwardRef(({component:e,...t},n)=>{const o=Ae(),s=$r(),a=x.useMemo(()=>({api:o,auth:s,componentProps:{...t,ref:n}}),[o,s,t,n]);return d.jsx(Mn,{ref:n,fallback:d.jsx(oc,{...t}),functionProps:a,children:e})});M0.displayName="HeaderInput";const VD=(e,t)=>{if(!(!e||!t)){switch(e){case"tc":return({componentProps:n})=>d.jsx(oc,{...n});case"in":switch(t.type){case"Integer":return({componentProps:n})=>d.jsx(ic,{...n});case"Enum":return({componentProps:n})=>d.jsx(ic,{data:t.values,...n})}return({componentProps:n})=>d.jsx(rc,{...n});case"bw":switch(t.type){case"Date":case"DateTime":return({componentProps:n})=>d.jsx(tc,{type:"range",...n});default:return({componentProps:n})=>d.jsx(A0,{...n})}case"eq":case"neq":switch(t.type){case"Boolean":return({componentProps:n})=>d.jsx(O0,{...n})}break;case"rel_o_m":case"nrel_o_m":return({componentProps:n})=>d.jsx(nc,{data:t.values.map(o=>({value:String(xt(o.id)),label:o.value})),...n});case"rel_m_m":case"nrel_m_m":return({componentProps:n})=>d.jsx(P0,{data:t.values.map(o=>({value:String(xt(o.id)),label:o.value})),...n})}switch(t.type){case"Integer":return({componentProps:n})=>d.jsx($0,{...n});case"Enum":return({componentProps:n})=>d.jsx(nc,{data:t.values,...n});case"Date":case"DateTime":return({componentProps:n})=>d.jsx(tc,{...n})}}},Ci={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},F0=x.forwardRef(({label:e,disabled:t,children:n,...o},s)=>t?x.cloneElement(n,{ref:s}):d.jsx(v.Tooltip,{label:e,...o,children:x.cloneElement(n,{ref:s})}));F0.displayName="FilterIconWrapper";const D0=x.forwardRef(({indicator:e,children:t,...n},o)=>{const{height:s,ref:a}=Re.useElementSize(),u=Re.useMergedRef(o,a);if(!e)return x.cloneElement(t,{ref:u});const c=2;//! This is the height offset between the button from ActionIcon and the icon itself
|
|
232
|
-
return d.jsx(v.Indicator,{zIndex:20,size:16,label:e,styles:{root:{height:s+c}},...n,children:x.cloneElement(t,{ref:u})})});D0.displayName="FilterIndicatorWrapper";function GD({children:e,enableFilterModes:t,enableAdvancedFilters:n,filterProps:o,filterModeDescription:s,filterMenu:a,filters:u,filterFn:c,mrtProps:{column:h,table:p,...y}}){var K;const{info:g,queryParams:_,setQueryParams:C}=Ae(),E=Ae(),w=$r(),P=x.useMemo(()=>{var Z,ee;return(ee=(Z=g==null?void 0:g.filters)==null?void 0:Z[h.id])==null?void 0:ee.schema},[h.id,g==null?void 0:g.filters]),[N,R]=x.useState("Basic"),[W,{toggle:B}]=Re.useDisclosure(),D=((K=p.getState().columnFilterFns)==null?void 0:K[h.id])||c,k=x.useMemo(()=>x0(D).operator,[D]),H=x.useMemo(()=>{var Z;return(Z=u==null?void 0:u.find(ee=>ee.operator===k))==null?void 0:Z.name},[u,k]),ae=za.useField({mode:"controlled"}),oe=x.useRef(k),S=x.useMemo(()=>(_==null?void 0:_.filters.filter(Z=>Z.id!==h.id&&Z.col===h.id).map(Z=>({...Z})))||[],[_,h.id]);oe.current!==k&&(oe.current=k,ae.reset());const U=x.useCallback(()=>{ae.reset(),h.setFilterValue(void 0)},[]),[ne]=Re.useDebouncedValue(ae.getInputProps().value,rr),fe=Re.useMounted(),ye=x.useMemo(()=>_==null?void 0:_.filters.find(Z=>Z.col===h.id&&Z.opr===k),[h.id,k,_==null?void 0:_.filters]);x.useEffect(()=>{fe&&h.setFilterValue(ne??void 0)},[ne]),x.useEffect(()=>{if(!fe)return;const Z=h.getFilterValue();Z===void 0?U():ae.getInputProps().onChange(Z)},[h.getFilterValue()]),x.useEffect(()=>{fe&&(ye||U())},[ye]),Re.useDidUpdate(()=>{var ee;const Z=(ee=_==null?void 0:_.filters)==null?void 0:ee.filter(ie=>ie.id!==h.id);ni(ne)&&ne!==""&&Z.push({id:h.id,col:h.id,opr:k,value:ne}),C({filters:Z})},[ne]);const Me=x.useMemo(()=>{const Z={variant:"subtle"};return!(u!=null&&u.length)&&(Z.disabled=!0,Z.c="gray"),Z},[u==null?void 0:u.length]),we=x.useMemo(()=>Ga(t?e==null?void 0:e[k]:e,VD(k,P)),[e,t,k,P]),Le=x.useMemo(()=>({...Me,variant:"transparent",c:void 0,size:"sm",onClick:U}),[Me,U]),Ie=x.useMemo(()=>({api:E,auth:w,mrtProps:{column:h,table:p,...y}}),[E,w,h,y,p]),lt=x.useMemo(()=>({...Ie,componentProps:{label:p.options.localization.changeFilterMode,disabled:!(u!=null&&u.length),indicator:S.length,aiProps:Me,onClick:B}}),[Me,S.length,u==null?void 0:u.length,Ie,p.options.localization.changeFilterMode,B]),q=x.useMemo(()=>({...Ie,componentProps:{filterMode:H}}),[H,Ie]),Y=ft(t?zr(o,k):o,Ie),X=x.useMemo(()=>{var Z,ee;return{w:"100%",variant:"unstyled",disabled:!(u!=null&&u.length),title:u.length?void 0:"No filters",placeholder:(Z=p.options.localization.filterByColumn)==null?void 0:Z.replace("{column}",String(h.columnDef.header)),"aria-label":(ee=p.options.localization.filterByColumn)==null?void 0:ee.replace("{column}",String(h.columnDef.header)),style:{fontWeight:"normal"},mrtprops:{column:h,table:p,...y,textinputprops:{className:Pr("mrt-filter-text-input",Ci.root),...ft(p.mantineFilterTextInputProps,[{column:h,table:p,...y}]),...ft(h.columnDef.mantineFilterTextInputProps,[{column:h,table:p,...y}])},selectprops:{className:Pr("mrt-filter-text-input",Ci.root),...ft(p.mantineFilterSelectProps||{clearable:!0},{column:h,table:p,...y}),...ft(h.columnDef.mantineFilterSelectProps,{column:h,table:p,...y})},multiselectprops:{className:Pr("mrt-filter-text-input",Ci.root),...ft(p.mantineFilterMultiSelectProps||{clearable:!0},{column:h,table:p,...y}),...ft(h.columnDef.mantineFilterMultiSelectProps,{column:h,table:p,...y})},dateinputprops:{className:Pr("mrt-filter-text-input",Ci.root,Ci["date-filter"]),...ft(p.mantineFilterDateInputProps,{column:h,table:p,...y}),...ft(h.columnDef.mantineFilterDateInputProps,{column:h,table:p,...y})},autocompleteprops:{className:Pr("mrt-filter-text-input",Ci.root),...ft(p.mantineFilterAutocompleteProps,{column:h,table:p,...y}),...ft(h.columnDef.mantineFilterAutocompleteProps,{column:h,table:p,...y})}},ref:ie=>{ie&&(p.refs.filterInputRefs.current[`${h.id}-0`]=ie)},clearIcon:ae.isDirty()&&d.jsx(v.CloseButton,{...Le}),...Y,cleariconprops:Le}},[Le,h,Y,ae,u.length,y,p]);return d.jsxs(v.Menu,{opened:W,closeOnClickOutside:!0,onChange:B,children:[d.jsxs(v.Stack,{w:"100%",gap:"0.25rem",children:[d.jsxs(v.Flex,{align:"flex-end",children:[d.jsx(M0,{component:we,field:ae,...ae.getInputProps(),...X}),t&&d.jsx(v.Menu.Target,{children:d.jsx(Mn,{fallback:u.length?d.jsx(F0,{label:p.options.localization.changeFilterMode,position:"bottom-start",withArrow:!0,arrowPosition:"side",children:d.jsx(D0,{indicator:n?S.length:void 0,children:d.jsx(v.ActionIcon,{...Me,onClick:B,children:d.jsx(u1,{})})})}):null,functionProps:lt,children:a})})]}),t&&d.jsx(Mn,{fallback:u.length?d.jsx(v.Input.Description,{size:"xs",children:p.options.localization.filterMode.replace("{filterType}",yn.localizedFilterOption(zr(p.options.localization,h.id),H)||yn.localizedFilterOption(p.options.localization,H)||H)}):null,functionProps:q,children:s})]}),d.jsx(v.Menu.Dropdown,{children:d.jsx(WD,{enableAdvancedFilters:n,mode:N,setMode:R,col:h.id,opr:k,filters:u,table:p})})]})}function HD({highlight:e,truncate:t,children:n}){return Array.isArray(n)?n.map((o,s)=>{var a;return(a=t==null?void 0:t[s])!=null&&a.truncated?d.jsx(v.Tooltip,{label:t[s].original,children:d.jsx(v.Highlight,{highlight:e,children:t[s].truncated},s)},s):d.jsx(v.Highlight,{highlight:e,children:o},s)}):t!=null&&t.truncated?d.jsx(v.Tooltip,{label:t.original,children:d.jsx(v.Highlight,{highlight:e,children:t.truncated})}):d.jsx(v.Highlight,{highlight:e,children:n})}function qD(e,t,n,o){const{path:s,info:a,data:u,specialKey:c}=Ae(),h=Ae(),p=$r(),y=x.useMemo(()=>(u==null?void 0:u.list_columns.map(C=>{var oe,S,U,ne,fe,ye,Me;const{component:E,enableFilterModes:w,enableAdvancedFilters:P,filterComponent:N,filterProps:R,filterModeDescription:W,filterMenu:B,defaultOpr:D=((ne=(U=(S=(oe=a==null?void 0:a.filters)==null?void 0:oe[C])==null?void 0:S.filters)==null?void 0:U[0])==null?void 0:ne.operator)||""}=zr(t,c.all,C),k=_o(C,D),H=((ye=(fe=a==null?void 0:a.filters)==null?void 0:fe[C])==null?void 0:ye.filters)||[],ae={};return E!==void 0&&(ae.Header=we=>ft(E,{api:h,auth:p,mrtProps:we})),{accessorKey:C,accessorFn:we=>Yi(we,C),header:(Me=u==null?void 0:u.label_columns)==null?void 0:Me[C],Filter:we=>d.jsx(GD,{enableFilterModes:w,enableAdvancedFilters:P,filterProps:R,filterModeDescription:W,filterMenu:B,filters:H,filterFn:k,mrtProps:we,children:N}),enableSorting:u==null?void 0:u.order_columns.includes(C),filterFn:H.length?k:void 0,columnFilterModeOptions:H.map(we=>_o(C,we.operator)),Cell:({cell:we,table:Le,column:Ie,...lt})=>{const q=Le.getState().globalFilter,Y=Ie.getFilterValue()||"",{component:X,separator:K,truncate:Z}=zr(n,c.all,C);let ee=[];q&&ee.push(...q.split(o).map(pe=>pe.trim())),Y&&typeof Y=="string"&&ee.push(...Y.split(o).map(pe=>pe.trim()));let ie=we.getValue();typeof ie=="number"?ie=ie.toLocaleString():ie==null&&(ie=""),K&&(ie=ie.split(K));let ve={};Z&&(Array.isArray(ie)?ve=ie.map(pe=>({original:pe,truncated:pe.length>Z?`${pe.slice(0,Z)}...`:null})):ve={original:ie,truncated:ie.length>Z?`${ie.slice(0,Z)}...`:null});const be={api:h,auth:p,data:we.row.original,highlight:ee,componentProps:{value:ie},mrtProps:{cell:we,table:Le,column:Ie,...lt}};return d.jsx(Mn,{fallback:d.jsx(HD,{highlight:ee,truncate:ve,children:ie}),functionProps:be,children:X})},...ae,...zr(e,c.all,C)}}))||[],[u==null?void 0:u.list_columns,u==null?void 0:u.label_columns,u==null?void 0:u.order_columns,a,e,c.all,h,p,t,n,o]),[g,_]=Re.useSetState({});return x.useEffect(()=>{y.length&&_({[u.path]:y})},[y]),{columns:y.length?y:(g==null?void 0:g[s])||y,manualFiltering:!0}}function YD(){const{data:e,loading:t}=Ae();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function KD(e){const{data:t}=Ae();return e?{mantineTableBodyRowProps:({row:n})=>({onClick:()=>{const o=t.ids[n.id];e(o,n.original)},style:{cursor:"pointer"}})}:null}function JD(){const{info:e}=Ae();return{filterFns:x.useMemo(()=>Object.entries((e==null?void 0:e.filters)||{}).reduce((t,[n,o])=>(o.filters.forEach(s=>t[_o(n,s.operator)]=null),t),{}),[e==null?void 0:e.filters])}}function ZD(){const{queryParams:e,setQueryParams:t}=Ae(),n=x.useMemo(()=>e==null?void 0:e.global_filter,[e==null?void 0:e.global_filter]),[o,s]=x.useState(n||""),[a]=Re.useDebouncedValue(o,rr);return Re.useDidUpdate(()=>{n&&n!==a&&s(n)},[n]),Re.useDidUpdate(()=>{a?t({page:0,global_filter:a}):e!=null&&e.global_filter&&t({page:0,global_filter:void 0})},[a]),{manualFiltering:!0,onGlobalFilterChange:s,state:{globalFilter:o}}}function RD(e){const{data:t,queryParams:n,setQueryParams:o}=Ae(),s=x.useMemo(()=>({pageIndex:(n==null?void 0:n.page)||xf,pageSize:(n==null?void 0:n.page_size)||Af}),[n==null?void 0:n.page,n==null?void 0:n.page_size]),a=x.useCallback(u=>{const c=u(s);!(t!=null&&t.count)&&c.pageIndex===0||o({page:c.pageIndex,page_size:c.pageSize})},[t==null?void 0:t.count,s,o]);return{enablePagination:!e,manualPagination:!0,state:{pagination:s},onPaginationChange:a}}function XD(e){const{ref:t,height:n}=Re.useElementSize(),{ref:o,height:s}=Re.useElementSize(),a=x.useMemo(()=>{const p={h:"100%",withBorder:e};return e||(p.shadow=void 0),p},[e]),u=x.useMemo(()=>({ref:o}),[o]),c=x.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),h=x.useMemo(()=>({h:`calc(100% - ${s+n}px)`}),[s,n]);return{mantinePaperProps:a,mantineTopToolbarProps:u,mantineBottomToolbarProps:c,mantineTableContainerProps:h}}function QD(){const{queryParams:e,setQueryParams:t,data:n}=Ae(),o=x.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column,desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),s=x.useCallback(a=>{const u=a(o);if(!u.length){t({order_column:null,order_direction:null});return}const c=u[0];t({order_column:n.order_columns.includes(c.id)?c.id:`${c.id}.id`,order_direction:c.desc?"desc":"asc"})},[n==null?void 0:n.order_columns,t,o]);return{manualSorting:!0,state:{sorting:o},onSortingChange:s}}function ek(e,t){return{toggleGlobalFilter:d.jsx(yn.MRT_ToggleGlobalFilterButton,{table:e,disabled:!1},"basic-toggleGlobalFilter"),filter:d.jsx(yn.MRT_ToggleFiltersButton,{table:e},"basic-filter"),refresh:d.jsx(C0,{tooltipProps:{label:e.options.localization.refresh}},"basic-refresh"),add:(t==null?void 0:t.add)&&d.jsx(Ru,{tooltipProps:{label:e.options.localization.add}},"basic-add"),download:(t==null?void 0:t.download)&&d.jsx(Qu,{tooltipProps:{label:e.options.localization.download}},"basic-download"),upload:(t==null?void 0:t.upload)&&d.jsx(E0,{tooltipProps:{label:e.options.localization.upload}},"basic-upload"),showHideColumns:d.jsx(yn.MRT_ShowHideColumnsButton,{table:e},"basic-showHideColumns"),toggleDensePadding:d.jsx(yn.MRT_ToggleDensePaddingButton,{table:e},"basic-toggleDensePadding"),toggleFullScreen:d.jsx(yn.MRT_ToggleFullScreenButton,{table:e},"basic-toggleFullScreen")}}function k0(e,t,n,o){Object.entries(e||{}).forEach(([a,u])=>{a in t&&(t[a]=d.jsx(Mn,{fallback:t[a],functionProps:n,children:u},`custom-${a}`))});let s=Object.values(t);return Object.entries(o||{}).forEach(([a,u])=>{a=Number(a)-1;const c=d.jsx(Mn,{functionProps:n,children:u},`order-${a}`);a>s.length?s.push(c):s=[...s.slice(0,a),c,...s.slice(a)]}),d.jsx(v.Flex,{gap:"0.125rem",align:"center",children:s})}function tk(e={},t,n){const{info:o,queryParams:s,setQueryParams:a}=Ae(),u=Ae(),c=$r(),{customizer:h,custom:p,leftToolbar:y}=e,g=x.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(E=>({label:E.name,value:JSON.stringify(E.value)}))]:[],[t]),_=x.useMemo(()=>g.length?d.jsx(v.SegmentedControl,{value:JSON.stringify((s==null?void 0:s.filters)||[]),onChange:E=>a({filters:JSON.parse(E)}),data:g}):null,[s==null?void 0:s.filters,g,a]);return{renderToolbarInternalActions:x.useCallback(({table:E})=>{const w={api:u,auth:c,mrtProps:{table:E}},P={add:o==null?void 0:o.permissions.includes("can_post"),download:o==null?void 0:o.permissions.includes("can_download"),upload:o==null?void 0:o.permissions.includes("can_upload")},N=ek(E,P);return k0(h,N,w,p)},[u,c,p,h,o==null?void 0:o.permissions]),enableTopToolbar:!n,enableFilters:(h==null?void 0:h.filter)!==null,...x.useMemo(()=>{if(_&&y)throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");const E={};if(_&&(E.renderTopToolbarCustomActions=()=>d.jsx(v.Group,{justify:"space-between",children:d.jsx(v.Box,{children:_})}),E.positionToolbarAlertBanner="bottom"),y){const{custom:w}=y;E.renderTopToolbarCustomActions=({table:P})=>k0(void 0,{},{api:u,auth:c,mrtProps:{table:P}},w),E.positionToolbarAlertBanner="bottom"}return E},[u,c,y,_])}}const N0={"toolbar-alert":"_toolbar-alert_bw71q_25","head-overlay":"_head-overlay_bw71q_28"},nk=({alertBanner:e,table:t,...n})=>{var we,Le;const{getFilteredSelectedRowModel:o,getPrePaginationRowModel:s,getState:a,resetRowSelection:u,options:{enableRowSelection:c,enableSelectAll:h,icons:{IconX:p},localization:y,mantineToolbarAlertBannerBadgeProps:g,mantineToolbarAlertBannerProps:_,manualPagination:C,positionToolbarAlertBanner:E,rowCount:w}}=t,{density:P,grouping:N,rowSelection:R}=a(),{left:W,right:B,renderToolbarAlertBannerContent:D,wrapperProps:k}=e??{},{flex:H,group:ae,stack:oe}=k??{},S={...ft(_,{table:t}),...n},U=ft(g,{table:t}),ne=w??s().flatRows.length,fe=x.useMemo(()=>C?Object.values(R).filter(Boolean).length:o().rows.length,[R,ne,C]),ye=fe?d.jsxs(v.Flex,{align:"center",gap:"sm",children:[(Le=(we=y.selectedCountOfRowCountRowsSelected)==null?void 0:we.replace("{selectedCount}",fe.toString()))==null?void 0:Le.replace("{rowCount}",ne.toString()),d.jsx(v.Button,{onClick:u,size:"compact-xs",variant:"subtle",children:y.clearSelection}),d.jsx(v.Button,{onClick:Ie=>yn.getMRT_SelectAllHandler({table:t})(Ie,!1,!0),size:"compact-xs",variant:"subtle",children:y.clearSelectionOnThisPage??"Clear selection on this page"})]}):null,Me=N.length>0?d.jsxs(v.Group,{gap:"xs",children:[y.groupedBy,N.map((Ie,lt)=>d.jsxs(x.Fragment,{children:[lt>0?y.thenBy:"",d.jsxs(v.Badge,{className:"alert-badge",rightSection:d.jsx(v.ActionIcon,{color:"white",onClick:()=>t.getColumn(Ie).toggleGrouping(),size:"xs",variant:"subtle",children:d.jsx(p,{style:{transform:"scale(0.8)"}})}),variant:"filled",...U,children:[t.getColumn(Ie).columnDef.header," "]})]},`${lt}-${Ie}`))]}):null;return d.jsxs(v.Flex,{className:Pr(N0["toolbar-alert"],E==="head-overlay"&&N0["head-overlay"],P),...H,children:[c&&h&&E==="head-overlay"&&d.jsx(yn.MRT_SelectCheckbox,{table:t}),d.jsxs(v.Group,{align:"flex-start",gap:"xs",...ae,children:[ft(W,{table:t}),Ga(ft(D,{selectedAlert:ye,groupedAlert:Me,table:t}),d.jsxs(v.Stack,{gap:"xs",...oe,children:[S==null?void 0:S.children,ye,Me]})),ft(B,{table:t})]})]})};function rk(e){const{alertBanner:t}=e;return{renderToolbarAlertBannerContent:({table:n})=>d.jsx(nk,{alertBanner:t,table:n})}}function ik(){const{data:e}=Ae();return x.useMemo(()=>(e==null?void 0:e.result.length)>=1e3,[e])?{enableRowVirtualization:!0,rowVirtualizerOptions:{overscan:5}}:{}}const ok={enableStickyHeader:!0,enableColumnPinning:!0},L0=x.forwardRef((e,t)=>{var Lt,dr,vt;const{info:n,data:o,queryParams:s,refetch:a,specialKey:u}=Ae(),c=v.useProps("NextGenDataGrid",{},{}),{fetchOnMount:h=!0,hideToolbar:p,hideActions:y,hidePagination:g,hideError:_,onSelectCheckbox:C,onClickEntry:E,bulkActions:w,table:P,quickFilters:N,withBorder:R,columnProps:W,header:B,body:D,form:k,toolbar:H={},textFilterSeparator:ae=";",bodySeparator:oe,bodyTruncate:S,headerCustomizer:U,bodyCustomizer:ne,toolbarCustomizer:fe,hideAdd:ye,hideDownload:Me,hideFilter:we,...Le}=x.useMemo(()=>Bn(c,e),[e,c]);oe&&Object.keys(D).forEach(ke=>{D[ke]=D[ke]||{},D[ke].separator=D[ke].separator||oe}),S&&Object.keys(D).forEach(ke=>{D[ke]=D[ke]||{},D[ke].truncate=D[ke].truncate||S}),U&&Object.keys(U).forEach(ke=>{B[ke]=B[ke]||{},B[ke].component=U[ke].component||U[ke]}),ne&&Object.keys(ne).forEach(ke=>{D[ke]=D[ke]||{},D[ke].component=ne[ke].component||ne[ke]}),fe&&(H.custom=H.custom||fe),ye&&(H.customizer=H.customizer||{},H.customizer.add=H.customizer.add||null),Me&&(H.customizer=H.customizer||{},H.customizer.download=H.customizer.download||null),we&&(H.customizer=H.customizer||{},H.customizer.filter=H.customizer.filter||null),x.useEffect(()=>{process.env.NODE_ENV==="development"&&(oe&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),S&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),U&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),ne&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),fe&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),ye&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),Me&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),we&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const Ie=YD(),lt=QD(),q=RD(g),Y=qD(W,B,D,ae),X=XD(R),K=LD(y,(Lt=zr(D,u.actions))==null?void 0:Lt.component),Z=ZD(),ee=ik(),ie=tk(H,N,p),ve=KD(E),be=BD(C,w),pe=JD(),Ce=rk(H),tt=x.useMemo(()=>Bn(ok,{mantinePaperProps:{ref:t},getRowId:ke=>ke.id},Y,Ie,lt,q,X,K,Z,ee,ie,ve,be,pe,Ce,P),[t,Y,Ie,lt,q,X,K,Z,ee,ie,ve,be,pe,Ce,P]),te=yn.useMantineReactTable(tt);x.useEffect(()=>{!s&&h&&a()},[]),x.useEffect(()=>{C==null||C(Object.keys(te.getState().rowSelection)),w==null||w.setSelectedIds(Object.keys(te.getState().rowSelection))},[w,o==null?void 0:o.ids,te.getState().rowSelection,C]);const{setView:yt}=zn("add"),{setView:Je}=zn("edit");return x.useEffect(()=>{var ke,qn;(ke=k==null?void 0:k.add)!=null&&ke.initialView&&yt(k.add.initialView),(qn=k==null?void 0:k.edit)!=null&&qn.initialView&&Je(k.edit.initialView)},[]),d.jsxs(v.Box,{h:"100%",w:"100%",pos:"relative",children:[d.jsxs(Ku,{cond:!!n,children:[d.jsx(Xu,{jsonForms:k==null?void 0:k.add,...(dr=k==null?void 0:k.add)==null?void 0:dr.dialogProps}),d.jsx(Mu,{jsonForms:k==null?void 0:k.edit,...(vt=k==null?void 0:k.edit)==null?void 0:vt.dialogProps})]}),d.jsx(yn.MantineReactTable,{table:te,...Le}),_?null:d.jsx(Fu,{})]})});L0.displayName="NextGenDataGrid";const sc={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function sk({basePath:e="/security",Target:t,children:n}){const o=Sf.useNavigate(),{user:s,signout:a}=$r(),[u,c]=x.useState(!1),p=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:g1},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:c1},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Ad},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Ad},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:i1}].filter(y=>s.permissions.includes(y.name));return d.jsxs(v.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:u,onClose:()=>c(!1),onOpen:()=>c(!0),children:[d.jsx(v.Menu.Target,{children:t||d.jsx(v.UnstyledButton,{className:sc.btn,style:{borderRadius:4},p:"xs",children:d.jsxs(v.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[d.jsx(v.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${s.first_name} ${s.last_name}`}),d.jsx(_l,{size:12})]})})}),d.jsxs(v.Menu.Dropdown,{children:[p.length?d.jsxs(d.Fragment,{children:[d.jsx(v.Menu.Label,{children:"Security"}),p.map((y,g)=>d.jsx(v.Menu.Item,{p:12,leftSection:d.jsx(y.Icon,{className:sc.iconSmall}),onClick:()=>o(y.resource_name),children:y.label},g)),d.jsx(v.Menu.Divider,{})]}):null,n,d.jsx(v.Menu.Item,{leftSection:d.jsx(f1,{p:12,className:sc.iconSmall}),onClick:a,children:"Logout"})]})]})}O.Actions=Zu,O.Add=Ru,O.AddDialog=Xu,O.AlertDialog=Fd,O.ApiContext=Ua,O.ApiProvider=Sd,O.AuthContext=Ha,O.Body=f0,O.BulkActionsContext=Ya,O.CommonModal=Iu,O.DEBOUNCE_DELAY=rr,O.DEFAULT_DELIMITER=ti,O.DEFAULT_PAGE=xf,O.DEFAULT_PAGE_SIZE=Af,O.DEFAULT_QUOTECHAR=qi,O.DELIMITER_DATA=ja,O.DataGrid=Ju,O.Delete=Dd,O.DeleteDialog=rp,O.Download=Qu,O.Edit=kd,O.EditDialog=Mu,O.ErrorDialog=Fu,O.FallbackWrapper=Mn,O.Field=vo,O.FieldTitle=Ws,O.Filter=_0,O.FilterMenu=b0,O.FormAutocomplete=$D,O.FormContextAdd=Ka,O.FormContextEdit=Ja,O.FormDatePicker=p0,O.FormDateTimePicker=g0,O.FormField=Hu,O.FormFilterIn=qu,O.FormGeometryField=m0,O.FormJsonField=Vu,O.FormRelatedListSelect=y0,O.FormRelatedSelect=v0,O.FormSelect=Gu,O.FormTextField=bo,O.Header=ju,O.InfiniteScroll=ND,O.InfoContext=qa,O.LazyLoadWrapper=Ku,O.Main=h0,O.MantineArrayControlRenderer=dm,O.MantineBooleanCell=Wh,O.MantineBooleanControl=_m,O.MantineBooleanInput=Hl,O.MantineDateCell=Gh,O.MantineDateControl=wm,O.MantineDateInput=ql,O.MantineDateTimeCell=qh,O.MantineDateTimeControl=Cm,O.MantineDateTimeInput=Yl,O.MantineEnumArrayInput=Bh,O.MantineEnumArrayRenderer=mm,O.MantineEnumCell=Kh,O.MantineEnumControl=xm,O.MantineEnumInput=Kl,O.MantineGroupLayoutRenderer=Um,O.MantineGroupLayoutTester=zm,O.MantineHorizontalLayoutRenderer=Wm,O.MantineIntegerCell=Zh,O.MantineIntegerControl=Om,O.MantineJsonControl=Pm,O.MantineJsonInput=zh,O.MantineLabelRenderer=Bm,O.MantineLabelTester=Lm,O.MantineLayoutRenderer=cs,O.MantineNumberCell=Xh,O.MantineNumberControl=Mm,O.MantineNumberInput=ro,O.MantineObjectControl=vm,O.MantineObjectControlTester=ym,O.MantineObjectInput=Uh,O.MantineOneOfEnumCell=ep,O.MantineOneOfEnumControl=Dm,O.MantineOneOfEnumInput=Jl,O.MantineTableControl=cm,O.MantineTextCell=np,O.MantineTextControl=Nm,O.MantineTextInput=Zl,O.MantineVerticalLayoutRenderer=Gm,O.NextGenDataGrid=L0,O.NoBorderTableCell=wi,O.NonEmptyRow=um,O.Pagination=Wu,O.Provider=cb,O.QUOTECHAR_DATA=Wa,O.Refresh=C0,O.Row=c0,O.TableToolbar=im,O.Toolbar=Yu,O.Upload=E0,O.UserMenu=sk,O.VIEW_MODE=mt,O.ValidationIcon=rm,O.View=w0,O.ViewDialog=T0,O.authInfo=kf,O.authOAuthSignin=Df,O.authResetPassword=Ff,O.authSignin=$f,O.authSignout=Mf,O.compareStateWithStore=If,O.convertId=xt,O.convertInfo=_d,O.convertLocalToUTCISOString=Gl,O.convertToFormInputs=Ym,O.convertUTCISOStringToLocal=Fh,O.createFetchParams=Tt,O.createItem=jf,O.createProxy=jo,O.createQueryParams=Zi,O.deepMerge=Bn,O.deleteItem=Wf,O.downloadItems=Vf,O.fromFilterFnToFilter=x0,O.fromFilterToFilterFn=_o,O.getDefaultValues=Za,O.getInfo=Gf,O.getItem=Hf,O.getItems=qf,O.getProps=zr,O.getUser=Nf,O.getValidationSchema=vl,O.getValue=Yi,O.getValueOrDefault=Ga,O.initialState=Wo,O.isEnumArrayControl=hm,O.isJsonControl=pm,O.isSchemaTypeInclude=lr,O.isTruthy=ni,O.mantineArrayControlTester=fm,O.mantineBooleanCellTester=jh,O.mantineBooleanControlTester=bm,O.mantineCells=Hm,O.mantineDateCellTester=Vh,O.mantineDateControlTester=Tm,O.mantineDateTimeCellTester=Hh,O.mantineDateTimeControlTester=Sm,O.mantineEnumArrayRendererTester=gm,O.mantineEnumCellTester=Yh,O.mantineEnumControlTester=Em,O.mantineHorizontalLayoutTester=jm,O.mantineIntegerCellTester=Jh,O.mantineIntegerControlTester=Am,O.mantineJsonControlTester=Im,O.mantineNumberCellTester=Rh,O.mantineNumberControlTester=$m,O.mantineOneOfEnumCellTester=Qh,O.mantineOneOfEnumControlTester=Fm,O.mantineRenderers=qm,O.mantineTextCellTester=tp,O.mantineTextControlTester=km,O.mantineVerticalLayoutTester=Vm,O.normalProps=Pu,O.normalize=Of,O.overlayProps=$u,O.parseFromValuesOrFunc=ft,O.parseValue=Va,O.postBulk=Jf,O.updateItem=Yf,O.updateUser=Lf,O.uploadItems=Kf,O.urlJoin=ot,O.useActionIcon=ar,O.useApi=Ae,O.useAuth=$r,O.useBooleanProps=sh,O.useBulkActions=fb,O.useCommonProps=In,O.useContextProps=_n,O.useCustomFetch=m1,O.useDateProps=fs,O.useDebouncedChange=fT,O.useForms=zn,O.useInfo=Pf,O.useJsonProps=Dh,O.useMultiSelectProps=kh,O.useNumberProps=Nh,O.useProvideApi=Td,O.useProvideAuth=Bf,O.useProvideBulk=wd,O.useProvideForm=bl,O.useProvideInfo=zf,O.useProxy=Ki,O.useSelectProps=ds,O.useTextProps=Lh,O.useTrueOnce=Md,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
|
227
|
+
export default theme;`}function Eu(e={},...t){const{breakpoints:n,mixins:o={},spacing:s,palette:a={},transitions:u={},typography:c={},shape:d,...p}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":ar(20));const y=Cu(a),g=zp(e);let _=Yt(g,{mixins:ex(g.breakpoints,o),palette:y,shadows:sx.slice(),typography:nx(y,c),transitions:cx(u),zIndex:{...fx}});if(_=Yt(_,p),_=t.reduce((C,E)=>Yt(C,E),_),process.env.NODE_ENV!=="production"){const C=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],E=(T,P)=>{let N;for(N in T){const X=T[N];if(C.includes(N)&&Object.keys(X).length>0){if(process.env.NODE_ENV!=="production"){const W=du("",N);console.error([`MUI: The \`${P}\` component increases the CSS specificity of the \`${N}\` internal state.`,"You can not override it like this: ",JSON.stringify(T,null,2),"",`Instead, you need to use the '&.${W}' syntax:`,JSON.stringify({root:{[`&.${W}`]:X}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
228
|
+
`))}T[N]={}}}};Object.keys(_.components).forEach(T=>{const P=_.components[T].styleOverrides;P&&T.startsWith("Mui")&&E(P,T)})}return _.unstable_sxConfig={...Es,...p==null?void 0:p.unstable_sxConfig},_.unstable_sx=function(E){return ai({sx:E,theme:this})},_.toRuntimeSource=eg,_}function hx(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 px=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=hx(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function tg(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ng(e){return e==="dark"?px:[]}function gx(e){const{palette:t={mode:"light"},opacity:n,overlays:o,...s}=e,a=Cu(t);return{palette:a,opacity:{...tg(a.mode),...n},overlays:o||ng(a.mode),...s}}function mx(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 yx=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],vx=e=>(t,n)=>{const o=e.rootSelector||":root",s=e.colorSchemeSelector;let a=s;if(s==="class"&&(a=".%s"),s==="data"&&(a="[data-%s]"),s!=null&&s.startsWith("data-")&&!s.includes("%s")&&(a=`[${s}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const u={};return yx(e.cssVarPrefix).forEach(c=>{u[c]=n[c],delete n[c]}),a==="media"?{[o]:n,"@media (prefers-color-scheme: dark)":{[o]:u}}:a?{[a.replace("%s",t)]:u,[`${o}, ${a.replace("%s",t)}`]:n}:{[o]:{...n,...u}}}if(a&&a!=="media")return`${o}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[o]:n}};if(a)return a.replace("%s",String(t))}return o};function bx(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function z(e,t,n){!e[t]&&n&&(e[t]=n)}function lo(e){return typeof e!="string"||!e.startsWith("hsl")?e:Vp(e)}function Hn(e,t){`${t}Channel`in e||(e[`${t}Channel`]=oo(lo(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().
|
|
229
|
+
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 _x(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const $n=e=>{try{return e()}catch{}},wx=(e="mui")=>UE(e);function xu(e,t,n,o){if(!t)return;t=t===!0?{}:t;const s=o==="dark"?"dark":"light";if(!n){e[o]=gx({...t,palette:{mode:s,...t==null?void 0:t.palette}});return}const{palette:a,...u}=Eu({...n,palette:{mode:s,...t==null?void 0:t.palette}});return e[o]={...t,palette:a,opacity:{...tg(s),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||ng(s)},u}function Tx(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:o,disableCssColorScheme:s=!1,cssVarPrefix:a="mui",shouldSkipGeneratingVar:u=mx,colorSchemeSelector:c=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...p}=e,y=Object.keys(n)[0],g=o||(n.light&&y!=="light"?"light":y),_=wx(a),{[g]:C,light:E,dark:T,...P}=n,N={...P};let X=C;if((g==="dark"&&!("dark"in n)||g==="light"&&!("light"in n))&&(X=!0),!X)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${g}\` option is either missing or invalid.`:ar(21,g));const W=xu(N,X,p,g);E&&!N.light&&xu(N,E,void 0,"light"),T&&!N.dark&&xu(N,T,void 0,"dark");let D={defaultColorScheme:g,...W,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:d,getCssVar:_,colorSchemes:N,font:{...QE(W.typography),...W.font},spacing:_x(p.spacing)};Object.keys(D.colorSchemes).forEach(ne=>{const S=D.colorSchemes[ne].palette,j=re=>{const ce=re.split("-"),he=ce[1],Le=ce[2];return _(re,S[he][Le])};if(S.mode==="light"&&(z(S.common,"background","#fff"),z(S.common,"onBackground","#000")),S.mode==="dark"&&(z(S.common,"background","#000"),z(S.common,"onBackground","#fff")),bx(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){z(S.Alert,"errorColor",Ye(S.error.light,.6)),z(S.Alert,"infoColor",Ye(S.info.light,.6)),z(S.Alert,"successColor",Ye(S.success.light,.6)),z(S.Alert,"warningColor",Ye(S.warning.light,.6)),z(S.Alert,"errorFilledBg",j("palette-error-main")),z(S.Alert,"infoFilledBg",j("palette-info-main")),z(S.Alert,"successFilledBg",j("palette-success-main")),z(S.Alert,"warningFilledBg",j("palette-warning-main")),z(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.main))),z(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.main))),z(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.main))),z(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.main))),z(S.Alert,"errorStandardBg",Ke(S.error.light,.9)),z(S.Alert,"infoStandardBg",Ke(S.info.light,.9)),z(S.Alert,"successStandardBg",Ke(S.success.light,.9)),z(S.Alert,"warningStandardBg",Ke(S.warning.light,.9)),z(S.Alert,"errorIconColor",j("palette-error-main")),z(S.Alert,"infoIconColor",j("palette-info-main")),z(S.Alert,"successIconColor",j("palette-success-main")),z(S.Alert,"warningIconColor",j("palette-warning-main")),z(S.AppBar,"defaultBg",j("palette-grey-100")),z(S.Avatar,"defaultBg",j("palette-grey-400")),z(S.Button,"inheritContainedBg",j("palette-grey-300")),z(S.Button,"inheritContainedHoverBg",j("palette-grey-A100")),z(S.Chip,"defaultBorder",j("palette-grey-400")),z(S.Chip,"defaultAvatarColor",j("palette-grey-700")),z(S.Chip,"defaultIconColor",j("palette-grey-700")),z(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),z(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),z(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),z(S.LinearProgress,"primaryBg",Ke(S.primary.main,.62)),z(S.LinearProgress,"secondaryBg",Ke(S.secondary.main,.62)),z(S.LinearProgress,"errorBg",Ke(S.error.main,.62)),z(S.LinearProgress,"infoBg",Ke(S.info.main,.62)),z(S.LinearProgress,"successBg",Ke(S.success.main,.62)),z(S.LinearProgress,"warningBg",Ke(S.warning.main,.62)),z(S.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.11)`),z(S.Slider,"primaryTrack",Ke(S.primary.main,.62)),z(S.Slider,"secondaryTrack",Ke(S.secondary.main,.62)),z(S.Slider,"errorTrack",Ke(S.error.main,.62)),z(S.Slider,"infoTrack",Ke(S.info.main,.62)),z(S.Slider,"successTrack",Ke(S.success.main,.62)),z(S.Slider,"warningTrack",Ke(S.warning.main,.62));const re=Is(S.background.default,.8);z(S.SnackbarContent,"bg",re),z(S.SnackbarContent,"color",$n(()=>S.getContrastText(re))),z(S.SpeedDialAction,"fabHoverBg",Is(S.background.paper,.15)),z(S.StepConnector,"border",j("palette-grey-400")),z(S.StepContent,"border",j("palette-grey-400")),z(S.Switch,"defaultColor",j("palette-common-white")),z(S.Switch,"defaultDisabledColor",j("palette-grey-100")),z(S.Switch,"primaryDisabledColor",Ke(S.primary.main,.62)),z(S.Switch,"secondaryDisabledColor",Ke(S.secondary.main,.62)),z(S.Switch,"errorDisabledColor",Ke(S.error.main,.62)),z(S.Switch,"infoDisabledColor",Ke(S.info.main,.62)),z(S.Switch,"successDisabledColor",Ke(S.success.main,.62)),z(S.Switch,"warningDisabledColor",Ke(S.warning.main,.62)),z(S.TableCell,"border",Ke(Os(S.divider,1),.88)),z(S.Tooltip,"bg",Os(S.grey[700],.92))}if(S.mode==="dark"){z(S.Alert,"errorColor",Ke(S.error.light,.6)),z(S.Alert,"infoColor",Ke(S.info.light,.6)),z(S.Alert,"successColor",Ke(S.success.light,.6)),z(S.Alert,"warningColor",Ke(S.warning.light,.6)),z(S.Alert,"errorFilledBg",j("palette-error-dark")),z(S.Alert,"infoFilledBg",j("palette-info-dark")),z(S.Alert,"successFilledBg",j("palette-success-dark")),z(S.Alert,"warningFilledBg",j("palette-warning-dark")),z(S.Alert,"errorFilledColor",$n(()=>S.getContrastText(S.error.dark))),z(S.Alert,"infoFilledColor",$n(()=>S.getContrastText(S.info.dark))),z(S.Alert,"successFilledColor",$n(()=>S.getContrastText(S.success.dark))),z(S.Alert,"warningFilledColor",$n(()=>S.getContrastText(S.warning.dark))),z(S.Alert,"errorStandardBg",Ye(S.error.light,.9)),z(S.Alert,"infoStandardBg",Ye(S.info.light,.9)),z(S.Alert,"successStandardBg",Ye(S.success.light,.9)),z(S.Alert,"warningStandardBg",Ye(S.warning.light,.9)),z(S.Alert,"errorIconColor",j("palette-error-main")),z(S.Alert,"infoIconColor",j("palette-info-main")),z(S.Alert,"successIconColor",j("palette-success-main")),z(S.Alert,"warningIconColor",j("palette-warning-main")),z(S.AppBar,"defaultBg",j("palette-grey-900")),z(S.AppBar,"darkBg",j("palette-background-paper")),z(S.AppBar,"darkColor",j("palette-text-primary")),z(S.Avatar,"defaultBg",j("palette-grey-600")),z(S.Button,"inheritContainedBg",j("palette-grey-800")),z(S.Button,"inheritContainedHoverBg",j("palette-grey-700")),z(S.Chip,"defaultBorder",j("palette-grey-700")),z(S.Chip,"defaultAvatarColor",j("palette-grey-300")),z(S.Chip,"defaultIconColor",j("palette-grey-300")),z(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),z(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),z(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),z(S.LinearProgress,"primaryBg",Ye(S.primary.main,.5)),z(S.LinearProgress,"secondaryBg",Ye(S.secondary.main,.5)),z(S.LinearProgress,"errorBg",Ye(S.error.main,.5)),z(S.LinearProgress,"infoBg",Ye(S.info.main,.5)),z(S.LinearProgress,"successBg",Ye(S.success.main,.5)),z(S.LinearProgress,"warningBg",Ye(S.warning.main,.5)),z(S.Skeleton,"bg",`rgba(${j("palette-text-primaryChannel")} / 0.13)`),z(S.Slider,"primaryTrack",Ye(S.primary.main,.5)),z(S.Slider,"secondaryTrack",Ye(S.secondary.main,.5)),z(S.Slider,"errorTrack",Ye(S.error.main,.5)),z(S.Slider,"infoTrack",Ye(S.info.main,.5)),z(S.Slider,"successTrack",Ye(S.success.main,.5)),z(S.Slider,"warningTrack",Ye(S.warning.main,.5));const re=Is(S.background.default,.98);z(S.SnackbarContent,"bg",re),z(S.SnackbarContent,"color",$n(()=>S.getContrastText(re))),z(S.SpeedDialAction,"fabHoverBg",Is(S.background.paper,.15)),z(S.StepConnector,"border",j("palette-grey-600")),z(S.StepContent,"border",j("palette-grey-600")),z(S.Switch,"defaultColor",j("palette-grey-300")),z(S.Switch,"defaultDisabledColor",j("palette-grey-600")),z(S.Switch,"primaryDisabledColor",Ye(S.primary.main,.55)),z(S.Switch,"secondaryDisabledColor",Ye(S.secondary.main,.55)),z(S.Switch,"errorDisabledColor",Ye(S.error.main,.55)),z(S.Switch,"infoDisabledColor",Ye(S.info.main,.55)),z(S.Switch,"successDisabledColor",Ye(S.success.main,.55)),z(S.Switch,"warningDisabledColor",Ye(S.warning.main,.55)),z(S.TableCell,"border",Ye(Os(S.divider,1),.68)),z(S.Tooltip,"bg",Os(S.grey[700],.92))}Hn(S.background,"default"),Hn(S.background,"paper"),Hn(S.common,"background"),Hn(S.common,"onBackground"),Hn(S,"divider"),Object.keys(S).forEach(re=>{const ce=S[re];re!=="tonalOffset"&&ce&&typeof ce=="object"&&(ce.main&&z(S[re],"mainChannel",oo(lo(ce.main))),ce.light&&z(S[re],"lightChannel",oo(lo(ce.light))),ce.dark&&z(S[re],"darkChannel",oo(lo(ce.dark))),ce.contrastText&&z(S[re],"contrastTextChannel",oo(lo(ce.contrastText))),re==="text"&&(Hn(S[re],"primary"),Hn(S[re],"secondary")),re==="action"&&(ce.active&&Hn(S[re],"active"),ce.selected&&Hn(S[re],"selected")))})}),D=t.reduce((ne,S)=>Yt(ne,S),D);const k={prefix:a,disableCssColorScheme:s,shouldSkipGeneratingVar:u,getSelector:vx(D)},{vars:L,generateThemeVars:J,generateStyleSheets:le}=VE(D,k);return D.vars=L,Object.entries(D.colorSchemes[D.defaultColorScheme]).forEach(([ne,S])=>{D[ne]=S}),D.generateThemeVars=J,D.generateStyleSheets=le,D.generateSpacing=function(){return Bp(p.spacing,hu(this))},D.getColorSchemeSelector=GE(c),D.spacing=D.generateSpacing(),D.shouldSkipGeneratingVar=u,D.unstable_sxConfig={...Es,...p==null?void 0:p.unstable_sxConfig},D.unstable_sx=function(S){return ai({sx:S,theme:this})},D.toRuntimeSource=eg,D}function rg(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Cu({...n===!0?{}:n.palette,mode:t})})}function Sx(e={},...t){const{palette:n,cssVariables:o=!1,colorSchemes:s=n?void 0:{light:!0},defaultColorScheme:a=n==null?void 0:n.mode,...u}=e,c=a||"light",d=s==null?void 0:s[c],p={...s,...n?{[c]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(o===!1){if(!("colorSchemes"in e))return Eu(e,...t);let y=n;"palette"in e||p[c]&&(p[c]!==!0?y=p[c].palette:c==="dark"&&(y={mode:"dark"}));const g=Eu({...e,palette:y},...t);return g.defaultColorScheme=c,g.colorSchemes=p,g.palette.mode==="light"&&(g.colorSchemes.light={...p.light!==!0&&p.light,palette:g.palette},rg(g,"dark",p.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:g.palette},rg(g,"light",p.light)),g}return!n&&!("light"in p)&&c==="light"&&(p.light=!0),Tx({...u,colorSchemes:p,defaultColorScheme:c,...typeof o!="boolean"&&o},...t)}const Cx=Sx(),Ex="$$material";function xx(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ax=AE({themeId:Ex,defaultTheme:Cx,rootShouldForwardProp:e=>xx(e)&&e!=="classes"}),Ox=zE;process.env.NODE_ENV!=="production"&&(Ne.node,Ne.object.isRequired);function Ix(e){return BE(e)}function Px(e){return du("MuiSvgIcon",e)}oC("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const $x=e=>{const{color:t,fontSize:n,classes:o}=e,s={root:["root",t!=="inherit"&&`color${Nr(t)}`,`fontSize${Nr(n)}`]};return nC(s,Px,o)},Mx=Ax("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Nr(n.color)}`],t[`fontSize${Nr(n.fontSize)}`]]}})(Ox(({theme:e})=>{var t,n,o,s,a,u,c,d,p,y,g,_,C,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(s=(t=e.transitions)==null?void 0:t.create)==null?void 0:s.call(t,"fill",{duration:(o=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:o.shorter}),variants:[{props:T=>!T.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((u=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:u.call(a,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((d=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:d.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((y=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:y.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,T])=>T&&T.main).map(([T])=>{var P,N;return{props:{color:T},style:{color:(N=(P=(e.vars??e).palette)==null?void 0:P[T])==null?void 0:N.main}}}),{props:{color:"action"},style:{color:(_=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:_.active}},{props:{color:"disabled"},style:{color:(E=(C=(e.vars??e).palette)==null?void 0:C.action)==null?void 0:E.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Ps=Mt.forwardRef(function(t,n){const o=Ix({props:t,name:"MuiSvgIcon"}),{children:s,className:a,color:u="inherit",component:c="svg",fontSize:d="medium",htmlColor:p,inheritViewBox:y=!1,titleAccess:g,viewBox:_="0 0 24 24",...C}=o,E=Mt.isValidElement(s)&&s.type==="svg",T={...o,color:u,component:c,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:y,viewBox:_,hasSvgAsChild:E},P={};y||(P.viewBox=_);const N=$x(T);return h.jsxs(Mx,{as:c,className:Ir(N.root,a),focusable:"false",color:p,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:n,...P,...C,...E&&s.props,ownerState:T,children:[E?s.props.children:s,g?h.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&(Ps.propTypes={children:Ne.node,classes:Ne.object,className:Ne.string,color:Ne.oneOfType([Ne.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Ne.string]),component:Ne.elementType,fontSize:Ne.oneOfType([Ne.oneOf(["inherit","large","medium","small"]),Ne.string]),htmlColor:Ne.string,inheritViewBox:Ne.bool,shapeRendering:Ne.string,sx:Ne.oneOfType([Ne.arrayOf(Ne.oneOfType([Ne.func,Ne.object,Ne.bool])),Ne.func,Ne.object]),titleAccess:Ne.string,viewBox:Ne.string}),Ps.muiName="SvgIcon";function Au(e,t){function n(o,s){return h.jsx(Ps,{"data-testid":`${t}Icon`,ref:s,...o,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ps.muiName,Mt.memo(Mt.forwardRef(n))}const Fx=Au(h.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),kx=Au(h.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward"),Dx=Au(h.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");function Nx(){this.__data__=[],this.size=0}var Lx=Nx;function Bx(e,t){return e===t||e!==e&&t!==t}var $s=Bx,zx=$s;function Ux(e,t){for(var n=e.length;n--;)if(zx(e[n][0],t))return n;return-1}var Ms=Ux,jx=Ms,Wx=Array.prototype,Vx=Wx.splice;function Gx(e){var t=this.__data__,n=jx(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Vx.call(t,n,1),--this.size,!0}var Hx=Gx,qx=Ms;function Yx(e){var t=this.__data__,n=qx(t,e);return n<0?void 0:t[n][1]}var Kx=Yx,Jx=Ms;function Rx(e){return Jx(this.__data__,e)>-1}var Zx=Rx,Xx=Ms;function Qx(e,t){var n=this.__data__,o=Xx(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}var eA=Qx,tA=Lx,nA=Hx,rA=Kx,iA=Zx,oA=eA;function hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}hi.prototype.clear=tA,hi.prototype.delete=nA,hi.prototype.get=rA,hi.prototype.has=iA,hi.prototype.set=oA;var Fs=hi,sA=Fs;function aA(){this.__data__=new sA,this.size=0}var lA=aA;function uA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var cA=uA;function fA(e){return this.__data__.get(e)}var dA=fA;function hA(e){return this.__data__.has(e)}var pA=hA,gA=kr,mA=gA(Object,"create"),ks=mA,ig=ks;function yA(){this.__data__=ig?ig(null):{},this.size=0}var vA=yA;function bA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _A=bA,wA=ks,TA="__lodash_hash_undefined__",SA=Object.prototype,CA=SA.hasOwnProperty;function EA(e){var t=this.__data__;if(wA){var n=t[e];return n===TA?void 0:n}return CA.call(t,e)?t[e]:void 0}var xA=EA,AA=ks,OA=Object.prototype,IA=OA.hasOwnProperty;function PA(e){var t=this.__data__;return AA?t[e]!==void 0:IA.call(t,e)}var $A=PA,MA=ks,FA="__lodash_hash_undefined__";function kA(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=MA&&t===void 0?FA:t,this}var DA=kA,NA=vA,LA=_A,BA=xA,zA=$A,UA=DA;function pi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}pi.prototype.clear=NA,pi.prototype.delete=LA,pi.prototype.get=BA,pi.prototype.has=zA,pi.prototype.set=UA;var jA=pi,og=jA,WA=Fs,VA=jl;function GA(){this.size=0,this.__data__={hash:new og,map:new(VA||WA),string:new og}}var HA=GA;function qA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var YA=qA,KA=YA;function JA(e,t){var n=e.__data__;return KA(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Ds=JA,RA=Ds;function ZA(e){var t=RA(this,e).delete(e);return this.size-=t?1:0,t}var XA=ZA,QA=Ds;function eO(e){return QA(this,e).get(e)}var tO=eO,nO=Ds;function rO(e){return nO(this,e).has(e)}var iO=rO,oO=Ds;function sO(e,t){var n=oO(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}var aO=sO,lO=HA,uO=XA,cO=tO,fO=iO,dO=aO;function gi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}gi.prototype.clear=lO,gi.prototype.delete=uO,gi.prototype.get=cO,gi.prototype.has=fO,gi.prototype.set=dO;var sg=gi,hO=Fs,pO=jl,gO=sg,mO=200;function yO(e,t){var n=this.__data__;if(n instanceof hO){var o=n.__data__;if(!pO||o.length<mO-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new gO(o)}return n.set(e,t),this.size=n.size,this}var vO=yO,bO=Fs,_O=lA,wO=cA,TO=dA,SO=pA,CO=vO;function mi(e){var t=this.__data__=new bO(e);this.size=t.size}mi.prototype.clear=_O,mi.prototype.delete=wO,mi.prototype.get=TO,mi.prototype.has=SO,mi.prototype.set=CO;var EO=mi,xO=kr,AO=function(){try{var e=xO(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ag=AO,lg=ag;function OO(e,t,n){t=="__proto__"&&lg?lg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ou=OO,IO=Ou,PO=$s;function $O(e,t,n){(n!==void 0&&!PO(e[t],n)||n===void 0&&!(t in e))&&IO(e,t,n)}var ug=$O;function MO(e){return function(t,n,o){for(var s=-1,a=Object(t),u=o(t),c=u.length;c--;){var d=u[e?c:++s];if(n(a[d],d,a)===!1)break}return t}}var FO=MO,kO=FO,DO=kO(),NO=DO,Ns={exports:{}};Ns.exports,function(e,t){var n=vn,o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===o,u=a?n.Buffer:void 0,c=u?u.allocUnsafe:void 0;function d(p,y){if(y)return p.slice();var g=p.length,_=c?c(g):new p.constructor(g);return p.copy(_),_}e.exports=d}(Ns,Ns.exports);var LO=Ns.exports,BO=vn,zO=BO.Uint8Array,UO=zO,cg=UO;function jO(e){var t=new e.constructor(e.byteLength);return new cg(t).set(new cg(e)),t}var WO=jO,VO=WO;function GO(e,t){var n=t?VO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var HO=GO;function qO(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var YO=qO,KO=Wn,fg=Object.create,JO=function(){function e(){}return function(t){if(!KO(t))return{};if(fg)return fg(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),RO=JO,ZO=_h,XO=ZO(Object.getPrototypeOf,Object),dg=XO,QO=RO,e2=dg,t2=is;function n2(e){return typeof e.constructor=="function"&&!t2(e)?QO(e2(e)):{}}var r2=n2,i2=ss,o2=ii;function s2(e){return o2(e)&&i2(e)}var hg=s2,a2=ri,l2=dg,u2=ii,c2="[object Object]",f2=Function.prototype,d2=Object.prototype,pg=f2.toString,h2=d2.hasOwnProperty,p2=pg.call(Object);function g2(e){if(!u2(e)||a2(e)!=c2)return!1;var t=l2(e);if(t===null)return!0;var n=h2.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&pg.call(n)==p2}var m2=g2;function y2(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var gg=y2,v2=Ou,b2=$s,_2=Object.prototype,w2=_2.hasOwnProperty;function T2(e,t,n){var o=e[t];(!(w2.call(e,t)&&b2(o,n))||n===void 0&&!(t in e))&&v2(e,t,n)}var S2=T2,C2=S2,E2=Ou;function x2(e,t,n,o){var s=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var c=t[a],d=o?o(n[c],e[c],c,n,e):void 0;d===void 0&&(d=e[c]),s?E2(n,c,d):C2(n,c,d)}return n}var A2=x2;function O2(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var I2=O2,P2=9007199254740991,$2=/^(?:0|[1-9]\d*)$/;function M2(e,t){var n=typeof e;return t=t??P2,!!t&&(n=="number"||n!="symbol"&&$2.test(e))&&e>-1&&e%1==0&&e<t}var mg=M2,F2=I2,k2=os,D2=Qi,N2=Yl,L2=mg,B2=Kl,z2=Object.prototype,U2=z2.hasOwnProperty;function j2(e,t){var n=D2(e),o=!n&&k2(e),s=!n&&!o&&N2(e),a=!n&&!o&&!s&&B2(e),u=n||o||s||a,c=u?F2(e.length,String):[],d=c.length;for(var p in e)(t||U2.call(e,p))&&!(u&&(p=="length"||s&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||L2(p,d)))&&c.push(p);return c}var W2=j2;function V2(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var G2=V2,H2=Wn,q2=is,Y2=G2,K2=Object.prototype,J2=K2.hasOwnProperty;function R2(e){if(!H2(e))return Y2(e);var t=q2(e),n=[];for(var o in e)o=="constructor"&&(t||!J2.call(e,o))||n.push(o);return n}var Z2=R2,X2=W2,Q2=Z2,eI=ss;function tI(e){return eI(e)?X2(e,!0):Q2(e)}var yg=tI,nI=A2,rI=yg;function iI(e){return nI(e,rI(e))}var oI=iI,vg=ug,sI=LO,aI=HO,lI=YO,uI=r2,bg=os,_g=Qi,cI=hg,fI=Yl,dI=zl,hI=Wn,pI=m2,gI=Kl,wg=gg,mI=oI;function yI(e,t,n,o,s,a,u){var c=wg(e,n),d=wg(t,n),p=u.get(d);if(p){vg(e,n,p);return}var y=a?a(c,d,n+"",e,t,u):void 0,g=y===void 0;if(g){var _=_g(d),C=!_&&fI(d),E=!_&&!C&&gI(d);y=d,_||C||E?_g(c)?y=c:cI(c)?y=lI(c):C?(g=!1,y=sI(d,!0)):E?(g=!1,y=aI(d,!0)):y=[]:pI(d)||bg(d)?(y=c,bg(c)?y=mI(c):(!hI(c)||dI(c))&&(y=uI(d))):g=!1}g&&(u.set(d,y),s(y,d,o,a,u),u.delete(d)),vg(e,n,y)}var vI=yI,bI=EO,_I=ug,wI=NO,TI=vI,SI=Wn,CI=yg,EI=gg;function Tg(e,t,n,o,s){e!==t&&wI(t,function(a,u){if(s||(s=new bI),SI(a))TI(e,t,u,n,Tg,o,s);else{var c=o?o(EI(e,u),a,u+"",e,t,s):void 0;c===void 0&&(c=a),_I(e,u,c)}},CI)}var xI=Tg;function AI(e){return e}var Sg=AI;function OI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var II=OI,PI=II,Cg=Math.max;function $I(e,t,n){return t=Cg(t===void 0?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=Cg(o.length-t,0),u=Array(a);++s<a;)u[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(u),PI(e,this,c)}}var MI=$I;function FI(e){return function(){return e}}var kI=FI,DI=kI,Eg=ag,NI=Sg,LI=Eg?function(e,t){return Eg(e,"toString",{configurable:!0,enumerable:!1,value:DI(t),writable:!0})}:NI,BI=LI,zI=800,UI=16,jI=Date.now;function WI(e){var t=0,n=0;return function(){var o=jI(),s=UI-(o-n);if(n=o,s>0){if(++t>=zI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var VI=WI,GI=BI,HI=VI,qI=HI(GI),YI=qI,KI=Sg,JI=MI,RI=YI;function ZI(e,t){return RI(JI(e,t,KI),e+"")}var xg=ZI,XI=$s,QI=ss,eP=mg,tP=Wn;function nP(e,t,n){if(!tP(n))return!1;var o=typeof t;return(o=="number"?QI(n)&&eP(t,n.length):o=="string"&&t in n)?XI(n[t],e):!1}var Ag=nP,rP=xg,iP=Ag;function oP(e){return rP(function(t,n){var o=-1,s=n.length,a=s>1?n[s-1]:void 0,u=s>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(s--,a):void 0,u&&iP(n[0],n[1],u)&&(a=s<3?void 0:a,s=1),t=Object(t);++o<s;){var c=n[o];c&&e(t,c,o,a)}return t})}var sP=oP,aP=xI,lP=sP,uP=lP(function(e,t,n){aP(e,t,n)}),cP=uP;const fP=nr(cP);var dP=Math.ceil,hP=Math.max;function pP(e,t,n,o){for(var s=-1,a=hP(dP((t-e)/(n||1)),0),u=Array(a);a--;)u[o?a:++s]=e,e+=n;return u}var gP=pP,mP=vh,yP=1/0,vP=17976931348623157e292;function bP(e){if(!e)return e===0?e:0;if(e=mP(e),e===yP||e===-1/0){var t=e<0?-1:1;return t*vP}return e===e?e:0}var _P=bP,wP=gP,TP=Ag,Iu=_P;function SP(e){return function(t,n,o){return o&&typeof o!="number"&&TP(t,n,o)&&(n=o=void 0),t=Iu(t),n===void 0?(n=t,t=0):n=Iu(n),o=o===void 0?t<n?1:-1:Iu(o),wP(t,n,o,e)}}var CP=SP,EP=CP,xP=EP(),AP=xP;const OP=nr(AP);function IP(e,t,n,o){var s=-1,a=e==null?0:e.length;for(o&&a&&(n=e[++s]);++s<a;)n=t(n,e[s],s,e);return n}var PP=IP;function $P(e){return function(t){return e==null?void 0:e[t]}}var MP=$P,FP=MP,kP={À:"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"},DP=FP(kP),NP=DP;function LP(e,t){for(var n=-1,o=e==null?0:e.length,s=Array(o);++n<o;)s[n]=t(e[n],n,e);return s}var BP=LP,Og=rs,zP=BP,UP=Qi,jP=gh,Ig=Og?Og.prototype:void 0,Pg=Ig?Ig.toString:void 0;function $g(e){if(typeof e=="string")return e;if(UP(e))return zP(e,$g)+"";if(jP(e))return Pg?Pg.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var WP=$g,VP=WP;function GP(e){return e==null?"":VP(e)}var Pu=GP,HP=NP,qP=Pu,YP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,KP="\\u0300-\\u036f",JP="\\ufe20-\\ufe2f",RP="\\u20d0-\\u20ff",ZP=KP+JP+RP,XP="["+ZP+"]",QP=RegExp(XP,"g");function e$(e){return e=qP(e),e&&e.replace(YP,HP).replace(QP,"")}var t$=e$,n$=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function r$(e){return e.match(n$)||[]}var i$=r$,o$=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function s$(e){return o$.test(e)}var a$=s$,Mg="\\ud800-\\udfff",l$="\\u0300-\\u036f",u$="\\ufe20-\\ufe2f",c$="\\u20d0-\\u20ff",f$=l$+u$+c$,Fg="\\u2700-\\u27bf",kg="a-z\\xdf-\\xf6\\xf8-\\xff",d$="\\xac\\xb1\\xd7\\xf7",h$="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p$="\\u2000-\\u206f",g$=" \\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",Dg="A-Z\\xc0-\\xd6\\xd8-\\xde",m$="\\ufe0e\\ufe0f",Ng=d$+h$+p$+g$,Lg="['’]",Bg="["+Ng+"]",y$="["+f$+"]",zg="\\d+",v$="["+Fg+"]",Ug="["+kg+"]",jg="[^"+Mg+Ng+zg+Fg+kg+Dg+"]",b$="\\ud83c[\\udffb-\\udfff]",_$="(?:"+y$+"|"+b$+")",w$="[^"+Mg+"]",Wg="(?:\\ud83c[\\udde6-\\uddff]){2}",Vg="[\\ud800-\\udbff][\\udc00-\\udfff]",yi="["+Dg+"]",T$="\\u200d",Gg="(?:"+Ug+"|"+jg+")",S$="(?:"+yi+"|"+jg+")",Hg="(?:"+Lg+"(?:d|ll|m|re|s|t|ve))?",qg="(?:"+Lg+"(?:D|LL|M|RE|S|T|VE))?",Yg=_$+"?",Kg="["+m$+"]?",C$="(?:"+T$+"(?:"+[w$,Wg,Vg].join("|")+")"+Kg+Yg+")*",E$="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",x$="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",A$=Kg+Yg+C$,O$="(?:"+[v$,Wg,Vg].join("|")+")"+A$,I$=RegExp([yi+"?"+Ug+"+"+Hg+"(?="+[Bg,yi,"$"].join("|")+")",S$+"+"+qg+"(?="+[Bg,yi+Gg,"$"].join("|")+")",yi+"?"+Gg+"+"+Hg,yi+"+"+qg,x$,E$,zg,O$].join("|"),"g");function P$(e){return e.match(I$)||[]}var $$=P$,M$=i$,F$=a$,k$=Pu,D$=$$;function N$(e,t,n){return e=k$(e),t=n?void 0:t,t===void 0?F$(e)?D$(e):M$(e):e.match(t)||[]}var L$=N$,B$=PP,z$=t$,U$=L$,j$="['’]",W$=RegExp(j$,"g");function V$(e){return function(t){return B$(U$(z$(t).replace(W$,"")),e,"")}}var G$=V$;function H$(e,t,n){var o=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++o<s;)a[o]=e[o+t];return a}var q$=H$,Y$=q$;function K$(e,t,n){var o=e.length;return n=n===void 0?o:n,!t&&n>=o?e:Y$(e,t,n)}var J$=K$,R$="\\ud800-\\udfff",Z$="\\u0300-\\u036f",X$="\\ufe20-\\ufe2f",Q$="\\u20d0-\\u20ff",eM=Z$+X$+Q$,tM="\\ufe0e\\ufe0f",nM="\\u200d",rM=RegExp("["+nM+R$+eM+tM+"]");function iM(e){return rM.test(e)}var Jg=iM;function oM(e){return e.split("")}var sM=oM,Rg="\\ud800-\\udfff",aM="\\u0300-\\u036f",lM="\\ufe20-\\ufe2f",uM="\\u20d0-\\u20ff",cM=aM+lM+uM,fM="\\ufe0e\\ufe0f",dM="["+Rg+"]",$u="["+cM+"]",Mu="\\ud83c[\\udffb-\\udfff]",hM="(?:"+$u+"|"+Mu+")",Zg="[^"+Rg+"]",Xg="(?:\\ud83c[\\udde6-\\uddff]){2}",Qg="[\\ud800-\\udbff][\\udc00-\\udfff]",pM="\\u200d",em=hM+"?",tm="["+fM+"]?",gM="(?:"+pM+"(?:"+[Zg,Xg,Qg].join("|")+")"+tm+em+")*",mM=tm+em+gM,yM="(?:"+[Zg+$u+"?",$u,Xg,Qg,dM].join("|")+")",vM=RegExp(Mu+"(?="+Mu+")|"+yM+mM,"g");function bM(e){return e.match(vM)||[]}var _M=bM,wM=sM,TM=Jg,SM=_M;function CM(e){return TM(e)?SM(e):wM(e)}var EM=CM,xM=J$,AM=Jg,OM=EM,IM=Pu;function PM(e){return function(t){t=IM(t);var n=AM(t)?OM(t):void 0,o=n?n[0]:t.charAt(0),s=n?xM(n,1).join(""):t.slice(1);return o[e]()+s}}var $M=PM,MM=$M,FM=MM("toUpperCase"),kM=FM,DM=G$,NM=kM,LM=DM(function(e,t,n){return e+(n?" ":"")+NM(t)}),BM=LM;const zM=nr(BM);function UM(e,t){for(var n=-1,o=t.length,s=e.length;++n<o;)e[s+n]=t[n];return e}var jM=UM,nm=rs,WM=os,VM=Qi,rm=nm?nm.isConcatSpreadable:void 0;function GM(e){return VM(e)||WM(e)||!!(rm&&e&&e[rm])}var HM=GM,qM=jM,YM=HM;function im(e,t,n,o,s){var a=-1,u=e.length;for(n||(n=YM),s||(s=[]);++a<u;){var c=e[a];t>0&&n(c)?t>1?im(c,t-1,n,o,s):qM(s,c):o||(s[s.length]=c)}return s}var KM=im,JM="__lodash_hash_undefined__";function RM(e){return this.__data__.set(e,JM),this}var ZM=RM;function XM(e){return this.__data__.has(e)}var QM=XM,eF=sg,tF=ZM,nF=QM;function Ls(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new eF;++t<n;)this.add(e[t])}Ls.prototype.add=Ls.prototype.push=tF,Ls.prototype.has=nF;var rF=Ls;function iF(e,t,n,o){for(var s=e.length,a=n+(o?1:-1);o?a--:++a<s;)if(t(e[a],a,e))return a;return-1}var oF=iF;function sF(e){return e!==e}var aF=sF;function lF(e,t,n){for(var o=n-1,s=e.length;++o<s;)if(e[o]===t)return o;return-1}var uF=lF,cF=oF,fF=aF,dF=uF;function hF(e,t,n){return t===t?dF(e,t,n):cF(e,fF,n)}var pF=hF,gF=pF;function mF(e,t){var n=e==null?0:e.length;return!!n&&gF(e,t,0)>-1}var yF=mF;function vF(e,t,n){for(var o=-1,s=e==null?0:e.length;++o<s;)if(n(t,e[o]))return!0;return!1}var bF=vF;function _F(e,t){return e.has(t)}var wF=_F;function TF(){}var SF=TF;function CF(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var om=CF,Fu=Sh,EF=SF,xF=om,AF=1/0,OF=Fu&&1/xF(new Fu([,-0]))[1]==AF?function(e){return new Fu(e)}:EF,IF=OF,PF=rF,$F=yF,MF=bF,FF=wF,kF=IF,DF=om,NF=200;function LF(e,t,n){var o=-1,s=$F,a=e.length,u=!0,c=[],d=c;if(n)u=!1,s=MF;else if(a>=NF){var p=t?null:kF(e);if(p)return DF(p);u=!1,s=FF,d=new PF}else d=t?[]:c;e:for(;++o<a;){var y=e[o],g=t?t(y):y;if(y=n||y!==0?y:0,u&&g===g){for(var _=d.length;_--;)if(d[_]===g)continue e;t&&d.push(g),c.push(y)}else s(d,g,n)||(d!==c&&d.push(g),c.push(y))}return c}var BF=LF,zF=KM,UF=xg,jF=BF,WF=hg,VF=UF(function(e){return jF(zF(e,1,WF,!0))}),GF=VF;const HF=nr(GF),vi=({children:e,...t})=>h.jsx(b.Table.Td,{...xn({style:{alignContent:"start"}},t),children:e}),sm=({errorMessages:e,id:t})=>{const n=(e==null?void 0:e.split(`
|
|
230
|
+
`))||[];return h.jsx(b.Tooltip,{id:t,label:`${n.length} error(s)`,position:"right",children:h.jsx(b.Indicator,{size:"0.85rem",label:n.length,disabled:!e,style:{visibility:e?"visible":"hidden"},children:h.jsx(s1,{})})})},qF={paddingLeft:0,paddingRight:0},am=x.memo(function({numColumns:t,errors:n,label:o,description:s,path:a,addItem:u,schema:c,enabled:d,translations:p,rootSchema:y}){const g={bg:"transparent",size:"sm",c:"gray"},_=b.useProps("ActionIcon",g,{});return h.jsxs(b.Table.Tr,{children:[h.jsx(vi,{colSpan:t,children:h.jsxs(b.Stack,{children:[h.jsxs(b.Grid,{justify:"flex-start",align:"center",gutter:"sm",children:[h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Text,{children:o})}),h.jsx(b.Grid.Col,{span:"content",children:h.jsx(sm,{id:"tooltip-validation",errorMessages:n})})]}),s&&h.jsx(b.Text,{size:"sm",children:s})]})}),d?h.jsx(vi,{align:"right",style:qF,children:h.jsx(b.Tooltip,{id:"tooltip-add",label:p.addTooltip,position:"left",children:h.jsx(b.ActionIcon,{bg:_.bg,size:_.size,c:_.c,onClick:u(a,ae.createDefaultValue(c,y)),children:h.jsx(Cl,{})})})}):null]})}),lm={fixedCell:{width:"150px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"},fixedCellSmall:{width:"50px",height:"50px",paddingLeft:0,paddingRight:0,textAlign:"center"}},um=(e,t,n,o,s)=>{if(t.type==="object")return cm(t).map(a=>{var d,p;const u=ae.Paths.compose(n,a),c={propName:a,schema:t,title:((p=(d=t.properties)==null?void 0:d[a])==null?void 0:p.title)??zM(a),rowPath:n,cellPath:u,enabled:o,cells:s};return h.jsx(e,{...c},u)});{const a={schema:t,rowPath:n,cellPath:n,enabled:o};return h.jsx(e,{...a},n)}},cm=e=>e.type==="object"&&typeof e.properties=="object"?Object.keys(e.properties).filter(t=>e.properties[t].type!=="array"):[""],YF=({numColumns:e,translations:t})=>h.jsx(b.Table.Tr,{children:h.jsx(vi,{colSpan:e,children:h.jsx(b.Text,{align:"center",children:t.noDataMessage})})}),KF=x.memo(function({title:t}){return h.jsx(b.Table.Th,{children:t})}),JF=(e,t)=>{const n=t.rowPath+(t.schema.type==="object"?"."+t.propName:""),o=ae.formatErrorMessage(HF(ae.errorsAt(n,t.schema,s=>s===n)(e.core.errors).map(s=>s.message)));return{rowPath:t.rowPath,propName:t.propName,schema:t.schema,rootSchema:e.core.schema,errors:o,path:n,enabled:t.enabled,cells:t.cells||e.cells,renderers:t.renderers||e.renderers}},fm=e=>({type:"Control",scope:e,label:!1}),RF=x.memo(function({path:t,propName:n,schema:o,rootSchema:s,errors:a,enabled:u,renderers:c,cells:d,isValid:p}){return h.jsxs(vi,{children:[o.properties?h.jsx(Fe.DispatchCell,{schema:ae.Resolve.schema(o,`#/properties/${ae.encode(n)}`,s),uischema:fm(`#/properties/${ae.encode(n)}`),path:t,enabled:u,renderers:c,cells:d}):h.jsx(Fe.DispatchCell,{schema:o,uischema:fm("#"),path:t,enabled:u,renderers:c,cells:d}),h.jsx(b.Text,{size:"xs",children:p?"":a})]})}),ZF=e=>{const t=Fe.useJsonForms(),n=JF(t,e),o=Dh(n.errors);return h.jsx(RF,{...n,isValid:o})},XF=({childPath:e,schema:t,rowIndex:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:u,enableDown:c,showSortButtons:d,enabled:p,cells:y,path:g,translations:_})=>{const C={bg:"transparent",size:"sm",c:"gray"},E=b.useProps("ActionIcon",C,{}),T=x.useMemo(()=>s(g,n),[s,g,n]),P=x.useMemo(()=>a(g,n),[a,g,n]);return h.jsxs(b.Table.Tr,{children:[um(ZF,t,e,p,y),p?h.jsx(vi,{style:d?lm.fixedCell:lm.fixedCellSmall,children:h.jsxs(b.Grid,{justify:"flex-end",align:"center",children:[d?h.jsxs(x.Fragment,{children:[h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Tooltip,{id:"tooltip-up",title:_.up,position:"bottom",opened:u?void 0:!1,children:h.jsx(b.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.upAriaLabel,onClick:T,disabled:!u,children:h.jsx(kx,{})})})}),h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Tooltip,{id:"tooltip-down",title:_.down,position:"bottom",opened:c?void 0:!1,children:h.jsx(b.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.downAriaLabel,onClick:P,disabled:!c,children:h.jsx(Fx,{})})})})]}):null,h.jsx(b.Grid.Col,{span:"content",children:h.jsx(b.Tooltip,{id:"tooltip-remove",label:_.removeTooltip,children:h.jsx(b.ActionIcon,{bg:E.bg,size:E.size,c:E.c,"aria-label":_.removeAriaLabel,onClick:()=>o(e,n),children:h.jsx(Dx,{})})})})]})}):null]},e)},dm=x.memo(XF),QF=({data:e,path:t,schema:n,openDeleteDialog:o,moveUp:s,moveDown:a,uischema:u,config:c,enabled:d,cells:p,translations:y})=>{if(e===0)return h.jsx(YF,{numColumns:cm(n).length+1,translations:y});const _=fP({},c,u.options);return h.jsx(x.Fragment,{children:OP(e).map(C=>{const E=ae.Paths.compose(t,`${C}`);return h.jsx(dm,{childPath:E,rowIndex:C,schema:n,openDeleteDialog:o,moveUpCreator:s,moveDownCreator:a,enableUp:C!==0,enableDown:C!==e-1,showSortButtons:_.showSortButtons||_.showArrayTableSortButtons,enabled:d,cells:p,path:t,translations:y},E)})})};class hm extends x.Component{constructor(){super(...arguments);sb(this,"addItem",(n,o)=>this.props.addItem(n,o))}render(){const{label:n,description:o,path:s,schema:a,rootSchema:u,uischema:c,errors:d,openDeleteDialog:p,visible:y,enabled:g,cells:_,translations:C}=this.props,E=c,T=a.type==="object",P=T?um(KF,a,s,g,_):void 0;return y?h.jsxs(b.Table,{children:[h.jsxs(b.Table.Thead,{children:[h.jsx(am,{errors:d,label:n,description:o,addItem:this.addItem,numColumns:T?P.length:1,path:s,uischema:E,schema:a,rootSchema:u,enabled:g,translations:C}),T&&h.jsxs(b.Table.Tr,{children:[P,g?h.jsx(b.Table.Th,{}):null]})]}),h.jsx(b.Table.Tbody,{children:h.jsx(QF,{openDeleteDialog:p,translations:C,...this.props})})]}):null}}const ek=e=>{const[t,n]=x.useState(!1),[o,s]=x.useState(void 0),[a,u]=x.useState(void 0),{removeItems:c,visible:d}=e,p=x.useCallback((C,E)=>{n(!0),s(C),u(E)},[n,s,u]),y=x.useCallback(()=>n(!1),[n]),g=x.useCallback(()=>{const C=o.substring(0,o.lastIndexOf("."));c(C,[a])(),n(!1)},[n,o,a]),_=x.useCallback(()=>n(!1),[n]);return d?h.jsxs(h.Fragment,{children:[h.jsx(hm,{...e,openDeleteDialog:p}),h.jsx(sp,{open:t,onCancel:y,onConfirm:g,onClose:_,acceptText:e.translations.deleteDialogAccept,declineText:e.translations.deleteDialogDecline,title:e.translations.deleteDialogTitle,message:e.translations.deleteDialogMessage})]}):null},pm=ae.rankWith(1,ae.or(ae.isObjectArrayControl,ae.isPrimitiveArrayControl)),gm=Fe.withJsonFormsArrayLayoutProps(ek),tk=e=>e.oneOf!==void 0&&e.oneOf.length>0&&e.oneOf.every(t=>t.const!==void 0),nk=e=>e.type==="string"&&e.enum!==void 0;function mm(e,t){if(!e.scope||e.type!=="Control")return!1;const n=ae.resolveSchema(t,e.scope);return!!(sr(n.type,"array")&&!Array.isArray(n.items)&&n.uniqueItems===!0&&(tk(n.items)||nk(n.items)))}function ym(e,t){if(!e.scope||e.type!=="Control")return!1;const n=ae.resolveSchema(t,e.scope);return!!(sr(n.type,"object")&&!n.properties)}const vm=ae.rankWith(1,mm),bm=Fe.withJsonFormsMultiEnumProps(e=>h.jsx(jh,{...e})),_m=ae.rankWith(1,ae.isObjectControl),wm=Fe.withJsonFormsDetailProps(e=>h.jsx(Vh,{...e})),Tm=ae.rankWith(1,ae.isBooleanControl),Sm=Fe.withJsonFormsControlProps(e=>h.jsx(Rl,{...e})),Cm=ae.rankWith(1,ae.isDateControl),Em=Fe.withJsonFormsControlProps(e=>h.jsx(Zl,{...e})),xm=ae.rankWith(1,ae.isDateTimeControl),Am=Fe.withJsonFormsControlProps(e=>h.jsx(Xl,{...e})),Om=ae.rankWith(2,ae.isEnumControl),Im=Fe.withJsonFormsEnumProps(Fe.withTranslateProps(e=>h.jsx(Ql,{...e})),!1),Pm=ae.rankWith(1,ae.isIntegerControl),$m=Fe.withJsonFormsControlProps(e=>h.jsx(eo,{...e})),Mm=ae.rankWith(2,ym),Fm=Fe.withJsonFormsControlProps(e=>h.jsx(Wh,{...e})),km=ae.rankWith(1,ae.isNumberControl),Dm=Fe.withJsonFormsControlProps(e=>h.jsx(eo,{...e})),Nm=ae.rankWith(2,ae.isOneOfControl),Lm=Fe.withJsonFormsOneOfEnumProps(Fe.withTranslateProps(e=>h.jsx(eu,{...e})),!1),Bm=ae.rankWith(1,ae.isStringControl),zm=Fe.withJsonFormsControlProps(e=>h.jsx(tu,{...e})),rk=e=>{const{text:t,visible:n}=e;return n?h.jsx(b.Title,{fw:"bold",size:"xl",children:t}):null},Um=ae.rankWith(1,ae.isLabelable),jm=Fe.withJsonFormsLabelProps(rk),ik=({uischema:e,schema:t,path:n,enabled:o,renderers:s,cells:a,label:u})=>{const d={elements:e.elements,schema:t,path:n,enabled:o,direction:"column"};return h.jsx(b.Fieldset,{legend:u,children:h.jsx(us,{...d,renderers:s,cells:a})})},Wm=ae.rankWith(1,ae.uiTypeIs("Group")),Vm=Fe.withJsonFormsLayoutProps(ik),ok=({uischema:e,renderers:t,cells:n,schema:o,path:s,enabled:a})=>{const c={elements:e.elements,schema:o,path:s,enabled:a,direction:"row"};return h.jsx(us,{...c,renderers:t,cells:n})},Gm=ae.rankWith(1,ae.uiTypeIs("HorizontalLayout")),Hm=Fe.withJsonFormsLayoutProps(ok),sk=({uischema:e,schema:t,path:n,enabled:o,renderers:s,cells:a})=>{const c={elements:e.elements,schema:t,path:n,enabled:o,direction:"column"};return h.jsx(us,{...c,renderers:s,cells:a})},qm=ae.rankWith(1,ae.uiTypeIs("VerticalLayout")),Ym=Fe.withJsonFormsLayoutProps(sk),Km=[{tester:ip,cell:op},{tester:ep,cell:tp},{tester:Xh,cell:Qh},{tester:Gh,cell:Hh},{tester:qh,cell:Yh},{tester:Kh,cell:Jh},{tester:Rh,cell:Zh},{tester:np,cell:rp}],Jm=[{tester:Cm,renderer:Em},{tester:xm,renderer:Am},{tester:km,renderer:Dm},{tester:Pm,renderer:$m},{tester:Bm,renderer:zm},{tester:Tm,renderer:Sm},{tester:Om,renderer:Im},{tester:Nm,renderer:Lm},{tester:Mm,renderer:Fm},{tester:pm,renderer:gm},{tester:vm,renderer:bm},{tester:_m,renderer:wm},{tester:Gm,renderer:Hm},{tester:qm,renderer:Ym},{tester:Wm,renderer:Vm},{tester:Um,renderer:jm}];function ku({schema:e,uischema:t,state:n,setState:o,view:s,setView:a,jsonForms:u,onSubmit:c,buttonText:d,loading:p,...y}){const g=x.useMemo(()=>b.createTheme({components:{...Object.entries(u||{}).reduce((_,[C,E])=>(_[C]||(_[C]={defaultProps:{}}),_[C].defaultProps=E,_),{})}}),[u]);return h.jsx(b.Modal,{size:"lg",centered:!0,fullScreen:s===gt.FULL_SCREEN,radius:s!==gt.NORMAL?0:void 0,transitionProps:s!==gt.NORMAL?{transition:"fade",duration:200}:void 0,...y,title:h.jsxs(h.Fragment,{children:[y.title,h.jsx(b.Group,{children:h.jsxs(b.Group,{gap:"xs",pr:"xs",children:[h.jsx(b.CloseButton,{onClick:()=>a(s!==gt.OVERLAY?gt.OVERLAY:gt.NORMAL),title:s!==gt.OVERLAY?"Overlay":"Exit overlay",icon:h.jsx(Ll,{icon:s!==gt.OVERLAY?"tabler:stack-forward":"tabler:stack",fontSize:"1.25rem"})}),h.jsx(b.CloseButton,{onClick:()=>a(s!==gt.FULL_SCREEN?gt.FULL_SCREEN:gt.NORMAL),title:s!==gt.FULL_SCREEN?"Full screen":"Exit full screen",icon:h.jsx(Ll,{icon:s!==gt.FULL_SCREEN?"tabler:maximize":"tabler:minimize",fontSize:"1.25rem"})})]})})]}),classNames:{content:"mrt-table-container"},styles:xn(y.styles,{title:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}}),children:h.jsxs(b.Box,{component:"form",pos:"relative",onSubmit:c,children:[h.jsx(b.LoadingOverlay,{visible:p}),h.jsx(b.MantineThemeProvider,{inherit:!0,theme:g,children:h.jsx(Fe.JsonForms,{schema:e,uischema:t??void 0,renderers:Jm,cells:Km,data:n.data,onChange:o})}),h.jsx(b.Group,{justify:"end",mt:"xl",children:h.jsx(b.Button,{type:"submit",children:d})})]})})}const Du={styles:{content:{height:450}}},Nu={withinPortal:!1,h:"100%",w:"100%",pos:"absolute",styles:{overlay:{display:"none"},inner:{position:"relative",height:"100%",width:"100%",padding:0},content:{position:"absolute",height:"100%",width:"100%"}}};function Rm(e,t){const n={};return Object.entries(t.properties||{}).forEach(([o,s])=>{var c,d;const a=s.items?s.items:s,u=a.oneOf?a.oneOf.map(p=>({value:p.const,label:p.title})):a.enum;if(u){const p=u.map(y=>y.value);if(sr(s.type,"array")){const y=((c=e[o])==null?void 0:c.map(g=>g.id_||g))||[];n[o]=p.filter(g=>y.includes(g))}else n[o]=p.find(y=>{var g;return y===(((g=e[o])==null?void 0:g.id_)||e[o])})}else n[o]=(((d=e[o])==null?void 0:d.id_)||e[o])??void 0}),n}function Lu({jsonForms:e,...t}){const{info:n,refetch:o,refetchInfo:s,updateEntry:a}=Oe(),{opened:u,setOpened:c,item:d,itemLoading:p,state:y,setState:g,reset:_,view:C,setView:E}=zn("edit"),{jsonForms:T}=b.useProps("EditDialog",{},{}),P=x.useMemo(()=>xn({__:{setNull:!0}},T,e),[T,e]),N=x.useCallback(W=>{W==null||W.preventDefault(),a(d==null?void 0:d.id,y.data).then(D=>{D&&(o(),s())}).finally(()=>c(!1))},[a,d==null?void 0:d.id,y.data,o,s,c]),X=x.useMemo(()=>({...jo,data:Rm((d==null?void 0:d.result)||{},n.edit_schema)}),[n.edit_schema,d==null?void 0:d.result]);return x.useEffect(()=>{g({data:X.data})},[X,g]),h.jsx(ku,{schema:n.edit_schema,uischema:n.edit_uischema,state:y,setState:g,view:C,setView:E,jsonForms:P,onSubmit:N,buttonText:"Edit",loading:p,opened:u,onClose:()=>c(!1),onExitTransitionEnd:_,...C===gt.OVERLAY?Nu:{},...C===gt.NORMAL?Du:{},...t,title:t.title??(n==null?void 0:n.edit_title)})}function Bu(){const{error:e,resetError:t}=Oe();return h.jsx(b.Modal,{opened:e,onClose:t,title:h.jsxs(b.Group,{children:[h.jsx(r1,{size:16,color:"red"}),h.jsx(b.Text,{children:e?e.message:"Error"})]}),centered:!0,children:e?h.jsx(b.Text,{children:e.originalError.detail||e.originalError.message}):null})}/*! @license DOMPurify 3.2.5 | (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.5/LICENSE */const{entries:Zm,setPrototypeOf:Xm,isFrozen:ak,getPrototypeOf:lk,getOwnPropertyDescriptor:uk}=Object;let{freeze:Ft,seal:on,create:Qm}=Object,{apply:zu,construct:Uu}=typeof Reflect<"u"&&Reflect;Ft||(Ft=function(t){return t}),on||(on=function(t){return t}),zu||(zu=function(t,n,o){return t.apply(n,o)}),Uu||(Uu=function(t,n){return new t(...n)});const Bs=Dt(Array.prototype.forEach),ck=Dt(Array.prototype.lastIndexOf),e0=Dt(Array.prototype.pop),uo=Dt(Array.prototype.push),fk=Dt(Array.prototype.splice),zs=Dt(String.prototype.toLowerCase),ju=Dt(String.prototype.toString),t0=Dt(String.prototype.match),co=Dt(String.prototype.replace),dk=Dt(String.prototype.indexOf),hk=Dt(String.prototype.trim),_n=Dt(Object.prototype.hasOwnProperty),kt=Dt(RegExp.prototype.test),fo=pk(TypeError);function Dt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return zu(e,t,o)}}function pk(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Uu(e,n)}}function Ie(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zs;Xm&&Xm(e,null);let o=t.length;for(;o--;){let s=t[o];if(typeof s=="string"){const a=n(s);a!==s&&(ak(t)||(t[o]=a),s=a)}e[s]=!0}return e}function gk(e){for(let t=0;t<e.length;t++)_n(e,t)||(e[t]=null);return e}function Lr(e){const t=Qm(null);for(const[n,o]of Zm(e))_n(e,n)&&(Array.isArray(o)?t[n]=gk(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Lr(o):t[n]=o);return t}function ho(e,t){for(;e!==null;){const o=uk(e,t);if(o){if(o.get)return Dt(o.get);if(typeof o.value=="function")return Dt(o.value)}e=lk(e)}function n(){return null}return n}const n0=Ft(["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"]),Wu=Ft(["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"]),Vu=Ft(["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"]),mk=Ft(["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"]),Gu=Ft(["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"]),yk=Ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),r0=Ft(["#text"]),i0=Ft(["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"]),Hu=Ft(["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"]),o0=Ft(["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"]),Us=Ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vk=on(/\{\{[\w\W]*|[\w\W]*\}\}/gm),bk=on(/<%[\w\W]*|[\w\W]*%>/gm),_k=on(/\$\{[\w\W]*/gm),wk=on(/^data-[\-\w.\u00B7-\uFFFF]+$/),Tk=on(/^aria-[\-\w]+$/),s0=on(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Sk=on(/^(?:\w+script|data):/i),Ck=on(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),a0=on(/^html$/i),Ek=on(/^[a-z][.\w]*(-[.\w]+)+$/i);var l0=Object.freeze({__proto__:null,ARIA_ATTR:Tk,ATTR_WHITESPACE:Ck,CUSTOM_ELEMENT:Ek,DATA_ATTR:wk,DOCTYPE_NAME:a0,ERB_EXPR:bk,IS_ALLOWED_URI:s0,IS_SCRIPT_OR_DATA:Sk,MUSTACHE_EXPR:vk,TMPLIT_EXPR:_k});const po={element:1,text:3,progressingInstruction:7,comment:8,document:9},xk=function(){return typeof window>"u"?null:window},Ak=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(o=n.getAttribute(s));const a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},u0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function c0(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xk();const t=de=>c0(de);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==po.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const o=n,s=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:u,Node:c,Element:d,NodeFilter:p,NamedNodeMap:y=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:_,trustedTypes:C}=e,E=d.prototype,T=ho(E,"cloneNode"),P=ho(E,"remove"),N=ho(E,"nextSibling"),X=ho(E,"childNodes"),W=ho(E,"parentNode");if(typeof u=="function"){const de=n.createElement("template");de.content&&de.content.ownerDocument&&(n=de.content.ownerDocument)}let D,k="";const{implementation:L,createNodeIterator:J,createDocumentFragment:le,getElementsByTagName:ne}=n,{importNode:S}=o;let j=u0();t.isSupported=typeof Zm=="function"&&typeof W=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:re,ERB_EXPR:ce,TMPLIT_EXPR:he,DATA_ATTR:Le,ARIA_ATTR:_e,IS_SCRIPT_OR_DATA:ke,ATTR_WHITESPACE:De,CUSTOM_ELEMENT:mt}=l0;let{IS_ALLOWED_URI:K}=l0,Y=null;const ge=Ie({},[...n0,...Wu,...Vu,...Gu,...r0]);let Q=null;const q=Ie({},[...i0,...Hu,...o0,...Us]);let H=Object.seal(Qm(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}})),ee=null,fe=null,be=!0,me=!0,xe=!1,qe=!0,te=!1,yt=!0,Je=!1,Nt=!1,fr=!1,Te=!1,Fn=!1,wi=!1,dr=!0,jt=!1;const Br="user-content-";let hr=!0,zr=!1,sn={},pr=null;const gr=Ie({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qn=null;const Ti=Ie({},["audio","video","img","source","image","track"]);let Ur=null;const Si=Ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),mr="http://www.w3.org/1998/Math/MathML",yr="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml";let kn=Jt,jr=!1,Wr=null;const hc=Ie({},[mr,yr,Jt],ju);let Ci=Ie({},["mi","mo","mn","ms","mtext"]),Ei=Ie({},["annotation-xml"]);const Hs=Ie({},["title","style","font","a","script"]);let vr=null;const pc=["application/xhtml+xml","text/html"],gc="text/html";let pt=null,br=null;const qs=n.createElement("form"),Ys=function($){return $ instanceof RegExp||$ instanceof Function},vo=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(br&&br===$)){if((!$||typeof $!="object")&&($={}),$=Lr($),vr=pc.indexOf($.PARSER_MEDIA_TYPE)===-1?gc:$.PARSER_MEDIA_TYPE,pt=vr==="application/xhtml+xml"?ju:zs,Y=_n($,"ALLOWED_TAGS")?Ie({},$.ALLOWED_TAGS,pt):ge,Q=_n($,"ALLOWED_ATTR")?Ie({},$.ALLOWED_ATTR,pt):q,Wr=_n($,"ALLOWED_NAMESPACES")?Ie({},$.ALLOWED_NAMESPACES,ju):hc,Ur=_n($,"ADD_URI_SAFE_ATTR")?Ie(Lr(Si),$.ADD_URI_SAFE_ATTR,pt):Si,qn=_n($,"ADD_DATA_URI_TAGS")?Ie(Lr(Ti),$.ADD_DATA_URI_TAGS,pt):Ti,pr=_n($,"FORBID_CONTENTS")?Ie({},$.FORBID_CONTENTS,pt):gr,ee=_n($,"FORBID_TAGS")?Ie({},$.FORBID_TAGS,pt):{},fe=_n($,"FORBID_ATTR")?Ie({},$.FORBID_ATTR,pt):{},sn=_n($,"USE_PROFILES")?$.USE_PROFILES:!1,be=$.ALLOW_ARIA_ATTR!==!1,me=$.ALLOW_DATA_ATTR!==!1,xe=$.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=$.SAFE_FOR_TEMPLATES||!1,yt=$.SAFE_FOR_XML!==!1,Je=$.WHOLE_DOCUMENT||!1,Te=$.RETURN_DOM||!1,Fn=$.RETURN_DOM_FRAGMENT||!1,wi=$.RETURN_TRUSTED_TYPE||!1,fr=$.FORCE_BODY||!1,dr=$.SANITIZE_DOM!==!1,jt=$.SANITIZE_NAMED_PROPS||!1,hr=$.KEEP_CONTENT!==!1,zr=$.IN_PLACE||!1,K=$.ALLOWED_URI_REGEXP||s0,kn=$.NAMESPACE||Jt,Ci=$.MATHML_TEXT_INTEGRATION_POINTS||Ci,Ei=$.HTML_INTEGRATION_POINTS||Ei,H=$.CUSTOM_ELEMENT_HANDLING||{},$.CUSTOM_ELEMENT_HANDLING&&Ys($.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=$.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$.CUSTOM_ELEMENT_HANDLING&&Ys($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=$.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=$.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(me=!1),Fn&&(Te=!0),sn&&(Y=Ie({},r0),Q=[],sn.html===!0&&(Ie(Y,n0),Ie(Q,i0)),sn.svg===!0&&(Ie(Y,Wu),Ie(Q,Hu),Ie(Q,Us)),sn.svgFilters===!0&&(Ie(Y,Vu),Ie(Q,Hu),Ie(Q,Us)),sn.mathMl===!0&&(Ie(Y,Gu),Ie(Q,o0),Ie(Q,Us))),$.ADD_TAGS&&(Y===ge&&(Y=Lr(Y)),Ie(Y,$.ADD_TAGS,pt)),$.ADD_ATTR&&(Q===q&&(Q=Lr(Q)),Ie(Q,$.ADD_ATTR,pt)),$.ADD_URI_SAFE_ATTR&&Ie(Ur,$.ADD_URI_SAFE_ATTR,pt),$.FORBID_CONTENTS&&(pr===gr&&(pr=Lr(pr)),Ie(pr,$.FORBID_CONTENTS,pt)),hr&&(Y["#text"]=!0),Je&&Ie(Y,["html","head","body"]),Y.table&&(Ie(Y,["tbody"]),delete ee.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw fo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=$.TRUSTED_TYPES_POLICY,k=D.createHTML("")}else D===void 0&&(D=Ak(C,s)),D!==null&&typeof k=="string"&&(k=D.createHTML(""));Ft&&Ft($),br=$}},Ks=Ie({},[...Wu,...Vu,...mk]),xi=Ie({},[...Gu,...yk]),mc=function($){let Z=W($);(!Z||!Z.tagName)&&(Z={namespaceURI:kn,tagName:"template"});const se=zs($.tagName),We=zs(Z.tagName);return Wr[$.namespaceURI]?$.namespaceURI===yr?Z.namespaceURI===Jt?se==="svg":Z.namespaceURI===mr?se==="svg"&&(We==="annotation-xml"||Ci[We]):!!Ks[se]:$.namespaceURI===mr?Z.namespaceURI===Jt?se==="math":Z.namespaceURI===yr?se==="math"&&Ei[We]:!!xi[se]:$.namespaceURI===Jt?Z.namespaceURI===yr&&!Ei[We]||Z.namespaceURI===mr&&!Ci[We]?!1:!xi[se]&&(Hs[se]||!Ks[se]):!!(vr==="application/xhtml+xml"&&Wr[$.namespaceURI]):!1},Wt=function($){uo(t.removed,{element:$});try{W($).removeChild($)}catch{P($)}},Ai=function($,Z){try{uo(t.removed,{attribute:Z.getAttributeNode($),from:Z})}catch{uo(t.removed,{attribute:null,from:Z})}if(Z.removeAttribute($),$==="is")if(Te||Fn)try{Wt(Z)}catch{}else try{Z.setAttribute($,"")}catch{}},Js=function($){let Z=null,se=null;if(fr)$="<remove></remove>"+$;else{const lt=t0($,/^[\r\n\t ]+/);se=lt&<[0]}vr==="application/xhtml+xml"&&kn===Jt&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const We=D?D.createHTML($):$;if(kn===Jt)try{Z=new _().parseFromString(We,vr)}catch{}if(!Z||!Z.documentElement){Z=L.createDocument(kn,"template",null);try{Z.documentElement.innerHTML=jr?k:We}catch{}}const Tt=Z.body||Z.documentElement;return $&&se&&Tt.insertBefore(n.createTextNode(se),Tt.childNodes[0]||null),kn===Jt?ne.call(Z,Je?"html":"body")[0]:Je?Z.documentElement:Tt},Rs=function($){return J.call($.ownerDocument||$,$,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},bo=function($){return $ instanceof g&&(typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||!($.attributes instanceof y)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function")},Zs=function($){return typeof c=="function"&&$ instanceof c};function wn(de,$,Z){Bs(de,se=>{se.call(t,$,Z,br)})}const Xs=function($){let Z=null;if(wn(j.beforeSanitizeElements,$,null),bo($))return Wt($),!0;const se=pt($.nodeName);if(wn(j.uponSanitizeElement,$,{tagName:se,allowedTags:Y}),$.hasChildNodes()&&!Zs($.firstElementChild)&&kt(/<[/\w!]/g,$.innerHTML)&&kt(/<[/\w!]/g,$.textContent)||$.nodeType===po.progressingInstruction||yt&&$.nodeType===po.comment&&kt(/<[/\w]/g,$.data))return Wt($),!0;if(!Y[se]||ee[se]){if(!ee[se]&&_o(se)&&(H.tagNameCheck instanceof RegExp&&kt(H.tagNameCheck,se)||H.tagNameCheck instanceof Function&&H.tagNameCheck(se)))return!1;if(hr&&!pr[se]){const We=W($)||$.parentNode,Tt=X($)||$.childNodes;if(Tt&&We){const lt=Tt.length;for(let It=lt-1;It>=0;--It){const an=T(Tt[It],!0);an.__removalCount=($.__removalCount||0)+1,We.insertBefore(an,N($))}}}return Wt($),!0}return $ instanceof d&&!mc($)||(se==="noscript"||se==="noembed"||se==="noframes")&&kt(/<\/no(script|embed|frames)/i,$.innerHTML)?(Wt($),!0):(te&&$.nodeType===po.text&&(Z=$.textContent,Bs([re,ce,he],We=>{Z=co(Z,We," ")}),$.textContent!==Z&&(uo(t.removed,{element:$.cloneNode()}),$.textContent=Z)),wn(j.afterSanitizeElements,$,null),!1)},Qs=function($,Z,se){if(dr&&(Z==="id"||Z==="name")&&(se in n||se in qs))return!1;if(!(me&&!fe[Z]&&kt(Le,Z))){if(!(be&&kt(_e,Z))){if(!Q[Z]||fe[Z]){if(!(_o($)&&(H.tagNameCheck instanceof RegExp&&kt(H.tagNameCheck,$)||H.tagNameCheck instanceof Function&&H.tagNameCheck($))&&(H.attributeNameCheck instanceof RegExp&&kt(H.attributeNameCheck,Z)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(Z))||Z==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&kt(H.tagNameCheck,se)||H.tagNameCheck instanceof Function&&H.tagNameCheck(se))))return!1}else if(!Ur[Z]){if(!kt(K,co(se,De,""))){if(!((Z==="src"||Z==="xlink:href"||Z==="href")&&$!=="script"&&dk(se,"data:")===0&&qn[$])){if(!(xe&&!kt(ke,co(se,De,"")))){if(se)return!1}}}}}}return!0},_o=function($){return $!=="annotation-xml"&&t0($,mt)},ea=function($){wn(j.beforeSanitizeAttributes,$,null);const{attributes:Z}=$;if(!Z||bo($))return;const se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let We=Z.length;for(;We--;){const Tt=Z[We],{name:lt,namespaceURI:It,value:an}=Tt,Vr=pt(lt);let St=lt==="value"?an:hk(an);if(se.attrName=Vr,se.attrValue=St,se.keepAttr=!0,se.forceKeepAttr=void 0,wn(j.uponSanitizeAttribute,$,se),St=se.attrValue,jt&&(Vr==="id"||Vr==="name")&&(Ai(lt,$),St=Br+St),yt&&kt(/((--!?|])>)|<\/(style|title)/i,St)){Ai(lt,$);continue}if(se.forceKeepAttr||(Ai(lt,$),!se.keepAttr))continue;if(!qe&&kt(/\/>/i,St)){Ai(lt,$);continue}te&&Bs([re,ce,he],To=>{St=co(St,To," ")});const wo=pt($.nodeName);if(Qs(wo,Vr,St)){if(D&&typeof C=="object"&&typeof C.getAttributeType=="function"&&!It)switch(C.getAttributeType(wo,Vr)){case"TrustedHTML":{St=D.createHTML(St);break}case"TrustedScriptURL":{St=D.createScriptURL(St);break}}try{It?$.setAttributeNS(It,lt,St):$.setAttribute(lt,St),bo($)?Wt($):e0(t.removed)}catch{}}}wn(j.afterSanitizeAttributes,$,null)},yc=function de($){let Z=null;const se=Rs($);for(wn(j.beforeSanitizeShadowDOM,$,null);Z=se.nextNode();)wn(j.uponSanitizeShadowNode,Z,null),Xs(Z),ea(Z),Z.content instanceof a&&de(Z.content);wn(j.afterSanitizeShadowDOM,$,null)};return t.sanitize=function(de){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,se=null,We=null,Tt=null;if(jr=!de,jr&&(de="<!-->"),typeof de!="string"&&!Zs(de))if(typeof de.toString=="function"){if(de=de.toString(),typeof de!="string")throw fo("dirty is not a string, aborting")}else throw fo("toString is not a function");if(!t.isSupported)return de;if(Nt||vo($),t.removed=[],typeof de=="string"&&(zr=!1),zr){if(de.nodeName){const an=pt(de.nodeName);if(!Y[an]||ee[an])throw fo("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof c)Z=Js("<!---->"),se=Z.ownerDocument.importNode(de,!0),se.nodeType===po.element&&se.nodeName==="BODY"||se.nodeName==="HTML"?Z=se:Z.appendChild(se);else{if(!Te&&!te&&!Je&&de.indexOf("<")===-1)return D&&wi?D.createHTML(de):de;if(Z=Js(de),!Z)return Te?null:wi?k:""}Z&&fr&&Wt(Z.firstChild);const lt=Rs(zr?de:Z);for(;We=lt.nextNode();)Xs(We),ea(We),We.content instanceof a&&yc(We.content);if(zr)return de;if(Te){if(Fn)for(Tt=le.call(Z.ownerDocument);Z.firstChild;)Tt.appendChild(Z.firstChild);else Tt=Z;return(Q.shadowroot||Q.shadowrootmode)&&(Tt=S.call(o,Tt,!0)),Tt}let It=Je?Z.outerHTML:Z.innerHTML;return Je&&Y["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&kt(a0,Z.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
|
|
231
|
+
`+It),te&&Bs([re,ce,he],an=>{It=co(It,an," ")}),D&&wi?D.createHTML(It):It},t.setConfig=function(){let de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vo(de),Nt=!0},t.clearConfig=function(){br=null,Nt=!1},t.isValidAttribute=function(de,$,Z){br||vo({});const se=pt(de),We=pt($);return Qs(se,We,Z)},t.addHook=function(de,$){typeof $=="function"&&uo(j[de],$)},t.removeHook=function(de,$){if($!==void 0){const Z=ck(j[de],$);return Z===-1?void 0:fk(j[de],Z,1)[0]}return e0(j[de])},t.removeHooks=function(de){j[de]=[]},t.removeAllHooks=function(){j=u0()},t}var f0=c0();const Mn=x.forwardRef(({fallback:e,functionProps:t,children:n},o)=>{if(n=ct(n,t),n===null)return null;const s=n||e;return x.isValidElement(s)?x.cloneElement(s,{ref:o}):s});Mn.displayName="FallbackWrapper";const Ok={field:"_field_zdaf7_1",rtl:"_rtl_zdaf7_7",borderRight:"_borderRight_zdaf7_12"},go=x.memo(({id:e,entry:t,loading:n,rightBorder:o,children:s,onClickEntry:a,customElement:u,sanitize:c,...d})=>{const p={text:{style:{whiteSpace:"nowrap",overflow:"ellipsis"}}},{text:y}=b.useProps("Field",p,d),g={};Object.entries(y).forEach(([C,E])=>{typeof E=="function"&&(g[C]=E(t))});const _=b.useStyles({name:"Field",props:d,classes:Ok});return h.jsx(b.Table.Td,{..._("field"),onClick:a?()=>a(e,t):null,...d,children:h.jsx(b.Box,{w:"100%",children:h.jsx(b.Skeleton,{visible:n,children:h.jsx(Mn,{fallback:Array.isArray(s)?s.map((C,E)=>h.jsx(b.Text,{...y,...g,children:c?f0.sanitize(C):C},E)):x.isValidElement(s)?s:h.jsx(b.Text,{...y,...g,children:c?f0.sanitize(s):s}),functionProps:t,children:u})})})})});go.displayName="Field";const d0={row:"_row_138r2_1",selected:"_selected_138r2_5"};function h0({entry:e,selected:t,children:n}){const o=b.useStyles({name:"Row",classes:d0}),s=b.useProps("Row",{},{});Object.entries(s).forEach(([c,d])=>{typeof d=="function"&&(s[c]=d(e))});var{className:a,style:u}=o("row");return a=`${a} ${t?d0.selected:""}`,h.jsx(b.Table.Tr,{className:a,style:{...u},...s,children:n})}function Ik({bodyCustomizer:e,actionColumn:t,id:n,entry:o}){let s=e==null?void 0:e[t];return typeof s=="function"&&(s=s({id:n,...o})),s===null?null:s||h.jsx(Ws,{id:n})}function p0({data:e,loading:t,hideActions:n,hideCheckbox:o,selection:s,toggleRow:a,onClickEntry:u,bodyCustomizer:c,bodySeparator:d}){const p=e.list_columns.includes("actions")?"_actions":"actions",y=x.useMemo(()=>e!=null&&e.list_columns.includes("all")?"_all":"all",[e==null?void 0:e.list_columns]);return h.jsx(b.Table.Tbody,{children:e.result.length?e.result.map((g,_)=>{const C=e.ids[_];return h.jsxs(h0,{entry:{...g,id:C},children:[o?null:h.jsx(go,{loading:t,children:h.jsx(b.Checkbox,{pl:2,checked:s.includes(C),onChange:()=>{a(C)}})},_),n?null:h.jsx(go,{loading:t,children:h.jsx(Ik,{bodyCustomizer:c,actionColumn:p,id:Et(C),entry:g})}),e.list_columns.map((E,T)=>{let P=c==null?void 0:c[E];typeof P=="function"&&(P=P({id:C,...g}));let N=Vi(g,E);typeof N=="number"?N=N.toLocaleString():N==null&&(N="");const X=(d==null?void 0:d[E])||(d==null?void 0:d[y]);return X&&(N=N.split(X)),P===null?null:h.jsx(go,{id:C,entry:g,loading:t,onClickEntry:u,customElement:P,sanitize:!0,children:N},T)})]},Et(C))}):h.jsx("tr",{children:h.jsx("td",{style:{padding:"8px"},colSpan:n?e.list_columns.length:e.list_columns.length+1,children:h.jsx(b.Text,{style:{fontStyle:"italic"},size:"sm",c:"dimmed",children:"No data available"})})})})}const g0={root:"_root_1kmay_1",wrapper:"_wrapper_1kmay_7",icon:"_icon_1kmay_18"};function js({column:e,label:t,orderColumn:n,related:o,toggleAll:s,allChecked:a,classNames:u,styles:c,customElement:d,...p}){const{queryParams:y,setQueryParams:g,loading:_}=Oe(),C={fw:700,size:"sm",color:"gray.8",hoverColor:"gray.6",selectedColor:"blue"},E=b.useStyles({name:"FieldTitle",classes:g0,classNames:u,styles:c,props:p}),T=b.useProps("FieldTitle",C,p),{hovered:P,ref:N}=Xe.useHover(),X=n&&y.order_column===n,W=E("wrapper");return W.style.cursor=n?W.style.cursor:"auto",h.jsx(b.Table.Th,{className:g0.fieldTitleRoot,...E("root"),onClick:n&&!_?()=>g({order_column:n,order_direction:y.order_direction==="asc"?"desc":"asc"}):null,children:h.jsx(b.Box,{ref:N,...W,children:e==="Checkbox"?h.jsx(b.Checkbox,{pb:5,pl:2,onChange:s,checked:a}):h.jsxs(h.Fragment,{children:[h.jsx(b.Box,{w:"100%",fw:T.fw,size:"xl",c:P&&n?T.hoverColor:X?T.selectedColor:T.color,children:d||t||e}),o?h.jsx(b.Tooltip,{label:"Related Field",children:h.jsx(b.Indicator,{label:"rel",style:{indicator:{top:"-1px !important",right:"-2px !important",padding:"4px"}},children:h.jsx(b.Box,{...E("icon"),children:X?y.order_direction==="asc"?h.jsx(Sl,{size:14,strokeWidth:1.5}):h.jsx(Pd,{size:14,strokeWidth:1.5}):null})})}):h.jsx(b.Box,{...E("icon"),children:X?y.order_direction==="asc"?h.jsx(Sl,{size:14,strokeWidth:1.5}):h.jsx(Pd,{size:14,strokeWidth:1.5}):null})]})})})}const qu=x.memo(({data:e,info:t,settings:n,hideActions:o,hideCheckbox:s,allChecked:a,toggleAll:u,headerCustomizer:c})=>{const d=e.list_columns.includes("actions")?"_actions":"actions";let p=c==null?void 0:c[d];return typeof p=="function"&&(p=p()),h.jsx(b.Table.Thead,{children:h.jsxs(b.Table.Tr,{children:[s?null:h.jsx(js,{data:e,column:"Checkbox",allChecked:a,toggleAll:u}),o?null:h.jsx(js,{column:"Actions",customElement:p}),e.list_columns.map((y,g)=>{var C;let _=c==null?void 0:c[y];return typeof _=="function"&&(_=_(e.label_columns[y])),_===null?null:h.jsx(js,{column:y,label:e.label_columns[y],orderColumn:e.order_columns.find(E=>E===y)||e.order_columns.find(E=>E.startsWith(`${y}.`)),related:((C=t.filters[y])==null?void 0:C.schema.type)==="Nested",customElement:_},y)})]})})});qu.displayName="Header";const Pk={scrollbar:"_scrollbar_isyo2_1"};function m0({bulkActions:e,hideActions:t,loading:n,onSelectCheckbox:o,onClickEntry:s,hideCheckbox:a,hideDownload:u,headerCustomizer:c,bodyCustomizer:d,bodySeparator:p,...y}){const g=b.useMantineTheme(),_=b.Table.extend({highlightOnHover:!0,striped:!0,horizontalSpacing:"md",verticalSpacing:"sm"}),C=b.useProps("DatagridTable",_,y),{data:E,info:T}=Oe(),[P,N]=x.useState([]),[X,W]=x.useState(!1),D=L=>{N(J=>J.includes(L)?J.filter(le=>le!==L):[...J,L])},k=()=>{N(L=>L.length===E.ids.length?[]:E.ids.map((J,le)=>J))};return x.useEffect(()=>{W(P.length===E.result.length&&P.length>0),o&&o(P),e==null||e.setSelectedIds(P.map(L=>L))},[P]),x.useEffect(()=>{N([]),o&&o([])},[E]),h.jsx(b.ScrollArea,{options:{className:g.colorScheme==="dark"?"os-theme-light":void 0},style:{flex:1,flexDirection:"column"},classNames:Pk,children:h.jsxs(b.Table,{stickyHeader:!0,...C,children:[h.jsx(qu,{data:E,info:T,hideActions:t,hideCheckbox:a,allChecked:X,setSelection:N,toggleAll:k,headerCustomizer:c}),h.jsx(p0,{data:E,loading:n,hideActions:t,hideCheckbox:a,selection:P,setSelection:N,toggleRow:D,onClickEntry:s,bodyCustomizer:d,bodySeparator:p})]})})}const Yu=x.memo(({counter:e,...t})=>{const{data:n,queryParams:o,setQueryParams:s}=Oe(),a=b.useMantineTheme(),u=[{value:"10",label:"10"},{value:"25",label:"25"},{value:"50",label:"50"}],c=String(o.page_size),[d,p]=x.useState(o.page);x.useEffect(()=>{p(o.page)},[o.page]);const y=_=>{p(_-1),s({page:_-1})},g=_=>{s({page_size:parseInt(_,10),page:0})};return h.jsxs(h.Fragment,{children:[h.jsx(b.Divider,{}),h.jsxs(b.Box,{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:54,border:"none",borderTopWidth:"1px",padding:"var(--mantine-spacing-md)"},children:[h.jsxs(b.Box,{style:{display:"flex",alignItems:"center",gap:"var(--mantine-spacing-sm)"},children:[h.jsx(b.Text,{children:"Rows per page:"}),h.jsx(b.Select,{value:c,defaultValue:c,onChange:_=>g(_),data:u,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"}}}})})]}),h.jsx(b.Pagination,{size:"sm",total:Math.ceil(n.count/c),value:d+1,onChange:y,...t}),e&&n?h.jsxs(h.Fragment,{children:[h.jsx(b.Text,{c:a.primaryColor,size:"xs",fw:400,pl:20,children:"Total Records"}),h.jsx(b.Text,{c:a.primaryColor,size:"md",fw:700,pl:10,children:n.count})]}):null]})]})});Yu.displayName="Pagination";function $k(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(n){const o={};return n instanceof wt&&n.inner.forEach(s=>{o[s.path.replaceAll("[",".").replaceAll("]","")]=s.message}),o}}}function Mk({form:e,name:t,items:n,...o}){return h.jsx(b.Autocomplete,{data:n,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function y0({form:e,name:t,...n}){return h.jsx(h.Fragment,{children:h.jsx(Wi.DateInput,{...e.getInputProps(t),onChange:o=>{if(o instanceof Date){const s=new Date(o.getTime()-o.getTimezoneOffset()*6e4);e.setFieldValue(t,s.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function v0({form:e,name:t,...n}){return h.jsx(h.Fragment,{children:h.jsx(Wi.DateTimePicker,{...e.getInputProps(t),onChange:o=>{if(o instanceof Date){const s=new Date(o);e.setFieldValue(t,s.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...n})})}function mo({form:e,name:t,...n}){const o=e.getInputProps(t).value,s=x.useMemo(()=>o&&typeof o=="object"?JSON.stringify(o):o||"",[o]);return t==="password"?h.jsx(b.PasswordInput,{...e.getInputProps(t),value:s,...n}):h.jsx(b.TextInput,{...e.getInputProps(t),value:s,...n})}function Ku({form:e,name:t,filter:n,...o}){const[s,a]=x.useState(""),u=e.getInputProps(t).value,c=x.useMemo(()=>u?typeof u=="object"?JSON.stringify(u,null,2):u:"",[u]);return x.useEffect(()=>{a(c)},[c]),n?h.jsx(mo,{form:e,name:t,...o}):h.jsx(b.JsonInput,{autosize:!0,minRows:4,maxRows:12,validationError:"Invalid JSON",...e.getInputProps(t),...o,value:s,onChange:d=>{if(a(d),!d){e.getInputProps(t).onChange(null);return}try{const p=JSON.parse(d);e.getInputProps(t).onChange(p)}catch{}}})}function b0({form:e,name:t,filter:n,...o}){const[s,a]=x.useState(!!n);return h.jsxs(b.InputWrapper,{label:o.label,description:o.description,children:[!n&&h.jsxs(b.Group,{align:"center",gap:"xs",py:"0.25rem",children:[h.jsx(b.Checkbox,{checked:s,onChange:u=>a(u.currentTarget.checked)}),h.jsx(b.Text,{size:"xs",children:"WKT"})]}),s?h.jsx(mo,{form:e,name:t,...o,label:void 0,description:void 0}):h.jsx(Ku,{form:e,name:t,...o,label:void 0,description:void 0})]})}function _0({form:e,name:t,items:n,...o}){const s=n.map(u=>({value:String(Et(u.id)),label:u.value})),a=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(u=>String(typeof u=="object"?Et(u.id):u)):[];return h.jsx(b.MultiSelect,{data:s,searchable:!0,...e.getInputProps(t),value:a||[],...o})}function w0({form:e,name:t,items:n,filter:o,...s}){var u;const a=n.map(c=>({value:String(Et(c.id)),label:c.value}));return h.jsx(b.Select,{data:a,searchable:!0,...e.getInputProps(t),onChange:c=>{if(o){e.setFieldValue(t,c);return}const d=n.find(p=>String(Et(p.id))===c)||null;e.setFieldValue(t,d)},value:o?e.getInputProps(t).value:String(Et((u=e.getInputProps(t).value)==null?void 0:u.id))||"",...s})}function Ju({form:e,name:t,items:n,...o}){return h.jsx(b.Select,{data:n,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...o})}function Ru({form:e,name:t,schema:n,filter:o,withinPortal:s=!0,...a}){if(!n.type)return null;switch(n.type){case"Boolean":return h.jsx(Ju,{form:e,name:t,items:[{label:"true",value:o?"1":"true"},{label:"false",value:o?"0":"false"}],...a});case"RelatedList":return h.jsx(_0,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});case"Related":return h.jsx(w0,{form:e,name:t,items:n.values,filter:o,comboboxProps:{withinPortal:s},...a});case"DateTime":return h.jsx(v0,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:n,popoverProps:{withinPortal:s},...a});case"Date":return h.jsx(y0,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:n,popoverProps:{withinPortal:s},...a});case"Geometry":return h.jsx(b0,{form:e,name:t,filter:o,...a});case"Raw":return h.jsx(Ku,{form:e,name:t,filter:o,...a});case"Integer":case"Float":return h.jsx(mo,{form:e,name:t,...a});case"Enum":return h.jsx(Ju,{form:e,name:t,items:n.values,comboboxProps:{withinPortal:s},...a});default:return h.jsx(mo,{form:e,name:t,...a})}}function Fk({form:e,name:t,items:n,onChange:o,...s}){return h.jsx(b.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function Zu({form:e,name:t,label:n,comboboxProps:o,...s}){const a=b.useCombobox({onDropdownClose:()=>a.resetSelectedOption(),onDropdownOpen:()=>a.updateSelectedOptionIndex("active")}),[u,c]=x.useState([]),[d,p]=x.useState(""),y=C=>{d!==""&&(u.includes(d)||c(E=>[...E,d]),p(""))},g=C=>c(E=>E.filter(T=>T!==C)),_=u.map(C=>h.jsx(b.Pill,{withRemoveButton:!0,onRemove:()=>g(C),children:C},C));return x.useEffect(()=>{const C=e.getInputProps(t).value;if(C)try{c([...C])}catch(E){console.error("Error parsing JSON:",E)}},[]),x.useEffect(()=>{e.getInputProps(t).onChange(u)},[u]),h.jsx(b.InputWrapper,{label:n,children:h.jsxs(b.Combobox,{store:a,onOptionSubmit:y,...o,children:[h.jsx(b.Combobox.DropdownTarget,{children:h.jsx(b.PillsInput,{onClick:()=>a.openDropdown(),children:h.jsxs(b.Pill.Group,{children:[_,h.jsx(b.Combobox.EventsTarget,{children:h.jsx(b.PillsInput.Field,{onFocus:()=>a.openDropdown(),onBlur:()=>a.closeDropdown(),value:d,placeholder:"Search values",onChange:C=>{a.updateSelectedOptionIndex(),p(C.currentTarget.value)},onKeyDown:C=>{C.key==="Backspace"&&d.length===0&&(C.preventDefault(),g(u[u.length-1]))}})})]})})}),h.jsx(b.Combobox.Dropdown,{children:h.jsx(b.Combobox.Options,{children:h.jsxs(b.Combobox.Option,{value:"$create",children:["+ Create ",d]})})})]})})}function kk({form:e,name:t,items:n,onChange:o,...s}){return h.jsx(b.Select,{data:n,searchable:!0,...e.getInputProps(t),onChange:o,...s})}function T0({onClose:e,...t}){const{info:n,queryParams:o,setQueryParams:s,path:a}=Oe(),u=ja.useForm({initialValues:{filters:[]},validate:$k(qi({filters:vl().of(qi({col:Ro().transform(g=>g||void 0).required("Field is required"),opr:Ro().transform(g=>g||void 0).required("col is required"),value:Jo().when("col",{is:g=>g&&n.filters[g].schema.required,then:()=>Jo().required("Value is required")})}))}))}),c={bg:"transparent",size:"sm",c:"gray"},d=b.useProps("ActionIcon",c,t);x.useEffect(()=>{u.setValues({filters:[]}),u.reset()},[a]),x.useEffect(()=>{if(o.filters&&o.filters.length){const g=o.filters.filter(_=>!_.id).map(_=>({..._,key:Xe.randomId()}));u.setFieldValue("filters",g)}},[o.filters]);const p=g=>{const _=g.filters.map(({key:E,...T})=>T),C=JSON.parse(JSON.stringify(_));s({filters:C,page:0}),e()},y=u.values.filters.map((g,_)=>h.jsxs(b.Box,{px:"sm",children:[h.jsxs(b.Flex,{my:"md",gap:"md",style:{whiteSpace:"nowrap"},children:[h.jsx(b.Box,{style:{width:"192px"},children:n&&n.filters&&h.jsx(Fk,{form:u,name:`filters.${_}.col`,items:Object.entries(n.filters).map(([C,E])=>({label:E.label,value:String(C)})),onChange:C=>{u.setFieldValue(`filters.${_}`,{col:C,opr:"",value:"",key:Xe.randomId()})}})}),h.jsx(b.Box,{style:{width:"192px"},children:g.col?h.jsx(kk,{form:u,name:`filters.${_}.opr`,items:n.filters[g.col].filters.filter(C=>!C.id).map(C=>({label:C.name,value:C.operator})),onChange:C=>{u.setFieldValue(`filters.${_}`,{col:u.values.filters[_].col,opr:C,value:"",key:Xe.randomId()})}}):null}),h.jsx(b.Box,{style:{width:"192px"},children:g.col?g.opr==="in"?h.jsx(Zu,{form:u,name:`filters.${_}.value`}):h.jsx(Ru,{form:u,name:`filters.${_}.value`,schema:n.filters[g.col].schema,filter:!0}):null}),h.jsx(b.ActionIcon,{bg:d.bg,size:d.size,c:d.c,onClick:()=>{u.removeListItem("filters",_)},children:h.jsx(Dd,{})})]}),u.values.filters.length>1&&_<u.values.filters.length-1?h.jsx(b.Divider,{my:"md",labelPosition:"center",label:"AND"}):null]},g.key));return h.jsxs(b.Box,{component:"form",onSubmit:u.onSubmit(p),children:[y.length===0&&h.jsx(b.Box,{style:{width:"642px"},children:h.jsx(b.Text,{style:{fontStyle:"italic",padding:"7px"},size:"sm",c:"dimmed",children:"No filters selected..."})}),h.jsx(b.ScrollArea.Autosize,{mah:"40vh",mt:20,children:y}),h.jsx(b.Divider,{my:"sm"}),h.jsxs(b.Box,{style:{display:"flex",justifyContent:"space-between"},children:[h.jsx(b.Button,{variant:"subtle",leftSection:h.jsx(Cl,{}),onClick:()=>{u.insertListItem("filters",{col:"",opr:"",value:"",key:Xe.randomId()})},children:"Add Filter"}),h.jsx(b.Group,{spacing:"md",children:h.jsx(b.Button,{type:"submit",children:"Apply"})})]})]})}function S0(...e){const{queryParams:t}=Oe(),n={bg:"transparent",size:"sm",c:"gray"},o=b.useProps("ActionIcon",n,e),[s,a]=x.useState(!1);return h.jsxs(b.Popover,{opened:s,position:"bottom-end",onClose:()=>a(!1),closeOnClickOutside:!1,children:[h.jsx(b.Popover.Target,{children:h.jsx(b.Tooltip,{opened:s?!1:null,label:"Filter",children:(t==null?void 0:t.filters.filter(u=>!u.id).length)!=0?h.jsx(b.Indicator,{zIndex:20,size:16,label:t==null?void 0:t.filters.length,children:h.jsx(b.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:h.jsx($d,{})})}):h.jsx(b.ActionIcon,{bg:o.bg,size:o.size,c:o.c,onClick:()=>a(!0),children:h.jsx($d,{})})})}),h.jsxs(b.Popover.Dropdown,{px:"xs",children:[h.jsx(b.Box,{style:{position:"absolute",top:4,right:4},children:h.jsx(b.CloseButton,{title:"Filters",onClick:()=>a(!1)})}),h.jsx(T0,{onClose:()=>{a(!1)}})]})]})}const Xu=x.memo(({hideAdd:e,hideFilter:t,hideDownload:n,toolbarCustomizer:o})=>{const{info:s}=Oe(),a=x.useMemo(()=>{const c={};return Object.entries(o).forEach(([d,p])=>{c[d]=p,typeof c[d]=="function"&&(c[d]=c[d]())}),c},[o]),u=s.permissions.includes("can_post");return h.jsxs(b.Flex,{justify:"flex-end",p:"md",gap:"sm",children:[!n&&(a.download||h.jsx(Gs,{size:"sm"})),u&&!e?a.add||h.jsx(Vs,{size:"sm"}):null,t?null:a.filter||h.jsx(S0,{})]})});Xu.displayName="Toolbar";function Qu({children:e,cond:t}){return Ld(t)?e:null}const ec=x.forwardRef((e,t)=>{const{path:n,data:o,loading:s,info:a,setQueryParams:u}=Oe(),{hideToolbar:c=!1,hideFilter:d=!1,hideAdd:p=!1,hideSettings:y=!1,hideActions:g=!1,hidePagination:_=!1,hideError:C=!1,hideDownload:E=!0,onSelectCheckbox:T=null,onClickEntry:P=null,fetchOnMount:N=!0,bulkActions:X=null,styles:W,headerCustomizer:D={},bodyCustomizer:k={},toolbarCustomizer:L={},counter:J=!1,bodySeparator:le,form:ne}=e;x.useEffect(()=>{!o&&N&&u({})},[o]);const{setView:S}=zn("add"),{setView:j}=zn("edit");if(x.useEffect(()=>{var ce,he;(ce=ne==null?void 0:ne.add)!=null&&ce.initialView&&S(ne.add.initialView),(he=ne==null?void 0:ne.edit)!=null&&he.initialView&&j(ne.edit.initialView)},[]),!a)return;const re=X===null;return h.jsxs(b.Paper,{ref:t,h:"100%",display:"flex",pos:"relative",style:{flexDirection:"column",...W},children:[h.jsxs(Qu,{cond:!!a,children:[h.jsx(nc,{jsonForms:ne==null?void 0:ne.add}),h.jsx(Lu,{jsonForms:ne==null?void 0:ne.edit})]}),c?null:h.jsx(Xu,{hideFilter:d,hideAdd:p,hideSettings:y,hideDownload:E,toolbarCustomizer:L}),o?h.jsx(m0,{bulkActions:X,hideActions:g,loading:s,onSelectCheckbox:T,onClickEntry:P,hideCheckbox:re,hideDownload:E,headerCustomizer:D,bodyCustomizer:k,bodySeparator:le}):null,!_&&o?h.jsx(Yu,{counter:J}):null,C?null:h.jsx(Bu,{})]})});ec.displayName="DataGrid";function Dk({relatedPath:e,...t}){const{path:n}=Oe();return ot(n?n.substring(0,n.lastIndexOf("/")):"",e.substring(0,e.lastIndexOf("/"))),h.jsx(Id,{resource_name:e.replace("/",""),relation:t,children:h.jsx(ec,{hideToolbar:!0,hideDownload:!1})})}const Nk=x.memo(Dk);function C0({item:e,info:t,loading:n,opened:o,onClose:s,...a}){const u={modal:{},tabs:{},tabsList:{},tabsPanel:{}},{modal:c,tabs:d,tabsList:p,tabsPanel:y}=b.useProps("ViewDialog",u,a);return h.jsxs(b.Modal,{opened:o,onClose:s,title:`${e==null?void 0:e.show_title} (#${Et(e==null?void 0:e.id)})`,size:"lg",centered:!0,zIndex:1e3,...c,children:[h.jsx(b.LoadingOverlay,{visible:n}),!n&&e?h.jsxs(b.Tabs,{defaultValue:"details",...d,children:[h.jsxs(b.Tabs.List,{...p,children:[h.jsx(b.Tabs.Tab,{value:"details",children:"Details"}),t.relations.map((g,_)=>h.jsx(b.Tabs.Tab,{value:g.name,children:g.name},_))]}),h.jsx(b.Tabs.Panel,{pt:"xs",value:"details",...y,children:h.jsx(b.Paper,{p:"xs",withBorder:!0,children:h.jsx(b.Stack,{spacing:"md",children:h.jsx(b.ScrollArea,{h:450,type:"auto",children:e.show_columns.map((g,_)=>h.jsxs(b.Grid,{maw:500,children:[h.jsx(b.Grid.Col,{span:4,children:h.jsx(b.Text,{size:"md",children:e.label_columns[g]})}),h.jsx(b.Grid.Col,{span:1,children:h.jsx(b.Text,{size:"xs",children:":"})}),h.jsx(b.Grid.Col,{span:6,children:h.jsx(b.Text,{size:"md",children:Vi(e.result,g)})})]},_))})})})}),t.relations.map((g,_)=>h.jsx(b.Tabs.Panel,{pt:"xs",value:g.name,children:h.jsx(b.Paper,{withBorder:!0,children:h.jsx(Nk,{relatedPath:g.path,id:Et(e.id),foreign_key:g.foreign_key,type:g.type})})},_))]}):null]})}const tc=x.memo(({id:e,...t})=>{const{info:n,getEntry:o}=Oe(),[s,a]=x.useState(null),[u,c]=x.useState(!1),[d,p]=x.useState(!1),y=or({onClick:()=>{c(!0),o(e).then(g=>{g&&(a(g),p(!0))}).finally(()=>c(!1))},size:"sm",...t});return h.jsxs(h.Fragment,{children:[h.jsx(b.Tooltip,{label:"Details",children:h.jsx(b.ActionIcon,{...y,children:h.jsx(a1,{})})}),h.jsx(C0,{item:s,info:n,loading:u,opened:d,onClose:()=>p(!1)})]})});tc.displayName="View";const Ws=x.memo(({id:e})=>{const{info:t}=Oe();return h.jsxs(b.Flex,{style:{gap:4,whiteSpace:"nowrap"},children:[t!=null&&t.permissions.includes("can_get")?h.jsx(tc,{id:e}):null,t!=null&&t.permissions.includes("can_put")?h.jsx(xl,{id:e}):null,t!=null&&t.permissions.includes("can_delete")?h.jsx(El,{id:e}):null]})});Ws.displayName="Actions";const Vs=x.memo(({tooltipProps:e,...t})=>{const{setOpened:n}=zn("add"),o=or({onClick:()=>n(!0),...t});return h.jsx(h.Fragment,{children:h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Add Item",children:h.jsx(b.ActionIcon,{...o,children:h.jsx(Cl,{})})})})});Vs.displayName="Add";function nc({jsonForms:e,...t}){const{info:n,refetch:o,refetchInfo:s,addEntry:a}=Oe(),{opened:u,setOpened:c,state:d,setState:p,reset:y,view:g,setView:_}=zn("add"),{jsonForms:C}=b.useProps("AddDialog",{},{}),E=x.useMemo(()=>xn(C,e),[C,e]),T=x.useCallback(P=>{P==null||P.preventDefault(),a(d.data).then(N=>{N&&(o(),s())}).finally(()=>c(!1))},[a,o,s,c,d.data]);return h.jsx(ku,{schema:n.add_schema,uischema:n.add_uischema,state:d,setState:p,view:g,setView:_,jsonForms:E,onSubmit:T,buttonText:"Add",opened:u,onClose:()=>c(!1),onExitTransitionEnd:y,...g===gt.OVERLAY?Nu:{},...g===gt.NORMAL?Du:{},...t,title:t.title??(n==null?void 0:n.add_title)})}const E0=[{name:"John Doe",age:25,friend:"Jane Doe","friend.name":"Jane Doe","friend.age":30},{name:"Jane Doe",age:30,friend:"John Doe","friend.name":"John Doe","friend.age":25}],Lk=[{label:"Name",key:"name"},{label:"Age",key:"age"},{label:"Friend",key:"friend"}],Bk=[{label:"Name",key:"name"},{label:"Age",key:"age"},{label:"Friend Name",key:"friend.name"},{label:"Friend Age",key:"friend.age"}],zk=E0.map(e=>h.jsxs(b.Table.Tr,{children:[h.jsx(b.Table.Td,{p:4,children:e.name}),h.jsx(b.Table.Td,{p:4,children:e.age}),h.jsx(b.Table.Td,{p:4,children:e.friend})]},e.name)),Uk=E0.map(e=>h.jsxs(b.Table.Tr,{children:[h.jsx(b.Table.Td,{p:4,children:e.name}),h.jsx(b.Table.Td,{p:4,children:e.age}),h.jsx(b.Table.Td,{p:4,children:e["friend.name"]}),h.jsx(b.Table.Td,{p:4,children:e["friend.age"]})]},e.name)),x0={simplified:{title:"Simplified version of the data",description:"This is a simplified version of the data. It shows only the properties of the elements and their relationships"},detailed:{title:"Detailed version of the data",description:"This is a detailed version of the data. It shows all the properties of the elements including all the properties of their relationships"}},Gs=x.memo(({tooltipProps:e,...t})=>{const{download:n}=Oe(),[o,{toggle:s,close:a}]=Xe.useDisclosure(),[u,c]=x.useState(!1),[d,p]=x.useState("simplified"),[y,g]=x.useState(zo),[_,C]=x.useState(Ga),E=or({onClick:s,...t}),T=()=>{c(!0),n(void 0,{export_mode:d,delimiter:y,quotechar:_}).then(()=>{a()}).finally(()=>c(!1))};return h.jsxs(h.Fragment,{children:[h.jsx(b.Modal,{title:"Download data",centered:!0,size:"xl",opened:o,onClose:a,children:h.jsxs(b.Stack,{children:[h.jsxs(b.Group,{grow:!0,children:[h.jsx(b.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:y,onChange:g,data:Va,placeholder:"Select delimiter",allowDeselect:!1,leftSection:h.jsx(kd,{})}),h.jsx(b.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:_,onChange:C,data:Ha,placeholder:"Select quote character",leftSection:h.jsx(Fd,{})})]}),h.jsx(b.Box,{children:h.jsx(b.SegmentedControl,{value:d,onChange:p,data:[{label:"Simplified",value:"simplified"},{label:"Detailed",value:"detailed"}]})}),h.jsxs(b.Card,{shadow:"md",withBorder:!0,children:[h.jsxs(b.Group,{justify:"space-between",children:[h.jsx(b.Text,{children:x0[d].title}),h.jsx(b.Tooltip,{label:x0[d].description,children:h.jsx(b.ThemeIcon,{variant:"transparent",size:"sm",style:{cursor:"pointer"},children:h.jsx(f1,{})})})]}),h.jsxs(b.Table,{withColumnBorders:!0,children:[h.jsx(b.Table.Thead,{children:h.jsx(b.Table.Tr,{children:d==="simplified"?Lk.map(P=>h.jsx(b.Table.Th,{p:4,children:P.label},P.key)):Bk.map(P=>h.jsx(b.Table.Th,{p:4,children:P.label},P.key))})}),h.jsx(b.Table.Tbody,{children:d==="simplified"?zk:Uk})]}),h.jsx(b.Button,{mt:"md",onClick:T,children:"Download"})]})]})}),u?h.jsx(b.ThemeIcon,{variant:"transparent",size:E.size,c:E.c,children:h.jsx(b.Loader,{size:"100%",color:E.c})}):h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Download",children:h.jsx(b.ActionIcon,{...E,children:h.jsx(o1,{})})})]})});Gs.displayName="Download";const rc=x.memo(({tooltipProps:e,...t})=>{const[n,o]=x.useState(!1),{refetch:s}=Oe(),a=or({onClick:()=>{o(!0),s().finally(()=>{o(!1)})},...t});return n?h.jsx(b.ThemeIcon,{variant:"transparent",size:a.size,c:a.c,children:h.jsx(b.Loader,{size:"100%",color:a.c})}):h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.refresh)??"Refresh",children:h.jsx(b.ActionIcon,{...a,children:h.jsx(p1,{})})})});rc.displayName="Refresh";const ic=x.memo(({tooltipProps:e,...t})=>{const{upload:n,refetch:o}=Oe(),[s,{toggle:a,close:u}]=Xe.useDisclosure(),[c,d]=x.useState(),[p,y]=x.useState(zo),[g,_]=x.useState(Ga),C=or({onClick:a,...t}),E=x.useCallback(async()=>{await n(c,{delimiter:p,quotechar:g})&&o(),u()},[u,p,c,o,g,n]);return h.jsxs(h.Fragment,{children:[h.jsx(b.Modal,{title:"Import data",centered:!0,opened:s,onClose:u,onExitTransitionEnd:()=>{d(null),y(zo)},children:h.jsxs(b.Stack,{children:[h.jsxs(b.Group,{grow:!0,children:[h.jsx(b.Select,{label:"Delimiter",description:"Select the delimiter used in the CSV file",value:p,onChange:y,data:Va,placeholder:"Select delimiter",leftSection:h.jsx(kd,{})}),h.jsx(b.Select,{label:"Quote character",description:"Select the quote character used in the CSV file",value:g,onChange:_,data:Ha,placeholder:"Select quote character",leftSection:h.jsx(Fd,{})})]}),h.jsx(b.FileInput,{label:"CSV file",description:"CSV file containing the data to import",value:c,onChange:d,accept:"text/csv",placeholder:"Upload CSV file",leftSection:h.jsx(l1,{}),clearable:!0,required:!0}),h.jsx(b.Group,{justify:"end",children:h.jsx(b.Button,{onClick:E,disabled:!c,children:"Upload"})})]})}),h.jsx(b.Tooltip,{...e,label:(e==null?void 0:e.label)??"Upload CSV",children:h.jsx(b.ActionIcon,{...C,children:h.jsx(g1,{})})})]})});ic.displayName="Upload";function jk({children:e,fetch:t=!0,loading:n=h.jsx(b.Center,{children:h.jsx(b.Loader,{})}),end:o=h.jsx(b.Center,{children:"End of data"}),fetchWrapper:s=b.Center,fetchWrapperProps:a}){const{streaming:u,loading:c}=Oe(),{ref:d,inViewport:p}=Xe.useInViewport(),y=x.useMemo(()=>Object.values(u.data).flat(),[u.data]),g=x.useMemo(()=>typeof e=="function"?e(y):e,[e,y]);return x.useEffect(()=>{p&&t&&u.fetch()},[p]),h.jsxs(h.Fragment,{children:[g,c&&n,u.isEnd&&o,h.jsx(s,{ref:d,id:"IS-load-trigger",mih:"1%",...a})]})}function Wk(e,t){const n=Oe(),o=Pr(),s=x.useCallback(({row:a,...u})=>h.jsx(Mn,{fallback:h.jsx(Ws,{id:a.original.id}),functionProps:{api:n,auth:o,data:a.original,mrtProps:{row:a,...u}},children:t}),[n,o,t]);return{enableEditing:!e,editDisplayMode:"modal",renderRowActions:s}}function Vk(e,t){return{enableRowSelection:!!e||!!t}}const cr=(e={},...t)=>t.reduce((n,o)=>xn(n,e[o]),{}),yo=(e,t,n=!1)=>{let o="";n&&(o+="filter");const s=n?e[0].toUpperCase():e[0].toLowerCase();return o+=s+e.slice(1),`${o}*${t}`},oc=(e="")=>{e.startsWith("filter")&&(e=e.slice(6));const[t="",n=""]=e.split("*");return{col:t,operator:n}};function Gk({col:e,colFilter:t,onClick:n,...o}){return h.jsxs(b.Menu,{shadow:"md",width:"target",...o,children:[h.jsx(b.Menu.Target,{children:h.jsx(b.Button,{children:"Add filter"})}),h.jsx(b.Menu.Dropdown,{children:t.filters.filter(s=>!s.id).map(s=>h.jsx(b.Menu.Item,{onClick:()=>n({col:e,opr:s.operator,value:""}),children:s.name},`${t.label}-${s.name}`))})]})}function Hk({col:e}){const{info:t,queryParams:n,setQueryParams:o}=Oe(),s=ja.useForm({initialValues:{filters:(n==null?void 0:n.filters)||[]}}),a=x.useMemo(()=>(t==null?void 0:t.filters[e])||{},[e,t==null?void 0:t.filters]),u=x.useMemo(()=>{var y;return((y=a==null?void 0:a.filters)==null?void 0:y.reduce((g,_)=>({...g,[_.operator]:_.name}),{}))||{}},[a==null?void 0:a.filters]),[c]=Xe.useDebouncedValue(s.getValues(),Bo);Xe.useDidUpdate(()=>{const y=c.filters.filter(g=>g.value);o({filters:y})},[c]);const d=s.getValues().filters,p=d.map((y,g)=>y.col===e&&!y.id?h.jsxs(x.Fragment,{children:[h.jsx(b.Grid.Col,{span:1.5,py:0,children:h.jsx(b.Center,{h:"100%",w:"100%",children:h.jsx(b.CloseButton,{onClick:()=>s.removeListItem("filters",g),size:"md",title:"Remove filter",variant:"outline"})})}),h.jsx(b.Grid.Col,{span:10.5,py:0,children:y.opr==="in"?h.jsx(Zu,{form:s,name:`filters.${g}.value`,label:u[y.opr],comboboxProps:{withinPortal:!1}}):h.jsx(Ru,{form:s,name:`filters.${g}.value`,label:u[y.opr],schema:a.schema,withinPortal:!1,filter:!0})}),g>=0&&g+1<d.length&&h.jsx(b.Grid.Col,{span:12,py:0,children:h.jsx(b.Divider,{my:"sm",label:"AND",align:"center"})})]},`${y.col}-${g}`):null).filter(Boolean);return h.jsxs(b.Grid,{w:p.length?"25rem":"100%",gap:"md",gutter:"xs",children:[p.length?p:h.jsx(b.Grid.Col,{span:12,children:h.jsx(b.Text,{align:"center",c:"gray",style:{fontStyle:"italic"},children:"No filters"})}),h.jsx(b.Grid.Col,{span:12,children:h.jsx(b.Stack,{children:h.jsx(Gk,{col:e,colFilter:a||{filters:[]},onClick:y=>s.insertListItem("filters",y),withinPortal:!1})})})]})}function qk({filters:e,col:t,opr:n,table:o}){const s=b.useMantineTheme();return e.map(a=>{const u=a.operator===n;return h.jsx(b.Menu.Item,{color:u?s.primaryColor:void 0,leftSection:h.jsx(b.Text,{size:"xl",ta:"center",w:"2ch",style:{transform:"translateY(-0.1em)"},children:a.name[0]}),onClick:()=>o.setColumnFilterFns(c=>({...c,[t]:yo(t,a.operator)})),value:a.opr,children:a.name},a.operator)})}function Yk({enableAdvancedFilters:e,mode:t,setMode:n,col:o,opr:s,filters:a,table:u}){return h.jsxs(h.Fragment,{children:[e&&h.jsxs(h.Fragment,{children:[h.jsx(b.Menu.Item,{component:"div",p:0,children:h.jsx(b.SegmentedControl,{fullWidth:!0,size:"sm",data:["Basic","Advanced"],value:t,onChange:n})}),h.jsx(b.Menu.Divider,{})]}),t==="Basic"&&h.jsx(qk,{filters:a,col:o,opr:s,table:u}),t==="Advanced"&&h.jsx(Hk,{col:o})]})}const bi=e=>e!=null&&e!=="",A0=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>{const{value:s,onChange:a,leftInputProps:u,rightInputProps:c,groupProps:d,cleariconprops:p,...y}=n,[g,_]=x.useState([null,null]);x.useEffect(()=>{s||_([null,null])},[s]),x.useEffect(()=>{const D=JSON.stringify(g);g.every(bi)&&D!==s?a(JSON.stringify(g)):g.every(k=>!bi(k))&&a(void 0)},[g]);const C=x.useCallback((D,k)=>{_(L=>{const J=[...L];return J[k]=D,J})},[]);let[E,T]=g;const P=bi(T)&&!bi(E),N=bi(E)&&!bi(T),X=typeof E=="number"?h.jsx(b.ActionIcon,{...p,onClick:()=>_(D=>[null,D[1]]),children:h.jsx(Nd,{})}):null,W=typeof T=="number"?h.jsx(b.ActionIcon,{...p,onClick:()=>_(D=>[D[0],null]),children:h.jsx(Nd,{})}):null;return h.jsxs(b.Group,{w:"100%",wrap:"nowrap",align:"center",gap:"xs",...d,children:[h.jsx(b.NumberInput,{ref:o,styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:X,...y,...t,value:E??"",onChange:D=>C(D,0),placeholder:P?"Start value is required":"Start value",error:P&&" ",...u}),h.jsx(b.NumberInput,{styles:{wrapper:{marginBottom:0}},hideControls:!0,rightSection:W,...y,...t,value:T??"",onChange:D=>C(D,1),placeholder:N?"End value is required":"End value",error:N&&" ",...c})]})});A0.displayName="HeaderBetweenInput";const O0=x.forwardRef(({clearIcon:e,mrtprops:{selectprops:t},...n},o)=>h.jsx(b.Select,{ref:o,data:[{value:String(!0),label:"True"},{value:String(!1),label:"False"}],...t,...n,value:Gi(n.value)?String(n.value):null,onChange:s=>n.onChange(Gi(s)?s===String(!0):void 0)}));O0.displayName="HeaderBooleanInput";const sc=e=>e==="range"?[null,null]:null,I0=(e,t)=>e==="range"?t.every(n=>n!==null):t!==null,ac=x.forwardRef(({type:e,clearIcon:t,mrtprops:{dateinputprops:n},...o},s)=>{const{value:a,onChange:u,...c}=o,[d,p]=x.useState(sc(e));return x.useEffect(()=>{p(sc(e))},[e]),x.useEffect(()=>{a||p(sc(e))},[e,a]),x.useEffect(()=>{const y=JSON.stringify(e==="range"?d.map(g=>g?g.toISOString():null):(d==null?void 0:d.toISOString())??null);I0(e,d)&&y!==a?u(y):I0(e,d)||u(void 0)},[d]),h.jsx(Wi.DatePickerInput,{ref:s,type:e,clearable:!0,valueFormat:"DD.MM.YYYY",...c,...n,value:e==="range"?Array.isArray(d)?d:[null,null]:Array.isArray(d)?null:d,onChange:p})});ac.displayName="HeaderDateInput";const P0=x.forwardRef(({data:e,clearIcon:t,mrtprops:{multiselectprops:n},placeholder:o,...s},a)=>{const u=Array.isArray(s.value)?s.value.map(c=>String(typeof c=="object"?Et(c.id):c)):[];return h.jsxs(b.Box,{...s,children:[!u.length&&h.jsx(b.TextInput,{pos:"absolute",placeholder:o,...s,value:void 0,onChange:void 0}),h.jsx(b.MultiSelect,{ref:a,styles:{pill:{maxWidth:"5rem"}},data:e,...n,...s,value:u})]})});P0.displayName="HeaderMultiSelectInput";const $0=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>h.jsx(b.NumberInput,{ref:o,rightSection:e,...t,...n,value:n.value??""}));$0.displayName="HeaderNumberInput";const lc=x.forwardRef(({data:e,clearIcon:t,mrtprops:{selectprops:n},...o},s)=>h.jsx(b.Select,{ref:s,data:e,searchable:!0,...n,...o,value:o.value??null}));lc.displayName="HeaderSelectInput";const uc=x.forwardRef(({clearIcon:e,mrtprops:{multiselectprops:t},...n},o)=>h.jsx(b.TagsInput,{ref:o,styles:{pill:{maxWidth:"5rem"}},...t,...n,value:n.value??[],onChange:s=>n.onChange(s.length?s:void 0)}));uc.displayName="HeaderTagsInput";const cc=x.forwardRef((e,t)=>{const[n,o]=x.useState();return h.jsx(uc,{ref:t,...e,searchValue:n?n.toString():"",onSearchChange:s=>{if(!s){o(void 0);return}const a=Number(s);isNaN(a)||o(a)}})});cc.displayName="HeaderTagsNumberInput";const fc=x.forwardRef(({clearIcon:e,mrtprops:{textinputprops:t},...n},o)=>h.jsx(b.TextInput,{ref:o,rightSection:e,...t,...n,value:n.value||""}));fc.displayName="HeaderTextInput";const M0=x.forwardRef(({component:e,...t},n)=>{const o=Oe(),s=Pr(),a=x.useMemo(()=>({api:o,auth:s,componentProps:{...t,ref:n}}),[o,s,t,n]);return h.jsx(Mn,{ref:n,fallback:h.jsx(fc,{...t}),functionProps:a,children:e})});M0.displayName="HeaderInput";const Kk=(e,t)=>{if(!(!e||!t)){switch(e){case"tc":return({componentProps:n})=>h.jsx(fc,{...n});case"in":switch(t.type){case"Integer":return({componentProps:n})=>h.jsx(cc,{...n});case"Enum":return({componentProps:n})=>h.jsx(cc,{data:t.values,...n})}return({componentProps:n})=>h.jsx(uc,{...n});case"bw":switch(t.type){case"Date":case"DateTime":return({componentProps:n})=>h.jsx(ac,{type:"range",...n});default:return({componentProps:n})=>h.jsx(A0,{...n})}case"eq":case"neq":switch(t.type){case"Boolean":return({componentProps:n})=>h.jsx(O0,{...n})}break;case"rel_o_m":case"nrel_o_m":return({componentProps:n})=>h.jsx(lc,{data:t.values.map(o=>({value:String(Et(o.id)),label:o.value})),...n});case"rel_m_m":case"nrel_m_m":return({componentProps:n})=>h.jsx(P0,{data:t.values.map(o=>({value:String(Et(o.id)),label:o.value})),...n})}switch(t.type){case"Integer":return({componentProps:n})=>h.jsx($0,{...n});case"Enum":return({componentProps:n})=>h.jsx(lc,{data:t.values,...n});case"Date":case"DateTime":return({componentProps:n})=>h.jsx(ac,{...n})}}},_i={root:"_root_yn5fy_1","date-filter":"_date-filter_yn5fy_5"},F0=x.forwardRef(({label:e,disabled:t,children:n,...o},s)=>t?x.cloneElement(n,{ref:s}):h.jsx(b.Tooltip,{label:e,...o,children:x.cloneElement(n,{ref:s})}));F0.displayName="FilterIconWrapper";const k0=x.forwardRef(({indicator:e,children:t,...n},o)=>{const{height:s,ref:a}=Xe.useElementSize(),u=Xe.useMergedRef(o,a);if(!e)return x.cloneElement(t,{ref:u});const c=2;//! This is the height offset between the button from ActionIcon and the icon itself
|
|
232
|
+
return h.jsx(b.Indicator,{zIndex:20,size:16,label:e,styles:{root:{height:s+c}},...n,children:x.cloneElement(t,{ref:u})})});k0.displayName="FilterIndicatorWrapper";function Jk({children:e,enableFilterModes:t,enableAdvancedFilters:n,filterProps:o,filterModeDescription:s,filterMenu:a,filters:u,filterFn:c,mrtProps:{column:d,table:p,...y}}){var ge;const{info:g,queryParams:_}=Oe(),C=Oe(),E=Pr(),T=x.useMemo(()=>{var Q,q;return(q=(Q=g==null?void 0:g.filters)==null?void 0:Q[d.id])==null?void 0:q.schema},[d.id,g==null?void 0:g.filters]),[P,N]=x.useState("Basic"),[X,{toggle:W}]=Xe.useDisclosure(),D=((ge=p.getState().columnFilterFns)==null?void 0:ge[d.id])||c,k=x.useMemo(()=>oc(D).operator,[D]),L=x.useMemo(()=>{var Q;return(Q=u==null?void 0:u.find(q=>q.operator===k))==null?void 0:Q.name},[u,k]),J=ja.useField({mode:"controlled"}),le=x.useRef(k),ne=x.useMemo(()=>(_==null?void 0:_.filters.filter(Q=>Q.id!==d.id&&Q.col===d.id).map(Q=>({...Q})))||[],[_,d.id]);le.current!==k&&(le.current=k,J.reset());const S=x.useCallback(()=>{J.reset(),d.setFilterValue(void 0)},[]),[j]=Xe.useDebouncedValue(J.getInputProps().value,Bo),re=Xe.useMounted(),ce=x.useMemo(()=>_==null?void 0:_.filters.find(Q=>Q.col===d.id&&Q.opr===k),[d.id,k,_==null?void 0:_.filters]);x.useEffect(()=>{re&&d.setFilterValue(j??void 0)},[j]),x.useEffect(()=>{if(!re)return;const Q=d.getFilterValue();Q===void 0?S():J.getInputProps().onChange(Q)},[d.getFilterValue()]),x.useEffect(()=>{re&&(ce||S())},[ce]);const he=x.useMemo(()=>{const Q={variant:"subtle"};return!(u!=null&&u.length)&&(Q.disabled=!0,Q.c="gray"),Q},[u==null?void 0:u.length]),Le=x.useMemo(()=>Ya(t?e==null?void 0:e[k]:e,Kk(k,T)),[e,t,k,T]),_e=x.useMemo(()=>({...he,variant:"transparent",c:void 0,size:"sm",onClick:S}),[he,S]),ke=x.useMemo(()=>({api:C,auth:E,mrtProps:{column:d,table:p,...y}}),[C,E,d,y,p]),De=x.useMemo(()=>({...ke,componentProps:{label:p.options.localization.changeFilterMode,disabled:!(u!=null&&u.length),indicator:ne.length,aiProps:he,onClick:W}}),[he,ne.length,u==null?void 0:u.length,ke,p.options.localization.changeFilterMode,W]),mt=x.useMemo(()=>({...ke,componentProps:{filterMode:L}}),[L,ke]),K=ct(t?cr(o,k):o,ke),Y=x.useMemo(()=>{var Q,q;return{w:"100%",variant:"unstyled",disabled:!(u!=null&&u.length),title:u.length?void 0:"No filters",placeholder:(Q=p.options.localization.filterByColumn)==null?void 0:Q.replace("{column}",String(d.columnDef.header)),"aria-label":(q=p.options.localization.filterByColumn)==null?void 0:q.replace("{column}",String(d.columnDef.header)),style:{fontWeight:"normal"},mrtprops:{column:d,table:p,...y,textinputprops:{className:Ir("mrt-filter-text-input",_i.root),...ct(p.mantineFilterTextInputProps,[{column:d,table:p,...y}]),...ct(d.columnDef.mantineFilterTextInputProps,[{column:d,table:p,...y}])},selectprops:{className:Ir("mrt-filter-text-input",_i.root),...ct(p.mantineFilterSelectProps||{clearable:!0},{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterSelectProps,{column:d,table:p,...y})},multiselectprops:{className:Ir("mrt-filter-text-input",_i.root),...ct(p.mantineFilterMultiSelectProps||{clearable:!0},{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterMultiSelectProps,{column:d,table:p,...y})},dateinputprops:{className:Ir("mrt-filter-text-input",_i.root,_i["date-filter"]),...ct(p.mantineFilterDateInputProps,{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterDateInputProps,{column:d,table:p,...y})},autocompleteprops:{className:Ir("mrt-filter-text-input",_i.root),...ct(p.mantineFilterAutocompleteProps,{column:d,table:p,...y}),...ct(d.columnDef.mantineFilterAutocompleteProps,{column:d,table:p,...y})}},ref:H=>{H&&(p.refs.filterInputRefs.current[`${d.id}-0`]=H)},clearIcon:J.isDirty()&&h.jsx(b.CloseButton,{..._e}),...K,cleariconprops:_e}},[_e,d,K,J,u.length,y,p]);return h.jsxs(b.Menu,{opened:X,closeOnClickOutside:!0,onChange:W,children:[h.jsxs(b.Stack,{w:"100%",gap:"0.25rem",children:[h.jsxs(b.Flex,{align:"flex-end",children:[h.jsx(M0,{component:Le,field:J,...J.getInputProps(),...Y}),t&&h.jsx(b.Menu.Target,{children:h.jsx(Mn,{fallback:u.length?h.jsx(F0,{label:p.options.localization.changeFilterMode,position:"bottom-start",withArrow:!0,arrowPosition:"side",children:h.jsx(k0,{indicator:n?ne.length:void 0,children:h.jsx(b.ActionIcon,{...he,onClick:W,children:h.jsx(u1,{})})})}):null,functionProps:De,children:a})})]}),t&&h.jsx(Mn,{fallback:u.length?h.jsx(b.Input.Description,{size:"xs",children:p.options.localization.filterMode.replace("{filterType}",mn.localizedFilterOption(cr(p.options.localization,d.id),L)||mn.localizedFilterOption(p.options.localization,L)||L)}):null,functionProps:mt,children:s})]}),h.jsx(b.Menu.Dropdown,{children:h.jsx(Yk,{enableAdvancedFilters:n,mode:P,setMode:N,col:d.id,opr:k,filters:u,table:p})})]})}function Rk({highlight:e,truncate:t,children:n}){return Array.isArray(n)?n.map((o,s)=>{var a;return(a=t==null?void 0:t[s])!=null&&a.truncated?h.jsx(b.Tooltip,{label:t[s].original,children:h.jsx(b.Highlight,{highlight:e,children:t[s].truncated},s)},s):h.jsx(b.Highlight,{highlight:e,children:o},s)}):t!=null&&t.truncated?h.jsx(b.Tooltip,{label:t.original,children:h.jsx(b.Highlight,{highlight:e,children:t.truncated})}):h.jsx(b.Highlight,{highlight:e,children:n})}function Zk(e,t,n,o){const{path:s,info:a,data:u,specialKey:c}=Oe(),d=Oe(),p=Pr(),y=x.useMemo(()=>(u==null?void 0:u.list_columns.map(C=>{var ne,S,j,re,ce,he,Le;const{component:E,enableFilterModes:T,enableAdvancedFilters:P,filterComponent:N,filterProps:X,filterModeDescription:W,filterMenu:D,defaultOpr:k=((re=(j=(S=(ne=a==null?void 0:a.filters)==null?void 0:ne[C])==null?void 0:S.filters)==null?void 0:j[0])==null?void 0:re.operator)||""}=cr(t,c.all,C),L=yo(C,k),J=((he=(ce=a==null?void 0:a.filters)==null?void 0:ce[C])==null?void 0:he.filters)||[],le={};return E!==void 0&&(le.Header=_e=>ct(E,{api:d,auth:p,mrtProps:_e})),{accessorKey:C,accessorFn:_e=>Vi(_e,C),header:(Le=u==null?void 0:u.label_columns)==null?void 0:Le[C],Filter:_e=>h.jsx(Jk,{enableFilterModes:T,enableAdvancedFilters:P,filterProps:X,filterModeDescription:W,filterMenu:D,filters:J,filterFn:L,mrtProps:_e,children:N}),enableSorting:u==null?void 0:u.order_columns.includes(C),filterFn:J.length?L:void 0,columnFilterModeOptions:J.map(_e=>yo(C,_e.operator)),Cell:({cell:_e,table:ke,column:De,...mt})=>{const K=ke.getState().globalFilter,Y=De.getFilterValue()||"",{component:ge,separator:Q,truncate:q}=cr(n,c.all,C);let H=[];K&&H.push(...K.split(o).map(me=>me.trim())),Y&&typeof Y=="string"&&H.push(...Y.split(o).map(me=>me.trim()));let ee=_e.getValue();typeof ee=="number"?ee=ee.toLocaleString():ee==null&&(ee=""),Q&&(ee=ee.split(Q));let fe={};q&&(Array.isArray(ee)?fe=ee.map(me=>({original:me,truncated:me.length>q?`${me.slice(0,q)}...`:null})):fe={original:ee,truncated:ee.length>q?`${ee.slice(0,q)}...`:null});const be={api:d,auth:p,data:_e.row.original,highlight:H,componentProps:{value:ee},mrtProps:{cell:_e,table:ke,column:De,...mt}};return h.jsx(Mn,{fallback:h.jsx(Rk,{highlight:H,truncate:fe,children:ee}),functionProps:be,children:ge})},...le,...cr(e,c.all,C)}}))||[],[u==null?void 0:u.list_columns,u==null?void 0:u.label_columns,u==null?void 0:u.order_columns,a,e,c.all,d,p,t,n,o]),[g,_]=Xe.useSetState({});return x.useEffect(()=>{y.length&&_({[u.path]:y})},[y]),{columns:y.length?y:(g==null?void 0:g[s])||y,manualFiltering:!0}}function Xk(){const{data:e,loading:t}=Oe();return{data:(e==null?void 0:e.result)||[],rowCount:(e==null?void 0:e.count)||0,state:{showLoadingOverlay:t}}}function Qk(e){const{data:t}=Oe();return e?{mantineTableBodyRowProps:({row:n})=>({onClick:()=>{const o=t.ids[n.id];e(o,n.original)},style:{cursor:"pointer"}})}:null}function eD(){const{info:e}=Oe();return{filterFns:x.useMemo(()=>Object.entries((e==null?void 0:e.filters)||{}).reduce((t,[n,o])=>(o.filters.forEach(s=>t[yo(n,s.operator)]=null),t),{}),[e==null?void 0:e.filters])}}function tD(){const{queryParams:e,setQueryParams:t}=Oe(),n=x.useMemo(()=>e==null?void 0:e.global_filter,[e==null?void 0:e.global_filter]),[o,s]=x.useState(n||""),[a]=Xe.useDebouncedValue(o,Bo);return Xe.useDidUpdate(()=>{n&&n!==a&&s(n)},[n]),Xe.useDidUpdate(()=>{a?t({page:0,global_filter:a}):e!=null&&e.global_filter&&t({page:0,global_filter:void 0})},[a]),{manualFiltering:!0,onGlobalFilterChange:s,state:{globalFilter:o}}}function nD(e){const{data:t,queryParams:n,setQueryParams:o}=Oe(),s=x.useMemo(()=>({pageIndex:(n==null?void 0:n.page)||Mf,pageSize:(n==null?void 0:n.page_size)||Ff}),[n==null?void 0:n.page,n==null?void 0:n.page_size]),a=x.useCallback(u=>{const c=u(s);!(t!=null&&t.count)&&c.pageIndex===0||o({page:c.pageIndex,page_size:c.pageSize})},[t==null?void 0:t.count,s,o]);return{enablePagination:!e,manualPagination:!0,state:{pagination:s},onPaginationChange:a}}function rD(e,t){const{info:n,specialKey:o,setQueryParams:s}=Oe(),a=x.useMemo(()=>{const u=[];return e.getState().columnFilters.forEach(({id:c,value:d})=>{var _,C,E,T,P;const{updateQueryParams:p=!0,defaultOpr:y=((T=(E=(C=(_=n==null?void 0:n.filters)==null?void 0:_[c])==null?void 0:C.filters)==null?void 0:E[0])==null?void 0:T.operator)||""}=cr(t,o.all,c);if(!p)return;let g=(P=e.getState().columnFilterFns)==null?void 0:P[c];g?g=oc(g).operator:g=y,u.push({id:c,col:c,opr:g,value:d})}),u},[o.all,e.getState().columnFilters]);Xe.useDidUpdate(()=>{s(u=>({...u,filters:[...(u==null?void 0:u.filters.filter(c=>!c.id))??[],...a]}))},[a])}function iD(e){const{ref:t,height:n}=Xe.useElementSize(),{ref:o,height:s}=Xe.useElementSize(),a=x.useMemo(()=>{const p={h:"100%",withBorder:e};return e||(p.shadow=void 0),p},[e]),u=x.useMemo(()=>({ref:o}),[o]),c=x.useMemo(()=>({ref:t,pos:"sticky",bottom:0}),[t]),d=x.useMemo(()=>({h:`calc(100% - ${s+n}px)`}),[s,n]);return{mantinePaperProps:a,mantineTopToolbarProps:u,mantineBottomToolbarProps:c,mantineTableContainerProps:d}}function oD(){const{queryParams:e,setQueryParams:t,data:n}=Oe(),o=x.useMemo(()=>e!=null&&e.order_column?[{id:e.order_column,desc:e.order_direction==="desc"}]:[],[e==null?void 0:e.order_column,e==null?void 0:e.order_direction]),s=x.useCallback(a=>{const u=a(o);if(!u.length){t({order_column:null,order_direction:null});return}const c=u[0];t({order_column:n.order_columns.includes(c.id)?c.id:`${c.id}.id`,order_direction:c.desc?"desc":"asc"})},[n==null?void 0:n.order_columns,t,o]);return{manualSorting:!0,state:{sorting:o},onSortingChange:s}}function sD(e,t){return{toggleGlobalFilter:h.jsx(mn.MRT_ToggleGlobalFilterButton,{table:e,disabled:!1},"basic-toggleGlobalFilter"),filter:h.jsx(mn.MRT_ToggleFiltersButton,{table:e},"basic-filter"),refresh:h.jsx(rc,{tooltipProps:{label:e.options.localization.refresh}},"basic-refresh"),add:(t==null?void 0:t.add)&&h.jsx(Vs,{tooltipProps:{label:e.options.localization.add}},"basic-add"),download:(t==null?void 0:t.download)&&h.jsx(Gs,{tooltipProps:{label:e.options.localization.download}},"basic-download"),upload:(t==null?void 0:t.upload)&&h.jsx(ic,{tooltipProps:{label:e.options.localization.upload}},"basic-upload"),showHideColumns:h.jsx(mn.MRT_ShowHideColumnsButton,{table:e},"basic-showHideColumns"),toggleDensePadding:h.jsx(mn.MRT_ToggleDensePaddingButton,{table:e},"basic-toggleDensePadding"),toggleFullScreen:h.jsx(mn.MRT_ToggleFullScreenButton,{table:e},"basic-toggleFullScreen")}}function D0(e,t,n,o){Object.entries(e||{}).forEach(([a,u])=>{a in t&&(t[a]=h.jsx(Mn,{fallback:t[a],functionProps:n,children:u},`custom-${a}`))});let s=Object.values(t);return Object.entries(o||{}).forEach(([a,u])=>{a=Number(a)-1;const c=h.jsx(Mn,{functionProps:n,children:u},`order-${a}`);a>s.length?s.push(c):s=[...s.slice(0,a),c,...s.slice(a)]}),h.jsx(b.Flex,{gap:"0.125rem",align:"center",children:s})}function aD(e={},t,n){const{info:o,queryParams:s,setQueryParams:a}=Oe(),u=Oe(),c=Pr(),{customizer:d,custom:p,leftToolbar:y}=e,g=x.useMemo(()=>t?[{label:"All",value:"[]"},...t.map(E=>({label:E.name,value:JSON.stringify(E.value)}))]:[],[t]),_=x.useMemo(()=>g.length?h.jsx(b.SegmentedControl,{value:JSON.stringify((s==null?void 0:s.filters)||[]),onChange:E=>a({filters:JSON.parse(E)}),data:g}):null,[s==null?void 0:s.filters,g,a]);return{renderToolbarInternalActions:x.useCallback(({table:E})=>{const T={api:u,auth:c,mrtProps:{table:E}},P={add:o==null?void 0:o.permissions.includes("can_post"),download:o==null?void 0:o.permissions.includes("can_download"),upload:o==null?void 0:o.permissions.includes("can_upload")},N=sD(E,P);return D0(d,N,T,p)},[u,c,p,d,o==null?void 0:o.permissions]),enableTopToolbar:!n,enableFilters:(d==null?void 0:d.filter)!==null,...x.useMemo(()=>{if(_&&y)throw new Error("quickFilters and toolbar.leftToolbar are mutually exclusive, please use only one of them");const E={};if(_&&(E.renderTopToolbarCustomActions=()=>h.jsx(b.Group,{justify:"space-between",children:h.jsx(b.Box,{children:_})}),E.positionToolbarAlertBanner="bottom"),y){const{custom:T}=y;E.renderTopToolbarCustomActions=({table:P})=>D0(void 0,{},{api:u,auth:c,mrtProps:{table:P}},T),E.positionToolbarAlertBanner="bottom"}return E},[u,c,y,_])}}const N0={"toolbar-alert":"_toolbar-alert_bw71q_25","head-overlay":"_head-overlay_bw71q_28"},lD=({alertBanner:e,table:t,...n})=>{var _e,ke;const{getFilteredSelectedRowModel:o,getPrePaginationRowModel:s,getState:a,resetRowSelection:u,options:{enableRowSelection:c,enableSelectAll:d,icons:{IconX:p},localization:y,mantineToolbarAlertBannerBadgeProps:g,mantineToolbarAlertBannerProps:_,manualPagination:C,positionToolbarAlertBanner:E,rowCount:T}}=t,{density:P,grouping:N,rowSelection:X}=a(),{left:W,right:D,renderToolbarAlertBannerContent:k,wrapperProps:L}=e??{},{flex:J,group:le,stack:ne}=L??{},S={...ct(_,{table:t}),...n},j=ct(g,{table:t}),re=T??s().flatRows.length,ce=x.useMemo(()=>C?Object.values(X).filter(Boolean).length:o().rows.length,[X,re,C]),he=ce?h.jsxs(b.Flex,{align:"center",gap:"sm",children:[(ke=(_e=y.selectedCountOfRowCountRowsSelected)==null?void 0:_e.replace("{selectedCount}",ce.toString()))==null?void 0:ke.replace("{rowCount}",re.toString()),h.jsx(b.Button,{onClick:u,size:"compact-xs",variant:"subtle",children:y.clearSelection}),h.jsx(b.Button,{onClick:De=>mn.getMRT_SelectAllHandler({table:t})(De,!1,!0),size:"compact-xs",variant:"subtle",children:y.clearSelectionOnThisPage??"Clear selection on this page"})]}):null,Le=N.length>0?h.jsxs(b.Group,{gap:"xs",children:[y.groupedBy,N.map((De,mt)=>h.jsxs(x.Fragment,{children:[mt>0?y.thenBy:"",h.jsxs(b.Badge,{className:"alert-badge",rightSection:h.jsx(b.ActionIcon,{color:"white",onClick:()=>t.getColumn(De).toggleGrouping(),size:"xs",variant:"subtle",children:h.jsx(p,{style:{transform:"scale(0.8)"}})}),variant:"filled",...j,children:[t.getColumn(De).columnDef.header," "]})]},`${mt}-${De}`))]}):null;return h.jsxs(b.Flex,{className:Ir(N0["toolbar-alert"],E==="head-overlay"&&N0["head-overlay"],P),...J,children:[c&&d&&E==="head-overlay"&&h.jsx(mn.MRT_SelectCheckbox,{table:t}),h.jsxs(b.Group,{align:"flex-start",gap:"xs",...le,children:[ct(W,{table:t}),Ya(ct(k,{selectedAlert:he,groupedAlert:Le,table:t}),h.jsxs(b.Stack,{gap:"xs",...ne,children:[S==null?void 0:S.children,he,Le]})),ct(D,{table:t})]})]})};function uD(e){const{alertBanner:t}=e;return{renderToolbarAlertBannerContent:({table:n})=>h.jsx(lD,{alertBanner:t,table:n})}}const cD={enableStickyHeader:!0,enableColumnPinning:!0},L0=x.forwardRef((e,t)=>{var Je,Nt,fr;const{info:n,data:o,queryParams:s,refetch:a,specialKey:u}=Oe(),c=b.useProps("NextGenDataGrid",{},{}),{fetchOnMount:d=!0,hideToolbar:p,hideActions:y,hidePagination:g,hideError:_,onSelectCheckbox:C,onClickEntry:E,bulkActions:T,table:P,quickFilters:N,withBorder:X,columnProps:W,header:D,body:k,form:L,toolbar:J={},textFilterSeparator:le=";",bodySeparator:ne,bodyTruncate:S,headerCustomizer:j,bodyCustomizer:re,toolbarCustomizer:ce,hideAdd:he,hideDownload:Le,hideFilter:_e,...ke}=x.useMemo(()=>xn(c,e),[e,c]);ne&&Object.keys(k).forEach(Te=>{k[Te]=k[Te]||{},k[Te].separator=k[Te].separator||ne}),S&&Object.keys(k).forEach(Te=>{k[Te]=k[Te]||{},k[Te].truncate=k[Te].truncate||S}),j&&Object.keys(j).forEach(Te=>{D[Te]=D[Te]||{},D[Te].component=j[Te].component||j[Te]}),re&&Object.keys(re).forEach(Te=>{k[Te]=k[Te]||{},k[Te].component=re[Te].component||re[Te]}),ce&&(J.custom=J.custom||ce),he&&(J.customizer=J.customizer||{},J.customizer.add=J.customizer.add||null),Le&&(J.customizer=J.customizer||{},J.customizer.download=J.customizer.download||null),_e&&(J.customizer=J.customizer||{},J.customizer.filter=J.customizer.filter||null),x.useEffect(()=>{process.env.NODE_ENV==="development"&&(ne&&console.warn("bodySeparator is deprecated, please use body.[col].separator instead"),S&&console.warn("bodyTruncate is deprecated, please use body.[col].truncate instead"),j&&console.warn("headerCustomizer is deprecated, please use header.[col].component instead"),re&&console.warn("bodyCustomizer is deprecated, please use body.[col].component instead"),ce&&console.warn("toolbarCustomizer is deprecated, please use toolbar.custom instead"),he&&console.warn("hideAdd is deprecated, please use toolbar.customizer.add instead"),Le&&console.warn("hideDownload is deprecated, please use toolbar.customizer.download instead"),_e&&console.warn("hideFilter is deprecated, please use toolbar.customizer.filter instead"))},[]);const De=Xk(),mt=oD(),K=nD(g),Y=Zk(W,D,k,le),ge=iD(X),Q=Wk(y,(Je=cr(k,u.actions))==null?void 0:Je.component),q=tD(),H=aD(J,N,p),ee=Qk(E),fe=Vk(C,T),be=eD(),me=uD(J),xe=x.useMemo(()=>xn(cD,{mantinePaperProps:{ref:t},getRowId:Te=>Te.id},Y,De,mt,K,ge,Q,q,H,ee,fe,be,me,P),[t,Y,De,mt,K,ge,Q,q,H,ee,fe,be,me,P]),qe=mn.useMantineReactTable(xe);rD(qe,D),x.useEffect(()=>{!s&&d&&a()},[]),x.useEffect(()=>{C==null||C(Object.keys(qe.getState().rowSelection)),T==null||T.setSelectedIds(Object.keys(qe.getState().rowSelection))},[T,o==null?void 0:o.ids,qe.getState().rowSelection,C]);const{setView:te}=zn("add"),{setView:yt}=zn("edit");return x.useEffect(()=>{var Te,Fn;(Te=L==null?void 0:L.add)!=null&&Te.initialView&&te(L.add.initialView),(Fn=L==null?void 0:L.edit)!=null&&Fn.initialView&&yt(L.edit.initialView)},[]),h.jsxs(b.Box,{h:"100%",w:"100%",pos:"relative",children:[h.jsxs(Qu,{cond:!!n,children:[h.jsx(nc,{jsonForms:L==null?void 0:L.add,...(Nt=L==null?void 0:L.add)==null?void 0:Nt.dialogProps}),h.jsx(Lu,{jsonForms:L==null?void 0:L.edit,...(fr=L==null?void 0:L.edit)==null?void 0:fr.dialogProps})]}),h.jsx(mn.MantineReactTable,{table:qe,...ke}),_?null:h.jsx(Bu,{})]})});L0.displayName="NextGenDataGrid";const dc={iconSmall:"_iconSmall_sxv3z_1",btn:"_btn_sxv3z_17"};function fD({basePath:e="/security",Target:t,children:n}){const o=If.useNavigate(),{user:s,signout:a}=Pr(),[u,c]=x.useState(!1),p=[{resource_name:e+"/users",label:"Users",name:"UsersApi",Icon:m1},{resource_name:e+"/roles",label:"Roles",name:"RolesApi",Icon:c1},{resource_name:e+"/permissions",label:"Base Permissions",name:"PermissionsApi",Icon:Md},{resource_name:e+"/permissionviews",label:"Permission on Views",name:"PermissionViewApi",Icon:Md},{resource_name:e+"/viewsmenus",label:"Views/Menus",name:"ViewsMenusApi",Icon:i1}].filter(y=>s.permissions.includes(y.name));return h.jsxs(b.Menu,{width:260,position:"bottom-end",transition:"pop-top-right",withinPortal:!0,opened:u,onClose:()=>c(!1),onOpen:()=>c(!0),children:[h.jsx(b.Menu.Target,{children:t||h.jsx(b.UnstyledButton,{className:dc.btn,style:{borderRadius:4},p:"xs",children:h.jsxs(b.Group,{style:{flexWrap:"nowrap"},spacing:7,children:[h.jsx(b.Text,{weight:500,size:"sm",style:{lineHeight:1,whiteSpace:"nowrap"},mr:3,children:`${s.first_name} ${s.last_name}`}),h.jsx(Sl,{size:12})]})})}),h.jsxs(b.Menu.Dropdown,{children:[p.length?h.jsxs(h.Fragment,{children:[h.jsx(b.Menu.Label,{children:"Security"}),p.map((y,g)=>h.jsx(b.Menu.Item,{p:12,leftSection:h.jsx(y.Icon,{className:dc.iconSmall}),onClick:()=>o(y.resource_name),children:y.label},g)),h.jsx(b.Menu.Divider,{})]}):null,n,h.jsx(b.Menu.Item,{leftSection:h.jsx(d1,{p:12,className:dc.iconSmall}),onClick:a,children:"Logout"})]})]})}O.Actions=Ws,O.Add=Vs,O.AddDialog=nc,O.AlertDialog=Bd,O.ApiContext=Wa,O.ApiProvider=Id,O.AuthContext=Ka,O.Body=p0,O.BulkActionsContext=Ra,O.CommonModal=ku,O.DEBOUNCE_DELAY=Bo,O.DEFAULT_DELIMITER=zo,O.DEFAULT_PAGE=Mf,O.DEFAULT_PAGE_SIZE=Ff,O.DEFAULT_QUOTECHAR=Ga,O.DELIMITER_DATA=Va,O.DataGrid=ec,O.Delete=El,O.DeleteDialog=sp,O.Download=Gs,O.Edit=xl,O.EditDialog=Lu,O.ErrorDialog=Bu,O.FallbackWrapper=Mn,O.Field=go,O.FieldTitle=js,O.Filter=S0,O.FilterMenu=T0,O.FormAutocomplete=Mk,O.FormContextAdd=Za,O.FormContextEdit=Xa,O.FormDatePicker=y0,O.FormDateTimePicker=v0,O.FormField=Ru,O.FormFilterIn=Zu,O.FormGeometryField=b0,O.FormJsonField=Ku,O.FormRelatedListSelect=_0,O.FormRelatedSelect=w0,O.FormSelect=Ju,O.FormTextField=mo,O.Header=qu,O.InfiniteScroll=jk,O.InfoContext=Ja,O.LazyLoadWrapper=Qu,O.Main=m0,O.MantineArrayControlRenderer=gm,O.MantineBooleanCell=Hh,O.MantineBooleanControl=Sm,O.MantineBooleanInput=Rl,O.MantineDateCell=Yh,O.MantineDateControl=Em,O.MantineDateInput=Zl,O.MantineDateTimeCell=Jh,O.MantineDateTimeControl=Am,O.MantineDateTimeInput=Xl,O.MantineEnumArrayInput=jh,O.MantineEnumArrayRenderer=bm,O.MantineEnumCell=Zh,O.MantineEnumControl=Im,O.MantineEnumInput=Ql,O.MantineGroupLayoutRenderer=Vm,O.MantineGroupLayoutTester=Wm,O.MantineHorizontalLayoutRenderer=Hm,O.MantineIntegerCell=Qh,O.MantineIntegerControl=$m,O.MantineJsonControl=Fm,O.MantineJsonInput=Wh,O.MantineLabelRenderer=jm,O.MantineLabelTester=Um,O.MantineLayoutRenderer=us,O.MantineNumberCell=tp,O.MantineNumberControl=Dm,O.MantineNumberInput=eo,O.MantineObjectControl=wm,O.MantineObjectControlTester=_m,O.MantineObjectInput=Vh,O.MantineOneOfEnumCell=rp,O.MantineOneOfEnumControl=Lm,O.MantineOneOfEnumInput=eu,O.MantineTableControl=hm,O.MantineTextCell=op,O.MantineTextControl=zm,O.MantineTextInput=tu,O.MantineVerticalLayoutRenderer=Ym,O.NextGenDataGrid=L0,O.NoBorderTableCell=vi,O.NonEmptyRow=dm,O.Pagination=Yu,O.Provider=cb,O.QUOTECHAR_DATA=Ha,O.Refresh=rc,O.Row=h0,O.TableToolbar=am,O.Toolbar=Xu,O.Upload=ic,O.UserMenu=fD,O.VIEW_MODE=gt,O.ValidationIcon=sm,O.View=tc,O.ViewDialog=C0,O.authInfo=jf,O.authOAuthSignin=Uf,O.authResetPassword=zf,O.authSignin=Lf,O.authSignout=Bf,O.compareStateWithStore=Df,O.convertId=Et,O.convertInfo=xd,O.convertLocalToUTCISOString=Jl,O.convertToFormInputs=Rm,O.convertUTCISOStringToLocal=Nh,O.createFetchParams=_t,O.createItem=Yf,O.createProxy=Uo,O.createQueryParams=Yi,O.deepMerge=xn,O.deleteItem=Kf,O.downloadItems=Jf,O.fromFilterFnToFilter=oc,O.fromFilterToFilterFn=yo,O.getDefaultValues=Qa,O.getInfo=Rf,O.getItem=Zf,O.getItems=Xf,O.getProps=cr,O.getUser=Wf,O.getValidationSchema=wl,O.getValue=Vi,O.getValueOrDefault=Ya,O.initialState=jo,O.isEnumArrayControl=mm,O.isJsonControl=ym,O.isSchemaTypeInclude=sr,O.isTruthy=Gi,O.mantineArrayControlTester=pm,O.mantineBooleanCellTester=Gh,O.mantineBooleanControlTester=Tm,O.mantineCells=Km,O.mantineDateCellTester=qh,O.mantineDateControlTester=Cm,O.mantineDateTimeCellTester=Kh,O.mantineDateTimeControlTester=xm,O.mantineEnumArrayRendererTester=vm,O.mantineEnumCellTester=Rh,O.mantineEnumControlTester=Om,O.mantineHorizontalLayoutTester=Gm,O.mantineIntegerCellTester=Xh,O.mantineIntegerControlTester=Pm,O.mantineJsonControlTester=Mm,O.mantineNumberCellTester=ep,O.mantineNumberControlTester=km,O.mantineOneOfEnumCellTester=np,O.mantineOneOfEnumControlTester=Nm,O.mantineRenderers=Jm,O.mantineTextCellTester=ip,O.mantineTextControlTester=Bm,O.mantineVerticalLayoutTester=qm,O.normalProps=Du,O.normalize=kf,O.overlayProps=Nu,O.parseFromValuesOrFunc=ct,O.parseValue=qa,O.postBulk=td,O.updateItem=Qf,O.updateUser=Vf,O.uploadItems=ed,O.urlJoin=ot,O.useActionIcon=or,O.useApi=Oe,O.useAuth=Pr,O.useBooleanProps=uh,O.useBulkActions=fb,O.useCommonProps=In,O.useContextProps=bn,O.useCustomFetch=y1,O.useDateProps=cs,O.useDebouncedChange=dw,O.useForms=zn,O.useInfo=Nf,O.useJsonProps=Lh,O.useMultiSelectProps=Bh,O.useNumberProps=zh,O.useProvideApi=Ad,O.useProvideAuth=Gf,O.useProvideBulk=Od,O.useProvideForm=Tl,O.useProvideInfo=Hf,O.useProxy=Hi,O.useSelectProps=fs,O.useTextProps=Uh,O.useTrueOnce=Ld,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|