@applica-software-guru/react-admin 1.5.278 → 1.5.279
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/components/ra-inputs/LabeledInput.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +1 -1
- package/dist/react-admin.cjs.js.gz +0 -0
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +1 -0
- package/dist/react-admin.es.js.gz +0 -0
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +1 -1
- package/dist/react-admin.umd.js.gz +0 -0
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-inputs/LabeledInput.tsx +1 -0
- package/vite.config.js +3 -3
package/dist/react-admin.umd.js
CHANGED
|
@@ -212,6 +212,6 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
212
212
|
}`;var ze=FO(function(){return nt(j,Ee+"return "+ce).apply(n,R)});if(ze.source=ce,h0(ze))throw ze;return ze}function lre(i){return at(i).toLowerCase()}function cre(i){return at(i).toUpperCase()}function ure(i,l,p){if(i=at(i),i&&(p||l===n))return zE(i);if(!i||!(l=Yn(l)))return i;var y=Or(i),A=Or(l),j=UE(y,A),R=HE(y,A)+1;return Jo(y,j,R).join("")}function dre(i,l,p){if(i=at(i),i&&(p||l===n))return i.slice(0,YE(i)+1);if(!i||!(l=Yn(l)))return i;var y=Or(i),A=HE(y,Or(l))+1;return Jo(y,0,A).join("")}function fre(i,l,p){if(i=at(i),i&&(p||l===n))return i.replace(ln,"");if(!i||!(l=Yn(l)))return i;var y=Or(i),A=UE(y,Or(l));return Jo(y,A).join("")}function pre(i,l){var p=ee,y=G;if(Pt(l)){var A="separator"in l?l.separator:A;p="length"in l?We(l.length):p,y="omission"in l?Yn(l.omission):y}i=at(i);var j=i.length;if(Hs(i)){var R=Or(i);j=R.length}if(p>=j)return i;var V=p-Gs(y);if(V<1)return y;var H=R?Jo(R,0,V).join(""):i.slice(0,V);if(A===n)return H+y;if(R&&(V+=H.length-V),g0(A)){if(i.slice(V).search(A)){var ie,se=H;for(A.global||(A=Mm(A.source,at(sd.exec(A))+"g")),A.lastIndex=0;ie=A.exec(se);)var ce=ie.index;H=H.slice(0,ce===n?V:ce)}}else if(i.indexOf(Yn(A),V)!=V){var ye=H.lastIndexOf(A);ye>-1&&(H=H.slice(0,ye))}return H+y}function hre(i){return i=at(i),i&&qu.test(i)?i.replace(Ju,UJ):i}var gre=qs(function(i,l,p){return i+(p?" ":"")+l.toUpperCase()}),y0=LI("toUpperCase");function kO(i,l,p){return i=at(i),l=p?n:l,l===n?BJ(i)?YJ(i):PJ(i):i.match(l)||[]}var FO=Ue(function(i,l){try{return Hn(i,n,l)}catch(p){return h0(p)?p:new _e(p)}}),mre=po(function(i,l){return hr(l,function(p){p=Gr(p),uo(i,p,f0(i[p],i))}),i});function vre(i){var l=i==null?0:i.length,p=je();return i=l?At(i,function(y){if(typeof y[1]!="function")throw new gr(a);return[p(y[0]),y[1]]}):[],Ue(function(y){for(var A=-1;++A<l;){var j=i[A];if(Hn(j[0],this,y))return Hn(j[1],this,y)}})}function yre(i){return Uq(vr(i,g))}function b0(i){return function(){return i}}function bre(i,l){return i==null||i!==i?l:i}var xre=RI(),Cre=RI(!0);function Mn(i){return i}function x0(i){return fI(typeof i=="function"?i:vr(i,g))}function wre(i){return hI(vr(i,g))}function Sre(i,l){return gI(i,vr(l,g))}var Are=Ue(function(i,l){return function(p){return Al(p,i,l)}}),Tre=Ue(function(i,l){return function(p){return Al(i,p,l)}});function C0(i,l,p){var y=Zt(l),A=Pd(l,y);p==null&&!(Pt(l)&&(A.length||!y.length))&&(p=l,l=i,i=this,A=Pd(l,Zt(l)));var j=!(Pt(p)&&"chain"in p)||!!p.chain,R=go(i);return hr(A,function(V){var H=l[V];i[V]=H,R&&(i.prototype[V]=function(){var ie=this.__chain__;if(j||ie){var se=i(this.__wrapped__),ce=se.__actions__=On(this.__actions__);return ce.push({func:H,args:arguments,thisArg:i}),se.__chain__=ie,se}return H.apply(i,Go([this.value()],arguments))})}),i}function Ere(){return $t._===this&&($t._=qJ),this}function w0(){}function Ire(i){return i=We(i),Ue(function(l){return mI(l,i)})}var Ore=$m(At),Pre=$m(_E),jre=$m(Am);function LO(i){return s0(i)?Tm(Gr(i)):s$(i)}function Mre(i){return function(l){return i==null?n:Ni(i,l)}}var kre=BI(),Fre=BI(!0);function S0(){return[]}function A0(){return!1}function Lre(){return{}}function Dre(){return""}function Rre(){return!0}function _re(i,l){if(i=We(i),i<1||i>N)return[];var p=K,y=cn(i,K);l=je(l),i-=K;for(var A=Om(y,l);++p<i;)l(p);return A}function Bre(i){return Ne(i)?At(i,Gr):Kn(i)?[i]:On(eO(at(i)))}function Nre(i){var l=++QJ;return at(i)+l}var Vre=Dd(function(i,l){return i+l},0),Wre=e0("ceil"),zre=Dd(function(i,l){return i/l},1),Ure=e0("floor");function Hre(i){return i&&i.length?Od(i,Mn,Nm):n}function Gre(i,l){return i&&i.length?Od(i,je(l,2),Nm):n}function Yre(i){return VE(i,Mn)}function Kre(i,l){return VE(i,je(l,2))}function Xre(i){return i&&i.length?Od(i,Mn,Um):n}function Zre(i,l){return i&&i.length?Od(i,je(l,2),Um):n}var Qre=Dd(function(i,l){return i*l},1),Jre=e0("round"),qre=Dd(function(i,l){return i-l},0);function $re(i){return i&&i.length?Im(i,Mn):0}function eoe(i,l){return i&&i.length?Im(i,je(l,2)):0}return O.after=wte,O.ary=dO,O.assign=cne,O.assignIn=TO,O.assignInWith=Xd,O.assignWith=une,O.at=dne,O.before=fO,O.bind=f0,O.bindAll=mre,O.bindKey=pO,O.castArray=Lte,O.chain=lO,O.chunk=U$,O.compact=H$,O.concat=G$,O.cond=vre,O.conforms=yre,O.constant=b0,O.countBy=$ee,O.create=fne,O.curry=hO,O.curryRight=gO,O.debounce=mO,O.defaults=pne,O.defaultsDeep=hne,O.defer=Ste,O.delay=Ate,O.difference=Y$,O.differenceBy=K$,O.differenceWith=X$,O.drop=Z$,O.dropRight=Q$,O.dropRightWhile=J$,O.dropWhile=q$,O.fill=$$,O.filter=tte,O.flatMap=ote,O.flatMapDeep=ite,O.flatMapDepth=ste,O.flatten=oO,O.flattenDeep=eee,O.flattenDepth=tee,O.flip=Tte,O.flow=xre,O.flowRight=Cre,O.fromPairs=nee,O.functions=Cne,O.functionsIn=wne,O.groupBy=ate,O.initial=oee,O.intersection=iee,O.intersectionBy=see,O.intersectionWith=aee,O.invert=Ane,O.invertBy=Tne,O.invokeMap=cte,O.iteratee=x0,O.keyBy=ute,O.keys=Zt,O.keysIn=jn,O.map=zd,O.mapKeys=Ine,O.mapValues=One,O.matches=wre,O.matchesProperty=Sre,O.memoize=Hd,O.merge=Pne,O.mergeWith=EO,O.method=Are,O.methodOf=Tre,O.mixin=C0,O.negate=Gd,O.nthArg=Ire,O.omit=jne,O.omitBy=Mne,O.once=Ete,O.orderBy=dte,O.over=Ore,O.overArgs=Ite,O.overEvery=Pre,O.overSome=jre,O.partial=p0,O.partialRight=vO,O.partition=fte,O.pick=kne,O.pickBy=IO,O.property=LO,O.propertyOf=Mre,O.pull=dee,O.pullAll=sO,O.pullAllBy=fee,O.pullAllWith=pee,O.pullAt=hee,O.range=kre,O.rangeRight=Fre,O.rearg=Ote,O.reject=gte,O.remove=gee,O.rest=Pte,O.reverse=u0,O.sampleSize=vte,O.set=Lne,O.setWith=Dne,O.shuffle=yte,O.slice=mee,O.sortBy=Cte,O.sortedUniq=See,O.sortedUniqBy=Aee,O.split=ore,O.spread=jte,O.tail=Tee,O.take=Eee,O.takeRight=Iee,O.takeRightWhile=Oee,O.takeWhile=Pee,O.tap=Hee,O.throttle=Mte,O.thru=Wd,O.toArray=wO,O.toPairs=OO,O.toPairsIn=PO,O.toPath=Bre,O.toPlainObject=AO,O.transform=Rne,O.unary=kte,O.union=jee,O.unionBy=Mee,O.unionWith=kee,O.uniq=Fee,O.uniqBy=Lee,O.uniqWith=Dee,O.unset=_ne,O.unzip=d0,O.unzipWith=aO,O.update=Bne,O.updateWith=Nne,O.values=ta,O.valuesIn=Vne,O.without=Ree,O.words=kO,O.wrap=Fte,O.xor=_ee,O.xorBy=Bee,O.xorWith=Nee,O.zip=Vee,O.zipObject=Wee,O.zipObjectDeep=zee,O.zipWith=Uee,O.entries=OO,O.entriesIn=PO,O.extend=TO,O.extendWith=Xd,C0(O,O),O.add=Vre,O.attempt=FO,O.camelCase=Hne,O.capitalize=jO,O.ceil=Wre,O.clamp=Wne,O.clone=Dte,O.cloneDeep=_te,O.cloneDeepWith=Bte,O.cloneWith=Rte,O.conformsTo=Nte,O.deburr=MO,O.defaultTo=bre,O.divide=zre,O.endsWith=Gne,O.eq=jr,O.escape=Yne,O.escapeRegExp=Kne,O.every=ete,O.find=nte,O.findIndex=nO,O.findKey=gne,O.findLast=rte,O.findLastIndex=rO,O.findLastKey=mne,O.floor=Ure,O.forEach=cO,O.forEachRight=uO,O.forIn=vne,O.forInRight=yne,O.forOwn=bne,O.forOwnRight=xne,O.get=m0,O.gt=Vte,O.gte=Wte,O.has=Sne,O.hasIn=v0,O.head=iO,O.identity=Mn,O.includes=lte,O.indexOf=ree,O.inRange=zne,O.invoke=Ene,O.isArguments=zi,O.isArray=Ne,O.isArrayBuffer=zte,O.isArrayLike=Pn,O.isArrayLikeObject=_t,O.isBoolean=Ute,O.isBuffer=qo,O.isDate=Hte,O.isElement=Gte,O.isEmpty=Yte,O.isEqual=Kte,O.isEqualWith=Xte,O.isError=h0,O.isFinite=Zte,O.isFunction=go,O.isInteger=yO,O.isLength=Yd,O.isMap=bO,O.isMatch=Qte,O.isMatchWith=Jte,O.isNaN=qte,O.isNative=$te,O.isNil=tne,O.isNull=ene,O.isNumber=xO,O.isObject=Pt,O.isObjectLike=Lt,O.isPlainObject=jl,O.isRegExp=g0,O.isSafeInteger=nne,O.isSet=CO,O.isString=Kd,O.isSymbol=Kn,O.isTypedArray=ea,O.isUndefined=rne,O.isWeakMap=one,O.isWeakSet=ine,O.join=lee,O.kebabCase=Xne,O.last=br,O.lastIndexOf=cee,O.lowerCase=Zne,O.lowerFirst=Qne,O.lt=sne,O.lte=ane,O.max=Hre,O.maxBy=Gre,O.mean=Yre,O.meanBy=Kre,O.min=Xre,O.minBy=Zre,O.stubArray=S0,O.stubFalse=A0,O.stubObject=Lre,O.stubString=Dre,O.stubTrue=Rre,O.multiply=Qre,O.nth=uee,O.noConflict=Ere,O.noop=w0,O.now=Ud,O.pad=Jne,O.padEnd=qne,O.padStart=$ne,O.parseInt=ere,O.random=Une,O.reduce=pte,O.reduceRight=hte,O.repeat=tre,O.replace=nre,O.result=Fne,O.round=Jre,O.runInContext=U,O.sample=mte,O.size=bte,O.snakeCase=rre,O.some=xte,O.sortedIndex=vee,O.sortedIndexBy=yee,O.sortedIndexOf=bee,O.sortedLastIndex=xee,O.sortedLastIndexBy=Cee,O.sortedLastIndexOf=wee,O.startCase=ire,O.startsWith=sre,O.subtract=qre,O.sum=$re,O.sumBy=eoe,O.template=are,O.times=_re,O.toFinite=mo,O.toInteger=We,O.toLength=SO,O.toLower=lre,O.toNumber=xr,O.toSafeInteger=lne,O.toString=at,O.toUpper=cre,O.trim=ure,O.trimEnd=dre,O.trimStart=fre,O.truncate=pre,O.unescape=hre,O.uniqueId=Nre,O.upperCase=gre,O.upperFirst=y0,O.each=cO,O.eachRight=uO,O.first=iO,C0(O,function(){var i={};return Ur(O,function(l,p){ct.call(O.prototype,p)||(i[p]=l)}),i}(),{chain:!1}),O.VERSION=r,hr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){O[i].placeholder=O}),hr(["drop","take"],function(i,l){Xe.prototype[i]=function(p){p=p===n?1:Yt(We(p),0);var y=this.__filtered__&&!l?new Xe(this):this.clone();return y.__filtered__?y.__takeCount__=cn(p,y.__takeCount__):y.__views__.push({size:cn(p,K),type:i+(y.__dir__<0?"Right":"")}),y},Xe.prototype[i+"Right"]=function(p){return this.reverse()[i](p).reverse()}}),hr(["filter","map","takeWhile"],function(i,l){var p=l+1,y=p==q||p==z;Xe.prototype[i]=function(A){var j=this.clone();return j.__iteratees__.push({iteratee:je(A,3),type:p}),j.__filtered__=j.__filtered__||y,j}}),hr(["head","last"],function(i,l){var p="take"+(l?"Right":"");Xe.prototype[i]=function(){return this[p](1).value()[0]}}),hr(["initial","tail"],function(i,l){var p="drop"+(l?"":"Right");Xe.prototype[i]=function(){return this.__filtered__?new Xe(this):this[p](1)}}),Xe.prototype.compact=function(){return this.filter(Mn)},Xe.prototype.find=function(i){return this.filter(i).head()},Xe.prototype.findLast=function(i){return this.reverse().find(i)},Xe.prototype.invokeMap=Ue(function(i,l){return typeof i=="function"?new Xe(this):this.map(function(p){return Al(p,i,l)})}),Xe.prototype.reject=function(i){return this.filter(Gd(je(i)))},Xe.prototype.slice=function(i,l){i=We(i);var p=this;return p.__filtered__&&(i>0||l<0)?new Xe(p):(i<0?p=p.takeRight(-i):i&&(p=p.drop(i)),l!==n&&(l=We(l),p=l<0?p.dropRight(-l):p.take(l-i)),p)},Xe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Xe.prototype.toArray=function(){return this.take(K)},Ur(Xe.prototype,function(i,l){var p=/^(?:filter|find|map|reject)|While$/.test(l),y=/^(?:head|last)$/.test(l),A=O[y?"take"+(l=="last"?"Right":""):l],j=y||/^find/.test(l);A&&(O.prototype[l]=function(){var R=this.__wrapped__,V=y?[1]:arguments,H=R instanceof Xe,ie=V[0],se=H||Ne(R),ce=function(Ye){var Ze=A.apply(O,Go([Ye],V));return y&&ye?Ze[0]:Ze};se&&p&&typeof ie=="function"&&ie.length!=1&&(H=se=!1);var ye=this.__chain__,Ee=!!this.__actions__.length,Me=j&&!ye,ze=H&&!Ee;if(!j&&se){R=ze?R:new Xe(this);var ke=i.apply(R,V);return ke.__actions__.push({func:Wd,args:[ce],thisArg:n}),new mr(ke,ye)}return Me&&ze?i.apply(this,V):(ke=this.thru(ce),Me?y?ke.value()[0]:ke.value():ke)})}),hr(["pop","push","shift","sort","splice","unshift"],function(i){var l=pd[i],p=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",y=/^(?:pop|shift)$/.test(i);O.prototype[i]=function(){var A=arguments;if(y&&!this.__chain__){var j=this.value();return l.apply(Ne(j)?j:[],A)}return this[p](function(R){return l.apply(Ne(R)?R:[],A)})}}),Ur(Xe.prototype,function(i,l){var p=O[l];if(p){var y=p.name+"";ct.call(Zs,y)||(Zs[y]=[]),Zs[y].push({name:l,func:p})}}),Zs[Ld(n,I).name]=[{name:"wrapper",func:n}],Xe.prototype.clone=hq,Xe.prototype.reverse=gq,Xe.prototype.value=mq,O.prototype.at=Gee,O.prototype.chain=Yee,O.prototype.commit=Kee,O.prototype.next=Xee,O.prototype.plant=Qee,O.prototype.reverse=Jee,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=qee,O.prototype.first=O.prototype.head,vl&&(O.prototype[vl]=Zee),O},Ys=KJ();Li?((Li.exports=Ys)._=Ys,xm._=Ys):$t._=Ys}).call(yn)}(Su,Su.exports);var dt=Su.exports;const $=Qr(dt),CU=["e-","entities/"];function wU(e){let t=e;return CU.forEach(n=>{t=t!=null&&t.startsWith(n)?t==null?void 0:t.substring(n.length):t}),t}function SU(e,t){var n,r;return((n=t.options)==null?void 0:n.group)===e.id||!((r=t.options)!=null&&r.group)&&e.id==="admin"}function AU(e,t){const n=wU(e.name);return(t==null?void 0:t.includes(`${n}:list`))||(t==null?void 0:t.includes(`${n}:find`))}function Rh(e,t){let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=Rh(o.children,t),n))return n}return n}function bw(e,t,n){let r=e.find(o=>["group","collapse"].indexOf(o.type)!==-1&&SU(o,t));if(!r)for(let o=0;o<e.length;o++){const s=e[o];if(s.children&&(r=bw(s.children,t),r))return r}return r}function xw(e,t){let n=e.find(r=>r.id===t);if(!n)for(let r=0;r<e.length;r++){const o=e[r];if(o.children&&(n=xw(o.children,t),n))return n}return n}function Cw(e){return e?e.type==="item"?!0:(e.children&&(e.children=e.children.filter(Cw)),e.children&&e.children.length>0):!1}function ww(e){return e.children&&e.children.forEach(t=>{t.parent=e,ww(t)}),e}function TU(e,t,n,r,o){function s(g){return g.title=r(g.title,{_:g.title}),g.children&&g.children.forEach(m=>s(m)),g}const a=Object.keys(t);function c(g,m){return g.children&&(g.children=g.children.filter(v=>{if(v.resource===!1){const b=v.roles||[];return!!(b.length===0||b.some(x=>o.includes(x)))}return v.type==="item"?m.includes(v.id):(c(v,m),v.children&&v.children.length>0)})),g}const u=$.cloneDeep(e).map(g=>({children:[],...g,type:g.type||"group"})).map(s).map(g=>c(g,a)),d=Object.values(t).map(g=>{var m;return((m=g.options)==null?void 0:m.group)||"admin"}).filter((g,m,v)=>v.indexOf(g)===m).filter(g=>g!==void 0&&xw(e,g)===null).map(g=>({id:g,title:r(`ra.menu.group.${g}`),type:"group",icon:Ke.AntDesignOutlined,children:[]})),h=[...u,...d];return Object.values(t).forEach(g=>{var F,E,k,P;const m=bw(h,g),v=(F=m==null?void 0:m.children)==null?void 0:F.find(L=>L.id===g.name),b=(E=m==null?void 0:m.children)==null?void 0:E.some(L=>L.id===g.name),x=(v==null?void 0:v.roles)||((k=g.options)==null?void 0:k.roles)||[],w=!x||x.length===0||x.some(L=>o.includes(L));if(!AU(g,n)||g.list||!w){b&&m&&m.children&&((P=m==null?void 0:m.children)==null?void 0:P.length)>0&&(m.children=m.children.filter(L=>L.id!==g.name));return}m&&(m.children||(m.children=[]))}),h.filter(Cw).map(ww)}function Xa(){throw new Error("Not implemented")}const Sw={openItem:[],openComponent:"buttons",selectedID:null,drawerOpen:!1,error:null,menu:[],activeItem:Xa,openDrawer:Xa,activeID:Xa,hasError:Xa,setMenu:Xa},Aw=T.createContext(Sw);function Tw({menu:e,children:t}){const[n,r]=T.useState({...Sw,menu:e});function o(d){r(h=>({...h,menu:d}))}function s(d){r(h=>({...h,openItem:d}))}function a(d){r(h=>({...h,selectedID:d}))}function c(d){r(h=>({...h,drawerOpen:d}))}function u(d){r(h=>({...h,error:d}))}return T.useEffect(()=>{o(e)},[e]),f.jsx(Aw.Provider,{value:{...n,setMenu:o,activeItem:s,openDrawer:c,activeID:a,hasError:u},children:t})}function Au(){return T.useContext(Aw)}function _h(){const e=re.useResourceDefinitions(),{isLoading:t,data:n}=re.useGetIdentity(),r=!!n&&!!n.id,{permissions:o}=re.usePermissions(r),{menu:s}=Au(),a=re.useTranslate(),c=T.useMemo(()=>{if(t||!n)return null;const h=((n==null?void 0:n.roles)||[]).map(m=>m.id);return TU(s,e,o,a,h)},[t,n,e,o,a,s]),u=T.useMemo(()=>t,[t]);function d(h){if(c)return Rh(c,h)}return{menu:c,isLoading:u,getItem:d,findInMenu:u?()=>{}:Rh}}function Ew(){const e=re.useTranslate(),{isLoading:t,menu:n,findInMenu:r}=_h(),{pathname:o}=ei.useLocation();return T.useMemo(()=>{var m;const s=o.split("/").filter(v=>v),a=$.cloneDeep(n);let c=o,u=r(a,o);if((!u||u.type==="collapse"||u.type==="group")&&(u=r(a,s[s.length-1]),c=u?u.id:c),!u||u.type==="collapse"||u.type==="group")for(let v=s.length;v>=0;v--){const b=s.slice(0,v).join("/");if(u=r(a,b),u){c=u.id;break}}const d=(m=u==null?void 0:u.url)==null?void 0:m.split("/"),h=(d==null?void 0:d.length)||0;if(s.length>=h){const v=s[s.length-1];if(u){const b=v==="create"||o===u.url?"create":"edit",x=`resources.${c}.breadcrumbs.${b}`,w={id:`${c}-${b}`,type:"item",title:e(x,{_:e(x,{_:x})}),url:o,breadcrumbs:!0,parent:u};u.type="collapse",u.breadcrumbs=!0,u.children=u.children||[],u.children.push(w),u=w}}let g=[];if(u){let v={...u,last:!0};for(;v;)g.push(v),v=v.parent;g=g.reverse()}return{isLoading:t,navigation:{items:a},breadcrumbs:g}},[t,o,n,r,e])}function Za(){return Au()}function Sr(e,t,n){const r=$.chain((e==null?void 0:e.sx)??{}).cloneDeepWith(a=>$.isFunction(a)?a:void 0).value();n!=null&&n.defaults?$.defaultsDeep(r,t):$.merge(r,t);const[o,s]=T.useState(r);return T.useEffect(()=>{$.isEqual(o,r)||s(r)},[o,r]),o}function EU(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}function bi(e){this._maxSize=e,this.clear()}bi.prototype.clear=function(){this._size=0,this._values=Object.create(null)},bi.prototype.get=function(e){return this._values[e]},bi.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var IU=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Iw=/^\d+$/,OU=/^\d/,PU=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,jU=/^\s*(['"]?)(.*?)(\1)\s*$/,Bh=512,Ow=new bi(Bh),Pw=new bi(Bh),jw=new bi(Bh),xi={Cache:bi,split:Vh,normalizePath:Nh,setter:function(e){var t=Nh(e);return Pw.get(e)||Pw.set(e,function(r,o){for(var s=0,a=t.length,c=r;s<a-1;){var u=t[s];if(u==="__proto__"||u==="constructor"||u==="prototype")return r;c=c[t[s++]]}c[t[s]]=o})},getter:function(e,t){var n=Nh(e);return jw.get(e)||jw.set(e,function(o){for(var s=0,a=n.length;s<a;)if(o!=null||!t)o=o[n[s++]];else return;return o})},join:function(e){return e.reduce(function(t,n){return t+(Wh(n)||Iw.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){MU(Array.isArray(e)?e:Vh(e),t,n)}};function Nh(e){return Ow.get(e)||Ow.set(e,Vh(e).map(function(t){return t.replace(jU,"$2")}))}function Vh(e){return e.match(IU)||[""]}function MU(e,t,n){var r=e.length,o,s,a,c;for(s=0;s<r;s++)o=e[s],o&&(LU(o)&&(o='"'+o+'"'),c=Wh(o),a=!c&&/^\d+$/.test(o),t.call(n,o,c,a,s,e))}function Wh(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function kU(e){return e.match(OU)&&!e.match(Iw)}function FU(e){return PU.test(e)}function LU(e){return!Wh(e)&&(kU(e)||FU(e))}const DU=/[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,Tu=e=>e.match(DU)||[],Eu=e=>e[0].toUpperCase()+e.slice(1),zh=(e,t)=>Tu(e).join(t).toLowerCase(),Mw=e=>Tu(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,"");var Uh={words:Tu,upperFirst:Eu,camelCase:Mw,pascalCase:e=>Eu(Mw(e)),snakeCase:e=>zh(e,"_"),kebabCase:e=>zh(e,"-"),sentenceCase:e=>Eu(zh(e," ")),titleCase:e=>Tu(e).map(Eu).join(" ")},Hh={exports:{}};Hh.exports=function(e){return kw(RU(e),e)},Hh.exports.array=kw;function kw(e,t){var n=e.length,r=new Array(n),o={},s=n,a=_U(t),c=BU(e);for(t.forEach(function(d){if(!c.has(d[0])||!c.has(d[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)o[s]||u(e[s],s,new Set);return r;function u(d,h,g){if(g.has(d)){var m;try{m=", node was:"+JSON.stringify(d)}catch{m=""}throw new Error("Cyclic dependency"+m)}if(!c.has(d))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(d));if(!o[h]){o[h]=!0;var v=a.get(d)||new Set;if(v=Array.from(v),h=v.length){g.add(d);do{var b=v[--h];u(b,c.get(b),g)}while(h);g.delete(d)}r[--n]=d}}}function RU(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var o=e[n];t.add(o[0]),t.add(o[1])}return Array.from(t)}function _U(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var o=e[n];t.has(o[0])||t.set(o[0],new Set),t.has(o[1])||t.set(o[1],new Set),t.get(o[0]).add(o[1])}return t}function BU(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}var NU=Hh.exports;const VU=Qr(NU),WU=Object.prototype.toString,zU=Error.prototype.toString,UU=RegExp.prototype.toString,HU=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",GU=/^Symbol\((.*)\)(.*)$/;function YU(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Fw(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return YU(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return HU.call(e).replace(GU,"Symbol($1)");const r=WU.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+zU.call(e)+"]":r==="RegExp"?UU.call(e):null}function Do(e,t){let n=Fw(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let s=Fw(this[r],t);return s!==null?s:o},2)}function Lw(e){return e==null?[]:[].concat(e)}let Dw,Rw,_w,KU=/\$\{\s*(\w+)\s*\}/g;Dw=Symbol.toStringTag;class Bw{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Dw]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],Lw(t).forEach(s=>{if(Sn.isError(s)){this.errors.push(...s.errors);const a=s.inner.length?s.inner:[s];this.inner.push(...a)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Rw=Symbol.hasInstance,_w=Symbol.toStringTag;class Sn extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(KU,(o,s)=>Do(n[s])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,s){const a=new Bw(t,n,r,o);if(s)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[_w]="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,Sn)}static[Rw](t){return Bw[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Vr={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Do(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Do(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Do(n,!0)}\``+o}},An={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"},Ro={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"},Gh={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},XU={isValue:"${path} field must be ${value}"},Yh={noUnknown:"${path} field has unspecified keys: ${unknown}"};Object.assign(Object.create(null),{mixed:Vr,string:An,number:Ro,date:Gh,object:Yh,array:{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"},boolean:XU,tuple:{notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.length<o)return`${t} tuple value has too few items, expected a length of ${o} but got ${n.length} for value: \`${Do(n,!0)}\``;if(n.length>o)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Do(n,!0)}\``}return Sn.formatError(Vr.notType,e)}}});const Kh=e=>e&&e.__isYupSchema__;class Iu{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:s}=n,a=typeof r=="function"?r:(...c)=>c.every(u=>u===r);return new Iu(t,(c,u)=>{var d;let h=a(...c)?o:s;return(d=h==null?void 0:h(u))!=null?d:u})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(s=>s.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!Kh(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const Ou={context:"$",value:"."};class Ci{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Ou.context,this.isValue=this.key[0]===Ou.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Ou.context:this.isValue?Ou.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&xi.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ci.prototype.__isYupRef=!0;const oo=e=>e==null;function Is(e){function t({value:n,path:r="",options:o,originalValue:s,schema:a},c,u){const{name:d,test:h,params:g,message:m,skipAbsent:v}=e;let{parent:b,context:x,abortEarly:w=a.spec.abortEarly,disableStackTrace:I=a.spec.disableStackTrace}=o;function F(G){return Ci.isRef(G)?G.getValue(n,b,x):G}function E(G={}){const le=Object.assign({value:n,originalValue:s,label:a.spec.label,path:G.path||r,spec:a.spec,disableStackTrace:G.disableStackTrace||I},g,G.params);for(const q of Object.keys(le))le[q]=F(le[q]);const ae=new Sn(Sn.formatError(G.message||m,le),n,le.path,G.type||d,le.disableStackTrace);return ae.params=le,ae}const k=w?c:u;let P={path:r,parent:b,type:d,from:o.from,createError:E,resolve:F,options:o,originalValue:s,schema:a};const L=G=>{Sn.isError(G)?k(G):G?u(null):k(E())},D=G=>{Sn.isError(G)?k(G):c(G)};if(v&&oo(n))return L(!0);let Z;try{var ee;if(Z=h.call(P,n,P),typeof((ee=Z)==null?void 0:ee.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${P.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(Z).then(L,D)}}catch(G){D(G);return}L(Z)}return t.OPTIONS=e,t}function ZU(e,t,n,r=n){let o,s,a;return t?(xi.forEach(t,(c,u,d)=>{let h=u?c.slice(1,c.length-1):c;e=e.resolve({context:r,parent:o,value:n});let g=e.type==="tuple",m=d?parseInt(h,10):0;if(e.innerType||g){if(g&&!d)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(n&&m>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[m],e=g?e.spec.types[m]:e.innerType}if(!d){if(!e.fields||!e.fields[h])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[h],e=e.fields[h]}s=h,a=u?"["+c+"]":"."+c}),{schema:e,parent:o,parentPath:s}):{parent:o,parentPath:t,schema:e}}class Pu extends Set{describe(){const t=[];for(const n of this.values())t.push(Ci.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new Pu(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function Os(e,t=new Map){if(Kh(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Os(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,o]of e.entries())n.set(r,Os(o,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Os(r,t))}else if(e instanceof Object){n={},t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Os(o,t)}else throw Error(`Unable to clone ${e}`);return n}class ur{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 Pu,this._blacklist=new Pu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Vr.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=Os(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(s=>{t.tests.forEach(a=>{s.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,s)=>s.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,s;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",s=r._cast(t,n);if(n.assert!==!1&&!r.isType(s)){if(o&&oo(s))return s;let a=Do(t),c=Do(s);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}".
|
|
213
213
|
|
|
214
214
|
attempted value: ${a}
|
|
215
|
-
`+(c!==a?`result of cast: ${c}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,s)=>s.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:s,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:s,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return o(h,u);this.runTests({path:s,value:u,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:s,value:a,originalValue:c,path:u,options:d}=t,h=x=>{o||(o=!0,n(x,a))},g=x=>{o||(o=!0,r(x,a))},m=s.length,v=[];if(!m)return g([]);let b={value:a,originalValue:c,path:u,options:d,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(b,h,function(F){F&&(Array.isArray(F)?v.push(...F):v.push(F)),--m<=0&&g(v)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:s,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:s[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${o||""}[${u?c:`"${c}"`}]`:(o?`${o}.`:"")+t});return(g,m,v)=>this.resolve(h)._validate(d,h,m,v)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,c)=>o._validate(t,n,(u,d)=>{Sn.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new Sn(u,d,void 0,void 0,s)):a(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw Sn.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new Sn(c,t,void 0,void 0,a);s=u}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Sn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Sn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Os(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Is({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Is({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Vr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Vr.notNull){return this.nullability(!1,t)}required(t=Vr.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Vr.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Is(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(s||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=Lw(t).map(s=>new Ci(s));return o.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Iu(o,n):Iu.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Is({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Vr.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Is({message:n,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,a=s.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:a}})}}),r}notOneOf(t,n=Vr.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Is({message:n,name:"notOneOf",test(o){let s=this.schema._blacklist,a=s.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(s).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:s,nullable:a}=n.spec;return{meta:o,label:r,optional:s,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(g=>g.name===u.name)===d)}}}ur.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ur.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:s,schema:a}=ZU(this,t,n,r.context);return a[e](o&&o[s],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])ur.prototype[e]=ur.prototype.oneOf;for(const e of["not","nope"])ur.prototype[e]=ur.prototype.notOneOf;const QU=()=>!0;function Nw(e){return new Vw(e)}class Vw extends ur{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:QU},t))}}Nw.prototype=Vw.prototype;const JU=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function qU(e){const t=Xh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Xh(e){var t,n;const r=JU.exec(e);return r?{year:io(r[1]),month:io(r[2],1)-1,day:io(r[3],1),hour:io(r[4]),minute:io(r[5]),second:io(r[6]),millisecond:r[7]?io(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:io(r[10]),minuteOffset:io(r[11])}:null}function io(e,t=0){return Number(e)||t}let $U=/^[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])?)*$/,eH=/^((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,tH=/^(?:[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,nH="^\\d{4}-\\d{2}-\\d{2}",rH="\\d{2}:\\d{2}:\\d{2}",oH="(([+-]\\d{2}(:?\\d{2})?)|Z)",iH=new RegExp(`${nH}T${rH}(\\.\\d+)?${oH}$`),sH=e=>oo(e)||e===e.trim(),aH={}.toString();function so(){return new Ww}class Ww extends ur{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===aH?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Vr.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=An.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=An.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=An.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:s}=n:o=n),this.test({name:s||"matches",message:o||An.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=An.email){return this.matches($U,{name:"email",message:t,excludeEmptyString:!0})}url(t=An.url){return this.matches(eH,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=An.uuid){return this.matches(tH,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(iH,{name:"datetime",message:n||An.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||An.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const a=Xh(s);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||An.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const a=Xh(s);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=An.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:sH})}lowercase(t=An.lowercase){return this.transform(n=>oo(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>oo(n)||n===n.toLowerCase()})}uppercase(t=An.uppercase){return this.transform(n=>oo(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>oo(n)||n===n.toUpperCase()})}}so.prototype=Ww.prototype;let lH=e=>e!=+e;function zw(){return new Uw}class Uw extends ur{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!lH(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Ro.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Ro.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Ro.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Ro.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Ro.positive){return this.moreThan(0,t)}negative(t=Ro.negative){return this.lessThan(0,t)}integer(t=Ro.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>oo(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>oo(o)?o:Math[t](o))}}zw.prototype=Uw.prototype;let cH=new Date(""),uH=e=>Object.prototype.toString.call(e)==="[object Date]";class ju extends ur{constructor(){super({type:"date",check(t){return uH(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=qU(t),isNaN(t)?ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ci.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=Gh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=Gh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}ju.INVALID_DATE=cH,ju.prototype;function dH(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,c])=>`${a}-${c}`));function s(a,c){let u=xi.split(a)[0];r.add(u),o.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),Ci.isRef(c)&&c.isSibling?s(c.path,a):Kh(c)&&"deps"in c&&c.deps.forEach(u=>s(u,a))}return VU.array(Array.from(r),n).reverse()}function Hw(e,t){let n=1/0;return e.some((r,o)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=o,!0}),n}function Gw(e){return(t,n)=>Hw(e,t)-Hw(e,n)}const fH=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Mu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Mu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Mu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Mu)}):"optional"in e?e.optional():e}const pH=(e,t)=>{const n=[...xi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=xi.getter(xi.join(n),!0)(e);return!!(o&&r in o)};let Yw=e=>Object.prototype.toString.call(e)==="[object Object]";function hH(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const gH=Gw([]);function Zh(e){return new Kw(e)}class Kw extends ur{constructor(t){super({type:"object",check(n){return Yw(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=gH,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let s=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const g of c){let m=s[g],v=g in o;if(m){let b,x=o[g];d.path=(n.path?`${n.path}.`:"")+g,m=m.resolve({value:x,context:n.context,parent:u});let w=m instanceof ur?m.spec:void 0,I=w==null?void 0:w.strict;if(w!=null&&w.strip){h=h||g in o;continue}b=!n.__validating||!I?m.cast(o[g],d):o[g],b!==void 0&&(u[g]=b)}else v&&!a&&(u[g]=o[g]);(v!==g in u||u[g]!==o[g])&&(h=!0)}return h?u:o}_validate(t,n={},r,o){let{from:s=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...s],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!Yw(d)){o(u,d);return}a=a||d;let h=[];for(let g of this._nodes){let m=this.fields[g];!m||Ci.isRef(m)||h.push(m.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,s]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?s:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const s=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=dH(t,n),r._sortErrors=Gw(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Mu(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=xi.getter(t,!0);return this.transform(s=>{if(!s)return s;let a=s;return pH(s,t)&&(a=Object.assign({},s),r||delete a[t],a[n]=o(s)),a})}json(){return this.transform(fH)}noUnknown(t=!0,n=Yh.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const s=hH(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Yh.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(Uh.camelCase)}snakeCase(){return this.transformKeys(Uh.snakeCase)}constantCase(){return this.transformKeys(t=>Uh.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,a]of Object.entries(n.fields)){var o;let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),r.fields[s]=a.describe(c)}return r}}Zh.prototype=Kw.prototype;const Xw=Nw().test("function","Invalid function",e=>$.isFunction(e));class Zw{constructor(){yo(this,Pi);yo(this,Uo,[])}get(t){if(so().required().validateSync(t),kl(this,Pi,Fl).call(this)){const n=localStorage.getItem(t);return $.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return so().required().validateSync(t),kl(this,Pi,Fl).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){so().required().validateSync(t),Xw.validateSync(n),kl(this,Pi,Fl).call(this)&&(kn(this,Uo).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){so().required().validateSync(t),Xw.optional().default($.identity).validateSync(n),kl(this,Pi,Fl).call(this)&&(n!==void 0?$o(this,Uo,$.reject(kn(this,Uo),r=>r.key===t&&r.callback===n)):$o(this,Uo,$.reject(kn(this,Uo),r=>r.key===t)))}}Uo=new WeakMap,Pi=new WeakSet,Fl=function(){return typeof window<"u"};function ku(e={},t=[],n={}){const{isEmpty:r=$.isEmpty}=n;return!$.some(t,o=>r((e??{})[o.locale]))}function Qw(e={},t=[],n={}){const{isEmpty:r=$.isEmpty}=n;return $.some(t,o=>!r((e??{})[o.locale]))}function Qh(e,t,n){if(!$.isPlainObject(e)||t===void 0)return;const r=$.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const a=$.isArray(r.fallbackLocales)&&!$.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=$.chain(a).map(c=>e[String(c)]).reject($.isUndefined).first().value(),s===void 0&&(s=$.chain(e).values().first().value())}return s}var Jw={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(yn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",c="minute",u="hour",d="day",h="week",g="month",m="quarter",v="year",b="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var J=["th","st","nd","rd"],z=q%100;return"["+q+(J[(z-20)%10]||J[z]||J[0])+"]"}},E=function(q,J,z){var Q=String(q);return!Q||Q.length>=J?q:""+Array(J+1-Q.length).join(z)+q},k={s:E,z:function(q){var J=-q.utcOffset(),z=Math.abs(J),Q=Math.floor(z/60),N=z%60;return(J<=0?"+":"-")+E(Q,2,"0")+":"+E(N,2,"0")},m:function q(J,z){if(J.date()<z.date())return-q(z,J);var Q=12*(z.year()-J.year())+(z.month()-J.month()),N=J.clone().add(Q,g),ne=z-N<0,W=J.clone().add(Q+(ne?-1:1),g);return+(-(Q+(z-N)/(ne?N-W:W-N))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:g,y:v,w:h,d,D:b,h:u,m:c,s:a,ms:s,Q:m}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",L={};L[P]=F;var D="$isDayjsObject",Y=function(q){return q instanceof le||!(!q||!q[D])},Z=function q(J,z,Q){var N;if(!J)return P;if(typeof J=="string"){var ne=J.toLowerCase();L[ne]&&(N=ne),z&&(L[ne]=z,N=ne);var W=J.split("-");if(!N&&W.length>1)return q(W[0])}else{var K=J.name;L[K]=J,N=K}return!Q&&N&&(P=N),N||!Q&&P},ee=function(q,J){if(Y(q))return q.clone();var z=typeof J=="object"?J:{};return z.date=q,z.args=arguments,new le(z)},G=k;G.l=Z,G.i=Y,G.w=function(q,J){return ee(q,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var le=function(){function q(z){this.$L=Z(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[D]=!0}var J=q.prototype;return J.parse=function(z){this.$d=function(Q){var N=Q.date,ne=Q.utc;if(N===null)return new Date(NaN);if(G.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var W=N.match(w);if(W){var K=W[2]-1||0,de=(W[7]||"0").substring(0,3);return ne?new Date(Date.UTC(W[1],K,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)):new Date(W[1],K,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)}}return new Date(N)}(z),this.init()},J.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},J.$utils=function(){return G},J.isValid=function(){return this.$d.toString()!==x},J.isSame=function(z,Q){var N=ee(z);return this.startOf(Q)<=N&&N<=this.endOf(Q)},J.isAfter=function(z,Q){return ee(z)<this.startOf(Q)},J.isBefore=function(z,Q){return this.endOf(Q)<ee(z)},J.$g=function(z,Q,N){return G.u(z)?this[Q]:this.set(N,z)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(z,Q){var N=this,ne=!!G.u(Q)||Q,W=G.p(z),K=function(be,we){var Ie=G.w(N.$u?Date.UTC(N.$y,we,be):new Date(N.$y,we,be),N);return ne?Ie:Ie.endOf(d)},de=function(be,we){return G.w(N.toDate()[be].apply(N.toDate("s"),(ne?[0,0,0,0]:[23,59,59,999]).slice(we)),N)},he=this.$W,fe=this.$M,ge=this.$D,ve="set"+(this.$u?"UTC":"");switch(W){case v:return ne?K(1,0):K(31,11);case g:return ne?K(1,fe):K(0,fe+1);case h:var Te=this.$locale().weekStart||0,Ce=(he<Te?he+7:he)-Te;return K(ne?ge-Ce:ge+(6-Ce),fe);case d:case b:return de(ve+"Hours",0);case u:return de(ve+"Minutes",1);case c:return de(ve+"Seconds",2);case a:return de(ve+"Milliseconds",3);default:return this.clone()}},J.endOf=function(z){return this.startOf(z,!1)},J.$set=function(z,Q){var N,ne=G.p(z),W="set"+(this.$u?"UTC":""),K=(N={},N[d]=W+"Date",N[b]=W+"Date",N[g]=W+"Month",N[v]=W+"FullYear",N[u]=W+"Hours",N[c]=W+"Minutes",N[a]=W+"Seconds",N[s]=W+"Milliseconds",N)[ne],de=ne===d?this.$D+(Q-this.$W):Q;if(ne===g||ne===v){var he=this.clone().set(b,1);he.$d[K](de),he.init(),this.$d=he.set(b,Math.min(this.$D,he.daysInMonth())).$d}else K&&this.$d[K](de);return this.init(),this},J.set=function(z,Q){return this.clone().$set(z,Q)},J.get=function(z){return this[G.p(z)]()},J.add=function(z,Q){var N,ne=this;z=Number(z);var W=G.p(Q),K=function(fe){var ge=ee(ne);return G.w(ge.date(ge.date()+Math.round(fe*z)),ne)};if(W===g)return this.set(g,this.$M+z);if(W===v)return this.set(v,this.$y+z);if(W===d)return K(1);if(W===h)return K(7);var de=(N={},N[c]=r,N[u]=o,N[a]=n,N)[W]||1,he=this.$d.getTime()+z*de;return G.w(he,this)},J.subtract=function(z,Q){return this.add(-1*z,Q)},J.format=function(z){var Q=this,N=this.$locale();if(!this.isValid())return N.invalidDate||x;var ne=z||"YYYY-MM-DDTHH:mm:ssZ",W=G.z(this),K=this.$H,de=this.$m,he=this.$M,fe=N.weekdays,ge=N.months,ve=N.meridiem,Te=function(we,Ie,ue,qe){return we&&(we[Ie]||we(Q,ne))||ue[Ie].slice(0,qe)},Ce=function(we){return G.s(K%12||12,we,"0")},be=ve||function(we,Ie,ue){var qe=we<12?"AM":"PM";return ue?qe.toLowerCase():qe};return ne.replace(I,function(we,Ie){return Ie||function(ue){switch(ue){case"YY":return String(Q.$y).slice(-2);case"YYYY":return G.s(Q.$y,4,"0");case"M":return he+1;case"MM":return G.s(he+1,2,"0");case"MMM":return Te(N.monthsShort,he,ge,3);case"MMMM":return Te(ge,he);case"D":return Q.$D;case"DD":return G.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return Te(N.weekdaysMin,Q.$W,fe,2);case"ddd":return Te(N.weekdaysShort,Q.$W,fe,3);case"dddd":return fe[Q.$W];case"H":return String(K);case"HH":return G.s(K,2,"0");case"h":return Ce(1);case"hh":return Ce(2);case"a":return be(K,de,!0);case"A":return be(K,de,!1);case"m":return String(de);case"mm":return G.s(de,2,"0");case"s":return String(Q.$s);case"ss":return G.s(Q.$s,2,"0");case"SSS":return G.s(Q.$ms,3,"0");case"Z":return W}return null}(we)||W.replace(":","")})},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(z,Q,N){var ne,W=this,K=G.p(Q),de=ee(z),he=(de.utcOffset()-this.utcOffset())*r,fe=this-de,ge=function(){return G.m(W,de)};switch(K){case v:ne=ge()/12;break;case g:ne=ge();break;case m:ne=ge()/3;break;case h:ne=(fe-he)/6048e5;break;case d:ne=(fe-he)/864e5;break;case u:ne=fe/o;break;case c:ne=fe/r;break;case a:ne=fe/n;break;default:ne=fe}return N?ne:G.a(ne)},J.daysInMonth=function(){return this.endOf(g).$D},J.$locale=function(){return L[this.$L]},J.locale=function(z,Q){if(!z)return this.$L;var N=this.clone(),ne=Z(z,Q,!0);return ne&&(N.$L=ne),N},J.clone=function(){return G.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},q}(),ae=le.prototype;return ee.prototype=ae,[["$ms",s],["$s",a],["$m",c],["$H",u],["$W",d],["$M",g],["$y",v],["$D",b]].forEach(function(q){ae[q[1]]=function(J){return this.$g(J,q[0],q[1])}}),ee.extend=function(q,J){return q.$i||(q(J,le,ee),q.$i=!0),ee},ee.locale=Z,ee.isDayjs=Y,ee.unix=function(q){return ee(1e3*q)},ee.en=L[P],ee.Ls=L,ee.p={},ee})})(Jw);var qw=Jw.exports;const Ar=Qr(qw);function $w(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Ar().hour(n).minute(r)}const Qa=new Zw;function mH(e,t,n){return function(r){const o=$.isFunction(r)?r(t):r;return Qa.set(e,o),n(o),o}}function Jh(e,t){var u;so().required().validateSync(e);const[n,r]=T.useState(Qa.get(e)??t),o=T.useRef(t),s=$.isEqual(o.current,t)?o.current:t,a=T.useRef(),c=a.current;return T.useEffect(()=>{r(Qa.get(e)??s)},[e,s,r]),T.useEffect(()=>{function d(h){r(h)}return Qa.watch(e,d),()=>{Qa.unwatch(e,d)}},[e,r]),(e!==(c==null?void 0:c.key)||!$.isEqual(n,c==null?void 0:c.value))&&(a.current={key:e,value:n,setter:mH(e,n,r)}),[n,((u=a.current)==null?void 0:u.setter)??$.noop]}function eS(e){const[t]=re.useLocaleState();return e!==void 0?String(e):t}function vH(e,t){const n=eS(t==null?void 0:t.locale);return Qh(e,n,t)}function yH(e){const t=eS(e==null?void 0:e.locale);return T.useCallback(r=>Qh(r,t,e),[t,e])}function tS(e){if(!$.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=T.useState(e);return T.useEffect(()=>{$.isEqual(e,t)||n(e)},[e,t]),t}function Ja(){const[e,t]=T.useState(null),n=!!e,r=T.useCallback(a=>t((a==null?void 0:a.currentTarget)??null),[t]),o=T.useCallback(()=>t(null),[t]),s=T.useCallback(a=>{n?o():r(a)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function bH(e,t){const[n,r]=T.useState({width:1,height:1}),o=e.current;return T.useEffect(()=>{function s(){var d;let c=0,u=0;switch(t){case"client":c=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":c=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":c=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const h=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};c=h.width,u=h.height;break}}r({width:c,height:u})}const a=new ResizeObserver(s);return $.isEmpty(e==null?void 0:e.current)||(a.observe(e==null?void 0:e.current),s()),()=>{a.disconnect()}},[o,t,e]),n}function qh(e){const t=_.useRecordContext(),n=_.useTranslate(),r=_.useResourceContext(),o=t!=null&&t.id?"edit":"create";return T.useMemo(()=>{if(e===!1)return;const a=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(a,{_:a}),...t})},[o,t,r,n,e])}function Wr(){throw new Error("Method must be implemented")}const nS={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:Wr,setMenuOrientation:Wr,setMiniDrawer:Wr,setContainer:Wr,setMode:Wr,setPresetColor:Wr,setThemeDirection:Wr,setAppDefaultPath:Wr,setDrawerWidth:Wr,setHorizontalMaxItems:Wr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function xH(e){return e==="vertical"}function CH(e){return e==="horizontal"}const $h=T.createContext(nS);function eg({initialConfig:e,children:t}){const[n,r]=Jh("theme-config",{...nS,...e});function o(b){r(x=>({...x,fontFamily:b}))}function s(b){r(x=>({...x,menuOrientation:b}))}function a(b){r(x=>({...x,miniDrawer:b}))}function c(b){r(x=>({...x,container:b}))}function u(b){r(x=>({...x,mode:b}))}function d(b){r(x=>({...x,presetColor:b}))}function h(b){r(x=>({...x,themeDirection:b}))}function g(b){r(x=>({...x,appDefaultPath:b}))}function m(b){r(x=>({...x,drawerWidth:b}))}function v(b){r(x=>({...x,horizontalMaxItems:b}))}return f.jsx($h.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:a,setContainer:c,setMode:u,setPresetColor:d,setThemeDirection:h,setAppDefaultPath:g,setDrawerWidth:m,setHorizontalMaxItems:v,isVerticalLayout:xH,isHorizontalLayout:CH},children:t})}function tg(){return T.useContext($h)}function Tn(){return tg()}const wH=Ma(_.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function wi(e){return f.jsx(wH,{...e})}function rS({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=Tn();return f.jsx(AH,{defaultValues:n,spacing:t||o,children:f.jsx(S.Grid,{container:!0,...r,spacing:t||o,children:e})})}function SH({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:s=!1,lg:a=12,md:c=12,sm:u=12,xs:d=12,...h}){const g=_.useTranslate(),m=_.useResourceContext(),{cardTitle:v,cardSubheader:b}=T.useMemo(()=>{const x=n||`resources.${m}.title`;return{cardTitle:g(x,{_:x}),cardSubheader:r!==null?g(r,{_:r}):null}},[m,r,n,g]);return f.jsx(S.Grid,{item:!0,...h,lg:a,md:c,sm:u,xs:d,children:f.jsx(wr,{content:t,title:v,subheader:b,secondary:o,divider:!0,children:f.jsxs(f.Fragment,{children:[e,s===!0?f.jsx(wi,{children:f.jsx(_.SaveButton,{})}):s]})})})}const AH=pe(_.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));rS.Section=SH;const TH=Ma(_.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function oS({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=f.jsx(wi,{children:f.jsx(_.SaveButton,{type:"button"})}),secondary:s=f.jsx(Fo,{children:f.jsx(_.DeleteWithConfirmButton,{})}),sx:a,...c}){const u=qh(e),d=_.useRecordContext(),h=ip();return f.jsx(wr,{content:n,title:u,subheader:r,secondary:d!=null&&d.id?s:null,sx:{...a,"& .MuiToolbar-root":{paddingLeft:h.spacing(2.5),paddingRight:h.spacing(2.5),paddingBottom:h.spacing(2.5),paddingTop:t?h.spacing(2.5):0,borderTop:t?`1px solid ${h.palette.divider}`:void 0}},border:!t,divider:!0,children:f.jsx(TH,{toolbar:o,...c})})}const iS={openDialogs:[],getCurrentDialog:()=>null,openDialog:(e,t)=>{throw new Error(`openDialog not yet ready for: ${e}, ${t}`)},closeDialog:(e,t)=>{throw new Error(`closeDialog not yet ready for: ${e}, ${t}`)}},sS=T.createContext(iS);function EH(e){const[t,n]=T.useState(iS);function r(a,c){n(u=>({...u,openDialogs:[...u.openDialogs,a]})),c&&c()}function o(a,c){n(u=>({...u,openDialogs:u.openDialogs.filter(d=>d!==a)})),c&&c()}function s(){return t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null}return f.jsx(sS.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:s},children:e.children})}function aS(){const e=T.useContext(sS);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function ng(){return aS()}function lS({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,fullWidth:c,...u}){const d=Nt.useTheme(),{getCurrentDialog:h}=ng(),{source:g,resource:m,isRequired:v}=u,{getFieldState:b,formState:x}=Qn.useFormContext(),{error:w}=b(g,x),I=h();return f.jsxs(S.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:w?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(S.InputLabel,{error:!!w,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(_.FieldTitle,{label:e,source:g,resource:I||m,isRequired:v})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?f.jsx(S.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!w,children:r}):null]})}const IH=pe(_.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function OH({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s}){return f.jsx(lS,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:f.jsx(IH,{source:n,label:!1,...s})})}function PH({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:f.jsxs(Fo,{children:[e?f.jsx(_.EditButton,{}):null,t?f.jsx(_.DeleteWithConfirmButton,{}):null,n?f.jsx(_.CloneButton,{}):null]})}const cS=pe("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),jH=pe("ul")({display:"inline-block"});function MH(e){var h;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=re.useRecordContext(e),c=dt.get(a,r),u=re.useTranslate();if(!c)return n?f.jsx(S.Typography,{component:"span",variant:"body2",className:t,...s,children:n?u(n,{_:n}):null}):f.jsx(cS,{className:t,...s});if(Array.isArray(c))return f.jsx(jH,{className:t,...s,children:c.map((g,m)=>{var b;const v=o instanceof String?(b=dt.get(g,o))==null?void 0:b.toString():o;return f.jsx("li",{children:v},m)})});const d=o instanceof String?(h=dt.get(a,o))==null?void 0:h.toString():o;return f.jsx(cS,{className:t,...s,children:d})}function uS({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",resource:s,...a}){const[c,u]=T.useState(null),d=_.useRecordContext(a),h=_.useDataProvider(),g=_.useResourceContext(),m=_.useNotify(),v=T.useCallback(async w=>{w.preventDefault(),w.stopPropagation(),m("ra.notification.download",{type:"info"});const I=dt.get(d,a==null?void 0:a.source),F=(s||g).replace("entities/",""),E=e||(d==null?void 0:d.id),k=await h.getFile(`/attachments/${F}/${E}/${t||(a==null?void 0:a.source)}/${(I==null?void 0:I.id)||(d==null?void 0:d.id)}`),P=document.createElement("a");P.href=k,P.download=dt.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source)),P.click()},[h,d,e,g,s,t,a==null?void 0:a.source,a==null?void 0:a.title,m]),b=T.useMemo(()=>({...d,[a==null?void 0:a.source]:(d==null?void 0:d.src)||dt.get(d,a==null?void 0:a.source),[a==null?void 0:a.title]:(d==null?void 0:d.title)||dt.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),[d,a==null?void 0:a.source,a==null?void 0:a.title]),x=_.useTranslate();return T.useEffect(()=>{!d||!(d!=null&&d.userId)||r===!1||h.getOne(o,{id:d==null?void 0:d.userId}).then(({data:w})=>u(w)).catch(()=>u(null))},[d,h,o,r]),f.jsx(MH,{...a,disabled:n,record:b,onClick:v,title:f.jsxs(S.Box,{sx:{cursor:"pointer"},children:[f.jsx(S.Typography,{variant:"subtitle1",children:dt.get(b,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),f.jsxs(S.Typography,{variant:"caption",color:"secondary",children:[dt.get(b,"sizeDescription"),r&&c?" | ":null,r&&c?x("ra.attachment.info",{user:c==null?void 0:c.name,created:Ar(b==null?void 0:b.createdAt).format("DD/MM/YYYY HH:mm")}):null]})]})})}const kH=pe(_.ImageField,{slot:"root"})(()=>({}));function dS(e){const t=`_${e==null?void 0:e.source}`;return f.jsx(kH,{...e,source:t})}function fS({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,sx:s,...a}){const c=T.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5,...s}),[e,t,n,s]),u=_.useRecordContext(),d=o||u;return f.jsx(dS,{sx:h=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${h.palette.divider}`,objectFit:"cover !important",...c,minWidth:c.width,minHeight:c.height}}),...a,record:d})}var FH={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(yn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(FH);var LH={exports:{}};(function(e,t){(function(n,r){e.exports=r(qw)})(yn,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(s,null,!0),s})})(LH);var pS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(yn,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(d,h,g,m){return s.fromToBase(d,h,g,m)}o.en.relativeTime=a,s.fromToBase=function(d,h,g,m,v){for(var b,x,w,I=g.$locale().relativeTime||a,F=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],E=F.length,k=0;k<E;k+=1){var P=F[k];P.d&&(b=m?o(d).diff(g,P.d,!0):g.diff(d,P.d,!0));var L=(n.rounding||Math.round)(Math.abs(b));if(w=b>0,L<=P.r||!P.r){L<=1&&k>0&&(P=F[k-1]);var D=I[P.l];v&&(L=v(""+L)),x=typeof D=="string"?D.replace("%d",L):D(L,h,P.l,w);break}}if(h)return x;var Y=w?I.future:I.past;return typeof Y=="function"?Y(x):Y.replace("%s",x)},s.to=function(d,h){return c(d,h,this,!0)},s.from=function(d,h){return c(d,h,this)};var u=function(d){return d.$u?o.utc():o()};s.toNow=function(d){return this.to(u(this),d)},s.fromNow=function(d){return this.from(u(this),d)}}})})(pS);var DH=pS.exports;const RH=Qr(DH);Ar.extend(RH);function hS(e){const t=_.useRecordContext(e),[n]=_.useLocaleState(),r=T.useMemo(()=>Ar(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(f.Fragment,{children:[f.jsx(_.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(S.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const _H=pe(_.DateField,{slot:"Root"})(()=>({}));function BH({variant:e="body1",...t}){return f.jsx(_H,{...t,variant:e})}const NH=pe(_.EmailField,{slot:"Root"})(()=>({}));function VH({variant:e="body1",...t}){return f.jsx(NH,{...t,variant:e})}const WH=pe(_.FileField,{slot:"root"})(()=>({}));function gS({...e}){const t=_.useRecordContext(e),n=T.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(WH,{...e,record:t,onClick:n})}function zH({variant:e="body1",...t}){return f.jsx(_.FunctionField,{...t,variant:e})}const UH=pe(_.TextField,{slot:"Root"})(()=>({}));function mS({variant:e="body1",...t}){return f.jsx(UH,{...t,variant:e})}function HH(e){const t=S.useTheme(),n=re.useLocales(),{source:r=""}=e,s=re.useRecordContext(e)[r],a=!ku(s,n),c=Sr(e,{flex:1}),[u]=re.useLocaleState(),d=T.useMemo(()=>a?f.jsx(Ke.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(Ke.FlagOutlined,{}),[a,t.palette.warning.main]),h=T.useMemo(()=>f.jsx(S.Stack,{children:$.map(n,(g,m)=>f.jsx(S.Typography,{children:`${g.locale.toUpperCase()}: ${(s??{})[g.locale]??""}`},m))}),[s,n]);return f.jsx(Qc,{title:h,arrow:!1,children:f.jsxs(S.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,f.jsx(mS,{...e,source:`${r}.${u}`,sx:c})]})})}const GH=pe("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}}));function YH({source:e,defaultValue:t=" ",...n}){const r=_.useRecordContext(n),o=dt.get(r,e,t);return f.jsx(S.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function KH({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?f.jsx(S.Tooltip,{title:e,placement:"top",children:t}):t}function XH({label:e,source:t,defaultValue:n=" ",children:r=f.jsx(YH,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s}){const a=T.Children.only(r),{getCurrentDialog:c}=aS(),u=_.useRecordContext(s),d=_.useResourceContext(s),h=c(),g=T.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]),m=Sr(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return f.jsx(KH,{title:g,children:f.jsxs(f.Fragment,{children:[f.jsx(S.InputLabel,{sx:{pt:1},children:f.jsx(_.FieldTitle,{label:e,source:t,resource:h||d})}),f.jsx(GH,{...s,children:T.isValidElement(a)?T.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:h||d,sx:m}):null})]})})}function ZH({children:e=null,className:t=""}){return f.jsx("div",{className:t,children:e})}const QH=Ma(ZH,{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function vS(e){return f.jsx(QH,{...e,children:f.jsx(_.ReferenceManyField,{pagination:f.jsx(_.Pagination,{}),...e})})}function JH({source:e,...t}){const n=_.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(S.Typography,{component:"span",variant:"body1",...t,children:c})}function fn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,...c}){const u=Kt(),{getCurrentDialog:d}=ng(),{source:h,resource:g,isRequired:m}=c,{fieldState:{invalid:v}}=_.useInput(c),b=d();return f.jsxs(S.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:v?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(S.InputLabel,{error:v===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(_.FieldTitle,{label:e,source:h,resource:b||g,isRequired:m})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,r?f.jsx(S.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:v===!0,children:r}):null]})}function qH(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const $H=pe(_.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...qH(e)}));function eG({children:e=f.jsx(uS,{title:"name",source:"path"}),multiple:t=!1,disabled:n=!1,type:r="attachment",...o}){const s=_.useRecordContext(o),a=o==null?void 0:o.source,c=s==null?void 0:s.id;return _.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),f.jsx(fn,{...o,disabled:n,children:f.jsx($H,{type:r,multiple:t,disabled:n,children:T.cloneElement(e,{entityId:c,property:a,...e.props})})})}const tG=pe(_.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall:has(.MuiChip-root)":{paddingBottom:"4px"},"& .MuiAutocomplete-tag":{margin:"0px 4px 4px 0px"}}));function nG({size:e="small",...t}){return f.jsx(fn,{...t,children:f.jsx(tG,{size:e})})}const rG=pe(_.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function oG({size:e="small",...t}){const{perPage:n,...r}=t;return f.jsx(fn,{...r,children:f.jsx(rG,{size:e})})}const iG=pe(_.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function sG({...e}){const t=Nt.useTheme();return f.jsx(fn,{...e,children:f.jsx(iG,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const aG=4,lG=pe(_.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function cG(e){const[t,n]=T.useState(""),r=T.useCallback(o=>{const s=o.target.value;Ar(s).year().toString().length>aG?o.target.value=t:n(s)},[t]);return f.jsx(fn,{...e,children:f.jsx(lG,{...e,onInput:r})})}const uG=pe(_.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function dG(e){return f.jsx(fn,{...e,children:f.jsx(uG,{})})}const fG=pe(_.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function pG({children:e=f.jsx(gS,{source:"",title:""}),title:t,...n}){const r=Qn.useWatch({name:n.source}),o=_.useRecordContext(n),{source:s}=n,a=T.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=dt.get(o,s);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,s,r]);return f.jsx(fn,{...n,children:f.jsx(fG,{children:T.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:a}})})})}function hG({children:e=f.jsx(fS,{}),title:t,multiple:n=!1,...r}){const o=Qn.useWatch({name:r.source}),s=_.useRecordContext(r),{source:a}=r;return _.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(fn,{...r,multiple:n,children:f.jsx(_.ImageInput,{accept:"image/*",children:T.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(o==null?void 0:o.title)||dt.get(s,a),[`_${a}`]:(o==null?void 0:o.src)||dt.get(s,`_${a}`)}})})})}function Tr(e){return f.jsx(fn,{...e,children:f.jsx(_.TextInput,{})})}const gG={vertical:"bottom",horizontal:"right"},mG={vertical:"top",horizontal:"right"};function vG({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:s}=o,a=re.useLocales(),c=T.useCallback((L="ra.validation.required",D="ra.validation.required_locale")=>Y=>{if(e&&!t&&!Qw(Y,a))return L;if(t&&(!$.has(Y,t)||$.isEmpty($.get(Y,t))))return{message:D,args:{locale:t}};if(!e&&r&&!ku(Y,a))return L},[e,t,a,r]),u=T.useMemo(()=>re.composeValidators(n,c()),[n,c]),{fieldState:d}=re.useInput({...o,validate:u}),{error:h}=d,g=Qn.useWatch({name:s}),m=!ku(g,a),[v]=re.useLocaleState(),[b,x]=T.useState(v),[w,I]=T.useState(null),F=!!w,E=T.useCallback(L=>I(F?null:L.currentTarget),[F,I]),k=T.useCallback(()=>I(null),[I]),P=T.useMemo(()=>$.map(a,(L,D)=>f.jsx(S.MenuItem,{onClick:()=>{x(L.locale),k()},children:f.jsx(S.ListItemText,{primary:`${L.locale.toUpperCase()}: ${(g??{})[L.locale]??""}`})},D)),[a,x,k,g]);return f.jsx(fn,{...o,validate:u,helperText:h!=null&&h.message?f.jsx(re.ValidationError,{error:h==null?void 0:h.message}):o==null?void 0:o.helperText,children:f.jsx(f.Fragment,{children:f.jsxs(S.Box,{flex:1,children:[$.map(a,(L,D)=>f.jsx(Tr,{...o,source:`${s}.${L.locale}`,sx:{width:"100%",display:L.locale===b?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:f.jsx(S.Chip,{label:f.jsx(S.Typography,{variant:"button",children:b}),size:"small",onClick:E,color:m?"warning":void 0})}},D)),f.jsx(S.Menu,{anchorEl:w,open:F,anchorOrigin:gG,transformOrigin:mG,onClose:k,children:P})]})})})}const yG=pe(_.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function bG(e){return f.jsx(fn,{...e,children:f.jsx(yG,{})})}function xG({source:e,minWidth:t=300,children:n}){const r=_.useResourceContext(),o=_.useRecordContext(),[s,a]=T.useState(dt.get(o,e,"")),[c,u]=T.useState(!1),d=T.useCallback(b=>a(b.target.value),[]),h=_.useDataProvider(),g=T.useCallback(b=>{b.key==="Enter"&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,o,e]),m=T.useCallback(()=>{dt.get(o,e)!==s&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,e,o]),v=T.useCallback(b=>{u(!0),h.update(r,{id:o.id,data:{...o,[e]:b,_changed:e},previousData:o}).then(()=>u(!1))},[h,r,e,o]);return T.useEffect(()=>a(dt.get(o,e)),[o,e]),n?T.cloneElement(n,{...n.props,source:e,value:s,onChange:v}):f.jsx(S.TextField,{value:s,disabled:c,onChange:d,onKeyPress:g,onBlur:m,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function CG({children:e,...t}){const n=T.Children.only(e);return f.jsx(_.ReferenceArrayInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function wG({children:e,...t}){const n=T.Children.only(e);return f.jsx(_.ReferenceInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function SG({reference:e,target:t,children:n,filters:r,actions:o,...s}){return f.jsx(_.ResourceContextProvider,{value:e,children:f.jsx(vS,{perPage:5,pagination:f.jsx(_.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(f.Fragment,{children:[f.jsx(_.ListToolbar,{filters:r,actions:o}),n]})})})}const AG=pe(_.SearchInput,{slot:"root"})(()=>({}));function TG(e){return f.jsx(AG,{...e})}const EG=pe(_.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiFormLabel-root.MuiInputLabel-root":{marginTop:"-3px"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{marginTop:0},"& .MuiOutlinedInput-input:has(.MuiChip-root)":{paddingTop:"4px",paddingBottom:"6px",paddingLeft:"6px"}}));function IG({optionText:e="name",optionValue:t="id",...n}){return f.jsx(fn,{...n,children:f.jsx(EG,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const OG=pe(_.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function PG(e){return f.jsx(fn,{...e,children:f.jsx(OG,{})})}function jG({multiline:e=!1,...t}){var u,d;const n=_.useTranslate(),r=_.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=Qn.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:d.value;let s=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(s=s&&s.length>0?`${c} - ${n(s)}`:c),f.jsx(Tr,{...t,validate:a,helperText:s,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function MG(e){if(!e)return"";const t=$w(e);return t?t.format("HH:mm"):""}function kG(e){return e}const FG=pe(_.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function LG({parse:e=kG,format:t=MG,...n}){return f.jsx(fn,{...n,children:f.jsx(FG,{parse:e,format:t,...n})})}function rg({onSuccess:e,firstAccess:t}){const{spacing:n}=Tn(),[r,o]=T.useState(!1),s=re.useAuthProvider(),a=re.useTranslate(),c=re.useNotify(),u=T.useCallback(d=>{const{oldPassword:h,newPassword:g}=d;o(!0),s==null||s.changePassword(h,g).then(()=>{c("ra.auth.password_changed"),e()}).catch(m=>{c((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e,c]);return f.jsx(re.ResourceContextProvider,{value:"user/change-password",children:f.jsx(re.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:f.jsx(oS,{onSubmit:u,toolbar:f.jsx(wi,{children:f.jsx(_.SaveButton,{disabled:r})}),children:f.jsxs(S.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Alert,{severity:"warning",children:[f.jsx(S.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsx(Tr,{source:"oldPassword",type:"password",validate:re.required()})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsx(Tr,{source:"newPassword",type:"password",validate:re.required()})})]})})})})}const yS=T.createContext({});function DG(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=_.useResourceContext(),o=_.useDataProvider(),{search:s}=ei.useLocation(),a=`${r}/new`,c=T.useCallback(()=>{if(!t||!$.isFunction(o.get))return Promise.resolve({});const m={};return new URLSearchParams(s??"").forEach((v,b)=>{m[b]=v}),o.get(a,m).then(v=>v.data).then(v=>{const{responseCode:b,value:x}=v;return b==="ok"?x:Promise.reject(v)})},[t,s,o,a]),u=T.useMemo(()=>$.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:d,isLoading:h}=Ui.useQuery(u),g=$.omit(e,["useDefaults"]);return h?f.jsx(S.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(S.CircularProgress,{})}):f.jsx(yS.Provider,{value:d??{},children:f.jsx(_.Create,{...g,children:e.children})})}const RG=pe(DG,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function _G(){return T.useContext(yS)}const BG=pe(_.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function NG(e){return f.jsx(BG,{...e})}const VG=pe(S.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),WG=pe(S.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function zG({title:e,divider:t=!0,variant:n="h5"}){const r=_.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsx(VG,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?f.jsx(WG,{}):null]})}function og(e){return e.id??e.label}function bS(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function UG(e){return $.map(e,"id")}function Fu(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function xS(e,t){const n=e!==void 0?Fu(e):0;return $.chain(t).filter(o=>e!==void 0?bS(e,o.id):!0).filter(o=>Fu(o.id)===n+1).value()}function HG(e,t){var s;const n=$.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return $.extend(n,{formRootPath:o});case"setSyncWithLocation":return $.extend(n,{syncWithLocation:o});case"setErrorCount":return $.extend(n,{errorCount:o});case"setActiveItem":return $.includes(UG(e.items),o)?$.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return $.extend(n,{items:$.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=$.isString(o)?o:o.id,c=$.chain(n.items).clone().reject(u=>u.id===a).value();return $.extend(n,{items:c}),n.activeItem===a&&$.extend(n,{activeItem:((s=$.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const GG={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},CS=T.createContext(void 0);function wS(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=ei.useLocation(),[s,a]=T.useReducer(HG,$.cloneDeep(GG)),{formRootPath:c,items:u}=s,d=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{const h=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&h.push(r);const g=$.chain(h).map(v=>ei.matchPath(v,o)).reject(v=>v===null).first().value(),m=g==null?void 0:g.pathnameBase;m!==void 0&&m!==c&&a({type:"setFormRootPath",payload:m})},[o,c,r]),T.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),T.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),T.useEffect(()=>{var h;if(t&&c!==void 0){let g=o.replace(c,"").replace(new RegExp(/^\/?/),"");$.isEmpty(g)&&(g=((h=$.chain(u).filter(m=>xS(m.id,u).length===0).orderBy([m=>Fu(m.id),m=>m.index]).first().value())==null?void 0:h.id)??void 0),a({type:"setActiveItem",payload:g})}},[a,c,o,u,t]),f.jsx(CS.Provider,{value:d,children:e.children})}function SS(){const e=T.useContext(CS);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function qa(){return SS().state}function ig(){return SS().dispatch}function AS(){return qa().formRootPath}function TS(){return qa().activeItem}function ES(){return qa().items}function IS(){return qa().syncWithLocation}function OS(){return qa().errorCount}function PS(){const e=ig();return T.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function jS(){const e=ig();return T.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function MS(){const e=ig();return T.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const YG=pe(S.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function kS(e){const{spacing:t}=Tn(),{spacing:n=t}=e,r=$.omit(e,["spacing"]);return f.jsx(_.Form,{...r,className:"LongFormView",children:f.jsx(YG,{container:!0,spacing:n*2,children:e.children})})}function FS(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=$.omit(e,["disposition"]);return f.jsx(S.Grid,{...n,item:!0,...t,children:e.children})}function LS(e){const t=TS();return t===void 0?!1:e===t||bS(e,t)}function DS(e){const t=ES();return T.useMemo(()=>xS(e,t),[t,e])}function KG(){const e=AS(),{search:t}=ei.useLocation(),n=ei.useNavigate();return T.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function RS(){const e=DS();return f.jsx(S.Card,{variant:"outlined",children:f.jsx(S.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:$.map(e,(t,n)=>f.jsx(sg,{...t},n))})})}function sg(e){const t=re.useTranslate()??$.identity,n=_S(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:u,isGroup:d,level:h,errors:g=0}=n,{spacing:m}=Tn(),[v,b]=T.useState(r),x=T.useCallback(F=>{b(!v),a(F)},[a,v]),w=s!==void 0,I=$.omit(e,["label","icon","selected","badge"]);return T.useEffect(()=>{r&&!v&&b(r)},[r,v,b]),f.jsxs(f.Fragment,{children:[f.jsx(S.ListItem,{...I,disablePadding:!0,children:f.jsxs(S.ListItemButton,{selected:r?!d:null,onClick:x,sx:{pl:m*h},children:[w?f.jsx(S.ListItemIcon,{children:s}):null,f.jsx(S.ListItemText,{inset:!w,primary:g===0?t(o):f.jsx(S.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c?f.jsx(S.ListItemAvatar,{children:f.jsx(Lc,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}):null,d?v?f.jsx(Fn.ExpandLess,{}):f.jsx(Fn.ExpandMore,{}):null]})}),d?f.jsx(S.Collapse,{in:v,timeout:"auto",children:f.jsx(S.List,{children:$.map(u,(F,E)=>f.jsx(sg,{...F},E))})}):null]})}function _S(e){const{id:t}=e,n=LS(t),r=Fu(t),o=KG(),s=IS(),a=PS(),c=DS(t),u=!$.isEmpty(c),d=T.useCallback(g=>{u||(s?o(e.id):a(e.id)),$.isFunction(e.onClick)&&e.onClick(g)},[a,o,e,s,u]);return T.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:u,level:r}),[e,n,d,c,u,r])}var XG=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},BS=e=>e.firstChild?e.firstChild.offsetParent===e:!0,ZG=(e,t)=>{let n=e,r=0;BS(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},QG=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},$a=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?$a="sticky":CSS.supports("position","-webkit-sticky")&&($a="-webkit-sticky"));var Lu=!1;try{const e=Object.defineProperty({},"passive",{get(){Lu={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var ag=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,Lu),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},JG=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},qG=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=XG(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const D=g();D!==E&&k(D),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const h=D=>{const{offsetTop:Y,height:Z}=v,{naturalTop:ee}=w,{height:G}=I;return D+Y+Z>=ee+G+F+o},g=()=>{const{height:D}=v,{height:Y}=I;return Y+s+o<=D?3:h(d)?1:2},m=a!==window&&BS(a),v=ag({el:a,onChange:u,unsubs:t,measure:({height:D,top:Y})=>({height:D,offsetTop:m?Y:0})}),b=QG(e),x=b===window?{top:0,bottom:0}:JG(b),w=ag({el:b,onChange:u,unsubs:t,measure:({height:D})=>({height:D-x.top-x.bottom,naturalTop:b===window?0:ZG(b,a)+x.top+v.offsetTop})}),I=ag({el:e,onChange:u,unsubs:t,measure:({height:D})=>({height:D})});let F=0,E=g();const k=D=>{const Y=E;if(E=D,Y===2&&(F=-1),D===3){e.style.position=$a,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:ee}=v,{height:G,naturalTop:le}=w,{height:ae}=I;if(D===2)if(e.style.position="relative",F=Y===0?Math.max(0,ee+d-le+s):Math.max(0,ee+d+Z-(le+ae+o)),r){const q=Math.max(0,G-ae-F);e.style.bottom=`${q}px`}else e.style.top=`${F}px`;else e.style.position=$a,D===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-ae-o}px`:r?e.style.bottom=`${Z-ae-o}px`:e.style.top=`${s}px`};k(E);const P=D=>{if(D===d)return;const Y=D-d;if(d=D,E===3)return;const{offsetTop:Z,height:ee}=v,{naturalTop:G,height:le}=w,{height:ae}=I;if(Y>0)if(E===0){if(D+Z+s>G){const q=Math.max(0,Z+d-G+s);D+Z+ee<=G+ae+q+o?k(2):k(1)}}else E===2&&h(D)&&k(1);else if(E===1){if(Z+D+ee<G+le+o){const q=Math.max(0,Z+d+ee-(G+ae+o));Z+D+s>=G+q?k(2):k(0)}}else E===2&&Z+D+s<G+F&&k(0)},L=a===window?()=>P(window.scrollY):()=>P(a.scrollTop);a.addEventListener("scroll",L,Lu),a.addEventListener("mousewheel",L,Lu),t.push(()=>a.removeEventListener("scroll",L),()=>a.removeEventListener("mousewheel",L))},$G=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=T.useState(null);return T.useEffect(()=>{if(!r||!$a)return;const s=[];return qG(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},eY=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=$G({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:a,ref:c,children:o})},tY=eY,NS=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(NS||{});function VS(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=$.omit(e,["sticky","disposition","spacing"]),s=t?tY:S.Box,a=T.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(S.Grid,{...o,item:!0,...n,children:f.jsx(s,{...a,children:f.jsx(S.Stack,{spacing:r,children:e.children})})})}function WS(e){return f.jsx(f.Fragment,{children:e.children})}function zS(e){const{children:t}=e;return T.useMemo(()=>{const r={top:[],bottom:[]};return T.Children.forEach(t,o=>{if(T.isValidElement(o)&&(o==null?void 0:o.type)===WS){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function US(e=[],t){const n=$.isArray(e)?e:[e],r=$.filter(n,o=>T.isValidElement(o));$.each(r,o=>{var s;t(o),US(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function HS(e){const{errors:t}=Qn.useFormState(),n=OS(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,u=og(e),d=jS(),h=MS(),g=LS(u),m=[];n&&(e.sources!==void 0?m.push(...e.sources):US(c,b=>{var x;((x=b==null?void 0:b.props)==null?void 0:x.source)!==void 0&&m.push(b.props.source)}));const v=$.chain(m).uniq().map(b=>$.get(t,b)).reject(b=>b===void 0).value().length;return T.useEffect(()=>{d({id:u,index:a,label:r,icon:o,badge:s,errors:v})},[d,h,r,o,u,s,a,v]),T.useEffect(()=>()=>{h(u)},[u,h]),f.jsx(S.Box,{display:g?"unset":"none",children:e.children})}function GS(e){const t=lg(e),n=og(e);return f.jsx(HS,{...e,id:n,children:T.Children.map(t,r=>{const o=og(r.props);return T.cloneElement(r,{id:`${n}.${o}`})})})}function YS(e){return f.jsx(HS,{...e})}function lg(e){const{children:t}=e;return T.useMemo(()=>$.chain(T.Children.toArray(t)).filter(r=>T.isValidElement(r)&&((r==null?void 0:r.type)===YS||(r==null?void 0:r.type)===GS)).map((r,o)=>T.cloneElement(r,{index:o})).value(),[t])}function nY(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=$.pick(e,["syncWithLocation","errorCount"]),s=$.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=zS(e),u=lg(e);return f.jsx(wS,{...o,children:f.jsxs(kS,{...s,spacing:r,children:[f.jsxs(VS,{disposition:t,spacing:r,children:[a,f.jsx(RS,{}),c]}),f.jsx(FS,{disposition:n,children:u})]})})}const Ft=nY;Ft.BaseForm=kS,Ft.Content=FS,Ft.Provider=wS,Ft.useItems=ES,Ft.useSyncWithLocation=IS,Ft.useErrorCount=OS,Ft.useFormRootPath=AS,Ft.useActiveItem=TS,Ft.useSetActiveItem=PS,Ft.useAddItem=jS,Ft.useRemoveItem=MS,Ft.Sidebar=VS,Ft.SidebarSection=WS,Ft.SidebarSectionPosition=NS,Ft.useSidebarChildren=zS,Ft.NavMenu=RS,Ft.NavMenuItem=sg,Ft.useNavMenuItem=_S,Ft.Tab=YS,Ft.Group=GS,Ft.useBaseItemChildren=lg;const rY=pe(_.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function oY(e){return f.jsx(rY,{...e})}const iY=pe(_.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function sY(e){return f.jsx(iY,{...e})}const aY=Ma(_.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function lY({children:e}){return f.jsx(f.Fragment,{children:e})}function cg(e){const{title:t,modal:n,content:r,subheader:o,secondary:s=f.jsx(Fo,{children:f.jsx(_.DeleteWithConfirmButton,{})}),sx:a,noPadding:c,toolbar:u=f.jsx(wi,{children:f.jsx(_.SaveButton,{type:"button"})}),...d}=e,h=qh(t),g=S.useTheme();return f.jsx(wr,{title:h,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{paddingTop:n?g.spacing(2.5):0},"& .MuiToolbar-root":{padding:g.spacing(2.5),borderTop:n?`1px solid ${g.palette.divider}`:void 0}},border:!n,divider:!0,children:f.jsx(aY,{toolbar:u,component:c?lY:void 0,...d})})}function cY({children:e,...t}){return f.jsx(_.TabbedForm.Tab,{...t,children:f.jsx(S.Box,{sx:{width:"100%",p:2.5},children:e})})}cg.Tab=_.TabbedForm.Tab,cg.TabStack=cY;function ug(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,s=S.useTheme(),a=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,c=s.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(S.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&f.jsx(S.Typography,{children:t}),!n&&(T.isValidElement(e==null?void 0:e.customButton)?T.cloneElement(e==null?void 0:e.customButton,{onClick:r}):f.jsx(S.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:f.jsx(Ke.PlusCircleOutlined,{style:{color:c}})}))]})}function KS(e){const{label:t,disableAdd:n,inset:r,source:o,template:s}=e,[a,c]=T.useState(!1),{append:u}=_.useArrayInput(),d=T.useCallback(()=>{c(g=>!g)},[c]),h=T.useCallback(g=>(c(!1),u(g),Promise.resolve()),[c,u]);return f.jsxs(f.Fragment,{children:[T.cloneElement(f.jsx(ug,{}),{label:t,source:o,disableAdd:n,template:s,onClick:d,inset:r}),f.jsx(S.Dialog,{open:a,onClose:d,maxWidth:"xs",children:f.jsx(re.CreateContextProvider,{value:{save:h},children:e.children})})]})}const dg=T.createContext(void 0);function XS(){return T.useContext(dg)}function Du(e){const{children:t}=e,{item:n,index:r}=XS(),[o,s]=T.useState(!1),{update:a}=_.useArrayInput(),c=_.useTranslate(),u=T.useCallback(d=>(s(!1),a(r,d),Promise.resolve()),[r,a]);return f.jsxs(f.Fragment,{children:[f.jsx(S.Button,{color:"primary",onClick:()=>s(!0),sx:{justifyContent:"flex-start"},children:c("ra.action.edit")}),f.jsx(S.Dialog,{open:o,onClose:()=>s(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(_.EditContextProvider,{value:{record:n,save:u},children:t})})]})}function ZS({source:e,children:t}){const n=T.Children.only(t),{getValues:r}=Qn.useFormContext(),o=_.useRecordContext({record:r()});return T.isValidElement(n)?T.cloneElement(n,{source:e,record:o}):null}const fg=T.createContext(void 0);function QS(){return T.useContext(fg)}const JS=B.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:s,member:a,resource:c,record:u}=e,d=_.useTranslate(),[h,g]=B.useState(!1),{total:m,remove:v}=QS(),b=B.useCallback(()=>{g(!1),v(s)},[s,v]),x=T.useMemo(()=>({index:s,total:m,item:u,remove:()=>v(s)}),[s,m,v,u]),w=T.useMemo(()=>T.Children.map(n,I=>T.isValidElement(I)&&(I==null?void 0:I.type)===Du&&B.isValidElement(I)?I:null),[n]);return f.jsxs(dg.Provider,{value:x,children:[T.Children.map(n,(I,F)=>{if(I.type===Du||!T.isValidElement(I))return null;const{source:E,...k}=I.props;return f.jsx(S.TableCell,{children:T.cloneElement(I,{source:E?`${a}.${E}`:a,index:E?void 0:F,resource:c,disabled:r,...k,label:""})})}),!o&&f.jsx(S.TableCell,{children:f.jsx(S.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsxs(Fo,{horizontal:!0,children:[f.jsx(S.Button,{onClick:()=>g(!0),color:"error",sx:{justifyContent:"flex-start"},children:d("ra.action.delete")}),w]})})}),o&&w?f.jsx(S.TableCell,{children:f.jsx(S.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsx(Fo,{horizontal:!0,children:w})})}):null,n.length>0&&f.jsx(_.Confirm,{isOpen:h,title:d("ra.action.remove_item"),content:d("ra.message.remove_item"),onConfirm:b,onClose:()=>g(!1)})]})});function uY(e){var J,z;const{children:t,resource:n,source:r,label:o,disableAdd:s=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:d,template:h={},addButton:g=f.jsx(ug,{}),inset:m}=e,[v,b]=T.useState(!1),{fields:x,remove:w,replace:I,append:F}=_.useArrayInput(e),{resetField:E}=Qn.useFormContext(),k=Kt(),P=re.useTranslate(),L=T.useRef(h||{}),D=re.useTranslateLabel(),Y=T.useCallback(Q=>{w(Q)},[w]);if(x.length>0){const{...Q}=x[0];L.current=Q;for(const N in L.current)L.current[N]=null}const Z=T.useCallback((Q=void 0)=>{let N=Q;Q==null&&(N=L.current,T.Children.count(t)===1&&B.isValidElement(T.Children.only(t))&&!T.Children.only(t).props.source&&T.Children.map(t,W=>B.isValidElement(W)&&W.type!==re.FormDataConsumer).some(Boolean)?N="":(N=N||{},T.Children.forEach(t,W=>{B.isValidElement(W)&&W.type!==re.FormDataConsumer&&W.props.source&&(N[W.props.source]=W.props.defaultValue??null)})));const ne={...N,...h};F(ne),E(`${r}.${x.length}`,{defaultValue:N})},[F,t,E,r,x.length,h]);function ee(Q){return N=>{Z(),Q&&Q(N)}}const G=T.useCallback(()=>{I([]),b(!1)},[I]),le=T.useMemo(()=>({total:x.length,remove:Y,source:r}),[x.length,Y,r]),ae=k.palette.mode==="dark"?k.palette.grey.A400:k.palette.grey.A800,q=x.length>0&&c;return x?f.jsx(fg.Provider,{value:le,children:f.jsxs("div",{className:u,children:[B.cloneElement(g,{label:o,source:r,disableAdd:s,template:h,onClick:(g==null?void 0:g.type)!==KS?ee((z=(J=e==null?void 0:e.addButton)==null?void 0:J.props)==null?void 0:z.onClick):void 0,inset:m}),f.jsx(S.TableContainer,{component:S.Paper,sx:m===!0?{borderRadius:0}:{mt:2,border:`1px solid ${ae}`},children:f.jsxs(S.Table,{size:"small",children:[f.jsx(S.TableHead,{sx:m===!0?{}:{borderTop:0,borderBottom:`1px solid ${ae}`},children:f.jsxs(S.TableRow,{children:[T.Children.map(t,(Q,N)=>{if(Q.type===Du||!B.isValidElement(Q))return null;const ne=f.jsx(S.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:D({...Q.props,resource:n})});return f.jsx(S.TableCell,{children:Q.props.title?f.jsx(Qc,{title:Q.props.title,arrow:!0,children:ne}):ne},N)}),!a&&q?f.jsx(S.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(Fo,{horizontal:!0,children:f.jsx(S.Typography,{color:"error",onClick:()=>b(!0),children:P("ra.action.delete")})})},"actions"):f.jsx(S.TableCell,{},"empty_actions")]})}),f.jsxs(S.TableBody,{children:[x.length===0&&f.jsx(S.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(S.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||f.jsx(S.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),x.length>0&&x.map((Q,N)=>f.jsx(S.TableRow,{sx:{borderBottom:`1px solid ${ae}}`},children:f.jsx(JS,{disableRemove:a,index:N,member:`${r}.${N}`,onRemoveField:Y,record:x&&x[N]||{},resource:n,source:r,children:t})},Q.id))]})]})}),x.length>0&&f.jsx(_.Confirm,{isOpen:v,title:P("ra.action.clear_array_input"),content:P("ra.message.clear_array_input"),onConfirm:G,onClose:()=>b(!1)})]})}):null}const Ru=pe(uY,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}}));Ru.CreateButton=KS,Ru.EditButton=Du,Ru.Field=ZS;function dY(e,t){const n=$.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=$.chain(n.media).clone().extend(o).value();return $.extend(n,{media:s})}case"updateDrawer":{const s=$.chain(n.drawer).clone().extend(o).value();return $.extend(n,{drawer:s})}case"updateLogo":{const s=$.chain(n.logo).clone().extend(o).value();return $.extend(n,{logo:s})}case"updateNotifications":{const s=$.chain(n.notifications).clone().extend(o).value();return $.extend(n,{notifications:s})}case"updateTheme":{const s=$.chain(n.theme).clone().extend(o).value();return $.extend(n,{theme:s})}default:return n}}const fY={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},qS=T.createContext(void 0);function $S(e){var Z;const t=re.useAuthProvider(),n=re.useGetIdentity(),r=S.useTheme(),o=S.useMediaQuery(r.breakpoints.down("md")),s=S.useMediaQuery(r.breakpoints.down("lg")),a=S.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,themeDirection:d,drawerWidth:h}=tg(),g=u(d)&&!s,{drawerOpen:m,openDrawer:v}=Au(),b=T.useCallback(()=>{v(!m)},[m,v]),[x,w]=T.useState(!1),[I,F]=T.useReducer(dY,$.chain(fY).clone().merge({drawer:{open:!c||m}}).value()),E=T.useCallback(()=>w(!1),[]),k=T.useMemo(()=>({state:I,dispatch:F}),[I,F]),{logoIcon:P,logoMain:L,enableNotification:D,notification:Y}=e;return T.useEffect(()=>{F({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:g}})},[o,s,a,g]),T.useEffect(()=>{F({type:"updateDrawer",payload:{open:m,width:h,handleDrawerToggle:b}})},[m,h,b]),T.useEffect(()=>{c||v(!a)},[a,c]),T.useEffect(()=>{F({type:"updateLogo",payload:{main:L,icon:P}})},[P,L]),T.useEffect(()=>{F({type:"updateNotifications",payload:{enable:D,resource:Y??"entities/notification"}})},[D,Y]),T.useEffect(()=>{F({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),T.useEffect(()=>{if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(ee=>{var G;w(!ee&&((G=n==null?void 0:n.data)==null?void 0:G.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),f.jsxs(qS.Provider,{value:k,children:[f.jsx(S.Dialog,{open:x,maxWidth:"xs",fullWidth:!0,children:f.jsx(rg,{onSuccess:E,firstAccess:!0})}),e.children]})}function eA(e){return T.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return f.jsx($S,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:f.jsx(e,{ref:n,...t})})})}function pg(){const e=T.useContext(qS);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function pY(){return pg().dispatch}function Ps(){return pg().state}function Nn(){return Ps().media}function Si(){return Ps().drawer}function tA(){return Ps().logo}function _u(){return Ps().notifications}function hY(){return Ps().theme}function nA(e){const{width:t}=Si(),{horizontal:n}=Nn(),{container:r}=Tn(),[o,s]=T.useState(null);function a(u,d){s(d)}const c=Kt();return f.jsx(fW,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>f.jsx(Dh,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:f.jsx(T.Suspense,{fallback:f.jsx(ZC,{}),children:f.jsxs(S.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[f.jsx(S.Toolbar,{sx:{mt:n?8:"inherit"}})," ",f.jsx(S.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column",[c.breakpoints.down("sm")]:{px:"12px"}},children:e.children})]})})})}const rA=pe(S.Box,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({...e.mixins.toolbar,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",paddingLeft:e.spacing(t?3:0)}));function oA({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:s}=Tn();return f.jsx(S.ButtonBase,{disableRipple:!0,component:ut.Link,to:n||s,sx:t,children:e?r:o})}function iA(e){const t=S.useTheme(),{horizontal:n}=Nn(),{open:r}=Si(),{icon:o,main:s}=tA(),a=Sr(e,{minHeight:n?"unset":"60px",width:n?{xs:"100%",lg:"424px"}:"inherit",paddingTop:n?{xs:"10px",lg:"0"}:"8px",paddingBottom:n?{xs:"18px",lg:"0"}:"8px",paddingLeft:n?{xs:"24px",lg:"0"}:r?"24px":0});return f.jsx(rA,{theme:t,open:r,sx:a,children:f.jsx(oA,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:s,logoIcon:o})})}function sA(e,t){return{width:t,borderRight:`1px solid ${e.palette.divider}`,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",boxShadow:e.palette.mode==="dark"?e.customShadows.z1:"none"}}function aA(e){return{transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7.5),borderRight:"none",boxShadow:e.customShadows.z1}}const gY=pe(S.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Tn();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...sA(e,n),"& .MuiDrawer-paper":sA(e,n)},...!t&&{...aA(e),"& .MuiDrawer-paper":aA(e)}}});var Ae={},hg={exports:{}};(function(e,t){(function(n,r){var o="1.0.39",s="",a="?",c="function",u="undefined",d="object",h="string",g="major",m="model",v="name",b="type",x="vendor",w="version",I="architecture",F="console",E="mobile",k="tablet",P="smarttv",L="wearable",D="embedded",Y=500,Z="Amazon",ee="Apple",G="ASUS",le="BlackBerry",ae="Browser",q="Chrome",J="Edge",z="Firefox",Q="Google",N="Huawei",ne="LG",W="Microsoft",K="Motorola",de="Opera",he="Samsung",fe="Sharp",ge="Sony",ve="Xiaomi",Te="Zebra",Ce="Facebook",be="Chromium OS",we="Mac OS",Ie=" Browser",ue=function(Le,Re){var Oe={};for(var xe in Le)Re[xe]&&Re[xe].length%2===0?Oe[xe]=Re[xe].concat(Le[xe]):Oe[xe]=Le[xe];return Oe},qe=function(Le){for(var Re={},Oe=0;Oe<Le.length;Oe++)Re[Le[Oe].toUpperCase()]=Le[Oe];return Re},me=function(Le,Re){return typeof Le===h?Qe(Re).indexOf(Qe(Le))!==-1:!1},Qe=function(Le){return Le.toLowerCase()},an=function(Le){return typeof Le===h?Le.replace(/[^\d\.]/g,s).split(".")[0]:r},Et=function(Le,Re){if(typeof Le===h)return Le=Le.replace(/^\s\s*/,s),typeof Re===u?Le:Le.substring(0,Y)},yt=function(Le,Re){for(var Oe=0,xe,ht,Ut,Be,Pe,qt;Oe<Re.length&&!Pe;){var fr=Re[Oe],Ir=Re[Oe+1];for(xe=ht=0;xe<fr.length&&!Pe&&fr[xe];)if(Pe=fr[xe++].exec(Le),Pe)for(Ut=0;Ut<Ir.length;Ut++)qt=Pe[++ht],Be=Ir[Ut],typeof Be===d&&Be.length>0?Be.length===2?typeof Be[1]==c?this[Be[0]]=Be[1].call(this,qt):this[Be[0]]=Be[1]:Be.length===3?typeof Be[1]===c&&!(Be[1].exec&&Be[1].test)?this[Be[0]]=qt?Be[1].call(this,qt,Be[2]):r:this[Be[0]]=qt?qt.replace(Be[1],Be[2]):r:Be.length===4&&(this[Be[0]]=qt?Be[3].call(this,qt.replace(Be[1],Be[2])):r):this[Be]=qt||r;Oe+=2}},Un=function(Le,Re){for(var Oe in Re)if(typeof Re[Oe]===d&&Re[Oe].length>0){for(var xe=0;xe<Re[Oe].length;xe++)if(me(Re[Oe][xe],Le))return Oe===a?r:Oe}else if(me(Re[Oe],Le))return Oe===a?r:Oe;return Re.hasOwnProperty("*")?Re["*"]:Le},It={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},bt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Xt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[v,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,w],[/opios[\/ ]+([\w\.]+)/i],[w,[v,de+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[w,[v,de+" GX"]],[/\bopr\/([\w\.]+)/i],[w,[v,de]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[v,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[v,w],[/quark(?:pc)?\/([-\w\.]+)/i],[w,[v,"Quark"]],[/\bddg\/([\w\.]+)/i],[w,[v,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[v,"UC"+ae]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[v,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[v,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[v,"Smart Lenovo "+ae]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+ae],w],[/\bfocus\/([\w\.]+)/i],[w,[v,z+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[v,de+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[v,de+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[v,"MIUI "+ae]],[/fxios\/([-\w\.]+)/i],[w,[v,z]],[/\bqihu|(qi?ho?o?|360)browser/i],[[v,"360"+Ie]],[/\b(qq)\/([\w\.]+)/i],[[v,/(.+)/,"$1Browser"],w],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1"+Ie],w],[/samsungbrowser\/([\w\.]+)/i],[w,[v,he+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[v,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[v,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[v,w],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,Ce],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[v,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[v,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[v,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[v,q+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,q+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[v,"Android "+ae]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[w,Un,It]],[/(webkit|khtml)\/([\w\.]+)/i],[v,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],w],[/(wolvic)\/([\w\.]+)/i],[v,w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[v,z+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[v,[w,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[v,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[I,"amd64"]],[/(ia32(?=;))/i],[[I,Qe]],[/((?:i[346]|x)86)[;\)]/i],[[I,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[I,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[I,"armhf"]],[/windows (ce|mobile); ppc;/i],[[I,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[I,/ower/,s,Qe]],[/(sun4\w)[;\)]/i],[[I,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[I,Qe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[x,he],[b,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[m,[x,he],[b,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[x,ee],[b,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[x,ee],[b,k]],[/(macintosh);/i],[m,[x,ee]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[x,fe],[b,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[x,N],[b,k]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[x,N],[b,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[m,/_/g," "],[x,ve],[b,E]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[x,ve],[b,k]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[x,"OPPO"],[b,E]],[/\b(opd2\d{3}a?) bui/i],[m,[x,"OPPO"],[b,k]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[x,"Vivo"],[b,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[m,[x,"Realme"],[b,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[x,K],[b,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[x,K],[b,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[x,ne],[b,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[x,ne],[b,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[x,"Lenovo"],[b,k]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[x,"Nokia"],[b,E]],[/(pixel c)\b/i],[m,[x,Q],[b,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[x,Q],[b,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[x,ge],[b,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[x,ge],[b,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[x,"OnePlus"],[b,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[x,Z],[b,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[x,Z],[b,E]],[/(playbook);[-\w\),; ]+(rim)/i],[m,x,[b,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[x,le],[b,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[x,G],[b,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[x,G],[b,E]],[/(nexus 9)/i],[m,[x,"HTC"],[b,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[x,[m,/_/g," "],[b,E]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[m,[x,"TCL"],[b,k]],[/(itel) ((\w+))/i],[[x,Qe],m,[b,Un,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[x,"Acer"],[b,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[x,"Meizu"],[b,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[m,[x,"Ulefone"],[b,E]],[/droid.+; (a(?:015|06[35]|142p?))/i],[m,[x,"Nothing"],[b,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[x,m,[b,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[x,m,[b,k]],[/(surface duo)/i],[m,[x,W],[b,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[x,"Fairphone"],[b,E]],[/(u304aa)/i],[m,[x,"AT&T"],[b,E]],[/\bsie-(\w*)/i],[m,[x,"Siemens"],[b,E]],[/\b(rct\w+) b/i],[m,[x,"RCA"],[b,k]],[/\b(venue[\d ]{2,7}) b/i],[m,[x,"Dell"],[b,k]],[/\b(q(?:mv|ta)\w+) b/i],[m,[x,"Verizon"],[b,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[x,"Barnes & Noble"],[b,k]],[/\b(tm\d{3}\w+) b/i],[m,[x,"NuVision"],[b,k]],[/\b(k88) b/i],[m,[x,"ZTE"],[b,k]],[/\b(nx\d{3}j) b/i],[m,[x,"ZTE"],[b,E]],[/\b(gen\d{3}) b.+49h/i],[m,[x,"Swiss"],[b,E]],[/\b(zur\d{3}) b/i],[m,[x,"Swiss"],[b,k]],[/\b((zeki)?tb.*\b) b/i],[m,[x,"Zeki"],[b,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[x,"Dragon Touch"],m,[b,k]],[/\b(ns-?\w{0,9}) b/i],[m,[x,"Insignia"],[b,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[x,"NextBook"],[b,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[x,"Voice"],m,[b,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[x,"LvTel"],m,[b,E]],[/\b(ph-1) /i],[m,[x,"Essential"],[b,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[x,"Envizen"],[b,k]],[/\b(trio[-\w\. ]+) b/i],[m,[x,"MachSpeed"],[b,k]],[/\btu_(1491) b/i],[m,[x,"Rotor"],[b,k]],[/(shield[\w ]+) b/i],[m,[x,"Nvidia"],[b,k]],[/(sprint) (\w+)/i],[x,m,[b,E]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[x,W],[b,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[x,Te],[b,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[x,Te],[b,E]],[/smart-tv.+(samsung)/i],[x,[b,P]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[x,he],[b,P]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[x,ne],[b,P]],[/(apple) ?tv/i],[x,[m,ee+" TV"],[b,P]],[/crkey/i],[[m,q+"cast"],[x,Q],[b,P]],[/droid.+aft(\w+)( bui|\))/i],[m,[x,Z],[b,P]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[x,fe],[b,P]],[/(bravia[\w ]+)( bui|\))/i],[m,[x,ge],[b,P]],[/(mitv-\w{5}) bui/i],[m,[x,ve],[b,P]],[/Hbbtv.*(technisat) (.*);/i],[x,m,[b,P]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[x,Et],[m,Et],[b,P]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,P]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[x,m,[b,F]],[/droid.+; (shield) bui/i],[m,[x,"Nvidia"],[b,F]],[/(playstation [345portablevi]+)/i],[m,[x,ge],[b,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[x,W],[b,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[m,[x,he],[b,L]],[/((pebble))app/i],[x,m,[b,L]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[x,ee],[b,L]],[/droid.+; (glass) \d/i],[m,[x,Q],[b,L]],[/droid.+; (wt63?0{2,3})\)/i],[m,[x,Te],[b,L]],[/(quest( \d| pro)?)/i],[m,[x,Ce],[b,L]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[x,[b,D]],[/(aeobc)\b/i],[m,[x,Z],[b,D]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[m,[b,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[b,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,E]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[x,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[v,J+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[v,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[v,[w,Un,bt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,Un,bt],[v,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,we],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,v],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[v,w],[/\(bb(10);/i],[w,[v,le]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[v,z+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[v,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[v,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[v,q+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[v,be],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,w],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[v,w]]},xt=function(Le,Re){if(typeof Le===d&&(Re=Le,Le=r),!(this instanceof xt))return new xt(Le,Re).getResult();var Oe=typeof n!==u&&n.navigator?n.navigator:r,xe=Le||(Oe&&Oe.userAgent?Oe.userAgent:s),ht=Oe&&Oe.userAgentData?Oe.userAgentData:r,Ut=Re?ue(Xt,Re):Xt,Be=Oe&&Oe.userAgent==xe;return this.getBrowser=function(){var Pe={};return Pe[v]=r,Pe[w]=r,yt.call(Pe,xe,Ut.browser),Pe[g]=an(Pe[w]),Be&&Oe&&Oe.brave&&typeof Oe.brave.isBrave==c&&(Pe[v]="Brave"),Pe},this.getCPU=function(){var Pe={};return Pe[I]=r,yt.call(Pe,xe,Ut.cpu),Pe},this.getDevice=function(){var Pe={};return Pe[x]=r,Pe[m]=r,Pe[b]=r,yt.call(Pe,xe,Ut.device),Be&&!Pe[b]&&ht&&ht.mobile&&(Pe[b]=E),Be&&Pe[m]=="Macintosh"&&Oe&&typeof Oe.standalone!==u&&Oe.maxTouchPoints&&Oe.maxTouchPoints>2&&(Pe[m]="iPad",Pe[b]=k),Pe},this.getEngine=function(){var Pe={};return Pe[v]=r,Pe[w]=r,yt.call(Pe,xe,Ut.engine),Pe},this.getOS=function(){var Pe={};return Pe[v]=r,Pe[w]=r,yt.call(Pe,xe,Ut.os),Be&&!Pe[v]&&ht&&ht.platform&&ht.platform!="Unknown"&&(Pe[v]=ht.platform.replace(/chrome os/i,be).replace(/macos/i,we)),Pe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return xe},this.setUA=function(Pe){return xe=typeof Pe===h&&Pe.length>Y?Et(Pe,Y):Pe,this},this.setUA(xe),this};xt.VERSION=o,xt.BROWSER=qe([v,w,g]),xt.CPU=qe([I]),xt.DEVICE=qe([m,x,b,F,E,P,k,L,D]),xt.ENGINE=xt.OS=qe([v,w]),e.exports&&(t=e.exports=xt),t.UAParser=xt;var zt=typeof n!==u&&(n.jQuery||n.Zepto);if(zt&&!zt.ua){var Ot=new xt;zt.ua=Ot.getResult(),zt.ua.get=function(){return Ot.getUA()},zt.ua.set=function(Le){Ot.setUA(Le);var Re=Ot.getResult();for(var Oe in Re)zt.ua[Oe]=Re[Oe]}}})(typeof window=="object"?window:yn)})(hg,hg.exports);var mY=hg.exports;Object.defineProperty(Ae,"__esModule",{value:!0});function vY(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var rn=T,pt=vY(rn),lA=mY,_o=new lA,on=_o.getBrowser(),yY=_o.getCPU(),Vn=_o.getDevice(),gg=_o.getEngine(),Bo=_o.getOS(),el=_o.getUA(),cA=function(t){return _o.setUA(t)},tl=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new lA(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},uA=Object.freeze({ClientUAInstance:_o,browser:on,cpu:yY,device:Vn,engine:gg,os:Bo,ua:el,setUa:cA,parseUserAgent:tl});function dA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(n),!0).forEach(function(r){SY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nl=function(t){return typeof t}:nl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nl(e)}function xY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wY(e,t,n){return t&&CY(e.prototype,t),e}function SY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mg(){return mg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mg.apply(this,arguments)}function AY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yg(e,t)}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},vg(e)}function yg(e,t){return yg=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},yg(e,t)}function TY(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function dr(e,t){if(e==null)return{};var n=TY(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EY(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bu(e)}function IY(e,t){return OY(e)||PY(e,t)||jY(e,t)||MY()}function OY(e){if(Array.isArray(e))return e}function PY(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,c=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function jY(e,t){if(e){if(typeof e=="string")return fA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fA(e,t)}}function fA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
215
|
+
`+(c!==a?`result of cast: ${c}`:""))}return s}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,s)=>s.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:s,originalValue:a=t,strict:c=this.spec.strict}=n,u=t;c||(u=this._cast(u,Object.assign({assert:!1},n)));let d=[];for(let h of Object.values(this.internalTests))h&&d.push(h);this.runTests({path:s,value:u,originalValue:a,options:n,tests:d},r,h=>{if(h.length)return o(h,u);this.runTests({path:s,value:u,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:s,value:a,originalValue:c,path:u,options:d}=t,h=x=>{o||(o=!0,n(x,a))},g=x=>{o||(o=!0,r(x,a))},m=s.length,v=[];if(!m)return g([]);let b={value:a,originalValue:c,path:u,options:d,schema:this};for(let x=0;x<s.length;x++){const w=s[x];w(b,h,function(F){F&&(Array.isArray(F)?v.push(...F):v.push(F)),--m<=0&&g(v)})}}asNestedTest({key:t,index:n,parent:r,parentPath:o,originalParent:s,options:a}){const c=t??n;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof c=="number";let d=r[c];const h=Object.assign({},a,{strict:!0,parent:r,value:d,originalValue:s[c],key:void 0,[u?"index":"key"]:c,path:u||c.includes(".")?`${o||""}[${u?c:`"${c}"`}]`:(o?`${o}.`:"")+t});return(g,m,v)=>this.resolve(h)._validate(d,h,m,v)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,c)=>o._validate(t,n,(u,d)=>{Sn.isError(u)&&(u.value=d),c(u)},(u,d)=>{u.length?c(new Sn(u,d,void 0,void 0,s)):a(d)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),s,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(c,u)=>{throw Sn.isError(c)&&(c.value=u),c},(c,u)=>{if(c.length)throw new Sn(c,t,void 0,void 0,a);s=u}),s}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(Sn.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(Sn.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):Os(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Is({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Is({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=Vr.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Vr.notNull){return this.nullability(!1,t)}required(t=Vr.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=Vr.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Is(n),s=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(s||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=Lw(t).map(s=>new Ci(s));return o.forEach(s=>{s.isSibling&&r.deps.push(s.key)}),r.conditions.push(typeof n=="function"?new Iu(o,n):Iu.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Is({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=Vr.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Is({message:n,name:"oneOf",skipAbsent:!0,test(o){let s=this.schema._whitelist,a=s.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:a}})}}),r}notOneOf(t,n=Vr.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Is({message:n,name:"notOneOf",test(o){let s=this.schema._blacklist,a=s.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(s).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:s,nullable:a}=n.spec;return{meta:o,label:r,optional:s,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,d,h)=>h.findIndex(g=>g.name===u.name)===d)}}}ur.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ur.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:s,schema:a}=ZU(this,t,n,r.context);return a[e](o&&o[s],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])ur.prototype[e]=ur.prototype.oneOf;for(const e of["not","nope"])ur.prototype[e]=ur.prototype.notOneOf;const QU=()=>!0;function Nw(e){return new Vw(e)}class Vw extends ur{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:QU},t))}}Nw.prototype=Vw.prototype;const JU=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function qU(e){const t=Xh(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function Xh(e){var t,n;const r=JU.exec(e);return r?{year:io(r[1]),month:io(r[2],1)-1,day:io(r[3],1),hour:io(r[4]),minute:io(r[5]),second:io(r[6]),millisecond:r[7]?io(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:io(r[10]),minuteOffset:io(r[11])}:null}function io(e,t=0){return Number(e)||t}let $U=/^[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])?)*$/,eH=/^((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,tH=/^(?:[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,nH="^\\d{4}-\\d{2}-\\d{2}",rH="\\d{2}:\\d{2}:\\d{2}",oH="(([+-]\\d{2}(:?\\d{2})?)|Z)",iH=new RegExp(`${nH}T${rH}(\\.\\d+)?${oH}$`),sH=e=>oo(e)||e===e.trim(),aH={}.toString();function so(){return new Ww}class Ww extends ur{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===aH?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||Vr.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=An.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=An.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=An.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,s;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:s}=n:o=n),this.test({name:s||"matches",message:o||An.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=An.email){return this.matches($U,{name:"email",message:t,excludeEmptyString:!0})}url(t=An.url){return this.matches(eH,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=An.uuid){return this.matches(tH,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(iH,{name:"datetime",message:n||An.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||An.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:s=>{if(!s||r)return!0;const a=Xh(s);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||An.datetime_precision,params:{precision:o},skipAbsent:!0,test:s=>{if(!s||o==null)return!0;const a=Xh(s);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=An.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:sH})}lowercase(t=An.lowercase){return this.transform(n=>oo(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>oo(n)||n===n.toLowerCase()})}uppercase(t=An.uppercase){return this.transform(n=>oo(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>oo(n)||n===n.toUpperCase()})}}so.prototype=Ww.prototype;let lH=e=>e!=+e;function zw(){return new Uw}class Uw extends ur{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!lH(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Ro.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Ro.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Ro.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return r<this.resolve(t)}})}moreThan(t,n=Ro.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(r){return r>this.resolve(t)}})}positive(t=Ro.positive){return this.moreThan(0,t)}negative(t=Ro.negative){return this.lessThan(0,t)}integer(t=Ro.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>oo(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>oo(o)?o:Math[t](o))}}zw.prototype=Uw.prototype;let cH=new Date(""),uH=e=>Object.prototype.toString.call(e)==="[object Date]";class ju extends ur{constructor(){super({type:"date",check(t){return uH(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=qU(t),isNaN(t)?ju.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(Ci.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=Gh.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=Gh.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}ju.INVALID_DATE=cH,ju.prototype;function dH(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,c])=>`${a}-${c}`));function s(a,c){let u=xi.split(a)[0];r.add(u),o.has(`${c}-${u}`)||n.push([c,u])}for(const a of Object.keys(e)){let c=e[a];r.add(a),Ci.isRef(c)&&c.isSibling?s(c.path,a):Kh(c)&&"deps"in c&&c.deps.forEach(u=>s(u,a))}return VU.array(Array.from(r),n).reverse()}function Hw(e,t){let n=1/0;return e.some((r,o)=>{var s;if((s=t.path)!=null&&s.includes(r))return n=o,!0}),n}function Gw(e){return(t,n)=>Hw(e,t)-Hw(e,n)}const fH=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function Mu(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Mu(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Mu(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Mu)}):"optional"in e?e.optional():e}const pH=(e,t)=>{const n=[...xi.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=xi.getter(xi.join(n),!0)(e);return!!(o&&r in o)};let Yw=e=>Object.prototype.toString.call(e)==="[object Object]";function hH(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const gH=Gw([]);function Zh(e){return new Kw(e)}class Kw extends ur{constructor(t){super({type:"object",check(n){return Yw(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=gH,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let s=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(o).filter(g=>!this._nodes.includes(g))),u={},d=Object.assign({},n,{parent:u,__validating:n.__validating||!1}),h=!1;for(const g of c){let m=s[g],v=g in o;if(m){let b,x=o[g];d.path=(n.path?`${n.path}.`:"")+g,m=m.resolve({value:x,context:n.context,parent:u});let w=m instanceof ur?m.spec:void 0,I=w==null?void 0:w.strict;if(w!=null&&w.strip){h=h||g in o;continue}b=!n.__validating||!I?m.cast(o[g],d):o[g],b!==void 0&&(u[g]=b)}else v&&!a&&(u[g]=o[g]);(v!==g in u||u[g]!==o[g])&&(h=!0)}return h?u:o}_validate(t,n={},r,o){let{from:s=[],originalValue:a=t,recursive:c=this.spec.recursive}=n;n.from=[{schema:this,value:a},...s],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(u,d)=>{if(!c||!Yw(d)){o(u,d);return}a=a||d;let h=[];for(let g of this._nodes){let m=this.fields[g];!m||Ci.isRef(m)||h.push(m.asNestedTest({options:n,key:g,parent:d,parentPath:n.path,originalParent:a}))}this.runTests({tests:h,value:d,originalValue:a,options:n},r,g=>{o(g.sort(this._sortErrors).concat(u),d)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,s]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?s:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const s=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=s&&"getDefault"in s?s.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=dH(t,n),r._sortErrors=Gw(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return Mu(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=xi.getter(t,!0);return this.transform(s=>{if(!s)return s;let a=s;return pH(s,t)&&(a=Object.assign({},s),r||delete a[t],a[n]=o(s)),a})}json(){return this.transform(fH)}noUnknown(t=!0,n=Yh.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const s=hH(this.schema,o);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=Yh.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(Uh.camelCase)}snakeCase(){return this.transformKeys(Uh.snakeCase)}constantCase(){return this.transformKeys(t=>Uh.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[s,a]of Object.entries(n.fields)){var o;let c=t;(o=c)!=null&&o.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),r.fields[s]=a.describe(c)}return r}}Zh.prototype=Kw.prototype;const Xw=Nw().test("function","Invalid function",e=>$.isFunction(e));class Zw{constructor(){yo(this,Pi);yo(this,Uo,[])}get(t){if(so().required().validateSync(t),kl(this,Pi,Fl).call(this)){const n=localStorage.getItem(t);return $.isNil(n)?null:JSON.parse(n)}else return null}set(t,n){return so().required().validateSync(t),kl(this,Pi,Fl).call(this)?(localStorage.setItem(t,JSON.stringify(n)),n):null}watch(t,n){so().required().validateSync(t),Xw.validateSync(n),kl(this,Pi,Fl).call(this)&&(kn(this,Uo).push({key:t,callback:n}),window.addEventListener("storage",r=>{r.storageArea===localStorage&&r.key===t&&n(this.get(t))}))}unwatch(t,n){so().required().validateSync(t),Xw.optional().default($.identity).validateSync(n),kl(this,Pi,Fl).call(this)&&(n!==void 0?$o(this,Uo,$.reject(kn(this,Uo),r=>r.key===t&&r.callback===n)):$o(this,Uo,$.reject(kn(this,Uo),r=>r.key===t)))}}Uo=new WeakMap,Pi=new WeakSet,Fl=function(){return typeof window<"u"};function ku(e={},t=[],n={}){const{isEmpty:r=$.isEmpty}=n;return!$.some(t,o=>r((e??{})[o.locale]))}function Qw(e={},t=[],n={}){const{isEmpty:r=$.isEmpty}=n;return $.some(t,o=>!r((e??{})[o.locale]))}function Qh(e,t,n){if(!$.isPlainObject(e)||t===void 0)return;const r=$.isPlainObject(n)?n:{},o=!!((r==null?void 0:r.fallback)??!0);let s=e[String(t)];if(s===void 0&&o){const a=$.isArray(r.fallbackLocales)&&!$.isEmpty(r.fallbackLocales)?r.fallbackLocales:["en"];s=$.chain(a).map(c=>e[String(c)]).reject($.isUndefined).first().value(),s===void 0&&(s=$.chain(e).values().first().value())}return s}var Jw={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(yn,function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",c="minute",u="hour",d="day",h="week",g="month",m="quarter",v="year",b="date",x="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(q){var J=["th","st","nd","rd"],z=q%100;return"["+q+(J[(z-20)%10]||J[z]||J[0])+"]"}},E=function(q,J,z){var Q=String(q);return!Q||Q.length>=J?q:""+Array(J+1-Q.length).join(z)+q},k={s:E,z:function(q){var J=-q.utcOffset(),z=Math.abs(J),Q=Math.floor(z/60),N=z%60;return(J<=0?"+":"-")+E(Q,2,"0")+":"+E(N,2,"0")},m:function q(J,z){if(J.date()<z.date())return-q(z,J);var Q=12*(z.year()-J.year())+(z.month()-J.month()),N=J.clone().add(Q,g),ne=z-N<0,W=J.clone().add(Q+(ne?-1:1),g);return+(-(Q+(z-N)/(ne?N-W:W-N))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:g,y:v,w:h,d,D:b,h:u,m:c,s:a,ms:s,Q:m}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",L={};L[P]=F;var D="$isDayjsObject",Y=function(q){return q instanceof le||!(!q||!q[D])},Z=function q(J,z,Q){var N;if(!J)return P;if(typeof J=="string"){var ne=J.toLowerCase();L[ne]&&(N=ne),z&&(L[ne]=z,N=ne);var W=J.split("-");if(!N&&W.length>1)return q(W[0])}else{var K=J.name;L[K]=J,N=K}return!Q&&N&&(P=N),N||!Q&&P},ee=function(q,J){if(Y(q))return q.clone();var z=typeof J=="object"?J:{};return z.date=q,z.args=arguments,new le(z)},G=k;G.l=Z,G.i=Y,G.w=function(q,J){return ee(q,{locale:J.$L,utc:J.$u,x:J.$x,$offset:J.$offset})};var le=function(){function q(z){this.$L=Z(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[D]=!0}var J=q.prototype;return J.parse=function(z){this.$d=function(Q){var N=Q.date,ne=Q.utc;if(N===null)return new Date(NaN);if(G.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var W=N.match(w);if(W){var K=W[2]-1||0,de=(W[7]||"0").substring(0,3);return ne?new Date(Date.UTC(W[1],K,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)):new Date(W[1],K,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)}}return new Date(N)}(z),this.init()},J.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},J.$utils=function(){return G},J.isValid=function(){return this.$d.toString()!==x},J.isSame=function(z,Q){var N=ee(z);return this.startOf(Q)<=N&&N<=this.endOf(Q)},J.isAfter=function(z,Q){return ee(z)<this.startOf(Q)},J.isBefore=function(z,Q){return this.endOf(Q)<ee(z)},J.$g=function(z,Q,N){return G.u(z)?this[Q]:this.set(N,z)},J.unix=function(){return Math.floor(this.valueOf()/1e3)},J.valueOf=function(){return this.$d.getTime()},J.startOf=function(z,Q){var N=this,ne=!!G.u(Q)||Q,W=G.p(z),K=function(be,we){var Ie=G.w(N.$u?Date.UTC(N.$y,we,be):new Date(N.$y,we,be),N);return ne?Ie:Ie.endOf(d)},de=function(be,we){return G.w(N.toDate()[be].apply(N.toDate("s"),(ne?[0,0,0,0]:[23,59,59,999]).slice(we)),N)},he=this.$W,fe=this.$M,ge=this.$D,ve="set"+(this.$u?"UTC":"");switch(W){case v:return ne?K(1,0):K(31,11);case g:return ne?K(1,fe):K(0,fe+1);case h:var Te=this.$locale().weekStart||0,Ce=(he<Te?he+7:he)-Te;return K(ne?ge-Ce:ge+(6-Ce),fe);case d:case b:return de(ve+"Hours",0);case u:return de(ve+"Minutes",1);case c:return de(ve+"Seconds",2);case a:return de(ve+"Milliseconds",3);default:return this.clone()}},J.endOf=function(z){return this.startOf(z,!1)},J.$set=function(z,Q){var N,ne=G.p(z),W="set"+(this.$u?"UTC":""),K=(N={},N[d]=W+"Date",N[b]=W+"Date",N[g]=W+"Month",N[v]=W+"FullYear",N[u]=W+"Hours",N[c]=W+"Minutes",N[a]=W+"Seconds",N[s]=W+"Milliseconds",N)[ne],de=ne===d?this.$D+(Q-this.$W):Q;if(ne===g||ne===v){var he=this.clone().set(b,1);he.$d[K](de),he.init(),this.$d=he.set(b,Math.min(this.$D,he.daysInMonth())).$d}else K&&this.$d[K](de);return this.init(),this},J.set=function(z,Q){return this.clone().$set(z,Q)},J.get=function(z){return this[G.p(z)]()},J.add=function(z,Q){var N,ne=this;z=Number(z);var W=G.p(Q),K=function(fe){var ge=ee(ne);return G.w(ge.date(ge.date()+Math.round(fe*z)),ne)};if(W===g)return this.set(g,this.$M+z);if(W===v)return this.set(v,this.$y+z);if(W===d)return K(1);if(W===h)return K(7);var de=(N={},N[c]=r,N[u]=o,N[a]=n,N)[W]||1,he=this.$d.getTime()+z*de;return G.w(he,this)},J.subtract=function(z,Q){return this.add(-1*z,Q)},J.format=function(z){var Q=this,N=this.$locale();if(!this.isValid())return N.invalidDate||x;var ne=z||"YYYY-MM-DDTHH:mm:ssZ",W=G.z(this),K=this.$H,de=this.$m,he=this.$M,fe=N.weekdays,ge=N.months,ve=N.meridiem,Te=function(we,Ie,ue,qe){return we&&(we[Ie]||we(Q,ne))||ue[Ie].slice(0,qe)},Ce=function(we){return G.s(K%12||12,we,"0")},be=ve||function(we,Ie,ue){var qe=we<12?"AM":"PM";return ue?qe.toLowerCase():qe};return ne.replace(I,function(we,Ie){return Ie||function(ue){switch(ue){case"YY":return String(Q.$y).slice(-2);case"YYYY":return G.s(Q.$y,4,"0");case"M":return he+1;case"MM":return G.s(he+1,2,"0");case"MMM":return Te(N.monthsShort,he,ge,3);case"MMMM":return Te(ge,he);case"D":return Q.$D;case"DD":return G.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return Te(N.weekdaysMin,Q.$W,fe,2);case"ddd":return Te(N.weekdaysShort,Q.$W,fe,3);case"dddd":return fe[Q.$W];case"H":return String(K);case"HH":return G.s(K,2,"0");case"h":return Ce(1);case"hh":return Ce(2);case"a":return be(K,de,!0);case"A":return be(K,de,!1);case"m":return String(de);case"mm":return G.s(de,2,"0");case"s":return String(Q.$s);case"ss":return G.s(Q.$s,2,"0");case"SSS":return G.s(Q.$ms,3,"0");case"Z":return W}return null}(we)||W.replace(":","")})},J.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},J.diff=function(z,Q,N){var ne,W=this,K=G.p(Q),de=ee(z),he=(de.utcOffset()-this.utcOffset())*r,fe=this-de,ge=function(){return G.m(W,de)};switch(K){case v:ne=ge()/12;break;case g:ne=ge();break;case m:ne=ge()/3;break;case h:ne=(fe-he)/6048e5;break;case d:ne=(fe-he)/864e5;break;case u:ne=fe/o;break;case c:ne=fe/r;break;case a:ne=fe/n;break;default:ne=fe}return N?ne:G.a(ne)},J.daysInMonth=function(){return this.endOf(g).$D},J.$locale=function(){return L[this.$L]},J.locale=function(z,Q){if(!z)return this.$L;var N=this.clone(),ne=Z(z,Q,!0);return ne&&(N.$L=ne),N},J.clone=function(){return G.w(this.$d,this)},J.toDate=function(){return new Date(this.valueOf())},J.toJSON=function(){return this.isValid()?this.toISOString():null},J.toISOString=function(){return this.$d.toISOString()},J.toString=function(){return this.$d.toUTCString()},q}(),ae=le.prototype;return ee.prototype=ae,[["$ms",s],["$s",a],["$m",c],["$H",u],["$W",d],["$M",g],["$y",v],["$D",b]].forEach(function(q){ae[q[1]]=function(J){return this.$g(J,q[0],q[1])}}),ee.extend=function(q,J){return q.$i||(q(J,le,ee),q.$i=!0),ee},ee.locale=Z,ee.isDayjs=Y,ee.unix=function(q){return ee(1e3*q)},ee.en=L[P],ee.Ls=L,ee.p={},ee})})(Jw);var qw=Jw.exports;const Ar=Qr(qw);function $w(e){const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Ar().hour(n).minute(r)}const Qa=new Zw;function mH(e,t,n){return function(r){const o=$.isFunction(r)?r(t):r;return Qa.set(e,o),n(o),o}}function Jh(e,t){var u;so().required().validateSync(e);const[n,r]=T.useState(Qa.get(e)??t),o=T.useRef(t),s=$.isEqual(o.current,t)?o.current:t,a=T.useRef(),c=a.current;return T.useEffect(()=>{r(Qa.get(e)??s)},[e,s,r]),T.useEffect(()=>{function d(h){r(h)}return Qa.watch(e,d),()=>{Qa.unwatch(e,d)}},[e,r]),(e!==(c==null?void 0:c.key)||!$.isEqual(n,c==null?void 0:c.value))&&(a.current={key:e,value:n,setter:mH(e,n,r)}),[n,((u=a.current)==null?void 0:u.setter)??$.noop]}function eS(e){const[t]=re.useLocaleState();return e!==void 0?String(e):t}function vH(e,t){const n=eS(t==null?void 0:t.locale);return Qh(e,n,t)}function yH(e){const t=eS(e==null?void 0:e.locale);return T.useCallback(r=>Qh(r,t,e),[t,e])}function tS(e){if(!$.isPlainObject(e))throw new Error("[useMemoizedObject]: param must be a plain JS object");const[t,n]=T.useState(e);return T.useEffect(()=>{$.isEqual(e,t)||n(e)},[e,t]),t}function Ja(){const[e,t]=T.useState(null),n=!!e,r=T.useCallback(a=>t((a==null?void 0:a.currentTarget)??null),[t]),o=T.useCallback(()=>t(null),[t]),s=T.useCallback(a=>{n?o():r(a)},[n,r,o]);return{anchorEl:e,open:n,handleClick:r,handleClose:o,handleToggle:s}}function bH(e,t){const[n,r]=T.useState({width:1,height:1}),o=e.current;return T.useEffect(()=>{function s(){var d;let c=0,u=0;switch(t){case"client":c=(o==null?void 0:o.clientWidth)??0,u=(o==null?void 0:o.clientHeight)??0;break;case"offset":c=(o==null?void 0:o.offsetWidth)??0,u=(o==null?void 0:o.offsetHeight)??0;break;case"scroll":c=(o==null?void 0:o.scrollWidth)??0,u=(o==null?void 0:o.scrollHeight)??0;break;case"bounding":default:{const h=((d=e.current)==null?void 0:d.getBoundingClientRect())??{width:0,height:0};c=h.width,u=h.height;break}}r({width:c,height:u})}const a=new ResizeObserver(s);return $.isEmpty(e==null?void 0:e.current)||(a.observe(e==null?void 0:e.current),s()),()=>{a.disconnect()}},[o,t,e]),n}function qh(e){const t=_.useRecordContext(),n=_.useTranslate(),r=_.useResourceContext(),o=t!=null&&t.id?"edit":"create";return T.useMemo(()=>{if(e===!1)return;const a=`resources.${r}.title`;return e||n(`resources.${r}.title.${o}`,{_:n(a,{_:a}),...t})},[o,t,r,n,e])}function Wr(){throw new Error("Method must be implemented")}const nS={fontFamily:"'Inter', sans-serif",menuOrientation:"vertical",miniDrawer:!1,container:!1,mode:"light",presetColor:"theme4",themeDirection:"ltr",appDefaultPath:"/",drawerWidth:260,horizontalMaxItems:6,spacing:2,setFontFamily:Wr,setMenuOrientation:Wr,setMiniDrawer:Wr,setContainer:Wr,setMode:Wr,setPresetColor:Wr,setThemeDirection:Wr,setAppDefaultPath:Wr,setDrawerWidth:Wr,setHorizontalMaxItems:Wr,isVerticalLayout:e=>!1,isHorizontalLayout:e=>!1};function xH(e){return e==="vertical"}function CH(e){return e==="horizontal"}const $h=T.createContext(nS);function eg({initialConfig:e,children:t}){const[n,r]=Jh("theme-config",{...nS,...e});function o(b){r(x=>({...x,fontFamily:b}))}function s(b){r(x=>({...x,menuOrientation:b}))}function a(b){r(x=>({...x,miniDrawer:b}))}function c(b){r(x=>({...x,container:b}))}function u(b){r(x=>({...x,mode:b}))}function d(b){r(x=>({...x,presetColor:b}))}function h(b){r(x=>({...x,themeDirection:b}))}function g(b){r(x=>({...x,appDefaultPath:b}))}function m(b){r(x=>({...x,drawerWidth:b}))}function v(b){r(x=>({...x,horizontalMaxItems:b}))}return f.jsx($h.Provider,{value:{...n,setFontFamily:o,setMenuOrientation:s,setMiniDrawer:a,setContainer:c,setMode:u,setPresetColor:d,setThemeDirection:h,setAppDefaultPath:g,setDrawerWidth:m,setHorizontalMaxItems:v,isVerticalLayout:xH,isHorizontalLayout:CH},children:t})}function tg(){return T.useContext($h)}function Tn(){return tg()}const wH=Ma(_.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end",position:"initial !important","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function wi(e){return f.jsx(wH,{...e})}function rS({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=Tn();return f.jsx(AH,{defaultValues:n,spacing:t||o,children:f.jsx(S.Grid,{container:!0,...r,spacing:t||o,children:e})})}function SH({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:s=!1,lg:a=12,md:c=12,sm:u=12,xs:d=12,...h}){const g=_.useTranslate(),m=_.useResourceContext(),{cardTitle:v,cardSubheader:b}=T.useMemo(()=>{const x=n||`resources.${m}.title`;return{cardTitle:g(x,{_:x}),cardSubheader:r!==null?g(r,{_:r}):null}},[m,r,n,g]);return f.jsx(S.Grid,{item:!0,...h,lg:a,md:c,sm:u,xs:d,children:f.jsx(wr,{content:t,title:v,subheader:b,secondary:o,divider:!0,children:f.jsxs(f.Fragment,{children:[e,s===!0?f.jsx(wi,{children:f.jsx(_.SaveButton,{})}):s]})})})}const AH=pe(_.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));rS.Section=SH;const TH=Ma(_.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function oS({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=f.jsx(wi,{children:f.jsx(_.SaveButton,{type:"button"})}),secondary:s=f.jsx(Fo,{children:f.jsx(_.DeleteWithConfirmButton,{})}),sx:a,...c}){const u=qh(e),d=_.useRecordContext(),h=ip();return f.jsx(wr,{content:n,title:u,subheader:r,secondary:d!=null&&d.id?s:null,sx:{...a,"& .MuiToolbar-root":{paddingLeft:h.spacing(2.5),paddingRight:h.spacing(2.5),paddingBottom:h.spacing(2.5),paddingTop:t?h.spacing(2.5):0,borderTop:t?`1px solid ${h.palette.divider}`:void 0}},border:!t,divider:!0,children:f.jsx(TH,{toolbar:o,...c})})}const iS={openDialogs:[],getCurrentDialog:()=>null,openDialog:(e,t)=>{throw new Error(`openDialog not yet ready for: ${e}, ${t}`)},closeDialog:(e,t)=>{throw new Error(`closeDialog not yet ready for: ${e}, ${t}`)}},sS=T.createContext(iS);function EH(e){const[t,n]=T.useState(iS);function r(a,c){n(u=>({...u,openDialogs:[...u.openDialogs,a]})),c&&c()}function o(a,c){n(u=>({...u,openDialogs:u.openDialogs.filter(d=>d!==a)})),c&&c()}function s(){return t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null}return f.jsx(sS.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:s},children:e.children})}function aS(){const e=T.useContext(sS);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function ng(){return aS()}function lS({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,fullWidth:c,...u}){const d=Nt.useTheme(),{getCurrentDialog:h}=ng(),{source:g,resource:m,isRequired:v}=u,{getFieldState:b,formState:x}=Qn.useFormContext(),{error:w}=b(g,x),I=h();return f.jsxs(S.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:w?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(S.InputLabel,{error:!!w,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(_.FieldTitle,{label:e,source:g,resource:I||m,isRequired:v})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?f.jsx(S.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!w,children:r}):null]})}const IH=pe(_.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function OH({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s}){return f.jsx(lS,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:f.jsx(IH,{source:n,label:!1,...s})})}function PH({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:f.jsxs(Fo,{children:[e?f.jsx(_.EditButton,{}):null,t?f.jsx(_.DeleteWithConfirmButton,{}):null,n?f.jsx(_.CloneButton,{}):null]})}const cS=pe("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),jH=pe("ul")({display:"inline-block"});function MH(e){var h;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=re.useRecordContext(e),c=dt.get(a,r),u=re.useTranslate();if(!c)return n?f.jsx(S.Typography,{component:"span",variant:"body2",className:t,...s,children:n?u(n,{_:n}):null}):f.jsx(cS,{className:t,...s});if(Array.isArray(c))return f.jsx(jH,{className:t,...s,children:c.map((g,m)=>{var b;const v=o instanceof String?(b=dt.get(g,o))==null?void 0:b.toString():o;return f.jsx("li",{children:v},m)})});const d=o instanceof String?(h=dt.get(a,o))==null?void 0:h.toString():o;return f.jsx(cS,{className:t,...s,children:d})}function uS({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",resource:s,...a}){const[c,u]=T.useState(null),d=_.useRecordContext(a),h=_.useDataProvider(),g=_.useResourceContext(),m=_.useNotify(),v=T.useCallback(async w=>{w.preventDefault(),w.stopPropagation(),m("ra.notification.download",{type:"info"});const I=dt.get(d,a==null?void 0:a.source),F=(s||g).replace("entities/",""),E=e||(d==null?void 0:d.id),k=await h.getFile(`/attachments/${F}/${E}/${t||(a==null?void 0:a.source)}/${(I==null?void 0:I.id)||(d==null?void 0:d.id)}`),P=document.createElement("a");P.href=k,P.download=dt.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source)),P.click()},[h,d,e,g,s,t,a==null?void 0:a.source,a==null?void 0:a.title,m]),b=T.useMemo(()=>({...d,[a==null?void 0:a.source]:(d==null?void 0:d.src)||dt.get(d,a==null?void 0:a.source),[a==null?void 0:a.title]:(d==null?void 0:d.title)||dt.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),[d,a==null?void 0:a.source,a==null?void 0:a.title]),x=_.useTranslate();return T.useEffect(()=>{!d||!(d!=null&&d.userId)||r===!1||h.getOne(o,{id:d==null?void 0:d.userId}).then(({data:w})=>u(w)).catch(()=>u(null))},[d,h,o,r]),f.jsx(MH,{...a,disabled:n,record:b,onClick:v,title:f.jsxs(S.Box,{sx:{cursor:"pointer"},children:[f.jsx(S.Typography,{variant:"subtitle1",children:dt.get(b,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),f.jsxs(S.Typography,{variant:"caption",color:"secondary",children:[dt.get(b,"sizeDescription"),r&&c?" | ":null,r&&c?x("ra.attachment.info",{user:c==null?void 0:c.name,created:Ar(b==null?void 0:b.createdAt).format("DD/MM/YYYY HH:mm")}):null]})]})})}const kH=pe(_.ImageField,{slot:"root"})(()=>({}));function dS(e){const t=`_${e==null?void 0:e.source}`;return f.jsx(kH,{...e,source:t})}function fS({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,sx:s,...a}){const c=T.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5,...s}),[e,t,n,s]),u=_.useRecordContext(),d=o||u;return f.jsx(dS,{sx:h=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${h.palette.divider}`,objectFit:"cover !important",...c,minWidth:c.width,minHeight:c.height}}),...a,record:d})}var FH={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(yn,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(FH);var LH={exports:{}};(function(e,t){(function(n,r){e.exports=r(qw)})(yn,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(s,null,!0),s})})(LH);var pS={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(yn,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(d,h,g,m){return s.fromToBase(d,h,g,m)}o.en.relativeTime=a,s.fromToBase=function(d,h,g,m,v){for(var b,x,w,I=g.$locale().relativeTime||a,F=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],E=F.length,k=0;k<E;k+=1){var P=F[k];P.d&&(b=m?o(d).diff(g,P.d,!0):g.diff(d,P.d,!0));var L=(n.rounding||Math.round)(Math.abs(b));if(w=b>0,L<=P.r||!P.r){L<=1&&k>0&&(P=F[k-1]);var D=I[P.l];v&&(L=v(""+L)),x=typeof D=="string"?D.replace("%d",L):D(L,h,P.l,w);break}}if(h)return x;var Y=w?I.future:I.past;return typeof Y=="function"?Y(x):Y.replace("%s",x)},s.to=function(d,h){return c(d,h,this,!0)},s.from=function(d,h){return c(d,h,this)};var u=function(d){return d.$u?o.utc():o()};s.toNow=function(d){return this.to(u(this),d)},s.fromNow=function(d){return this.from(u(this),d)}}})})(pS);var DH=pS.exports;const RH=Qr(DH);Ar.extend(RH);function hS(e){const t=_.useRecordContext(e),[n]=_.useLocaleState(),r=T.useMemo(()=>Ar(dt.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(f.Fragment,{children:[f.jsx(_.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(S.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const _H=pe(_.DateField,{slot:"Root"})(()=>({}));function BH({variant:e="body1",...t}){return f.jsx(_H,{...t,variant:e})}const NH=pe(_.EmailField,{slot:"Root"})(()=>({}));function VH({variant:e="body1",...t}){return f.jsx(NH,{...t,variant:e})}const WH=pe(_.FileField,{slot:"root"})(()=>({}));function gS({...e}){const t=_.useRecordContext(e),n=T.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=dt.get(t,`_${e==null?void 0:e.source}`,dt.get(t,e==null?void 0:e.source)),s=dt.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(WH,{...e,record:t,onClick:n})}function zH({variant:e="body1",...t}){return f.jsx(_.FunctionField,{...t,variant:e})}const UH=pe(_.TextField,{slot:"Root"})(()=>({}));function mS({variant:e="body1",...t}){return f.jsx(UH,{...t,variant:e})}function HH(e){const t=S.useTheme(),n=re.useLocales(),{source:r=""}=e,s=re.useRecordContext(e)[r],a=!ku(s,n),c=Sr(e,{flex:1}),[u]=re.useLocaleState(),d=T.useMemo(()=>a?f.jsx(Ke.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(Ke.FlagOutlined,{}),[a,t.palette.warning.main]),h=T.useMemo(()=>f.jsx(S.Stack,{children:$.map(n,(g,m)=>f.jsx(S.Typography,{children:`${g.locale.toUpperCase()}: ${(s??{})[g.locale]??""}`},m))}),[s,n]);return f.jsx(Qc,{title:h,arrow:!1,children:f.jsxs(S.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,f.jsx(mS,{...e,source:`${r}.${u}`,sx:c})]})})}const GH=pe("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}}));function YH({source:e,defaultValue:t=" ",...n}){const r=_.useRecordContext(n),o=dt.get(r,e,t);return f.jsx(S.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function KH({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?f.jsx(S.Tooltip,{title:e,placement:"top",children:t}):t}function XH({label:e,source:t,defaultValue:n=" ",children:r=f.jsx(YH,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s}){const a=T.Children.only(r),{getCurrentDialog:c}=aS(),u=_.useRecordContext(s),d=_.useResourceContext(s),h=c(),g=T.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?dt.get(u,o,o):o,[u,o]),m=Sr(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return f.jsx(KH,{title:g,children:f.jsxs(f.Fragment,{children:[f.jsx(S.InputLabel,{sx:{pt:1},children:f.jsx(_.FieldTitle,{label:e,source:t,resource:h||d})}),f.jsx(GH,{...s,children:T.isValidElement(a)?T.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:h||d,sx:m}):null})]})})}function ZH({children:e=null,className:t=""}){return f.jsx("div",{className:t,children:e})}const QH=Ma(ZH,{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function vS(e){return f.jsx(QH,{...e,children:f.jsx(_.ReferenceManyField,{pagination:f.jsx(_.Pagination,{}),...e})})}function JH({source:e,...t}){const n=_.useRecordContext(t),r=dt.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(S.Typography,{component:"span",variant:"body1",...t,children:c})}function fn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,...c}){const u=Kt(),{getCurrentDialog:d}=ng(),{source:h,resource:g,isRequired:m}=c,{fieldState:{invalid:v}}=_.useInput(c),b=d();return f.jsxs(S.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{pb:0,color:v?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(S.InputLabel,{error:v===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(_.FieldTitle,{label:e,source:h,resource:b||g,isRequired:m})}),T.isValidElement(t)?T.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,r?f.jsx(S.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:v===!0,children:r}):null]})}function qH(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const $H=pe(_.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...qH(e)}));function eG({children:e=f.jsx(uS,{title:"name",source:"path"}),multiple:t=!1,disabled:n=!1,type:r="attachment",...o}){const s=_.useRecordContext(o),a=o==null?void 0:o.source,c=s==null?void 0:s.id;return _.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),f.jsx(fn,{...o,disabled:n,children:f.jsx($H,{type:r,multiple:t,disabled:n,children:T.cloneElement(e,{entityId:c,property:a,...e.props})})})}const tG=pe(_.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall:has(.MuiChip-root)":{paddingBottom:"4px"},"& .MuiAutocomplete-tag":{margin:"0px 4px 4px 0px"}}));function nG({size:e="small",...t}){return f.jsx(fn,{...t,children:f.jsx(tG,{size:e})})}const rG=pe(_.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function oG({size:e="small",...t}){const{perPage:n,...r}=t;return f.jsx(fn,{...r,children:f.jsx(rG,{size:e})})}const iG=pe(_.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function sG({...e}){const t=Nt.useTheme();return f.jsx(fn,{...e,children:f.jsx(iG,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const aG=4,lG=pe(_.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function cG(e){const[t,n]=T.useState(""),r=T.useCallback(o=>{const s=o.target.value;Ar(s).year().toString().length>aG?o.target.value=t:n(s)},[t]);return f.jsx(fn,{...e,children:f.jsx(lG,{...e,onInput:r})})}const uG=pe(_.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function dG(e){return f.jsx(fn,{...e,children:f.jsx(uG,{})})}const fG=pe(_.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function pG({children:e=f.jsx(gS,{source:"",title:""}),title:t,...n}){const r=Qn.useWatch({name:n.source}),o=_.useRecordContext(n),{source:s}=n,a=T.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=dt.get(o,s);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,s,r]);return f.jsx(fn,{...n,children:f.jsx(fG,{children:T.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||dt.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||dt.get(o,`_${s}`),[t||s]:a}})})})}function hG({children:e=f.jsx(fS,{}),title:t,multiple:n=!1,...r}){const o=Qn.useWatch({name:r.source}),s=_.useRecordContext(r),{source:a}=r;return _.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(fn,{...r,multiple:n,children:f.jsx(_.ImageInput,{accept:"image/*",children:T.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(o==null?void 0:o.title)||dt.get(s,a),[`_${a}`]:(o==null?void 0:o.src)||dt.get(s,`_${a}`)}})})})}function Tr(e){return f.jsx(fn,{...e,children:f.jsx(_.TextInput,{})})}const gG={vertical:"bottom",horizontal:"right"},mG={vertical:"top",horizontal:"right"};function vG({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:s}=o,a=re.useLocales(),c=T.useCallback((L="ra.validation.required",D="ra.validation.required_locale")=>Y=>{if(e&&!t&&!Qw(Y,a))return L;if(t&&(!$.has(Y,t)||$.isEmpty($.get(Y,t))))return{message:D,args:{locale:t}};if(!e&&r&&!ku(Y,a))return L},[e,t,a,r]),u=T.useMemo(()=>re.composeValidators(n,c()),[n,c]),{fieldState:d}=re.useInput({...o,validate:u}),{error:h}=d,g=Qn.useWatch({name:s}),m=!ku(g,a),[v]=re.useLocaleState(),[b,x]=T.useState(v),[w,I]=T.useState(null),F=!!w,E=T.useCallback(L=>I(F?null:L.currentTarget),[F,I]),k=T.useCallback(()=>I(null),[I]),P=T.useMemo(()=>$.map(a,(L,D)=>f.jsx(S.MenuItem,{onClick:()=>{x(L.locale),k()},children:f.jsx(S.ListItemText,{primary:`${L.locale.toUpperCase()}: ${(g??{})[L.locale]??""}`})},D)),[a,x,k,g]);return f.jsx(fn,{...o,validate:u,helperText:h!=null&&h.message?f.jsx(re.ValidationError,{error:h==null?void 0:h.message}):o==null?void 0:o.helperText,children:f.jsx(f.Fragment,{children:f.jsxs(S.Box,{flex:1,children:[$.map(a,(L,D)=>f.jsx(Tr,{...o,source:`${s}.${L.locale}`,sx:{width:"100%",display:L.locale===b?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:f.jsx(S.Chip,{label:f.jsx(S.Typography,{variant:"button",children:b}),size:"small",onClick:E,color:m?"warning":void 0})}},D)),f.jsx(S.Menu,{anchorEl:w,open:F,anchorOrigin:gG,transformOrigin:mG,onClose:k,children:P})]})})})}const yG=pe(_.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function bG(e){return f.jsx(fn,{...e,children:f.jsx(yG,{})})}function xG({source:e,minWidth:t=300,children:n}){const r=_.useResourceContext(),o=_.useRecordContext(),[s,a]=T.useState(dt.get(o,e,"")),[c,u]=T.useState(!1),d=T.useCallback(b=>a(b.target.value),[]),h=_.useDataProvider(),g=T.useCallback(b=>{b.key==="Enter"&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,o,e]),m=T.useCallback(()=>{dt.get(o,e)!==s&&(u(!0),h.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,h,r,e,o]),v=T.useCallback(b=>{u(!0),h.update(r,{id:o.id,data:{...o,[e]:b,_changed:e},previousData:o}).then(()=>u(!1))},[h,r,e,o]);return T.useEffect(()=>a(dt.get(o,e)),[o,e]),n?T.cloneElement(n,{...n.props,source:e,value:s,onChange:v}):f.jsx(S.TextField,{value:s,disabled:c,onChange:d,onKeyPress:g,onBlur:m,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function CG({children:e,...t}){const n=T.Children.only(e);return f.jsx(_.ReferenceArrayInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function wG({children:e,...t}){const n=T.Children.only(e);return f.jsx(_.ReferenceInput,{...t,children:T.cloneElement(n,{...t,source:n.props.source||t.source})})}function SG({reference:e,target:t,children:n,filters:r,actions:o,...s}){return f.jsx(_.ResourceContextProvider,{value:e,children:f.jsx(vS,{perPage:5,pagination:f.jsx(_.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(f.Fragment,{children:[f.jsx(_.ListToolbar,{filters:r,actions:o}),n]})})})}const AG=pe(_.SearchInput,{slot:"root"})(()=>({}));function TG(e){return f.jsx(AG,{...e})}const EG=pe(_.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiFormLabel-root.MuiInputLabel-root":{marginTop:"-3px"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{marginTop:0},"& .MuiOutlinedInput-input:has(.MuiChip-root)":{paddingTop:"4px",paddingBottom:"6px",paddingLeft:"6px"}}));function IG({optionText:e="name",optionValue:t="id",...n}){return f.jsx(fn,{...n,children:f.jsx(EG,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const OG=pe(_.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function PG(e){return f.jsx(fn,{...e,children:f.jsx(OG,{})})}function jG({multiline:e=!1,...t}){var u,d;const n=_.useTranslate(),r=_.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=Qn.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:d.value;let s=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(s=s&&s.length>0?`${c} - ${n(s)}`:c),f.jsx(Tr,{...t,validate:a,helperText:s,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function MG(e){if(!e)return"";const t=$w(e);return t?t.format("HH:mm"):""}function kG(e){return e}const FG=pe(_.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function LG({parse:e=kG,format:t=MG,...n}){return f.jsx(fn,{...n,children:f.jsx(FG,{parse:e,format:t,...n})})}function rg({onSuccess:e,firstAccess:t}){const{spacing:n}=Tn(),[r,o]=T.useState(!1),s=re.useAuthProvider(),a=re.useTranslate(),c=re.useNotify(),u=T.useCallback(d=>{const{oldPassword:h,newPassword:g}=d;o(!0),s==null||s.changePassword(h,g).then(()=>{c("ra.auth.password_changed"),e()}).catch(m=>{c((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e,c]);return f.jsx(re.ResourceContextProvider,{value:"user/change-password",children:f.jsx(re.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:f.jsx(oS,{onSubmit:u,toolbar:f.jsx(wi,{children:f.jsx(_.SaveButton,{disabled:r})}),children:f.jsxs(S.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Alert,{severity:"warning",children:[f.jsx(S.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsx(Tr,{source:"oldPassword",type:"password",validate:re.required()})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsx(Tr,{source:"newPassword",type:"password",validate:re.required()})})]})})})})}const yS=T.createContext({});function DG(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=_.useResourceContext(),o=_.useDataProvider(),{search:s}=ei.useLocation(),a=`${r}/new`,c=T.useCallback(()=>{if(!t||!$.isFunction(o.get))return Promise.resolve({});const m={};return new URLSearchParams(s??"").forEach((v,b)=>{m[b]=v}),o.get(a,m).then(v=>v.data).then(v=>{const{responseCode:b,value:x}=v;return b==="ok"?x:Promise.reject(v)})},[t,s,o,a]),u=T.useMemo(()=>$.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:d,isLoading:h}=Ui.useQuery(u),g=$.omit(e,["useDefaults"]);return h?f.jsx(S.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(S.CircularProgress,{})}):f.jsx(yS.Provider,{value:d??{},children:f.jsx(_.Create,{...g,children:e.children})})}const RG=pe(DG,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function _G(){return T.useContext(yS)}const BG=pe(_.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function NG(e){return f.jsx(BG,{...e})}const VG=pe(S.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),WG=pe(S.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function zG({title:e,divider:t=!0,variant:n="h5"}){const r=_.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsx(VG,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?f.jsx(WG,{}):null]})}function og(e){return e.id??e.label}function bS(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function UG(e){return $.map(e,"id")}function Fu(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function xS(e,t){const n=e!==void 0?Fu(e):0;return $.chain(t).filter(o=>e!==void 0?bS(e,o.id):!0).filter(o=>Fu(o.id)===n+1).value()}function HG(e,t){var s;const n=$.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return $.extend(n,{formRootPath:o});case"setSyncWithLocation":return $.extend(n,{syncWithLocation:o});case"setErrorCount":return $.extend(n,{errorCount:o});case"setActiveItem":return $.includes(UG(e.items),o)?$.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return $.extend(n,{items:$.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=$.isString(o)?o:o.id,c=$.chain(n.items).clone().reject(u=>u.id===a).value();return $.extend(n,{items:c}),n.activeItem===a&&$.extend(n,{activeItem:((s=$.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const GG={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},CS=T.createContext(void 0);function wS(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=ei.useLocation(),[s,a]=T.useReducer(HG,$.cloneDeep(GG)),{formRootPath:c,items:u}=s,d=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{const h=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&h.push(r);const g=$.chain(h).map(v=>ei.matchPath(v,o)).reject(v=>v===null).first().value(),m=g==null?void 0:g.pathnameBase;m!==void 0&&m!==c&&a({type:"setFormRootPath",payload:m})},[o,c,r]),T.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),T.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),T.useEffect(()=>{var h;if(t&&c!==void 0){let g=o.replace(c,"").replace(new RegExp(/^\/?/),"");$.isEmpty(g)&&(g=((h=$.chain(u).filter(m=>xS(m.id,u).length===0).orderBy([m=>Fu(m.id),m=>m.index]).first().value())==null?void 0:h.id)??void 0),a({type:"setActiveItem",payload:g})}},[a,c,o,u,t]),f.jsx(CS.Provider,{value:d,children:e.children})}function SS(){const e=T.useContext(CS);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function qa(){return SS().state}function ig(){return SS().dispatch}function AS(){return qa().formRootPath}function TS(){return qa().activeItem}function ES(){return qa().items}function IS(){return qa().syncWithLocation}function OS(){return qa().errorCount}function PS(){const e=ig();return T.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function jS(){const e=ig();return T.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function MS(){const e=ig();return T.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const YG=pe(S.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function kS(e){const{spacing:t}=Tn(),{spacing:n=t}=e,r=$.omit(e,["spacing"]);return f.jsx(_.Form,{...r,className:"LongFormView",children:f.jsx(YG,{container:!0,spacing:n*2,children:e.children})})}function FS(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=$.omit(e,["disposition"]);return f.jsx(S.Grid,{...n,item:!0,...t,children:e.children})}function LS(e){const t=TS();return t===void 0?!1:e===t||bS(e,t)}function DS(e){const t=ES();return T.useMemo(()=>xS(e,t),[t,e])}function KG(){const e=AS(),{search:t}=ei.useLocation(),n=ei.useNavigate();return T.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function RS(){const e=DS();return f.jsx(S.Card,{variant:"outlined",children:f.jsx(S.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:$.map(e,(t,n)=>f.jsx(sg,{...t},n))})})}function sg(e){const t=re.useTranslate()??$.identity,n=_S(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:u,isGroup:d,level:h,errors:g=0}=n,{spacing:m}=Tn(),[v,b]=T.useState(r),x=T.useCallback(F=>{b(!v),a(F)},[a,v]),w=s!==void 0,I=$.omit(e,["label","icon","selected","badge"]);return T.useEffect(()=>{r&&!v&&b(r)},[r,v,b]),f.jsxs(f.Fragment,{children:[f.jsx(S.ListItem,{...I,disablePadding:!0,children:f.jsxs(S.ListItemButton,{selected:r?!d:null,onClick:x,sx:{pl:m*h},children:[w?f.jsx(S.ListItemIcon,{children:s}):null,f.jsx(S.ListItemText,{inset:!w,primary:g===0?t(o):f.jsx(S.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c?f.jsx(S.ListItemAvatar,{children:f.jsx(Lc,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}):null,d?v?f.jsx(Fn.ExpandLess,{}):f.jsx(Fn.ExpandMore,{}):null]})}),d?f.jsx(S.Collapse,{in:v,timeout:"auto",children:f.jsx(S.List,{children:$.map(u,(F,E)=>f.jsx(sg,{...F},E))})}):null]})}function _S(e){const{id:t}=e,n=LS(t),r=Fu(t),o=KG(),s=IS(),a=PS(),c=DS(t),u=!$.isEmpty(c),d=T.useCallback(g=>{u||(s?o(e.id):a(e.id)),$.isFunction(e.onClick)&&e.onClick(g)},[a,o,e,s,u]);return T.useMemo(()=>({...e,selected:n,onClick:d,items:c,isGroup:u,level:r}),[e,n,d,c,u,r])}var XG=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},BS=e=>e.firstChild?e.firstChild.offsetParent===e:!0,ZG=(e,t)=>{let n=e,r=0;BS(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},QG=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},$a=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?$a="sticky":CSS.supports("position","-webkit-sticky")&&($a="-webkit-sticky"));var Lu=!1;try{const e=Object.defineProperty({},"passive",{get(){Lu={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var ag=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,Lu),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},JG=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},qG=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=XG(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const D=g();D!==E&&k(D),c=!1}),c=!0};let d=a===window?window.scrollY:a.scrollTop;const h=D=>{const{offsetTop:Y,height:Z}=v,{naturalTop:ee}=w,{height:G}=I;return D+Y+Z>=ee+G+F+o},g=()=>{const{height:D}=v,{height:Y}=I;return Y+s+o<=D?3:h(d)?1:2},m=a!==window&&BS(a),v=ag({el:a,onChange:u,unsubs:t,measure:({height:D,top:Y})=>({height:D,offsetTop:m?Y:0})}),b=QG(e),x=b===window?{top:0,bottom:0}:JG(b),w=ag({el:b,onChange:u,unsubs:t,measure:({height:D})=>({height:D-x.top-x.bottom,naturalTop:b===window?0:ZG(b,a)+x.top+v.offsetTop})}),I=ag({el:e,onChange:u,unsubs:t,measure:({height:D})=>({height:D})});let F=0,E=g();const k=D=>{const Y=E;if(E=D,Y===2&&(F=-1),D===3){e.style.position=$a,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:Z,offsetTop:ee}=v,{height:G,naturalTop:le}=w,{height:ae}=I;if(D===2)if(e.style.position="relative",F=Y===0?Math.max(0,ee+d-le+s):Math.max(0,ee+d+Z-(le+ae+o)),r){const q=Math.max(0,G-ae-F);e.style.bottom=`${q}px`}else e.style.top=`${F}px`;else e.style.position=$a,D===1?r?e.style.bottom=`${o}px`:e.style.top=`${Z-ae-o}px`:r?e.style.bottom=`${Z-ae-o}px`:e.style.top=`${s}px`};k(E);const P=D=>{if(D===d)return;const Y=D-d;if(d=D,E===3)return;const{offsetTop:Z,height:ee}=v,{naturalTop:G,height:le}=w,{height:ae}=I;if(Y>0)if(E===0){if(D+Z+s>G){const q=Math.max(0,Z+d-G+s);D+Z+ee<=G+ae+q+o?k(2):k(1)}}else E===2&&h(D)&&k(1);else if(E===1){if(Z+D+ee<G+le+o){const q=Math.max(0,Z+d+ee-(G+ae+o));Z+D+s>=G+q?k(2):k(0)}}else E===2&&Z+D+s<G+F&&k(0)},L=a===window?()=>P(window.scrollY):()=>P(a.scrollTop);a.addEventListener("scroll",L,Lu),a.addEventListener("mousewheel",L,Lu),t.push(()=>a.removeEventListener("scroll",L),()=>a.removeEventListener("mousewheel",L))},$G=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=T.useState(null);return T.useEffect(()=>{if(!r||!$a)return;const s=[];return qG(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},eY=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=$G({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:a,ref:c,children:o})},tY=eY,NS=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(NS||{});function VS(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=$.omit(e,["sticky","disposition","spacing"]),s=t?tY:S.Box,a=T.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(S.Grid,{...o,item:!0,...n,children:f.jsx(s,{...a,children:f.jsx(S.Stack,{spacing:r,children:e.children})})})}function WS(e){return f.jsx(f.Fragment,{children:e.children})}function zS(e){const{children:t}=e;return T.useMemo(()=>{const r={top:[],bottom:[]};return T.Children.forEach(t,o=>{if(T.isValidElement(o)&&(o==null?void 0:o.type)===WS){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function US(e=[],t){const n=$.isArray(e)?e:[e],r=$.filter(n,o=>T.isValidElement(o));$.each(r,o=>{var s;t(o),US(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function HS(e){const{errors:t}=Qn.useFormState(),n=OS(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,u=og(e),d=jS(),h=MS(),g=LS(u),m=[];n&&(e.sources!==void 0?m.push(...e.sources):US(c,b=>{var x;((x=b==null?void 0:b.props)==null?void 0:x.source)!==void 0&&m.push(b.props.source)}));const v=$.chain(m).uniq().map(b=>$.get(t,b)).reject(b=>b===void 0).value().length;return T.useEffect(()=>{d({id:u,index:a,label:r,icon:o,badge:s,errors:v})},[d,h,r,o,u,s,a,v]),T.useEffect(()=>()=>{h(u)},[u,h]),f.jsx(S.Box,{display:g?"unset":"none",children:e.children})}function GS(e){const t=lg(e),n=og(e);return f.jsx(HS,{...e,id:n,children:T.Children.map(t,r=>{const o=og(r.props);return T.cloneElement(r,{id:`${n}.${o}`})})})}function YS(e){return f.jsx(HS,{...e})}function lg(e){const{children:t}=e;return T.useMemo(()=>$.chain(T.Children.toArray(t)).filter(r=>T.isValidElement(r)&&((r==null?void 0:r.type)===YS||(r==null?void 0:r.type)===GS)).map((r,o)=>T.cloneElement(r,{index:o})).value(),[t])}function nY(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=$.pick(e,["syncWithLocation","errorCount"]),s=$.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=zS(e),u=lg(e);return f.jsx(wS,{...o,children:f.jsxs(kS,{...s,spacing:r,children:[f.jsxs(VS,{disposition:t,spacing:r,children:[a,f.jsx(RS,{}),c]}),f.jsx(FS,{disposition:n,children:u})]})})}const Ft=nY;Ft.BaseForm=kS,Ft.Content=FS,Ft.Provider=wS,Ft.useItems=ES,Ft.useSyncWithLocation=IS,Ft.useErrorCount=OS,Ft.useFormRootPath=AS,Ft.useActiveItem=TS,Ft.useSetActiveItem=PS,Ft.useAddItem=jS,Ft.useRemoveItem=MS,Ft.Sidebar=VS,Ft.SidebarSection=WS,Ft.SidebarSectionPosition=NS,Ft.useSidebarChildren=zS,Ft.NavMenu=RS,Ft.NavMenuItem=sg,Ft.useNavMenuItem=_S,Ft.Tab=YS,Ft.Group=GS,Ft.useBaseItemChildren=lg;const rY=pe(_.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function oY(e){return f.jsx(rY,{...e})}const iY=pe(_.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function sY(e){return f.jsx(iY,{...e})}const aY=Ma(_.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function lY({children:e}){return f.jsx(f.Fragment,{children:e})}function cg(e){const{title:t,modal:n,content:r,subheader:o,secondary:s=f.jsx(Fo,{children:f.jsx(_.DeleteWithConfirmButton,{})}),sx:a,noPadding:c,toolbar:u=f.jsx(wi,{children:f.jsx(_.SaveButton,{type:"button"})}),...d}=e,h=qh(t),g=S.useTheme();return f.jsx(wr,{title:h,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{paddingTop:n?g.spacing(2.5):0},"& .MuiToolbar-root":{padding:g.spacing(2.5),borderTop:n?`1px solid ${g.palette.divider}`:void 0}},border:!n,divider:!0,children:f.jsx(aY,{toolbar:u,component:c?lY:void 0,...d})})}function cY({children:e,...t}){return f.jsx(_.TabbedForm.Tab,{...t,children:f.jsx(S.Box,{sx:{width:"100%",p:2.5},children:e})})}cg.Tab=_.TabbedForm.Tab,cg.TabStack=cY;function ug(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,s=S.useTheme(),a=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,c=s.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(S.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&f.jsx(S.Typography,{children:t}),!n&&(T.isValidElement(e==null?void 0:e.customButton)?T.cloneElement(e==null?void 0:e.customButton,{onClick:r}):f.jsx(S.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:f.jsx(Ke.PlusCircleOutlined,{style:{color:c}})}))]})}function KS(e){const{label:t,disableAdd:n,inset:r,source:o,template:s}=e,[a,c]=T.useState(!1),{append:u}=_.useArrayInput(),d=T.useCallback(()=>{c(g=>!g)},[c]),h=T.useCallback(g=>(c(!1),u(g),Promise.resolve()),[c,u]);return f.jsxs(f.Fragment,{children:[T.cloneElement(f.jsx(ug,{}),{label:t,source:o,disableAdd:n,template:s,onClick:d,inset:r}),f.jsx(S.Dialog,{open:a,onClose:d,maxWidth:"xs",children:f.jsx(re.CreateContextProvider,{value:{save:h},children:e.children})})]})}const dg=T.createContext(void 0);function XS(){return T.useContext(dg)}function Du(e){const{children:t}=e,{item:n,index:r}=XS(),[o,s]=T.useState(!1),{update:a}=_.useArrayInput(),c=_.useTranslate(),u=T.useCallback(d=>(s(!1),a(r,d),Promise.resolve()),[r,a]);return f.jsxs(f.Fragment,{children:[f.jsx(S.Button,{color:"primary",onClick:()=>s(!0),sx:{justifyContent:"flex-start"},children:c("ra.action.edit")}),f.jsx(S.Dialog,{open:o,onClose:()=>s(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(_.EditContextProvider,{value:{record:n,save:u},children:t})})]})}function ZS({source:e,children:t}){const n=T.Children.only(t),{getValues:r}=Qn.useFormContext(),o=_.useRecordContext({record:r()});return T.isValidElement(n)?T.cloneElement(n,{source:e,record:o}):null}const fg=T.createContext(void 0);function QS(){return T.useContext(fg)}const JS=B.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:s,member:a,resource:c,record:u}=e,d=_.useTranslate(),[h,g]=B.useState(!1),{total:m,remove:v}=QS(),b=B.useCallback(()=>{g(!1),v(s)},[s,v]),x=T.useMemo(()=>({index:s,total:m,item:u,remove:()=>v(s)}),[s,m,v,u]),w=T.useMemo(()=>T.Children.map(n,I=>T.isValidElement(I)&&(I==null?void 0:I.type)===Du&&B.isValidElement(I)?I:null),[n]);return f.jsxs(dg.Provider,{value:x,children:[T.Children.map(n,(I,F)=>{if(I.type===Du||!T.isValidElement(I))return null;const{source:E,...k}=I.props;return f.jsx(S.TableCell,{children:T.cloneElement(I,{source:E?`${a}.${E}`:a,index:E?void 0:F,resource:c,disabled:r,...k,label:""})})}),!o&&f.jsx(S.TableCell,{children:f.jsx(S.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsxs(Fo,{horizontal:!0,children:[f.jsx(S.Button,{onClick:()=>g(!0),color:"error",sx:{justifyContent:"flex-start"},children:d("ra.action.delete")}),w]})})}),o&&w?f.jsx(S.TableCell,{children:f.jsx(S.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsx(Fo,{horizontal:!0,children:w})})}):null,n.length>0&&f.jsx(_.Confirm,{isOpen:h,title:d("ra.action.remove_item"),content:d("ra.message.remove_item"),onConfirm:b,onClose:()=>g(!1)})]})});function uY(e){var J,z;const{children:t,resource:n,source:r,label:o,disableAdd:s=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:d,template:h={},addButton:g=f.jsx(ug,{}),inset:m}=e,[v,b]=T.useState(!1),{fields:x,remove:w,replace:I,append:F}=_.useArrayInput(e),{resetField:E}=Qn.useFormContext(),k=Kt(),P=re.useTranslate(),L=T.useRef(h||{}),D=re.useTranslateLabel(),Y=T.useCallback(Q=>{w(Q)},[w]);if(x.length>0){const{...Q}=x[0];L.current=Q;for(const N in L.current)L.current[N]=null}const Z=T.useCallback((Q=void 0)=>{let N=Q;Q==null&&(N=L.current,T.Children.count(t)===1&&B.isValidElement(T.Children.only(t))&&!T.Children.only(t).props.source&&T.Children.map(t,W=>B.isValidElement(W)&&W.type!==re.FormDataConsumer).some(Boolean)?N="":(N=N||{},T.Children.forEach(t,W=>{B.isValidElement(W)&&W.type!==re.FormDataConsumer&&W.props.source&&(N[W.props.source]=W.props.defaultValue??null)})));const ne={...N,...h};F(ne),E(`${r}.${x.length}`,{defaultValue:N})},[F,t,E,r,x.length,h]);function ee(Q){return N=>{Z(),Q&&Q(N)}}const G=T.useCallback(()=>{I([]),b(!1)},[I]),le=T.useMemo(()=>({total:x.length,remove:Y,source:r}),[x.length,Y,r]),ae=k.palette.mode==="dark"?k.palette.grey.A400:k.palette.grey.A800,q=x.length>0&&c;return x?f.jsx(fg.Provider,{value:le,children:f.jsxs("div",{className:u,children:[B.cloneElement(g,{label:o,source:r,disableAdd:s,template:h,onClick:(g==null?void 0:g.type)!==KS?ee((z=(J=e==null?void 0:e.addButton)==null?void 0:J.props)==null?void 0:z.onClick):void 0,inset:m}),f.jsx(S.TableContainer,{component:S.Paper,sx:m===!0?{borderRadius:0}:{mt:2,border:`1px solid ${ae}`},children:f.jsxs(S.Table,{size:"small",children:[f.jsx(S.TableHead,{sx:m===!0?{}:{borderTop:0,borderBottom:`1px solid ${ae}`},children:f.jsxs(S.TableRow,{children:[T.Children.map(t,(Q,N)=>{if(Q.type===Du||!B.isValidElement(Q))return null;const ne=f.jsx(S.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:D({...Q.props,resource:n})});return f.jsx(S.TableCell,{children:Q.props.title?f.jsx(Qc,{title:Q.props.title,arrow:!0,children:ne}):ne},N)}),!a&&q?f.jsx(S.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(Fo,{horizontal:!0,children:f.jsx(S.Typography,{color:"error",onClick:()=>b(!0),children:P("ra.action.delete")})})},"actions"):f.jsx(S.TableCell,{},"empty_actions")]})}),f.jsxs(S.TableBody,{children:[x.length===0&&f.jsx(S.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(S.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||f.jsx(S.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),x.length>0&&x.map((Q,N)=>f.jsx(S.TableRow,{sx:{borderBottom:`1px solid ${ae}}`},children:f.jsx(JS,{disableRemove:a,index:N,member:`${r}.${N}`,onRemoveField:Y,record:x&&x[N]||{},resource:n,source:r,children:t})},Q.id))]})]})}),x.length>0&&f.jsx(_.Confirm,{isOpen:v,title:P("ra.action.clear_array_input"),content:P("ra.message.clear_array_input"),onConfirm:G,onClose:()=>b(!1)})]})}):null}const Ru=pe(uY,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}}));Ru.CreateButton=KS,Ru.EditButton=Du,Ru.Field=ZS;function dY(e,t){const n=$.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=$.chain(n.media).clone().extend(o).value();return $.extend(n,{media:s})}case"updateDrawer":{const s=$.chain(n.drawer).clone().extend(o).value();return $.extend(n,{drawer:s})}case"updateLogo":{const s=$.chain(n.logo).clone().extend(o).value();return $.extend(n,{logo:s})}case"updateNotifications":{const s=$.chain(n.notifications).clone().extend(o).value();return $.extend(n,{notifications:s})}case"updateTheme":{const s=$.chain(n.theme).clone().extend(o).value();return $.extend(n,{theme:s})}default:return n}}const fY={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},qS=T.createContext(void 0);function $S(e){var Z;const t=re.useAuthProvider(),n=re.useGetIdentity(),r=S.useTheme(),o=S.useMediaQuery(r.breakpoints.down("md")),s=S.useMediaQuery(r.breakpoints.down("lg")),a=S.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,themeDirection:d,drawerWidth:h}=tg(),g=u(d)&&!s,{drawerOpen:m,openDrawer:v}=Au(),b=T.useCallback(()=>{v(!m)},[m,v]),[x,w]=T.useState(!1),[I,F]=T.useReducer(dY,$.chain(fY).clone().merge({drawer:{open:!c||m}}).value()),E=T.useCallback(()=>w(!1),[]),k=T.useMemo(()=>({state:I,dispatch:F}),[I,F]),{logoIcon:P,logoMain:L,enableNotification:D,notification:Y}=e;return T.useEffect(()=>{F({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:g}})},[o,s,a,g]),T.useEffect(()=>{F({type:"updateDrawer",payload:{open:m,width:h,handleDrawerToggle:b}})},[m,h,b]),T.useEffect(()=>{c||v(!a)},[a,c]),T.useEffect(()=>{F({type:"updateLogo",payload:{main:L,icon:P}})},[P,L]),T.useEffect(()=>{F({type:"updateNotifications",payload:{enable:D,resource:Y??"entities/notification"}})},[D,Y]),T.useEffect(()=>{F({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),T.useEffect(()=>{if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(ee=>{var G;w(!ee&&((G=n==null?void 0:n.data)==null?void 0:G.needToChangePassword)===!0)})},[(Z=n==null?void 0:n.data)==null?void 0:Z.needToChangePassword,t]),f.jsxs(qS.Provider,{value:k,children:[f.jsx(S.Dialog,{open:x,maxWidth:"xs",fullWidth:!0,children:f.jsx(rg,{onSuccess:E,firstAccess:!0})}),e.children]})}function eA(e){return T.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return f.jsx($S,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:f.jsx(e,{ref:n,...t})})})}function pg(){const e=T.useContext(qS);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function pY(){return pg().dispatch}function Ps(){return pg().state}function Nn(){return Ps().media}function Si(){return Ps().drawer}function tA(){return Ps().logo}function _u(){return Ps().notifications}function hY(){return Ps().theme}function nA(e){const{width:t}=Si(),{horizontal:n}=Nn(),{container:r}=Tn(),[o,s]=T.useState(null);function a(u,d){s(d)}const c=Kt();return f.jsx(fW,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>f.jsx(Dh,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:f.jsx(T.Suspense,{fallback:f.jsx(ZC,{}),children:f.jsxs(S.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[f.jsx(S.Toolbar,{sx:{mt:n?8:"inherit"}})," ",f.jsx(S.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column",[c.breakpoints.down("sm")]:{px:"12px"}},children:e.children})]})})})}const rA=pe(S.Box,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>({...e.mixins.toolbar,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",paddingLeft:e.spacing(t?3:0)}));function oA({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:s}=Tn();return f.jsx(S.ButtonBase,{disableRipple:!0,component:ut.Link,to:n||s,sx:t,children:e?r:o})}function iA(e){const t=S.useTheme(),{horizontal:n}=Nn(),{open:r}=Si(),{icon:o,main:s}=tA(),a=Sr(e,{minHeight:n?"unset":"60px",width:n?{xs:"100%",lg:"424px"}:"inherit",paddingTop:n?{xs:"10px",lg:"0"}:"8px",paddingBottom:n?{xs:"18px",lg:"0"}:"8px",paddingLeft:n?{xs:"24px",lg:"0"}:r?"24px":0});return f.jsx(rA,{theme:t,open:r,sx:a,children:f.jsx(oA,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:s,logoIcon:o})})}function sA(e,t){return{width:t,borderRight:`1px solid ${e.palette.divider}`,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden",boxShadow:e.palette.mode==="dark"?e.customShadows.z1:"none"}}function aA(e){return{transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:e.spacing(7.5),borderRight:"none",boxShadow:e.customShadows.z1}}const gY=pe(S.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Tn();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...sA(e,n),"& .MuiDrawer-paper":sA(e,n)},...!t&&{...aA(e),"& .MuiDrawer-paper":aA(e)}}});var Ae={},hg={exports:{}};(function(e,t){(function(n,r){var o="1.0.39",s="",a="?",c="function",u="undefined",d="object",h="string",g="major",m="model",v="name",b="type",x="vendor",w="version",I="architecture",F="console",E="mobile",k="tablet",P="smarttv",L="wearable",D="embedded",Y=500,Z="Amazon",ee="Apple",G="ASUS",le="BlackBerry",ae="Browser",q="Chrome",J="Edge",z="Firefox",Q="Google",N="Huawei",ne="LG",W="Microsoft",K="Motorola",de="Opera",he="Samsung",fe="Sharp",ge="Sony",ve="Xiaomi",Te="Zebra",Ce="Facebook",be="Chromium OS",we="Mac OS",Ie=" Browser",ue=function(Le,Re){var Oe={};for(var xe in Le)Re[xe]&&Re[xe].length%2===0?Oe[xe]=Re[xe].concat(Le[xe]):Oe[xe]=Le[xe];return Oe},qe=function(Le){for(var Re={},Oe=0;Oe<Le.length;Oe++)Re[Le[Oe].toUpperCase()]=Le[Oe];return Re},me=function(Le,Re){return typeof Le===h?Qe(Re).indexOf(Qe(Le))!==-1:!1},Qe=function(Le){return Le.toLowerCase()},an=function(Le){return typeof Le===h?Le.replace(/[^\d\.]/g,s).split(".")[0]:r},Et=function(Le,Re){if(typeof Le===h)return Le=Le.replace(/^\s\s*/,s),typeof Re===u?Le:Le.substring(0,Y)},yt=function(Le,Re){for(var Oe=0,xe,ht,Ut,Be,Pe,qt;Oe<Re.length&&!Pe;){var fr=Re[Oe],Ir=Re[Oe+1];for(xe=ht=0;xe<fr.length&&!Pe&&fr[xe];)if(Pe=fr[xe++].exec(Le),Pe)for(Ut=0;Ut<Ir.length;Ut++)qt=Pe[++ht],Be=Ir[Ut],typeof Be===d&&Be.length>0?Be.length===2?typeof Be[1]==c?this[Be[0]]=Be[1].call(this,qt):this[Be[0]]=Be[1]:Be.length===3?typeof Be[1]===c&&!(Be[1].exec&&Be[1].test)?this[Be[0]]=qt?Be[1].call(this,qt,Be[2]):r:this[Be[0]]=qt?qt.replace(Be[1],Be[2]):r:Be.length===4&&(this[Be[0]]=qt?Be[3].call(this,qt.replace(Be[1],Be[2])):r):this[Be]=qt||r;Oe+=2}},Un=function(Le,Re){for(var Oe in Re)if(typeof Re[Oe]===d&&Re[Oe].length>0){for(var xe=0;xe<Re[Oe].length;xe++)if(me(Re[Oe][xe],Le))return Oe===a?r:Oe}else if(me(Re[Oe],Le))return Oe===a?r:Oe;return Re.hasOwnProperty("*")?Re["*"]:Le},It={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},bt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Xt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[v,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[v,w],[/opios[\/ ]+([\w\.]+)/i],[w,[v,de+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[w,[v,de+" GX"]],[/\bopr\/([\w\.]+)/i],[w,[v,de]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[v,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[v,w],[/quark(?:pc)?\/([-\w\.]+)/i],[w,[v,"Quark"]],[/\bddg\/([\w\.]+)/i],[w,[v,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[v,"UC"+ae]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[v,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[v,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[v,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[v,"Smart Lenovo "+ae]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure "+ae],w],[/\bfocus\/([\w\.]+)/i],[w,[v,z+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[v,de+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[v,de+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[v,"MIUI "+ae]],[/fxios\/([-\w\.]+)/i],[w,[v,z]],[/\bqihu|(qi?ho?o?|360)browser/i],[[v,"360"+Ie]],[/\b(qq)\/([\w\.]+)/i],[[v,/(.+)/,"$1Browser"],w],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1"+Ie],w],[/samsungbrowser\/([\w\.]+)/i],[w,[v,he+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[v,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[v,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[v,w],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[v],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[v,Ce],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[v,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[v,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[v,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[v,q+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[v,q+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[v,"Android "+ae]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[v,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[v,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,v],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[v,[w,Un,It]],[/(webkit|khtml)\/([\w\.]+)/i],[v,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[v,"Netscape"],w],[/(wolvic)\/([\w\.]+)/i],[v,w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[v,z+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[v,[w,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[v,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[I,"amd64"]],[/(ia32(?=;))/i],[[I,Qe]],[/((?:i[346]|x)86)[;\)]/i],[[I,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[I,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[I,"armhf"]],[/windows (ce|mobile); ppc;/i],[[I,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[I,/ower/,s,Qe]],[/(sun4\w)[;\)]/i],[[I,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[I,Qe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[x,he],[b,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[m,[x,he],[b,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[x,ee],[b,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[x,ee],[b,k]],[/(macintosh);/i],[m,[x,ee]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[x,fe],[b,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[x,N],[b,k]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[x,N],[b,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[m,/_/g," "],[x,ve],[b,E]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[x,ve],[b,k]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[x,"OPPO"],[b,E]],[/\b(opd2\d{3}a?) bui/i],[m,[x,"OPPO"],[b,k]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[x,"Vivo"],[b,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[m,[x,"Realme"],[b,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[x,K],[b,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[x,K],[b,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[x,ne],[b,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[x,ne],[b,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[x,"Lenovo"],[b,k]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[x,"Nokia"],[b,E]],[/(pixel c)\b/i],[m,[x,Q],[b,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[x,Q],[b,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[x,ge],[b,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[x,ge],[b,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[x,"OnePlus"],[b,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[x,Z],[b,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[x,Z],[b,E]],[/(playbook);[-\w\),; ]+(rim)/i],[m,x,[b,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[x,le],[b,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[x,G],[b,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[x,G],[b,E]],[/(nexus 9)/i],[m,[x,"HTC"],[b,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[x,[m,/_/g," "],[b,E]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[m,[x,"TCL"],[b,k]],[/(itel) ((\w+))/i],[[x,Qe],m,[b,Un,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[x,"Acer"],[b,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[x,"Meizu"],[b,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[m,[x,"Ulefone"],[b,E]],[/droid.+; (a(?:015|06[35]|142p?))/i],[m,[x,"Nothing"],[b,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[x,m,[b,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[x,m,[b,k]],[/(surface duo)/i],[m,[x,W],[b,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[x,"Fairphone"],[b,E]],[/(u304aa)/i],[m,[x,"AT&T"],[b,E]],[/\bsie-(\w*)/i],[m,[x,"Siemens"],[b,E]],[/\b(rct\w+) b/i],[m,[x,"RCA"],[b,k]],[/\b(venue[\d ]{2,7}) b/i],[m,[x,"Dell"],[b,k]],[/\b(q(?:mv|ta)\w+) b/i],[m,[x,"Verizon"],[b,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[x,"Barnes & Noble"],[b,k]],[/\b(tm\d{3}\w+) b/i],[m,[x,"NuVision"],[b,k]],[/\b(k88) b/i],[m,[x,"ZTE"],[b,k]],[/\b(nx\d{3}j) b/i],[m,[x,"ZTE"],[b,E]],[/\b(gen\d{3}) b.+49h/i],[m,[x,"Swiss"],[b,E]],[/\b(zur\d{3}) b/i],[m,[x,"Swiss"],[b,k]],[/\b((zeki)?tb.*\b) b/i],[m,[x,"Zeki"],[b,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[x,"Dragon Touch"],m,[b,k]],[/\b(ns-?\w{0,9}) b/i],[m,[x,"Insignia"],[b,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[x,"NextBook"],[b,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[x,"Voice"],m,[b,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[x,"LvTel"],m,[b,E]],[/\b(ph-1) /i],[m,[x,"Essential"],[b,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[x,"Envizen"],[b,k]],[/\b(trio[-\w\. ]+) b/i],[m,[x,"MachSpeed"],[b,k]],[/\btu_(1491) b/i],[m,[x,"Rotor"],[b,k]],[/(shield[\w ]+) b/i],[m,[x,"Nvidia"],[b,k]],[/(sprint) (\w+)/i],[x,m,[b,E]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[x,W],[b,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[x,Te],[b,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[x,Te],[b,E]],[/smart-tv.+(samsung)/i],[x,[b,P]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[x,he],[b,P]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[x,ne],[b,P]],[/(apple) ?tv/i],[x,[m,ee+" TV"],[b,P]],[/crkey/i],[[m,q+"cast"],[x,Q],[b,P]],[/droid.+aft(\w+)( bui|\))/i],[m,[x,Z],[b,P]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[x,fe],[b,P]],[/(bravia[\w ]+)( bui|\))/i],[m,[x,ge],[b,P]],[/(mitv-\w{5}) bui/i],[m,[x,ve],[b,P]],[/Hbbtv.*(technisat) (.*);/i],[x,m,[b,P]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[x,Et],[m,Et],[b,P]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[b,P]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[x,m,[b,F]],[/droid.+; (shield) bui/i],[m,[x,"Nvidia"],[b,F]],[/(playstation [345portablevi]+)/i],[m,[x,ge],[b,F]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[x,W],[b,F]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[m,[x,he],[b,L]],[/((pebble))app/i],[x,m,[b,L]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[x,ee],[b,L]],[/droid.+; (glass) \d/i],[m,[x,Q],[b,L]],[/droid.+; (wt63?0{2,3})\)/i],[m,[x,Te],[b,L]],[/(quest( \d| pro)?)/i],[m,[x,Ce],[b,L]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[x,[b,D]],[/(aeobc)\b/i],[m,[x,Z],[b,D]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[m,[b,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[b,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,E]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[x,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[v,J+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[v,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,v]],os:[[/microsoft (windows) (vista|xp)/i],[v,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[v,[w,Un,bt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,Un,bt],[v,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[v,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[v,we],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,v],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[v,w],[/\(bb(10);/i],[w,[v,le]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[v,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[v,z+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[v,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[v,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[v,q+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[v,be],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[v,w],[/(sunos) ?([\w\.\d]*)/i],[[v,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[v,w]]},xt=function(Le,Re){if(typeof Le===d&&(Re=Le,Le=r),!(this instanceof xt))return new xt(Le,Re).getResult();var Oe=typeof n!==u&&n.navigator?n.navigator:r,xe=Le||(Oe&&Oe.userAgent?Oe.userAgent:s),ht=Oe&&Oe.userAgentData?Oe.userAgentData:r,Ut=Re?ue(Xt,Re):Xt,Be=Oe&&Oe.userAgent==xe;return this.getBrowser=function(){var Pe={};return Pe[v]=r,Pe[w]=r,yt.call(Pe,xe,Ut.browser),Pe[g]=an(Pe[w]),Be&&Oe&&Oe.brave&&typeof Oe.brave.isBrave==c&&(Pe[v]="Brave"),Pe},this.getCPU=function(){var Pe={};return Pe[I]=r,yt.call(Pe,xe,Ut.cpu),Pe},this.getDevice=function(){var Pe={};return Pe[x]=r,Pe[m]=r,Pe[b]=r,yt.call(Pe,xe,Ut.device),Be&&!Pe[b]&&ht&&ht.mobile&&(Pe[b]=E),Be&&Pe[m]=="Macintosh"&&Oe&&typeof Oe.standalone!==u&&Oe.maxTouchPoints&&Oe.maxTouchPoints>2&&(Pe[m]="iPad",Pe[b]=k),Pe},this.getEngine=function(){var Pe={};return Pe[v]=r,Pe[w]=r,yt.call(Pe,xe,Ut.engine),Pe},this.getOS=function(){var Pe={};return Pe[v]=r,Pe[w]=r,yt.call(Pe,xe,Ut.os),Be&&!Pe[v]&&ht&&ht.platform&&ht.platform!="Unknown"&&(Pe[v]=ht.platform.replace(/chrome os/i,be).replace(/macos/i,we)),Pe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return xe},this.setUA=function(Pe){return xe=typeof Pe===h&&Pe.length>Y?Et(Pe,Y):Pe,this},this.setUA(xe),this};xt.VERSION=o,xt.BROWSER=qe([v,w,g]),xt.CPU=qe([I]),xt.DEVICE=qe([m,x,b,F,E,P,k,L,D]),xt.ENGINE=xt.OS=qe([v,w]),e.exports&&(t=e.exports=xt),t.UAParser=xt;var zt=typeof n!==u&&(n.jQuery||n.Zepto);if(zt&&!zt.ua){var Ot=new xt;zt.ua=Ot.getResult(),zt.ua.get=function(){return Ot.getUA()},zt.ua.set=function(Le){Ot.setUA(Le);var Re=Ot.getResult();for(var Oe in Re)zt.ua[Oe]=Re[Oe]}}})(typeof window=="object"?window:yn)})(hg,hg.exports);var mY=hg.exports;Object.defineProperty(Ae,"__esModule",{value:!0});function vY(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var rn=T,pt=vY(rn),lA=mY,_o=new lA,on=_o.getBrowser(),yY=_o.getCPU(),Vn=_o.getDevice(),gg=_o.getEngine(),Bo=_o.getOS(),el=_o.getUA(),cA=function(t){return _o.setUA(t)},tl=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new lA(t);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},uA=Object.freeze({ClientUAInstance:_o,browser:on,cpu:yY,device:Vn,engine:gg,os:Bo,ua:el,setUa:cA,parseUserAgent:tl});function dA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(n),!0).forEach(function(r){SY(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nl=function(t){return typeof t}:nl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nl(e)}function xY(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wY(e,t,n){return t&&CY(e.prototype,t),e}function SY(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mg(){return mg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mg.apply(this,arguments)}function AY(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yg(e,t)}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},vg(e)}function yg(e,t){return yg=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},yg(e,t)}function TY(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function dr(e,t){if(e==null)return{};var n=TY(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EY(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bu(e)}function IY(e,t){return OY(e)||PY(e,t)||jY(e,t)||MY()}function OY(e){if(Array.isArray(e))return e}function PY(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,s=!1,a,c;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){s=!0,c=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(s)throw c}}return r}}function jY(e,t){if(e){if(typeof e=="string")return fA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fA(e,t)}}function fA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
216
216
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var sn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},En={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},js={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},kY={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},FY=function(t){switch(t){case sn.Mobile:return{isMobile:!0};case sn.Tablet:return{isTablet:!0};case sn.SmartTv:return{isSmartTV:!0};case sn.Console:return{isConsole:!0};case sn.Wearable:return{isWearable:!0};case sn.Browser:return{isBrowser:!0};case sn.Embedded:return{isEmbedded:!0};default:return kY}},LY=function(t){return cA(t)},De=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},bg=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},xg=function(t){var n=bg();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},DY=function(t,n,r,o,s){return{isBrowser:t,browserMajorVersion:De(n.major),browserFullVersion:De(n.version),browserName:De(n.name),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(s)}},pA=function(t,n,r,o){return bY({},t,{vendor:De(n.vendor),model:De(n.model),os:De(r.name),osVersion:De(r.version),ua:De(o)})},RY=function(t,n,r,o){return{isSmartTV:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},_Y=function(t,n,r,o){return{isConsole:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},BY=function(t,n,r,o){return{isWearable:t,engineName:De(n.name),engineVersion:De(n.version),osName:De(r.name),osVersion:De(r.version),userAgent:De(o)}},NY=function(t,n,r,o,s){return{isEmbedded:t,vendor:De(n.vendor),model:De(n.model),engineName:De(r.name),engineVersion:De(r.version),osName:De(o.name),osVersion:De(o.version),userAgent:De(s)}};function VY(e){var t=e?tl(e):uA,n=t.device,r=t.browser,o=t.engine,s=t.os,a=t.ua,c=FY(n.type),u=c.isBrowser,d=c.isMobile,h=c.isTablet,g=c.isSmartTV,m=c.isConsole,v=c.isWearable,b=c.isEmbedded;if(u)return DY(u,r,o,s,a);if(g)return RY(g,o,s,a);if(m)return _Y(m,o,s,a);if(d||h)return pA(c,n,s,a);if(v)return BY(v,o,s,a);if(b)return NY(b,n,o,s,a)}var hA=function(t){var n=t.type;return n===sn.Mobile},gA=function(t){var n=t.type;return n===sn.Tablet},mA=function(t){var n=t.type;return n===sn.Mobile||n===sn.Tablet},vA=function(t){var n=t.type;return n===sn.SmartTv},Nu=function(t){var n=t.type;return n===sn.Browser},yA=function(t){var n=t.type;return n===sn.Wearable},bA=function(t){var n=t.type;return n===sn.Console},xA=function(t){var n=t.type;return n===sn.Embedded},CA=function(t){var n=t.vendor;return De(n)},wA=function(t){var n=t.model;return De(n)},SA=function(t){var n=t.type;return De(n,"browser")},AA=function(t){var n=t.name;return n===js.Android},TA=function(t){var n=t.name;return n===js.Windows},EA=function(t){var n=t.name;return n===js.MAC_OS},IA=function(t){var n=t.name;return n===js.WindowsPhone},OA=function(t){var n=t.name;return n===js.IOS},PA=function(t){var n=t.version;return De(n)},jA=function(t){var n=t.name;return De(n)},MA=function(t){var n=t.name;return n===En.Chrome},kA=function(t){var n=t.name;return n===En.Firefox},FA=function(t){var n=t.name;return n===En.Chromium},Vu=function(t){var n=t.name;return n===En.Edge},LA=function(t){var n=t.name;return n===En.Yandex},DA=function(t){var n=t.name;return n===En.Safari||n===En.MobileSafari},RA=function(t){var n=t.name;return n===En.MobileSafari},_A=function(t){var n=t.name;return n===En.Opera},BA=function(t){var n=t.name;return n===En.InternetExplorer||n===En.Ie},NA=function(t){var n=t.name;return n===En.MIUI},VA=function(t){var n=t.name;return n===En.SamsungBrowser},WA=function(t){var n=t.version;return De(n)},zA=function(t){var n=t.major;return De(n)},UA=function(t){var n=t.name;return De(n)},HA=function(t){var n=t.name;return De(n)},GA=function(t){var n=t.version;return De(n)},YA=function(){var t=bg(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Ms=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},KA=function(){var t=bg();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},zr=function(){return xg("iPad")},XA=function(){return xg("iPhone")},ZA=function(){return xg("iPod")},QA=function(t){return De(t)};function JA(e){var t=e||uA,n=t.device,r=t.browser,o=t.os,s=t.engine,a=t.ua;return{isSmartTV:vA(n),isConsole:bA(n),isWearable:yA(n),isEmbedded:xA(n),isMobileSafari:RA(r)||zr(),isChromium:FA(r),isMobile:mA(n)||zr(),isMobileOnly:hA(n),isTablet:gA(n)||zr(),isBrowser:Nu(n),isDesktop:Nu(n),isAndroid:AA(o),isWinPhone:IA(o),isIOS:OA(o)||zr(),isChrome:MA(r),isFirefox:kA(r),isSafari:DA(r),isOpera:_A(r),isIE:BA(r),osVersion:PA(o),osName:jA(o),fullBrowserVersion:WA(r),browserVersion:zA(r),browserName:UA(r),mobileVendor:CA(n),mobileModel:wA(n),engineName:HA(s),engineVersion:GA(s),getUA:QA(a),isEdge:Vu(r)||Ms(a),isYandex:LA(r),deviceType:SA(n),isIOS13:KA(),isIPad13:zr(),isIPhone13:XA(),isIPod13:ZA(),isElectron:YA(),isEdgeChromium:Ms(a),isLegacyEdge:Vu(r)&&!Ms(a),isWindows:TA(o),isMacOs:EA(o),isMIUI:NA(r),isSamsungBrowser:VA(r)}}var qA=vA(Vn),$A=bA(Vn),eT=yA(Vn),WY=xA(Vn),zY=RA(on)||zr(),UY=FA(on),Wu=mA(Vn)||zr(),tT=hA(Vn),nT=gA(Vn)||zr(),rT=Nu(Vn),HY=Nu(Vn),oT=AA(Bo),iT=IA(Bo),sT=OA(Bo)||zr(),GY=MA(on),YY=kA(on),KY=DA(on),XY=_A(on),aT=BA(on),ZY=PA(Bo),QY=jA(Bo),JY=WA(on),qY=zA(on),$Y=UA(on),eK=CA(Vn),tK=wA(Vn),nK=HA(gg),rK=GA(gg),oK=QA(el),iK=Vu(on)||Ms(el),sK=LA(on),aK=SA(Vn),lK=KA(),cK=zr(),uK=XA(),dK=ZA(),fK=YA(),pK=Ms(el),hK=Vu(on)&&!Ms(el),gK=TA(Bo),mK=EA(Bo),vK=NA(on),yK=VA(on),bK=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=tl(t),r=n.device,o=n.browser,s=n.os,a=n.engine,c=n.ua;return JA({device:r,browser:o,os:s,engine:a,ua:c})},xK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return oT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},CK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return rT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},wK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return aT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},SK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return sT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},AK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return Wu?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},TK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return nT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},EK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return iT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},IK=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=dr(t,["renderWithFragment","children","viewClassName","style"]);return tT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},OK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return qA?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},PK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return $A?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},jK=function(t){var n=t.renderWithFragment,r=t.children,o=dr(t,["renderWithFragment","children"]);return eT?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",o,r):null},MK=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,s=dr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?pt.createElement(rn.Fragment,null,r):pt.createElement("div",s,r):null};function kK(e){return function(t){AY(n,t);function n(r){var o;return xY(this,n),o=EY(this,vg(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(Bu(o)),o.onOrientationChange=o.onOrientationChange.bind(Bu(o)),o.onPageLoad=o.onPageLoad.bind(Bu(o)),o.state={isLandscape:!1,isPortrait:!1},o}return wY(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":nl(window))!==void 0&&Wu&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return pt.createElement(e,mg({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(pt.Component)}function FK(){var e=rn.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=IY(e,2),n=t[0],r=t[1],o=rn.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,a={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return rn.useEffect(function(){return(typeof window>"u"?"undefined":nl(window))!==void 0&&Wu&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function lT(e){var t=e||window.navigator.userAgent;return tl(t)}function LK(e){var t=e||window.navigator.userAgent,n=lT(t),r=JA(n);return[r,n]}Ae.AndroidView=xK,Ae.BrowserTypes=En;var DK=Ae.BrowserView=CK;Ae.ConsoleView=PK,Ae.CustomView=MK,Ae.IEView=wK,Ae.IOSView=SK,Ae.MobileOnlyView=IK;var RK=Ae.MobileView=AK;Ae.OsTypes=js,Ae.SmartTVView=OK,Ae.TabletView=TK,Ae.WearableView=jK,Ae.WinPhoneView=EK,Ae.browserName=$Y,Ae.browserVersion=qY,Ae.deviceDetect=VY,Ae.deviceType=aK,Ae.engineName=nK,Ae.engineVersion=rK,Ae.fullBrowserVersion=JY,Ae.getSelectorsByUserAgent=bK,Ae.getUA=oK,Ae.isAndroid=oT,Ae.isBrowser=rT,Ae.isChrome=GY,Ae.isChromium=UY,Ae.isConsole=$A,Ae.isDesktop=HY,Ae.isEdge=iK,Ae.isEdgeChromium=pK,Ae.isElectron=fK,Ae.isEmbedded=WY,Ae.isFirefox=YY,Ae.isIE=aT,Ae.isIOS=sT,Ae.isIOS13=lK,Ae.isIPad13=cK,Ae.isIPhone13=uK,Ae.isIPod13=dK,Ae.isLegacyEdge=hK,Ae.isMIUI=vK,Ae.isMacOs=mK,Ae.isMobile=Wu,Ae.isMobileOnly=tT,Ae.isMobileSafari=zY,Ae.isOpera=XY,Ae.isSafari=KY,Ae.isSamsungBrowser=yK,Ae.isSmartTV=qA,Ae.isTablet=nT,Ae.isWearable=eT,Ae.isWinPhone=iT,Ae.isWindows=gK,Ae.isYandex=sK,Ae.mobileModel=tK,Ae.mobileVendor=eK,Ae.osName=QY,Ae.osVersion=ZY,Ae.parseUserAgent=tl,Ae.setUserAgent=LY,Ae.useDeviceData=lT,Ae.useDeviceSelectors=LK,Ae.useMobileOrientation=FK,Ae.withOrientationChange=kK;var _K=typeof global=="object"&&global&&global.Object===Object&&global,BK=typeof self=="object"&&self&&self.Object===Object&&self,cT=_K||BK||Function("return this")(),zu=cT.Symbol,uT=Object.prototype,NK=uT.hasOwnProperty,VK=uT.toString,rl=zu?zu.toStringTag:void 0;function WK(e){var t=NK.call(e,rl),n=e[rl];try{e[rl]=void 0;var r=!0}catch{}var o=VK.call(e);return r&&(t?e[rl]=n:delete e[rl]),o}var zK=Object.prototype,UK=zK.toString;function HK(e){return UK.call(e)}var GK="[object Null]",YK="[object Undefined]",dT=zu?zu.toStringTag:void 0;function KK(e){return e==null?e===void 0?YK:GK:dT&&dT in Object(e)?WK(e):HK(e)}function XK(e){return e!=null&&typeof e=="object"}var ZK="[object Symbol]";function QK(e){return typeof e=="symbol"||XK(e)&&KK(e)==ZK}var JK=/\s/;function qK(e){for(var t=e.length;t--&&JK.test(e.charAt(t)););return t}var $K=/^\s+/;function eX(e){return e&&e.slice(0,qK(e)+1).replace($K,"")}function Uu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fT=NaN,tX=/^[-+]0x[0-9a-f]+$/i,nX=/^0b[01]+$/i,rX=/^0o[0-7]+$/i,oX=parseInt;function pT(e){if(typeof e=="number")return e;if(QK(e))return fT;if(Uu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Uu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eX(e);var n=nX.test(e);return n||rX.test(e)?oX(e.slice(2),n?2:8):tX.test(e)?fT:+e}var Cg=function(){return cT.Date.now()},iX="Expected a function",sX=Math.max,aX=Math.min;function Hu(e,t,n){var r,o,s,a,c,u,d=0,h=!1,g=!1,m=!0;if(typeof e!="function")throw new TypeError(iX);t=pT(t)||0,Uu(n)&&(h=!!n.leading,g="maxWait"in n,s=g?sX(pT(n.maxWait)||0,t):s,m="trailing"in n?!!n.trailing:m);function v(L){var D=r,Y=o;return r=o=void 0,d=L,a=e.apply(Y,D),a}function b(L){return d=L,c=setTimeout(I,t),h?v(L):a}function x(L){var D=L-u,Y=L-d,Z=t-D;return g?aX(Z,s-Y):Z}function w(L){var D=L-u,Y=L-d;return u===void 0||D>=t||D<0||g&&Y>=s}function I(){var L=Cg();if(w(L))return F(L);c=setTimeout(I,x(L))}function F(L){return c=void 0,m&&r?v(L):(r=o=void 0,a)}function E(){c!==void 0&&clearTimeout(c),d=0,r=u=o=c=void 0}function k(){return c===void 0?a:F(Cg())}function P(){var L=Cg(),D=w(L);if(r=arguments,o=this,u=L,D){if(c===void 0)return b(u);if(g)return clearTimeout(c),c=setTimeout(I,t),v(u)}return c===void 0&&(c=setTimeout(I,t)),a}return P.cancel=E,P.flush=k,P}var lX="Expected a function";function cX(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(lX);return Uu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Hu(e,t,{leading:r,maxWait:t,trailing:o})}var ks=function(){return ks=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},ks.apply(this,arguments)};function hT(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function gT(e){return!e||!e.ownerDocument?document:e.ownerDocument}var mT=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var s=o.name.match(/data-simplebar-(.+)/);if(s){var a=s[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":r[a]=!0;break;case"false":r[a]=!1;break;case void 0:r[a]=!0;break;default:r[a]=o.value}}return r},t);return n};function vT(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function yT(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function bT(e){return".".concat(e.split(" ").join("."))}var wg=!!(typeof window<"u"&&window.document&&window.document.createElement),uX=Object.freeze({__proto__:null,addClasses:vT,canUseDOM:wg,classNamesToQuery:bT,getElementDocument:gT,getElementWindow:hT,getOptions:mT,removeClasses:yT}),Fs=null,xT=null;wg&&window.addEventListener("resize",function(){xT!==window.devicePixelRatio&&(xT=window.devicePixelRatio,Fs=null)});function CT(){if(Fs===null){if(typeof document>"u")return Fs=0,Fs;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),Fs=n}return Fs}var No=hT,Sg=gT,dX=mT,Vo=vT,Wo=yT,In=bT,Gu=function(){function e(t,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var o=No(r.el);r.scrollXTicking||(o.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(o.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,Vo(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){Wo(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(Vo(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){Wo(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(o){r.mouseX=o.clientX,r.mouseY=o.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(o){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var s,a;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(s=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(s||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(s&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(o,"x"):r.onTrackClick(o,"x")),a&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(o,"y"):r.onTrackClick(o,"y"))))}},this.drag=function(o){var s,a,c,u,d,h,g,m,v,b,x;if(!(!r.draggedAxis||!r.contentWrapperEl)){var w,I=r.axis[r.draggedAxis].track,F=(a=(s=I.rect)===null||s===void 0?void 0:s[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,E=r.axis[r.draggedAxis].scrollbar,k=(u=(c=r.contentWrapperEl)===null||c===void 0?void 0:c[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,P=parseInt((h=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&h!==void 0?h:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?w=o.pageY:w=o.pageX;var L=w-((m=(g=I.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&m!==void 0?m:0)-r.axis[r.draggedAxis].dragOffset;L=r.draggedAxis==="x"&&r.isRtl?((b=(v=I.rect)===null||v===void 0?void 0:v[r.axis[r.draggedAxis].sizeAttr])!==null&&b!==void 0?b:0)-E.size-L:L;var D=L/(F-E.size),Y=D*(k-P);r.draggedAxis==="x"&&r.isRtl&&(Y=!((x=e.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-Y:Y),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=Y}},this.onEndDrag=function(o){r.isDragging=!1;var s=Sg(r.el),a=No(r.el);o.preventDefault(),o.stopPropagation(),Wo(r.el,r.classNames.dragging),r.onStopScrolling(),s.removeEventListener("mousemove",r.drag,!0),s.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){s.removeEventListener("click",r.preventClick,!0),s.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=ks(ks({},e.defaultOptions),n),this.classNames=ks(ks({},e.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=cX(this._onMouseMove,64),this.onWindowResize=Hu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Hu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Hu(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var o=e.getOffset(n),s=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==s.left,isScrollingToNegative:s.left!==a.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:CT()}catch{return CT()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=Sg(t),o=No(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){wg&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,n;this.wrapperEl=this.el.querySelector(In(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(In(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(In(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(In(this.classNames.offset)),this.maskEl=this.el.querySelector(In(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,In(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(In(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(In(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(In(this.classNames.track)).concat(In(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(In(this.classNames.track)).concat(In(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(In(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(In(this.classNames.scrollbar)))||null,this.options.autoHide||(Vo(this.axis.x.scrollbar.el,this.classNames.visible),Vo(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=No(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var o=!1,s=r.ResizeObserver||ResizeObserver;this.resizeObserver=new s(function(){o&&r.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){o=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=No(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||n>0,s=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,c=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var u=this.contentEl.scrollHeight,d=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||d,"px"):"auto",this.placeholderEl.style.height="".concat(u,"px");var h=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>h,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=c==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var g=this.axis.x.isOverflowing?this.scrollbarWidth:0,m=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>s-m,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>h-g,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var n,r;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var o=this.contentEl[this.axis[t].scrollSizeAttr],s=(r=(n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])!==null&&r!==void 0?r:0,a=s/o,c;return c=Math.max(~~(a*s),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(c=Math.min(c,this.options.scrollbarMaxSize)),c},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var s=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!s.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],c=((n=this.axis[t].track.el)===null||n===void 0?void 0:n[this.axis[t].offsetSizeAttr])||0,u=parseInt(this.elStyles[this.axis[t].sizeAttr],10),d=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];d=t==="x"&&this.isRtl&&(!((r=e.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-d:d,t==="x"&&this.isRtl&&(d=!((o=e.getRtlHelpers())===null||o===void 0)&&o.isScrollingToNegative?d:-d);var h=d/(a-u),g=~~((c-s.size)*h);g=t==="x"&&this.isRtl?-g+(c-s.size):g,s.el.style.transform=t==="x"?"translate3d(".concat(g,"px, 0, 0)"):"translate3d(0, ".concat(g,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var n=this.axis[t].track.el,r=this.axis[t].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none")},e.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(Vo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(Wo(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var n=this.axis[t];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(t),Vo(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Vo(n.scrollbar.el,this.classNames.hover):Wo(n.scrollbar.el,this.classNames.hover)):(Wo(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),Wo(this.axis[t].track.el,this.classNames.hover),Wo(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,n){var r;n===void 0&&(n="y"),this.isDragging=!0;var o=Sg(this.el),s=No(this.el),a=this.axis[n].scrollbar,c=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=c-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Vo(this.el,this.classNames.dragging),o.addEventListener("mousemove",this.drag,!0),o.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(o.addEventListener("click",this.preventClick,!0),o.addEventListener("dblclick",this.preventClick,!0)):(s.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,s,a,c;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=No(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var h=this.axis[n].scrollbar,g=(s=(o=h.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&s!==void 0?s:0,m=parseInt((c=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&c!==void 0?c:"0px",10),v=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],b=n==="y"?this.mouseY-g:this.mouseX-g,x=b<0?-1:1,w=x===-1?v-m:v+m,I=40,F=function(){r.contentWrapperEl&&(x===-1?v>w&&(v-=I,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(F)):v<w&&(v+=I,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=v,d.requestAnimationFrame(F)))};F()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=No(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,n){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(o){return r.call(o,n)})[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=dX,e.helpers=uX,e}(),Wn=function(){return Wn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Wn.apply(this,arguments)};function fX(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var wT=B.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,s=fX(e,["children","scrollableNodeProps"]),a=B.useRef(),c=B.useRef(),u=B.useRef(),d={},h={};Object.keys(s).forEach(function(v){Object.prototype.hasOwnProperty.call(Gu.defaultOptions,v)?d[v]=s[v]:h[v]=s[v]});var g=Wn(Wn({},Gu.defaultOptions.classNames),d.classNames),m=Wn(Wn({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||Gu.defaultOptions.ariaLabel});return B.useEffect(function(){var v;return c.current=m.ref?m.ref.current:c.current,a.current&&(v=new Gu(a.current,Wn(Wn(Wn({},d),c.current&&{scrollableNode:c.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(v):t&&(t.current=v)),function(){v==null||v.unMount(),v=null,typeof t=="function"&&t(null)}},[]),B.createElement("div",Wn({"data-simplebar":"init",ref:a},h),B.createElement("div",{className:g.wrapper},B.createElement("div",{className:g.heightAutoObserverWrapperEl},B.createElement("div",{className:g.heightAutoObserverEl})),B.createElement("div",{className:g.mask},B.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:c,scrollableNodeProps:Wn(Wn({},m),{ref:c}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):B.createElement("div",Wn({},m),B.createElement("div",{className:g.contentEl},n)))),B.createElement("div",{className:g.placeholder})),B.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},B.createElement("div",{className:g.scrollbar})),B.createElement("div",{className:"".concat(g.track," simplebar-vertical")},B.createElement("div",{className:g.scrollbar})))});wT.displayName="SimpleBar";const pX=pe(DK)({flexGrow:1,height:"100%",overflow:"hidden"}),hX=pe(wT)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:tt(e.palette.grey[500],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-track.simplebar-vertical":{width:10},"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar":{height:6},"& .simplebar-mask":{zIndex:"inherit"}}));function ST({children:e,sx:t,...n}){return f.jsxs(f.Fragment,{children:[f.jsx(pX,{children:f.jsx(hX,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),f.jsx(RK,{children:f.jsx(S.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function AT(e){const t=S.useTheme(),n=Sr(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Nn(),{open:o,handleDrawerToggle:s,width:a}=Si(),c=r?S.Drawer:gY,u=document.body,d=T.useMemo(()=>r?{container:u,variant:"temporary",onClose:s,ModalProps:{keepMounted:!0},sx:{display:{xs:"block",lg:"none"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:a,borderRight:`1px solid ${t.palette.divider}`,backgroundImage:"none",boxShadow:"inherit",overflow:"auto"}}}:{variant:"permanent"},[r,u,s,a,t.palette.divider]);return f.jsx(S.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:f.jsxs(c,{...d,open:o,children:[f.jsx(iA,{}),f.jsx(ST,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function Ag(e){const{name:t,version:n,copy:r="© Applica Software Guru for"}=e;return f.jsx(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:f.jsxs(S.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const TT=pe(S.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Tn();return{zIndex:e.zIndex.drawer+1,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),...!t&&{width:`calc(100% - ${e.spacing(7.5)})`},...t&&{marginLeft:n,width:`calc(100% - ${n}px)`,transition:e.transitions.create(["width","margin"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})}}}),ET=T.forwardRef(function(t,n){const r=Sr(t,{color:"text.primary"},{defaults:!0});return f.jsx(S.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),gX=T.forwardRef(function(t,n){const r=Sr(t,{color:"text.primary"},{defaults:!0});return f.jsx(Nc,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Ls=T.forwardRef(function(t,n){const r=Sr(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(S.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function IT({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=Ja(),[s,a]=re.useLocaleState(),c=re.useLocales();if(c.length===0)return null;function u(d){if(e){e(d,r);return}a(d),r()}return f.jsxs(f.Fragment,{children:[f.jsx(ET,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:f.jsxs(S.Stack,{direction:"row",spacing:.5,children:[f.jsx(S.Typography,{variant:"body1",children:s.toUpperCase()}),t?f.jsx(Ke.CaretUpOutlined,{}):f.jsx(Ke.CaretDownOutlined,{})]})}),f.jsx(S.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:c.map((d,h)=>f.jsx(S.MenuItem,{onClick:()=>u(d.locale),children:d.name},h))})]})}const mX={ml:{xs:0,lg:-2}};function OT(){const{open:e,handleDrawerToggle:t}=Si();return f.jsx(Ls,{value:"drawer","aria-label":"open drawer",sx:mX,onChange:t,selected:e,children:e?f.jsx(Ke.MenuFoldOutlined,{}):f.jsx(Ke.MenuUnfoldOutlined,{})})}function PT(e){const t=T.useRef(),n=S.useTheme(),{downLg:r,horizontal:o}=Nn(),{open:s,width:a}=Si(),c=r?S.AppBar:TT,d={position:"fixed",color:"inherit",elevation:0,sx:Sr(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||$.extend(d,{open:s}),f.jsx(c,{ref:t,...d,children:f.jsxs(S.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(OT,{}),e.children]})})}function vX(e){const t=S.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=_u(),c=re.useNotify(),u=re.useRedirect(),[d]=re.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Ar().toISOString()}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),h=T.useCallback(()=>d(),[d]),[g]=re.useLocaleState(),m=T.useMemo(()=>Ar(n.created).locale(g).fromNow(),[n,g]);return f.jsx(S.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(S.ListItemButton,{selected:o,onClick:h,children:[f.jsx(S.ListItemAvatar,{children:f.jsx(S.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(Ke.MessageOutlined,{})})}),f.jsx(S.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),f.jsx(S.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(S.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:m,primaryTypographyProps:{variant:"caption"}})]})})}const yX={width:36,height:36,fontSize:"1rem"},bX={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function jT(){const{enable:e}=_u();return e?f.jsx(xX,{}):null}function xX(){const e=re.useTranslate(),t=S.useTheme(),n=re.useRefresh(),r=re.useNotify(),{downMd:o}=Nn(),{resource:s}=_u(),[a,c]=T.useState([]),{data:u,isLoading:d}=re.useGetList(s,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),h=a.filter(F=>F.readed===null).length,{open:g,anchorEl:m,handleClose:v,handleToggle:b}=Ja();T.useEffect(()=>{!d&&u&&c(u??[])},[u,d]);const x=a.filter(F=>!F.readed).map(F=>F.id),[w]=re.useUpdateMany(s,{ids:x,data:{readed:Ar().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),I=T.useCallback(()=>{w()},[w]);return f.jsxs(f.Fragment,{children:[f.jsx(Ls,{value:"notifications",selected:g,onChange:b,children:f.jsx(S.Badge,{badgeContent:h,color:"primary",children:f.jsx(Ke.BellOutlined,{})})}),f.jsx(S.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:m,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:F})=>f.jsx(hi,{type:"grow",position:o?"top":"top-right",in:g,...F,children:f.jsx(S.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(S.ClickAwayListener,{onClickAway:v,children:f.jsxs(wr,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:h>0&&f.jsx(S.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:I,children:f.jsx(Nc,{color:"success",size:"small",children:f.jsx(Ke.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(S.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":yX,"& .MuiListItemSecondaryAction-root":{...bX,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((E,k)=>f.jsx(vX,{selected:h>0,notification:E,onClick:v,divider:k<a.length-1},E.id))}),f.jsx(S.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${s}`,LinkComponent:ut.Link,onClick:v,children:f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(S.Divider,{})]})})})})})]})}function CX(){const[e,t]=T.useState(!1),n=T.useCallback(()=>t(!1),[t]),r=T.useCallback(()=>t(!0),[t]),o=re.useTranslate();return f.jsxs(f.Fragment,{children:[f.jsxs(S.ListItemButton,{onClick:r,children:[f.jsx(S.ListItemIcon,{children:f.jsx(Fn.Key,{})}),f.jsx(S.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(S.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(rg,{onSuccess:n})})]})}function wX(){const e=re.useLogout(),t=re.useTranslate();return f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{onClick:e,children:[f.jsx(S.ListItemIcon,{children:f.jsx(Fn.LogoutOutlined,{})}),f.jsx(S.ListItemText,{primary:t("ra.auth.logout")})]})})}function SX(){const e=re.useTranslate(),t=re.useAuthProvider(),n=T.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=T.useState(!1);return T.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{onClick:n,children:[f.jsx(S.ListItemIcon,{children:f.jsx(Fn.LogoutOutlined,{})}),f.jsx(S.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function MT(){var m;const e=S.useTheme(),t=re.useDataProvider(),{identity:n}=re.useGetIdentity(),r=n!==void 0&&n.image&&n.image!==null&&n.image!=="",[o,s]=T.useState(null),{open:a,anchorEl:c,handleToggle:u,handleClose:d}=Ja(),h=re.useLogout(),g=T.useCallback(()=>{h()},[h]);return T.useEffect(()=>{r&&t.getFile("/profile/me/image").then(v=>s(v))},[t,r]),f.jsxs(f.Fragment,{children:[f.jsx(Ls,{sx:{p:.25,width:"auto"},onClick:u,value:"profile",selected:a,children:f.jsxs(S.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Lc,{alt:(m=n==null?void 0:n.name)==null?void 0:m.toUpperCase(),src:o,size:"xs"}),f.jsx(S.Typography,{variant:"subtitle1",children:n==null?void 0:n.name})]})}),f.jsx(v1,{placement:"bottom-end",open:a,anchorEl:c,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:v})=>{var b;return f.jsx(hi,{type:"grow",position:"top-right",in:a,...v,children:f.jsx(S.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(S.ClickAwayListener,{onClickAway:d,children:f.jsxs(wr,{elevation:0,border:!1,content:!1,children:[f.jsx(S.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(S.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(S.Grid,{item:!0,children:f.jsxs(S.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Lc,{alt:"profile user",src:o,sx:{width:32,height:32}}),f.jsxs(S.Stack,{children:[f.jsx(S.Typography,{variant:"h6",children:n==null?void 0:n.name}),f.jsx(S.Typography,{variant:"body2",color:"textSecondary",children:(b=n==null?void 0:n.roles)==null?void 0:b.map(x=>x.name.replace("ROLE_","")).join(",")})]})]})}),f.jsx(S.Grid,{item:!0,children:f.jsx(S.Tooltip,{title:"Logout",children:f.jsx(Nc,{size:"large",sx:{color:"text.primary"},onClick:g,children:f.jsx(Ke.LogoutOutlined,{})})})})]})}),f.jsx(S.Grid,{container:!0,children:f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(CX,{}),f.jsx(wX,{}),f.jsx(SX,{})]})})})]})})})})}})]})}function kT(e){const t=Kt(),{downMd:n}=Nn(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=Ja();return n?f.jsxs(f.Fragment,{children:[f.jsx(Ls,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:f.jsx(Ke.MoreOutlined,{})}),f.jsx(S.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>f.jsx(hi,{type:"fade",in:r,...c,children:f.jsx(S.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(S.ClickAwayListener,{onClickAway:a,children:f.jsx(S.AppBar,{color:"inherit",children:f.jsx(S.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})}function FT(e){return f.jsx(S.Box,{...e,flex:1})}function LT(e){const t=S.useTheme(),n=S.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=Tn();return t.shadows[4]=t.customShadows.z1,f.jsx(S.AppBar,{elevation:n?4:0,sx:{top:60,bgcolor:t.palette.background.paper,width:"100%",height:62,justifyContent:"center",borderTop:`1px solid ${t.palette.divider}`,borderBottom:`1px solid ${t.palette.divider}`,zIndex:1098,color:t.palette.grey[500]},children:f.jsx(S.Container,{maxWidth:r?"xl":!1,children:f.jsx(S.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function DT(e){const{horizontal:t}=Nn();return t?f.jsx(LT,{children:e.children}):f.jsx(AT,{children:e.children})}function ol({item:e,level:t}){const n=Kt(),{horizontal:r,downLg:o}=Nn(),{drawerOpen:s,openItem:a,activeItem:c,openDrawer:u}=Za();let d="_self";e.target&&(d="_blank");const h=(e==null?void 0:e.external)!==!1?{component:T.forwardRef((I,F)=>f.jsx(ut.Link,{...I,to:e.url,target:d,ref:F}))}:{component:"a",href:e.url,target:d},g=e.icon,m=e.icon?f.jsx(g,{style:{fontSize:s?"1rem":"1.25rem"}}):!1,v=a.findIndex(I=>I===e.id)>-1,{pathname:b}=ut.useLocation();T.useEffect(()=>{b.endsWith(e.url)&&c([e.id])},[b]);const x=n.palette.mode==="dark"?"grey.400":"text.primary",w=n.palette.mode==="dark"&&s?"text.primary":"primary.main";return f.jsx(f.Fragment,{children:r?f.jsxs(S.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,...s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:w,"&:hover":{color:w,bgcolor:"transparent"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[m?f.jsx(S.ListItemIcon,{sx:{minWidth:36,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:m}):null,!m&&f.jsx(S.ListItemIcon,{sx:{color:v?"primary.main":"secondary.main",...!s&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!s&&v&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:f.jsx(Dp,{size:4,color:v?"primary":"secondary"})}),f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:"inherit",children:e.title})}),(s||!s&&t!==1)&&e.chip?f.jsx(S.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(S.Avatar,{children:e.chip.avatar}):null}):null]}):f.jsxs(S.ListItemButton,{...h,disabled:e.disabled,selected:v,sx:{zIndex:1201,pl:s?`${t*28}px`:1.5,py:!s&&t===1?1.25:1,...s&&{"&:hover":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter",borderRight:`2px solid ${n.palette.primary.main}`,color:w,"&:hover":{color:w,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!s&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[m?f.jsx(S.ListItemIcon,{sx:{minWidth:28,color:v?w:x,...!s&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!s&&v&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:m}):null,s||!s&&t!==1?f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",sx:{color:v?w:x},children:e.title})}):null,(s||!s&&t!==1)&&e.chip?f.jsx(S.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?f.jsx(S.Avatar,{children:e.chip.avatar}):null}):null]})})}const RT=pe(S.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:38,left:-5,width:10,height:10,backgroundColor:e.palette.background.paper,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderLeft:`1px solid ${e.palette.grey.A800}`,borderBottom:`1px solid ${e.palette.grey.A800}`}}));function il({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:s,selectedLevel:a}){var N;const c=Kt(),{activeItem:u}=Za(),{horizontal:d}=Nn(),{drawerOpen:h}=Za(),g=ut.useNavigate(),[m,v]=T.useState(!1),[b,x]=T.useState(null),[w,I]=T.useState(null);function F(ne){I(null),s(t),h?(v(!m),x(b?null:e.id),r(b?"":e.id),e.url&&g(`${e.url}`)):I(ne==null?void 0:ne.currentTarget)}function E(){h||e.url&&g(`${e.url}`)}function k(ne){I(ne==null?void 0:ne.currentTarget)}function P(){v(!1),x(null),I(null)}T.useMemo(()=>{b===o?t===1&&v(!0):t===a&&(v(!1),x(null))},[o,t,b,a]);const{pathname:L}=ut.useLocation(),D=!!w;function Y(ne,W){ne.forEach(K=>{K.url===L&&(v(!0),x(W))})}T.useEffect(()=>{v(!1),x(null),D&&I(null),e.children&&e.children.forEach(ne=>{var W;(W=ne.children)!=null&&W.length&&Y(ne.children,e.id),ne.url===L&&(x(e.id),v(!0)),L.includes(ne.url)&&(x(e.id),v(!0))})},[L,e.children]),T.useEffect(()=>{e.url===L&&b!==e.id&&(u([e.id]),x(e.id),I(null),v(!0))},[L,e,b,u]);const Z=(N=e.children)==null?void 0:N.map(ne=>{switch(ne.type){case"collapse":return f.jsx(il,{setSelectedItems:r,setSelectedLevel:s,selectedLevel:a,selectedItems:o,menu:ne,level:t+1,parentId:n},ne.id);case"item":return f.jsx(ol,{item:ne,level:t+1},ne.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},ne.id)}}),ee=b===e.id,G=t===1?f.jsx(Ke.BorderOutlined,{style:{fontSize:"1rem"}}):!1,le=e.icon,ae=e.icon?f.jsx(le,{style:{fontSize:h?"1rem":"1.25rem"}}):G,q=c.palette.mode==="dark"?"grey.400":"text.primary",J=c.palette.mode==="dark"&&h?c.palette.text.primary:c.palette.primary.main,z=D?`collapse-pop-${e.id}`:void 0,Q={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return f.jsx(f.Fragment,{children:d?f.jsx(f.Fragment,{children:f.jsxs(S.ListItemButton,{id:`boundary-${z}`,disableRipple:!0,selected:ee,onMouseEnter:k,onMouseLeave:P,onClick:k,"aria-describedby":z,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[f.jsxs(S.Box,{onClick:E,sx:Q,children:[ae?f.jsx(S.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:c.palette.secondary.dark},children:ae}):null,!ae&&t!==1&&f.jsx(S.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:f.jsx(Dp,{size:4,color:ee?"primary":"secondary"})}),f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),D?f.jsx(Ke.RightOutlined,{}):f.jsx(Ke.DownOutlined,{})]}),w?f.jsx(RT,{id:z,open:D,anchorEl:w,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:ne})=>f.jsx(hi,{in:D,...ne,children:f.jsx(S.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:c.shadows[8],backgroundImage:"none"},children:f.jsx(S.ClickAwayListener,{onClickAway:P,children:f.jsx(S.Box,{children:Z})})})})}):null]})}):f.jsxs(f.Fragment,{children:[f.jsxs(S.ListItemButton,{disableRipple:!0,selected:b===e.id,...!h&&{onMouseEnter:F,onMouseLeave:P},onClick:F,sx:{pl:h?`${t*28}px`:1.5,py:!h&&t===1?1.25:1,...h&&{"&:hover":{bgcolor:c.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:J,"&:hover":{color:J,bgcolor:c.palette.mode==="dark"?"divider":"transparent"}}},...!h&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[ae?f.jsx(S.ListItemIcon,{onClick:E,sx:{minWidth:28,color:b===e.id?"primary.main":q,...!h&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:c.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!h&&b===e.id&&{bgcolor:c.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:c.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:ae}):null,h||!h&&t!==1?f.jsx(S.ListItemText,{primary:f.jsx(S.Typography,{variant:"h6",color:b===e.id?"primary":q,children:e.title}),secondary:e.caption?f.jsx(S.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,h||!h&&t!==1?D||m?f.jsx(Ke.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:c.palette.primary.main}}):f.jsx(Ke.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!h&&f.jsx(RT,{open:D,anchorEl:w,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:ne})=>f.jsx(hi,{in:D,...ne,children:f.jsx(S.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:c.customShadows.z1,backgroundImage:"none",border:`1px solid ${c.palette.divider}`},children:f.jsx(S.ClickAwayListener,{onClickAway:P,children:f.jsx(S.Box,{children:Z})})})})})]}),h?f.jsx(S.Collapse,{in:m,timeout:"auto",unmountOnExit:!0,children:f.jsx(S.List,{sx:{p:0},children:Z})}):null]})})}const AX=pe(S.Popper)(({theme:e})=>({overflow:"visible",zIndex:1202,minWidth:180,"&:before":{content:'""',display:"block",position:"absolute",top:5,left:32,width:12,height:12,transform:"translateY(-50%) rotate(45deg)",zIndex:120,borderWidth:"6px",borderStyle:"solid",borderColor:`${e.palette.background.paper} transparent transparent ${e.palette.background.paper}`}}));function _T({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:s,setSelectedLevel:a,selectedLevel:c}){var z,Q;const u=Kt(),d=_.useTranslate(),{pathname:h}={pathname:""},{horizontal:g,downLg:m}=Nn(),v=Za(),{drawerOpen:b,selectedID:x,activeID:w}=v,[I,F]=T.useState(null),[E,k]=T.useState(e),P=!!I;T.useEffect(()=>{if(t)if(e.id===r){const N={...e},ne=n.map(W=>W.elements);N.children=ne.flat(1),k(N)}else k(e)},[e,t,m]);function L(N,ne){N.forEach(W=>{var K;(K=W.children)!=null&&K.length&&L(W.children,E.id),W.url===h&&w(ne)})}function D(N){(N.children?N.children:[]).forEach(W=>{var K;(K=W.children)!=null&&K.length&&L(W.children,E.id),W.url===h&&w(E.id)})}T.useEffect(()=>{D(E),P&&F(null)},[h,E]);function Y(N){P||F(N==null?void 0:N.currentTarget)}function Z(){F(null)}const ee=E==null?void 0:E.icon,G=E!=null&&E.icon?f.jsx(ee,{style:{fontSize:20,stroke:"1.5",color:x===E.id?u.palette.primary.main:u.palette.secondary.dark}}):null,le=(z=e.children)==null?void 0:z.map(N=>{switch(N.type){case"collapse":return f.jsx(il,{menu:N,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s,level:1,parentId:E.id},N.id);case"item":return f.jsx(ol,{item:N,level:1},N.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},N.id)}}),ae=n.map((N,ne)=>{var W;return f.jsxs(T.Fragment,{children:[N.title?f.jsx(S.Typography,{variant:"caption",sx:{pl:2},children:N.title}):null,(W=N==null?void 0:N.elements)==null?void 0:W.map(K=>{switch(K.type){case"collapse":return f.jsx(il,{menu:K,level:1,parentId:E.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},K.id);case"item":return f.jsx(ol,{item:K,level:1},K.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},K.id)}})]},ne)}),q=(Q=E.children)==null?void 0:Q.map(N=>{switch(N.type){case"collapse":return f.jsx(il,{menu:N,level:1,parentId:E.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:c,selectedItems:s},N.id);case"item":return f.jsx(ol,{item:N,level:1},N.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},N.id)}}),J=P?`group-pop-${e.id}`:void 0;return f.jsx(f.Fragment,{children:g?f.jsx(S.List,{children:f.jsxs(S.ListItemButton,{selected:x===E.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:Y,onClick:Y,onMouseLeave:Z,"aria-describedby":J,children:[G?f.jsx(S.ListItemIcon,{sx:{minWidth:28},children:E.id===r?f.jsx(Ke.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):G}):null,f.jsx(S.ListItemText,{sx:{mr:1},primary:f.jsx(S.Typography,{variant:"body1",color:x===E.id?u.palette.primary.main:u.palette.secondary.dark,children:E.id===r?d("ra.actions.more"):E.title})}),P?f.jsx(Ke.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):f.jsx(Ke.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),I?f.jsx(AX,{id:J,open:P,anchorEl:I,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:N})=>f.jsx(hi,{in:P,...N,children:f.jsx(S.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:f.jsx(S.ClickAwayListener,{onClickAway:Z,children:f.jsx(S.Box,{sx:{maxHeight:"calc(100vh - 170px)",overflowY:"auto","&::-webkit-scrollbar":{opacity:0,width:4,"&:hover":{opacity:.7}},"&::-webkit-scrollbar-track":{background:"transparent"},"&::-webkit-scrollbar-thumb":{background:u.palette.divider,borderRadius:4}},children:E.id!==r?q:ae})})})})}):null]})}):f.jsx(S.List,{subheader:e.title&&b?f.jsxs(S.Box,{sx:{pl:3,mb:1.5},children:[f.jsx(S.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?f.jsx(S.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:b&&e.title?1.5:0,py:0,zIndex:0},children:le})})}function BT(e){const{horizontal:t}=Nn(),{open:n}=Si(),r=Sr(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return f.jsx(S.Box,{sx:r,children:e.children})}function NT(e){const{horizontal:t}=Nn(),{menu:n,isLoading:r}=_h(),[o,s]=T.useState(""),[a,c]=T.useState(0),{horizontalMaxItems:u}=Tn(),d=t?u:void 0;let h=r?0:(n??[]).length-1,g=[],m;return!r&&d&&d<(n??[]).length&&(m=(n??[])[d-1].id,h=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(v=>({title:v.title,elements:v.children,icon:v.icon}))),f.jsx(BT,{...e,children:!r&&$.map((n??[]).slice(0,h+1),v=>{const{type:b}=v;switch(b){case"group":return f.jsx(_T,{item:v,setSelectedItems:s,setSelectedLevel:c,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:m},v.id);default:return f.jsx(S.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},v.id)}})})}function VT(){const{mode:e,setMode:t}=Tn();return f.jsx(Ls,{value:"theme-mode","aria-label":"toggle mode",onChange:()=>t(e==="dark"?"light":"dark"),selected:!1,children:e==="dark"?f.jsx(Ke.SunOutlined,{}):f.jsx(Ke.MoonOutlined,{})})}const WT=T.forwardRef((e,t)=>{const n=Sr(e,{display:"flex",width:"100%"});return f.jsx(S.Box,{ref:t,...e,sx:n,children:e.children})});function Tg({source:e="paper"}){const{mode:t}=Tn(),n=S.useTheme();return T.useEffect(()=>{var o;const r=$.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const zT=eA(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:s,enableLocaleSwitcher:a}=t,{isLoading:c,navigation:u,breadcrumbs:d}=Ew();return f.jsxs(WT,{children:[f.jsxs(PT,{children:[f.jsx(FT,{}),a?f.jsx(IT,{}):null,o?f.jsx(VT,{}):null,f.jsx(Tg,{}),f.jsx(HC,{}),s?f.jsx(jT,{}):null,f.jsx(kT,{children:f.jsx(MT,{})})]}),f.jsx(DT,{children:f.jsx(NT,{})}),f.jsxs(nA,{error:t.error,children:[!c&&f.jsx(Qx,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,f.jsx(ut.Outlet,{}),f.jsx(Ag,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})}),TX=pe("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function UT(){return f.jsx(TX,{children:f.jsx(S.LinearProgress,{color:"primary"})})}function EX(e){return t=>f.jsx(T.Suspense,{fallback:f.jsx(UT,{}),children:f.jsx(e,{...t})})}function Eg({title:e}){return f.jsxs(S.Stack,{direction:"row",children:[f.jsx(S.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(S.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const IX=pe(_.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}}));function HT(e){return f.jsx(IX,{...e})}var sl=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(sl||{});const GT=so().required(),YT=so().oneOf(Object.values(sl));function OX(e){var I;const t=Ui.useQueryClient(),[n,r]=T.useState(!1),[o,s]=T.useState(()=>()=>Promise.resolve()),a=re.useGetIdentity(),c=(I=a==null?void 0:a.data)==null?void 0:I.email,u=re.useDataProvider(),d=T.useCallback(()=>c?u.get("onboarding").then(F=>{var E;return(E=F==null?void 0:F.data)==null?void 0:E.value}):Promise.reject(),[u,c]),{data:h,isLoading:g,isError:m}=Ui.useQuery({queryKey:["GET","onboarding",c],queryFn:d,staleTime:24*60*60*1e3,retry:c!==void 0}),[v,b]=T.useState(()=>()=>Promise.resolve()),w=Ui.useMutation({mutationFn:v}).mutateAsync;return T.useEffect(()=>{function F(){const E=$.chain(h??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",E).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}b(()=>F)},[u,h,e,t,c]),T.useEffect(()=>{r($.isNil((h??{})[e]))},[h,e,r]),T.useEffect(()=>{s(()=>()=>w())},[w]),{loading:g,error:m,onboardingRequired:n,acknowledgeOnboarding:o}}function PX(e){const[t,n]=Jh("onboarding",{}),[r,o]=T.useState(!1),[s,a]=T.useState(()=>()=>Promise.resolve());return T.useEffect(()=>{o($.isNil((t??{})[e]))},[t,e,o]),T.useEffect(()=>{a(()=>()=>(n(c=>$.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function jX(){return{onboardingRequired:!1,acknowledgeOnboarding:T.useRef(()=>Promise.resolve()).current}}function KT(e,t){Zh({mode:YT,topic:GT}).validateSync({mode:e,topic:t});const n=OX(t),r=PX(t),o=jX();switch(e){case sl.USER:return n.loading?o:n.error?r:$.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case sl.BROWSER:return r;default:return o}}var Ds=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(Ds||{});function MX(e,t){var o;const n=$.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return $.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=$.chain(n.tips).clone().reject(h=>h.id===a).value(),u=$.find(n.tips,{id:a}),d=$.chain(u??{}).clone().extend(s).value();return c.push(d),$.extend(n,{tips:$.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=$.isString(s)?s:s.id,c=$.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return $.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=$.isString(s)?s:s.id,c=$.chain(n.tips).reject(m=>m.id===a).value(),u=$.find(n.tips,{id:a});if($.isNil(u))return n;const d=$.chain(u).clone().extend({dismissed:!0}).value();c.push(d);const h=((o=$.chain(c).reject(m=>m.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&$.chain(c).reject(m=>m.step<h).reject(m=>m.dismissed??!1).isEmpty().value()&&e.onComplete(),$.extend(n,{tips:$.sortBy(c,["step"]),currentStep:h})}case"SET_ON_COMPLETE":{const{payload:s}=t;return $.extend(n,{onComplete:s})}case"RESTART":{const s=$.chain(n.tips).clone().map(a=>$.omit(a,"dismissed")).value();return $.extend(n,{tips:s,currentStep:0})}default:return n}}const Ig=T.createContext(void 0);function kX(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=KT(t,n),[s,a]=T.useReducer(MX,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=T.useMemo(()=>({state:s,dispatch:a}),[s,a]);return T.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),T.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),f.jsx(Ig.Provider,{value:c,children:e.children})}function XT(){const e=T.useContext(Ig);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function FX(){return XT().state}function ZT(){return XT().dispatch}function QT(e){Zh({id:so().required(),step:zw().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=FX(),c=$.find(s,{id:t}),{dismissed:u}=c??{},d=ZT(),h=T.useCallback(()=>{d({type:Ds.DISMISS_TIP,payload:t})},[d,t]);return T.useEffect(()=>{($.isNil(c)||n!==(c==null?void 0:c.step))&&d({type:Ds.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c,d]),T.useEffect(()=>()=>{d({type:Ds.UNREGISTER_TIP,payload:t})},[t,d]),{tip:$.chain(c??e).clone().extend({open:o&&!$.isNil(c)&&a===n&&!u}).value(),dismiss:h}}function LX(){const e=ZT();return T.useCallback(()=>{e({type:Ds.RESTART})},[e])}function DX(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=QT({id:t,step:n,completeOnboarding:o}),{open:c}=s,u=$.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(Qc,{...u,arrow:!0,open:c,title:f.jsxs(S.Stack,{gap:1,children:[f.jsx(S.Typography,{children:r}),f.jsx(S.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const RX=S.styled(DX)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${S.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${S.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${S.tooltipClasses.arrow}`]:{color:r.main}}});function JT({children:e}){const t=ut.useLocation(),{pathname:n}=t;return T.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),f.jsx(f.Fragment,{children:e})}const _X=pe("div")({width:"100%",overflowX:"auto",display:"block"});function qT({title:e}){return f.jsx(S.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}const BX="RaButton";function NX(e){if(e==null)return;if(typeof e=="string")return{to:e};const{redirect:t,replace:n,state:r,...o}=e;return{to:o,redirect:t,replace:n,state:r}}const VX=pe(S.Button,{name:BX,overridesResolver:(e,t)=>t.root})({"&.MuiButton-sizeSmall":{lineHeight:1.5}});function Yu(e){const{disableIconOnly:t=!1,label:n,children:r,className:o,color:s,size:a,disabled:c,alignIcon:u,to:d,...h}=e,g=_.useTranslate(),m=NX(d);if(t){const v=n?g(n,{_:n}):void 0;return f.jsx(VX,{className:o,color:s,size:a,"aria-label":v,disabled:c,startIcon:u==="left"&&r?r:void 0,endIcon:u==="right"&&r?r:void 0,...m,...h,children:v})}return f.jsx(_.Button,{...e})}function Og(e,t){const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]}function WX(e,t){return e&&e.data?{data:Og(e.data,t),total:e.total+1}:e}function zX(e,t){return e&&e.length>0?Og(e,t):e}function UX(e,t){return e&&e.data?{...e,data:Og(e.data,t),total:e.total+1}:e}function HX(e){const{disableFloatingButton:t,label:n="ra.action.create",startIcon:r=f.jsx(Ke.PlusCircleOutlined,{}),...o}=e,s=T.useCallback(a=>{var c;a.preventDefault(),(c=e==null?void 0:e.onClick)==null||c.call(e)},[e]);return t?f.jsx(Yu,{...o,onClick:s,label:n,children:r}):f.jsx(YV,{...e,onClick:s,label:n,children:r})}function GX(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Qn.useFormContext(),o=re.useTranslate(),s=T.useCallback(a=>{a.preventDefault(),a.stopPropagation(),r(c=>t(c,n))()},[r,t,n]);return f.jsx(S.Button,{onClick:s,color:"primary",variant:"contained",size:"medium",children:o("ra.action.save")})}function YX(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,onSubmit:s,mutationOptions:a,scroll:c="body",...u}=e,d=Ui.useQueryClient(),h=re.useResourceContext(),g=re.useTranslate(),m=T.Children.only(t),[v,b]=T.useState(!1),x=re.useNotify(),w=T.useCallback(()=>b(!0),[]),I=T.useCallback(()=>b(!1),[]),F=T.useCallback((E,k,P)=>{var Y,Z;const D=Date.now();d.setQueryData([h,"getOne",{id:E.id}],E),d.setQueriesData([h,"getList"],ee=>UX(ee,E),{updatedAt:D}),d.setQueriesData([h,"getMany"],ee=>zX(ee,E),{updatedAt:D}),d.setQueriesData([h,"getManyReference"],ee=>WX(ee,E),{updatedAt:D}),I(),x("ra.notification.created",{messageArgs:{smart_count:1}}),(Z=(Y=e==null?void 0:e.mutationOptions)==null?void 0:Y.onSuccess)==null||Z.call(Y,E,k,P)},[I,x,e.mutationOptions,d,h]);return f.jsxs(f.Fragment,{children:[f.jsx(HX,{...u,onClick:w}),f.jsx(S.Dialog,{open:v,scroll:c,onClose:I,maxWidth:n,fullWidth:r,fullScreen:o,children:f.jsx(S.DialogContent,{sx:{m:0,p:0},children:f.jsx(re.CreateBase,{...e,mutationOptions:{...a,onSuccess:F},children:T.isValidElement(m)?T.cloneElement(m,{...m.props,modal:!0,toolbar:f.jsxs(wi,{children:[f.jsx(S.Button,{variant:"text",size:"medium",onClick:I,children:g("ra.action.cancel")}),s?f.jsx(GX,{onSubmit:s,closeDialog:I}):f.jsx(Mh,{type:"button"})]})}):null})})})]})}function KX(e){const t=T.useCallback(n=>{var r;n.preventDefault(),n.stopPropagation(),(r=e==null?void 0:e.onClick)==null||r.call(e)},[e]);return f.jsx(JC,{...e,onClick:t})}function XX(e){const{onSubmit:t,closeDialog:n}=e,{handleSubmit:r}=Qn.useFormContext(),o=T.useCallback(s=>{s.preventDefault(),s.stopPropagation(),r(a=>t(a,n))()},[r,t,n]);return f.jsx(Yu,{disableIconOnly:!0,onClick:o,color:"primary",variant:"contained",size:"medium",label:"ra.action.save"})}function ZX(e){const{children:t,maxWidth:n="md",fullWidth:r=!0,fullScreen:o,mutationOptions:s,onSubmit:a,scroll:c="body",...u}=e,d=re.useNotify(),[h,g]=T.useState(!1),m=T.Children.only(t),v=T.useCallback(()=>g(!0),[]),b=T.useCallback(()=>g(!1),[]),x=T.useCallback((I,F,E)=>{var k,P;b(),d("ra.notification.updated",{messageArgs:{smart_count:1},undoable:(e==null?void 0:e.mutationMode)==="undoable"}),(P=(k=e==null?void 0:e.mutationOptions)==null?void 0:k.onSuccess)==null||P.call(k,I,F,E)},[b,d,e.mutationOptions,e.mutationMode]),w=re.useRecordContext();return f.jsxs(f.Fragment,{children:[f.jsx(KX,{...u,onClick:v}),f.jsx(S.Dialog,{open:h,scroll:c,onClose:b,fullWidth:r,maxWidth:n,fullScreen:o,keepMounted:!1,children:f.jsx(S.DialogContent,{sx:{m:0,p:0},children:f.jsx(re.EditBase,{...e,id:w.id,mutationMode:"pessimistic",mutationOptions:{...s,onSuccess:x},children:T.isValidElement(m)?T.cloneElement(m,{...m.props,modal:!0,toolbar:f.jsxs(wi,{children:[f.jsx(Yu,{disableIconOnly:!0,variant:"text",size:"medium",onClick:b,label:"ra.action.cancel"}),a?f.jsx(XX,{onSubmit:a,closeDialog:b}):f.jsx(Mh,{type:"button"})]})}):null})})})]})}function QX({label:e="ra.auth.sign_in",...t}){const n=_.useRecordContext(),[r,o]=T.useState(!1),s=_.useAuthProvider(),a=T.useCallback(c=>{c.stopPropagation(),c.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return f.jsx(_.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(Fn.VpnKey,{})})}function JX({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:u,button:d,buttonProps:h,...g}){const{getCurrentDialog:m}=ng(),v=re.useResourceContext(g),b=m(),x=re.useRecordContext(),w=r||x,I=dt.get(w,e||"");return f.jsxs(S.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:F=>({pt:1,pb:1,borderBottom:`1px solid ${F.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[f.jsxs(S.Stack,{direction:"row",alignItems:"start",children:[c?T.isValidElement(c)?T.cloneElement(c,{style:Ku}):T.createElement(c,{style:Ku}):null,f.jsx(re.FieldTitle,{label:t,source:e,resource:b||v})]}),f.jsxs(S.Stack,{direction:"row",alignItems:"center",children:[a?T.isValidElement(a)?T.cloneElement(a,{record:w,resource:v,value:I}):T.createElement(a,{source:e,record:w,resource:v,value:I}):f.jsx(S.Typography,{variant:n,children:I}),u?T.isValidElement(u)?T.cloneElement(u,{style:Ku}):T.createElement(u,{style:Ku}):null,d?f.jsx(S.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...h,children:d}):null]})]})}const Ku={width:"1.5rem",alignSelf:"center"};function $T(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:u}=re.useListContext(e),d=re.useTranslate(),h=T.useCallback(()=>{u()},[u]);return f.jsx(qX,{className:r,children:f.jsxs(S.Toolbar,{"data-test":"bulk-actions-toolbar",className:lt(Er.toolbar,{[Er.collapsed]:c.length===0}),...re.sanitizeListRestProps(o),children:[f.jsxs("div",{className:Er.title,children:[f.jsx(S.IconButton,{className:Er.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:h,size:"small",children:f.jsx(Fn.Close,{fontSize:"small"})}),f.jsx(S.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:c.length})})]}),f.jsx(_.TopToolbar,{className:Er.topToolbar,children:T.Children.map(n,g=>T.isValidElement(g)?T.cloneElement(g,{filterValues:s,resource:a,selectedIds:c}):null)})]})})}const Ai="RaBulkActionsToolbar",Er={toolbar:`${Ai}-toolbar`,topToolbar:`${Ai}-topToolbar`,buttons:`${Ai}-buttons`,collapsed:`${Ai}-collapsed`,title:`${Ai}-title`,icon:`${Ai}-icon`},qX=pe("div",{name:Ai,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Er.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?Ip(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${Er.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Er.buttons}`]:{},[`& .${Er.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Er.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Er.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),Pg={p:0,m:0},eE={p:2,m:0,borderRadius:0,width:"100%"};function $X(e){const{children:t}=e,[n,r]=B.useState(null);function o(b){r(b.currentTarget)}function s(){r(null)}const a=S.useMediaQuery(b=>b.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:d=[],onUnselectItems:h}=_.useListContext(e),g=!!n&&d!==void 0&&d.length>0,m=g?"simple-popover":void 0,v=B.useCallback(()=>{h(),r(null)},[h,r]);return f.jsx(S.Fade,{in:d!==void 0&&d.length>0,children:f.jsxs(S.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(S.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),f.jsx(S.Popover,{id:m,open:g,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(S.List,{sx:Pg,children:[f.jsx(S.ListItem,{sx:Pg,children:f.jsx(_.Button,{onClick:v,sx:eE,label:"ra.action.unselect",startIcon:f.jsx(Lh,{}),children:f.jsx(Lh,{})})}),B.Children.map(t,b=>{var x;return f.jsx(S.ListItem,{sx:Pg,children:B.isValidElement(b)?B.cloneElement(b,{filterValues:c,resource:u,selectedIds:d,sx:eE,...(x=b.props)!=null&&x.popover?{closePopover:s}:{}}):null})})]})})]})})}const tE=T.createContext({});tE.displayName="DatagridContext";function eZ({children:e,value:t}){return f.jsx(tE.Provider,{value:t,children:e})}const nE=f.jsx(_.BulkDeleteButton,{}),rE=B.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?_.PureDatagridBody:_.DatagridBody,header:o=_.DatagridHeader,children:s,className:a,empty:c=rZ,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:h=nE,hover:g,isRowSelectable:m,isRowExpandable:v,resource:b,rowClick:x,rowSx:w,rowStyle:I,size:F="small",sx:E,expandSingle:k=!1,...P}=e,{sort:L,data:D,isLoading:Y,onSelect:Z,onToggleItem:ee,selectedIds:G,setSort:le,total:ae}=re.useListContext(e),q=!!h,J=T.useMemo(()=>({isRowExpandable:v,expandSingle:k}),[v,k]),z=T.useRef(null);T.useEffect(()=>{(!G||G.length===0)&&(z.current=null)},[JSON.stringify(G)]);const Q=T.useCallback((N,ne)=>{const W=D.map(de=>de.id),K=W.indexOf(z.current);if(z.current=ne.target.checked?N:null,ne.shiftKey&&K!==-1){const de=W.indexOf(N),he=W.slice(Math.min(K,de),Math.max(K,de)+1),fe=ne.target.checked?tU(G,he):mU(G,he);Z(m?fe.filter(ge=>m(D.find(ve=>ve.id===ge))):fe)}else ee(N)},[D,m,Z,ee,G]);return Y===!0?f.jsx(_.DatagridLoading,{className:a,expand:u,hasBulkActions:q,nbChildren:B.Children.count(s),size:F}):D==null||D.length===0||ae===0?c||null:f.jsx(eZ,{value:J,children:f.jsxs(_.DatagridRoot,{sx:E,className:lt(_.DatagridClasses.root,a),children:[d!=null&&T.isValidElement(d)?T.cloneElement(d,{selectedIds:G,total:ae}):h!==!1?f.jsx($T,{children:T.isValidElement(h)?h:nE}):null,f.jsx("div",{className:_.DatagridClasses.tableWrapper,children:f.jsxs(S.Table,{ref:t,className:_.DatagridClasses.table,size:F,...nZ(P),children:[oE(o,{children:s,sort:L,data:D,hasExpand:!!u,hasBulkActions:q,isRowSelectable:m,onSelect:Z,resource:b,selectedIds:G,setSort:le},s),oE(r,{expand:u,rowClick:x,data:D,hasBulkActions:q,hover:g,onToggleItem:Q,resource:b,rowSx:w,rowStyle:I,selectedIds:G,isRowSelectable:m},s)]})})]})})});function oE(e,t,n){return T.isValidElement(e)?T.cloneElement(e,t,n):T.createElement(e,t,n)}const tZ=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function nZ(e){return Object.keys(re.sanitizeListRestProps(e)).filter(t=>!tZ.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}rE.displayName="Datagrid";const rZ=f.jsx(_.ListNoResults,{}),oZ=pe(rE,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function iZ(e){return f.jsx(oZ,{...e})}const sZ=pe("div")(({theme:e})=>({padding:e.spacing(2)}));function aZ({actions:e,className:t,...n}){const{hasCreate:r}=re.useResourceDefinition(n),o=re.useResourceContext(n),s=re.useTranslate(),a=re.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),u=s("ra.page.empty",{name:c}),d=s("ra.page.invite");return f.jsxs(lZ,{className:t,children:[f.jsxs("div",{className:Ti.message,children:[f.jsx(Fn.Inbox,{className:Ti.icon}),f.jsx(S.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:u})}),r?f.jsx(S.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:d})}):null]}),f.jsx(sZ,{className:Ti.toolbar,children:e})]})}const Xu="ApplicaEmpty",Ti={message:`${Xu}-message`,icon:`${Xu}-icon`,toolbar:`${Xu}-toolbar`},lZ=pe("span",{name:Xu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${Ti.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Ti.icon}`]:{width:"9em",height:"9em"},[`& .${Ti.toolbar}`]:{textAlign:"center",marginTop:"2em"}})),cZ=f.jsx(_.ListActions,{}),uZ=f.jsx(_.Pagination,{}),dZ=f.jsx(_.Empty,{}),fZ=S.Card;function pZ(e){const{actions:t=cZ,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=uZ,children:u,className:d,component:h=fZ,title:g,empty:m=dZ,...v}=e,{defaultTitle:b,data:x,error:w,isLoading:I,filterValues:F,resource:E}=re.useListContext(e);if(!u||!x&&I&&s)return null;function k(){return f.jsxs("div",{className:zo.main,children:[r||t?f.jsx(_.ListToolbar,{className:zo.actions,filters:r,actions:t,hasCreate:a}):null,!w&&f.jsx(h,{className:zo.content,children:o&&u&&B.isValidElement(u)?T.cloneElement(u,{bulkActionButtons:o}):u}),w?f.jsx(Dh,{error:w,resetErrorBoundary:null}):c!==!1&&c]})}function P(){return m!==!1&&T.cloneElement(m,{className:zo.noResults,hasCreate:a})}const L=!I&&(x==null?void 0:x.length)===0&&!Object.keys(F).length&&m!==!1;return f.jsxs(hZ,{className:lt("list-page",d),...v,children:[f.jsx(_.Title,{title:g,defaultTitle:b,preferenceKey:`${E}.list.title`}),L?P():k(),n]})}const al="RaList",zo={main:`${al}-main`,content:`${al}-content`,actions:`${al}-actions`,noResults:`${al}-noResults`},hZ=pe("div",{name:al,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${zo.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${zo.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${zo.actions}`]:{},[`& .${zo.noResults}`]:{}}));function gZ({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=mZ,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:u,sort:d,storeKey:h,...g}){return f.jsx(re.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:u,sort:d,storeKey:h,children:f.jsx(pZ,{...g})})}const mZ={},vZ=Ma(gZ,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiInputLabel-root":{paddingTop:0},"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function yZ(e){return f.jsx(wr,{content:!1,children:f.jsx(vZ,{...e})})}function bZ(){const e=_.useRefresh(),t=_.useNotify(),n=_.useResourceContext(),r=_.useUnselectAll(n),{selectedIds:o,data:s}=_.useListContext(),a=_.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)),[u,{isLoading:d}]=_.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Ar().toISOString()},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return f.jsx(_.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:h,children:f.jsx(Fn.Email,{})})}function xZ(){const e=_.useRefresh(),t=_.useNotify(),n=_.useResourceContext(),r=_.useUnselectAll(n),{selectedIds:o,data:s}=_.useListContext(),a=_.useRecordContext(),c=o.map(g=>s.find(m=>m.id===g)).concat([a]),[u,{isLoading:d}]=_.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),h=T.useCallback(()=>{u()},[u]);return f.jsx(_.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:h,children:f.jsx(Fn.Drafts,{})})}function CZ(e){const t=_.useRecordContext(e),n=_.useResourceContext(e),r=_.useRedirect(),o=_.useNotify(),s=_.useTranslate(),[a]=_.useLocaleState(),c=T.useMemo(()=>t!=null&&t.readed?Ar(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=_.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Ar().toISOString()}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),d=T.useCallback(()=>u(),[u]);return f.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(S.Typography,{variant:"subtitle1",children:f.jsxs(S.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.jsx(S.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c?f.jsx(S.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})}):null]})}function wZ({...e}){const t=S.useTheme(),{mode:n,colorize:r,density:o}=T.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?S.darken:S.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function s(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return f.jsxs(_.Datagrid,{...e,rowSx:s,children:[f.jsx(CZ,{source:"notification",sortable:!1}),f.jsx(hS,{source:"created"}),f.jsxs(Fo,{children:[f.jsx(bZ,{}),f.jsx(xZ,{})]})]})}const SZ=pe(_.SimpleList,{name:"ApplicaSimpleList",slot:"root"})(({theme:e})=>({padding:e.spacing(1),paddingTop:0,paddingBottom:0}));function AZ({children:e}){const t=Kt();return f.jsx(wr,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,border:!1,boxShadow:!0,shadow:t.customShadows.z1,children:f.jsx(S.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function Zu({version:e,name:t,copy:n,children:r,logo:o,background:s=Jc,footer:a=!0}){return f.jsxs(S.Box,{children:[f.jsx(Tg,{source:"default"}),T.isValidElement(s)?s:T.createElement(s),f.jsxs(S.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(Eg,{title:t})}),f.jsxs(S.Grid,{item:!0,xs:12,children:[f.jsx(S.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:f.jsx(S.Grid,{item:!0,children:f.jsx(AZ,{children:r})})}),a?f.jsx(S.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:f.jsx(Ag,{name:t,copy:n,version:e})}):null]})]})]})}function TZ({name:e,copy:t,logo:n,version:r,background:o}){const s=re.useTranslate(),a=re.useAuthProvider(),c=re.useNotify(),u=ut.useNavigate(),{token:d}=ut.useParams();return T.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{c("ra.auth.activate_success",{type:"info"}),$.delay(()=>u("/login"),1e3)}).catch(h=>{c(h,{type:"error"}),$.delay(()=>u("/login"),1e3)})},[d,a,c,u]),f.jsx(Zu,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:s("ra.auth.activate")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})}function iE(){const e=T.useCallback(()=>location.reload(),[]);return f.jsx(S.Container,{children:f.jsxs(S.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{alt:"Error",src:j1,style:{width:"100%",maxWidth:450}}),f.jsx(S.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(S.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(S.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function sE({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:s=!1,redirectTo:a,background:c=f.jsx(Jc,{})}){const[u,d]=re.useSafeSetState(!1),h=re.useLogin(),g=re.useTranslate(),m=re.useNotify(),v=re.useCheckAuth(),b=ut.useNavigate();T.useEffect(()=>{v({},!1).then(()=>{b("/")}).catch(()=>{})},[v,b]);function x(w){d(!0),h(w,a).then(()=>{d(!1)}).catch(I=>{d(!1),m(typeof I=="string"?I:typeof I>"u"||!I.message?"ra.auth.sign_in_error":I.message,{type:"error",messageArgs:{_:typeof I=="string"?I:I&&I.message?I.message:void 0}})})}return f.jsx(Zu,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:"Login"}),s?f.jsx(S.Typography,{component:ut.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:g("ra.auth.register")}):null]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(re.Form,{onSubmit:x,children:[f.jsxs(S.Grid,{container:!0,children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Tr,{autoFocus:!0,source:"username",label:g("ra.auth.username"),autoComplete:"username",validate:re.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(Tr,{source:"password",label:g("ra.auth.password"),type:"password",autoComplete:"current-password",validate:re.required(),placeholder:g("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(S.Link,{variant:"h6",component:ut.Link,to:"/recover",color:"text.primary",children:g("ra.auth.forgot_password")})})}):null,f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?f.jsx(S.CircularProgress,{size:19,thickness:3}):g("ra.auth.sign_in")})})]})})]})})}function EZ({name:e,copy:t,logo:n,version:r,background:o}){const[s,a]=T.useState(!1),c=re.useTranslate(),u=re.useRedirect(),d=re.useNotify(),h=re.useAuthProvider();function g({email:m}){a(!0),h.recover(m).then(v=>{const b=`ra.auth.recover_${v.responseCode}`,x=v.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(v=>{d((v==null?void 0:v.message)||(v==null?void 0:v.toString()),{type:"error"})}).finally(()=>a(!1))}return f.jsx(Zu,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(_.Form,{onSubmit:g,children:[f.jsx(S.Grid,{container:!0,children:f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Tr,{source:"email",validate:[re.required(),re.email()]})})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(S.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(S.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})}function IZ({name:e,copy:t,version:n,logo:r,background:o}){const[s,a]=T.useState(!1),c=re.useTranslate(),u=re.useRedirect(),d=re.useNotify(),h=re.useAuthProvider();function g(m){a(!0),h.register(m).then(v=>{const b=`ra.auth.register_${v.responseCode}`,x=v.responseCode==="ok"?"info":"error";d(b,{type:x}),u("/login")}).catch(v=>{d(v,{type:"error"})}).finally(()=>a(!1))}return f.jsx(Zu,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(S.Grid,{container:!0,spacing:3,children:[f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(S.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(S.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(S.Typography,{component:ut.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(S.Grid,{item:!0,xs:12,children:f.jsxs(_.Form,{onSubmit:g,children:[f.jsxs(S.Grid,{container:!0,children:[f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Tr,{source:"name",label:c("ra.register.name"),validate:re.required()})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Tr,{source:"email",type:"email",validate:[re.required(),re.email()]})}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(Tr,{source:"password",type:"password",validate:re.required()})})]}),f.jsx(S.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(S.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(S.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})}function OZ(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function PZ(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function jZ(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(Ke.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function Ei({color:e,theme:t}){const n=Qt(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:tt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function MZ(e){const t=Ei({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":Ei({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Ei({color:"secondary",theme:e}),"&.MuiAlert-borderError":Ei({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Ei({color:"success",theme:e}),"&.MuiAlert-borderInfo":Ei({color:"info",theme:e}),"&.MuiAlert-borderWarning":Ei({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function kZ(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function FZ(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function Ii({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function LZ(e){const t=Ii({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Ii({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Ii({color:"secondary",theme:e}),"&.MuiBadge-colorError":Ii({color:"error",theme:e}),"&.MuiBadge-colorInfo":Ii({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Ii({color:"success",theme:e}),"&.MuiBadge-colorWarning":Ii({color:"warning",theme:e})}}}}}function Je({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,u=`${t}Button`,d=hs(n,u),h={"&::after":{boxShadow:`0 0 5px 5px ${tt(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${tt(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...h};case"shadow":return{color:c,backgroundColor:s,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...h};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...h};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...h};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...h}}}function DZ(e){const t=Je({variant:"dashed",color:"primary",theme:e}),n=Je({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":Je({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":Je({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":Je({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":Je({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":Je({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":Je({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":Je({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":Je({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":Je({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":Je({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":Je({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":Je({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:Je({variant:"contained",color:"primary",theme:e}),containedSecondary:Je({variant:"contained",color:"secondary",theme:e}),containedError:Je({variant:"contained",color:"error",theme:e}),containedSuccess:Je({variant:"contained",color:"success",theme:e}),containedInfo:Je({variant:"contained",color:"info",theme:e}),containedWarning:Je({variant:"contained",color:"warning",theme:e}),outlinedPrimary:Je({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:Je({variant:"outlined",color:"secondary",theme:e}),outlinedError:Je({variant:"outlined",color:"error",theme:e}),outlinedSuccess:Je({variant:"outlined",color:"success",theme:e}),outlinedInfo:Je({variant:"outlined",color:"info",theme:e}),outlinedWarning:Je({variant:"outlined",color:"warning",theme:e}),textPrimary:Je({variant:"text",color:"primary",theme:e}),textSecondary:Je({variant:"text",color:"secondary",theme:e}),textError:Je({variant:"text",color:"error",theme:e}),textSuccess:Je({variant:"text",color:"success",theme:e}),textInfo:Je({variant:"text",color:"info",theme:e}),textWarning:Je({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function RZ(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function _Z(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function BZ(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Rs({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function NZ(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function jg(e){const t=NZ(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function VZ(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ke.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ke.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...jg("small")},"&.size-medium":{...jg("medium")},"&.size-large":{...jg("large")}},colorPrimary:Rs({color:"primary",theme:e}),colorSecondary:Rs({color:"secondary",theme:e}),colorSuccess:Rs({color:"success",theme:e}),colorWarning:Rs({color:"warning",theme:e}),colorInfo:Rs({color:"info",theme:e}),colorError:Rs({color:"error",theme:e})}}}}function _s({color:e,theme:t}){const n=Qt(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function zn({color:e,theme:t}){const n=Qt(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function WZ(e){const t=zn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":_s({color:"primary",theme:e}),"&.MuiChip-colorSecondary":_s({color:"secondary",theme:e}),"&.MuiChip-colorError":_s({color:"error",theme:e}),"&.MuiChip-colorInfo":_s({color:"info",theme:e}),"&.MuiChip-colorSuccess":_s({color:"success",theme:e}),"&.MuiChip-colorWarning":_s({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":zn({color:"primary",theme:e}),"&.MuiChip-lightSecondary":zn({color:"secondary",theme:e}),"&.MuiChip-lightError":zn({color:"error",theme:e}),"&.MuiChip-lightInfo":zn({color:"info",theme:e}),"&.MuiChip-lightSuccess":zn({color:"success",theme:e}),"&.MuiChip-lightWarning":zn({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":zn({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":zn({color:"secondary",theme:e}),"&.MuiChip-combinedError":zn({color:"error",theme:e}),"&.MuiChip-combinedInfo":zn({color:"info",theme:e}),"&.MuiChip-combinedSuccess":zn({color:"success",theme:e}),"&.MuiChip-combinedWarning":zn({color:"warning",theme:e})}}}}}function zZ(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:tt("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function UZ(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function HZ(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function Bs({color:e,theme:t}){const n=Qt(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=hs(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${tt(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${tt(r,.9)}`}}}function GZ(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":Bs({color:"primary",theme:e}),"&.MuiFab-secondary":Bs({color:"secondary",theme:e}),"&.Mui-error":Bs({color:"error",theme:e}),"&.MuiFab-success":Bs({color:"success",theme:e}),"&.MuiFab-info":Bs({color:"info",theme:e}),"&.MuiFab-warning":Bs({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function YZ(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function KZ(e){return{MuiInputBase:{styleOverrides:{}}}}function XZ(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1.3em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function ZZ(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function QZ(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function JZ(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function qZ(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function $Z(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function eQ(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Oi({variant:e,theme:t}){const n=Qt(t,e),{light:r}=n,o=hs(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function tQ(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...Oi({variant:"primary",theme:e}),"&.Mui-error":{...Oi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Oi({variant:"secondary",theme:e}),colorError:Oi({variant:"error",theme:e}),colorWarning:Oi({variant:"warning",theme:e}),colorInfo:Oi({variant:"info",theme:e}),colorSuccess:Oi({variant:"success",theme:e})}}}}function nQ(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function St({variant:e,color:t,theme:n}){const r=Qt(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:u}=r,d={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:s},...d};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...d};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...d}}}function rQ(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":St({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":St({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":St({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":St({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":St({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":St({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":St({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":St({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":St({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":St({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":St({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":St({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":St({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":St({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":St({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":St({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":St({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":St({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":St({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":St({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":St({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":St({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":St({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":St({variant:"outlined",color:"warning",theme:e})}}}}}}function oQ(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function Ns({color:e,theme:t}){const n=Qt(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function iQ(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function Mg(e){const t=iQ(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function sQ(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(S.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.jsx(S.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...Mg("small")},"&.size-medium":{...Mg("medium")},"&.size-large":{...Mg("large")}},colorPrimary:Ns({color:"primary",theme:e}),colorSecondary:Ns({color:"secondary",theme:e}),colorSuccess:Ns({color:"success",theme:e}),colorWarning:Ns({color:"warning",theme:e}),colorInfo:Ns({color:"info",theme:e}),colorError:Ns({color:"error",theme:e})}}}}function Vs({color:e,theme:t}){const n=Qt(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function aQ(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":Vs({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":Vs({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":Vs({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":Vs({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":Vs({color:"info",theme:e}),"&.MuiSlider-thumbColorError":Vs({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function lQ(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function kg(e,t){const n=lQ(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function cQ(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...kg(e,"medium")},sizeLarge:{...kg(e,"large")},sizeSmall:{...kg(e,"small")}}}}}function uQ(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function dQ(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function fQ(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function pQ(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function hQ(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function gQ(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function mQ(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function vQ(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function yQ(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function bQ(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function xQ(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function CQ(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function wQ(e){return dt.merge(OZ(e),PZ(e),jZ(e),MZ(e),kZ(),FZ(e),LZ(e),DZ(e),RZ(),_Z(),BZ(),VZ(e),WZ(e),zZ(e),UZ(e),HZ(),GZ(e),YZ(e),KZ(),XZ(e),ZZ(),QZ(),JZ(e),qZ(e),$Z(),eQ(),tQ(e),nQ(),rQ(e),oQ(e),sQ(e),aQ(e),cQ(e),uQ(e),dQ(e),fQ(e),pQ(e),hQ(e),gQ(),mQ(),vQ(),yQ(e),bQ(e),xQ(),CQ())}function SQ(e){const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:u},grey:c}}function AQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function TQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function EQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function IQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function OQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function PQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function jQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function MQ(e,t){const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:d[0],light:d[1],main:d[2],dark:d[3],darker:d[4],contrastText:o},grey:r}}function kQ(e,t,n){switch(t){case"theme1":return AQ(e,n);case"theme2":return TQ(e,n);case"theme3":return EQ(e,n);case"theme4":return IQ(e,n);case"theme5":return OQ(e,n);case"theme6":return PQ(e,n);case"theme7":return jQ(e,n);case"theme8":return MQ(e,n);default:return SQ(e)}}var Fg=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Fg.primary=Fg[5];var Lg=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Lg.primary=Lg[5];var Dg=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Dg.primary=Dg[5];var Rg=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Rg.primary=Rg[5];var _g=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];_g.primary=_g[5];var Bg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Bg.primary=Bg[5];var Ng=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Ng.primary=Ng[5];var Vg=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Vg.primary=Vg[5];var Wg=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Wg.primary=Wg[5];var zg=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];zg.primary=zg[5];var Ug=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Ug.primary=Ug[5];var Hg=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Hg.primary=Hg[5];var Gg=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Gg.primary=Gg[5];var FQ={red:Fg,volcano:Lg,orange:Dg,gold:Rg,yellow:_g,lime:Bg,green:Ng,cyan:Vg,blue:Wg,geekblue:zg,purple:Ug,magenta:Hg,grey:Gg},Yg=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Yg.primary=Yg[5];var Kg=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Kg.primary=Kg[5];var Xg=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];Xg.primary=Xg[5];var Zg=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Zg.primary=Zg[5];var Qg=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Qg.primary=Qg[5];var Jg=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];Jg.primary=Jg[5];var qg=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];qg.primary=qg[5];var $g=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];$g.primary=$g[5];var em=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];em.primary=em[5];var tm=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];tm.primary=tm[5];var nm=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];nm.primary=nm[5];var rm=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];rm.primary=rm[5];var om=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];om.primary=om[5];var LQ={red:Yg,volcano:Kg,orange:Xg,gold:Zg,yellow:Qg,lime:Jg,green:qg,cyan:$g,blue:em,geekblue:tm,purple:nm,magenta:rm,grey:om};function DQ(e,t){const n=e==="dark"?LQ:FQ;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=kQ(n,t,e);return up({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?tt(a.grey[900],.87):a.grey[700],secondary:e==="dark"?tt(a.grey[900],.45):a.grey[500],disabled:e==="dark"?tt(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?tt(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function RQ(e){return{button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${tt(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${tt(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${tt(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${tt(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${tt(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${tt(e.palette.info.main,.2)}`,success:`0 0 0 2px ${tt(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${tt(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${tt(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${tt(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${tt(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${tt(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${tt(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${tt(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${tt(e.palette.grey[500],.2)}`}}function _Q(e){return{htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}}}function im({themeOverrides:e,children:t}){const n=Tn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=T.useMemo(()=>DQ(o,s),[o,s]),u=T.useMemo(()=>_Q(a),[a]),d=T.useMemo(()=>RQ(c),[c]),h=T.useMemo(()=>$.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:c.palette,customShadows:d,typography:u,shadows:c.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:c.spacing(2.6875),height:c.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(c):e),[r,c,u,d,e]),g=up(h),m=$.cloneDeep(g.components??{});return g.components=$.merge(wQ(g),m),f.jsx(S.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(Bx,{theme:g,children:[f.jsx(S.CssBaseline,{enableColorScheme:!0}),t]})})}function BQ({children:e,theme:t,...n}){return f.jsx(_.CoreAdminContext,{...n,children:f.jsx(im,{themeOverrides:t,children:f.jsx(JT,{children:e})})})}function aE(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:u,layout:d,loading:h,loginPage:g,authCallbackPage:m,menu:v,notification:b,queryClient:x,requireAuth:w,store:I=_.localStorageStore(),ready:F,theme:E,title:k="React Admin"}=e;return f.jsx(BQ,{authProvider:t,dataProvider:s,i18nProvider:u,store:I,history:c,queryClient:x,theme:E,children:f.jsx(_.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:v,catchAll:n,title:k,loading:h,loginPage:g,authCallbackPage:m,notification:b,requireAuth:w,ready:F,children:r})})}class lE{constructor({catch:t,display:n,log:r,error:o}){Ml(this,"catch");Ml(this,"display");Ml(this,"log");Ml(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}class NQ{constructor(t){yo(this,ll);yo(this,cl);yo(this,Ws,new Set);const{apiUrl:n}=t??{};if(!$.isString(n)||$.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");$o(this,cl,n),$o(this,ll,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;kn(this,Ws).has(a)||(kn(this,Ws).add(a),fetch(`${kn(this,cl)}/ui/error-log`,{method:"PUT",headers:kn(this,ll),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),kn(this,Ws).delete(a)}))}}ll=new WeakMap,cl=new WeakMap,Ws=new WeakMap;function VQ({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new lE({catch:s!=null,display:!1,log:s!=null,error:s}),...o}){const s=B.useMemo(()=>o.errorHandler?o.errorHandler:new NQ({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=B.useCallback(function(u,...d){var g;if(!u)return!1;const h=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return h.isCatched()||(h.logError()&&(u instanceof ErrorEvent?s.handle(u):s.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),h.displayError()&&a.apply(console,arguments)),!1},[r,s,a]);return B.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c,a]),!0}class WQ{constructor(t){yo(this,ul);yo(this,dl);yo(this,ji,[]);const{apiUrl:n}=t??{};if(!$.isString(n)||$.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");$o(this,dl,n),$o(this,ul,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!$.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!$.isString(n)||$.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!$.isString(r)||$.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!$.some(kn(this,ji),o=>$.isEqual(o,{code:n,lang:r}))){kn(this,ji).push({code:n,lang:r}),fetch(`${kn(this,dl)}/i18n/message`,{method:"put",headers:kn(this,ul),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),$o(this,ji,$.reject(kn(this,ji),s=>$.isEqual(s,{code:n,lang:r})))});return}}}ul=new WeakMap,dl=new WeakMap,ji=new WeakMap;function cE(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new WQ({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(s))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((m,v)=>({...m,[v.lang]:{...m[v.lang]||{},[v.code]:v.text}}),{}))}function h(g,m,v){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&($.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):c.handleMessage({code:g,lang:v}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[m,v]=g;function b(x){return $.get(v,x,{})}return E0(b,n,m,{allowMissing:r||o,onMissingKey:h})})}function zQ(e){const{defaultLocale:t,path:n}=e,r=[{locale:t,name:t}],o=new Headers({Accept:"application/json","Content-Type":"application/json"});function s(){return fetch(`${n}/languages.json`,{headers:o,method:"get"}).then(c=>c.json()).catch(()=>Promise.resolve(r))}function a(){return fetch(`${n}/messages.json`,{headers:o,method:"get"}).then(c=>c.json()).then(c=>c.reduce((u,d)=>({...u,[d.lang]:{...u[d.lang]||{},[d.code]:d.text}}),{}))}return Promise.all([s(),a()]).then(c=>{const[u,d]=c;function h(g){return $.get(d,g,{})}return E0(h,t,u,{allowMissing:!0})})}function UQ({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=T.useState({loading:!0,languages:null});return T.useEffect(()=>{const s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function uE(e){const[t,n]=T.useState(),r=tS(e);return T.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}cE(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const HQ=new Ui.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function GQ({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:s,logoIcon:a,loginPage:c=f.jsx(sE,{version:"0.0.0",name:"Applica",redirectTo:"/",background:f.jsx(Jc,{})}),menu:u,name:d,copy:h,version:g="0.0.0",dataProvider:m,authProvider:v,i18nProvider:b,errorHandler:x,error:w,enableNotification:I=!1,enableRegistration:F=!1,enablePasswordRecover:E=!1,enableThemeToggler:k=!1,enableLocaleSwitcher:P=!1,queryClient:L=HQ,background:D,notificationAPI:Y="entities/notification",...Z}){VQ({apiUrl:n,errorHandler:x,catcherFn:ae=>{const q=ae==null?void 0:ae.toString(),z=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(N=>q==null?void 0:q.includes(N));return new lE({catch:z,display:!z,log:!z&&o===!0,error:q})}});const ee=T.useMemo(()=>T.isValidElement(c)?T.cloneElement(c,{name:d,copy:h,logo:s,version:g,background:D,enableRegistration:F,enablePasswordRecover:E}):c,[c,d,g,h,D,s,F,E]),G=T.useMemo(()=>ae=>{const q=d?f.jsx(Eg,{title:d}):s,J=d?f.jsx(qT,{title:d}):a;return f.jsx(zT,{...ae,name:d,copy:h,version:g,logoMain:q,logoIcon:J,notification:Y,enableThemeToggler:k,enableNotification:I,enableLocaleSwitcher:P,error:w})},[s,a,d,h,g,w,Y,I,k,P]),le=uE({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:b});return le===void 0?f.jsx(f.Fragment,{}):le.error?f.jsx(eg,{initialConfig:t,children:f.jsx(im,{themeOverrides:e,children:f.jsx(iE,{})})}):f.jsx(EH,{children:f.jsx(Tw,{menu:u,children:f.jsx(eg,{initialConfig:t,children:f.jsx(aE,{theme:e,layout:G,notification:HT,queryClient:L,dataProvider:m,authProvider:v,i18nProvider:le,loginPage:ee,...Z})})})})}Object.defineProperty(M,"ArrayField",{enumerable:!0,get:()=>_.ArrayField}),Object.defineProperty(M,"ArrayInputContext",{enumerable:!0,get:()=>_.ArrayInputContext}),Object.defineProperty(M,"BooleanField",{enumerable:!0,get:()=>_.BooleanField}),Object.defineProperty(M,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>_.BulkDeleteWithConfirmButton}),Object.defineProperty(M,"ChipField",{enumerable:!0,get:()=>_.ChipField}),Object.defineProperty(M,"Confirm",{enumerable:!0,get:()=>_.Confirm}),Object.defineProperty(M,"CreateButton",{enumerable:!0,get:()=>_.CreateButton}),Object.defineProperty(M,"CreateContextProvider",{enumerable:!0,get:()=>_.CreateContextProvider}),Object.defineProperty(M,"CustomRoutes",{enumerable:!0,get:()=>_.CustomRoutes}),Object.defineProperty(M,"DeleteWithConfirmButton",{enumerable:!0,get:()=>_.DeleteWithConfirmButton}),Object.defineProperty(M,"DeleteWithUndoButton",{enumerable:!0,get:()=>_.DeleteWithUndoButton}),Object.defineProperty(M,"EditButton",{enumerable:!0,get:()=>_.EditButton}),Object.defineProperty(M,"EditContextProvider",{enumerable:!0,get:()=>_.EditContextProvider}),Object.defineProperty(M,"FieldTitle",{enumerable:!0,get:()=>_.FieldTitle}),Object.defineProperty(M,"FilterButton",{enumerable:!0,get:()=>_.FilterButton}),Object.defineProperty(M,"Form",{enumerable:!0,get:()=>_.Form}),Object.defineProperty(M,"FormDataConsumer",{enumerable:!0,get:()=>_.FormDataConsumer}),Object.defineProperty(M,"HttpError",{enumerable:!0,get:()=>_.HttpError}),Object.defineProperty(M,"I18nContextProvider",{enumerable:!0,get:()=>_.I18nContextProvider}),Object.defineProperty(M,"ListBase",{enumerable:!0,get:()=>_.ListBase}),Object.defineProperty(M,"ListToolbar",{enumerable:!0,get:()=>_.ListToolbar}),Object.defineProperty(M,"LoadingIndicator",{enumerable:!0,get:()=>_.LoadingIndicator}),Object.defineProperty(M,"Pagination",{enumerable:!0,get:()=>_.Pagination}),Object.defineProperty(M,"RaSimpleFormIterator",{enumerable:!0,get:()=>_.SimpleFormIterator}),Object.defineProperty(M,"RecordContextProvider",{enumerable:!0,get:()=>_.RecordContextProvider}),Object.defineProperty(M,"ReferenceArrayField",{enumerable:!0,get:()=>_.ReferenceArrayField}),Object.defineProperty(M,"ReferenceField",{enumerable:!0,get:()=>_.ReferenceField}),Object.defineProperty(M,"Resource",{enumerable:!0,get:()=>_.Resource}),Object.defineProperty(M,"ResourceContextProvider",{enumerable:!0,get:()=>_.ResourceContextProvider}),Object.defineProperty(M,"SaveButton",{enumerable:!0,get:()=>_.SaveButton}),Object.defineProperty(M,"SimpleFormIteratorContext",{enumerable:!0,get:()=>_.SimpleFormIteratorContext}),Object.defineProperty(M,"SimpleShowLayout",{enumerable:!0,get:()=>_.SimpleShowLayout}),Object.defineProperty(M,"SingleFieldList",{enumerable:!0,get:()=>_.SingleFieldList}),Object.defineProperty(M,"TabbedFormTabs",{enumerable:!0,get:()=>_.TabbedFormTabs}),Object.defineProperty(M,"TopToolbar",{enumerable:!0,get:()=>_.TopToolbar}),Object.defineProperty(M,"UrlField",{enumerable:!0,get:()=>_.UrlField}),Object.defineProperty(M,"ValidationError",{enumerable:!0,get:()=>_.ValidationError}),Object.defineProperty(M,"choices",{enumerable:!0,get:()=>_.choices}),Object.defineProperty(M,"email",{enumerable:!0,get:()=>_.email}),Object.defineProperty(M,"maxLength",{enumerable:!0,get:()=>_.maxLength}),Object.defineProperty(M,"maxValue",{enumerable:!0,get:()=>_.maxValue}),Object.defineProperty(M,"minLength",{enumerable:!0,get:()=>_.minLength}),Object.defineProperty(M,"minValue",{enumerable:!0,get:()=>_.minValue}),Object.defineProperty(M,"number",{enumerable:!0,get:()=>_.number}),Object.defineProperty(M,"regex",{enumerable:!0,get:()=>_.regex}),Object.defineProperty(M,"required",{enumerable:!0,get:()=>_.required}),Object.defineProperty(M,"useArrayInput",{enumerable:!0,get:()=>_.useArrayInput}),Object.defineProperty(M,"useAuthProvider",{enumerable:!0,get:()=>_.useAuthProvider}),Object.defineProperty(M,"useChoices",{enumerable:!0,get:()=>_.useChoices}),Object.defineProperty(M,"useChoicesContext",{enumerable:!0,get:()=>_.useChoicesContext}),Object.defineProperty(M,"useCreate",{enumerable:!0,get:()=>_.useCreate}),Object.defineProperty(M,"useCreateContext",{enumerable:!0,get:()=>_.useCreateContext}),Object.defineProperty(M,"useCreateController",{enumerable:!0,get:()=>_.useCreateController}),Object.defineProperty(M,"useCreateSuggestionContext",{enumerable:!0,get:()=>_.useCreateSuggestionContext}),Object.defineProperty(M,"useDataProvider",{enumerable:!0,get:()=>_.useDataProvider}),Object.defineProperty(M,"useEditContext",{enumerable:!0,get:()=>_.useEditContext}),Object.defineProperty(M,"useEditController",{enumerable:!0,get:()=>_.useEditController}),Object.defineProperty(M,"useGetIdentity",{enumerable:!0,get:()=>_.useGetIdentity}),Object.defineProperty(M,"useGetList",{enumerable:!0,get:()=>_.useGetList}),Object.defineProperty(M,"useGetMany",{enumerable:!0,get:()=>_.useGetMany}),Object.defineProperty(M,"useGetManyReference",{enumerable:!0,get:()=>_.useGetManyReference}),Object.defineProperty(M,"useGetOne",{enumerable:!0,get:()=>_.useGetOne}),Object.defineProperty(M,"useInput",{enumerable:!0,get:()=>_.useInput}),Object.defineProperty(M,"useListContext",{enumerable:!0,get:()=>_.useListContext}),Object.defineProperty(M,"useListController",{enumerable:!0,get:()=>_.useListController}),Object.defineProperty(M,"useLocaleState",{enumerable:!0,get:()=>_.useLocaleState}),Object.defineProperty(M,"useLocales",{enumerable:!0,get:()=>_.useLocales}),Object.defineProperty(M,"useNotify",{enumerable:!0,get:()=>_.useNotify}),Object.defineProperty(M,"usePermissions",{enumerable:!0,get:()=>_.usePermissions}),Object.defineProperty(M,"useRecordContext",{enumerable:!0,get:()=>_.useRecordContext}),Object.defineProperty(M,"useRefresh",{enumerable:!0,get:()=>_.useRefresh}),Object.defineProperty(M,"useRemoveFromStore",{enumerable:!0,get:()=>_.useRemoveFromStore}),Object.defineProperty(M,"useResetStore",{enumerable:!0,get:()=>_.useResetStore}),Object.defineProperty(M,"useResourceContext",{enumerable:!0,get:()=>_.useResourceContext}),Object.defineProperty(M,"useResourceDefinition",{enumerable:!0,get:()=>_.useResourceDefinition}),Object.defineProperty(M,"useResourceDefinitions",{enumerable:!0,get:()=>_.useResourceDefinitions}),Object.defineProperty(M,"useShowContext",{enumerable:!0,get:()=>_.useShowContext}),Object.defineProperty(M,"useShowController",{enumerable:!0,get:()=>_.useShowController}),Object.defineProperty(M,"useSimpleFormIterator",{enumerable:!0,get:()=>_.useSimpleFormIterator}),Object.defineProperty(M,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>_.useSimpleFormIteratorItem}),Object.defineProperty(M,"useStore",{enumerable:!0,get:()=>_.useStore}),Object.defineProperty(M,"useStoreContext",{enumerable:!0,get:()=>_.useStoreContext}),Object.defineProperty(M,"useTranslate",{enumerable:!0,get:()=>_.useTranslate}),Object.defineProperty(M,"useTranslateLabel",{enumerable:!0,get:()=>_.useTranslateLabel}),Object.defineProperty(M,"useUnselect",{enumerable:!0,get:()=>_.useUnselect}),Object.defineProperty(M,"useUnselectAll",{enumerable:!0,get:()=>_.useUnselectAll}),Object.defineProperty(M,"useUpdate",{enumerable:!0,get:()=>_.useUpdate}),Object.defineProperty(M,"useUpdateMany",{enumerable:!0,get:()=>_.useUpdateMany}),Object.defineProperty(M,"withLifecycleCallbacks",{enumerable:!0,get:()=>_.withLifecycleCallbacks}),M.ActionsField=PH,M.ActionsMenu=Fo,M.ActivatePage=TZ,M.AddTableRow=ug,M.Admin=aE,M.AnimateButton=Hj,M.AppBarStyled=TT,M.ApplicaAdmin=GQ,M.ArrayInput=OH,M.AttachmentField=uS,M.AttachmentInput=eG,M.AuthBackground=Jc,M.AutocompleteArrayInput=nG,M.AutocompleteInput=oG,M.Avatar=Lc,M.BooleanInput=sG,M.Breadcrumbs=Qx,M.BulkActionsToolbar=$T,M.BulkFloatingActionsToolbar=$X,M.Button=Yu,M.CardForm=rS,M.ChangePasswordForm=rg,M.CircularWithLabel=Y2,M.CircularWithPath=K2,M.CoverField=fS,M.Create=RG,M.CreateInDialogButton=YX,M.Datagrid=iZ,M.DateAgoField=hS,M.DateField=BH,M.DateInput=cG,M.DateTimeInput=dG,M.Dot=Dp,M.Drawer=AT,M.DrawerHeader=iA,M.DrawerHeaderStyled=rA,M.DrawerToggle=OT,M.Edit=NG,M.EditInDialogButton=ZX,M.EmailField=VH,M.Empty=aZ,M.EmptyClasses=Ti,M.Error=Dh,M.Field=ZS,M.FileField=gS,M.FileInput=pG,M.Footer=Ag,M.FormHeader=zG,M.FunctionField=zH,M.GenericErrorPage=iE,M.Header=PT,M.HeaderButton=ET,M.HeaderIconButton=gX,M.HeaderNotification=jT,M.HeaderProfile=MT,M.HeaderSpacer=FT,M.HeaderToggleButton=Ls,M.HorizontalBar=LT,M.IconButton=Nc,M.ImageField=dS,M.ImageInput=hG,M.ImpersonateUserButton=QX,M.LabeledArrayInput=lS,M.LabeledInput=fn,M.Layout=zT,M.LayoutContent=nA,M.LayoutProvider=$S,M.LayoutWrapper=WT,M.LinearWithIcon=X2,M.LinearWithLabel=Z2,M.List=yZ,M.ListItem=JX,M.Loadable=EX,M.Loader=UT,M.LoadingButton=z2,M.LocalStorage=Zw,M.LocaleButton=IT,M.LocalizedTextField=HH,M.LocalizedTextInput=vG,M.LoginPage=sE,M.Logo=oA,M.LongForm=Ft,M.MainCard=wr,M.MainIcon=Eg,M.MenuConfigProvider=Tw,M.MenuPopover=P1,M.NavCollapse=il,M.NavGroup=_T,M.NavItem=ol,M.NavList=BT,M.NavMenu=DT,M.Navigation=NT,M.Notification=HT,M.NotificationList=wZ,M.NumberInput=bG,M.OnboardingActionType=Ds,M.OnboardingContext=Ig,M.OnboardingModes=sl,M.OnboardingProvider=kX,M.OnboardingTip=RX,M.PopupTransition=G2,M.ReadonlyField=XH,M.RecordInput=xG,M.RecoverPage=EZ,M.ReferenceArrayInput=CG,M.ReferenceInput=wG,M.ReferenceManyField=vS,M.ReferenceManyInput=SG,M.RegisterPage=IZ,M.ResponsiveSection=kT,M.ScrollTop=JT,M.ScrollX=_X,M.SearchInput=TG,M.SelectArrayInput=IG,M.SelectInput=PG,M.Show=oY,M.SimpleBar=ST,M.SimpleForm=oS,M.SimpleFormIterator=sY,M.SimpleList=SZ,M.SizeField=JH,M.SmallIcon=qT,M.SmartTextInput=jG,M.StyledArrow=I1,M.TabbedForm=cg,M.TableFormIterator=Ru,M.TableFormIteratorContext=fg,M.TableFormIteratorItem=JS,M.TableFormIteratorItemContext=dg,M.TextField=mS,M.TextInput=Tr,M.ThemeColor=Tg,M.ThemeContext=$h,M.ThemeCustomizationProvider=im,M.ThemeProvider=eg,M.ThemeToggler=VT,M.TimeInput=LG,M.Toolbar=wi,M.Tooltip=Qc,M.Transitions=hi,M.createI18nProvider=cE,M.createJsonI18nProvider=zQ,M.getLocalizedValue=Qh,M.getPosition=O1,M.getThemeColor=Qt,M.getThemeShadow=hs,M.localizedValueHasAllLocales=ku,M.localizedValueHasAtLeastOneLocale=Qw,M.onboardingModesSchema=YT,M.onboardingTopicSchema=GT,M.parseTime=$w,M.useBreadcrumbs=Ew,M.useGetLocalizedValue=yH,M.useI18nLanguages=UQ,M.useI18nProvider=uE,M.useLayoutContext=pg,M.useLayoutDispatch=pY,M.useLayoutDrawerState=Si,M.useLayoutLogoState=tA,M.useLayoutMediaState=Nn,M.useLayoutNotificationsState=_u,M.useLayoutState=Ps,M.useLayoutThemeState=hY,M.useLocalStorage=Jh,M.useLocalizedValue=vH,M.useMemoizedObject=tS,M.useMenu=_h,M.useMenuConfig=Za,M.useMenuContext=Au,M.useOnboardingDataProvider=KT,M.useOnboardingTip=QT,M.usePopoverState=Ja,M.useRefDimensions=bH,M.useResourceDefaultValues=_G,M.useResourceTitle=qh,M.useRestartOnboarding=LX,M.useSx=Sr,M.useTableFormIterator=QS,M.useTableFormIteratorItem=XS,M.useThemeConfig=Tn,M.useThemeContext=tg,M.uuid=EU,M.withLayoutProvider=eA,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
|
217
217
|
//# sourceMappingURL=react-admin.umd.js.map
|