fastapi-rtk 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fastapi-rtk.es.js
CHANGED
|
@@ -724,13 +724,11 @@ function hi(e, { autoInvoke: t = !0, initialLoading: r = !1, ...n }) {
|
|
|
724
724
|
const y = await g.json();
|
|
725
725
|
if (!g.ok)
|
|
726
726
|
throw new Error(y.detail);
|
|
727
|
-
return a(y), y;
|
|
728
|
-
}).catch((g) => (g.name !== "AbortError" && c(g), g))
|
|
729
|
-
s(!1);
|
|
730
|
-
});
|
|
727
|
+
return a(y), s(!1), y;
|
|
728
|
+
}).catch((g) => (g && g.name !== "AbortError" && (c(g), s(!1)), g));
|
|
731
729
|
}, [e]), p = Te(() => {
|
|
732
730
|
var g;
|
|
733
|
-
u.current && ((g = u.current) == null || g.abort(""));
|
|
731
|
+
u.current && ((g = u.current) == null || g.abort(""), s(!1));
|
|
734
732
|
}, []);
|
|
735
733
|
return $e(() => (t && f(), () => {
|
|
736
734
|
u.current && u.current.abort("");
|
|
@@ -9266,7 +9264,7 @@ function er(e, t) {
|
|
|
9266
9264
|
var r = {};
|
|
9267
9265
|
for (var n in e)
|
|
9268
9266
|
if ({}.hasOwnProperty.call(e, n)) {
|
|
9269
|
-
if (t.
|
|
9267
|
+
if (t.includes(n))
|
|
9270
9268
|
continue;
|
|
9271
9269
|
r[n] = e[n];
|
|
9272
9270
|
}
|
|
@@ -9355,7 +9353,7 @@ function QC() {
|
|
|
9355
9353
|
var o = {};
|
|
9356
9354
|
for (var a in r)
|
|
9357
9355
|
if ({}.hasOwnProperty.call(r, a)) {
|
|
9358
|
-
if (n.
|
|
9356
|
+
if (n.includes(a))
|
|
9359
9357
|
continue;
|
|
9360
9358
|
o[a] = r[a];
|
|
9361
9359
|
}
|
|
@@ -10506,7 +10504,7 @@ process.env.NODE_ENV !== "production" && (vd.propTypes = {
|
|
|
10506
10504
|
styles: V.oneOfType([V.array, V.string, V.object, V.func])
|
|
10507
10505
|
});
|
|
10508
10506
|
/**
|
|
10509
|
-
* @mui/styled-engine v5.
|
|
10507
|
+
* @mui/styled-engine v5.16.1
|
|
10510
10508
|
*
|
|
10511
10509
|
* @license MIT
|
|
10512
10510
|
* This source code is licensed under the MIT license found in the
|
package/dist/fastapi-rtk.umd.js
CHANGED
|
@@ -29,7 +29,7 @@ Check the top-level render call using <`+R+">.")}return E}}function gn(m,E){{if(
|
|
|
29
29
|
<%s {...props} />
|
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
|
31
31
|
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,et,be,ir,be),Ni[be+et]=!0}}return m===n?Mi(I):Di(I),I}}function Mr(m,E,R){return at(m,E,R,!0)}function Fi(m,E,R){return at(m,E,R,!1)}var Li=Fi,zi=Mr;Lr.Fragment=n,Lr.jsx=Li,Lr.jsxs=zi}()),Lr}process.env.NODE_ENV==="production"?Vi.exports=Fd():Vi.exports=Ld();var d=Vi.exports;function Ve({path:e,method:t,body:r=void 0,queryParams:n=void 0}){Object.entries(n||{}).forEach(([o,a])=>{(Array.isArray(a)||typeof a=="object")&&(a=JSON.stringify(a)),e.includes("?")||(e+="?"),e+=`${o}=${a}&`}),e.endsWith("&")&&(e=e.slice(0,-1));const i={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:r?JSON.stringify(r):null};return{fetchPath:e,options:i}}function zd(e){const t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(let i=0;i<e.length;i++){let o=e[i];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(i>0&&(o=o.replace(/^[\/]+/,"")),i<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}let r=t.join("/");r=r.replace(/\/(\?|&|#[^!])/g,"$1");const n=r.split("?");return r=n.shift()+(n.length>0?"?":"")+n.join("&"),r}function Pe(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return zd(t)}function yn(e,{autoInvoke:t=!0,initialLoading:r=!1,...n}){const[i,o]=T.useState(null),[a,s]=T.useState(r),[l,u]=T.useState(null),c=T.useRef(null),f=T.useCallback(()=>{if(e)return u(null),c.current&&c.current.abort(),c.current=new AbortController,s(!0),fetch(e,{signal:c.current.signal,...n}).then(async g=>{const y=await g.json();if(!g.ok)throw new Error(y.detail);return o(y),y}).catch(g=>(g.name!=="AbortError"&&u(g),g)).finally(()=>{s(!1)})},[e]),p=T.useCallback(()=>{var g;c.current&&((g=c.current)==null||g.abort(""))},[]);return T.useEffect(()=>(t&&f(),()=>{c.current&&c.current.abort("")}),[f,t]),{data:i,loading:a,error:l,refetch:f,abort:p}}function Ba({path:e,autoInvoke:t=!0,initialLoading:r=!0}){const{fetchPath:n,options:i}=T.useMemo(()=>Ve({path:Pe(e,"auth/user"),method:"GET"}),[e]),{data:o,loading:a,refetch:s,error:l}=yn(n,{autoInvoke:t,initialLoading:r,...i});return{user:o,loading:a,refetch:s,error:l}}function Wa({path:e,queryParams:t,autoInvoke:r=!0}){const{fetchPath:n,options:i}=T.useMemo(()=>Ve({path:Pe(e,"/"),method:"GET",queryParams:t}),[e,t]),{data:o,loading:a,refetch:s,error:l}=yn(n,{autoInvoke:r,...i});return{data:T.useMemo(()=>{if(!o)return null;const c=o.result.map((f,p)=>{const g=o.ids[p];return typeof g=="object"?{...f,...g}:{...f,id:g}});return{...o,result:c}},[o]),loading:a,refetch:s,error:l}}const Ud=async(e,t)=>{const{fetchPath:r,options:n}=Ve({path:Pe(e,"/"),method:"POST",body:t}),i=await fetch(r,n),o=await i.json();if(i.ok)return o;throw new Error(o.detail)},Vd=async(e,t)=>{const{fetchPath:r,options:n}=Ve({path:Pe(e,t.toString()),method:"DELETE"}),i=await fetch(r,n),o=await i.json();if(i.ok)return o;throw new Error(o.detail)},Bd=async(e,t)=>{const{fetchPath:r,options:n}=Ve({path:Pe(e,t.toString()),method:"GET"}),i=await fetch(r,n),o=await i.json();if(i.ok)return o;throw new Error(o.detail)},Wd=async(e,t,r)=>{const{fetchPath:n,options:i}=Ve({path:Pe(e,t.toString()),method:"PUT",body:r}),o=await fetch(n,i),a=await o.json();if(o.ok)return a;throw new Error(a.detail)},Fe=e=>e&&typeof e=="object"?JSON.stringify(e):e;function Ha(e,t){const r=e||{columns:[],filters:[],page:0,page_size:25};return t.hasOwnProperty("columns")&&(r.columns=t.columns),t.hasOwnProperty("filters")&&(r.filters=t.filters),t.hasOwnProperty("order_column")&&(r.order_column=t.order_column),t.hasOwnProperty("order_direction")&&(r.order_direction=t.order_direction),t.hasOwnProperty("page")&&(r.page=t.page),t.hasOwnProperty("page_size")&&(r.page_size=t.page_size),r}const Ga=e=>{const t={};for(const r of e)switch(r.type){case"RelatedList":t[r.name]=[];break;case"Related":t[r.name]=void 0;break;case"Boolean":t[r.name]="false";break;case"Date":case"DateTime":t[r.name]=void 0;break;case"Integer":case"Float":t[r.name]=void 0;break;default:t[r.name]=""}return t};function qt(e){this._maxSize=e,this.clear()}qt.prototype.clear=function(){this._size=0,this._values=Object.create(null)},qt.prototype.get=function(e){return this._values[e]},qt.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Hd=/[^.^\]^[]+|(?=\[\]|\.\.)/g,qa=/^\d+$/,Gd=/^\d/,qd=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Yd=/^\s*(['"]?)(.*?)(\1)\s*$/,Bi=512,Ya=new qt(Bi),Ka=new qt(Bi),Xa=new qt(Bi),Yt={Cache:qt,split:Hi,normalizePath:Wi,setter:function(e){var t=Wi(e);return Ka.get(e)||Ka.set(e,function(n,i){for(var o=0,a=t.length,s=n;o<a-1;){var l=t[o];if(l==="__proto__"||l==="constructor"||l==="prototype")return n;s=s[t[o++]]}s[t[o]]=i})},getter:function(e,t){var r=Wi(e);return Xa.get(e)||Xa.set(e,function(i){for(var o=0,a=r.length;o<a;)if(i!=null||!t)i=i[r[o++]];else return;return i})},join:function(e){return e.reduce(function(t,r){return t+(Gi(r)||qa.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){Kd(Array.isArray(e)?e:Hi(e),t,r)}};function Wi(e){return Ya.get(e)||Ya.set(e,Hi(e).map(function(t){return t.replace(Yd,"$2")}))}function Hi(e){return e.match(Hd)||[""]}function Kd(e,t,r){var n=e.length,i,o,a,s;for(o=0;o<n;o++)i=e[o],i&&(Zd(i)&&(i='"'+i+'"'),s=Gi(i),a=!s&&/^\d+$/.test(i),t.call(r,i,s,a,o,e))}function Gi(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function Xd(e){return e.match(Gd)&&!e.match(qa)}function Jd(e){return qd.test(e)}function Zd(e){return!Gi(e)&&(Xd(e)||Jd(e))}const Qd=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,vn=e=>e.match(Qd)||[],bn=e=>e[0].toUpperCase()+e.slice(1),qi=(e,t)=>vn(e).join(t).toLowerCase(),Ja=e=>vn(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var Yi={words:vn,upperFirst:bn,camelCase:Ja,pascalCase:e=>bn(Ja(e)),snakeCase:e=>qi(e,"_"),kebabCase:e=>qi(e,"-"),sentenceCase:e=>bn(qi(e," ")),titleCase:e=>vn(e).map(bn).join(" ")},Ki={exports:{}};Ki.exports=function(e){return Za(ep(e),e)},Ki.exports.array=Za;function Za(e,t){var r=e.length,n=new Array(r),i={},o=r,a=tp(t),s=rp(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});o--;)i[o]||l(e[o],o,new Set);return n;function l(u,c,f){if(f.has(u)){var p;try{p=", node was:"+JSON.stringify(u)}catch{p=""}throw new Error("Cyclic dependency"+p)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[c]){i[c]=!0;var g=a.get(u)||new Set;if(g=Array.from(g),c=g.length){f.add(u);do{var y=g[--c];l(y,s.get(y),f)}while(c);f.delete(u)}n[--r]=u}}}function ep(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var i=e[r];t.add(i[0]),t.add(i[1])}return Array.from(t)}function tp(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function rp(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var np=Ki.exports;const ip=Ot(np),op=Object.prototype.toString,ap=Error.prototype.toString,sp=RegExp.prototype.toString,lp=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",up=/^Symbol\((.*)\)(.*)$/;function cp(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Qa(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return cp(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return lp.call(e).replace(up,"Symbol($1)");const n=op.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+ap.call(e)+"]":n==="RegExp"?sp.call(e):null}function xt(e,t){let r=Qa(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let o=Qa(this[n],t);return o!==null?o:i},2)}function es(e){return e==null?[]:[].concat(e)}let ts,rs,ns,fp=/\$\{\s*(\w+)\s*\}/g;ts=Symbol.toStringTag;class is{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[ts]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],es(t).forEach(o=>{if(Le.isError(o)){this.errors.push(...o.errors);const a=o.inner.length?o.inner:[o];this.inner.push(...a)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}rs=Symbol.hasInstance,ns=Symbol.toStringTag;class Le extends Error{static formatError(t,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof t=="string"?t.replace(fp,(i,o)=>xt(r[o])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,o){const a=new is(t,r,n,i);if(o)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ns]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Le)}static[rs](t){return is[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let _t={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${xt(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${xt(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${xt(r,!0)}\``+i}},Ke={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Mt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Xi={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ji={isValue:"${path} field must be ${value}"},Zi={noUnknown:"${path} field has unspecified keys: ${unknown}"},xn={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},os={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${xt(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${xt(r,!0)}\``}return Le.formatError(_t.notType,e)}};var as=Object.assign(Object.create(null),{mixed:_t,string:Ke,number:Mt,date:Xi,object:Zi,array:xn,boolean:Ji,tuple:os});const Kt=e=>e&&e.__isYupSchema__;class _n{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:o}=r,a=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new _n(t,(s,l)=>{var u;let c=a(...s)?i:o;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(o=>o.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!Kt(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const Tn={context:"$",value:"."};function dp(e,t){return new Nt(e,t)}class Nt{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Tn.context,this.isValue=this.key[0]===Tn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Tn.context:this.isValue?Tn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Yt.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Nt.prototype.__isYupRef=!0;const pt=e=>e==null;function ar(e){function t({value:r,path:n="",options:i,originalValue:o,schema:a},s,l){const{name:u,test:c,params:f,message:p,skipAbsent:g}=e;let{parent:y,context:h,abortEarly:x=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=i;function j(U){return Nt.isRef(U)?U.getValue(r,y,h):U}function M(U={}){const se=Object.assign({value:r,originalValue:o,label:a.spec.label,path:U.path||n,spec:a.spec,disableStackTrace:U.disableStackTrace||w},f,U.params);for(const ge of Object.keys(se))se[ge]=j(se[ge]);const he=new Le(Le.formatError(U.message||p,se),r,se.path,U.type||u,se.disableStackTrace);return he.params=se,he}const F=x?s:l;let _={path:n,parent:y,type:u,from:i.from,createError:M,resolve:j,options:i,originalValue:o,schema:a};const P=U=>{Le.isError(U)?F(U):U?l(null):F(M())},D=U=>{Le.isError(U)?F(U):s(U)};if(g&&pt(r))return P(!0);let ae;try{var Oe;if(ae=c.call(_,r,_),typeof((Oe=ae)==null?void 0:Oe.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(ae).then(P,D)}}catch(U){D(U);return}P(ae)}return t.OPTIONS=e,t}function Qi(e,t,r,n=r){let i,o,a;return t?(Yt.forEach(t,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",p=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[p],e=f?e.spec.types[p]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);i=r,r=r&&r[c],e=e.fields[c]}o=c,a=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:o}):{parent:i,parentPath:t,schema:e}}function pp(e,t,r,n){return Qi(e,t,r,n).schema}class En extends Set{describe(){const t=[];for(const r of this.values())t.push(Nt.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new En(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function sr(e,t=new Map){if(Kt(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=sr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,sr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(sr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=sr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class ze{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new En,this._blacklist=new En,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(_t.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=sr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(o=>{t.tests.forEach(a=>{o.test(a.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,o)=>o.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,o;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",o=n._cast(t,r);if(r.assert!==!1&&!n.isType(o)){if(i&&pt(o))return o;let a=xt(t),s=xt(o);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
32
|
+
<%s key={someKey} {...props} />`,et,be,ir,be),Ni[be+et]=!0}}return m===n?Mi(I):Di(I),I}}function Mr(m,E,R){return at(m,E,R,!0)}function Fi(m,E,R){return at(m,E,R,!1)}var Li=Fi,zi=Mr;Lr.Fragment=n,Lr.jsx=Li,Lr.jsxs=zi}()),Lr}process.env.NODE_ENV==="production"?Vi.exports=Fd():Vi.exports=Ld();var d=Vi.exports;function Ve({path:e,method:t,body:r=void 0,queryParams:n=void 0}){Object.entries(n||{}).forEach(([o,a])=>{(Array.isArray(a)||typeof a=="object")&&(a=JSON.stringify(a)),e.includes("?")||(e+="?"),e+=`${o}=${a}&`}),e.endsWith("&")&&(e=e.slice(0,-1));const i={method:t,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:r?JSON.stringify(r):null};return{fetchPath:e,options:i}}function zd(e){const t=[];if(e.length===0)return"";if(typeof e[0]!="string")throw new TypeError("Url must be a string. Received "+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(let i=0;i<e.length;i++){let o=e[i];if(typeof o!="string")throw new TypeError("Url must be a string. Received "+o);o!==""&&(i>0&&(o=o.replace(/^[\/]+/,"")),i<e.length-1?o=o.replace(/[\/]+$/,""):o=o.replace(/[\/]+$/,"/"),t.push(o))}let r=t.join("/");r=r.replace(/\/(\?|&|#[^!])/g,"$1");const n=r.split("?");return r=n.shift()+(n.length>0?"?":"")+n.join("&"),r}function Pe(...e){const t=Array.from(Array.isArray(e[0])?e[0]:e);return zd(t)}function yn(e,{autoInvoke:t=!0,initialLoading:r=!1,...n}){const[i,o]=T.useState(null),[a,s]=T.useState(r),[l,u]=T.useState(null),c=T.useRef(null),f=T.useCallback(()=>{if(e)return u(null),c.current&&c.current.abort(),c.current=new AbortController,s(!0),fetch(e,{signal:c.current.signal,...n}).then(async g=>{const y=await g.json();if(!g.ok)throw new Error(y.detail);return o(y),s(!1),y}).catch(g=>(g&&g.name!=="AbortError"&&(u(g),s(!1)),g))},[e]),p=T.useCallback(()=>{var g;c.current&&((g=c.current)==null||g.abort(""),s(!1))},[]);return T.useEffect(()=>(t&&f(),()=>{c.current&&c.current.abort("")}),[f,t]),{data:i,loading:a,error:l,refetch:f,abort:p}}function Ba({path:e,autoInvoke:t=!0,initialLoading:r=!0}){const{fetchPath:n,options:i}=T.useMemo(()=>Ve({path:Pe(e,"auth/user"),method:"GET"}),[e]),{data:o,loading:a,refetch:s,error:l}=yn(n,{autoInvoke:t,initialLoading:r,...i});return{user:o,loading:a,refetch:s,error:l}}function Wa({path:e,queryParams:t,autoInvoke:r=!0}){const{fetchPath:n,options:i}=T.useMemo(()=>Ve({path:Pe(e,"/"),method:"GET",queryParams:t}),[e,t]),{data:o,loading:a,refetch:s,error:l}=yn(n,{autoInvoke:r,...i});return{data:T.useMemo(()=>{if(!o)return null;const c=o.result.map((f,p)=>{const g=o.ids[p];return typeof g=="object"?{...f,...g}:{...f,id:g}});return{...o,result:c}},[o]),loading:a,refetch:s,error:l}}const Ud=async(e,t)=>{const{fetchPath:r,options:n}=Ve({path:Pe(e,"/"),method:"POST",body:t}),i=await fetch(r,n),o=await i.json();if(i.ok)return o;throw new Error(o.detail)},Vd=async(e,t)=>{const{fetchPath:r,options:n}=Ve({path:Pe(e,t.toString()),method:"DELETE"}),i=await fetch(r,n),o=await i.json();if(i.ok)return o;throw new Error(o.detail)},Bd=async(e,t)=>{const{fetchPath:r,options:n}=Ve({path:Pe(e,t.toString()),method:"GET"}),i=await fetch(r,n),o=await i.json();if(i.ok)return o;throw new Error(o.detail)},Wd=async(e,t,r)=>{const{fetchPath:n,options:i}=Ve({path:Pe(e,t.toString()),method:"PUT",body:r}),o=await fetch(n,i),a=await o.json();if(o.ok)return a;throw new Error(a.detail)},Fe=e=>e&&typeof e=="object"?JSON.stringify(e):e;function Ha(e,t){const r=e||{columns:[],filters:[],page:0,page_size:25};return t.hasOwnProperty("columns")&&(r.columns=t.columns),t.hasOwnProperty("filters")&&(r.filters=t.filters),t.hasOwnProperty("order_column")&&(r.order_column=t.order_column),t.hasOwnProperty("order_direction")&&(r.order_direction=t.order_direction),t.hasOwnProperty("page")&&(r.page=t.page),t.hasOwnProperty("page_size")&&(r.page_size=t.page_size),r}const Ga=e=>{const t={};for(const r of e)switch(r.type){case"RelatedList":t[r.name]=[];break;case"Related":t[r.name]=void 0;break;case"Boolean":t[r.name]="false";break;case"Date":case"DateTime":t[r.name]=void 0;break;case"Integer":case"Float":t[r.name]=void 0;break;default:t[r.name]=""}return t};function qt(e){this._maxSize=e,this.clear()}qt.prototype.clear=function(){this._size=0,this._values=Object.create(null)},qt.prototype.get=function(e){return this._values[e]},qt.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Hd=/[^.^\]^[]+|(?=\[\]|\.\.)/g,qa=/^\d+$/,Gd=/^\d/,qd=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Yd=/^\s*(['"]?)(.*?)(\1)\s*$/,Bi=512,Ya=new qt(Bi),Ka=new qt(Bi),Xa=new qt(Bi),Yt={Cache:qt,split:Hi,normalizePath:Wi,setter:function(e){var t=Wi(e);return Ka.get(e)||Ka.set(e,function(n,i){for(var o=0,a=t.length,s=n;o<a-1;){var l=t[o];if(l==="__proto__"||l==="constructor"||l==="prototype")return n;s=s[t[o++]]}s[t[o]]=i})},getter:function(e,t){var r=Wi(e);return Xa.get(e)||Xa.set(e,function(i){for(var o=0,a=r.length;o<a;)if(i!=null||!t)i=i[r[o++]];else return;return i})},join:function(e){return e.reduce(function(t,r){return t+(Gi(r)||qa.test(r)?"["+r+"]":(t?".":"")+r)},"")},forEach:function(e,t,r){Kd(Array.isArray(e)?e:Hi(e),t,r)}};function Wi(e){return Ya.get(e)||Ya.set(e,Hi(e).map(function(t){return t.replace(Yd,"$2")}))}function Hi(e){return e.match(Hd)||[""]}function Kd(e,t,r){var n=e.length,i,o,a,s;for(o=0;o<n;o++)i=e[o],i&&(Zd(i)&&(i='"'+i+'"'),s=Gi(i),a=!s&&/^\d+$/.test(i),t.call(r,i,s,a,o,e))}function Gi(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function Xd(e){return e.match(Gd)&&!e.match(qa)}function Jd(e){return qd.test(e)}function Zd(e){return!Gi(e)&&(Xd(e)||Jd(e))}const Qd=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,vn=e=>e.match(Qd)||[],bn=e=>e[0].toUpperCase()+e.slice(1),qi=(e,t)=>vn(e).join(t).toLowerCase(),Ja=e=>vn(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,"");var Yi={words:vn,upperFirst:bn,camelCase:Ja,pascalCase:e=>bn(Ja(e)),snakeCase:e=>qi(e,"_"),kebabCase:e=>qi(e,"-"),sentenceCase:e=>bn(qi(e," ")),titleCase:e=>vn(e).map(bn).join(" ")},Ki={exports:{}};Ki.exports=function(e){return Za(ep(e),e)},Ki.exports.array=Za;function Za(e,t){var r=e.length,n=new Array(r),i={},o=r,a=tp(t),s=rp(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});o--;)i[o]||l(e[o],o,new Set);return n;function l(u,c,f){if(f.has(u)){var p;try{p=", node was:"+JSON.stringify(u)}catch{p=""}throw new Error("Cyclic dependency"+p)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!i[c]){i[c]=!0;var g=a.get(u)||new Set;if(g=Array.from(g),c=g.length){f.add(u);do{var y=g[--c];l(y,s.get(y),f)}while(c);f.delete(u)}n[--r]=u}}}function ep(e){for(var t=new Set,r=0,n=e.length;r<n;r++){var i=e[r];t.add(i[0]),t.add(i[1])}return Array.from(t)}function tp(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}function rp(e){for(var t=new Map,r=0,n=e.length;r<n;r++)t.set(e[r],r);return t}var np=Ki.exports;const ip=Ot(np),op=Object.prototype.toString,ap=Error.prototype.toString,sp=RegExp.prototype.toString,lp=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",up=/^Symbol\((.*)\)(.*)$/;function cp(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Qa(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return cp(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return lp.call(e).replace(up,"Symbol($1)");const n=op.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+ap.call(e)+"]":n==="RegExp"?sp.call(e):null}function xt(e,t){let r=Qa(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let o=Qa(this[n],t);return o!==null?o:i},2)}function es(e){return e==null?[]:[].concat(e)}let ts,rs,ns,fp=/\$\{\s*(\w+)\s*\}/g;ts=Symbol.toStringTag;class is{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[ts]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],es(t).forEach(o=>{if(Le.isError(o)){this.errors.push(...o.errors);const a=o.inner.length?o.inner:[o];this.inner.push(...a)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}rs=Symbol.hasInstance,ns=Symbol.toStringTag;class Le extends Error{static formatError(t,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof t=="string"?t.replace(fp,(i,o)=>xt(r[o])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,o){const a=new is(t,r,n,i);if(o)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ns]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Le)}static[rs](t){return is[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let _t={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${xt(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${xt(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${xt(r,!0)}\``+i}},Ke={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Mt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Xi={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ji={isValue:"${path} field must be ${value}"},Zi={noUnknown:"${path} field has unspecified keys: ${unknown}"},xn={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},os={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${xt(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${xt(r,!0)}\``}return Le.formatError(_t.notType,e)}};var as=Object.assign(Object.create(null),{mixed:_t,string:Ke,number:Mt,date:Xi,object:Zi,array:xn,boolean:Ji,tuple:os});const Kt=e=>e&&e.__isYupSchema__;class _n{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:o}=r,a=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new _n(t,(s,l)=>{var u;let c=a(...s)?i:o;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(o=>o.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!Kt(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const Tn={context:"$",value:"."};function dp(e,t){return new Nt(e,t)}class Nt{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Tn.context,this.isValue=this.key[0]===Tn.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Tn.context:this.isValue?Tn.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Yt.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Nt.prototype.__isYupRef=!0;const pt=e=>e==null;function ar(e){function t({value:r,path:n="",options:i,originalValue:o,schema:a},s,l){const{name:u,test:c,params:f,message:p,skipAbsent:g}=e;let{parent:y,context:h,abortEarly:x=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=i;function j(U){return Nt.isRef(U)?U.getValue(r,y,h):U}function M(U={}){const se=Object.assign({value:r,originalValue:o,label:a.spec.label,path:U.path||n,spec:a.spec,disableStackTrace:U.disableStackTrace||w},f,U.params);for(const ge of Object.keys(se))se[ge]=j(se[ge]);const he=new Le(Le.formatError(U.message||p,se),r,se.path,U.type||u,se.disableStackTrace);return he.params=se,he}const F=x?s:l;let _={path:n,parent:y,type:u,from:i.from,createError:M,resolve:j,options:i,originalValue:o,schema:a};const P=U=>{Le.isError(U)?F(U):U?l(null):F(M())},D=U=>{Le.isError(U)?F(U):s(U)};if(g&&pt(r))return P(!0);let ae;try{var Oe;if(ae=c.call(_,r,_),typeof((Oe=ae)==null?void 0:Oe.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(ae).then(P,D)}}catch(U){D(U);return}P(ae)}return t.OPTIONS=e,t}function Qi(e,t,r,n=r){let i,o,a;return t?(Yt.forEach(t,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:i,value:r});let f=e.type==="tuple",p=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[p],e=f?e.spec.types[p]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);i=r,r=r&&r[c],e=e.fields[c]}o=c,a=l?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:o}):{parent:i,parentPath:t,schema:e}}function pp(e,t,r,n){return Qi(e,t,r,n).schema}class En extends Set{describe(){const t=[];for(const r of this.values())t.push(Nt.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new En(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function sr(e,t=new Map){if(Kt(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=sr(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,sr(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(sr(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=sr(i,t)}else throw Error(`Unable to clone ${e}`);return r}class ze{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new En,this._blacklist=new En,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(_t.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=sr(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(o=>{t.tests.forEach(a=>{o.test(a.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,o)=>o.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,o;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),i=r.assert==="ignore-optionality",o=n._cast(t,r);if(r.assert!==!1&&!n.isType(o)){if(i&&pt(o))return o;let a=xt(t),s=xt(o);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
33
33
|
|
|
34
34
|
attempted value: ${a}
|
|
35
35
|
`+(s!==a?`result of cast: ${s}`:""))}return o}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,o)=>o.call(this,i,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:o,originalValue:a=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:o,value:l,originalValue:a,options:r,tests:u},n,c=>{if(c.length)return i(c,l);this.runTests({path:o,value:l,originalValue:a,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:o,value:a,originalValue:s,path:l,options:u}=t,c=h=>{i||(i=!0,r(h,a))},f=h=>{i||(i=!0,n(h,a))},p=o.length,g=[];if(!p)return f([]);let y={value:a,originalValue:s,path:l,options:u,schema:this};for(let h=0;h<o.length;h++){const x=o[h];x(y,c,function(j){j&&(Array.isArray(j)?g.push(...j):g.push(j)),--p<=0&&f(g)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:o,options:a}){const s=t??r;if(s==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof s=="number";let u=n[s];const c=Object.assign({},a,{strict:!0,parent:n,value:u,originalValue:o[s],key:void 0,[l?"index":"key"]:s,path:l||s.includes(".")?`${i||""}[${l?s:`"${s}"`}]`:(i?`${i}.`:"")+t});return(f,p,g)=>this.resolve(c)._validate(u,c,p,g)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),o=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((a,s)=>i._validate(t,r,(l,u)=>{Le.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new Le(l,u,void 0,void 0,o)):a(u)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),o,a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw Le.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new Le(s,t,void 0,void 0,a);o=l}),o}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Le.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Le.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):sr(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=ar({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=ar({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=_t.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=_t.notNull){return this.nullability(!1,t)}required(t=_t.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=_t.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=ar(r),o=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(a=>!(a.OPTIONS.name===r.name&&(o||a.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=es(t).map(o=>new Nt(o));return i.forEach(o=>{o.isSibling&&n.deps.push(o.key)}),n.conditions.push(typeof r=="function"?new _n(i,r):_n.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=ar({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=_t.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=ar({message:r,name:"oneOf",skipAbsent:!0,test(i){let o=this.schema._whitelist,a=o.resolveAll(this.resolve);return a.includes(i)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:a}})}}),n}notOneOf(t,r=_t.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=ar({message:r,name:"notOneOf",test(i){let o=this.schema._blacklist,a=o.resolveAll(this.resolve);return a.includes(i)?this.createError({params:{values:Array.from(o).join(", "),resolved:a}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:o,nullable:a}=r.spec;return{meta:i,label:n,optional:o,nullable:a,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}ze.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ze.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:o,schema:a}=Qi(this,t,r,n.context);return a[e](i&&i[o],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])ze.prototype[e]=ze.prototype.oneOf;for(const e of["not","nope"])ze.prototype[e]=ze.prototype.notOneOf;const hp=()=>!0;function Sn(e){return new eo(e)}class eo extends ze{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:hp},t))}}Sn.prototype=eo.prototype;function to(){return new ro}class ro extends ze{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(n.spec.coerce&&!n.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=Ji.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return pt(r)||r===!0}})}isFalse(t=Ji.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return pt(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}to.prototype=ro.prototype;const mp=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function gp(e){const t=no(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function no(e){var t,r;const n=mp.exec(e);return n?{year:At(n[1]),month:At(n[2],1)-1,day:At(n[3],1),hour:At(n[4]),minute:At(n[5]),second:At(n[6]),millisecond:n[7]?At(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:At(n[10]),minuteOffset:At(n[11])}:null}function At(e,t=0){return Number(e)||t}let yp=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vp=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,bp=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,xp="^\\d{4}-\\d{2}-\\d{2}",_p="\\d{2}:\\d{2}:\\d{2}",Tp="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ep=new RegExp(`${xp}T${_p}(\\.\\d+)?${Tp}$`),Sp=e=>pt(e)||e===e.trim(),wp={}.toString();function wn(){return new io}class io extends ze{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const i=t!=null&&t.toString?t.toString():t;return i===wp?t:i})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||_t.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=Ke.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=Ke.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=Ke.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,o;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:o}=r:i=r),this.test({name:o||"matches",message:i||Ke.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&n||a.search(t)!==-1})}email(t=Ke.email){return this.matches(yp,{name:"email",message:t,excludeEmptyString:!0})}url(t=Ke.url){return this.matches(vp,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Ke.uuid){return this.matches(bp,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Ep,{name:"datetime",message:r||Ke.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||Ke.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:o=>{if(!o||n)return!0;const a=no(o);return a?!!a.z:!1}}).test({name:"datetime_precision",message:r||Ke.datetime_precision,params:{precision:i},skipAbsent:!0,test:o=>{if(!o||i==null)return!0;const a=no(o);return a?a.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Ke.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Sp})}lowercase(t=Ke.lowercase){return this.transform(r=>pt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>pt(r)||r===r.toLowerCase()})}uppercase(t=Ke.uppercase){return this.transform(r=>pt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>pt(r)||r===r.toUpperCase()})}}wn.prototype=io.prototype;let Cp=e=>e!=+e;function ss(){return new oo}class oo extends ze{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Cp(t)}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce)return t;let i=t;if(typeof i=="string"){if(i=i.replace(/\s/g,""),i==="")return NaN;i=+i}return n.isType(i)||i===null?i:parseFloat(i)})})}min(t,r=Mt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=Mt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=Mt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=Mt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=Mt.positive){return this.moreThan(0,t)}negative(t=Mt.negative){return this.lessThan(0,t)}integer(t=Mt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>pt(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>pt(i)?i:Math[t](i))}}ss.prototype=oo.prototype;let ls=new Date(""),Op=e=>Object.prototype.toString.call(e)==="[object Date]";function ao(){return new lr}class lr extends ze{constructor(){super({type:"date",check(t){return Op(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=gp(t),isNaN(t)?lr.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Nt.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=Xi.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=Xi.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}lr.INVALID_DATE=ls,ao.prototype=lr.prototype,ao.INVALID_DATE=ls;function Ap(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([a,s])=>`${a}-${s}`));function o(a,s){let l=Yt.split(a)[0];n.add(l),i.has(`${s}-${l}`)||r.push([s,l])}for(const a of Object.keys(e)){let s=e[a];n.add(a),Nt.isRef(s)&&s.isSibling?o(s.path,a):Kt(s)&&"deps"in s&&s.deps.forEach(l=>o(l,a))}return ip.array(Array.from(n),r).reverse()}function us(e,t){let r=1/0;return e.some((n,i)=>{var o;if((o=t.path)!=null&&o.includes(n))return r=i,!0}),r}function cs(e){return(t,r)=>us(e,t)-us(e,r)}const fs=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Cn(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Cn(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Cn(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Cn)}):"optional"in e?e.optional():e}const Pp=(e,t)=>{const r=[...Yt.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Yt.getter(Yt.join(r),!0)(e);return!!(i&&n in i)};let ds=e=>Object.prototype.toString.call(e)==="[object Object]";function kp(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const jp=cs([]);function zr(e){return new so(e)}class so extends ze{constructor(t){super({type:"object",check(r){return ds(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=jp,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let o=this.fields,a=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(i).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of s){let p=o[f],g=f in i;if(p){let y,h=i[f];u.path=(r.path?`${r.path}.`:"")+f,p=p.resolve({value:h,context:r.context,parent:l});let x=p instanceof ze?p.spec:void 0,w=x==null?void 0:x.strict;if(x!=null&&x.strip){c=c||f in i;continue}y=!r.__validating||!w?p.cast(i[f],u):i[f],y!==void 0&&(l[f]=y)}else g&&!a&&(l[f]=i[f]);(g!==f in l||l[f]!==i[f])&&(c=!0)}return c?l:i}_validate(t,r={},n,i){let{from:o=[],originalValue:a=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:a},...o],r.__validating=!0,r.originalValue=a,super._validate(t,r,n,(l,u)=>{if(!s||!ds(u)){i(l,u);return}a=a||u;let c=[];for(let f of this._nodes){let p=this.fields[f];!p||Nt.isRef(p)||c.push(p.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:a}))}this.runTests({tests:c,value:u,originalValue:a,options:r},n,f=>{i(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,o]of Object.entries(this.fields)){const a=n[i];n[i]=a===void 0?o:a}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const o=this.fields[n];let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[n]})),r[n]=o&&"getDefault"in o?o.getDefault(a):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Ap(t,r),n._sortErrors=cs(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Cn(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Yt.getter(t,!0);return this.transform(o=>{if(!o)return o;let a=o;return Pp(o,t)&&(a=Object.assign({},o),n||delete a[t],a[r]=i(o)),a})}json(){return this.transform(fs)}noUnknown(t=!0,r=Zi.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const o=kp(this.schema,i);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Zi.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(Yi.camelCase)}snakeCase(){return this.transformKeys(Yi.snakeCase)}constantCase(){return this.transformKeys(t=>Yi.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[o,a]of Object.entries(r.fields)){var i;let s=t;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[o]})),n.fields[o]=a.describe(s)}return n}}zr.prototype=so.prototype;function lo(e){return new uo(e)}class uo extends ze{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){const n=super._cast(t,r);if(!this._typeCheck(n)||!this.innerType)return n;let i=!1;const o=n.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},r,{path:`${r.path||""}[${s}]`}));return l!==a&&(i=!0),l});return i?o:n}_validate(t,r={},n,i){var o;let a=this.innerType,s=(o=r.recursive)!=null?o:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,n,(l,u)=>{var c;if(!s||!a||!this._typeCheck(u)){i(l,u);return}let f=new Array(u.length);for(let g=0;g<u.length;g++){var p;f[g]=a.asNestedTest({options:r,index:g,parent:u,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:u,tests:f,originalValue:(c=r.originalValue)!=null?c:t,options:r},n,g=>i(g.concat(l),u))})}clone(t){const r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(fs)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!Kt(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+xt(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=xn.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r){return r=r||xn.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r){return r=r||xn.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(n,i,o)=>!t(n,i,o):n=>!!n;return this.transform(n=>n!=null?n.filter(r):n)}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);if(r.innerType){var i;let o=t;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[0]})),n.innerType=r.innerType.describe(o)}return n}}lo.prototype=uo.prototype;function ps(e){return new co(e)}class co extends ze{constructor(t){super({type:"tuple",spec:{types:t},check(r){const n=this.spec.types;return Array.isArray(r)&&r.length===n.length}}),this.withMutation(()=>{this.typeError(os.notType)})}_cast(t,r){const{types:n}=this.spec,i=super._cast(t,r);if(!this._typeCheck(i))return i;let o=!1;const a=n.map((s,l)=>{const u=s.cast(i[l],Object.assign({},r,{path:`${r.path||""}[${l}]`}));return u!==i[l]&&(o=!0),u});return o?a:i}_validate(t,r={},n,i){let o=this.spec.types;super._validate(t,r,n,(a,s)=>{var l;if(!this._typeCheck(s)){i(a,s);return}let u=[];for(let[f,p]of o.entries()){var c;u[f]=p.asNestedTest({options:r,index:f,parent:s,parentPath:r.path,originalParent:(c=r.originalValue)!=null?c:t})}this.runTests({value:s,tests:u,originalValue:(l=r.originalValue)!=null?l:t,options:r},n,f=>i(f.concat(a),s))})}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);return n.innerType=r.spec.types.map((i,o)=>{var a;let s=t;return(a=s)!=null&&a.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[o]})),i.describe(s)}),n}}ps.prototype=co.prototype;function Ip(e){return new fo(e)}class fo{constructor(t){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(r,n={})=>{let i=this.builder(r,n);if(!Kt(i))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(i=i.optional()),i.resolve(n)},this.builder=t,this.spec={meta:void 0,optional:!1}}clone(t){const r=new fo(this.builder);return r.spec=Object.assign({},this.spec,t),r}optionality(t){return this.clone({optional:t})}optional(){return this.optionality(!0)}resolve(t){return this._resolve(t.value,t)}cast(t,r){return this._resolve(t,r).cast(t,r)}asNestedTest(t){let{key:r,index:n,parent:i,options:o}=t,a=i[n??r];return this._resolve(a,Object.assign({},o,{value:a,parent:i})).asNestedTest(t)}validate(t,r){return this._resolve(t,r).validate(t,r)}validateSync(t,r){return this._resolve(t,r).validateSync(t,r)}validateAt(t,r,n){return this._resolve(r,n).validateAt(t,r,n)}validateSyncAt(t,r,n){return this._resolve(r,n).validateSyncAt(t,r,n)}isValid(t,r){return this._resolve(t,r).isValid(t,r)}isValidSync(t,r){return this._resolve(t,r).isValidSync(t,r)}describe(t){return t?this.resolve(t).describe(t):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}}function $p(e){Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(r=>{as[t][r]=e[t][r]})})}function Rp(e,t,r){if(!e||!Kt(e.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof t!="string")throw new TypeError("A Method name must be provided");if(typeof r!="function")throw new TypeError("Method function must be provided");e.prototype[t]=r}const hs=Object.freeze(Object.defineProperty({__proto__:null,ArraySchema:uo,BooleanSchema:ro,DateSchema:lr,MixedSchema:eo,NumberSchema:oo,ObjectSchema:so,Schema:ze,StringSchema:io,TupleSchema:co,ValidationError:Le,addMethod:Rp,array:lo,bool:to,boolean:to,date:ao,defaultLocale:as,getIn:Qi,isSchema:Kt,lazy:Ip,mixed:Sn,number:ss,object:zr,printValue:xt,reach:pp,ref:dp,setLocale:$p,string:wn,tuple:ps},Symbol.toStringTag,{value:"Module"})),ms=e=>{const t=e.reduce((r,n)=>{let{name:i,required:o,type:a}=n;switch(a){case"RelatedList":a="array";break;case"Related":a="object";break;case"Date":a="string";break;case"Integer":case"Float":a="number";break;default:a="string"}let s;try{o?s=hs[a]().typeError(`Field must be of type ${a}`).required("Field is required"):s=hs[a]().typeError(`Field must be of type ${a}`).nullable(!0)}catch(l){console.log(l)}return r[i]=s,r},{});return zr().shape(t)};function gs({path:e,autoInvoke:t=!0}){const{fetchPath:r,options:n}=T.useMemo(()=>Ve({path:Pe(e,"_info"),method:"GET"}),[e]),{data:i,loading:o,refetch:a,error:s}=yn(r,{autoInvoke:t,...n});return{info:T.useMemo(()=>i?{...i,add:{columns:i.add_columns,title:i.add_title,schema:ms(i.add_columns),defaultValues:Ga(i.add_columns)},edit:{columns:i.edit_columns,title:i.edit_title,schema:ms(i.edit_columns),defaultValues:Ga(i.edit_columns)}}:null,[i]),loading:o,refetch:a,error:s}}const ys={user:null,loading:!0,error:null};function Dp(e,t){switch(t.type){case"initCall":return{...ys};case"setUser":return{...e,user:t.payload,error:null};case"setError":return{...e,loading:!1,error:t.payload};case"setLoading":return{...e,loading:t.payload};default:return e}}function Mp(e){const[t,r]=T.useReducer(Dp,ys),{user:n,refetch:i,loading:o}=Ba({path:e});T.useEffect(()=>{r({type:"setLoading",payload:o})},[o]),T.useEffect(()=>{r({type:"setUser",payload:n})},[n]);const a=T.useCallback(async({username:f,password:p})=>{r({type:"initCall"});try{const g=new FormData;g.append("username",f),g.append("password",p);const{fetchPath:y,options:h}=Ve({path:Pe(e,"auth/login"),method:"POST"});(await fetch(y,{...h,headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(g)})).ok?i():r({type:"setError",payload:"Username or password wrong."})}catch(g){console.error("signin error",g),r({type:"setError",payload:"Failed to fetch"})}},[e,i]),s=T.useCallback(async()=>{r({type:"initCall"});try{const{fetchPath:f,options:p}=Ve({path:Pe(e,"auth/logout"),method:"POST"});(await fetch(f,p)).ok?r({type:"setUser",payload:null}):r({type:"setError",payload:"Couldn't sign out user"})}catch(f){console.error("signout error",f),r({type:"setError",payload:"Failed to fetch"})}finally{r({type:"setLoading",payload:!1})}},[e]),l=T.useCallback(async f=>{r({type:"initCall"});try{const{fetchPath:p,options:g}=Ve({path:Pe(e,"auth/user"),method:"PUT",body:f});(await fetch(p,g)).ok&&i(),r({type:"setError",payload:"Couldn't update user data"})}catch(p){console.error("update error",p),r({type:"setError",payload:"Failed to post"})}},[e,i]),u=T.useCallback(async f=>{if(!n.email)return r({type:"setError",payload:"No email found"});try{const{fetchPath:p,options:g}=Ve({path:Pe(e,"auth/forgot-password"),method:"POST",body:{email:n.email}}),y=await fetch(p,g);if(!y.ok){r({type:"setError",payload:"Couldn't request token to reset password"});return}const h=await y.json(),{token:x}=h,{fetchPath:w,options:j}=Ve({path:Pe(e,"auth/reset-password"),method:"POST",body:{token:x,password:f}});if(!(await fetch(w,j)).ok){r({type:"setError",payload:"Couldn't reset password"});return}i()}catch(p){console.error("resetPassword error",p),r({type:"setError",payload:"Failed to post"})}},[e,i,n==null?void 0:n.email]),c=T.useCallback((f,p)=>{const g=Pe(e,"auth/login",f);if(p){const x=window.screenLeft+window.outerWidth/2-250,w=window.screenTop+window.outerHeight/2-500/2,j=window.open(g+"?popup=true","auth",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=500, height=500, top=${w}, left=${x}`),M=window.setInterval(function(){j.closed!==!1&&(window.clearInterval(M),i())},200);return}window.location.href=Pe(e,"auth/login",f)},[e,i]);return{user:t.user,loading:t.loading,error:t.error,signin:a,signout:s,update:l,resetPassword:u,oauth_signin:c}}function Np(e,t){const{user:r}=t,[n,i]=T.useState(null),[o,a]=T.useState(!0),[s,l]=T.useState({error:"401 Not authorized",message:"User is not logged in."});T.useEffect(()=>{r&&u(e)},[r]);const u=async c=>{a(!0);try{const{fetchPath:f,options:p}=Ve({path:Pe(c,"info/"),method:"GET"}),g=await fetch(f,p);if(g.ok){const y=await g.json();i(y)}else l({error:"404 Not Found",message:"Couldn't fetch info"})}catch{l({error:"Network error",message:"Failed to fetch"})}finally{a(!1)}};return{info:n,loading:o,error:s}}const po=T.createContext({auth:{},info:{}});function vs(){return T.useContext(po).auth}function bs(){return T.useContext(po).info}function Fp(e){const t={baseUrl:new URL(document.baseURI).pathname+"/api/v1",inheritMantineTheme:!1},{baseUrl:r,children:n}={...t,...e},i=Mp(r),o={baseUrl:r,...Np(r,i)};return d.jsx(po.Provider,{value:{auth:i,info:o},children:n})}const Lp=async(e,t,r)=>{const{fetchPath:n,options:i}=Ve({path:Pe(t,"/download"),method:"POST"}),o=await fetch(n,{...i,body:JSON.stringify(r)});if(!o.ok)throw new Error(o.statusText);const a=await o.blob(),s=document.createElement("a"),l=URL.createObjectURL(a);s.href=l,s.download=e.toLowerCase()+".csv",s.click()},xs={queryParams:null,loading:!1,error:null};function zp(e,t){switch(t.type){case"setQueryParams":return{...e,queryParams:{...t.payload}};case"setLoading":return{...e,loading:t.payload};case"setError":return{...e,error:t.payload};default:throw new Error}}function Up({path:e,initialQueryParams:t,relation:r,fetchInfo:n=!0}){const[i,o]=T.useReducer(zp,{...xs,queryParams:t?Ha(null,t):null}),a=T.useMemo(()=>r?{...i.queryParams,filters:[...i.queryParams.filters,{col:r.foreign_key,opr:r.type,value:Fe(r.id)}]}:i.queryParams,[i.queryParams,r]),s=T.useMemo(()=>a!=null,[a]),{info:l,loading:u,refetch:c,error:f}=gs({path:e,autoInvoke:n}),{data:p,loading:g,refetch:y,error:h}=Wa({path:e,queryParams:a,autoInvoke:s});T.useEffect(()=>{if(f){o({type:"setError",payload:{message:"Couldn't fetch info",originalError:f}});return}if(h){o({type:"setError",payload:{message:"Couldn't fetch list",originalError:h}});return}o({type:"setError",payload:xs.error})},[f,h]),T.useEffect(()=>{o({type:"setLoading",payload:u||g})},[g,u]);const x=T.useCallback(P=>{const D=Ha(i.queryParams,P);o({type:"setQueryParams",payload:D})},[i.queryParams]),w=T.useCallback(async P=>{try{return await Bd(e,Fe(P))}catch(D){o({type:"setError",payload:{message:`Couldn't fetch item with id ${P}`,originalError:D}})}},[e]),j=T.useCallback(async(P,D)=>{try{const te=await Ud(e,P);return D||(c(),y()),te}catch(te){o({type:"setError",payload:{message:"Couldnt add item.",originalError:te}})}},[y,c,e]),M=T.useCallback(async(P,D,te)=>{try{const ae=await Wd(e,Fe(P),D);return te||(c(),y()),ae}catch(ae){o({type:"setError",payload:{message:`Couldn't update item with id ${P}`,originalError:ae}})}},[y,c,e]),F=T.useCallback(async(P,D)=>{try{const te=await Vd(e,Fe(P));return D||(c(),y()),te}catch(te){o({type:"setError",payload:{message:`Couldn't delete item with id ${P}`,originalError:te}})}},[y,c,e]),_=T.useCallback(async P=>{try{await Lp(P,e,i.queryParams)}catch(D){o({type:"setError",payload:{message:"Couldn't download",originalError:D}})}},[e,i.queryParams]);return{path:e,data:p,info:l,queryParams:i.queryParams,loading:i.loading,error:i.error,setQueryParams:x,refetch:y,getEntry:w,addEntry:j,updateEntry:M,deleteEntry:F,download:_}}const Vp=async(e,t,r)=>{try{const{fetchPath:n,options:i}=Ve({path:Pe(e,"/bulk",t),method:"POST",body:r}),o=await fetch(n,i);if(o.ok)return await o.json();throw new Error(o.statusText)}catch(n){throw new Error(n)}},Bp=({Api:e})=>{const[t,r]=T.useState([]),[n,i]=T.useState(null),o=T.useCallback(async(s,l)=>{try{i(null);const u=await Vp(e.path,s,t);return l?void 0:(e.refetch(),u)}catch(u){console.error(u),i({message:"Couldn't perform bulk action",originalError:u})}},[e,t]);return{bulkActions:T.useMemo(()=>({selectedIds:t,setSelectedIds:r}),[t,r]),dispatchBulkActions:o,error:n}},ho=T.createContext({Api:{path:"",data:null,info:null,queryParams:null,loading:!1,error:null,setQueryParams:e=>null,refetch:()=>null,getEntry:async e=>({}),addEntry:async(e,t)=>({}),updateEntry:async(e,t,r)=>({}),deleteEntry:async(e,t)=>({}),download:async e=>null},BulkActions:{bulkActions:{selectedIds:[],setSelectedIds:()=>{}},dispatchBulkActions:async(e,t)=>{},error:null}});function Re(){const e=T.useContext(ho);if(e===void 0)throw new Error("useApi must be used within a ApiProvider");return e.Api}function Wp(){const e=T.useContext(ho);if(e===void 0)throw new Error("useBulkActions must be used within a ApiProvider");return e.BulkActions}function _s({resource_name:e="",initialQueryParams:t,relation:r,fetchInfo:n,children:i}){const{baseUrl:o}=bs(),a=Up({path:Pe(o,e),initialQueryParams:t,relation:r,fetchInfo:n}),s=Bp({path:Pe(o,e),Api:a});return d.jsx(ho.Provider,{value:{Api:a,BulkActions:s},children:i})}function mo(e){return t=>{try{return e.validateSync(t,{abortEarly:!1}),{}}catch(r){const n={};return r instanceof Le&&r.inner.forEach(i=>{n[i.path.replaceAll("[",".").replaceAll("]","")]=i.message}),n}}}function Hp({form:e,name:t,...r}){return d.jsx(d.Fragment,{children:d.jsx(or.DateInput,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const i=new Date(n.getTime()-n.getTimezoneOffset()*6e4);e.setFieldValue(t,i.toISOString().substring(0,10))}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function Gp({form:e,name:t,...r}){return d.jsx(d.Fragment,{children:d.jsx(or.DateTimePicker,{...e.getInputProps(t),onChange:n=>{if(n instanceof Date){const i=new Date(n);e.setFieldValue(t,i.toISOString())}},value:e.getInputProps(t).value?new Date(e.getInputProps(t).value):null,...r})})}function qp({form:e,name:t,items:r,filter:n,...i}){var a;const o=r.map(s=>({value:String(Fe(s.id)),label:s.value}));return d.jsx(v.Select,{data:o,searchable:!0,...e.getInputProps(t),onChange:s=>{if(n){e.setFieldValue(t,s);return}const l=r.find(u=>String(Fe(u.id))===s)||null;e.setFieldValue(t,l)},value:n?e.getInputProps(t).value:String(Fe((a=e.getInputProps(t).value)==null?void 0:a.id))||"",...i})}function Yp({form:e,name:t,items:r,...n}){const i=r.map(a=>({value:String(Fe(a.id)),label:a.value})),o=Array.isArray(e.getInputProps(t).value)?e.getInputProps(t).value.map(a=>String(typeof a=="object"?Fe(a.id):a)):[];return d.jsx(v.MultiSelect,{data:i,searchable:!0,...e.getInputProps(t),value:o||[],...n})}function Kp({form:e,name:t,items:r,...n}){return d.jsx(v.Select,{data:r,searchable:!0,...e.getInputProps(t),value:String(e.getInputProps(t).value)||"",...n})}function Ts({form:e,name:t,...r}){return t==="password"?d.jsx(v.PasswordInput,{...e.getInputProps(t),...r}):d.jsx(v.TextInput,{...e.getInputProps(t),value:e.getInputProps(t).value||"",...r})}const Xp=/choices=\[([^\]]*)\]/;function Jp({form:e,name:t,items:r,...n}){const i=r[0].match(Xp)[1].replaceAll("'","").split(",").map(o=>(o=o.trim(),{label:o,value:o}));return d.jsx(v.Select,{data:i,searchable:!0,...e.getInputProps(t),...n,value:String(e.getInputProps(t).value)||""})}function go({form:e,name:t,schema:r,filter:n,...i}){if(!r.type)return null;switch(r.type){case"Boolean":return d.jsx(Kp,{form:e,name:t,items:[{label:"true",value:n?"1":"true"},{label:"false",value:n?"0":"false"}],...i});case"RelatedList":return d.jsx(Yp,{form:e,name:t,items:r.values,...i});case"Related":return d.jsx(qp,{form:e,name:t,items:r.values,filter:n,...i});case"DateTime":return d.jsx(Gp,{form:e,name:t,valueFormat:"DD.MM.YYYY HH:mm:ss",schema:r,...i});case"Date":return d.jsx(Hp,{form:e,name:t,valueFormat:"DD.MM.YYYY",schema:r,...i});case"Field":return d.jsx(Jp,{form:e,name:t,items:r.validate,...i});case"Integer":case"Float":return d.jsx(Ts,{form:e,name:t,...i});default:return d.jsx(Ts,{form:e,name:t,...i})}}function Es({opened:e,onClose:t,...r}){const{info:n,addEntry:i}=Re(),o={modal:{},stack:{},addButton:{}},{addButton:a,modal:s,stack:l}=v.useProps("AddDialog",o,r),u=Ui.useForm({initialValues:n.add.defaultValues,validate:mo(n.add.schema)}),c=async f=>{await i(f),u.reset(),t()};return T.useEffect(()=>{u.setInitialValues(n.add.defaultValues),u.reset()},[n.add.defaultValues]),d.jsx(v.Modal,{opened:e,onClose:()=>{u.reset(),t()},title:n.add.title,size:"lg",centered:!0,...s,children:d.jsx(v.Box,{component:"form",onSubmit:u.onSubmit(c),children:d.jsx(v.Stack,{spacing:"md",...l,children:d.jsxs(v.ScrollArea.Autosize,{mah:450,type:"auto",children:[n.add.columns.map((f,p)=>d.jsx(go,{form:u,name:f.name,label:f.label,description:f.description,schema:f,withAsterisk:f.required},p)),d.jsx(v.Group,{position:"right",mt:"xl",children:d.jsx(v.Button,{type:"submit",...a,children:"Add"})})]})})})})}var yo={exports:{}},On={exports:{}},le={};/** @license React v16.13.1
|
|
@@ -69,7 +69,7 @@ Valid keys: `+JSON.stringify(Object.keys(C),null," "));var $=Ae(q,X,G,z,B+"."+X
|
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the MIT license found in the
|
|
71
71
|
* LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var Kc;function pC(){return Kc||(Kc=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=!1,h=!1,x=!1,w=!1,j=!1,M;M=Symbol.for("react.module.reference");function F(N){return!!(typeof N=="string"||typeof N=="function"||N===r||N===i||j||N===n||N===u||N===c||w||N===g||y||h||x||typeof N=="object"&&N!==null&&(N.$$typeof===p||N.$$typeof===f||N.$$typeof===o||N.$$typeof===a||N.$$typeof===l||N.$$typeof===M||N.getModuleId!==void 0))}function _(N){if(typeof N=="object"&&N!==null){var Ye=N.$$typeof;switch(Ye){case e:var Qe=N.type;switch(Qe){case r:case i:case n:case u:case c:return Qe;default:var dt=Qe&&Qe.$$typeof;switch(dt){case s:case a:case l:case p:case f:case o:return dt;default:return Ye}}case t:return Ye}}}var P=a,D=o,te=e,ae=l,Oe=r,U=p,se=f,he=t,ge=i,qe=n,je=u,Ze=c,ot=!1,vt=!1;function C(N){return ot||(ot=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function k(N){return vt||(vt=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Y(N){return _(N)===a}function L(N){return _(N)===o}function G(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function z(N){return _(N)===l}function B(N){return _(N)===r}function q(N){return _(N)===p}function K(N){return _(N)===f}function J(N){return _(N)===t}function X(N){return _(N)===i}function Ae(N){return _(N)===n}function $(N){return _(N)===u}function $e(N){return _(N)===c}fe.ContextConsumer=P,fe.ContextProvider=D,fe.Element=te,fe.ForwardRef=ae,fe.Fragment=Oe,fe.Lazy=U,fe.Memo=se,fe.Portal=he,fe.Profiler=ge,fe.StrictMode=qe,fe.Suspense=je,fe.SuspenseList=Ze,fe.isAsyncMode=C,fe.isConcurrentMode=k,fe.isContextConsumer=Y,fe.isContextProvider=L,fe.isElement=G,fe.isForwardRef=z,fe.isFragment=B,fe.isLazy=q,fe.isMemo=K,fe.isPortal=J,fe.isProfiler=X,fe.isStrictMode=Ae,fe.isSuspense=$,fe.isSuspenseList=$e,fe.isValidElementType=F,fe.typeOf=_}()),fe}process.env.NODE_ENV==="production"?ha.exports=dC():ha.exports=pC();var Xc=ha.exports;const hC=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Jc(e){const t=`${e}`.match(hC);return t&&t[1]||""}function Zc(e,t=""){return e.displayName||e.name||Jc(e)||t}function Qc(e,t,r){const n=Zc(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function mC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Zc(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Xc.ForwardRef:return Qc(e,e.render,"ForwardRef");case Xc.Memo:return Qc(e,e.type,"memo");default:return}}}const gC=Object.freeze(Object.defineProperty({__proto__:null,default:mC,getFunctionName:Jc},Symbol.toStringTag,{value:"Module"}));function tr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Jr(7));return e.charAt(0).toUpperCase()+e.slice(1)}const yC=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"}));function ma(e,t){const r=pe({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=pe({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const i=e[n]||{},o=t[n];r[n]={},!o||!Object.keys(o)?r[n]=i:!i||!Object.keys(i)?r[n]=o:(r[n]=pe({},o),Object.keys(i).forEach(a=>{r[n][a]=ma(i[a],o[a])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function vC(e,t,r=void 0){const n={};return Object.keys(e).forEach(i=>{n[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),r&&r[a]&&o.push(r[a])}return o},[]).join(" ")}),n}const ef=e=>e,bC=(()=>{let e=ef;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ef}}})(),xC={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ga(e,t,r="Mui"){const n=xC[t];return n?`${r}-${n}`:`${bC.generate(e)}-${t}`}function _C(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=ga(e,i,r)}),n}function TC(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const EC=Object.freeze(Object.defineProperty({__proto__:null,default:TC},Symbol.toStringTag,{value:"Module"}));function Ut(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function tf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=tf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function SC(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=tf(e))&&(n&&(n+=" "),n+=t);return n}const wC=tt.createContext(void 0);process.env.NODE_ENV!=="production"&&(H.node,H.object);function CC(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?ma(i.defaultProps,n):!i.styleOverrides&&!i.variants?ma(i,n):n}function OC({props:e,name:t}){const r=tt.useContext(wC);return CC({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(H.node,H.object.isRequired);function AC(e){return OC(e)}var Zr={},rf={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(rf);var nf=rf.exports,ya={exports:{}},of;function PC(){return of||(of=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var o in i)({}).hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(ya)),ya.exports}var va={exports:{}},af;function kC(){return af||(af=1,function(e){function t(r,n){if(r==null)return{};var i={};for(var o in r)if({}.hasOwnProperty.call(r,o)){if(n.indexOf(o)>=0)continue;i[o]=r[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(va)),va.exports}function sf(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var jC=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,IC=sf(function(e){return jC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),$C=!0;function RC(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):n+=i+" "}),n}var lf=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||$C===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},DC=function(t,r,n){lf(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function MC(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var NC={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uf=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
72
|
+
*/var Kc;function pC(){return Kc||(Kc=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),y=!1,h=!1,x=!1,w=!1,j=!1,M;M=Symbol.for("react.module.reference");function F(N){return!!(typeof N=="string"||typeof N=="function"||N===r||N===i||j||N===n||N===u||N===c||w||N===g||y||h||x||typeof N=="object"&&N!==null&&(N.$$typeof===p||N.$$typeof===f||N.$$typeof===o||N.$$typeof===a||N.$$typeof===l||N.$$typeof===M||N.getModuleId!==void 0))}function _(N){if(typeof N=="object"&&N!==null){var Ye=N.$$typeof;switch(Ye){case e:var Qe=N.type;switch(Qe){case r:case i:case n:case u:case c:return Qe;default:var dt=Qe&&Qe.$$typeof;switch(dt){case s:case a:case l:case p:case f:case o:return dt;default:return Ye}}case t:return Ye}}}var P=a,D=o,te=e,ae=l,Oe=r,U=p,se=f,he=t,ge=i,qe=n,je=u,Ze=c,ot=!1,vt=!1;function C(N){return ot||(ot=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function k(N){return vt||(vt=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Y(N){return _(N)===a}function L(N){return _(N)===o}function G(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function z(N){return _(N)===l}function B(N){return _(N)===r}function q(N){return _(N)===p}function K(N){return _(N)===f}function J(N){return _(N)===t}function X(N){return _(N)===i}function Ae(N){return _(N)===n}function $(N){return _(N)===u}function $e(N){return _(N)===c}fe.ContextConsumer=P,fe.ContextProvider=D,fe.Element=te,fe.ForwardRef=ae,fe.Fragment=Oe,fe.Lazy=U,fe.Memo=se,fe.Portal=he,fe.Profiler=ge,fe.StrictMode=qe,fe.Suspense=je,fe.SuspenseList=Ze,fe.isAsyncMode=C,fe.isConcurrentMode=k,fe.isContextConsumer=Y,fe.isContextProvider=L,fe.isElement=G,fe.isForwardRef=z,fe.isFragment=B,fe.isLazy=q,fe.isMemo=K,fe.isPortal=J,fe.isProfiler=X,fe.isStrictMode=Ae,fe.isSuspense=$,fe.isSuspenseList=$e,fe.isValidElementType=F,fe.typeOf=_}()),fe}process.env.NODE_ENV==="production"?ha.exports=dC():ha.exports=pC();var Xc=ha.exports;const hC=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function Jc(e){const t=`${e}`.match(hC);return t&&t[1]||""}function Zc(e,t=""){return e.displayName||e.name||Jc(e)||t}function Qc(e,t,r){const n=Zc(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function mC(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Zc(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Xc.ForwardRef:return Qc(e,e.render,"ForwardRef");case Xc.Memo:return Qc(e,e.type,"memo");default:return}}}const gC=Object.freeze(Object.defineProperty({__proto__:null,default:mC,getFunctionName:Jc},Symbol.toStringTag,{value:"Module"}));function tr(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Jr(7));return e.charAt(0).toUpperCase()+e.slice(1)}const yC=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"}));function ma(e,t){const r=pe({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=pe({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const i=e[n]||{},o=t[n];r[n]={},!o||!Object.keys(o)?r[n]=i:!i||!Object.keys(i)?r[n]=o:(r[n]=pe({},o),Object.keys(i).forEach(a=>{r[n][a]=ma(i[a],o[a])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function vC(e,t,r=void 0){const n={};return Object.keys(e).forEach(i=>{n[i]=e[i].reduce((o,a)=>{if(a){const s=t(a);s!==""&&o.push(s),r&&r[a]&&o.push(r[a])}return o},[]).join(" ")}),n}const ef=e=>e,bC=(()=>{let e=ef;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ef}}})(),xC={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function ga(e,t,r="Mui"){const n=xC[t];return n?`${r}-${n}`:`${bC.generate(e)}-${t}`}function _C(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=ga(e,i,r)}),n}function TC(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const EC=Object.freeze(Object.defineProperty({__proto__:null,default:TC},Symbol.toStringTag,{value:"Module"}));function Ut(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function tf(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=tf(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function SC(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=tf(e))&&(n&&(n+=" "),n+=t);return n}const wC=tt.createContext(void 0);process.env.NODE_ENV!=="production"&&(H.node,H.object);function CC(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?ma(i.defaultProps,n):!i.styleOverrides&&!i.variants?ma(i,n):n}function OC({props:e,name:t}){const r=tt.useContext(wC);return CC({props:e,name:t,theme:{components:r}})}process.env.NODE_ENV!=="production"&&(H.node,H.object.isRequired);function AC(e){return OC(e)}var Zr={},rf={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(rf);var nf=rf.exports,ya={exports:{}},of;function PC(){return of||(of=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(r){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var o in i)({}).hasOwnProperty.call(i,o)&&(r[o]=i[o])}return r},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(ya)),ya.exports}var va={exports:{}},af;function kC(){return af||(af=1,function(e){function t(r,n){if(r==null)return{};var i={};for(var o in r)if({}.hasOwnProperty.call(r,o)){if(n.includes(o))continue;i[o]=r[o]}return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(va)),va.exports}function sf(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var jC=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,IC=sf(function(e){return jC.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),$C=!0;function RC(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):n+=i+" "}),n}var lf=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||$C===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},DC=function(t,r,n){lf(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var o=r;do t.insert(r===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function MC(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var NC={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uf=`You have illegal escape sequence in your template literal, most likely inside content's property value.
|
|
73
73
|
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
|
|
74
74
|
You can read more about this here:
|
|
75
75
|
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,FC="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",LC=/[A-Z]|^ms/g,cf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ba=function(t){return t.charCodeAt(1)===45},ff=function(t){return t!=null&&typeof t!="boolean"},xa=sf(function(e){return ba(e)?e:e.replace(LC,"-$&").toLowerCase()}),oi=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(cf,function(n,i,o){return yt={name:i,styles:o,next:yt},i})}return NC[t]!==1&&!ba(t)&&typeof r=="number"&&r!==0?r+"px":r};if(process.env.NODE_ENV!=="production"){var zC=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,UC=["normal","none","initial","inherit","unset"],VC=oi,BC=/^-ms-/,WC=/-(.)/g,df={};oi=function(t,r){if(t==="content"&&(typeof r!="string"||UC.indexOf(r)===-1&&!zC.test(r)&&(r.charAt(0)!==r.charAt(r.length-1)||r.charAt(0)!=='"'&&r.charAt(0)!=="'")))throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+r+"\"'`");var n=VC(t,r);return n!==""&&!ba(t)&&t.indexOf("-")!==-1&&df[t]===void 0&&(df[t]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+t.replace(BC,"ms-").replace(WC,function(i,o){return o.toUpperCase()})+"?")),n}}var pf="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Qr(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0){if(process.env.NODE_ENV!=="production"&&r.toString()==="NO_COMPONENT_SELECTOR")throw new Error(pf);return r}switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return yt={name:r.name,styles:r.styles,next:yt},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)yt={name:n.name,styles:n.styles,next:yt},n=n.next;var i=r.styles+";";return process.env.NODE_ENV!=="production"&&r.map!==void 0&&(i+=r.map),i}return HC(e,t,r)}case"function":{if(e!==void 0){var o=yt,a=r(e);return yt=o,Qr(e,t,a)}else process.env.NODE_ENV!=="production"&&console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":if(process.env.NODE_ENV!=="production"){var s=[],l=r.replace(cf,function(c,f,p){var g="animation"+s.length;return s.push("const "+g+" = keyframes`"+p.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+g+"}"});s.length&&console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(s,["`"+l+"`"]).join(`
|
|
@@ -84,7 +84,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
|
|
|
84
84
|
You may have forgotten to import it.`);var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,o,a;r!==void 0&&(o=r.label,a=r.target);var s=yf(t,r,n),l=s||gf(i),u=!l("as");return function(){var c=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)f.push.apply(f,c);else{process.env.NODE_ENV!=="production"&&c[0][0]===void 0&&console.error(vf),f.push(c[0][0]);for(var p=c.length,g=1;g<p;g++)process.env.NODE_ENV!=="production"&&c[0][g]===void 0&&console.error(vf),f.push(c[g],c[0][g])}var y=Gt.withEmotionCache(function(h,x,w){var j=u&&h.as||i,M="",F=[],_=h;if(h.theme==null){_={};for(var P in h)_[P]=h[P];_.theme=tt.useContext(Gt.ThemeContext)}typeof h.className=="string"?M=RC(x.registered,F,h.className):h.className!=null&&(M=h.className+" ");var D=GC(f.concat(F),x.registered,_);M+=x.key+"-"+D.name,a!==void 0&&(M+=" "+a);var te=u&&s===void 0?gf(j):l,ae={};for(var Oe in h)u&&Oe==="as"||te(Oe)&&(ae[Oe]=h[Oe]);return ae.className=M,ae.ref=w,tt.createElement(tt.Fragment,null,tt.createElement(ZC,{cache:x,serialized:D,isStringTag:typeof j=="string"}),tt.createElement(j,ae))});return y.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",y.defaultProps=t.defaultProps,y.__emotion_real=y,y.__emotion_base=i,y.__emotion_styles=f,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return a===void 0&&process.env.NODE_ENV!=="production"?"NO_COMPONENT_SELECTOR":"."+a}}),y.withComponent=function(h,x){return e(h,pe({},r,x,{shouldForwardProp:yf(y,x,!0)})).apply(void 0,f)},y}},eO=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],_a=QC.bind();eO.forEach(function(e){_a[e]=_a(e)});function tO(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function rO(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var nO=function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?process.env.NODE_ENV==="production":r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rO(this));var i=this.tags[this.tags.length-1];if(process.env.NODE_ENV!=="production"){var o=n.charCodeAt(0)===64&&n.charCodeAt(1)===105;o&&this._alreadyInsertedOrderInsensitiveRule&&console.error(`You're attempting to insert the following rule:
|
|
85
85
|
`+n+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules."),this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!o}if(this.isSpeedy){var a=tO(i);try{a.insertRule(n,a.cssRules.length)}catch(s){process.env.NODE_ENV!=="production"&&!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(n)&&console.error('There was a problem inserting the following rule: "'+n+'"',s)}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0,process.env.NODE_ENV!=="production"&&(this._alreadyInsertedOrderInsensitiveRule=!1)},e}(),Ue="-ms-",ai="-moz-",ie="-webkit-",Ta="comm",Ea="rule",Sa="decl",iO="@import",bf="@keyframes",oO="@layer",aO=Math.abs,si=String.fromCharCode,sO=Object.assign;function lO(e,t){return Me(e,0)^45?(((t<<2^Me(e,0))<<2^Me(e,1))<<2^Me(e,2))<<2^Me(e,3):0}function xf(e){return e.trim()}function uO(e,t){return(e=t.exec(e))?e[0]:e}function oe(e,t,r){return e.replace(t,r)}function wa(e,t){return e.indexOf(t)}function Me(e,t){return e.charCodeAt(t)|0}function en(e,t,r){return e.slice(t,r)}function St(e){return e.length}function Ca(e){return e.length}function li(e,t){return t.push(e),e}function cO(e,t){return e.map(t).join("")}var ui=1,br=1,_f=0,Je=0,ke=0,xr="";function ci(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:ui,column:br,length:a,return:""}}function tn(e,t){return sO(ci("",null,null,"",null,null,0),e,{length:-e.length},t)}function fO(){return ke}function dO(){return ke=Je>0?Me(xr,--Je):0,br--,ke===10&&(br=1,ui--),ke}function nt(){return ke=Je<_f?Me(xr,Je++):0,br++,ke===10&&(br=1,ui++),ke}function wt(){return Me(xr,Je)}function fi(){return Je}function rn(e,t){return en(xr,e,t)}function nn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Tf(e){return ui=br=1,_f=St(xr=e),Je=0,[]}function Ef(e){return xr="",e}function di(e){return xf(rn(Je-1,Oa(e===91?e+2:e===40?e+1:e)))}function pO(e){for(;(ke=wt())&&ke<33;)nt();return nn(e)>2||nn(ke)>3?"":" "}function hO(e,t){for(;--t&&nt()&&!(ke<48||ke>102||ke>57&&ke<65||ke>70&&ke<97););return rn(e,fi()+(t<6&&wt()==32&&nt()==32))}function Oa(e){for(;nt();)switch(ke){case e:return Je;case 34:case 39:e!==34&&e!==39&&Oa(ke);break;case 40:e===41&&Oa(e);break;case 92:nt();break}return Je}function mO(e,t){for(;nt()&&e+ke!==47+10;)if(e+ke===42+42&&wt()===47)break;return"/*"+rn(t,Je-1)+"*"+si(e===47?e:nt())}function gO(e){for(;!nn(wt());)nt();return rn(e,Je)}function yO(e){return Ef(pi("",null,null,null,[""],e=Tf(e),0,[0],e))}function pi(e,t,r,n,i,o,a,s,l){for(var u=0,c=0,f=a,p=0,g=0,y=0,h=1,x=1,w=1,j=0,M="",F=i,_=o,P=n,D=M;x;)switch(y=j,j=nt()){case 40:if(y!=108&&Me(D,f-1)==58){wa(D+=oe(di(j),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:D+=di(j);break;case 9:case 10:case 13:case 32:D+=pO(y);break;case 92:D+=hO(fi()-1,7);continue;case 47:switch(wt()){case 42:case 47:li(vO(mO(nt(),fi()),t,r),l);break;default:D+="/"}break;case 123*h:s[u++]=St(D)*w;case 125*h:case 59:case 0:switch(j){case 0:case 125:x=0;case 59+c:w==-1&&(D=oe(D,/\f/g,"")),g>0&&St(D)-f&&li(g>32?wf(D+";",n,r,f-1):wf(oe(D," ","")+";",n,r,f-2),l);break;case 59:D+=";";default:if(li(P=Sf(D,t,r,u,c,i,s,M,F=[],_=[],f),o),j===123)if(c===0)pi(D,t,P,P,F,o,f,s,_);else switch(p===99&&Me(D,3)===110?100:p){case 100:case 108:case 109:case 115:pi(e,P,P,n&&li(Sf(e,P,P,0,0,i,s,M,i,F=[],f),_),i,_,f,s,n?F:_);break;default:pi(D,P,P,P,[""],_,0,s,_)}}u=c=g=0,h=w=1,M=D="",f=a;break;case 58:f=1+St(D),g=y;default:if(h<1){if(j==123)--h;else if(j==125&&h++==0&&dO()==125)continue}switch(D+=si(j),j*h){case 38:w=c>0?1:(D+="\f",-1);break;case 44:s[u++]=(St(D)-1)*w,w=1;break;case 64:wt()===45&&(D+=di(nt())),p=wt(),c=f=St(M=D+=gO(fi())),j++;break;case 45:y===45&&St(D)==2&&(h=0)}}return o}function Sf(e,t,r,n,i,o,a,s,l,u,c){for(var f=i-1,p=i===0?o:[""],g=Ca(p),y=0,h=0,x=0;y<n;++y)for(var w=0,j=en(e,f+1,f=aO(h=a[y])),M=e;w<g;++w)(M=xf(h>0?p[w]+" "+j:oe(j,/&\f/g,p[w])))&&(l[x++]=M);return ci(e,t,r,i===0?Ea:s,l,u,c)}function vO(e,t,r){return ci(e,t,r,Ta,si(fO()),en(e,2,-2),0)}function wf(e,t,r,n){return ci(e,t,r,Sa,en(e,0,n),en(e,n+1,-1),n)}function _r(e,t){for(var r="",n=Ca(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function bO(e,t,r,n){switch(e.type){case oO:if(e.children.length)break;case iO:case Sa:return e.return=e.return||e.value;case Ta:return"";case bf:return e.return=e.value+"{"+_r(e.children,n)+"}";case Ea:e.value=e.props.join(",")}return St(r=_r(e.children,n))?e.return=e.value+"{"+r+"}":""}function xO(e){var t=Ca(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function _O(e){return function(t){t.root||(t=t.return)&&e(t)}}var TO=function(t,r,n){for(var i=0,o=0;i=o,o=wt(),i===38&&o===12&&(r[n]=1),!nn(o);)nt();return rn(t,Je)},EO=function(t,r){var n=-1,i=44;do switch(nn(i)){case 0:i===38&&wt()===12&&(r[n]=1),t[n]+=TO(Je-1,r,n);break;case 2:t[n]+=di(i);break;case 4:if(i===44){t[++n]=wt()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=si(i)}while(i=nt());return t},SO=function(t,r){return Ef(EO(Tf(t),r))},Cf=new WeakMap,wO=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!Cf.get(n))&&!i){Cf.set(t,!0);for(var o=[],a=SO(r,o),s=n.props,l=0,u=0;l<a.length;l++)for(var c=0;c<s.length;c++,u++)t.props[u]=o[l]?a[l].replace(/&\f/g,s[c]):s[c]+" "+a[l]}}},CO=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}},OO="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",AO=function(t){return t.type==="comm"&&t.children.indexOf(OO)>-1},PO=function(t){return function(r,n,i){if(!(r.type!=="rule"||t.compat)){var o=r.value.match(/(:first|:nth|:nth-last)-child/g);if(o){for(var a=!!r.parent,s=a?r.parent.children:i,l=s.length-1;l>=0;l--){var u=s[l];if(u.line<r.line)break;if(u.column<r.column){if(AO(u))return;break}}o.forEach(function(c){console.error('The pseudo class "'+c+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+c.split("-child")[0]+'-of-type".')})}}}},Of=function(t){return t.type.charCodeAt(1)===105&&t.type.charCodeAt(0)===64},kO=function(t,r){for(var n=t-1;n>=0;n--)if(!Of(r[n]))return!0;return!1},Af=function(t){t.type="",t.value="",t.return="",t.children="",t.props=""},jO=function(t,r,n){Of(t)&&(t.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Af(t)):kO(r,n)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Af(t)))};function Pf(e,t){switch(lO(e,t)){case 5103:return ie+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ie+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ie+e+ai+e+Ue+e+e;case 6828:case 4268:return ie+e+Ue+e+e;case 6165:return ie+e+Ue+"flex-"+e+e;case 5187:return ie+e+oe(e,/(\w+).+(:[^]+)/,ie+"box-$1$2"+Ue+"flex-$1$2")+e;case 5443:return ie+e+Ue+"flex-item-"+oe(e,/flex-|-self/,"")+e;case 4675:return ie+e+Ue+"flex-line-pack"+oe(e,/align-content|flex-|-self/,"")+e;case 5548:return ie+e+Ue+oe(e,"shrink","negative")+e;case 5292:return ie+e+Ue+oe(e,"basis","preferred-size")+e;case 6060:return ie+"box-"+oe(e,"-grow","")+ie+e+Ue+oe(e,"grow","positive")+e;case 4554:return ie+oe(e,/([^-])(transform)/g,"$1"+ie+"$2")+e;case 6187:return oe(oe(oe(e,/(zoom-|grab)/,ie+"$1"),/(image-set)/,ie+"$1"),e,"")+e;case 5495:case 3959:return oe(e,/(image-set\([^]*)/,ie+"$1$`$1");case 4968:return oe(oe(e,/(.+:)(flex-)?(.*)/,ie+"box-pack:$3"+Ue+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ie+e+e;case 4095:case 3583:case 4068:case 2532:return oe(e,/(.+)-inline(.+)/,ie+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(St(e)-1-t>6)switch(Me(e,t+1)){case 109:if(Me(e,t+4)!==45)break;case 102:return oe(e,/(.+:)(.+)-([^]+)/,"$1"+ie+"$2-$3$1"+ai+(Me(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~wa(e,"stretch")?Pf(oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Me(e,t+1)!==115)break;case 6444:switch(Me(e,St(e)-3-(~wa(e,"!important")&&10))){case 107:return oe(e,":",":"+ie)+e;case 101:return oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ie+(Me(e,14)===45?"inline-":"")+"box$3$1"+ie+"$2$3$1"+Ue+"$2box$3")+e}break;case 5936:switch(Me(e,t+11)){case 114:return ie+e+Ue+oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ie+e+Ue+oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ie+e+Ue+oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ie+e+Ue+e+e}return e}var IO=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Sa:t.return=Pf(t.value,t.length);break;case bf:return _r([tn(t,{value:oe(t.value,"@","@"+ie)})],i);case Ea:if(t.length)return cO(t.props,function(o){switch(uO(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return _r([tn(t,{props:[oe(o,/:(read-\w+)/,":"+ai+"$1")]})],i);case"::placeholder":return _r([tn(t,{props:[oe(o,/:(plac\w+)/,":"+ie+"input-$1")]}),tn(t,{props:[oe(o,/:(plac\w+)/,":"+ai+"$1")]}),tn(t,{props:[oe(o,/:(plac\w+)/,Ue+"input-$1")]})],i)}return""})}},$O=[IO],RO=function(t){var r=t.key;if(process.env.NODE_ENV!=="production"&&!r)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
|
|
86
86
|
If multiple caches share the same key they might "fight" for each other's style elements.`);if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(h){var x=h.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||$O;if(process.env.NODE_ENV!=="production"&&/[^a-z-]/.test(r))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+r+'" was passed');var o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(h){for(var x=h.getAttribute("data-emotion").split(" "),w=1;w<x.length;w++)o[x[w]]=!0;s.push(h)});var l,u=[wO,CO];process.env.NODE_ENV!=="production"&&u.push(PO({get compat(){return y.compat}}),jO);{var c,f=[bO,process.env.NODE_ENV!=="production"?function(h){h.root||(h.return?c.insert(h.return):h.value&&h.type!==Ta&&c.insert(h.value+"{}"))}:_O(function(h){c.insert(h)})],p=xO(u.concat(i,f)),g=function(x){return _r(yO(x),p)};l=function(x,w,j,M){c=j,process.env.NODE_ENV!=="production"&&w.map!==void 0&&(c={insert:function(_){j.insert(_+w.map)}}),g(x?x+"{"+w.styles+"}":w.styles),M&&(y.inserted[w.name]=!0)}}var y={key:r,sheet:new nO({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(s),y};let Aa;typeof document=="object"&&(Aa=RO({key:"css",prepend:!0}));function kf(e){const{injectFirst:t,children:r}=e;return t&&Aa?d.jsx(Gt.CacheProvider,{value:Aa,children:r}):r}process.env.NODE_ENV!=="production"&&(kf.propTypes={children:H.node,injectFirst:H.bool});function DO(e){return e==null||Object.keys(e).length===0}function jf(e){const{styles:t,defaultTheme:r={}}=e,n=typeof t=="function"?i=>t(DO(i)?r:i):t;return d.jsx(Gt.Global,{styles:n})}process.env.NODE_ENV!=="production"&&(jf.propTypes={defaultTheme:H.object,styles:H.oneOfType([H.array,H.string,H.object,H.func])});/**
|
|
87
|
-
* @mui/styled-engine v5.
|
|
87
|
+
* @mui/styled-engine v5.16.1
|
|
88
88
|
*
|
|
89
89
|
* @license MIT
|
|
90
90
|
* This source code is licensed under the MIT license found in the
|