fastadmin 0.2.12__tar.gz → 0.2.13__tar.gz

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.
Files changed (42) hide show
  1. {fastadmin-0.2.12 → fastadmin-0.2.13}/PKG-INFO +1 -1
  2. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/static/index.min.js +1 -1
  3. {fastadmin-0.2.12 → fastadmin-0.2.13}/pyproject.toml +1 -1
  4. {fastadmin-0.2.12 → fastadmin-0.2.13}/LICENSE +0 -0
  5. {fastadmin-0.2.12 → fastadmin-0.2.13}/README.md +0 -0
  6. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/__init__.py +0 -0
  7. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/__init__.py +0 -0
  8. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/exceptions.py +0 -0
  9. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/__init__.py +0 -0
  10. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/django/__init__.py +0 -0
  11. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/django/app/__init__.py +0 -0
  12. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/django/app/api.py +0 -0
  13. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/django/app/urls.py +0 -0
  14. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/django/app/views.py +0 -0
  15. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/fastapi/__init__.py +0 -0
  16. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/fastapi/api.py +0 -0
  17. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/fastapi/app.py +0 -0
  18. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/fastapi/views.py +0 -0
  19. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/flask/__init__.py +0 -0
  20. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/flask/api.py +0 -0
  21. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/flask/app.py +0 -0
  22. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/frameworks/flask/views.py +0 -0
  23. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/helpers.py +0 -0
  24. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/schemas.py +0 -0
  25. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/api/service.py +0 -0
  26. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/__init__.py +0 -0
  27. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/base.py +0 -0
  28. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/decorators.py +0 -0
  29. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/helpers.py +0 -0
  30. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/orms/__init__.py +0 -0
  31. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/orms/django.py +0 -0
  32. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/orms/ponyorm.py +0 -0
  33. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/orms/sqlalchemy.py +0 -0
  34. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/orms/tortoise.py +0 -0
  35. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/models/schemas.py +0 -0
  36. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/settings.py +0 -0
  37. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/static/images/favicon.png +0 -0
  38. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/static/images/header-logo.svg +0 -0
  39. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/static/images/sign-in-logo.svg +0 -0
  40. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/static/index.html +0 -0
  41. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/static/index.min.css +0 -0
  42. {fastadmin-0.2.12 → fastadmin-0.2.13}/fastadmin/templates/index.html +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastadmin
3
- Version: 0.2.12
3
+ Version: 0.2.13
4
4
  Summary: FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Flask/Django inspired by Django Admin.
5
5
  Home-page: https://github.com/vsdudakov/fastadmin
6
6
  License: MIT
@@ -510,7 +510,7 @@ html body {
510
510
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[NX]=this[NX]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=f1(a);r[s]||(M9e(i,a),r[s]=!0)}return Ye.isArray(t)?t.forEach(o):o(t),this}}ba.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ye.reduceDescriptors(ba.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Ye.freezeMethods(ba);function dR(e,t){const n=this||u1,r=t||n,i=ba.from(r.headers);let o=r.data;return Ye.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function AX(e){return!!(e&&e.__CANCEL__)}function Zv(e,t,n){En.call(this,e==null?"canceled":e,En.ERR_CANCELED,t,n),this.name="CanceledError"}Ye.inherits(Zv,En,{__CANCEL__:!0});function LX(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new En("Request failed with status code "+n.status,[En.ERR_BAD_REQUEST,En.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function T9e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function I9e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[o];a||(a=c),n[i]=l,r[i]=c;let f=o,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a<t)return;const h=u&&c-u;return h?Math.round(d*1e3/h):void 0}}function R9e(e,t){let n=0,r=1e3/t,i,o;const a=(c,u=Date.now())=>{n=u,i=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?a(c,u):(i=c,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const BC=(e,t,n=3)=>{let r=0;const i=I9e(50,250);return R9e(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=a-r,c=i(l),u=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},jX=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},DX=e=>(...t)=>Ye.asap(()=>e(...t)),k9e=hl.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const s=Ye.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),N9e=hl.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];Ye.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Ye.isString(r)&&a.push("path="+r),Ye.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function A9e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function L9e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function FX(e,t){return e&&!A9e(t)?L9e(e,t):t}const BX=e=>e instanceof ba?Le({},e):e;function rh(e,t){t=t||{};const n={};function r(c,u,f){return Ye.isPlainObject(c)&&Ye.isPlainObject(u)?Ye.merge.call({caseless:f},c,u):Ye.isPlainObject(u)?Ye.merge({},u):Ye.isArray(u)?u.slice():u}function i(c,u,f){if(Ye.isUndefined(u)){if(!Ye.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function o(c,u){if(!Ye.isUndefined(u))return r(void 0,u)}function a(c,u){if(Ye.isUndefined(u)){if(!Ye.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u)=>i(BX(c),BX(u),!0)};return Ye.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=l[u]||i,d=f(e[u],t[u],u);Ye.isUndefined(d)&&f!==s||(n[u]=d)}),n}const zX=e=>{const t=rh({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=ba.from(a),t.url=TX(FX(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(Ye.isFormData(n)){if(hl.hasStandardBrowserEnv||hl.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(hl.hasStandardBrowserEnv&&(r&&Ye.isFunction(r)&&(r=r(t)),r||r!==!1&&k9e(t.url))){const c=i&&o&&N9e.read(o);c&&a.set(i,c)}return t},j9e=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const i=zX(e);let o=i.data;const a=ba.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=i,u,f,d,h,p;function v(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function m(){if(!g)return;const x=ba.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),w={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:x,config:e,request:g};LX(function(O){n(O),v()},function(O){r(O),v()},w),g=null}"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(m)},g.onabort=function(){g&&(r(new En("Request aborted",En.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new En("Network Error",En.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const w=i.transitional||RX;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new En(S,w.clarifyTimeoutError?En.ETIMEDOUT:En.ECONNABORTED,e,g)),g=null},o===void 0&&a.setContentType(null),"setRequestHeader"in g&&Ye.forEach(a.toJSON(),function(S,w){g.setRequestHeader(w,S)}),Ye.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),c&&([d,p]=BC(c,!0),g.addEventListener("progress",d)),l&&g.upload&&([f,h]=BC(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(u=x=>{g&&(r(!x||x.type?new Zv(null,e,g):x),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const y=T9e(i.url);if(y&&hl.protocols.indexOf(y)===-1){r(new En("Unsupported protocol "+y+":",En.ERR_BAD_REQUEST,e));return}g.send(o||null)})},D9e=(e,t)=>{let n=new AbortController,r;const i=function(l){if(!r){r=!0,a();const c=l instanceof Error?l:this.reason;n.abort(c instanceof En?c:new Zv(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{i(new En(`timeout ${t} of ms exceeded`,En.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",i):l.unsubscribe(i))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",i));const{signal:s}=n;return s.unsubscribe=a,[s,()=>{o&&clearTimeout(o),o=null}]},F9e=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},B9e=function(e,t,n){return Wve(this,null,function*(){try{for(var r=Vve(e),i,o,a;i=!(o=yield new qm(r.next())).done;i=!1){const s=o.value;yield*yj(F9e(ArrayBuffer.isView(s)?s:yield new qm(n(String(s))),t))}}catch(o){a=[o]}finally{try{i&&(o=r.return)&&(yield new qm(o.call(r)))}finally{if(a)throw a[0]}}})},HX=(e,t,n,r,i)=>{const o=B9e(e,t,i);let a=0,s,l=u=>{s||(s=!0,r&&r(u))};return new ReadableStream({pull(u){return Oi(this,null,function*(){try{const{done:f,value:d}=yield o.next();if(f){l(),u.close();return}let h=d.byteLength;if(n){let p=a+=h;n(p)}u.enqueue(new Uint8Array(d))}catch(f){throw l(f),f}})},cancel(u){return l(u),o.return()}},{highWaterMark:2})},zC=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",WX=zC&&typeof ReadableStream=="function",hR=zC&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):e=>Oi(this,null,function*(){return new Uint8Array(yield new Response(e).arrayBuffer())})),VX=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},z9e=WX&&VX(()=>{let e=!1;const t=new Request(hl.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),UX=64*1024,pR=WX&&VX(()=>Ye.isReadableStream(new Response("").body)),HC={stream:pR&&(e=>e.body)};zC&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!HC[t]&&(HC[t]=Ye.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new En(`Response type '${t}' is not supported`,En.ERR_NOT_SUPPORT,r)})})})(new Response);const H9e=e=>Oi(this,null,function*(){if(e==null)return 0;if(Ye.isBlob(e))return e.size;if(Ye.isSpecCompliantForm(e))return(yield new Request(e).arrayBuffer()).byteLength;if(Ye.isArrayBufferView(e)||Ye.isArrayBuffer(e))return e.byteLength;if(Ye.isURLSearchParams(e)&&(e=e+""),Ye.isString(e))return(yield hR(e)).byteLength}),W9e=(e,t)=>Oi(this,null,function*(){const n=Ye.toFiniteNumber(e.getContentLength());return n==null?H9e(t):n}),vR={http:d9e,xhr:j9e,fetch:zC&&(e=>Oi(this,null,function*(){let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:d}=zX(e);c=c?(c+"").toLowerCase():"text";let[h,p]=i||o||a?D9e([i,o],a):[],v,g;const m=()=>{!v&&setTimeout(()=>{h&&h.unsubscribe()}),v=!0};let y;try{if(l&&z9e&&n!=="get"&&n!=="head"&&(y=yield W9e(u,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),O;if(Ye.isFormData(r)&&(O=C.headers.get("content-type"))&&u.setContentType(O),C.body){const[E,_]=jX(y,BC(DX(l)));r=HX(C.body,UX,E,_,hR)}}Ye.isString(f)||(f=f?"include":"omit"),g=new Request(t,un(Le({},d),{signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:f}));let x=yield fetch(g);const S=pR&&(c==="stream"||c==="response");if(pR&&(s||S)){const C={};["status","statusText","headers"].forEach($=>{C[$]=x[$]});const O=Ye.toFiniteNumber(x.headers.get("content-length")),[E,_]=s&&jX(O,BC(DX(s),!0))||[];x=new Response(HX(x.body,UX,E,()=>{_&&_(),S&&m()},hR),C)}c=c||"text";let w=yield HC[Ye.findKey(HC,c)||"text"](x,e);return!S&&m(),p&&p(),yield new Promise((C,O)=>{LX(C,O,{data:w,headers:ba.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:g})})}catch(x){throw m(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new En("Network Error",En.ERR_NETWORK,e,g),{cause:x.cause||x}):En.from(x,x&&x.code,e,g)}}))};Ye.forEach(vR,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const qX=e=>`- ${e}`,V9e=e=>Ye.isFunction(e)||e===null||e===!1,GX={getAdapter:e=>{e=Ye.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o<t;o++){n=e[o];let a;if(r=n,!V9e(n)&&(r=vR[(a=String(n)).toLowerCase()],r===void 0))throw new En(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+o]=r}if(!r){const o=Object.entries(i).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since :
511
511
  `+o.map(qX).join(`
512
512
  `):" "+qX(o[0]):"as no adapter specified";throw new En("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:vR};function gR(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zv(null,e)}function KX(e){return gR(e),e.headers=ba.from(e.headers),e.data=dR.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),GX.getAdapter(e.adapter||u1.adapter)(e).then(function(r){return gR(e),r.data=dR.call(e,e.transformResponse,r),r.headers=ba.from(r.headers),r},function(r){return AX(r)||(gR(e),r&&r.response&&(r.response.data=dR.call(e,e.transformResponse,r.response),r.response.headers=ba.from(r.response.headers))),Promise.reject(r)})}const YX="1.7.3",mR={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mR[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const XX={};mR.transitional=function(t,n,r){function i(o,a){return"[Axios v"+YX+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new En(i(a," has been removed"+(n?" in "+n:"")),En.ERR_DEPRECATED);return n&&!XX[a]&&(XX[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function U9e(e,t,n){if(typeof e!="object")throw new En("options must be an object",En.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],l=s===void 0||a(s,o,e);if(l!==!0)throw new En("option "+o+" must be "+l,En.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new En("Unknown option "+o,En.ERR_BAD_OPTION)}}const yR={assertOptions:U9e,validators:mR},gf=yR.validators;class ih{constructor(t){this.defaults=t,this.interceptors={request:new IX,response:new IX}}request(t,n){return Oi(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
513
- `+o):r.stack=o}catch(a){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=rh(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&yR.assertOptions(r,{silentJSONParsing:gf.transitional(gf.boolean),forcedJSONParsing:gf.transitional(gf.boolean),clarifyTimeoutError:gf.transitional(gf.boolean)},!1),i!=null&&(Ye.isFunction(i)?n.paramsSerializer={serialize:i}:yR.assertOptions(i,{encode:gf.function,serialize:gf.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&Ye.merge(o.common,o[n.method]);o&&Ye.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=ba.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,f=0,d;if(!l){const p=[KX.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,c),d=p.length,u=Promise.resolve(n);f<d;)u=u.then(p[f++],p[f++]);return u}d=s.length;let h=n;for(f=0;f<d;){const p=s[f++],v=s[f++];try{h=p(h)}catch(g){v.call(this,g);break}}try{u=KX.call(this,h)}catch(p){return Promise.reject(p)}for(f=0,d=c.length;f<d;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=rh(this.defaults,t);const n=FX(t.baseURL,t.url);return TX(n,t.params,t.paramsSerializer)}}Ye.forEach(["delete","get","head","options"],function(t){ih.prototype[t]=function(n,r){return this.request(rh(r||{},{method:t,url:n,data:(r||{}).data}))}}),Ye.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(rh(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}ih.prototype[t]=n(),ih.prototype[t+"Form"]=n(!0)});class bR{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Zv(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bR(function(i){t=i}),cancel:t}}}function q9e(e){return function(n){return e.apply(null,n)}}function G9e(e){return Ye.isObject(e)&&e.isAxiosError===!0}const xR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xR).forEach(([e,t])=>{xR[t]=e});function ZX(e){const t=new ih(e),n=pX(ih.prototype.request,t);return Ye.extend(n,ih.prototype,t,{allOwnKeys:!0}),Ye.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ZX(rh(e,i))},n}const Bi=ZX(u1);Bi.Axios=ih,Bi.CanceledError=Zv,Bi.CancelToken=bR,Bi.isCancel=AX,Bi.VERSION=YX,Bi.toFormData=DC,Bi.AxiosError=En,Bi.Cancel=Bi.CanceledError,Bi.all=function(t){return Promise.all(t)},Bi.spread=q9e,Bi.isAxiosError=G9e,Bi.mergeConfig=rh,Bi.AxiosHeaders=ba,Bi.formToJSON=e=>kX(Ye.isHTMLForm(e)?new FormData(e):e),Bi.getAdapter=GX.getAdapter,Bi.HttpStatusCode=xR,Bi.default=Bi;const K9e=()=>({withCredentials:!0}),WC=Bi.create(Le({baseURL:window.SERVER_URL},K9e())),Hl=e=>Oi(this,null,function*(){return(yield WC.get(e)).data}),qc=(e,t)=>Oi(this,null,function*(){return(yield WC.post(e,t)).data}),VC=(e,t)=>Oi(this,null,function*(){return(yield WC.patch(e,t)).data}),SR=e=>Oi(this,null,function*(){return(yield WC.delete(e)).data}),UC=e=>e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),ea=(e,t=!1)=>{if(t&&e.verbose_name_plural)return e.verbose_name_plural;if(e.verbose_name)return t?`${e.verbose_name}s`:e.verbose_name;const n=(e.name.match(/[A-Z][a-z]+|[0-9]+/g)||[e.name]).join(" ");return t?`${n}s`:n},d1=()=>{const[e,t]=b.useState(window.innerWidth);return b.useEffect(()=>{function n(){t(window.innerWidth)}return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e<=768},QX={site_name:"API Administration",username_field:"username",models:[],dashboard_widgets:[]},pl=ge.createContext({configuration:QX});pl.Consumer;const Y9e=({children:e})=>{var r,i;const{t}=so("ConfigurationProvider"),n=Il({queryKey:["/configuration"],queryFn:()=>Hl("/configuration"),retry:!1,refetchOnWindowFocus:!1});if(n.isLoading)return null;if(n.error){const o=n.error;return ce.jsx(aC,{status:"warning",title:"Invalid configuration. Please check your admin model classes and logs.",extra:ce.jsx(DT,{title:t("Error"),content:((i=(r=o==null?void 0:o.response)==null?void 0:r.data)==null?void 0:i.exception)||(o==null?void 0:o.message),placement:"bottom",trigger:"click",children:ce.jsx(gn,{type:"primary",children:t("Show Error")},"console")})})}return ce.jsx(pl.Provider,{value:{configuration:(n==null?void 0:n.data)||QX},children:e})},h1=ge.createContext({signedInUser:void 0,signedInUserRefetch:()=>{},signedIn:!1});h1.Consumer;const X9e=({children:e})=>{const t=Il({queryKey:["/me"],queryFn:()=>Hl("/me"),retry:!1,refetchOnWindowFocus:!1});if(t.isLoading)return null;const n=!!t.isError;return ce.jsx(h1.Provider,{value:{signedInUser:t.data,signedInUserRefetch:t.refetch,signedIn:!n},children:e})},{Header:Z9e,Sider:Q9e}=Hc,{Title:J9e}=t1,qC=({title:e,breadcrumbs:t,viewOnSite:n,headerActions:r,bottomActions:i,isLoading:o,children:a})=>{const s=Gv(),l=d1(),[c,u]=b.useState(),{model:f}=RC(),{configuration:d}=b.useContext(pl),{signedInUser:h,signedInUserRefetch:p,signedIn:v}=b.useContext(h1),{t:g}=so("CrudContainer"),{token:{colorBgContainer:m,colorPrimary:y}}=Qy.useToken();b.useEffect(()=>{v||s("/sign-in")},[s,v]);const{mutate:x}=Po({mutationFn:()=>qc("/sign-out",{}),onSuccess:()=>{p()}}),S=E=>{switch(E.key){case"dashboard":s("/");break;default:s(`/list/${E.key}`);break}},w=E=>{switch(E.key){case"sign-out":x();break}},C=[{key:"dashboard",label:g("Dashboard")},{key:"divider",type:"divider"},...d.models.filter(E=>!c||E.name.toLocaleLowerCase().includes(c==null?void 0:c.toLocaleLowerCase())).map(E=>({key:E.name,label:ea(E)}))],O=E=>u(E.target.value);return ce.jsxs(ce.Fragment,{children:[ce.jsx(YI,{defaultTitle:e,children:ce.jsx("meta",{name:"description",content:e})}),ce.jsxs(Hc,{style:{minHeight:"100vh"},children:[ce.jsx(Z9e,{style:{background:y,paddingInline:20},children:ce.jsxs(Zr,{justify:"space-between",children:[ce.jsx(Ln,{children:ce.jsxs(Ii,{children:[l&&ce.jsx(Bc,{style:{background:y},theme:"light",mode:"horizontal",defaultSelectedKeys:[f||"dashboard"],items:[{key:(h==null?void 0:h.id)||"key",icon:ce.jsx(WV,{style:{color:m}}),children:C}],onClick:S}),ce.jsx(vf,{to:"/",children:ce.jsx(Jw,{src:window.SERVER_DOMAIN+d.site_header_logo,preview:!1,height:32,alt:d.site_name,style:{marginTop:-2}})}),!l&&ce.jsx(vf,{to:"/",children:ce.jsx("span",{style:{color:m,fontSize:18,marginLeft:10},children:d.site_name})})]})}),ce.jsx(Ln,{children:ce.jsxs(Ii,{children:[!l&&ce.jsx("span",{style:{color:m,marginRight:5},children:(h||{})[d.username_field]}),ce.jsx(Bc,{style:{background:y},theme:"light",mode:"horizontal",items:[{key:(h==null?void 0:h.id)||"key",icon:ce.jsx(_De,{style:{color:m}}),children:[{key:"sign-out",label:g("Sign Out")}]}],onClick:w})]})})]})}),ce.jsxs(Hc,{children:[!l&&ce.jsxs(Q9e,{style:{background:m,borderRadius:8},children:[ce.jsx("div",{style:{padding:10},children:ce.jsx(br,{value:c,onChange:O,placeholder:g("Search By Menu"),prefix:ce.jsx(xv,{})})}),ce.jsx(Bc,{mode:"inline",theme:"light",defaultSelectedKeys:[f||"dashboard"],style:{borderRight:0,overflowY:"scroll"},items:C,onClick:S})]}),ce.jsxs(Hc,{style:{padding:16},children:[ce.jsxs(Zr,{justify:"space-between",children:[ce.jsx(Ln,{children:t}),n&&ce.jsx(Ln,{children:ce.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[ce.jsx(pDe,{})," ",g("View on site")]})})]}),ce.jsx(Iv,{title:ce.jsxs(Zr,{justify:"space-between",children:[ce.jsx(Ln,{children:ce.jsx(J9e,{style:{margin:0,marginTop:15},level:5,children:e})}),r?ce.jsx(Ln,{children:r}):null]}),style:{marginTop:16},children:ce.jsxs(Ju,{loading:o,active:!0,children:[a,i?ce.jsx(Zr,{children:ce.jsx(Ln,{children:i})}):null]})})]})]})]})]})},JX="%[a-f0-9]{2}",eZ=new RegExp("("+JX+")|([^%]+?)","gi"),tZ=new RegExp("("+JX+")+","gi");function wR(e,t){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],wR(n),wR(r))}function eFe(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(eZ)||[];for(let r=1;r<n.length;r++)e=wR(n,r).join(""),n=e.match(eZ)||[];return e}}function tFe(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=tZ.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(i){const o=eFe(n[0]);o!==n[0]&&(t[n[0]]=o)}n=tZ.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const i of r)e=e.replace(new RegExp(i,"g"),t[i]);return e}function nFe(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(t){return tFe(e)}}function rFe(e,t){const n={};if(Array.isArray(t))for(const r of t){const i=Object.getOwnPropertyDescriptor(e,r);i!=null&&i.enumerable&&Object.defineProperty(n,r,i)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){const o=e[r];t(r,o,e)&&Object.defineProperty(n,r,i)}}return n}function nZ(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];const n=e.indexOf(t);return n===-1?[]:[e.slice(0,n),e.slice(n+t.length)]}const iFe=e=>e==null,oFe=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),CR=Symbol("encodeFragmentIdentifier");function aFe(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[zi(t,e),"[",i,"]"].join("")]:[...n,[zi(t,e),"[",zi(i,e),"]=",zi(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[zi(t,e),"[]"].join("")]:[...n,[zi(t,e),"[]=",zi(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[zi(t,e),":list="].join("")]:[...n,[zi(t,e),":list=",zi(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[zi(n,e),t,zi(i,e)].join("")]:[[r,zi(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,zi(t,e)]:[...n,[zi(t,e),"=",zi(r,e)].join("")]}}function sFe(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),a=typeof r=="string"&&!o&&Gc(r,e).includes(e.arrayFormatSeparator);r=a?Gc(r,e):r;const s=o||a?r.split(e.arrayFormatSeparator).map(l=>Gc(l,e)):r===null?r:Gc(r,e);i[n]=s};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&Gc(r,e);return}const a=r===null?[]:r.split(e.arrayFormatSeparator).map(s=>Gc(s,e));if(i[n]===void 0){i[n]=a;return}i[n]=[...i[n],...a]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function rZ(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function zi(e,t){return t.encode?t.strict?oFe(e):encodeURIComponent(e):e}function Gc(e,t){return t.decode?nFe(e):e}function iZ(e){return Array.isArray(e)?e.sort():typeof e=="object"?iZ(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function oZ(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function lFe(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function aZ(e,t,n){return n==="string"&&typeof e=="string"?e:typeof n=="function"&&typeof e=="string"?n(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":n==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""||t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function OR(e){e=oZ(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function ER(e,t){t=Le({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null)},t),rZ(t.arrayFormatSeparator);const n=sFe(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replaceAll("+"," "):i;let[a,s]=nZ(o,"=");a===void 0&&(a=o),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:Gc(s,t),n(Gc(a,t),s,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null&&t.types[i]!=="string")for(const[a,s]of Object.entries(o)){const l=t.types[i]?t.types[i].replace("[]",""):void 0;o[a]=aZ(s,t,l)}else typeof o=="object"&&o!==null&&t.types[i]==="string"?r[i]=Object.values(o).join(t.arrayFormatSeparator):r[i]=aZ(o,t,t.types[i]);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const a=r[o];return i[o]=a&&typeof a=="object"&&!Array.isArray(a)?iZ(a):a,i},Object.create(null))}function sZ(e,t){if(!e)return"";t=Le({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t),rZ(t.arrayFormatSeparator);const n=a=>t.skipNull&&iFe(e[a])||t.skipEmptyString&&e[a]==="",r=aFe(t),i={};for(const[a,s]of Object.entries(e))n(a)||(i[a]=s);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(a=>{const s=e[a];return s===void 0?"":s===null?zi(a,t):Array.isArray(s)?s.length===0&&t.arrayFormat==="bracket-separator"?zi(a,t)+"[]":s.reduce(r(a),[]).join("&"):zi(a,t)+"="+zi(s,t)}).filter(a=>a.length>0).join("&")}function lZ(e,t){var i,o;t=Le({decode:!0},t);let[n,r]=nZ(e,"#");return n===void 0&&(n=e),Le({url:(o=(i=n==null?void 0:n.split("?"))==null?void 0:i[0])!=null?o:"",query:ER(OR(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:Gc(r,t)}:{})}function cZ(e,t){t=Le({encode:!0,strict:!0,[CR]:!0},t);const n=oZ(e.url).split("?")[0]||"",r=OR(e.url),i=Le(Le({},ER(r,{sort:!1})),e.query);let o=sZ(i,t);o&&(o=`?${o}`);let a=lFe(e.url);if(typeof e.fragmentIdentifier=="string"){const s=new URL(n);s.hash=e.fragmentIdentifier,a=t[CR]?s.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${a}`}function uZ(e,t,n){n=Le({parseFragmentIdentifier:!0,[CR]:!1},n);const{url:r,query:i,fragmentIdentifier:o}=lZ(e,n);return cZ({url:r,query:rFe(i,t),fragmentIdentifier:o},n)}function cFe(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return uZ(e,r,n)}const Qv=Object.freeze(Object.defineProperty({__proto__:null,exclude:cFe,extract:OR,parse:ER,parseUrl:lZ,pick:uZ,stringify:sZ,stringifyUrl:cZ},Symbol.toStringTag,{value:"Module"}));var uFe=function(e,t,n,r){var i=typeof r!="undefined"?[r,e]:[e],o=new Blob(i,{type:n||"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")window.navigator.msSaveBlob(o,t);else{var a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(o):window.webkitURL.createObjectURL(o),s=document.createElement("a");s.style.display="none",s.href=a,s.setAttribute("download",t),typeof s.download=="undefined"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(function(){document.body.removeChild(s),window.URL.revokeObjectURL(a)},200)}};const fFe=Rt(uFe);var fZ={exports:{}};(function(e,t){(function(n,r,i){e.exports=i(),e.exports.default=i()})("slugify",Ct,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(o,a){if(typeof o!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var s=r[a.locale]||{},l=a.replacement===void 0?"-":a.replacement,c=a.trim===void 0?!0:a.trim,u=o.normalize().split("").reduce(function(f,d){var h=s[d];return h===void 0&&(h=n[d]),h===void 0&&(h=d),h===l&&(h=" "),f+h.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(u=u.replace(/[^A-Za-z0-9\s]/g,"")),c&&(u=u.trim()),u=u.replace(/\s+/g,l),a.lower&&(u=u.toLowerCase()),u}return i.extend=function(o){Object.assign(n,o)},i})})(fZ);var dFe=fZ.exports;const dZ=Rt(dFe),GC=e=>/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?(?:Z|[+-]\d{2}:\d{2}))$/.test(e),hFe=e=>/^[+-]?(\d+(\.\d*)?|\.\d+)$/.test(e),Jv=e=>Array.isArray(e),_R=e=>/^(true|false)$/i.test(e),KC=e=>typeof e=="string"||e instanceof String,pFe=e=>{let t=e;if(!KC(e))try{t=JSON.stringify(e)}catch(n){return!1}try{JSON.parse(t)}catch(n){return!1}return!0},vFe=e=>{if(!KC(e))return!1;try{return dZ(e)===e}catch(t){return!1}},p1=e=>e&&(Jv(e)?e.map(p1):e.date?e.format():e),YC=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t,p1(n)])),$R=e=>{const t=YC(e),n={};for(const[r,i]of Object.entries(t)){if(Jv(i)&&i.length===2&&i.every(GC))return n[`${r}__gte`]=i[0],n[`${r}__lte`]=i[1],n;if(Jv(i))return n[`${r}__in`]=i,n;if(GC(i)||hFe(i)||_R(i))return n[r]=i,n;n[`${r}__icontains`]=i}return n},v1=e=>e==null?e:Jv(e)?e.map(v1):_R(e)?e!=="false"&&!!e:GC(e)?Lo(e):e,PR=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t,v1(n)])),gFe=(e,t,n)=>{if(e==null)return t||"-";if(Jv(e)){const r=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];return e.map((i,o)=>ce.jsx(pY,{color:r[o%r.length],children:i},i))}return _R(e)?ce.jsx(xs,{checked:e}):GC(e)?Lo(e).format(n):e};var sr=(e=>(e.Input="Input",e.InputNumber="InputNumber",e.SlugInput="SlugInput",e.EmailInput="EmailInput",e.PhoneInput="PhoneInput",e.UrlInput="UrlInput",e.PasswordInput="PasswordInput",e.TextArea="TextArea",e.RichTextArea="RichTextArea",e.JsonTextArea="JsonTextArea",e.Select="Select",e.AsyncSelect="AsyncSelect",e.AsyncTransfer="AsyncTransfer",e.Switch="Switch",e.Checkbox="Checkbox",e.TimePicker="TimePicker",e.DatePicker="DatePicker",e.DateTimePicker="DateTimePicker",e.RangePicker="RangePicker",e.RadioGroup="RadioGroup",e.CheckboxGroup="CheckboxGroup",e.Upload="Upload",e))(sr||{}),eg=(e=>(e.ChartLine="ChartLine",e.ChartArea="ChartArea",e.ChartColumn="ChartColumn",e.ChartBar="ChartBar",e.ChartPie="ChartPie",e))(eg||{}),xa=(e=>(e.Add="Add",e.Change="Change",e.Delete="Delete",e.Export="Export",e))(xa||{}),oh=(e=>(e.CSV="CSV",e.JSON="JSON",e))(oh||{});const hZ=({model:e,search:t,sortBy:n,filters:r,style:i})=>{const[o]=Yn.useForm(),{t:a}=so("ExportBtn"),[s,l]=b.useState(!1),c=Qv.stringify(Le({search:t,sort_by:n},$R(r))),{mutate:u,isPending:f}=Po({mutationFn:v=>qc(`/export/${e}?${c}`,v),onSuccess:v=>{const g=o.getFieldValue("format")===oh.JSON?JSON.stringify(v):v;fFe(g,`${e}.${o.getFieldValue("format").toLowerCase()}`),l(!1),o.resetFields(),pi.success(a("Successfully exported"))},onError:()=>{pi.error(a("Server error"))}}),d=b.useCallback(v=>u(v),[u]),h=b.useCallback(()=>l(!1),[]),p=b.useCallback(()=>l(!0),[]);return ce.jsxs(ce.Fragment,{children:[ce.jsx(gn,{style:i,loading:f,onClick:p,children:ce.jsxs(Ii,{children:[ce.jsx(BI,{}),a("Export")]})}),ce.jsxs(Qi,{width:300,open:s,onCancel:h,footer:null,title:a("Export"),children:[ce.jsx(Fl,{}),ce.jsx(Zr,{children:ce.jsx(Ln,{xs:24,children:ce.jsxs(Yn,{form:o,layout:"vertical",onFinish:d,initialValues:{limit:1e3,format:oh.CSV},children:[ce.jsx(Yn.Item,{name:"format",label:a("Format"),children:ce.jsx(Ti,{options:[{label:oh.CSV,value:oh.CSV},{label:oh.JSON,value:oh.JSON}]})}),ce.jsx(Yn.Item,{name:"limit",label:a("Max Export Count"),children:ce.jsx(I5,{style:{width:"100%"}})}),ce.jsx(Fl,{}),ce.jsx(Yn.Item,{children:ce.jsx(gn,{type:"primary",htmlType:"submit",children:ce.jsxs(Ii,{children:[ce.jsx(BI,{}),a("Export")]})})})]})})})]})]})},mFe=e=>{const[t,n]=b.useState([]);if(e.loading)return ce.jsx(tC,{});if(!e.dataSource||e.dataSource.length===0)return ce.jsx(Xi,{image:Xi.PRESENTED_IMAGE_SIMPLE});const r=e.rowKey,i=(o,a)=>{e.onChange&&e.onChange({current:o,pageSize:a},{},{},{})};return ce.jsxs(ce.Fragment,{children:[e.dataSource.map((o,a)=>{var l,c,u,f,d,h;const s=p=>{var v,g,m,y,x;if((v=e.rowSelection)!=null&&v.onChange)if(p.target.checked){const S=[...((g=e.rowSelection)==null?void 0:g.selectedRowKeys)||[],o[r]];(m=e.rowSelection)==null||m.onChange(S,[],{})}else{const S=(((y=e.rowSelection)==null?void 0:y.selectedRowKeys)||[]).filter(w=>w!==o[r]);(x=e.rowSelection)==null||x.onChange(S,[],{})}};return ce.jsx(Iv,{className:e.className,style:{marginBottom:10},children:ce.jsxs(Nv,{column:1,layout:"vertical",children:[e.rowSelection&&ce.jsx(Nv.Item,{label:ce.jsx("b",{children:"Select"}),contentStyle:{width:"100%"},children:ce.jsx(xs,{checked:(((l=e.rowSelection)==null?void 0:l.selectedRowKeys)||[]).includes(o[r]),onChange:s})},"selection"),e.expandable&&ce.jsxs(ce.Fragment,{children:[ce.jsx(Nv.Item,{label:ce.jsx("b",{children:"Expand"}),contentStyle:{width:"100%"},children:(u=(c=e.expandable)==null?void 0:c.expandIcon)==null?void 0:u.call(c,{expanded:t.includes(o[r]),onExpand:()=>{t.includes(o[r])?n(t.filter(p=>p!==o[r])):n([...t,o[r]])},record:o})},"expandable"),t.includes(o[r])&&ce.jsx(Nv.Item,{contentStyle:{width:"100%"},children:(d=(f=e.expandable)==null?void 0:f.expandedRowRender)==null?void 0:d.call(f,o,a,0,!0)},"expandable")]}),(h=e.columns)==null?void 0:h.map(p=>ce.jsx(Nv.Item,{label:ce.jsx("b",{children:p.title}),contentStyle:{width:"100%"},children:p.render?p.render(p.dataIndex?o[p.dataIndex]:o,o):o[p.dataIndex]},p.title))]})},o[r])}),e.pagination&&ce.jsx(G5,un(Le({},e.pagination),{onChange:i}))]})},pZ=e=>{var n;return d1()?ce.jsx(mFe,Le({},e)):ce.jsx(Vc,Le({sticky:!0,scroll:{x:(((n=e.columns)==null?void 0:n.length)||0)>7?1800:1200}},e))},vl=(e,t)=>{var a,s,l,c;const n=((s=(a=e==null?void 0:e.response)==null?void 0:a.data)==null?void 0:s.detail)||((c=(l=e==null?void 0:e.response)==null?void 0:l.data)==null?void 0:c.description);if(!Array.isArray(n)){typeof n=="string"||n instanceof String?pi.error(n):pi.error("Server error");return}const r={};for(const u of n){const f=(u==null?void 0:u.loc)||[],d=f[f.length-1];!d||!(u!=null&&u.msg)||(r[d]=[u==null?void 0:u.msg])}if(!t){pi.error("Server error");return}const i=[],o=Object.keys(t.getFieldsValue()).filter(u=>u in r);for(const u of o)i.push({name:u,errors:r[u]});i.length>0&&t.setFields(i)};var yFe="Expected a function",vZ=NaN,bFe="[object Symbol]",xFe=/^\s+|\s+$/g,SFe=/^[-+]0x[0-9a-f]+$/i,wFe=/^0b[01]+$/i,CFe=/^0o[0-7]+$/i,OFe=parseInt,EFe=typeof Ct=="object"&&Ct&&Ct.Object===Object&&Ct,_Fe=typeof self=="object"&&self&&self.Object===Object&&self,$Fe=EFe||_Fe||Function("return this")(),PFe=Object.prototype,MFe=PFe.toString,TFe=Math.max,IFe=Math.min,MR=function(){return $Fe.Date.now()};function RFe(e,t,n){var r,i,o,a,s,l,c=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(yFe);t=gZ(t)||0,TR(n)&&(u=!!n.leading,f="maxWait"in n,o=f?TFe(gZ(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function h(C){var O=r,E=i;return r=i=void 0,c=C,a=e.apply(E,O),a}function p(C){return c=C,s=setTimeout(m,t),u?h(C):a}function v(C){var O=C-l,E=C-c,_=t-O;return f?IFe(_,o-E):_}function g(C){var O=C-l,E=C-c;return l===void 0||O>=t||O<0||f&&E>=o}function m(){var C=MR();if(g(C))return y(C);s=setTimeout(m,v(C))}function y(C){return s=void 0,d&&r?h(C):(r=i=void 0,a)}function x(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function S(){return s===void 0?a:y(MR())}function w(){var C=MR(),O=g(C);if(r=arguments,i=this,l=C,O){if(s===void 0)return p(l);if(f)return s=setTimeout(m,t),h(l)}return s===void 0&&(s=setTimeout(m,t)),a}return w.cancel=x,w.flush=S,w}function TR(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function kFe(e){return!!e&&typeof e=="object"}function NFe(e){return typeof e=="symbol"||kFe(e)&&MFe.call(e)==bFe}function gZ(e){if(typeof e=="number")return e;if(NFe(e))return vZ;if(TR(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=TR(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(xFe,"");var n=wFe.test(e);return n||CFe.test(e)?OFe(e.slice(2),n?2:8):SFe.test(e)?vZ:+e}var AFe=RFe;const mZ=Rt(AFe),XC=(e,t)=>{const n=e.models.find(r=>r.name===t);if(n)return n;for(const r of e.models)for(const i of r.inlines||[])if(i.name===t)return i},LFe=o=>{var a=o,{idField:e,labelFields:t,value:n,parentModel:r}=a,i=Vs(a,["idField","labelFields","value","parentModel"]);const[s]=Yn.useForm(),[l]=Yn.useForm(),{t:c}=so("AsyncSelect"),[u,f]=b.useState(),{configuration:d}=b.useContext(pl),[h,p]=b.useState(!1),[v,g]=b.useState(),m=XC(d,r),y=Qv.stringify({offset:0,limit:20,search:u}),{data:x,isLoading:S,refetch:w}=Il({queryKey:[`/list/${r}`,y],queryFn:()=>Hl(`/list/${r}?${y}`)}),{data:C,isLoading:O}=Il({queryKey:[`/retrieve/${r}/${v}`],queryFn:()=>Hl(`/retrieve/${r}/${v}`),enabled:!!v,refetchOnWindowFocus:!1}),{mutate:E,isPending:_,isError:$}=Po({mutationFn:F=>qc(`/add/${r}`,F),onSuccess:()=>{pi.success(c("Succesfully added")),w(),N()},onError:F=>{vl(F,s)}}),{mutate:P,isPending:T,isError:I}=Po({mutationFn:F=>VC(`/change/${r}/${v}`,F),onSuccess:()=>{pi.success(c("Succesfully changed")),w(),D()},onError:F=>{vl(F,l)}}),M=(F,H)=>((H==null?void 0:H.label)||"").toString().toLowerCase().indexOf(F.toLowerCase())>=0||((H==null?void 0:H.value)||"").toString().toLowerCase().indexOf(F.toLowerCase())>=0,R=F=>{f(F)},k=b.useCallback(()=>{s.resetFields(),p(!0)},[s]),N=b.useCallback(()=>{p(!1)},[]),A=F=>{E(F)},j=b.useCallback(F=>{l.resetFields(),g(F),p(!1)},[l]),D=b.useCallback(()=>{g(void 0),p(!1)},[]),L=F=>{P(F)},B=i.mode==="multiple";return ce.jsxs(ce.Fragment,{children:[ce.jsxs(Ii.Compact,{style:{width:"100%"},children:[ce.jsx(ao,{title:c(`Add ${m&&ea(m)}`),children:ce.jsx(gn,{onClick:k,children:ce.jsx(iR,{})})}),n&&!B&&ce.jsx(ao,{title:c(`Edit ${m&&ea(m)}`),children:ce.jsx(gn,{onClick:()=>j(n),children:ce.jsx(yC,{})})}),ce.jsx(Ti,Le({allowClear:!0,showSearch:!0,loading:S,filterOption:M,onSearch:mZ(R,500),options:((x==null?void 0:x.results)||[]).map(F=>{const H=t.filter(z=>F[z])[0];return{value:`${F[e]}`,label:F[H]}}),value:B?n?n.map(F=>`${F}`):[]:n?`${n}`:void 0},i))]}),ce.jsxs(Qi,{width:600,open:h,title:c(`Add ${m&&ea(m)}`),onCancel:N,footer:null,children:[ce.jsx(Fl,{}),m!=null&&m.permissions.includes(xa.Add)?ce.jsx(ug,{modelConfiguration:m,form:s,onFinish:A,mode:"inline-add",hasOperationError:$,children:ce.jsx(Zr,{justify:"end",children:ce.jsx(Ln,{children:ce.jsx(Ii,{children:ce.jsxs(gn,{loading:_,htmlType:"submit",type:"primary",children:[ce.jsx(Yv,{})," ",c("Add")]})})})})}):ce.jsx(Xi,{description:c("No permissions for model")})]}),ce.jsxs(Qi,{width:600,open:!!v,title:`Change ${m&&ea(m)} ${v}`,onCancel:D,footer:null,children:[ce.jsx(Fl,{}),C&&m&&m.permissions.includes(xa.Change)?ce.jsx(ug,{modelConfiguration:m,form:l,onFinish:L,mode:"inline-change",hasOperationError:I,initialValues:PR(C),children:ce.jsx(Zr,{justify:"end",children:ce.jsx(Ln,{children:ce.jsx(Ii,{children:ce.jsxs(gn,{loading:T||O,htmlType:"submit",type:"primary",children:[ce.jsx(Yv,{})," ",c("Save")]})})})})}):ce.jsx(Xi,{description:c("No permissions for model")})]})]})},jFe=s=>{var l=s,{parentModel:e,idField:t,labelFields:n,layout:r,value:i,onChange:o}=l,a=Vs(l,["parentModel","idField","labelFields","layout","value","onChange"]);const[c,u]=b.useState(),f=d1(),d=Qv.stringify({offset:0,limit:20,search:c}),{data:h}=Il({queryKey:[`/list/${e}`,d],queryFn:()=>Hl(`/list/${e}?${d}`)}),p=(y,x)=>((x==null?void 0:x.key)||"").toLowerCase().indexOf(y.toLowerCase())>=0||((x==null?void 0:x.value)||"").toLowerCase().indexOf(y.toLowerCase())>=0,v=(y,x)=>{y==="left"&&u(x)},g=((h==null?void 0:h.results)||[]).map(y=>{const x=n.filter(S=>y[S])[0];return{key:y[t],title:y[x]}}),m=y=>y.title;return ce.jsx(mC,Le({dataSource:g,showSearch:!0,filterOption:p,onSearch:mZ(v,500),render:m,onChange:o,targetKeys:i,listStyle:r==="vertical"||f?{width:"100%",marginTop:5,marginBottom:5}:{width:"100%"},style:r==="vertical"||f?{display:"block"}:void 0},a))},{useToken:DFe}=Qy,FFe=r=>{var i=r,{value:e,onChange:t}=i,n=Vs(i,["value","onChange"]);var l;const{token:o}=DFe(),a=KC(e)?e:JSON.stringify(e,null," "),s=(l=a==null?void 0:a.split(/\r\n|\r|\n/))==null?void 0:l.length;return ce.jsx(br.TextArea,Le({rows:s>30?30:s,value:a,onChange:t,style:{backgroundColor:o.colorTextBase,color:o.colorBgBase,border:"none"}},n))},BFe=r=>{var i=r,{parentId:e,passwordModalForm:t}=i,n=Vs(i,["parentId","passwordModalForm"]);const{t:o}=so("PasswordInput"),[a]=Yn.useForm(),[s,l]=ge.useState(!1),c=()=>{l(!1),a.resetFields()},u=()=>{a.resetFields(),l(!0)},{mutate:f,isPending:d}=Po({mutationFn:p=>VC(`/change-password/${e}`,p),onSuccess:()=>{pi.success(o("Succesfully changed")),c()},onError:p=>{vl(p,a)}}),h=p=>{f(p)};return t?ce.jsxs(ce.Fragment,{children:[ce.jsxs(Ii.Compact,{style:{width:"100%"},children:[ce.jsx(ao,{title:o("Change Password"),children:ce.jsx(gn,{onClick:u,children:ce.jsx(yC,{})})}),ce.jsx(br.Password,Le({},n))]}),ce.jsxs(Qi,{open:s,title:o("Change Password"),onCancel:c,footer:null,children:[ce.jsx(Fl,{}),ce.jsxs(Yn,{form:a,layout:"vertical",onFinish:h,children:[ce.jsx(Yn.Item,{name:"password",label:"Password",children:ce.jsx(br.Password,{})}),ce.jsx(Yn.Item,{name:"confirm_password",label:"Confirm Password",children:ce.jsx(br.Password,{})}),ce.jsx(Fl,{}),ce.jsx(Yn.Item,{children:ce.jsx(gn,{type:"primary",loading:d,htmlType:"submit",children:o("Save")})})]})]})]}):ce.jsx(br.Password,Le({},n))};var zFe=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,function(s){return r[s]}.bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=9)}([function(e,t){e.exports=b},function(e,t,n){var r;/*!
513
+ `+o):r.stack=o}catch(a){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=rh(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&yR.assertOptions(r,{silentJSONParsing:gf.transitional(gf.boolean),forcedJSONParsing:gf.transitional(gf.boolean),clarifyTimeoutError:gf.transitional(gf.boolean)},!1),i!=null&&(Ye.isFunction(i)?n.paramsSerializer={serialize:i}:yR.assertOptions(i,{encode:gf.function,serialize:gf.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&Ye.merge(o.common,o[n.method]);o&&Ye.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=ba.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,f=0,d;if(!l){const p=[KX.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,c),d=p.length,u=Promise.resolve(n);f<d;)u=u.then(p[f++],p[f++]);return u}d=s.length;let h=n;for(f=0;f<d;){const p=s[f++],v=s[f++];try{h=p(h)}catch(g){v.call(this,g);break}}try{u=KX.call(this,h)}catch(p){return Promise.reject(p)}for(f=0,d=c.length;f<d;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=rh(this.defaults,t);const n=FX(t.baseURL,t.url);return TX(n,t.params,t.paramsSerializer)}}Ye.forEach(["delete","get","head","options"],function(t){ih.prototype[t]=function(n,r){return this.request(rh(r||{},{method:t,url:n,data:(r||{}).data}))}}),Ye.forEach(["post","put","patch"],function(t){function n(r){return function(o,a,s){return this.request(rh(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}ih.prototype[t]=n(),ih.prototype[t+"Form"]=n(!0)});class bR{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new Zv(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bR(function(i){t=i}),cancel:t}}}function q9e(e){return function(n){return e.apply(null,n)}}function G9e(e){return Ye.isObject(e)&&e.isAxiosError===!0}const xR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xR).forEach(([e,t])=>{xR[t]=e});function ZX(e){const t=new ih(e),n=pX(ih.prototype.request,t);return Ye.extend(n,ih.prototype,t,{allOwnKeys:!0}),Ye.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ZX(rh(e,i))},n}const Bi=ZX(u1);Bi.Axios=ih,Bi.CanceledError=Zv,Bi.CancelToken=bR,Bi.isCancel=AX,Bi.VERSION=YX,Bi.toFormData=DC,Bi.AxiosError=En,Bi.Cancel=Bi.CanceledError,Bi.all=function(t){return Promise.all(t)},Bi.spread=q9e,Bi.isAxiosError=G9e,Bi.mergeConfig=rh,Bi.AxiosHeaders=ba,Bi.formToJSON=e=>kX(Ye.isHTMLForm(e)?new FormData(e):e),Bi.getAdapter=GX.getAdapter,Bi.HttpStatusCode=xR,Bi.default=Bi;const K9e=()=>({withCredentials:!0}),WC=Bi.create(Le({baseURL:window.SERVER_URL},K9e())),Hl=e=>Oi(this,null,function*(){return(yield WC.get(e)).data}),qc=(e,t)=>Oi(this,null,function*(){return(yield WC.post(e,t)).data}),VC=(e,t)=>Oi(this,null,function*(){return(yield WC.patch(e,t)).data}),SR=e=>Oi(this,null,function*(){return(yield WC.delete(e)).data}),UC=e=>e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),ea=(e,t=!1)=>{if(t&&e.verbose_name_plural)return e.verbose_name_plural;if(e.verbose_name)return t?`${e.verbose_name}s`:e.verbose_name;const n=(e.name.match(/[A-Z][a-z]+|[0-9]+/g)||[e.name]).join(" ");return t?`${n}s`:n},d1=()=>{const[e,t]=b.useState(window.innerWidth);return b.useEffect(()=>{function n(){t(window.innerWidth)}return window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e<=768},QX={site_name:"API Administration",username_field:"username",models:[],dashboard_widgets:[]},pl=ge.createContext({configuration:QX});pl.Consumer;const Y9e=({children:e})=>{var r,i;const{t}=so("ConfigurationProvider"),n=Il({queryKey:["/configuration"],queryFn:()=>Hl("/configuration"),retry:!1,refetchOnWindowFocus:!1});if(n.isLoading)return null;if(n.error){const o=n.error;return ce.jsx(aC,{status:"warning",title:"Invalid configuration. Please check your admin model classes and logs.",extra:ce.jsx(DT,{title:t("Error"),content:((i=(r=o==null?void 0:o.response)==null?void 0:r.data)==null?void 0:i.exception)||(o==null?void 0:o.message),placement:"bottom",trigger:"click",children:ce.jsx(gn,{type:"primary",children:t("Show Error")},"console")})})}return ce.jsx(pl.Provider,{value:{configuration:(n==null?void 0:n.data)||QX},children:e})},h1=ge.createContext({signedInUser:void 0,signedInUserRefetch:()=>{},signedIn:!1});h1.Consumer;const X9e=({children:e})=>{const t=Il({queryKey:["/me"],queryFn:()=>Hl("/me"),retry:!1,refetchOnWindowFocus:!1});if(t.isLoading)return null;const n=!!t.isError;return ce.jsx(h1.Provider,{value:{signedInUser:t.data,signedInUserRefetch:t.refetch,signedIn:!n},children:e})},{Header:Z9e,Sider:Q9e}=Hc,{Title:J9e}=t1,qC=({title:e,breadcrumbs:t,viewOnSite:n,headerActions:r,bottomActions:i,isLoading:o,children:a})=>{const s=Gv(),l=d1(),[c,u]=b.useState(),{model:f}=RC(),{configuration:d}=b.useContext(pl),{signedInUser:h,signedInUserRefetch:p,signedIn:v}=b.useContext(h1),{t:g}=so("CrudContainer"),{token:{colorBgContainer:m,colorPrimary:y}}=Qy.useToken();b.useEffect(()=>{v||s("/sign-in")},[s,v]);const{mutate:x}=Po({mutationFn:()=>qc("/sign-out",{}),onSuccess:()=>{p()}}),S=E=>{switch(E.key){case"dashboard":s("/");break;default:s(`/list/${E.key}`);break}},w=E=>{switch(E.key){case"sign-out":x();break}},C=[{key:"dashboard",label:g("Dashboard")},{key:"divider",type:"divider"},...d.models.filter(E=>!c||E.name.toLocaleLowerCase().includes(c==null?void 0:c.toLocaleLowerCase())).map(E=>({key:E.name,label:ea(E)}))],O=E=>u(E.target.value);return ce.jsxs(ce.Fragment,{children:[ce.jsx(YI,{defaultTitle:e,children:ce.jsx("meta",{name:"description",content:e})}),ce.jsxs(Hc,{style:{minHeight:"100vh"},children:[ce.jsx(Z9e,{style:{background:y,paddingInline:20},children:ce.jsxs(Zr,{justify:"space-between",children:[ce.jsx(Ln,{children:ce.jsxs(Ii,{children:[l&&ce.jsx(Bc,{style:{background:y},theme:"light",mode:"horizontal",defaultSelectedKeys:[f||"dashboard"],items:[{key:(h==null?void 0:h.id)||"key",icon:ce.jsx(WV,{style:{color:m}}),children:C}],onClick:S}),ce.jsx(vf,{to:"/",children:ce.jsx(Jw,{src:window.SERVER_DOMAIN+d.site_header_logo,preview:!1,height:32,alt:d.site_name,style:{marginTop:-2}})}),!l&&ce.jsx(vf,{to:"/",children:ce.jsx("span",{style:{color:m,fontSize:18,marginLeft:10},children:d.site_name})})]})}),ce.jsx(Ln,{children:ce.jsxs(Ii,{children:[!l&&ce.jsx("span",{style:{color:m,marginRight:5},children:(h||{})[d.username_field]}),ce.jsx(Bc,{style:{background:y},theme:"light",mode:"horizontal",items:[{key:(h==null?void 0:h.id)||"key",icon:ce.jsx(_De,{style:{color:m}}),children:[{key:"sign-out",label:g("Sign Out")}]}],onClick:w})]})})]})}),ce.jsxs(Hc,{children:[!l&&ce.jsxs(Q9e,{style:{background:m,borderRadius:8},children:[ce.jsx("div",{style:{padding:10},children:ce.jsx(br,{value:c,onChange:O,placeholder:g("Search By Menu"),prefix:ce.jsx(xv,{})})}),ce.jsx(Bc,{mode:"inline",theme:"light",defaultSelectedKeys:[f||"dashboard"],style:{borderRight:0,overflowY:"scroll"},items:C,onClick:S})]}),ce.jsxs(Hc,{style:{padding:16},children:[ce.jsxs(Zr,{justify:"space-between",children:[ce.jsx(Ln,{children:t}),n&&ce.jsx(Ln,{children:ce.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[ce.jsx(pDe,{})," ",g("View on site")]})})]}),ce.jsx(Iv,{title:ce.jsxs(Zr,{justify:"space-between",children:[ce.jsx(Ln,{children:ce.jsx(J9e,{style:{margin:0,marginTop:15},level:5,children:e})}),r?ce.jsx(Ln,{children:r}):null]}),style:{marginTop:16},children:ce.jsxs(Ju,{loading:o,active:!0,children:[a,i?ce.jsx(Zr,{children:ce.jsx(Ln,{children:i})}):null]})})]})]})]})]})},JX="%[a-f0-9]{2}",eZ=new RegExp("("+JX+")|([^%]+?)","gi"),tZ=new RegExp("("+JX+")+","gi");function wR(e,t){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(e.length===1)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],wR(n),wR(r))}function eFe(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(eZ)||[];for(let r=1;r<n.length;r++)e=wR(n,r).join(""),n=e.match(eZ)||[];return e}}function tFe(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=tZ.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(i){const o=eFe(n[0]);o!==n[0]&&(t[n[0]]=o)}n=tZ.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const i of r)e=e.replace(new RegExp(i,"g"),t[i]);return e}function nFe(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(t){return tFe(e)}}function rFe(e,t){const n={};if(Array.isArray(t))for(const r of t){const i=Object.getOwnPropertyDescriptor(e,r);i!=null&&i.enumerable&&Object.defineProperty(n,r,i)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){const o=e[r];t(r,o,e)&&Object.defineProperty(n,r,i)}}return n}function nZ(e,t){if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e===""||t==="")return[];const n=e.indexOf(t);return n===-1?[]:[e.slice(0,n),e.slice(n+t.length)]}const iFe=e=>e==null,oFe=e=>encodeURIComponent(e).replaceAll(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),CR=Symbol("encodeFragmentIdentifier");function aFe(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[zi(t,e),"[",i,"]"].join("")]:[...n,[zi(t,e),"[",zi(i,e),"]=",zi(r,e)].join("")]};case"bracket":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[zi(t,e),"[]"].join("")]:[...n,[zi(t,e),"[]=",zi(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,[zi(t,e),":list="].join("")]:[...n,[zi(t,e),":list=",zi(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t=e.arrayFormat==="bracket-separator"?"[]=":"=";return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?r:(i=i===null?"":i,r.length===0?[[zi(n,e),t,zi(i,e)].join("")]:[[r,zi(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===""?n:r===null?[...n,zi(t,e)]:[...n,[zi(t,e),"=",zi(r,e)].join("")]}}function sFe(e){let t;switch(e.arrayFormat){case"index":return(n,r,i)=>{if(t=/\[(\d*)]$/.exec(n),n=n.replace(/\[\d*]$/,""),!t){i[n]=r;return}i[n]===void 0&&(i[n]={}),i[n][t[1]]=r};case"bracket":return(n,r,i)=>{if(t=/(\[])$/.exec(n),n=n.replace(/\[]$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"colon-list-separator":return(n,r,i)=>{if(t=/(:list)$/.exec(n),n=n.replace(/:list$/,""),!t){i[n]=r;return}if(i[n]===void 0){i[n]=[r];return}i[n]=[...i[n],r]};case"comma":case"separator":return(n,r,i)=>{const o=typeof r=="string"&&r.includes(e.arrayFormatSeparator),a=typeof r=="string"&&!o&&Gc(r,e).includes(e.arrayFormatSeparator);r=a?Gc(r,e):r;const s=o||a?r.split(e.arrayFormatSeparator).map(l=>Gc(l,e)):r===null?r:Gc(r,e);i[n]=s};case"bracket-separator":return(n,r,i)=>{const o=/(\[])$/.test(n);if(n=n.replace(/\[]$/,""),!o){i[n]=r&&Gc(r,e);return}const a=r===null?[]:r.split(e.arrayFormatSeparator).map(s=>Gc(s,e));if(i[n]===void 0){i[n]=a;return}i[n]=[...i[n],...a]};default:return(n,r,i)=>{if(i[n]===void 0){i[n]=r;return}i[n]=[...[i[n]].flat(),r]}}}function rZ(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function zi(e,t){return t.encode?t.strict?oFe(e):encodeURIComponent(e):e}function Gc(e,t){return t.decode?nFe(e):e}function iZ(e){return Array.isArray(e)?e.sort():typeof e=="object"?iZ(Object.keys(e)).sort((t,n)=>Number(t)-Number(n)).map(t=>e[t]):e}function oZ(e){const t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function lFe(e){let t="";const n=e.indexOf("#");return n!==-1&&(t=e.slice(n)),t}function aZ(e,t,n){return n==="string"&&typeof e=="string"?e:typeof n=="function"&&typeof e=="string"?n(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")?e.toLowerCase()==="true":n==="number"&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""||t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?Number(e):e}function OR(e){e=oZ(e);const t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function ER(e,t){t=Le({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null)},t),rZ(t.arrayFormatSeparator);const n=sFe(t),r=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return r;for(const i of e.split("&")){if(i==="")continue;const o=t.decode?i.replaceAll("+"," "):i;let[a,s]=nZ(o,"=");a===void 0&&(a=o),s=s===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:Gc(s,t),n(Gc(a,t),s,r)}for(const[i,o]of Object.entries(r))if(typeof o=="object"&&o!==null&&t.types[i]!=="string")for(const[a,s]of Object.entries(o)){const l=t.types[i]?t.types[i].replace("[]",""):void 0;o[a]=aZ(s,t,l)}else typeof o=="object"&&o!==null&&t.types[i]==="string"?r[i]=Object.values(o).join(t.arrayFormatSeparator):r[i]=aZ(o,t,t.types[i]);return t.sort===!1?r:(t.sort===!0?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((i,o)=>{const a=r[o];return i[o]=a&&typeof a=="object"&&!Array.isArray(a)?iZ(a):a,i},Object.create(null))}function sZ(e,t){if(!e)return"";t=Le({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t),rZ(t.arrayFormatSeparator);const n=a=>t.skipNull&&iFe(e[a])||t.skipEmptyString&&e[a]==="",r=aFe(t),i={};for(const[a,s]of Object.entries(e))n(a)||(i[a]=s);const o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(a=>{const s=e[a];return s===void 0?"":s===null?zi(a,t):Array.isArray(s)?s.length===0&&t.arrayFormat==="bracket-separator"?zi(a,t)+"[]":s.reduce(r(a),[]).join("&"):zi(a,t)+"="+zi(s,t)}).filter(a=>a.length>0).join("&")}function lZ(e,t){var i,o;t=Le({decode:!0},t);let[n,r]=nZ(e,"#");return n===void 0&&(n=e),Le({url:(o=(i=n==null?void 0:n.split("?"))==null?void 0:i[0])!=null?o:"",query:ER(OR(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:Gc(r,t)}:{})}function cZ(e,t){t=Le({encode:!0,strict:!0,[CR]:!0},t);const n=oZ(e.url).split("?")[0]||"",r=OR(e.url),i=Le(Le({},ER(r,{sort:!1})),e.query);let o=sZ(i,t);o&&(o=`?${o}`);let a=lFe(e.url);if(typeof e.fragmentIdentifier=="string"){const s=new URL(n);s.hash=e.fragmentIdentifier,a=t[CR]?s.hash:`#${e.fragmentIdentifier}`}return`${n}${o}${a}`}function uZ(e,t,n){n=Le({parseFragmentIdentifier:!0,[CR]:!1},n);const{url:r,query:i,fragmentIdentifier:o}=lZ(e,n);return cZ({url:r,query:rFe(i,t),fragmentIdentifier:o},n)}function cFe(e,t,n){const r=Array.isArray(t)?i=>!t.includes(i):(i,o)=>!t(i,o);return uZ(e,r,n)}const Qv=Object.freeze(Object.defineProperty({__proto__:null,exclude:cFe,extract:OR,parse:ER,parseUrl:lZ,pick:uZ,stringify:sZ,stringifyUrl:cZ},Symbol.toStringTag,{value:"Module"}));var uFe=function(e,t,n,r){var i=typeof r!="undefined"?[r,e]:[e],o=new Blob(i,{type:n||"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")window.navigator.msSaveBlob(o,t);else{var a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(o):window.webkitURL.createObjectURL(o),s=document.createElement("a");s.style.display="none",s.href=a,s.setAttribute("download",t),typeof s.download=="undefined"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(function(){document.body.removeChild(s),window.URL.revokeObjectURL(a)},200)}};const fFe=Rt(uFe);var fZ={exports:{}};(function(e,t){(function(n,r,i){e.exports=i(),e.exports.default=i()})("slugify",Ct,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function i(o,a){if(typeof o!="string")throw new Error("slugify: string argument expected");a=typeof a=="string"?{replacement:a}:a||{};var s=r[a.locale]||{},l=a.replacement===void 0?"-":a.replacement,c=a.trim===void 0?!0:a.trim,u=o.normalize().split("").reduce(function(f,d){var h=s[d];return h===void 0&&(h=n[d]),h===void 0&&(h=d),h===l&&(h=" "),f+h.replace(a.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return a.strict&&(u=u.replace(/[^A-Za-z0-9\s]/g,"")),c&&(u=u.trim()),u=u.replace(/\s+/g,l),a.lower&&(u=u.toLowerCase()),u}return i.extend=function(o){Object.assign(n,o)},i})})(fZ);var dFe=fZ.exports;const dZ=Rt(dFe),GC=e=>/^(\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{1,6})?(?:Z|[+-]\d{2}:\d{2}))?)$/.test(e),hFe=e=>/^[+-]?(\d+(\.\d*)?|\.\d+)$/.test(e),Jv=e=>Array.isArray(e),_R=e=>/^(true|false)$/i.test(e),KC=e=>typeof e=="string"||e instanceof String,pFe=e=>{let t=e;if(!KC(e))try{t=JSON.stringify(e)}catch(n){return!1}try{JSON.parse(t)}catch(n){return!1}return!0},vFe=e=>{if(!KC(e))return!1;try{return dZ(e)===e}catch(t){return!1}},p1=e=>e&&(Jv(e)?e.map(p1):e.date?e.format():e),YC=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t,p1(n)])),$R=e=>{const t=YC(e),n={};for(const[r,i]of Object.entries(t)){if(Jv(i)&&i.length===2&&i.every(GC))return n[`${r}__gte`]=i[0],n[`${r}__lte`]=i[1],n;if(Jv(i))return n[`${r}__in`]=i,n;if(GC(i)||hFe(i)||_R(i))return n[r]=i,n;n[`${r}__icontains`]=i}return n},v1=e=>e==null?e:Jv(e)?e.map(v1):_R(e)?e!=="false"&&!!e:GC(e)?Lo(e):e,PR=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t,v1(n)])),gFe=(e,t,n)=>{if(e==null)return t||"-";if(Jv(e)){const r=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];return e.map((i,o)=>ce.jsx(pY,{color:r[o%r.length],children:i},i))}return _R(e)?ce.jsx(xs,{checked:e}):GC(e)?Lo(e).format(n):e};var sr=(e=>(e.Input="Input",e.InputNumber="InputNumber",e.SlugInput="SlugInput",e.EmailInput="EmailInput",e.PhoneInput="PhoneInput",e.UrlInput="UrlInput",e.PasswordInput="PasswordInput",e.TextArea="TextArea",e.RichTextArea="RichTextArea",e.JsonTextArea="JsonTextArea",e.Select="Select",e.AsyncSelect="AsyncSelect",e.AsyncTransfer="AsyncTransfer",e.Switch="Switch",e.Checkbox="Checkbox",e.TimePicker="TimePicker",e.DatePicker="DatePicker",e.DateTimePicker="DateTimePicker",e.RangePicker="RangePicker",e.RadioGroup="RadioGroup",e.CheckboxGroup="CheckboxGroup",e.Upload="Upload",e))(sr||{}),eg=(e=>(e.ChartLine="ChartLine",e.ChartArea="ChartArea",e.ChartColumn="ChartColumn",e.ChartBar="ChartBar",e.ChartPie="ChartPie",e))(eg||{}),xa=(e=>(e.Add="Add",e.Change="Change",e.Delete="Delete",e.Export="Export",e))(xa||{}),oh=(e=>(e.CSV="CSV",e.JSON="JSON",e))(oh||{});const hZ=({model:e,search:t,sortBy:n,filters:r,style:i})=>{const[o]=Yn.useForm(),{t:a}=so("ExportBtn"),[s,l]=b.useState(!1),c=Qv.stringify(Le({search:t,sort_by:n},$R(r))),{mutate:u,isPending:f}=Po({mutationFn:v=>qc(`/export/${e}?${c}`,v),onSuccess:v=>{const g=o.getFieldValue("format")===oh.JSON?JSON.stringify(v):v;fFe(g,`${e}.${o.getFieldValue("format").toLowerCase()}`),l(!1),o.resetFields(),pi.success(a("Successfully exported"))},onError:()=>{pi.error(a("Server error"))}}),d=b.useCallback(v=>u(v),[u]),h=b.useCallback(()=>l(!1),[]),p=b.useCallback(()=>l(!0),[]);return ce.jsxs(ce.Fragment,{children:[ce.jsx(gn,{style:i,loading:f,onClick:p,children:ce.jsxs(Ii,{children:[ce.jsx(BI,{}),a("Export")]})}),ce.jsxs(Qi,{width:300,open:s,onCancel:h,footer:null,title:a("Export"),children:[ce.jsx(Fl,{}),ce.jsx(Zr,{children:ce.jsx(Ln,{xs:24,children:ce.jsxs(Yn,{form:o,layout:"vertical",onFinish:d,initialValues:{limit:1e3,format:oh.CSV},children:[ce.jsx(Yn.Item,{name:"format",label:a("Format"),children:ce.jsx(Ti,{options:[{label:oh.CSV,value:oh.CSV},{label:oh.JSON,value:oh.JSON}]})}),ce.jsx(Yn.Item,{name:"limit",label:a("Max Export Count"),children:ce.jsx(I5,{style:{width:"100%"}})}),ce.jsx(Fl,{}),ce.jsx(Yn.Item,{children:ce.jsx(gn,{type:"primary",htmlType:"submit",children:ce.jsxs(Ii,{children:[ce.jsx(BI,{}),a("Export")]})})})]})})})]})]})},mFe=e=>{const[t,n]=b.useState([]);if(e.loading)return ce.jsx(tC,{});if(!e.dataSource||e.dataSource.length===0)return ce.jsx(Xi,{image:Xi.PRESENTED_IMAGE_SIMPLE});const r=e.rowKey,i=(o,a)=>{e.onChange&&e.onChange({current:o,pageSize:a},{},{},{})};return ce.jsxs(ce.Fragment,{children:[e.dataSource.map((o,a)=>{var l,c,u,f,d,h;const s=p=>{var v,g,m,y,x;if((v=e.rowSelection)!=null&&v.onChange)if(p.target.checked){const S=[...((g=e.rowSelection)==null?void 0:g.selectedRowKeys)||[],o[r]];(m=e.rowSelection)==null||m.onChange(S,[],{})}else{const S=(((y=e.rowSelection)==null?void 0:y.selectedRowKeys)||[]).filter(w=>w!==o[r]);(x=e.rowSelection)==null||x.onChange(S,[],{})}};return ce.jsx(Iv,{className:e.className,style:{marginBottom:10},children:ce.jsxs(Nv,{column:1,layout:"vertical",children:[e.rowSelection&&ce.jsx(Nv.Item,{label:ce.jsx("b",{children:"Select"}),contentStyle:{width:"100%"},children:ce.jsx(xs,{checked:(((l=e.rowSelection)==null?void 0:l.selectedRowKeys)||[]).includes(o[r]),onChange:s})},"selection"),e.expandable&&ce.jsxs(ce.Fragment,{children:[ce.jsx(Nv.Item,{label:ce.jsx("b",{children:"Expand"}),contentStyle:{width:"100%"},children:(u=(c=e.expandable)==null?void 0:c.expandIcon)==null?void 0:u.call(c,{expanded:t.includes(o[r]),onExpand:()=>{t.includes(o[r])?n(t.filter(p=>p!==o[r])):n([...t,o[r]])},record:o})},"expandable"),t.includes(o[r])&&ce.jsx(Nv.Item,{contentStyle:{width:"100%"},children:(d=(f=e.expandable)==null?void 0:f.expandedRowRender)==null?void 0:d.call(f,o,a,0,!0)},"expandable")]}),(h=e.columns)==null?void 0:h.map(p=>ce.jsx(Nv.Item,{label:ce.jsx("b",{children:p.title}),contentStyle:{width:"100%"},children:p.render?p.render(p.dataIndex?o[p.dataIndex]:o,o):o[p.dataIndex]},p.title))]})},o[r])}),e.pagination&&ce.jsx(G5,un(Le({},e.pagination),{onChange:i}))]})},pZ=e=>{var n;return d1()?ce.jsx(mFe,Le({},e)):ce.jsx(Vc,Le({sticky:!0,scroll:{x:(((n=e.columns)==null?void 0:n.length)||0)>7?1800:1200}},e))},vl=(e,t)=>{var a,s,l,c;const n=((s=(a=e==null?void 0:e.response)==null?void 0:a.data)==null?void 0:s.detail)||((c=(l=e==null?void 0:e.response)==null?void 0:l.data)==null?void 0:c.description);if(!Array.isArray(n)){typeof n=="string"||n instanceof String?pi.error(n):pi.error("Server error");return}const r={};for(const u of n){const f=(u==null?void 0:u.loc)||[],d=f[f.length-1];!d||!(u!=null&&u.msg)||(r[d]=[u==null?void 0:u.msg])}if(!t){pi.error("Server error");return}const i=[],o=Object.keys(t.getFieldsValue()).filter(u=>u in r);for(const u of o)i.push({name:u,errors:r[u]});i.length>0&&t.setFields(i)};var yFe="Expected a function",vZ=NaN,bFe="[object Symbol]",xFe=/^\s+|\s+$/g,SFe=/^[-+]0x[0-9a-f]+$/i,wFe=/^0b[01]+$/i,CFe=/^0o[0-7]+$/i,OFe=parseInt,EFe=typeof Ct=="object"&&Ct&&Ct.Object===Object&&Ct,_Fe=typeof self=="object"&&self&&self.Object===Object&&self,$Fe=EFe||_Fe||Function("return this")(),PFe=Object.prototype,MFe=PFe.toString,TFe=Math.max,IFe=Math.min,MR=function(){return $Fe.Date.now()};function RFe(e,t,n){var r,i,o,a,s,l,c=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(yFe);t=gZ(t)||0,TR(n)&&(u=!!n.leading,f="maxWait"in n,o=f?TFe(gZ(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function h(C){var O=r,E=i;return r=i=void 0,c=C,a=e.apply(E,O),a}function p(C){return c=C,s=setTimeout(m,t),u?h(C):a}function v(C){var O=C-l,E=C-c,_=t-O;return f?IFe(_,o-E):_}function g(C){var O=C-l,E=C-c;return l===void 0||O>=t||O<0||f&&E>=o}function m(){var C=MR();if(g(C))return y(C);s=setTimeout(m,v(C))}function y(C){return s=void 0,d&&r?h(C):(r=i=void 0,a)}function x(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function S(){return s===void 0?a:y(MR())}function w(){var C=MR(),O=g(C);if(r=arguments,i=this,l=C,O){if(s===void 0)return p(l);if(f)return s=setTimeout(m,t),h(l)}return s===void 0&&(s=setTimeout(m,t)),a}return w.cancel=x,w.flush=S,w}function TR(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function kFe(e){return!!e&&typeof e=="object"}function NFe(e){return typeof e=="symbol"||kFe(e)&&MFe.call(e)==bFe}function gZ(e){if(typeof e=="number")return e;if(NFe(e))return vZ;if(TR(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=TR(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(xFe,"");var n=wFe.test(e);return n||CFe.test(e)?OFe(e.slice(2),n?2:8):SFe.test(e)?vZ:+e}var AFe=RFe;const mZ=Rt(AFe),XC=(e,t)=>{const n=e.models.find(r=>r.name===t);if(n)return n;for(const r of e.models)for(const i of r.inlines||[])if(i.name===t)return i},LFe=o=>{var a=o,{idField:e,labelFields:t,value:n,parentModel:r}=a,i=Vs(a,["idField","labelFields","value","parentModel"]);const[s]=Yn.useForm(),[l]=Yn.useForm(),{t:c}=so("AsyncSelect"),[u,f]=b.useState(),{configuration:d}=b.useContext(pl),[h,p]=b.useState(!1),[v,g]=b.useState(),m=XC(d,r),y=Qv.stringify({offset:0,limit:20,search:u}),{data:x,isLoading:S,refetch:w}=Il({queryKey:[`/list/${r}`,y],queryFn:()=>Hl(`/list/${r}?${y}`)}),{data:C,isLoading:O}=Il({queryKey:[`/retrieve/${r}/${v}`],queryFn:()=>Hl(`/retrieve/${r}/${v}`),enabled:!!v,refetchOnWindowFocus:!1}),{mutate:E,isPending:_,isError:$}=Po({mutationFn:F=>qc(`/add/${r}`,F),onSuccess:()=>{pi.success(c("Succesfully added")),w(),N()},onError:F=>{vl(F,s)}}),{mutate:P,isPending:T,isError:I}=Po({mutationFn:F=>VC(`/change/${r}/${v}`,F),onSuccess:()=>{pi.success(c("Succesfully changed")),w(),D()},onError:F=>{vl(F,l)}}),M=(F,H)=>((H==null?void 0:H.label)||"").toString().toLowerCase().indexOf(F.toLowerCase())>=0||((H==null?void 0:H.value)||"").toString().toLowerCase().indexOf(F.toLowerCase())>=0,R=F=>{f(F)},k=b.useCallback(()=>{s.resetFields(),p(!0)},[s]),N=b.useCallback(()=>{p(!1)},[]),A=F=>{E(F)},j=b.useCallback(F=>{l.resetFields(),g(F),p(!1)},[l]),D=b.useCallback(()=>{g(void 0),p(!1)},[]),L=F=>{P(F)},B=i.mode==="multiple";return ce.jsxs(ce.Fragment,{children:[ce.jsxs(Ii.Compact,{style:{width:"100%"},children:[ce.jsx(ao,{title:c(`Add ${m&&ea(m)}`),children:ce.jsx(gn,{onClick:k,children:ce.jsx(iR,{})})}),n&&!B&&ce.jsx(ao,{title:c(`Edit ${m&&ea(m)}`),children:ce.jsx(gn,{onClick:()=>j(n),children:ce.jsx(yC,{})})}),ce.jsx(Ti,Le({allowClear:!0,showSearch:!0,loading:S,filterOption:M,onSearch:mZ(R,500),options:((x==null?void 0:x.results)||[]).map(F=>{const H=t.filter(z=>F[z])[0];return{value:`${F[e]}`,label:F[H]}}),value:B?n?n.map(F=>`${F}`):[]:n?`${n}`:void 0},i))]}),ce.jsxs(Qi,{width:600,open:h,title:c(`Add ${m&&ea(m)}`),onCancel:N,footer:null,children:[ce.jsx(Fl,{}),m!=null&&m.permissions.includes(xa.Add)?ce.jsx(ug,{modelConfiguration:m,form:s,onFinish:A,mode:"inline-add",hasOperationError:$,children:ce.jsx(Zr,{justify:"end",children:ce.jsx(Ln,{children:ce.jsx(Ii,{children:ce.jsxs(gn,{loading:_,htmlType:"submit",type:"primary",children:[ce.jsx(Yv,{})," ",c("Add")]})})})})}):ce.jsx(Xi,{description:c("No permissions for model")})]}),ce.jsxs(Qi,{width:600,open:!!v,title:`Change ${m&&ea(m)} ${v}`,onCancel:D,footer:null,children:[ce.jsx(Fl,{}),C&&m&&m.permissions.includes(xa.Change)?ce.jsx(ug,{modelConfiguration:m,form:l,onFinish:L,mode:"inline-change",hasOperationError:I,initialValues:PR(C),children:ce.jsx(Zr,{justify:"end",children:ce.jsx(Ln,{children:ce.jsx(Ii,{children:ce.jsxs(gn,{loading:T||O,htmlType:"submit",type:"primary",children:[ce.jsx(Yv,{})," ",c("Save")]})})})})}):ce.jsx(Xi,{description:c("No permissions for model")})]})]})},jFe=s=>{var l=s,{parentModel:e,idField:t,labelFields:n,layout:r,value:i,onChange:o}=l,a=Vs(l,["parentModel","idField","labelFields","layout","value","onChange"]);const[c,u]=b.useState(),f=d1(),d=Qv.stringify({offset:0,limit:20,search:c}),{data:h}=Il({queryKey:[`/list/${e}`,d],queryFn:()=>Hl(`/list/${e}?${d}`)}),p=(y,x)=>((x==null?void 0:x.key)||"").toLowerCase().indexOf(y.toLowerCase())>=0||((x==null?void 0:x.value)||"").toLowerCase().indexOf(y.toLowerCase())>=0,v=(y,x)=>{y==="left"&&u(x)},g=((h==null?void 0:h.results)||[]).map(y=>{const x=n.filter(S=>y[S])[0];return{key:y[t],title:y[x]}}),m=y=>y.title;return ce.jsx(mC,Le({dataSource:g,showSearch:!0,filterOption:p,onSearch:mZ(v,500),render:m,onChange:o,targetKeys:i,listStyle:r==="vertical"||f?{width:"100%",marginTop:5,marginBottom:5}:{width:"100%"},style:r==="vertical"||f?{display:"block"}:void 0},a))},{useToken:DFe}=Qy,FFe=r=>{var i=r,{value:e,onChange:t}=i,n=Vs(i,["value","onChange"]);var l;const{token:o}=DFe(),a=KC(e)?e:JSON.stringify(e,null," "),s=(l=a==null?void 0:a.split(/\r\n|\r|\n/))==null?void 0:l.length;return ce.jsx(br.TextArea,Le({rows:s>30?30:s,value:a,onChange:t,style:{backgroundColor:o.colorTextBase,color:o.colorBgBase,border:"none"}},n))},BFe=r=>{var i=r,{parentId:e,passwordModalForm:t}=i,n=Vs(i,["parentId","passwordModalForm"]);const{t:o}=so("PasswordInput"),[a]=Yn.useForm(),[s,l]=ge.useState(!1),c=()=>{l(!1),a.resetFields()},u=()=>{a.resetFields(),l(!0)},{mutate:f,isPending:d}=Po({mutationFn:p=>VC(`/change-password/${e}`,p),onSuccess:()=>{pi.success(o("Succesfully changed")),c()},onError:p=>{vl(p,a)}}),h=p=>{f(p)};return t?ce.jsxs(ce.Fragment,{children:[ce.jsxs(Ii.Compact,{style:{width:"100%"},children:[ce.jsx(ao,{title:o("Change Password"),children:ce.jsx(gn,{onClick:u,children:ce.jsx(yC,{})})}),ce.jsx(br.Password,Le({},n))]}),ce.jsxs(Qi,{open:s,title:o("Change Password"),onCancel:c,footer:null,children:[ce.jsx(Fl,{}),ce.jsxs(Yn,{form:a,layout:"vertical",onFinish:h,children:[ce.jsx(Yn.Item,{name:"password",label:"Password",children:ce.jsx(br.Password,{})}),ce.jsx(Yn.Item,{name:"confirm_password",label:"Confirm Password",children:ce.jsx(br.Password,{})}),ce.jsx(Fl,{}),ce.jsx(Yn.Item,{children:ce.jsx(gn,{type:"primary",loading:d,htmlType:"submit",children:o("Save")})})]})]})]}):ce.jsx(br.Password,Le({},n))};var zFe=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,function(s){return r[s]}.bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=9)}([function(e,t){e.exports=b},function(e,t,n){var r;/*!
514
514
  Copyright (c) 2017 Jed Watson.
515
515
  Licensed under the MIT License (MIT), see
516
516
  http://jedwatson.github.io/classnames
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fastadmin"
3
- version = "0.2.12"
3
+ version = "0.2.13"
4
4
  description = "FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Flask/Django inspired by Django Admin."
5
5
  authors = ["Seva D <vsdudakov@gmail.com>"]
6
6
  license = "MIT"
File without changes
File without changes