@applica-software-guru/react-admin 1.5.330 → 1.5.332
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-lists/List.d.ts.map +1 -1
- package/dist/i18n/createI18nProvider.d.ts +2 -1
- package/dist/i18n/createI18nProvider.d.ts.map +1 -1
- package/dist/i18n/en.json +8 -0
- package/{public/i18n/messages.json → dist/i18n/it.json} +446 -446
- package/dist/i18n/it.json.gz +0 -0
- 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 +18 -12
- 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/public/i18n/en.json +8 -0
- package/{dist/i18n/messages.json → public/i18n/it.json} +446 -446
- package/src/components/ra-lists/List.tsx +3 -1
- package/src/i18n/createI18nProvider.tsx +24 -19
- package/src/playground/App.jsx +12 -1
- package/dist/i18n/languages.json +0 -1
- package/dist/i18n/messages.json.gz +0 -0
- package/public/i18n/languages.json +0 -1
package/dist/react-admin.cjs.js
CHANGED
|
@@ -235,5 +235,5 @@ attempted value: ${a}
|
|
|
235
235
|
* derived from CryptoJS.mode.CTR
|
|
236
236
|
* Jan Hruby jhruby.web@gmail.com
|
|
237
237
|
*/return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function o(l){if((l>>24&255)===255){var u=l>>16&255,d=l>>8&255,f=l&255;u===255?(u=0,d===255?(d=0,f===255?f=0:++f):++d):++u,l=0,l+=u<<16,l+=d<<8,l+=f}else l+=1<<24;return l}function i(l){return(l[0]=o(l[0]))===0&&(l[1]=o(l[1])),l}var a=r.Encryptor=r.extend({processBlock:function(l,u){var d=this._cipher,f=d.blockSize,g=this._iv,h=this._counter;g&&(h=this._counter=g.slice(0),this._iv=void 0),i(h);var m=h.slice(0);d.encryptBlock(m,0);for(var y=0;y<f;y++)l[u+y]^=m[y]}});return r.Decryptor=a,r}(),n.mode.CTRGladman})}(zC)),zC.exports}var HC={exports:{}},GC;function kne(){return GC||(GC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),o=r.Encryptor=r.extend({processBlock:function(i,a){var l=this._cipher,u=l.blockSize,d=this._iv,f=this._keystream;d&&(f=this._keystream=d.slice(0),this._iv=void 0),l.encryptBlock(f,0);for(var g=0;g<u;g++)i[a+g]^=f[g]}});return r.Decryptor=o,r}(),n.mode.OFB})}(HC)),HC.exports}var qC={exports:{}},YC;function Mne(){return YC||(YC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(o,i){this._cipher.encryptBlock(o,i)}}),r.Decryptor=r.extend({processBlock:function(o,i){this._cipher.decryptBlock(o,i)}}),r}(),n.mode.ECB})}(qC)),qC.exports}var KC={exports:{}},XC;function _ne(){return XC||(XC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return n.pad.AnsiX923={pad:function(r,o){var i=r.sigBytes,a=o*4,l=a-i%a,u=i+l-1;r.clamp(),r.words[u>>>2]|=l<<24-u%4*8,r.sigBytes+=l},unpad:function(r){var o=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=o}},n.pad.Ansix923})}(KC)),KC.exports}var ZC={exports:{}},QC;function Dne(){return QC||(QC=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return n.pad.Iso10126={pad:function(r,o){var i=o*4,a=i-r.sigBytes%i;r.concat(n.lib.WordArray.random(a-1)).concat(n.lib.WordArray.create([a<<24],1))},unpad:function(r){var o=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=o}},n.pad.Iso10126})}(ZC)),ZC.exports}var JC={exports:{}},ew;function Fne(){return ew||(ew=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return n.pad.Iso97971={pad:function(r,o){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,o)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(JC)),JC.exports}var tw={exports:{}},nw;function Bne(){return nw||(nw=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return n.pad.ZeroPadding={pad:function(r,o){var i=o*4;r.clamp(),r.sigBytes+=i-(r.sigBytes%i||i)},unpad:function(r){for(var o=r.words,i=r.sigBytes-1;!(o[i>>>2]>>>24-i%4*8&255);)i--;r.sigBytes=i+1}},n.pad.ZeroPadding})}(tw)),tw.exports}var rw={exports:{}},ow;function Lne(){return ow||(ow=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(rw)),rw.exports}var iw={exports:{}},sw;function Nne(){return sw||(sw=1,function(e,t){(function(n,r,o){e.exports=r(rt(),pn())})(et,function(n){return function(r){var o=n,i=o.lib,a=i.CipherParams,l=o.enc,u=l.Hex,d=o.format;d.Hex={stringify:function(f){return f.ciphertext.toString(u)},parse:function(f){var g=u.parse(f);return a.create({ciphertext:g})}}}(),n.format.Hex})}(iw)),iw.exports}var aw={exports:{}},lw;function $ne(){return lw||(lw=1,function(e,t){(function(n,r,o){e.exports=r(rt(),xa(),Ca(),es(),pn())})(et,function(n){return function(){var r=n,o=r.lib,i=o.BlockCipher,a=r.algo,l=[],u=[],d=[],f=[],g=[],h=[],m=[],y=[],b=[],C=[];(function(){for(var S=[],T=0;T<256;T++)T<128?S[T]=T<<1:S[T]=T<<1^283;for(var O=0,R=0,T=0;T<256;T++){var k=R^R<<1^R<<2^R<<3^R<<4;k=k>>>8^k&255^99,l[O]=k,u[k]=O;var F=S[O],N=S[F],M=S[N],D=S[k]*257^k*16843008;d[O]=D<<24|D>>>8,f[O]=D<<16|D>>>16,g[O]=D<<8|D>>>24,h[O]=D;var D=M*16843009^N*65537^F*257^O*16843008;m[k]=D<<24|D>>>8,y[k]=D<<16|D>>>16,b[k]=D<<8|D>>>24,C[k]=D,O?(O=F^S[S[S[M^F]]],R^=S[S[R]]):O=R=1}})();var A=[0,1,2,4,8,16,32,64,128,27,54],I=a.AES=i.extend({_doReset:function(){if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var S=this._keyPriorReset=this._key,T=S.words,O=S.sigBytes/4,R=this._nRounds=O+6,k=(R+1)*4,F=this._keySchedule=[],N=0;N<k;N++)if(N<O)F[N]=T[N];else{var M=F[N-1];N%O?O>6&&N%O==4&&(M=l[M>>>24]<<24|l[M>>>16&255]<<16|l[M>>>8&255]<<8|l[M&255]):(M=M<<8|M>>>24,M=l[M>>>24]<<24|l[M>>>16&255]<<16|l[M>>>8&255]<<8|l[M&255],M^=A[N/O|0]<<24),F[N]=F[N-O]^M}for(var D=this._invKeySchedule=[],U=0;U<k;U++){var N=k-U;if(U%4)var M=F[N];else var M=F[N-4];U<4||N<=4?D[U]=M:D[U]=m[l[M>>>24]]^y[l[M>>>16&255]]^b[l[M>>>8&255]]^C[l[M&255]]}}},encryptBlock:function(S,T){this._doCryptBlock(S,T,this._keySchedule,d,f,g,h,l)},decryptBlock:function(S,T){var O=S[T+1];S[T+1]=S[T+3],S[T+3]=O,this._doCryptBlock(S,T,this._invKeySchedule,m,y,b,C,u);var O=S[T+1];S[T+1]=S[T+3],S[T+3]=O},_doCryptBlock:function(S,T,O,R,k,F,N,M){for(var D=this._nRounds,U=S[T]^O[0],G=S[T+1]^O[1],H=S[T+2]^O[2],Y=S[T+3]^O[3],V=4,X=1;X<D;X++){var W=R[U>>>24]^k[G>>>16&255]^F[H>>>8&255]^N[Y&255]^O[V++],ie=R[G>>>24]^k[H>>>16&255]^F[Y>>>8&255]^N[U&255]^O[V++],K=R[H>>>24]^k[Y>>>16&255]^F[U>>>8&255]^N[G&255]^O[V++],$=R[Y>>>24]^k[U>>>16&255]^F[G>>>8&255]^N[H&255]^O[V++];U=W,G=ie,H=K,Y=$}var W=(M[U>>>24]<<24|M[G>>>16&255]<<16|M[H>>>8&255]<<8|M[Y&255])^O[V++],ie=(M[G>>>24]<<24|M[H>>>16&255]<<16|M[Y>>>8&255]<<8|M[U&255])^O[V++],K=(M[H>>>24]<<24|M[Y>>>16&255]<<16|M[U>>>8&255]<<8|M[G&255])^O[V++],$=(M[Y>>>24]<<24|M[U>>>16&255]<<16|M[G>>>8&255]<<8|M[H&255])^O[V++];S[T]=W,S[T+1]=ie,S[T+2]=K,S[T+3]=$},keySize:256/32});r.AES=i._createHelper(I)}(),n.AES})}(aw)),aw.exports}var cw={exports:{}},uw;function Vne(){return uw||(uw=1,function(e,t){(function(n,r,o){e.exports=r(rt(),xa(),Ca(),es(),pn())})(et,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,a=o.BlockCipher,l=r.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],d=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],m=l.DES=a.extend({_doReset:function(){for(var A=this._key,I=A.words,S=[],T=0;T<56;T++){var O=u[T]-1;S[T]=I[O>>>5]>>>31-O%32&1}for(var R=this._subKeys=[],k=0;k<16;k++){for(var F=R[k]=[],N=f[k],T=0;T<24;T++)F[T/6|0]|=S[(d[T]-1+N)%28]<<31-T%6,F[4+(T/6|0)]|=S[28+(d[T+24]-1+N)%28]<<31-T%6;F[0]=F[0]<<1|F[0]>>>31;for(var T=1;T<7;T++)F[T]=F[T]>>>(T-1)*4+3;F[7]=F[7]<<5|F[7]>>>27}for(var M=this._invSubKeys=[],T=0;T<16;T++)M[T]=R[15-T]},encryptBlock:function(A,I){this._doCryptBlock(A,I,this._subKeys)},decryptBlock:function(A,I){this._doCryptBlock(A,I,this._invSubKeys)},_doCryptBlock:function(A,I,S){this._lBlock=A[I],this._rBlock=A[I+1],y.call(this,4,252645135),y.call(this,16,65535),b.call(this,2,858993459),b.call(this,8,16711935),y.call(this,1,1431655765);for(var T=0;T<16;T++){for(var O=S[T],R=this._lBlock,k=this._rBlock,F=0,N=0;N<8;N++)F|=g[N][((k^O[N])&h[N])>>>0];this._lBlock=k,this._rBlock=R^F}var M=this._lBlock;this._lBlock=this._rBlock,this._rBlock=M,y.call(this,1,1431655765),b.call(this,8,16711935),b.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),A[I]=this._lBlock,A[I+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function y(A,I){var S=(this._lBlock>>>A^this._rBlock)&I;this._rBlock^=S,this._lBlock^=S<<A}function b(A,I){var S=(this._rBlock>>>A^this._lBlock)&I;this._lBlock^=S,this._rBlock^=S<<A}r.DES=a._createHelper(m);var C=l.TripleDES=a.extend({_doReset:function(){var A=this._key,I=A.words;this._des1=m.createEncryptor(i.create(I.slice(0,2))),this._des2=m.createEncryptor(i.create(I.slice(2,4))),this._des3=m.createEncryptor(i.create(I.slice(4,6)))},encryptBlock:function(A,I){this._des1.encryptBlock(A,I),this._des2.decryptBlock(A,I),this._des3.encryptBlock(A,I)},decryptBlock:function(A,I){this._des3.decryptBlock(A,I),this._des2.encryptBlock(A,I),this._des1.decryptBlock(A,I)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=a._createHelper(C)}(),n.TripleDES})}(cw)),cw.exports}var dw={exports:{}},fw;function Wne(){return fw||(fw=1,function(e,t){(function(n,r,o){e.exports=r(rt(),xa(),Ca(),es(),pn())})(et,function(n){return function(){var r=n,o=r.lib,i=o.StreamCipher,a=r.algo,l=a.RC4=i.extend({_doReset:function(){for(var f=this._key,g=f.words,h=f.sigBytes,m=this._S=[],y=0;y<256;y++)m[y]=y;for(var y=0,b=0;y<256;y++){var C=y%h,A=g[C>>>2]>>>24-C%4*8&255;b=(b+m[y]+A)%256;var I=m[y];m[y]=m[b],m[b]=I}this._i=this._j=0},_doProcessBlock:function(f,g){f[g]^=u.call(this)},keySize:256/32,ivSize:0});function u(){for(var f=this._S,g=this._i,h=this._j,m=0,y=0;y<4;y++){g=(g+1)%256,h=(h+f[g])%256;var b=f[g];f[g]=f[h],f[h]=b,m|=f[(f[g]+f[h])%256]<<24-y*8}return this._i=g,this._j=h,m}r.RC4=i._createHelper(l);var d=a.RC4Drop=l.extend({cfg:l.cfg.extend({drop:192}),_doReset:function(){l._doReset.call(this);for(var f=this.cfg.drop;f>0;f--)u.call(this)}});r.RC4Drop=i._createHelper(d)}(),n.RC4})}(dw)),dw.exports}var pw={exports:{}},hw;function zne(){return hw||(hw=1,function(e,t){(function(n,r,o){e.exports=r(rt(),xa(),Ca(),es(),pn())})(et,function(n){return function(){var r=n,o=r.lib,i=o.StreamCipher,a=r.algo,l=[],u=[],d=[],f=a.Rabbit=i.extend({_doReset:function(){for(var h=this._key.words,m=this.cfg.iv,y=0;y<4;y++)h[y]=(h[y]<<8|h[y]>>>24)&16711935|(h[y]<<24|h[y]>>>8)&4278255360;var b=this._X=[h[0],h[3]<<16|h[2]>>>16,h[1],h[0]<<16|h[3]>>>16,h[2],h[1]<<16|h[0]>>>16,h[3],h[2]<<16|h[1]>>>16],C=this._C=[h[2]<<16|h[2]>>>16,h[0]&4294901760|h[1]&65535,h[3]<<16|h[3]>>>16,h[1]&4294901760|h[2]&65535,h[0]<<16|h[0]>>>16,h[2]&4294901760|h[3]&65535,h[1]<<16|h[1]>>>16,h[3]&4294901760|h[0]&65535];this._b=0;for(var y=0;y<4;y++)g.call(this);for(var y=0;y<8;y++)C[y]^=b[y+4&7];if(m){var A=m.words,I=A[0],S=A[1],T=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,O=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,R=T>>>16|O&4294901760,k=O<<16|T&65535;C[0]^=T,C[1]^=R,C[2]^=O,C[3]^=k,C[4]^=T,C[5]^=R,C[6]^=O,C[7]^=k;for(var y=0;y<4;y++)g.call(this)}},_doProcessBlock:function(h,m){var y=this._X;g.call(this),l[0]=y[0]^y[5]>>>16^y[3]<<16,l[1]=y[2]^y[7]>>>16^y[5]<<16,l[2]=y[4]^y[1]>>>16^y[7]<<16,l[3]=y[6]^y[3]>>>16^y[1]<<16;for(var b=0;b<4;b++)l[b]=(l[b]<<8|l[b]>>>24)&16711935|(l[b]<<24|l[b]>>>8)&4278255360,h[m+b]^=l[b]},blockSize:128/32,ivSize:64/32});function g(){for(var h=this._X,m=this._C,y=0;y<8;y++)u[y]=m[y];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<u[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<u[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<u[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<u[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<u[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<u[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<u[6]>>>0?1:0)|0,this._b=m[7]>>>0<u[7]>>>0?1:0;for(var y=0;y<8;y++){var b=h[y]+m[y],C=b&65535,A=b>>>16,I=((C*C>>>17)+C*A>>>15)+A*A,S=((b&4294901760)*b|0)+((b&65535)*b|0);d[y]=I^S}h[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,h[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,h[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,h[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,h[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,h[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,h[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,h[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.Rabbit=i._createHelper(f)}(),n.Rabbit})}(pw)),pw.exports}var gw={exports:{}},mw;function Une(){return mw||(mw=1,function(e,t){(function(n,r,o){e.exports=r(rt(),xa(),Ca(),es(),pn())})(et,function(n){return function(){var r=n,o=r.lib,i=o.StreamCipher,a=r.algo,l=[],u=[],d=[],f=a.RabbitLegacy=i.extend({_doReset:function(){var h=this._key.words,m=this.cfg.iv,y=this._X=[h[0],h[3]<<16|h[2]>>>16,h[1],h[0]<<16|h[3]>>>16,h[2],h[1]<<16|h[0]>>>16,h[3],h[2]<<16|h[1]>>>16],b=this._C=[h[2]<<16|h[2]>>>16,h[0]&4294901760|h[1]&65535,h[3]<<16|h[3]>>>16,h[1]&4294901760|h[2]&65535,h[0]<<16|h[0]>>>16,h[2]&4294901760|h[3]&65535,h[1]<<16|h[1]>>>16,h[3]&4294901760|h[0]&65535];this._b=0;for(var C=0;C<4;C++)g.call(this);for(var C=0;C<8;C++)b[C]^=y[C+4&7];if(m){var A=m.words,I=A[0],S=A[1],T=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,O=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,R=T>>>16|O&4294901760,k=O<<16|T&65535;b[0]^=T,b[1]^=R,b[2]^=O,b[3]^=k,b[4]^=T,b[5]^=R,b[6]^=O,b[7]^=k;for(var C=0;C<4;C++)g.call(this)}},_doProcessBlock:function(h,m){var y=this._X;g.call(this),l[0]=y[0]^y[5]>>>16^y[3]<<16,l[1]=y[2]^y[7]>>>16^y[5]<<16,l[2]=y[4]^y[1]>>>16^y[7]<<16,l[3]=y[6]^y[3]>>>16^y[1]<<16;for(var b=0;b<4;b++)l[b]=(l[b]<<8|l[b]>>>24)&16711935|(l[b]<<24|l[b]>>>8)&4278255360,h[m+b]^=l[b]},blockSize:128/32,ivSize:64/32});function g(){for(var h=this._X,m=this._C,y=0;y<8;y++)u[y]=m[y];m[0]=m[0]+1295307597+this._b|0,m[1]=m[1]+3545052371+(m[0]>>>0<u[0]>>>0?1:0)|0,m[2]=m[2]+886263092+(m[1]>>>0<u[1]>>>0?1:0)|0,m[3]=m[3]+1295307597+(m[2]>>>0<u[2]>>>0?1:0)|0,m[4]=m[4]+3545052371+(m[3]>>>0<u[3]>>>0?1:0)|0,m[5]=m[5]+886263092+(m[4]>>>0<u[4]>>>0?1:0)|0,m[6]=m[6]+1295307597+(m[5]>>>0<u[5]>>>0?1:0)|0,m[7]=m[7]+3545052371+(m[6]>>>0<u[6]>>>0?1:0)|0,this._b=m[7]>>>0<u[7]>>>0?1:0;for(var y=0;y<8;y++){var b=h[y]+m[y],C=b&65535,A=b>>>16,I=((C*C>>>17)+C*A>>>15)+A*A,S=((b&4294901760)*b|0)+((b&65535)*b|0);d[y]=I^S}h[0]=d[0]+(d[7]<<16|d[7]>>>16)+(d[6]<<16|d[6]>>>16)|0,h[1]=d[1]+(d[0]<<8|d[0]>>>24)+d[7]|0,h[2]=d[2]+(d[1]<<16|d[1]>>>16)+(d[0]<<16|d[0]>>>16)|0,h[3]=d[3]+(d[2]<<8|d[2]>>>24)+d[1]|0,h[4]=d[4]+(d[3]<<16|d[3]>>>16)+(d[2]<<16|d[2]>>>16)|0,h[5]=d[5]+(d[4]<<8|d[4]>>>24)+d[3]|0,h[6]=d[6]+(d[5]<<16|d[5]>>>16)+(d[4]<<16|d[4]>>>16)|0,h[7]=d[7]+(d[6]<<8|d[6]>>>24)+d[5]|0}r.RabbitLegacy=i._createHelper(f)}(),n.RabbitLegacy})}(gw)),gw.exports}(function(e,t){(function(n,r,o){e.exports=r(rt(),Af(),wne(),Sne(),xa(),Ca(),Y0(),y6(),Ane(),b6(),Ene(),Tne(),Ine(),K0(),One(),es(),pn(),Pne(),jne(),Rne(),kne(),Mne(),_ne(),Dne(),Fne(),Bne(),Lne(),Nne(),$ne(),Vne(),Wne(),zne(),Une())})(et,function(n){return n})})(Cne);var x6=(e=>(e.GOOGLE="google",e))(x6||{});function Hne(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[o,i]=P.useState(!1),a=P.useRef(n);a.current=n;const l=P.useRef(r);return l.current=r,P.useEffect(()=>{const u=document.createElement("script");return u.src="https://accounts.google.com/gsi/client",u.async=!0,u.defer=!0,u.nonce=t,u.onload=()=>{var d;i(!0),(d=a.current)===null||d===void 0||d.call(a)},u.onerror=()=>{var d;i(!1),(d=l.current)===null||d===void 0||d.call(l)},document.body.appendChild(u),()=>{document.body.removeChild(u)}},[t]),o}const C6=P.createContext(null);function Gne({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:o}){const i=Hne({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),a=P.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:i}),[e,i]);return P.createElement(C6.Provider,{value:a},o)}function qne(){const e=P.useContext(C6);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function Yne(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const Kne={large:40,medium:32,small:20};function Xne({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:o="standard",theme:i="outline",size:a="large",text:l,shape:u,logo_alignment:d,width:f,locale:g,click_listener:h,containerProps:m,...y}){const b=P.useRef(null),{clientId:C,scriptLoadedSuccessfully:A}=qne(),I=P.useRef(e);I.current=e;const S=P.useRef(t);S.current=t;const T=P.useRef(r);return T.current=r,P.useEffect(()=>{var O,R,k,F,N,M,D,U,G;if(A)return(k=(R=(O=window==null?void 0:window.google)===null||O===void 0?void 0:O.accounts)===null||R===void 0?void 0:R.id)===null||k===void 0||k.initialize({client_id:C,callback:H=>{var Y;if(!(H!=null&&H.credential))return(Y=S.current)===null||Y===void 0?void 0:Y.call(S);const{credential:V,select_by:X}=H;I.current({credential:V,clientId:Yne(H),select_by:X})},...y}),(M=(N=(F=window==null?void 0:window.google)===null||F===void 0?void 0:F.accounts)===null||N===void 0?void 0:N.id)===null||M===void 0||M.renderButton(b.current,{type:o,theme:i,size:a,text:l,shape:u,logo_alignment:d,width:f,locale:g,click_listener:h}),n&&((G=(U=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||U===void 0?void 0:U.id)===null||G===void 0||G.prompt(T.current)),()=>{var H,Y,V;n&&((V=(Y=(H=window==null?void 0:window.google)===null||H===void 0?void 0:H.accounts)===null||Y===void 0?void 0:Y.id)===null||V===void 0||V.cancel())}},[C,A,n,o,i,a,l,u,d,f,g]),P.createElement("div",{...m,ref:b,style:{height:Kne[a],...m==null?void 0:m.style}})}function w6({setLoading:e}){const n=E.useTheme().palette.mode==="dark",r=oe.useAuthProvider(),o=oe.useNotify(),i=gt.useNavigate(),[a,l]=P.useState(395),u=P.useRef(null);P.useEffect(()=>{const g=Ke.debounce(()=>{u!=null&&u.current&&l(u.current.offsetWidth)},100);return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g),g.cancel()}},[u]);function d(g){e(!0),r.thirdPartyLogin({provider:x6.GOOGLE,payload:{credential:g.credential}}).then(()=>{e(!1),i("/")}).catch(h=>{e(!1),o(typeof h=="string"?h:typeof h>"u"||!h.message?"ra.auth.sign_in_error":h.message,{type:"error",messageArgs:{_:typeof h=="string"?h:h&&h.message?h.message:void 0}})})}function f(){o("ra.auth.sign_in_error",{type:"error"})}return p.jsx(E.Box,{sx:{colorScheme:n?"light":"dark",width:"100%"},ref:u,children:p.jsx(Xne,{theme:"outline",width:a,onSuccess:d,onError:f})})}function Zne({label:e="ra.auth.sign_in",...t}){const n=z.useRecordContext(),[r,o]=P.useState(!1),i=z.useAuthProvider(),a=P.useCallback(l=>{l.stopPropagation(),l.preventDefault(),o(!0),i.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[i,n==null?void 0:n.id]);return p.jsx(z.Button,{disabled:r||i.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:p.jsx(cn.VpnKey,{})})}const Qne=Ql(z.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function X0({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=p.jsx(ui,{children:p.jsx(z.SaveButton,{type:"button"})}),secondary:i=p.jsx(si,{children:p.jsx(Ji,{})}),sx:a,...l}){const u=U0(e),d=z.useRecordContext(),f=km();return p.jsx(Ln,{content:n,title:u,subheader:r,secondary:d!=null&&d.id?i:null,sx:{...a,"& .MuiToolbar-root":{paddingLeft:f.spacing(2.5),paddingRight:f.spacing(2.5),paddingBottom:f.spacing(2.5),paddingTop:t?f.spacing(2.5):0,borderTop:t?`1px solid ${f.palette.divider}`:void 0}},border:!t,divider:!0,children:p.jsx(Qne,{toolbar:o,...l})})}const S6={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}`)}},A6=P.createContext(S6);function Jne(e){const[t,n]=P.useState(S6);function r(a,l){n(u=>({...u,openDialogs:[...u.openDialogs,a]})),l&&l()}function o(a,l){n(u=>({...u,openDialogs:u.openDialogs.filter(d=>d!==a)})),l&&l()}function i(){return t.openDialogs.length>0?t.openDialogs[t.openDialogs.length-1]:null}return p.jsx(A6.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:i},children:e.children})}function E6(){const e=P.useContext(A6);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function Z0(){return E6()}function T6({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:i,divider:a=!1,fullWidth:l,...u}){const d=ln.useTheme(),{getCurrentDialog:f}=Z0(),{source:g,resource:h,isRequired:m}=u,{getFieldState:y,formState:b}=un.useFormContext(),{error:C}=y(g,b),A=f();return p.jsxs(E.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:C?d.palette.error.main:d.palette.text.secondary,"& span":{display:"none"}},width:l?"100%":"auto",...o},children:[n==="label"&&e!==!1&&i!==!1&&p.jsx(E.InputLabel,{error:!!C,sx:{borderBottom:a?`1px solid ${d.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:p.jsx(z.FieldTitle,{label:e,source:g,resource:A||h,isRequired:m})}),P.isValidElement(t)?P.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?p.jsx(E.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!C,children:r}):null]})}const ere=ge(z.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 tre({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...i}){return p.jsx(T6,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:i==null?void 0:i.fullWidth,children:p.jsx(ere,{source:n,label:!1,...i})})}function nre({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:p.jsxs(si,{children:[e?p.jsx(z.EditButton,{}):null,t?p.jsx(Ji,{}):null,n?p.jsx(z.CloneButton,{}):null]})}const vw=ge("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),rre=ge("ul")({display:"inline-block"});function ore(e){var f;const{className:t,emptyText:n,source:r,title:o,...i}=e,a=oe.useRecordContext(e),l=Ke.get(a,r),u=oe.useTranslate();if(!l)return n?p.jsx(E.Typography,{component:"span",variant:"body2",className:t,...i,children:n?u(n,{_:n}):null}):p.jsx(vw,{className:t,...i});if(Array.isArray(l))return p.jsx(rre,{className:t,...i,children:l.map((g,h)=>{var y;const m=o instanceof String?(y=Ke.get(g,o))==null?void 0:y.toString():o;return p.jsx("li",{children:m},h)})});const d=o instanceof String?(f=Ke.get(a,o))==null?void 0:f.toString():o;return p.jsx(vw,{className:t,...i,children:d})}function I6({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",resource:i,...a}){const[l,u]=P.useState(null),d=z.useRecordContext(a),f=z.useDataProvider(),g=z.useResourceContext(),h=z.useNotify(),m=P.useCallback(async C=>{C.preventDefault(),C.stopPropagation(),h("ra.notification.download",{type:"info"});const A=Ke.get(d,a==null?void 0:a.source),I=(i||g).replace("entities/",""),S=e||(d==null?void 0:d.id),T=await f.getFile(`/attachments/${I}/${S}/${t||(a==null?void 0:a.source)}/${(A==null?void 0:A.id)||(d==null?void 0:d.id)}`),O=document.createElement("a");O.href=T,O.download=Ke.get(d,(a==null?void 0:a.title)||(a==null?void 0:a.source)),O.click()},[f,d,e,g,i,t,a==null?void 0:a.source,a==null?void 0:a.title,h]),y=P.useMemo(()=>({...d,[a==null?void 0:a.source]:(d==null?void 0:d.src)||Ke.get(d,a==null?void 0:a.source),[a==null?void 0:a.title]:(d==null?void 0:d.title)||Ke.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]),b=z.useTranslate();return P.useEffect(()=>{!d||!(d!=null&&d.userId)||r===!1||f.getOne(o,{id:d==null?void 0:d.userId}).then(({data:C})=>u(C)).catch(()=>u(null))},[d,f,o,r]),p.jsx(ore,{...a,disabled:n,record:y,onClick:m,title:p.jsxs(E.Box,{sx:{cursor:"pointer"},children:[p.jsx(E.Typography,{variant:"subtitle1",children:Ke.get(y,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),p.jsxs(E.Typography,{variant:"caption",color:"secondary",children:[Ke.get(y,"sizeDescription"),r&&l?" | ":null,r&&l?b("ra.attachment.info",{user:l==null?void 0:l.name,created:Fr(y==null?void 0:y.createdAt).format("DD/MM/YYYY HH:mm")}):null]})]})})}const ire=ge(z.ImageField,{slot:"root"})(()=>({}));function O6(e){const t=`_${e==null?void 0:e.source}`;return p.jsx(ire,{...e,source:t})}function P6({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,sx:i,...a}){const l=P.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5,...i}),[e,t,n,i]),u=z.useRecordContext(),d=o||u;return p.jsx(O6,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...a,record:d})}var sre={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(On,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])+"]"}}})})(sre);var are={exports:{}};(function(e,t){(function(n,r){e.exports=r(l6)})(On,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),i={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(i,null,!0),i})})(are);var j6={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(On,function(){return function(n,r,o){n=n||{};var i=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 l(d,f,g,h){return i.fromToBase(d,f,g,h)}o.en.relativeTime=a,i.fromToBase=function(d,f,g,h,m){for(var y,b,C,A=g.$locale().relativeTime||a,I=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"}],S=I.length,T=0;T<S;T+=1){var O=I[T];O.d&&(y=h?o(d).diff(g,O.d,!0):g.diff(d,O.d,!0));var R=(n.rounding||Math.round)(Math.abs(y));if(C=y>0,R<=O.r||!O.r){R<=1&&T>0&&(O=I[T-1]);var k=A[O.l];m&&(R=m(""+R)),b=typeof k=="string"?k.replace("%d",R):k(R,f,O.l,C);break}}if(f)return b;var F=C?A.future:A.past;return typeof F=="function"?F(b):F.replace("%s",b)},i.to=function(d,f){return l(d,f,this,!0)},i.from=function(d,f){return l(d,f,this)};var u=function(d){return d.$u?o.utc():o()};i.toNow=function(d){return this.to(u(this),d)},i.fromNow=function(d){return this.from(u(this),d)}}})})(j6);var lre=j6.exports;const cre=eo(lre);Fr.extend(cre);function R6(e){const t=z.useRecordContext(e),[n]=z.useLocaleState(),r=P.useMemo(()=>Fr(Ke.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return p.jsxs(p.Fragment,{children:[p.jsx(z.DateField,{record:t,source:e.source,showTime:!0}),p.jsx("br",{}),p.jsx(E.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const ure=ge(z.DateField,{slot:"Root"})(()=>({}));function dre({variant:e="body1",...t}){return p.jsx(ure,{...t,variant:e})}const fre=ge(z.EmailField,{slot:"Root"})(()=>({}));function pre({variant:e="body1",...t}){return p.jsx(fre,{...t,variant:e})}const hre=ge(z.FileField,{slot:"root"})(()=>({}));function k6({...e}){const t=z.useRecordContext(e),n=P.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=Ke.get(t,`_${e==null?void 0:e.source}`,Ke.get(t,e==null?void 0:e.source)),i=Ke.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=i,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return p.jsx(hre,{...e,record:t,onClick:n})}function gre({variant:e="body1",...t}){return p.jsx(z.FunctionField,{...t,variant:e})}const mre=ge(z.TextField,{slot:"Root"})(()=>({}));function M6({variant:e="body1",...t}){return p.jsx(mre,{...t,variant:e})}function vre(e){const t=E.useTheme(),n=oe.useLocales(),{source:r=""}=e,i=oe.useRecordContext(e)[r],a=!wd(i,n),l=Br(e,{flex:1}),[u]=oe.useLocaleState(),d=P.useMemo(()=>a?p.jsx(ze.FlagFilled,{style:{color:t.palette.warning.main}}):p.jsx(ze.FlagOutlined,{}),[a,t.palette.warning.main]),f=P.useMemo(()=>p.jsx(E.Stack,{children:se.map(n,(g,h)=>p.jsx(E.Typography,{children:`${g.locale.toUpperCase()}: ${(i??{})[g.locale]??""}`},h))}),[i,n]);return p.jsx(uf,{title:f,arrow:!1,children:p.jsxs(E.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,p.jsx(M6,{...e,source:`${r}.${u}`,sx:l})]})})}const yre=ge("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 bre({source:e,defaultValue:t=" ",...n}){const r=z.useRecordContext(n),o=Ke.get(r,e,t);return p.jsx(E.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function xre({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?p.jsx(E.Tooltip,{title:e,placement:"top",children:t}):t}function Cre({label:e,source:t,defaultValue:n=" ",children:r=p.jsx(bre,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...i}){const a=P.Children.only(r),{getCurrentDialog:l}=E6(),u=z.useRecordContext(i),d=z.useResourceContext(i),f=l(),g=P.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?Ke.get(u,o,o):o,[u,o]),h=Br(i,{width:i!=null&&i.fullWidth?"100%":"auto"});return p.jsx(xre,{title:g,children:p.jsxs(p.Fragment,{children:[p.jsx(E.InputLabel,{sx:{pt:1},children:p.jsx(z.FieldTitle,{label:e,source:t,resource:f||d})}),p.jsx(yre,{...i,children:P.isValidElement(a)?P.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:f||d,sx:h}):null})]})})}function wre({children:e=null,className:t=""}){return p.jsx("div",{className:t,children:e})}const Sre=Ql(wre,{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 _6(e){return p.jsx(Sre,{...e,children:p.jsx(z.ReferenceManyField,{pagination:p.jsx(z.Pagination,{}),...e})})}function Are({source:e,...t}){const n=z.useRecordContext(t),r=Ke.get(n,e,0),o=r/1024,i=o/1024,a=i/1024,l=a>1?`${a.toFixed(2)} GB`:i>1?`${i.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return p.jsx(E.Typography,{component:"span",variant:"body1",...t,children:l})}function xn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:i,divider:a=!1,...l}){const u=Et(),{getCurrentDialog:d}=Z0(),{source:f,resource:g,isRequired:h,chip:m}=l,{fieldState:{invalid:y}}=z.useInput(l),b=d();return p.jsxs(E.Stack,{spacing:1,sx:{width:l!=null&&l.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{pb:0,color:y?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&i!==!1&&p.jsx(E.InputLabel,{error:y===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:p.jsx(z.FieldTitle,{label:e,source:f,resource:b||g,isRequired:h})}),P.isValidElement(t)?P.cloneElement(t,{...t.props,...l,chip:m&&typeof m=="function"?P.createElement(m):m,label:n==="legend"?e:!1}):t,r?p.jsx(E.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:y===!0,children:r}):null]})}function Ere(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const Tre=ge(z.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}},...Ere(e)}));function Ire({children:e=p.jsx(I6,{title:"name",source:"path"}),multiple:t=!1,disabled:n=!1,type:r="attachment",...o}){const i=z.useRecordContext(o),a=o==null?void 0:o.source,l=i==null?void 0:i.id;return z.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),p.jsx(xn,{...o,disabled:n,children:p.jsx(Tre,{type:r,multiple:t,disabled:n,children:P.cloneElement(e,{entityId:l,property:a,...e.props})})})}const Ore=ge(z.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 Pre({size:e="small",...t}){return p.jsx(xn,{...t,children:p.jsx(Ore,{size:e})})}const jre=ge(z.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function Rre({size:e="small",...t}){const{perPage:n,...r}=t;return p.jsx(xn,{...r,children:p.jsx(jre,{size:e})})}const kre=ge(z.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function Mre({...e}){const t=ln.useTheme();return p.jsx(xn,{...e,children:p.jsx(kre,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const _re=4,Dre=ge(z.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function Fre(e){const[t,n]=P.useState(""),r=P.useCallback(o=>{const i=o.target.value;Fr(i).year().toString().length>_re?o.target.value=t:n(i)},[t]);return p.jsx(xn,{...e,children:p.jsx(Dre,{...e,onInput:r})})}const Bre=ge(z.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function Lre(e){return p.jsx(xn,{...e,children:p.jsx(Bre,{})})}const Nre=ge(z.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 $re({children:e=p.jsx(k6,{source:"",title:""}),title:t,...n}){const r=un.useWatch({name:n.source}),o=z.useRecordContext(n),{source:i}=n,a=P.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const l=Ke.get(o,i);if(l){const u=l.split("__");return u.length>0?u[u.length-1]:l}return l},[o,i,r]);return p.jsx(xn,{...n,children:p.jsx(Nre,{children:P.cloneElement(e,{...e.props,title:t||i,source:i,record:{...o,[i]:(r==null?void 0:r.title)||Ke.get(o,i),[`_${i}`]:(r==null?void 0:r.src)||Ke.get(o,`_${i}`),[t||i]:a}})})})}function Vre({children:e=p.jsx(P6,{}),title:t,multiple:n=!1,...r}){const o=un.useWatch({name:r.source}),i=z.useRecordContext(r),{source:a}=r;return z.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),p.jsx(xn,{...r,multiple:n,children:p.jsx(z.ImageInput,{accept:"image/*",children:P.cloneElement(e,{...e.props,title:t,source:a,record:{...i,[a]:(o==null?void 0:o.title)||Ke.get(i,a),[`_${a}`]:(o==null?void 0:o.src)||Ke.get(i,`_${a}`)}})})})}function wr(e){return p.jsx(xn,{...e,children:p.jsx(z.TextInput,{})})}const Wre={vertical:"bottom",horizontal:"right"},zre={vertical:"top",horizontal:"right"};function Ure({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:i}=o,a=oe.useLocales(),l=P.useCallback((R="ra.validation.required",k="ra.validation.required_locale")=>F=>{if(e&&!t&&!s6(F,a))return R;if(t&&(!se.has(F,t)||se.isEmpty(se.get(F,t))))return{message:k,args:{locale:t}};if(!e&&r&&!wd(F,a))return R},[e,t,a,r]),u=P.useMemo(()=>oe.composeValidators(n,l()),[n,l]),{fieldState:d}=oe.useInput({...o,validate:u}),{error:f}=d,g=un.useWatch({name:i}),h=!wd(g,a),[m]=oe.useLocaleState(),[y,b]=P.useState(m),[C,A]=P.useState(null),I=!!C,S=P.useCallback(R=>A(I?null:R.currentTarget),[I,A]),T=P.useCallback(()=>A(null),[A]),O=P.useMemo(()=>se.map(a,(R,k)=>p.jsx(E.MenuItem,{onClick:()=>{b(R.locale),T()},children:p.jsx(E.ListItemText,{primary:`${R.locale.toUpperCase()}: ${(g??{})[R.locale]??""}`})},k)),[a,b,T,g]);return p.jsx(xn,{...o,validate:u,helperText:f!=null&&f.message?p.jsx(oe.ValidationError,{error:f==null?void 0:f.message}):o==null?void 0:o.helperText,children:p.jsx(p.Fragment,{children:p.jsxs(E.Box,{flex:1,children:[se.map(a,(R,k)=>p.jsx(wr,{...o,source:`${i}.${R.locale}`,sx:{width:"100%",display:R.locale===y?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:p.jsx(E.Chip,{label:p.jsx(E.Typography,{variant:"button",children:y}),size:"small",onClick:S,color:h?"warning":void 0})}},k)),p.jsx(E.Menu,{anchorEl:C,open:I,anchorOrigin:Wre,transformOrigin:zre,onClose:T,children:O})]})})})}const Hre=ge(z.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function Gre(e){return p.jsx(xn,{...e,children:p.jsx(Hre,{})})}const qre=ge(z.RadioButtonGroupInput,{slot:"root"})(()=>({marginTop:"0 !important","& .MuiFormControlLabel-root":{marginLeft:-8}}));function Yre(e){return p.jsx(xn,{...e,children:p.jsx(qre,{})})}function Kre({source:e,minWidth:t=300,children:n}){const r=z.useResourceContext(),o=z.useRecordContext(),[i,a]=P.useState(Ke.get(o,e,"")),[l,u]=P.useState(!1),d=P.useCallback(y=>a(y.target.value),[]),f=z.useDataProvider(),g=P.useCallback(y=>{y.key==="Enter"&&(u(!0),f.update(r,{id:o.id,data:{...o,[e]:i,_changed:e},previousData:o}).then(()=>u(!1)))},[i,f,r,o,e]),h=P.useCallback(()=>{Ke.get(o,e)!==i&&(u(!0),f.update(r,{id:o.id,data:{...o,[e]:i,_changed:e},previousData:o}).then(()=>u(!1)))},[i,f,r,e,o]),m=P.useCallback(y=>{u(!0),f.update(r,{id:o.id,data:{...o,[e]:y,_changed:e},previousData:o}).then(()=>u(!1))},[f,r,e,o]);return P.useEffect(()=>a(Ke.get(o,e)),[o,e]),n?P.cloneElement(n,{...n.props,source:e,value:i,onChange:m}):p.jsx(E.TextField,{value:i,disabled:l,onChange:d,onKeyPress:g,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function Xre({children:e,...t}){const n=P.Children.only(e);return p.jsx(z.ReferenceArrayInput,{...t,children:P.cloneElement(n,{...t,source:n.props.source||t.source})})}function Zre({children:e,...t}){const n=P.Children.only(e);return p.jsx(z.ReferenceInput,{...t,children:P.cloneElement(n,{...t,source:n.props.source||t.source})})}function Qre({reference:e,target:t,children:n,filters:r,actions:o,...i}){return p.jsx(z.ResourceContextProvider,{value:e,children:p.jsx(_6,{perPage:5,pagination:p.jsx(z.Pagination,{}),...i,reference:e,target:t,children:p.jsxs(p.Fragment,{children:[p.jsx(z.ListToolbar,{filters:r,actions:o}),n]})})})}const Jre=ge(z.SearchInput,{slot:"root"})(()=>({}));function eoe(e){return p.jsx(Jre,{...e})}const toe=ge(z.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 noe({optionText:e="name",optionValue:t="id",...n}){return p.jsx(xn,{...n,children:p.jsx(toe,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const roe=ge(z.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function ooe(e){return p.jsx(xn,{...e,children:p.jsx(roe,{})})}function ioe({multiline:e=!1,...t}){var u,d;const n=z.useTranslate(),r=z.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=un.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:d.value;let i=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const l=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&&(i=i&&i.length>0?`${l} - ${n(i)}`:l),p.jsx(wr,{...t,validate:a,helperText:i,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function soe(e){if(!e)return"";const t=c6(e);return t?t.format("HH:mm"):""}function aoe(e){return e}const loe=ge(z.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function coe({parse:e=aoe,format:t=soe,...n}){return p.jsx(xn,{...n,children:p.jsx(loe,{parse:e,format:t,...n})})}function Q0({onSuccess:e,firstAccess:t}){const{spacing:n}=Pn(),[r,o]=P.useState(!1),i=oe.useAuthProvider(),a=oe.useTranslate(),l=oe.useNotify(),u=Ni.useQueryClient(),d=P.useCallback(f=>{const{oldPassword:g,newPassword:h}=f;o(!0),i==null||i.changePassword(g,h).then(()=>{l("ra.auth.password_changed"),u.invalidateQueries(["auth","getIdentity"]),e()}).catch(m=>{l((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>o(!1))},[i,e,l,u]);return p.jsx(oe.ResourceContextProvider,{value:"user/change-password",children:p.jsx(oe.EditContextProvider,{value:{record:{},resource:"user/change-password",save:d},children:p.jsx(X0,{onSubmit:d,toolbar:p.jsx(ui,{children:p.jsx(z.SaveButton,{disabled:r})}),children:p.jsxs(E.Grid,{container:!0,spacing:n,children:[t===!0&&p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Alert,{severity:"warning",children:[p.jsx(E.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),p.jsx(E.Grid,{item:!0,xs:12,children:p.jsx(wr,{source:"oldPassword",type:"password",validate:oe.required()})}),p.jsx(E.Grid,{item:!0,xs:12,children:p.jsx(wr,{source:"newPassword",type:"password",validate:oe.required()})})]})})})})}const D6=P.createContext({});function uoe(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=z.useResourceContext(),o=z.useDataProvider(),{search:i}=zi.useLocation(),a=`${r}/new`,l=P.useCallback(()=>{if(!t||!se.isFunction(o.get))return Promise.resolve({});const h={};return new URLSearchParams(i??"").forEach((m,y)=>{h[y]=m}),o.get(a,h).then(m=>m.data).then(m=>{const{responseCode:y,value:b}=m;return y==="ok"?b:Promise.reject(m)})},[t,i,o,a]),u=P.useMemo(()=>se.chain(n).extend({queryKey:[r,i],queryFn:l}).value(),[r,i,l,n]),{data:d,isLoading:f}=Ni.useQuery(u),g=se.omit(e,["useDefaults"]);return f?p.jsx(E.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:p.jsx(E.CircularProgress,{})}):p.jsx(D6.Provider,{value:d??{},children:p.jsx(z.Create,{...g,children:e.children})})}const doe=ge(uoe,{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 foe(){return P.useContext(D6)}const poe=ge(z.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 hoe(e){return p.jsx(poe,{...e})}const goe=ge(E.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),moe=ge(E.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function voe({title:e,divider:t=!0,variant:n="h5"}){const r=z.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(goe,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?p.jsx(moe,{}):null]})}function Tg(e){return e.id??e.label}function F6(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function yoe(e){return se.map(e,"id")}function Ed(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function B6(e,t){const n=e!==void 0?Ed(e):0;return se.chain(t).filter(o=>e!==void 0?F6(e,o.id):!0).filter(o=>Ed(o.id)===n+1).value()}function boe(e,t){var i;const n=se.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return se.extend(n,{formRootPath:o});case"setSyncWithLocation":return se.extend(n,{syncWithLocation:o});case"setErrorCount":return se.extend(n,{errorCount:o});case"setActiveItem":return se.includes(yoe(e.items),o)?se.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return se.extend(n,{items:se.chain(n.items).clone().reject(l=>l.id===a).concat([o]).orderBy(l=>l.index).value()})}case"removeItem":{const a=se.isString(o)?o:o.id,l=se.chain(n.items).clone().reject(u=>u.id===a).value();return se.extend(n,{items:l}),n.activeItem===a&&se.extend(n,{activeItem:((i=se.first(l))==null?void 0:i.id)??void 0}),n}default:return n}}const xoe={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},L6=P.createContext(void 0);function N6(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=zi.useLocation(),[i,a]=P.useReducer(boe,se.cloneDeep(xoe)),{formRootPath:l,items:u}=i,d=P.useMemo(()=>({state:i,dispatch:a}),[i,a]);return P.useEffect(()=>{const f=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&f.push(r);const g=se.chain(f).map(m=>zi.matchPath(m,o)).reject(m=>m===null).first().value(),h=g==null?void 0:g.pathnameBase;h!==void 0&&h!==l&&a({type:"setFormRootPath",payload:h})},[o,l,r]),P.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),P.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),P.useEffect(()=>{var f;if(t&&l!==void 0){let g=o.replace(l,"").replace(new RegExp(/^\/?/),"");se.isEmpty(g)&&(g=((f=se.chain(u).filter(h=>B6(h.id,u).length===0).orderBy([h=>Ed(h.id),h=>h.index]).first().value())==null?void 0:f.id)??void 0),a({type:"setActiveItem",payload:g})}},[a,l,o,u,t]),p.jsx(L6.Provider,{value:d,children:e.children})}function $6(){const e=P.useContext(L6);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function oc(){return $6().state}function J0(){return $6().dispatch}function V6(){return oc().formRootPath}function W6(){return oc().activeItem}function z6(){return oc().items}function U6(){return oc().syncWithLocation}function H6(){return oc().errorCount}function G6(){const e=J0();return P.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function q6(){const e=J0();return P.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function Y6(){const e=J0();return P.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const Coe=ge(E.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 K6(e){const{spacing:t}=Pn(),{spacing:n=t}=e,r=se.omit(e,["spacing"]);return p.jsx(z.Form,{...r,className:"LongFormView",children:p.jsx(Coe,{container:!0,spacing:n*2,children:e.children})})}function X6(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=se.omit(e,["disposition"]);return p.jsx(E.Grid,{...n,item:!0,...t,children:e.children})}function Z6(e){const t=W6();return t===void 0?!1:e===t||F6(e,t)}function Q6(e){const t=z6();return P.useMemo(()=>B6(e,t),[t,e])}function woe(){const e=V6(),{search:t}=zi.useLocation(),n=zi.useNavigate();return P.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function J6(){const e=Q6();return p.jsx(E.Card,{variant:"outlined",children:p.jsx(E.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:se.map(e,(t,n)=>p.jsx(ev,{...t},n))})})}function ev(e){const t=oe.useTranslate()??se.identity,n=eA(e),{selected:r,label:o,icon:i,onClick:a,badge:l,items:u,isGroup:d,level:f,errors:g=0}=n,{spacing:h}=Pn(),[m,y]=P.useState(r),b=P.useCallback(I=>{y(!m),a(I)},[a,m]),C=i!==void 0,A=se.omit(e,["label","icon","selected","badge"]);return P.useEffect(()=>{r&&!m&&y(r)},[r,m,y]),p.jsxs(p.Fragment,{children:[p.jsx(E.ListItem,{...A,disablePadding:!0,children:p.jsxs(E.ListItemButton,{selected:r?!d:null,onClick:b,sx:{pl:h*f},children:[C?p.jsx(E.ListItemIcon,{children:i}):null,p.jsx(E.ListItemText,{inset:!C,primary:g===0?t(o):p.jsx(E.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),l?p.jsx(E.ListItemAvatar,{children:p.jsx(ed,{type:"filled",size:"xs",color:l.color??"default",children:l.content})}):null,d?m?p.jsx(cn.ExpandLess,{}):p.jsx(cn.ExpandMore,{}):null]})}),d?p.jsx(E.Collapse,{in:m,timeout:"auto",children:p.jsx(E.List,{children:se.map(u,(I,S)=>p.jsx(ev,{...I},S))})}):null]})}function eA(e){const{id:t}=e,n=Z6(t),r=Ed(t),o=woe(),i=U6(),a=G6(),l=Q6(t),u=!se.isEmpty(l),d=P.useCallback(g=>{u||(i?o(e.id):a(e.id)),se.isFunction(e.onClick)&&e.onClick(g)},[a,o,e,i,u]);return P.useMemo(()=>({...e,selected:n,onClick:d,items:l,isGroup:u,level:r}),[e,n,d,l,u,r])}var Soe=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},tA=e=>e.firstChild?e.firstChild.offsetParent===e:!0,Aoe=(e,t)=>{let n=e,r=0;tA(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},Eoe=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Ml=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Ml="sticky":CSS.supports("position","-webkit-sticky")&&(Ml="-webkit-sticky"));var Td=!1;try{const e=Object.defineProperty({},"passive",{get(){Td={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var Eh=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const i=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(i()),l=()=>{Object.assign(a,o(i())),n()};return window.addEventListener("resize",l,Td),r.push(()=>window.removeEventListener("resize",l)),a}else{const i=o(t.getBoundingClientRect()),a=()=>{Object.assign(i,o(t.getBoundingClientRect())),n()},l=new ResizeObserver(a);return l.observe(t),r.push(()=>l.disconnect()),i}},Toe=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}},Ioe=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:i}=n,a=Soe(e);let l=!1;const u=()=>{l||requestAnimationFrame(()=>{const k=g();k!==S&&T(k),l=!1}),l=!0};let d=a===window?window.scrollY:a.scrollTop;const f=k=>{const{offsetTop:F,height:N}=m,{naturalTop:M}=C,{height:D}=A;return k+F+N>=M+D+I+o},g=()=>{const{height:k}=m,{height:F}=A;return F+i+o<=k?3:f(d)?1:2},h=a!==window&&tA(a),m=Eh({el:a,onChange:u,unsubs:t,measure:({height:k,top:F})=>({height:k,offsetTop:h?F:0})}),y=Eoe(e),b=y===window?{top:0,bottom:0}:Toe(y),C=Eh({el:y,onChange:u,unsubs:t,measure:({height:k})=>({height:k-b.top-b.bottom,naturalTop:y===window?0:Aoe(y,a)+b.top+m.offsetTop})}),A=Eh({el:e,onChange:u,unsubs:t,measure:({height:k})=>({height:k})});let I=0,S=g();const T=k=>{const F=S;if(S=k,F===2&&(I=-1),k===3){e.style.position=Ml,r?e.style.bottom=`${o}px`:e.style.top=`${i}px`;return}const{height:N,offsetTop:M}=m,{height:D,naturalTop:U}=C,{height:G}=A;if(k===2)if(e.style.position="relative",I=F===0?Math.max(0,M+d-U+i):Math.max(0,M+d+N-(U+G+o)),r){const H=Math.max(0,D-G-I);e.style.bottom=`${H}px`}else e.style.top=`${I}px`;else e.style.position=Ml,k===1?r?e.style.bottom=`${o}px`:e.style.top=`${N-G-o}px`:r?e.style.bottom=`${N-G-o}px`:e.style.top=`${i}px`};T(S);const O=k=>{if(k===d)return;const F=k-d;if(d=k,S===3)return;const{offsetTop:N,height:M}=m,{naturalTop:D,height:U}=C,{height:G}=A;if(F>0)if(S===0){if(k+N+i>D){const H=Math.max(0,N+d-D+i);k+N+M<=D+G+H+o?T(2):T(1)}}else S===2&&f(k)&&T(1);else if(S===1){if(N+k+M<D+U+o){const H=Math.max(0,N+d+M-(D+G+o));N+k+i>=D+H?T(2):T(0)}}else S===2&&N+k+i<D+I&&T(0)},R=a===window?()=>O(window.scrollY):()=>O(a.scrollTop);a.addEventListener("scroll",R,Td),a.addEventListener("mousewheel",R,Td),t.push(()=>a.removeEventListener("scroll",R),()=>a.removeEventListener("mousewheel",R))},Ooe=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=P.useState(null);return P.useEffect(()=>{if(!r||!Ml)return;const i=[];return Ioe(r,i,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{i.forEach(a=>a())}},[r,t,e,n]),o},Poe=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:i,style:a}=e,l=Ooe({offsetTop:t,offsetBottom:n,bottom:r});return p.jsx("div",{className:i,style:a,ref:l,children:o})},joe=Poe,nA=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(nA||{});function rA(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=se.omit(e,["sticky","disposition","spacing"]),i=t?joe:E.Box,a=P.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return p.jsx(E.Grid,{...o,item:!0,...n,children:p.jsx(i,{...a,children:p.jsx(E.Stack,{spacing:r,children:e.children})})})}function oA(e){return p.jsx(p.Fragment,{children:e.children})}function iA(e){const{children:t}=e;return P.useMemo(()=>{const r={top:[],bottom:[]};return P.Children.forEach(t,o=>{if(P.isValidElement(o)&&(o==null?void 0:o.type)===oA){const{position:i}=o.props;switch(i){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function sA(e){const{errors:t}=un.useFormState(),n=H6(),{label:r,icon:o,badge:i,index:a=0,children:l}=e,u=Tg(e),d=q6(),f=Y6(),g=Z6(u),h=[];n&&(e.sources!==void 0?h.push(...e.sources):Sf(l,y=>{var b;((b=y==null?void 0:y.props)==null?void 0:b.source)!==void 0&&h.push(y.props.source)}));const m=se.chain(h).uniq().map(y=>se.get(t,y)).reject(y=>y===void 0).value().length;return P.useEffect(()=>{d({id:u,index:a,label:r,icon:o,badge:i,errors:m})},[d,f,r,o,u,i,a,m]),P.useEffect(()=>()=>{f(u)},[u,f]),p.jsx(E.Box,{display:g?"unset":"none",children:e.children})}function aA(e){const t=tv(e),n=Tg(e);return p.jsx(sA,{...e,id:n,children:P.Children.map(t,r=>{const o=Tg(r.props);return P.cloneElement(r,{id:`${n}.${o}`})})})}function lA(e){return p.jsx(sA,{...e})}function tv(e){const{children:t}=e;return P.useMemo(()=>se.chain(P.Children.toArray(t)).filter(r=>P.isValidElement(r)&&((r==null?void 0:r.type)===lA||(r==null?void 0:r.type)===aA)).map((r,o)=>P.cloneElement(r,{index:o})).value(),[t])}function Roe(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=se.pick(e,["syncWithLocation","errorCount"]),i=se.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:l}=iA(e),u=tv(e);return p.jsx(N6,{...o,children:p.jsxs(K6,{...i,spacing:r,children:[p.jsxs(rA,{disposition:t,spacing:r,children:[a,p.jsx(J6,{}),l]}),p.jsx(X6,{disposition:n,children:u})]})})}const Vt=Roe;Vt.BaseForm=K6;Vt.Content=X6;Vt.Provider=N6;Vt.useItems=z6;Vt.useSyncWithLocation=U6;Vt.useErrorCount=H6;Vt.useFormRootPath=V6;Vt.useActiveItem=W6;Vt.useSetActiveItem=G6;Vt.useAddItem=q6;Vt.useRemoveItem=Y6;Vt.Sidebar=rA;Vt.SidebarSection=oA;Vt.SidebarSectionPosition=nA;Vt.useSidebarChildren=iA;Vt.NavMenu=J6;Vt.NavMenuItem=ev;Vt.useNavMenuItem=eA;Vt.Tab=lA;Vt.Group=aA;Vt.useBaseItemChildren=tv;const koe=ge(z.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 Moe(e){return p.jsx(koe,{...e})}const _oe=ge(z.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 Doe(e){return p.jsx(_oe,{...e})}const Foe=Ql(z.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function Boe({children:e}){return p.jsx(p.Fragment,{children:e})}function nv(e){const{title:t,modal:n,content:r,subheader:o,secondary:i=p.jsx(si,{children:p.jsx(Ji,{})}),sx:a,noPadding:l,toolbar:u=p.jsx(ui,{children:p.jsx(z.SaveButton,{type:"button"})}),...d}=e,f=U0(t),g=E.useTheme();return p.jsx(Ln,{title:f,modal:n,content:r,subheader:o,secondary:i,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:p.jsx(Foe,{toolbar:u,component:l?Boe:void 0,...d})})}function Loe({children:e,...t}){return p.jsx(z.TabbedForm.Tab,{...t,children:p.jsx(E.Box,{sx:{width:"100%",p:2.5},children:e})})}nv.Tab=z.TabbedForm.Tab;nv.TabStack=Loe;function rv(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,i=E.useTheme(),a=i.palette.mode==="dark"?i.palette.grey.A400:i.palette.grey.A800,l=i.palette.mode==="light"?"#000000":"#FFFFFF";return p.jsxs(E.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&p.jsx(E.Typography,{children:t}),!n&&(P.isValidElement(e==null?void 0:e.customButton)?P.cloneElement(e==null?void 0:e.customButton,{onClick:r}):p.jsx(E.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:p.jsx(ze.PlusCircleOutlined,{style:{color:l}})}))]})}const ov=P.createContext(void 0);function cA(){return P.useContext(ov)}function Id(e){const{children:t}=e,{item:n,index:r}=cA(),[o,i]=P.useState(!1),{update:a}=z.useArrayInput(),l=z.useTranslate(),u=P.useCallback(d=>(i(!1),a(r,d),Promise.resolve()),[r,a]);return p.jsxs(p.Fragment,{children:[p.jsx(E.Button,{color:"primary",onClick:()=>i(!0),sx:{justifyContent:"flex-start"},children:l("ra.action.edit")}),p.jsx(E.Dialog,{open:o,onClose:()=>i(!1),maxWidth:"xs",fullWidth:!0,children:p.jsx(z.EditContextProvider,{value:{record:n,save:u},children:t})})]})}function uA({source:e,children:t}){const n=P.Children.only(t),{getValues:r}=un.useFormContext(),o=z.useRecordContext({record:r()});return P.isValidElement(n)?P.cloneElement(n,{source:e,record:o}):null}function iv(e){const{label:t,disableAdd:n,inset:r,source:o,template:i}=e,[a,l]=P.useState(!1),{append:u}=z.useArrayInput(),d=P.useCallback(()=>{l(g=>!g)},[l]),f=P.useCallback(g=>(l(!1),u(g),Promise.resolve()),[l,u]);return p.jsxs(p.Fragment,{children:[P.cloneElement(p.jsx(rv,{}),{label:t,source:o,disableAdd:n,template:i,onClick:d,inset:r}),p.jsx(E.Dialog,{open:a,onClose:d,maxWidth:"xs",children:p.jsx(oe.CreateContextProvider,{value:{save:f},children:e.children})})]})}const sv=P.createContext(void 0);function dA(){return P.useContext(sv)}const fA=L.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:i,member:a,resource:l,record:u}=e,d=z.useTranslate(),{total:f,remove:g}=dA(),h=L.useCallback(()=>{g(i)},[i,g]),m=P.useMemo(()=>({index:i,total:f,item:u,remove:()=>g(i)}),[i,f,g,u]),y=P.useMemo(()=>P.Children.map(n,b=>P.isValidElement(b)&&(b==null?void 0:b.type)===Id&&L.isValidElement(b)?b:null),[n]);return p.jsxs(ov.Provider,{value:m,children:[P.Children.map(n,(b,C)=>{if(b.type===Id||!P.isValidElement(b))return null;const{source:A,...I}=b.props;return p.jsx(E.TableCell,{children:P.cloneElement(b,{source:A?`${a}.${A}`:a,index:A?void 0:C,resource:l,disabled:r,...I,label:""})})}),!o&&p.jsx(E.TableCell,{children:p.jsx(E.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:p.jsxs(si,{horizontal:!0,children:[p.jsx(Ji,{onConfirm:h,confirmContent:d("ra.message.remove_item")}),y]})})}),o&&y?p.jsx(E.TableCell,{children:p.jsx(E.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:p.jsx(si,{horizontal:!0,children:y})})}):null]})});function Noe(e){var Y,V;const{children:t,resource:n,source:r,label:o,disableAdd:i=!1,disableRemove:a=!1,enableClearAll:l=!1,className:u,empty:d,template:f={},addButton:g=p.jsx(rv,{}),inset:h,sx:m}=e,{fields:y,remove:b,replace:C,append:A}=z.useArrayInput(e),{resetField:I}=un.useFormContext(),S=Et(),T=oe.useTranslate(),O=P.useRef(f||{}),R=oe.useTranslateLabel(),k=P.useCallback(X=>{b(X)},[b]);if(y.length>0){const{...X}=y[0];O.current=X;for(const W in O.current)O.current[W]=null}const F=P.useCallback((X=void 0)=>{let W=X;X==null&&(W=O.current,P.Children.count(t)===1&&L.isValidElement(P.Children.only(t))&&!P.Children.only(t).props.source&&P.Children.map(t,K=>L.isValidElement(K)&&K.type!==oe.FormDataConsumer).some(Boolean)?W="":(W=W||{},P.Children.forEach(t,K=>{L.isValidElement(K)&&K.type!==oe.FormDataConsumer&&K.props.source&&(W[K.props.source]=K.props.defaultValue??null)})));const ie={...W,...f};A(ie),I(`${r}.${y.length}`,{defaultValue:W})},[A,t,I,r,y.length,f]);function N(X){return W=>{F(),X&&X(W)}}const M=P.useCallback(()=>{C([])},[C]),D=P.useMemo(()=>({total:y.length,remove:k,source:r}),[y.length,k,r]),U=S.palette.mode==="dark"?S.palette.grey.A400:S.palette.grey.A800,G=y.length>0&&l,H=h===!0?{borderRadius:0,borderBottom:`1px solid ${S.palette.divider}`}:{mt:2,border:`1px solid ${U}`,boxShadow:S.customShadows.z0};return y?p.jsx(sv.Provider,{value:D,children:p.jsxs("div",{className:u,children:[L.cloneElement(g,{label:o,source:r,disableAdd:i,template:f,onClick:(g==null?void 0:g.type)!==iv?N((V=(Y=e==null?void 0:e.addButton)==null?void 0:Y.props)==null?void 0:V.onClick):void 0,inset:h}),p.jsx(E.TableContainer,{component:E.Paper,sx:{...H,boxShadow:S.customShadows.z0,...m},children:p.jsxs(E.Table,{size:"small",children:[p.jsx(E.TableHead,{sx:h===!0?{}:{borderTop:0,borderBottom:`1px solid ${U}`},children:p.jsxs(E.TableRow,{children:[P.Children.map(t,(X,W)=>{if(X.type===Id||!L.isValidElement(X))return null;const ie=p.jsx(E.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:R({...X.props,resource:n})});return p.jsx(E.TableCell,{children:X.props.title?p.jsx(uf,{title:X.props.title,arrow:!0,children:ie}):ie},W)}),!a&&G?p.jsx(E.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:p.jsx(si,{horizontal:!0,children:p.jsx(Ji,{onConfirm:M,confirmContent:T("ra.message.clear_array_input")})})},"actions"):p.jsx(E.TableCell,{},"empty_actions")]})}),p.jsxs(E.TableBody,{children:[y.length===0&&p.jsx(E.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:p.jsx(E.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||p.jsx(E.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),y.length>0&&y.map((X,W)=>p.jsx(E.TableRow,{sx:{borderBottom:0},children:p.jsx(fA,{disableRemove:a,index:W,member:`${r}.${W}`,onRemoveField:k,record:y&&y[W]||{},resource:n,source:r,children:t})},X.id))]})]})})]})}):null}const $oe=ge(Noe,{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}}})),Ef=$oe;Ef.CreateButton=iv;Ef.EditButton=Id;Ef.Field=uA;const pA=P.createContext(void 0);function Tf(){const e=P.useContext(pA);if(!e)throw new Error("useWizardFormContext must be used within a WizardFormProvider");return e}function Voe({value:e,children:t}){return p.jsx(pA.Provider,{value:e,children:t})}function Woe({cancelButton:e,...t}){const{hasNextStep:n,hasPreviousStep:r,goToNextStep:o,goToPreviousStep:i}=Tf(),a=oe.useTranslate(),{handleSubmit:l}=un.useFormContext(),u=P.useCallback(()=>{o()},[o]);return p.jsxs(ui,{...t,children:[p.jsx(E.Box,{sx:{"& .MuiButtonBase-root":{ml:0}},children:e?P.cloneElement(e):null}),p.jsx(E.Box,{sx:{flex:"1 1 auto"}}),r()&&p.jsx(E.Button,{variant:"text",color:"primary",onClick:i,children:a("ra.action.back")}),n()?p.jsx(E.Button,{variant:"contained",color:"primary",onClick:l(u),children:a("ra.action.next")}):p.jsx(z.SaveButton,{})]})}const zoe=E.styled(E.Stepper,{shouldForwardProp:e=>e!=="isHorizontal"})(({theme:e,isHorizontal:t})=>({paddingBottom:e.spacing(2),display:"flex",justifyContent:t?"space-between":"flex-start",".MuiStep-root":{flex:t?1:"none",maxWidth:t?"none":"100%",display:"flex",justifyContent:t?"center":"flex-start"},".MuiStepConnector-line.MuiStepConnector-lineVertical":{minHeight:12},".MuiStepConnector-vertical":{marginLeft:14.5},".MuiStepConnector-horizontal":{marginLeft:-10}})),Uoe=E.styled(E.Box)(({theme:e,ownerState:t})=>({backgroundColor:t.error?e.palette.error.main:t.completed||t.active?e.palette.primary.main:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[400],zIndex:1,color:e.palette.common.white,width:30,height:30,display:"flex",borderRadius:"50%",justifyContent:"center",alignItems:"center"}));function Hoe({completed:e,active:t,error:n,icon:r,className:o}){return p.jsx(Uoe,{ownerState:{completed:e,active:t,error:n},className:o,children:n?"!":r})}function Goe({isHorizontal:e,setCurrentStep:t,stepFields:n}){const{currentStep:r,steps:o}=Tf(),{errors:i}=un.useFormState();function a(l){l<=r&&t(l)}return p.jsx(zoe,{activeStep:r,orientation:e?"horizontal":"vertical",isHorizontal:e,sx:{p:3,mt:1},children:o.map((l,u)=>{const d=n[u].some(h=>se.get(i,h)),{label:f,icon:g}=l.props;return p.jsx(E.Step,{children:p.jsx(E.StepLabel,{StepIconComponent:Hoe,error:d,icon:g,onClick:()=>a(u),style:{cursor:u<=r?"pointer":"default"},children:e?null:f})},u)})})}function qoe({title:e,subheader:t,secondary:n,toolbar:r,progress:o,isSmall:i,modal:a,sx:l,setCurrentStep:u}){const{currentStep:d,steps:f}=Tf(),g=z.useTranslate(),h=E.useTheme(),m=i||a,y=P.useMemo(()=>r?P.Children.toArray(r.props.children).find(C=>{var A;return P.isValidElement(C)&&C.type===E.Button&&((A=C.props)==null?void 0:A.children)===g("ra.action.cancel")}):null,[r,g]),b=f.map(C=>{const A=[],{sources:I}=C.props;return I!==void 0?A.push(...I):Sf(C,S=>{var T;((T=S==null?void 0:S.props)==null?void 0:T.source)!==void 0&&A.push(S.props.source)}),A});return p.jsxs(E.Grid,{container:!0,spacing:2,sx:l,children:[p.jsx(E.Grid,{item:!0,xl:a?12:2,lg:a?12:3,md:a?12:3,sm:a?12:4,xs:12,children:o||p.jsx(Goe,{isHorizontal:m,setCurrentStep:u,stepFields:b})}),a?p.jsx(E.Divider,{sx:{width:"100%"}}):null,p.jsx(E.Grid,{item:!0,xl:a?12:10,lg:a?12:9,md:a?12:9,sm:a?12:8,xs:12,sx:{paddingTop:a?"0 !important":null},children:p.jsxs(Ln,{title:e||f[d].props.label,subheader:t,secondary:n,border:!a,divider:!0,children:[p.jsx(E.Box,{children:f[d]}),p.jsx(E.Box,{sx:{"& .MuiToolbar-root":{paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:h.spacing(2)}},children:r&&!y?r:p.jsx(Woe,{cancelButton:y})})]})})]})}const Yoe=E.styled(z.Form,{shouldForwardProp:e=>e!=="modal"})(({theme:e,modal:t})=>({[e.breakpoints.down("sm")]:t?{}:{paddingBottom:`${e.spacing(2.5)}`}}));function hA({children:e,toolbar:t,progress:n,title:r,subheader:o=null,secondary:i=null,sx:a,modal:l=!1,...u}){const[d,f]=P.useState(0),g=P.Children.toArray(e),h=E.useMediaQuery(I=>I.breakpoints.down("sm"));function m(){return d<g.length-1}function y(){return d>0}function b(){f(I=>Math.min(I+1,g.length-1))}function C(){f(I=>Math.max(I-1,0))}const A={currentStep:d,steps:g,hasNextStep:m,hasPreviousStep:y,goToNextStep:b,goToPreviousStep:C};return p.jsx(Voe,{value:A,children:p.jsx(Yoe,{...u,modal:l,children:p.jsx(qoe,{title:r,subheader:o,secondary:i,modal:l,sx:a,toolbar:t,progress:n,isSmall:h,setCurrentStep:f})})})}function Koe({children:e}){return p.jsx(p.Fragment,{children:e})}hA.Step=Koe;function Xoe(e,t){const n=se.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const i=se.chain(n.media).clone().extend(o).value();return se.extend(n,{media:i})}case"updateDrawer":{const i=se.chain(n.drawer).clone().extend(o).value();return se.extend(n,{drawer:i})}case"updateLogo":{const i=se.chain(n.logo).clone().extend(o).value();return se.extend(n,{logo:i})}case"updateNotifications":{const i=se.chain(n.notifications).clone().extend(o).value();return se.extend(n,{notifications:i})}case"updateTheme":{const i=se.chain(n.theme).clone().extend(o).value();return se.extend(n,{theme:i})}default:return n}}const Zoe={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"}},gA=P.createContext(void 0);function mA(e){var M;const t=oe.useAuthProvider(),n=oe.useGetIdentity(),r=E.useTheme(),o=E.useMediaQuery(r.breakpoints.down("md")),i=E.useMediaQuery(r.breakpoints.down("lg")),a=E.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:l,isHorizontalLayout:u,themeDirection:d,drawerWidth:f}=G0(),g=u(d)&&!i,{drawerOpen:h,openDrawer:m}=bf(),y=P.useCallback(()=>{m(!h)},[h,m]),[b,C]=P.useState(!1),[A,I]=P.useReducer(Xoe,se.chain(Zoe).clone().merge({drawer:{open:!l||h}}).value()),S=P.useCallback(()=>C(!1),[]),T=P.useMemo(()=>({state:A,dispatch:I}),[A,I]),{logoIcon:O,logoMain:R,enableNotification:k,notification:F}=e,N=z.useLoading();return P.useEffect(()=>{I({type:"updateMedia",payload:{downMd:o,downLg:i,downXl:a,horizontal:g}})},[o,i,a,g]),P.useEffect(()=>{I({type:"updateDrawer",payload:{open:h,width:f,handleDrawerToggle:y}})},[h,f,y]),P.useEffect(()=>{l||m(!a)},[a,l]),P.useEffect(()=>{I({type:"updateLogo",payload:{main:R,icon:O}})},[O,R]),P.useEffect(()=>{I({type:"updateNotifications",payload:{enable:k,resource:F??"entities/notification"}})},[k,F]),P.useEffect(()=>{I({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),P.useEffect(()=>{if(!N){if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(D=>{var U;C(!D&&((U=n==null?void 0:n.data)==null?void 0:U.needToChangePassword)===!0)})}},[(M=n==null?void 0:n.data)==null?void 0:M.needToChangePassword,t,N]),p.jsxs(gA.Provider,{value:T,children:[p.jsx(E.Dialog,{open:b,maxWidth:"xs",fullWidth:!0,children:p.jsx(Q0,{onSuccess:S,firstAccess:!0})}),e.children]})}function vA(e){return P.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:i,notification:a}=t;return p.jsx(mA,{logoIcon:r,logoMain:o,enableNotification:i,notification:a,children:p.jsx(e,{ref:n,...t})})})}function av(){const e=P.useContext(gA);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function Qoe(){return av().dispatch}function wa(){return av().state}function or(){return wa().media}function ts(){return wa().drawer}function yA(){return wa().logo}function If(){return wa().notifications}function Joe(){return wa().theme}function bA(e){const{width:t}=ts(),{horizontal:n}=or(),{container:r}=Pn(),[o,i]=P.useState(null);function a(u,d){i(d)}const l=Et();return p.jsx(MQ,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>p.jsx(_0,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:p.jsx(P.Suspense,{fallback:p.jsx(vS,{}),children:p.jsxs(E.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[p.jsx(E.Toolbar,{sx:{mt:n?8:"inherit"}})," ",p.jsx(E.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column",[l.breakpoints.down("sm")]:{px:"12px"}},children:e.children})]})})})}const xA=ge(E.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 CA({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:i}=Pn();return p.jsx(E.ButtonBase,{disableRipple:!0,component:gt.Link,to:n||i,sx:t,children:e?r:o})}function wA(e){const t=E.useTheme(),{horizontal:n}=or(),{open:r}=ts(),{icon:o,main:i}=yA(),a=Br(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 p.jsx(xA,{theme:t,open:r,sx:a,children:p.jsx(CA,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:i,logoIcon:o})})}function yw(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 bw(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 eie=ge(E.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Pn();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...yw(e,n),"& .MuiDrawer-paper":yw(e,n)},...!t&&{...bw(e),"& .MuiDrawer-paper":bw(e)}}});var Ae={},Ig={exports:{}};(function(e,t){(function(n,r){var o="1.0.39",i="",a="?",l="function",u="undefined",d="object",f="string",g="major",h="model",m="name",y="type",b="vendor",C="version",A="architecture",I="console",S="mobile",T="tablet",O="smarttv",R="wearable",k="embedded",F=500,N="Amazon",M="Apple",D="ASUS",U="BlackBerry",G="Browser",H="Chrome",Y="Edge",V="Firefox",X="Google",W="Huawei",ie="LG",K="Microsoft",$="Motorola",ee="Opera",ne="Samsung",Q="Sharp",de="Sony",pe="Xiaomi",ye="Zebra",ce="Facebook",be="Chromium OS",xe="Mac OS",Ee=" Browser",me=function(Pe,je){var Ie={};for(var Ce in Pe)je[Ce]&&je[Ce].length%2===0?Ie[Ce]=je[Ce].concat(Pe[Ce]):Ie[Ce]=Pe[Ce];return Ie},Re=function(Pe){for(var je={},Ie=0;Ie<Pe.length;Ie++)je[Pe[Ie].toUpperCase()]=Pe[Ie];return je},ve=function(Pe,je){return typeof Pe===f?qe(je).indexOf(qe(Pe))!==-1:!1},qe=function(Pe){return Pe.toLowerCase()},Ft=function(Pe){return typeof Pe===f?Pe.replace(/[^\d\.]/g,i).split(".")[0]:r},bt=function(Pe,je){if(typeof Pe===f)return Pe=Pe.replace(/^\s\s*/,i),typeof je===u?Pe:Pe.substring(0,F)},st=function(Pe,je){for(var Ie=0,Ce,vt,xt,De,Oe,qt;Ie<je.length&&!Oe;){var wn=je[Ie],Un=je[Ie+1];for(Ce=vt=0;Ce<wn.length&&!Oe&&wn[Ce];)if(Oe=wn[Ce++].exec(Pe),Oe)for(xt=0;xt<Un.length;xt++)qt=Oe[++vt],De=Un[xt],typeof De===d&&De.length>0?De.length===2?typeof De[1]==l?this[De[0]]=De[1].call(this,qt):this[De[0]]=De[1]:De.length===3?typeof De[1]===l&&!(De[1].exec&&De[1].test)?this[De[0]]=qt?De[1].call(this,qt,De[2]):r:this[De[0]]=qt?qt.replace(De[1],De[2]):r:De.length===4&&(this[De[0]]=qt?De[3].call(this,qt.replace(De[1],De[2])):r):this[De]=qt||r;Ie+=2}},rn=function(Pe,je){for(var Ie in je)if(typeof je[Ie]===d&&je[Ie].length>0){for(var Ce=0;Ce<je[Ie].length;Ce++)if(ve(je[Ie][Ce],Pe))return Ie===a?r:Ie}else if(ve(je[Ie],Pe))return Ie===a?r:Ie;return je.hasOwnProperty("*")?je["*"]:Pe},mt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Xe={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"},Mt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[C,[m,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[C,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,C],[/opios[\/ ]+([\w\.]+)/i],[C,[m,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[C,[m,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[C,[m,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[C,[m,"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],[m,C],[/quark(?:pc)?\/([-\w\.]+)/i],[C,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[C,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[C,[m,"UC"+G]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[C,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[C,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[C,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[C,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[C,[m,"Smart Lenovo "+G]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure "+G],C],[/\bfocus\/([\w\.]+)/i],[C,[m,V+" Focus"]],[/\bopt\/([\w\.]+)/i],[C,[m,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[C,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[C,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[C,[m,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[C,[m,"MIUI "+G]],[/fxios\/([-\w\.]+)/i],[C,[m,V]],[/\bqihu|(qi?ho?o?|360)browser/i],[[m,"360"+Ee]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],C],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+Ee],C],[/samsungbrowser\/([\w\.]+)/i],[C,[m,ne+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[m,/_/g," "],C],[/metasr[\/ ]?([\d\.]+)/i],[C,[m,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,"Sogou Mobile"],C],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[m,C],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,ce],C],[/(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],[m,C],[/\bgsa\/([\w\.]+) .*safari\//i],[C,[m,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[C,[m,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[C,[m,H+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,H+" WebView"],C],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[C,[m,"Android "+G]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,C],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[C,[m,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[C,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[C,rn,mt]],[/(webkit|khtml)\/([\w\.]+)/i],[m,C],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],C],[/(wolvic)\/([\w\.]+)/i],[m,C],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[C,[m,V+" 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],[m,[C,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[C,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,qe]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,i,qe]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,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],[h,[b,ne],[y,T]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[h,[b,ne],[y,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[b,M],[y,S]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[b,M],[y,T]],[/(macintosh);/i],[h,[b,M]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[b,Q],[y,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[b,W],[y,T]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[b,W],[y,S]],[/\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],[[h,/_/g," "],[b,pe],[y,S]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[b,pe],[y,T]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[b,"OPPO"],[y,S]],[/\b(opd2\d{3}a?) bui/i],[h,[b,"OPPO"],[y,T]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[b,"Vivo"],[y,S]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[h,[b,"Realme"],[y,S]],[/\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],[h,[b,$],[y,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[b,$],[y,T]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[b,ie],[y,T]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[b,ie],[y,S]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[h,[b,"Lenovo"],[y,T]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[b,"Nokia"],[y,S]],[/(pixel c)\b/i],[h,[b,X],[y,T]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[b,X],[y,S]],[/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],[h,[b,de],[y,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[b,de],[y,T]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[b,"OnePlus"],[y,S]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[b,N],[y,T]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[b,N],[y,S]],[/(playbook);[-\w\),; ]+(rim)/i],[h,b,[y,T]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[b,U],[y,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[b,D],[y,T]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[b,D],[y,S]],[/(nexus 9)/i],[h,[b,"HTC"],[y,T]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[h,/_/g," "],[y,S]],[/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],[h,[b,"TCL"],[y,T]],[/(itel) ((\w+))/i],[[b,qe],h,[y,rn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[b,"Acer"],[y,T]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[b,"Meizu"],[y,S]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[h,[b,"Ulefone"],[y,S]],[/droid.+; (a(?:015|06[35]|142p?))/i],[h,[b,"Nothing"],[y,S]],[/(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],[b,h,[y,S]],[/(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],[b,h,[y,T]],[/(surface duo)/i],[h,[b,K],[y,T]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[b,"Fairphone"],[y,S]],[/(u304aa)/i],[h,[b,"AT&T"],[y,S]],[/\bsie-(\w*)/i],[h,[b,"Siemens"],[y,S]],[/\b(rct\w+) b/i],[h,[b,"RCA"],[y,T]],[/\b(venue[\d ]{2,7}) b/i],[h,[b,"Dell"],[y,T]],[/\b(q(?:mv|ta)\w+) b/i],[h,[b,"Verizon"],[y,T]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[b,"Barnes & Noble"],[y,T]],[/\b(tm\d{3}\w+) b/i],[h,[b,"NuVision"],[y,T]],[/\b(k88) b/i],[h,[b,"ZTE"],[y,T]],[/\b(nx\d{3}j) b/i],[h,[b,"ZTE"],[y,S]],[/\b(gen\d{3}) b.+49h/i],[h,[b,"Swiss"],[y,S]],[/\b(zur\d{3}) b/i],[h,[b,"Swiss"],[y,T]],[/\b((zeki)?tb.*\b) b/i],[h,[b,"Zeki"],[y,T]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],h,[y,T]],[/\b(ns-?\w{0,9}) b/i],[h,[b,"Insignia"],[y,T]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[b,"NextBook"],[y,T]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[b,"Voice"],h,[y,S]],[/\b(lvtel\-)?(v1[12]) b/i],[[b,"LvTel"],h,[y,S]],[/\b(ph-1) /i],[h,[b,"Essential"],[y,S]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[b,"Envizen"],[y,T]],[/\b(trio[-\w\. ]+) b/i],[h,[b,"MachSpeed"],[y,T]],[/\btu_(1491) b/i],[h,[b,"Rotor"],[y,T]],[/(shield[\w ]+) b/i],[h,[b,"Nvidia"],[y,T]],[/(sprint) (\w+)/i],[b,h,[y,S]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[b,K],[y,S]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[b,ye],[y,T]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[b,ye],[y,S]],[/smart-tv.+(samsung)/i],[b,[y,O]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[b,ne],[y,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,ie],[y,O]],[/(apple) ?tv/i],[b,[h,M+" TV"],[y,O]],[/crkey/i],[[h,H+"cast"],[b,X],[y,O]],[/droid.+aft(\w+)( bui|\))/i],[h,[b,N],[y,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[b,Q],[y,O]],[/(bravia[\w ]+)( bui|\))/i],[h,[b,de],[y,O]],[/(mitv-\w{5}) bui/i],[h,[b,pe],[y,O]],[/Hbbtv.*(technisat) (.*);/i],[b,h,[y,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,bt],[h,bt],[y,O]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[y,O]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[b,h,[y,I]],[/droid.+; (shield) bui/i],[h,[b,"Nvidia"],[y,I]],[/(playstation [345portablevi]+)/i],[h,[b,de],[y,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[b,K],[y,I]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[h,[b,ne],[y,R]],[/((pebble))app/i],[b,h,[y,R]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[b,M],[y,R]],[/droid.+; (glass) \d/i],[h,[b,X],[y,R]],[/droid.+; (wt63?0{2,3})\)/i],[h,[b,ye],[y,R]],[/(quest( \d| pro)?)/i],[h,[b,ce],[y,R]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[y,k]],[/(aeobc)\b/i],[h,[b,N],[y,k]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[h,[y,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[y,T]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[y,T]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[y,S]],[/(android[-\w\. ]{0,9});.+buil/i],[h,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[C,[m,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[m,"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],[m,C],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[C,m]],os:[[/microsoft (windows) (vista|xp)/i],[m,C],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[m,[C,rn,Xe]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,rn,Xe],[m,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[C,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[m,xe],[C,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[C,m],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[m,C],[/\(bb(10);/i],[C,[m,U]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[C,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[C,[m,V+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[C,[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[C,[m,"watchOS"]],[/crkey\/([\d\.]+)/i],[C,[m,H+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,be],C],[/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],[m,C],[/(sunos) ?([\w\.\d]*)/i],[[m,"Solaris"],C],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,C]]},tt=function(Pe,je){if(typeof Pe===d&&(je=Pe,Pe=r),!(this instanceof tt))return new tt(Pe,je).getResult();var Ie=typeof n!==u&&n.navigator?n.navigator:r,Ce=Pe||(Ie&&Ie.userAgent?Ie.userAgent:i),vt=Ie&&Ie.userAgentData?Ie.userAgentData:r,xt=je?me(Mt,je):Mt,De=Ie&&Ie.userAgent==Ce;return this.getBrowser=function(){var Oe={};return Oe[m]=r,Oe[C]=r,st.call(Oe,Ce,xt.browser),Oe[g]=Ft(Oe[C]),De&&Ie&&Ie.brave&&typeof Ie.brave.isBrave==l&&(Oe[m]="Brave"),Oe},this.getCPU=function(){var Oe={};return Oe[A]=r,st.call(Oe,Ce,xt.cpu),Oe},this.getDevice=function(){var Oe={};return Oe[b]=r,Oe[h]=r,Oe[y]=r,st.call(Oe,Ce,xt.device),De&&!Oe[y]&&vt&&vt.mobile&&(Oe[y]=S),De&&Oe[h]=="Macintosh"&&Ie&&typeof Ie.standalone!==u&&Ie.maxTouchPoints&&Ie.maxTouchPoints>2&&(Oe[h]="iPad",Oe[y]=T),Oe},this.getEngine=function(){var Oe={};return Oe[m]=r,Oe[C]=r,st.call(Oe,Ce,xt.engine),Oe},this.getOS=function(){var Oe={};return Oe[m]=r,Oe[C]=r,st.call(Oe,Ce,xt.os),De&&!Oe[m]&&vt&&vt.platform&&vt.platform!="Unknown"&&(Oe[m]=vt.platform.replace(/chrome os/i,be).replace(/macos/i,xe)),Oe},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 Ce},this.setUA=function(Oe){return Ce=typeof Oe===f&&Oe.length>F?bt(Oe,F):Oe,this},this.setUA(Ce),this};tt.VERSION=o,tt.BROWSER=Re([m,C,g]),tt.CPU=Re([A]),tt.DEVICE=Re([h,b,y,I,S,O,T,R,k]),tt.ENGINE=tt.OS=Re([m,C]),e.exports&&(t=e.exports=tt),t.UAParser=tt;var ot=typeof n!==u&&(n.jQuery||n.Zepto);if(ot&&!ot.ua){var wt=new tt;ot.ua=wt.getResult(),ot.ua.get=function(){return wt.getUA()},ot.ua.set=function(Pe){wt.setUA(Pe);var je=wt.getResult();for(var Ie in je)ot.ua[Ie]=je[Ie]}}})(typeof window=="object"?window:On)})(Ig,Ig.exports);var tie=Ig.exports;Object.defineProperty(Ae,"__esModule",{value:!0});function nie(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var bn=P,At=nie(bn),SA=tie,di=new SA,Cn=di.getBrowser(),rie=di.getCPU(),ir=di.getDevice(),lv=di.getEngine(),fi=di.getOS(),ic=di.getUA(),AA=function(t){return di.setUA(t)},sc=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new SA(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)}}},EA=Object.freeze({ClientUAInstance:di,browser:Cn,cpu:rie,device:ir,engine:lv,os:fi,ua:ic,setUa:AA,parseUserAgent:sc});function xw(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 oie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xw(Object(n),!0).forEach(function(r){lie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vl=function(t){return typeof t}:vl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function iie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sie(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 aie(e,t,n){return t&&sie(e.prototype,t),e}function lie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Og(){return Og=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},Og.apply(this,arguments)}function cie(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&&jg(e,t)}function Pg(e){return Pg=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pg(e)}function jg(e,t){return jg=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},jg(e,t)}function uie(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Pr(e,t){if(e==null)return{};var n=uie(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function die(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 Fu(e)}function fie(e,t){return pie(e)||hie(e,t)||gie(e,t)||mie()}function pie(e){if(Array.isArray(e))return e}function hie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,l;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(u){i=!0,l=u}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw l}}return r}}function gie(e,t){if(e){if(typeof e=="string")return Cw(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 Cw(e,t)}}function Cw(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 mie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
238
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var yn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},zn={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"},Sa={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},vie={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},yie=function(t){switch(t){case yn.Mobile:return{isMobile:!0};case yn.Tablet:return{isTablet:!0};case yn.SmartTv:return{isSmartTV:!0};case yn.Console:return{isConsole:!0};case yn.Wearable:return{isWearable:!0};case yn.Browser:return{isBrowser:!0};case yn.Embedded:return{isEmbedded:!0};default:return vie}},bie=function(t){return AA(t)},Be=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},cv=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},uv=function(t){var n=cv();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},xie=function(t,n,r,o,i){return{isBrowser:t,browserMajorVersion:Be(n.major),browserFullVersion:Be(n.version),browserName:Be(n.name),engineName:Be(r.name),engineVersion:Be(r.version),osName:Be(o.name),osVersion:Be(o.version),userAgent:Be(i)}},ww=function(t,n,r,o){return oie({},t,{vendor:Be(n.vendor),model:Be(n.model),os:Be(r.name),osVersion:Be(r.version),ua:Be(o)})},Cie=function(t,n,r,o){return{isSmartTV:t,engineName:Be(n.name),engineVersion:Be(n.version),osName:Be(r.name),osVersion:Be(r.version),userAgent:Be(o)}},wie=function(t,n,r,o){return{isConsole:t,engineName:Be(n.name),engineVersion:Be(n.version),osName:Be(r.name),osVersion:Be(r.version),userAgent:Be(o)}},Sie=function(t,n,r,o){return{isWearable:t,engineName:Be(n.name),engineVersion:Be(n.version),osName:Be(r.name),osVersion:Be(r.version),userAgent:Be(o)}},Aie=function(t,n,r,o,i){return{isEmbedded:t,vendor:Be(n.vendor),model:Be(n.model),engineName:Be(r.name),engineVersion:Be(r.version),osName:Be(o.name),osVersion:Be(o.version),userAgent:Be(i)}};function Eie(e){var t=e?sc(e):EA,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,l=yie(n.type),u=l.isBrowser,d=l.isMobile,f=l.isTablet,g=l.isSmartTV,h=l.isConsole,m=l.isWearable,y=l.isEmbedded;if(u)return xie(u,r,o,i,a);if(g)return Cie(g,o,i,a);if(h)return wie(h,o,i,a);if(d||f)return ww(l,n,i,a);if(m)return Sie(m,o,i,a);if(y)return Aie(y,n,o,i,a)}var TA=function(t){var n=t.type;return n===yn.Mobile},IA=function(t){var n=t.type;return n===yn.Tablet},OA=function(t){var n=t.type;return n===yn.Mobile||n===yn.Tablet},PA=function(t){var n=t.type;return n===yn.SmartTv},Od=function(t){var n=t.type;return n===yn.Browser},jA=function(t){var n=t.type;return n===yn.Wearable},RA=function(t){var n=t.type;return n===yn.Console},kA=function(t){var n=t.type;return n===yn.Embedded},MA=function(t){var n=t.vendor;return Be(n)},_A=function(t){var n=t.model;return Be(n)},DA=function(t){var n=t.type;return Be(n,"browser")},FA=function(t){var n=t.name;return n===Sa.Android},BA=function(t){var n=t.name;return n===Sa.Windows},LA=function(t){var n=t.name;return n===Sa.MAC_OS},NA=function(t){var n=t.name;return n===Sa.WindowsPhone},$A=function(t){var n=t.name;return n===Sa.IOS},VA=function(t){var n=t.version;return Be(n)},WA=function(t){var n=t.name;return Be(n)},zA=function(t){var n=t.name;return n===zn.Chrome},UA=function(t){var n=t.name;return n===zn.Firefox},HA=function(t){var n=t.name;return n===zn.Chromium},Pd=function(t){var n=t.name;return n===zn.Edge},GA=function(t){var n=t.name;return n===zn.Yandex},qA=function(t){var n=t.name;return n===zn.Safari||n===zn.MobileSafari},YA=function(t){var n=t.name;return n===zn.MobileSafari},KA=function(t){var n=t.name;return n===zn.Opera},XA=function(t){var n=t.name;return n===zn.InternetExplorer||n===zn.Ie},ZA=function(t){var n=t.name;return n===zn.MIUI},QA=function(t){var n=t.name;return n===zn.SamsungBrowser},JA=function(t){var n=t.version;return Be(n)},eE=function(t){var n=t.major;return Be(n)},tE=function(t){var n=t.name;return Be(n)},nE=function(t){var n=t.name;return Be(n)},rE=function(t){var n=t.version;return Be(n)},oE=function(){var t=cv(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Xs=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},iE=function(){var t=cv();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Hr=function(){return uv("iPad")},sE=function(){return uv("iPhone")},aE=function(){return uv("iPod")},lE=function(t){return Be(t)};function cE(e){var t=e||EA,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:PA(n),isConsole:RA(n),isWearable:jA(n),isEmbedded:kA(n),isMobileSafari:YA(r)||Hr(),isChromium:HA(r),isMobile:OA(n)||Hr(),isMobileOnly:TA(n),isTablet:IA(n)||Hr(),isBrowser:Od(n),isDesktop:Od(n),isAndroid:FA(o),isWinPhone:NA(o),isIOS:$A(o)||Hr(),isChrome:zA(r),isFirefox:UA(r),isSafari:qA(r),isOpera:KA(r),isIE:XA(r),osVersion:VA(o),osName:WA(o),fullBrowserVersion:JA(r),browserVersion:eE(r),browserName:tE(r),mobileVendor:MA(n),mobileModel:_A(n),engineName:nE(i),engineVersion:rE(i),getUA:lE(a),isEdge:Pd(r)||Xs(a),isYandex:GA(r),deviceType:DA(n),isIOS13:iE(),isIPad13:Hr(),isIPhone13:sE(),isIPod13:aE(),isElectron:oE(),isEdgeChromium:Xs(a),isLegacyEdge:Pd(r)&&!Xs(a),isWindows:BA(o),isMacOs:LA(o),isMIUI:ZA(r),isSamsungBrowser:QA(r)}}var uE=PA(ir),dE=RA(ir),fE=jA(ir),Tie=kA(ir),Iie=YA(Cn)||Hr(),Oie=HA(Cn),Of=OA(ir)||Hr(),pE=TA(ir),hE=IA(ir)||Hr(),gE=Od(ir),Pie=Od(ir),mE=FA(fi),vE=NA(fi),yE=$A(fi)||Hr(),jie=zA(Cn),Rie=UA(Cn),kie=qA(Cn),Mie=KA(Cn),bE=XA(Cn),_ie=VA(fi),Die=WA(fi),Fie=JA(Cn),Bie=eE(Cn),Lie=tE(Cn),Nie=MA(ir),$ie=_A(ir),Vie=nE(lv),Wie=rE(lv),zie=lE(ic),Uie=Pd(Cn)||Xs(ic),Hie=GA(Cn),Gie=DA(ir),qie=iE(),Yie=Hr(),Kie=sE(),Xie=aE(),Zie=oE(),Qie=Xs(ic),Jie=Pd(Cn)&&!Xs(ic),ese=BA(fi),tse=LA(fi),nse=ZA(Cn),rse=QA(Cn),ose=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=sc(t),r=n.device,o=n.browser,i=n.os,a=n.engine,l=n.ua;return cE({device:r,browser:o,os:i,engine:a,ua:l})},ise=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return mE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},sse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return gE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},ase=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return bE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},lse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return yE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},cse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return Of?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},use=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return hE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},dse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return vE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},fse=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=Pr(t,["renderWithFragment","children","viewClassName","style"]);return pE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},pse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return uE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},hse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return dE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},gse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return fE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},mse=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,i=Pr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?At.createElement(bn.Fragment,null,r):At.createElement("div",i,r):null};function vse(e){return function(t){cie(n,t);function n(r){var o;return iie(this,n),o=die(this,Pg(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(Fu(o)),o.onOrientationChange=o.onOrientationChange.bind(Fu(o)),o.onPageLoad=o.onPageLoad.bind(Fu(o)),o.state={isLandscape:!1,isPortrait:!1},o}return aie(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":vl(window))!==void 0&&Of&&(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 At.createElement(e,Og({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(At.Component)}function yse(){var e=bn.useState(function(){var i=window.innerWidth>window.innerHeight?90:0;return{isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"}}),t=fie(e,2),n=t[0],r=t[1],o=bn.useCallback(function(){var i=window.innerWidth>window.innerHeight?90:0,a={isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return bn.useEffect(function(){return(typeof window>"u"?"undefined":vl(window))!==void 0&&Of&&(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 xE(e){var t=e||window.navigator.userAgent;return sc(t)}function bse(e){var t=e||window.navigator.userAgent,n=xE(t),r=cE(n);return[r,n]}Ae.AndroidView=ise;Ae.BrowserTypes=zn;var xse=Ae.BrowserView=sse;Ae.ConsoleView=hse;Ae.CustomView=mse;Ae.IEView=ase;Ae.IOSView=lse;Ae.MobileOnlyView=fse;var Cse=Ae.MobileView=cse;Ae.OsTypes=Sa;Ae.SmartTVView=pse;Ae.TabletView=use;Ae.WearableView=gse;Ae.WinPhoneView=dse;Ae.browserName=Lie;Ae.browserVersion=Bie;Ae.deviceDetect=Eie;Ae.deviceType=Gie;Ae.engineName=Vie;Ae.engineVersion=Wie;Ae.fullBrowserVersion=Fie;Ae.getSelectorsByUserAgent=ose;Ae.getUA=zie;Ae.isAndroid=mE;Ae.isBrowser=gE;Ae.isChrome=jie;Ae.isChromium=Oie;Ae.isConsole=dE;Ae.isDesktop=Pie;Ae.isEdge=Uie;Ae.isEdgeChromium=Qie;Ae.isElectron=Zie;Ae.isEmbedded=Tie;Ae.isFirefox=Rie;Ae.isIE=bE;Ae.isIOS=yE;Ae.isIOS13=qie;Ae.isIPad13=Yie;Ae.isIPhone13=Kie;Ae.isIPod13=Xie;Ae.isLegacyEdge=Jie;Ae.isMIUI=nse;Ae.isMacOs=tse;Ae.isMobile=Of;Ae.isMobileOnly=pE;Ae.isMobileSafari=Iie;Ae.isOpera=Mie;Ae.isSafari=kie;Ae.isSamsungBrowser=rse;Ae.isSmartTV=uE;Ae.isTablet=hE;Ae.isWearable=fE;Ae.isWinPhone=vE;Ae.isWindows=ese;Ae.isYandex=Hie;Ae.mobileModel=$ie;Ae.mobileVendor=Nie;Ae.osName=Die;Ae.osVersion=_ie;Ae.parseUserAgent=sc;Ae.setUserAgent=bie;Ae.useDeviceData=xE;Ae.useDeviceSelectors=bse;Ae.useMobileOrientation=yse;Ae.withOrientationChange=vse;var wse=typeof global=="object"&&global&&global.Object===Object&&global,Sse=typeof self=="object"&&self&&self.Object===Object&&self,CE=wse||Sse||Function("return this")(),jd=CE.Symbol,wE=Object.prototype,Ase=wE.hasOwnProperty,Ese=wE.toString,tl=jd?jd.toStringTag:void 0;function Tse(e){var t=Ase.call(e,tl),n=e[tl];try{e[tl]=void 0;var r=!0}catch{}var o=Ese.call(e);return r&&(t?e[tl]=n:delete e[tl]),o}var Ise=Object.prototype,Ose=Ise.toString;function Pse(e){return Ose.call(e)}var jse="[object Null]",Rse="[object Undefined]",Sw=jd?jd.toStringTag:void 0;function kse(e){return e==null?e===void 0?Rse:jse:Sw&&Sw in Object(e)?Tse(e):Pse(e)}function Mse(e){return e!=null&&typeof e=="object"}var _se="[object Symbol]";function Dse(e){return typeof e=="symbol"||Mse(e)&&kse(e)==_se}var Fse=/\s/;function Bse(e){for(var t=e.length;t--&&Fse.test(e.charAt(t)););return t}var Lse=/^\s+/;function Nse(e){return e&&e.slice(0,Bse(e)+1).replace(Lse,"")}function Rd(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Aw=NaN,$se=/^[-+]0x[0-9a-f]+$/i,Vse=/^0b[01]+$/i,Wse=/^0o[0-7]+$/i,zse=parseInt;function Ew(e){if(typeof e=="number")return e;if(Dse(e))return Aw;if(Rd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Rd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Nse(e);var n=Vse.test(e);return n||Wse.test(e)?zse(e.slice(2),n?2:8):$se.test(e)?Aw:+e}var Th=function(){return CE.Date.now()},Use="Expected a function",Hse=Math.max,Gse=Math.min;function Bu(e,t,n){var r,o,i,a,l,u,d=0,f=!1,g=!1,h=!0;if(typeof e!="function")throw new TypeError(Use);t=Ew(t)||0,Rd(n)&&(f=!!n.leading,g="maxWait"in n,i=g?Hse(Ew(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(R){var k=r,F=o;return r=o=void 0,d=R,a=e.apply(F,k),a}function y(R){return d=R,l=setTimeout(A,t),f?m(R):a}function b(R){var k=R-u,F=R-d,N=t-k;return g?Gse(N,i-F):N}function C(R){var k=R-u,F=R-d;return u===void 0||k>=t||k<0||g&&F>=i}function A(){var R=Th();if(C(R))return I(R);l=setTimeout(A,b(R))}function I(R){return l=void 0,h&&r?m(R):(r=o=void 0,a)}function S(){l!==void 0&&clearTimeout(l),d=0,r=u=o=l=void 0}function T(){return l===void 0?a:I(Th())}function O(){var R=Th(),k=C(R);if(r=arguments,o=this,u=R,k){if(l===void 0)return y(u);if(g)return clearTimeout(l),l=setTimeout(A,t),m(u)}return l===void 0&&(l=setTimeout(A,t)),a}return O.cancel=S,O.flush=T,O}var qse="Expected a function";function Yse(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(qse);return Rd(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Bu(e,t,{leading:r,maxWait:t,trailing:o})}var Gs=function(){return Gs=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Gs.apply(this,arguments)};function SE(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function AE(e){return!e||!e.ownerDocument?document:e.ownerDocument}var EE=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(l,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 TE(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function IE(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function OE(e){return".".concat(e.split(" ").join("."))}var dv=!!(typeof window<"u"&&window.document&&window.document.createElement),Kse=Object.freeze({__proto__:null,addClasses:TE,canUseDOM:dv,classNamesToQuery:OE,getElementDocument:AE,getElementWindow:SE,getOptions:EE,removeClasses:IE}),Fs=null,Tw=null;dv&&window.addEventListener("resize",function(){Tw!==window.devicePixelRatio&&(Tw=window.devicePixelRatio,Fs=null)});function Iw(){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 Ho=SE,Ih=AE,Xse=EE,Go=TE,qo=IE,Dn=OE,yu=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=Ho(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,Go(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(){qo(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(Go(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){qo(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 i,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)&&(i=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(i||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(i&&(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 i,a,l,u,d,f,g,h,m,y,b;if(!(!r.draggedAxis||!r.contentWrapperEl)){var C,A=r.axis[r.draggedAxis].track,I=(a=(i=A.rect)===null||i===void 0?void 0:i[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,S=r.axis[r.draggedAxis].scrollbar,T=(u=(l=r.contentWrapperEl)===null||l===void 0?void 0:l[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,O=parseInt((f=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&f!==void 0?f:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?C=o.pageY:C=o.pageX;var R=C-((h=(g=A.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-r.axis[r.draggedAxis].dragOffset;R=r.draggedAxis==="x"&&r.isRtl?((y=(m=A.rect)===null||m===void 0?void 0:m[r.axis[r.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-S.size-R:R;var k=R/(I-S.size),F=k*(T-O);r.draggedAxis==="x"&&r.isRtl&&(F=!((b=e.getRtlHelpers())===null||b===void 0)&&b.isScrollingToNegative?-F:F),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=F}},this.onEndDrag=function(o){r.isDragging=!1;var i=Ih(r.el),a=Ho(r.el);o.preventDefault(),o.stopPropagation(),qo(r.el,r.classNames.dragging),r.onStopScrolling(),i.removeEventListener("mousemove",r.drag,!0),i.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){i.removeEventListener("click",r.preventClick,!0),i.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Gs(Gs({},e.defaultOptions),n),this.classNames=Gs(Gs({},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=Yse(this._onMouseMove,64),this.onWindowResize=Bu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Bu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Bu(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),i=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==i.left,isScrollingToNegative:i.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:Iw()}catch{return Iw()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=Ih(t),o=Ho(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){dv&&(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(Dn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Dn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Dn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Dn(this.classNames.offset)),this.maskEl=this.el.querySelector(Dn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Dn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Dn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Dn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Dn(this.classNames.track)).concat(Dn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Dn(this.classNames.track)).concat(Dn(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Dn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(Dn(this.classNames.scrollbar)))||null,this.options.autoHide||(Go(this.axis.x.scrollbar.el,this.classNames.visible),Go(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=Ho(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,i=r.ResizeObserver||ResizeObserver;this.resizeObserver=new i(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=Ho(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,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,l=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 f=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>f,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=l==="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,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>i-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>f-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],i=(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=i/o,l;return l=Math.max(~~(a*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(l=Math.min(l,this.options.scrollbarMaxSize)),l},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var i=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!i.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],l=((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 f=d/(a-u),g=~~((l-i.size)*f);g=t==="x"&&this.isRtl?-g+(l-i.size):g,i.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&&(Go(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&&(qo(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),Go(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Go(n.scrollbar.el,this.classNames.hover):qo(n.scrollbar.el,this.classNames.hover)):(qo(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),qo(this.axis[t].track.el,this.classNames.hover),qo(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=Ih(this.el),i=Ho(this.el),a=this.axis[n].scrollbar,l=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=l-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Go(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)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,i,a,l;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Ho(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var f=this.axis[n].scrollbar,g=(i=(o=f.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&i!==void 0?i:0,h=parseInt((l=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&l!==void 0?l:"0px",10),m=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],y=n==="y"?this.mouseY-g:this.mouseX-g,b=y<0?-1:1,C=b===-1?m-h:m+h,A=40,I=function(){r.contentWrapperEl&&(b===-1?m>C&&(m-=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,d.requestAnimationFrame(I)):m<C&&(m+=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,d.requestAnimationFrame(I)))};I()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Ho(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=Xse,e.helpers=Kse,e}(),Qn=function(){return Qn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Qn.apply(this,arguments)};function Zse(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 PE=L.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,i=Zse(e,["children","scrollableNodeProps"]),a=L.useRef(),l=L.useRef(),u=L.useRef(),d={},f={};Object.keys(i).forEach(function(m){Object.prototype.hasOwnProperty.call(yu.defaultOptions,m)?d[m]=i[m]:f[m]=i[m]});var g=Qn(Qn({},yu.defaultOptions.classNames),d.classNames),h=Qn(Qn({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||yu.defaultOptions.ariaLabel});return L.useEffect(function(){var m;return l.current=h.ref?h.ref.current:l.current,a.current&&(m=new yu(a.current,Qn(Qn(Qn({},d),l.current&&{scrollableNode:l.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(m):t&&(t.current=m)),function(){m==null||m.unMount(),m=null,typeof t=="function"&&t(null)}},[]),L.createElement("div",Qn({"data-simplebar":"init",ref:a},f),L.createElement("div",{className:g.wrapper},L.createElement("div",{className:g.heightAutoObserverWrapperEl},L.createElement("div",{className:g.heightAutoObserverEl})),L.createElement("div",{className:g.mask},L.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:l,scrollableNodeProps:Qn(Qn({},h),{ref:l}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):L.createElement("div",Qn({},h),L.createElement("div",{className:g.contentEl},n)))),L.createElement("div",{className:g.placeholder})),L.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},L.createElement("div",{className:g.scrollbar})),L.createElement("div",{className:"".concat(g.track," simplebar-vertical")},L.createElement("div",{className:g.scrollbar})))});PE.displayName="SimpleBar";const Qse=ge(xse)({flexGrow:1,height:"100%",overflow:"hidden"}),Jse=ge(PE)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:nt(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 jE({children:e,sx:t,...n}){return p.jsxs(p.Fragment,{children:[p.jsx(Qse,{children:p.jsx(Jse,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),p.jsx(Cse,{children:p.jsx(E.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function RE(e){const t=E.useTheme(),n=Br(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=or(),{open:o,handleDrawerToggle:i,width:a}=ts(),l=r?E.Drawer:eie,u=document.body,d=P.useMemo(()=>r?{container:u,variant:"temporary",onClose:i,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,i,a,t.palette.divider]);return p.jsx(E.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:p.jsxs(l,{...d,open:o,children:[p.jsx(wA,{}),p.jsx(jE,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function fv(e){const{name:t,version:n,copy:r="© Applica Software Guru for"}=e;return p.jsx(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:p.jsxs(E.Typography,{variant:"caption",children:[p.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const kE=ge(E.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Pn();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})}}}),ME=P.forwardRef(function(t,n){const r=Br(t,{color:"text.primary"},{defaults:!0});return p.jsx(E.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),eae=P.forwardRef(function(t,n){const r=Br(t,{color:"text.primary"},{defaults:!0});return p.jsx(of,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Aa=P.forwardRef(function(t,n){const r=Br(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return p.jsx(E.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function _E({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=ba(),[i,a]=oe.useLocaleState(),l=oe.useLocales();if(l.length===0)return null;function u(d){if(e){e(d,r);return}a(d),r()}return p.jsxs(p.Fragment,{children:[p.jsx(ME,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:p.jsxs(E.Stack,{direction:"row",spacing:.5,children:[p.jsx(E.Typography,{variant:"body1",children:i.toUpperCase()}),t?p.jsx(ze.CaretUpOutlined,{}):p.jsx(ze.CaretDownOutlined,{})]})}),p.jsx(E.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:l.map((d,f)=>p.jsx(E.MenuItem,{onClick:()=>u(d.locale),children:d.name},f))})]})}const tae={ml:{xs:0,lg:-2}};function DE(){const{open:e,handleDrawerToggle:t}=ts();return p.jsx(Aa,{value:"drawer","aria-label":"open drawer",sx:tae,onChange:t,selected:e,children:e?p.jsx(ze.MenuFoldOutlined,{}):p.jsx(ze.MenuUnfoldOutlined,{})})}function FE(e){const t=P.useRef(),n=E.useTheme(),{downLg:r,horizontal:o}=or(),{open:i,width:a}=ts(),l=r?E.AppBar:kE,d={position:"fixed",color:"inherit",elevation:0,sx:Br(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":i?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||se.extend(d,{open:i}),p.jsx(l,{ref:t,...d,children:p.jsxs(E.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&p.jsx(DE,{}),e.children]})})}function nae(e){const t=E.useTheme(),{notification:n,onClick:r,selected:o,divider:i}=e,{resource:a}=If(),l=oe.useNotify(),u=oe.useRedirect(),[d]=oe.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Fr().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:()=>{l("resources.notifications.messages.readed.error","warning")}}),f=P.useCallback(()=>d(),[d]),[g]=oe.useLocaleState(),h=P.useMemo(()=>Fr(n.created).locale(g).fromNow(),[n,g]);return p.jsx(E.ListItem,{disablePadding:!0,divider:i,children:p.jsxs(E.ListItemButton,{selected:o,onClick:f,children:[p.jsx(E.ListItemAvatar,{children:p.jsx(E.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:p.jsx(ze.MessageOutlined,{})})}),p.jsx(E.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),p.jsx(E.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),p.jsx(E.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:h,primaryTypographyProps:{variant:"caption"}})]})})}function BE(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:i,resource:a,selectedIds:l=[],onUnselectItems:u}=oe.useListContext(e),d=oe.useTranslate(),f=P.useCallback(()=>{u()},[u]);return p.jsx(rae,{className:r,children:p.jsxs(E.Toolbar,{"data-test":"bulk-actions-toolbar",className:$e(_r.toolbar,{[_r.collapsed]:l.length===0}),...oe.sanitizeListRestProps(o),children:[p.jsxs("div",{className:_r.title,children:[p.jsx(E.IconButton,{className:_r.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:f,size:"small",children:p.jsx(cn.Close,{fontSize:"small"})}),p.jsx(E.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:l.length})})]}),p.jsx(z.TopToolbar,{className:_r.topToolbar,children:P.Children.map(n,g=>P.isValidElement(g)?P.cloneElement(g,{filterValues:i,resource:a,selectedIds:l}):null)})]})})}const Mi="RaBulkActionsToolbar",_r={toolbar:`${Mi}-toolbar`,topToolbar:`${Mi}-topToolbar`,buttons:`${Mi}-buttons`,collapsed:`${Mi}-collapsed`,title:`${Mi}-title`,icon:`${Mi}-icon`},rae=ge("div",{name:Mi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${_r.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"?tg(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},[`& .${_r.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${_r.buttons}`]:{},[`& .${_r.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${_r.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${_r.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),Oh={p:0,m:0},Ow={p:2,m:0,borderRadius:0,width:"100%"};function oae(e){const{children:t}=e,[n,r]=L.useState(null);function o(y){r(y.currentTarget)}function i(){r(null)}const a=E.useMediaQuery(y=>y.breakpoints.down("md")),{filterValues:l,resource:u,selectedIds:d=[],onUnselectItems:f}=z.useListContext(e),g=!!n&&d!==void 0&&d.length>0,h=g?"simple-popover":void 0,m=L.useCallback(()=>{f(),r(null)},[f,r]);return p.jsx(E.Fade,{in:d!==void 0&&d.length>0,children:p.jsxs(E.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[p.jsx(E.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),p.jsx(E.Popover,{id:h,open:g,anchorEl:n,onClose:i,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:p.jsxs(E.List,{sx:Oh,children:[p.jsx(E.ListItem,{sx:Oh,children:p.jsx(z.Button,{onClick:m,sx:Ow,label:"ra.action.unselect",startIcon:p.jsx(xg,{}),children:p.jsx(xg,{})})}),L.Children.map(t,y=>{var b;return p.jsx(E.ListItem,{sx:Oh,children:L.isValidElement(y)?L.cloneElement(y,{filterValues:l,resource:u,selectedIds:d,sx:Ow,...(b=y.props)!=null&&b.popover?{closePopover:i}:{}}):null})})]})})]})})}const LE=P.createContext({});LE.displayName="DatagridContext";function iae({children:e,value:t}){return p.jsx(LE.Provider,{value:t,children:e})}const sae=E.styled("div")(({theme:e})=>({padding:e.spacing(2),display:"flex",justifyContent:"center",gap:e.spacing(2)})),yl="ApplicaEmpty",Wi={message:`${yl}-message`,icon:`${yl}-icon`,toolbar:`${yl}-toolbar`},aae=E.styled("span",{name:yl,slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,height:"calc(100vh - 200px)",[`& .${Wi.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Wi.icon}`]:{fontSize:"9em",marginTop:"16px",marginBottom:"16px"},[`& .${Wi.toolbar}`]:{textAlign:"center"}}));function ac({actions:e,className:t,hasCreate:n,icon:r=p.jsx(ze.DropboxOutlined,{className:Wi.icon}),title:o,subtitle:i,sx:a,...l}){const{hasCreate:u}=oe.useResourceDefinition(l),d=n??u,f=oe.useResourceContext(l),g=oe.useTranslate(),h=oe.useGetResourceLabel(),m=f?g(`resources.${f}.forcedCaseName`,{smart_count:0,_:h(f,0)}):g("ra.empty.no_resource"),y=g("ra.page.empty",{name:m}),b=g("ra.page.invite");return p.jsxs(aae,{className:$e(`${yl}-root`,t),sx:a,children:[p.jsxs(E.Box,{className:Wi.message,children:[r,p.jsx(E.Typography,{variant:"h4",paragraph:!0,children:o||g(`resources.${f}.empty`,{_:y})}),i||(d?p.jsx(E.Typography,{variant:"body1",children:g(`resources.${f}.invite`,{_:b})}):null)]}),p.jsx(sae,{className:Wi.toolbar,children:e||(d?p.jsx(v6,{disableFloatingButton:!0}):null)})]})}const Pw=p.jsx(z.BulkDeleteButton,{}),NE=L.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?z.PureDatagridBody:z.DatagridBody,header:o=z.DatagridHeader,children:i,className:a,empty:l,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:f=Pw,hover:g,isRowSelectable:h,isRowExpandable:m,resource:y,rowClick:b,rowSx:C,rowStyle:A,size:I="small",sx:S,expandSingle:T=!1,...O}=e,R=oe.useTranslate(),{sort:k,data:F,isLoading:N,onSelect:M,onToggleItem:D,selectedIds:U,setSort:G,total:H}=oe.useListContext(e),Y=!!f,V=P.useMemo(()=>({isRowExpandable:m,expandSingle:T}),[m,T]),X=P.useRef(null);P.useEffect(()=>{(!U||U.length===0)&&(X.current=null)},[JSON.stringify(U)]);const W=P.useCallback((K,$)=>{const ee=F.map(Q=>Q.id),ne=ee.indexOf(X.current);if(X.current=$.target.checked?K:null,$.shiftKey&&ne!==-1){const Q=ee.indexOf(K),de=ee.slice(Math.min(ne,Q),Math.max(ne,Q)+1),pe=$.target.checked?wee(U,de):Bee(U,de);M(h?pe.filter(ye=>h(F.find(ce=>ce.id===ye))):pe)}else D(K)},[F,h,M,D,U]),ie=p.jsx(ac,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(E.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:R("ra.navigation.no_results")})});return N===!0?p.jsx(z.DatagridLoading,{className:a,expand:u,hasBulkActions:Y,nbChildren:L.Children.count(i),size:I}):F==null||F.length===0||H===0?l||ie:p.jsx(iae,{value:V,children:p.jsxs(z.DatagridRoot,{sx:S,className:$e(z.DatagridClasses.root,a),children:[d!=null&&P.isValidElement(d)?P.cloneElement(d,{selectedIds:U,total:H}):f!==!1?p.jsx(BE,{children:P.isValidElement(f)?f:Pw}):null,p.jsx("div",{className:z.DatagridClasses.tableWrapper,children:p.jsxs(E.Table,{ref:t,className:z.DatagridClasses.table,size:I,...cae(O),children:[jw(o,{children:i,sort:k,data:F,hasExpand:!!u,hasBulkActions:Y,isRowSelectable:h,onSelect:M,resource:y,selectedIds:U,setSort:G},i),jw(r,{expand:u,rowClick:b,data:F,hasBulkActions:Y,hover:g,onToggleItem:W,resource:y,rowSx:C,rowStyle:A,selectedIds:U,isRowSelectable:h},i)]})})]})})});function jw(e,t,n){return P.isValidElement(e)?P.cloneElement(e,t,n):P.createElement(e,t,n)}const lae=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function cae(e){return Object.keys(oe.sanitizeListRestProps(e)).filter(t=>!lae.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}NE.displayName="Datagrid";const uae=ge(NE,{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 dae(e){return p.jsx(uae,{...e})}const pv=P.createContext({hasFilterSidebar:!1});function $E(){var e;return((e=P.useContext(pv))==null?void 0:e.hasFilterSidebar)??!1}function hv({source:e,value:t}){const n=P.useContext(z.FilterContext),r=z.useResourceContext(),o=P.useMemo(()=>n.find(u=>{var d;return P.isValidElement(u)&&((d=u.props)==null?void 0:d.source)===e}),[n,e]),i=P.useMemo(()=>P.isValidElement(o)?o.props:{},[o]);if(!(i!=null&&i.chip))throw new Error(`No chip component found for filter source "${e}". Ensure your filter components define a 'chip' prop.`);const a={...i,record:{[e]:t},value:t,resource:r};return P.isValidElement(i.chip)?P.cloneElement(i.chip,a):Ke.isFunction(i.chip)?P.createElement(i.chip,a):null}function fae(e){const{value:t,source:n,lastItem:r}=e,o=hv({source:n,value:t});return p.jsxs(E.Stack,{children:[p.jsx(E.ListItem,{alignItems:"flex-start",sx:{pl:0},children:p.jsx(E.ListItemText,{primary:o,sx:{my:0}})}),r===n?null:p.jsx(E.Divider,{})]})}function pae(){const{filterValues:e}=oe.useListContext(),t=oe.useTranslate();return p.jsxs(E.Stack,{mt:4,width:"100%",children:[p.jsx(E.Typography,{variant:"h6",fontWeight:"bold",color:"secondary",children:t("ra.title.selected_filters")}),p.jsx(E.List,{sx:{bgcolor:"background.paper",pt:0},children:e?Object.entries(e).map(([n,r])=>{const o=Object.entries(e).pop(),i=o?o[0]:"";return p.jsx(fae,{lastItem:i,value:r,source:n},n)}):null})]})}function hae(e){const{onClose:t,addQuery:n}=e,r=oe.useTranslate(),{handleSubmit:o}=un.useFormContext(),i=P.useCallback(a=>{n(a.queryName)},[n]);return p.jsxs(E.Toolbar,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[p.jsx(E.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(E.Button,{variant:"contained",onClick:o(i),children:r("ra.action.save")})]})}function VE(e){const{open:t,onClose:n}=e,{filterValues:r,sort:o,perPage:i,displayedFilters:a,resource:l}=oe.useListContext(),[u,d]=DS(l),f=oe.useTranslate(),g=P.useCallback(m=>{const y={label:m.trim(),value:{filter:r,sort:o,perPage:i,displayedFilters:a}},b=FS(u);d(b.concat(y)),n()},[r,o,i,a,u,d,n]),h=P.useCallback(()=>m=>{if(u.some(y=>y.label===(m==null?void 0:m.trim())))return"ra.validation.already_exists"},[u]);return p.jsx(E.Dialog,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:p.jsxs(X0,{toolbar:p.jsx(hae,{addQuery:g,onClose:n}),title:f("ra.title.save_favorite_filter"),modal:!0,children:[p.jsx(wr,{fullWidth:!0,source:"queryName",label:f("ra.input.query_name"),placeholder:f("ra.input.query_name_placeholder"),validate:[oe.required(),h()]}),p.jsx(pae,{})]})})}function WE(){const[e,t]=P.useState(!1),n=oe.useTranslate(),r=P.useCallback(()=>{t(!1)},[]),o=P.useCallback(()=>{t(!0)},[]);return p.jsxs(p.Fragment,{children:[p.jsx(E.Button,{sx:{height:"36px"},variant:"contained",onClick:o,children:n("ra.action.save_filter")}),p.jsx(VE,{open:e,onClose:r})]})}function gae(e){const{onDelete:t,value:n,source:r}=e,o=hv({source:r,value:n});return o&&p.jsx(E.Chip,{label:o,variant:"combined",color:"primary",sx:{height:"36px","& .MuiChip-deleteIcon":{fontSize:"1rem !important",mr:1}},deleteIcon:p.jsx(cn.Close,{}),onDelete:t})}function mae(){const{filterValues:e,setFilters:t}=oe.useListContext(),n=E.useTheme(),r=E.useMediaQuery(n.breakpoints.down("sm")),o=oe.useTranslate(),i=P.useCallback(()=>{t({})},[t]),a=P.useCallback(u=>{const d={...e};delete d[u],t(d)},[e,t]),l=P.useCallback(()=>p.jsxs(E.Stack,{flexDirection:"row",gap:2,children:[p.jsx(WE,{}),p.jsx(E.Button,{variant:"outlined",onClick:i,children:o("ra.action.reset_filters")})]}),[i,o]);return p.jsxs(E.Stack,{gap:2,flexDirection:r?"column":"row",children:[p.jsxs(E.Stack,{flexDirection:"row",flexWrap:r?"nowrap":"wrap",gap:2,py:.5,overflow:"auto",width:r?window.innerWidth-58:"auto",children:[Object.entries(e).map(([u,d])=>p.jsx(gae,{source:u,value:d,onDelete:()=>a(u)},u)),r?null:p.jsx(l,{})]}),r?p.jsx(l,{}):null]})}function Rg(){const{filterValues:e}=oe.useListContext(),t=E.useTheme(),n=E.useMediaQuery(t.breakpoints.down("sm")),r=oe.useTranslate();return e&&!Ke.isEmpty(e)?p.jsxs(E.Stack,{flexDirection:n?"column":"row",alignItems:"baseline",gap:2,m:n?2:0,children:[p.jsx(E.Typography,{variant:"h6",color:"secondary",whiteSpace:"nowrap",children:r("ra.title.active_filters")}),p.jsx(mae,{})]}):null}function zE({open:e,onClose:t,filterToRemove:n}){var y;const r=oe.useTranslate(),{resource:o,filterValues:i,sort:a,perPage:l,displayedFilters:u}=oe.useListContext(),d=((y=n==null?void 0:n.value)==null?void 0:y.filter)||i,f=(n==null?void 0:n.label)??"",[g,h]=z.useSavedQueries(o);function m(){const b={filter:d,sort:a,perPage:l,displayedFilters:u},C=z.extractValidSavedQueries(g),A=C.findIndex(I=>jl(I.value,b));h([...C.slice(0,A),...C.slice(A+1)]),t()}return p.jsxs(E.Dialog,{open:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[p.jsx(E.DialogTitle,{id:"alert-dialog-title",children:r("ra.saved_queries.remove_dialog_title",{label:f,_:"Remove saved query?"})}),p.jsx(E.DialogContent,{children:p.jsx(E.DialogContentText,{children:r("ra.saved_queries.remove_message",{_:"Are you sure you want to remove that item from your list of saved queries?"})})}),p.jsxs(E.DialogActions,{children:[p.jsx(E.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(E.Button,{onClick:m,color:"primary",autoFocus:!0,children:r("ra.action.confirm")})]})]})}function vae(e){const{query:t}=e,[n,r]=P.useState(!1),o=P.useCallback(()=>{r(a=>!a)},[]),i=oe.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(E.Button,{size:"small",color:"primary",onClick:o,children:i("ra.action.delete")}),p.jsx(zE,{open:n,onClose:o,filterToRemove:t})]})}function UE(e){const{closeSidebar:t}=e,{resource:n,setFilters:r,setSort:o,setPage:i,setPerPage:a}=oe.useListContext(),[l,u]=P.useState(!1),d=Et(),[f]=DS(n),g=FS(f),h=oe.useTranslate(),m=P.useCallback(()=>{u(b=>!b)},[]),y=P.useCallback(b=>{const{value:C}=b;r(C.filter),o({field:C.sort.field,order:C.sort.order}),i(1),a(C.perPage),t()},[r,o,i,a,t]);return f&&f.length>0?p.jsx(E.Box,{sx:{mt:"-1px",mb:2,"& .MuiAccordion-root":{borderColor:d.palette.divider,"& .Mui-expanded:last-of-type":{marginBottom:"inherit"},"& .MuiAccordionSummary-root":{bgcolor:"transparent",flexDirection:"row"},"& .MuiAccordionSummary-content":{justifyContent:"space-between",marginLeft:0},"& .MuiAccordionDetails-root":{borderColor:d.palette.divider},"& .MuiAccordionSummary-expandIconWrapper":{color:d.palette.text.primary,"&.Mui-expanded":{transform:"rotate(180deg)"}}}},children:p.jsxs(E.Accordion,{expanded:l,onChange:m,children:[p.jsx(E.AccordionSummary,{sx:{px:"20px"},expandIcon:p.jsx(hS,{fontSize:"small"}),children:p.jsxs(E.Typography,{variant:"h5",fontWeight:"bold",children:[h("ra.action.saved_filters")," (",g.length,")"]})}),g==null?void 0:g.map((b,C)=>p.jsxs(E.AccordionDetails,{sx:{display:"flex",justifyContent:"space-between",px:"20px",alignItems:"center"},children:[p.jsx(E.Typography,{variant:"body1",children:b.label}),p.jsxs(E.Stack,{flexDirection:"row",alignItems:"center",children:[p.jsx(vae,{query:b}),p.jsx(E.Button,{size:"small",color:"primary",onClick:()=>y({value:b.value}),children:h("ra.action.apply")})]})]},C))]})}):p.jsx(E.Box,{height:16})}function yae(e){const{sx:t}=e;return p.jsx(E.Box,{sx:{...t,flex:"1 1 auto",backgroundColor:"background.paper",overflowY:"auto"},children:e.children})}const bae=444;function xae(e){const{sx:t,anchor:n="right",variant:r="temporary",open:o=!1,onClose:i}=e,a=E.useTheme(),u=E.useMediaQuery(a.breakpoints.down("sm"))?"bottom":n,d=P.useCallback(()=>{Ke.isFunction(i)&&i()},[i]),f={backgroundImage:"none",boxShadow:"-10px 4px 42px 0px rgba(0, 0, 0, 0.25)",width:{sm:"30%"},maxWidth:{sm:bae},[a.breakpoints.down("sm")]:{width:"100% !important",maxWidth:"100% !important"}};return p.jsx(E.Drawer,{...e,anchor:u,onClose:d,open:o,PaperProps:{sx:{...f,...t}},variant:r,children:e.children})}function Cae(e){return p.jsxs(E.Box,{children:[p.jsx(E.Divider,{}),p.jsx(E.Box,{bgcolor:"background.paper",px:2,py:2.5,children:e.children})]})}function wae(e){const{sx:t}=e;return p.jsxs(E.Box,{children:[p.jsx(E.Stack,{alignItems:"center",bgcolor:"background.paper",direction:"row",px:2.5,py:2,spacing:2,minHeight:"64px",sx:t,children:e.children}),p.jsx(E.Divider,{sx:{opacity:.6}})]})}function Sae(e){const{primary:t,secondary:n}=e;return p.jsxs(E.Box,{display:"inline-flex",flexGrow:1,flexShrink:1,flexDirection:"column",children:[t?p.jsx(E.Typography,{variant:"h5",children:t}):null,n?p.jsx(E.Typography,{variant:"h6",children:n}):null]})}function Aae(e){return p.jsx(E.Box,{display:"inline-flex",flexGrow:0,flexShrink:0,children:e.children})}const xr=xae;xr.Content=yae;xr.Footer=Cae;xr.Header=wae;xr.HeaderText=Sae;xr.HeaderAction=Aae;function Eae(e){const{form:t,filters:n}=e,r=oe.useResourceContext();return p.jsx(z.FilterContext.Provider,{value:Array.isArray(n)?n:[n],children:p.jsx(un.FormProvider,{...t,children:p.jsx(E.Box,{px:"20px",children:n?(Array.isArray(n)?n:[n]).map((o,i)=>{const a={...o.props,display:"label"};return P.isValidElement(o)?p.jsx(E.Box,{mb:1,children:P.cloneElement(o,{...a,resource:r})},i):null}):null})})})}function Lu(e){const{filters:t}=e,[n,r]=P.useState(!1),{setSidebarOpen:o,sidebarOpen:i}=vv(),{filterValues:a,setFilters:l}=oe.useListContext(),u=oe.useTranslate(),d=un.useForm({defaultValues:a}),{handleSubmit:f,getValues:g,reset:h,watch:m}=d,y=m(),b=P.useMemo(()=>{const O={};return t&&(Array.isArray(t)?t:[t]).forEach(R=>{O[R.props.source]=(a==null?void 0:a[R.props.source])??""}),O},[t,a]);P.useEffect(()=>{const O=z.getFilterFormValues(g(),a),R=g();Ke.isEqual(O,R)||h(O)},[JSON.stringify(a),a,g,h]);const C=P.useCallback(()=>{Ke.isFunction(o)&&o(!1)},[o]),A=P.useCallback(O=>{l(O),C()},[l,C]),I=P.useCallback(()=>{h({}),l({})},[h,l]),S=P.useCallback(()=>{r(O=>!O),I(),setTimeout(()=>{r(!1)},1e3)},[I]),T=P.useMemo(()=>{const O=g();return Ke.isEmpty(b)||Ke.isEqual(O,b)},[b,g,y]);return p.jsxs(xr,{sx:{height:"100%"},open:i,onClose:C,children:[p.jsxs(xr.Header,{children:[p.jsx(xr.HeaderText,{primary:u("ra.action.add_filter")}),p.jsx(xr.HeaderAction,{children:p.jsx(C5,{variant:"text",loading:n,loadingPosition:"start",startIcon:p.jsx(ze.ReloadOutlined,{}),onClick:S,children:u("ra.action.reset_filters")})})]}),p.jsxs(xr.Content,{children:[p.jsx(UE,{closeSidebar:C}),p.jsx(Eae,{form:d,filters:t})]}),p.jsx(xr.Footer,{children:p.jsxs(E.Stack,{direction:"row",spacing:2,children:[p.jsx(E.Button,{fullWidth:!0,onClick:()=>{h({}),C()},children:u("ra.action.close")}),p.jsx(E.Button,{fullWidth:!0,disabled:T,variant:"contained",color:"primary",onClick:f(A),children:u("ra.action.apply_filters")})]})})]})}function Tae(){const{setSidebarOpen:e}=vv(),t=P.useContext(z.FilterContext),n=$E(),r=z.useTranslate(),o=E.useTheme(),i=E.useMediaQuery(o.breakpoints.down("sm"));if(!n)throw new Error("The <FilterSidebarButton> component requires the <List aside={<FilterSidebar />}> prop to be set");if(t===void 0)throw new Error("The <FilterSidebarButton> component requires the <List filters> prop to be set");const a=P.useCallback(()=>{Ke.isFunction(e)&&e(!0)},[e]);return i?p.jsxs(E.Button,{className:"add-filter",onClick:a,children:[p.jsx(cn.FilterList,{sx:{fontSize:"1rem",mr:.5}}),p.jsx(E.Typography,{variant:"h6",children:r("ra.action.add_filter")})]}):p.jsx(Qi,{label:"ra.action.add_filter",onClick:a,children:p.jsx(cn.FilterList,{})})}function HE(e){const{filters:t,actions:n,className:r,hasFilterSidebar:o,...i}=e,a=Et(),l=E.useMediaQuery(a.breakpoints.down("sm")),u=n?P.cloneElement(n,{...i,...n.props}):null,{filterValues:d}=oe.useListContext();return Array.isArray(t)?p.jsx(pv.Provider,{value:{hasFilterSidebar:o},children:p.jsx(z.FilterContext.Provider,{value:t,children:l&&o?p.jsxs("div",{children:[u,Ke.isEmpty(d)?null:p.jsxs("div",{children:[p.jsx(E.Divider,{}),p.jsx(Rg,{})]})]}):p.jsxs(Rw,{className:r,children:[o?p.jsx(Rg,{}):p.jsx(z.FilterForm,{}),p.jsx("span",{}),u]})})}):p.jsxs(Rw,{className:r,children:[t?P.cloneElement(t,{...i,context:"form"}):null,p.jsx("span",{}),n?P.cloneElement(n,{...i,filters:t,...n.props}):null]})}HE.propTypes={filters:x.oneOfType([x.element,x.arrayOf(x.element)]),actions:x.oneOfType([x.bool,x.element]),exporter:x.oneOfType([x.func,x.bool])};const Iae="RaListToolbar",Rw=ge("div",{name:Iae,overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",position:"relative",justifyContent:"space-between",alignItems:"flex-end",width:"100%",[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,flexWrap:"inherit",flexDirection:"column-reverse"}})),GE=P.memo(HE),Oae=p.jsx(z.ListActions,{}),Pae=p.jsx(z.Pagination,{}),jae=p.jsx(ac,{}),Rae=E.Card;function kae(e){const{actions:t=Oae,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:i,hasCreate:a,pagination:l=Pae,children:u,className:d,component:f=Rae,title:g,empty:h=jae,...m}=e,{defaultTitle:y,data:b,error:C,isLoading:A,filterValues:I,resource:S}=oe.useListContext(e),T=Et(),O=L.isValidElement(n)&&(n==null?void 0:n.type)!==Lu,R=L.isValidElement(n)&&(n==null?void 0:n.type)===Lu;if(!u||!b&&A&&i)return null;function k(Y){return p.jsxs("div",{className:Gr.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?T.palette.mode==="dark"?T.palette.divider:T.palette.grey.A800:"transparent",backgroundColor:O?T.palette.background.paper:"transparent"},children:[r||t?p.jsx(GE,{className:Gr.actions,filters:r,actions:t,hasCreate:a,hasFilterSidebar:R}):null,!C&&p.jsx(f,{className:Gr.content,sx:Y?{background:"transparent"}:{},children:o&&u&&L.isValidElement(u)?P.cloneElement(u,{bulkActionButtons:o}):u}),C?p.jsx(_0,{error:C,resetErrorBoundary:null}):l!==!1&&l]})}function F(){return h!==!1&&P.cloneElement(h,{className:Gr.noResults,hasCreate:a})}const N=!A&&(b==null?void 0:b.length)===0,M=!A&&(b==null?void 0:b.length)===0&&!Object.keys(I).length&&h!==!1,D=L.isValidElement(n),U=D&&(n==null?void 0:n.type)===Lu,G=A||M||D&&!U?L.Fragment:Ln,H=!A&&!M&&(!n||U)?{content:!1}:void 0;return p.jsxs(_ae,{className:$e("list-page",d),...m,sx:N?{"& .MuiPaper-root":{backgroundColor:"transparent",border:"none"},"& .RaList-actions":{border:"1px solid",borderRadius:`${T.shape.borderRadius}px`,borderColor:T.palette.mode==="dark"?T.palette.divider:T.palette.grey.A800,backgroundColor:T.palette.background.paper}}:{},children:[p.jsx(z.Title,{title:g,defaultTitle:y,preferenceKey:`${S}.list.title`}),p.jsx(G,{...H,children:A?p.jsx(E.CircularProgress,{sx:{position:"absolute",top:"50%",left:"50%",marginTop:"-20px",marginLeft:"-20px"}}):M?F():k(N)}),O?p.jsx(Mae,{aside:n}):null,R?L.cloneElement(n,{filters:r}):null]})}function Mae({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=Et();return p.jsx(E.Card,{className:Gr.asideCard,sx:{order:t,mr:t===-1?2:0,ml:t!==-1?2:0,width:200,border:"1px solid",borderRadius:1,borderColor:n.palette.mode==="dark"?n.palette.divider:n.palette.grey.A800,backgroundColor:n.palette.background.paper,backgroundImage:"none"},children:p.jsx(E.CardContent,{sx:{pt:1},children:P.cloneElement(e,{})})})}const Bs="RaList",Gr={main:`${Bs}-main`,content:`${Bs}-content`,actions:`${Bs}-actions`,noResults:`${Bs}-noResults`,asideCard:`${Bs}-asideCard`},_ae=ge("div",{name:Bs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex","& >.MuiPaper-root":{flex:1},[`& .${Gr.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Gr.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Gr.actions}`]:{},[`& .${Gr.noResults}`]:{alignContent:"center"},[`& .${Gr.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${z.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${z.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}})),gv=P.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:i="small",className:a,...l}=e,u=oe.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return p.jsx(kw,{className:a});function f(g,h,m){return g==="page"?m?u("ra.navigation.current_page",{page:h,_:`page ${h}`}):u("ra.navigation.page",{page:h,_:`Go to page ${h}`}):u(`ra.navigation.${g}`,{_:`Go to ${g} page`})}return p.jsx(kw,{className:a,children:p.jsx(E.Pagination,{size:i,count:d,page:t+1,onChange:(g,h)=>o(g,h-1),...Fae(l),getItemAriaLabel:f})})});gv.propTypes={count:x.number.isRequired,onPageChange:x.func.isRequired,page:x.number.isRequired,rowsPerPage:x.number.isRequired,color:x.oneOf(["primary","secondary","standard"]),size:x.oneOf(["small","medium","large"])};const Dae="RaPaginationActions",kw=ge("div",{name:Dae,overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function Fae({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const mv=P.memo(e=>{const{rowsPerPageOptions:t=Bae,actions:n,limit:r=null,...o}=e,{isLoading:i,hasNextPage:a,page:l,perPage:u,total:d,setPage:f,setPerPage:g}=oe.useListPaginationContext(e),h=oe.useTranslate(),m=E.useMediaQuery(M=>M.breakpoints.down("md")),[y,b]=P.useState(l-1),{hasCreate:C}=oe.useResourceDefinition(e),[A,I]=P.useState(!1);P.useEffect(()=>{l!==y+1&&!A&&b(l-1)},[y,A,l]),P.useEffect(()=>{I(!1)},[l]);const S=P.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),T=P.useCallback(Ke.debounce(M=>{f(M+1)},500),[f]),O=P.useCallback((M,D)=>{var H,Y;if(!M)return;if(M.preventDefault(),D<0||S!==void 0&&D>S-1)throw new Error(h("ra.navigation.page_out_of_boundaries",{page:D+1}));const U=(((H=M.target.dataset)==null?void 0:H.testid)||((Y=M.target.classList)==null?void 0:Y.value))??"",G=U.includes("MuiPaginationItem-previousNext")||U.includes("NavigateBeforeIcon")||U.includes("NavigateNextIcon")||U.includes("KeyboardArrowLeftIcon")||U.includes("KeyboardArrowRightIcon");b(D),I(!0),G?T(D):f(D+1)},[T,f,h,S,I]),R=P.useCallback(M=>{g(Number(M.target.value))},[g]),k=P.useCallback(({from:M,to:D,count:U})=>U===-1&&a?h("ra.navigation.partial_page_range_info",{offsetBegin:M,offsetEnd:D,_:"%{from}-%{to} of more than %{to}"}):h("ra.navigation.page_range_info",{offsetBegin:M,offsetEnd:D,total:U===-1?D:U,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[h,a]),F=P.useCallback(M=>h(`ra.navigation.${M}`,{_:`Go to ${M} page`}),[h]);if(i)return p.jsx(E.Toolbar,{variant:"dense"});if(d===0||l<1||S!==void 0&&l>S)return r!=null&&process.env.NODE_ENV==="development"&&console.warn("The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."),null;if(m)return p.jsx(E.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,rowsPerPageOptions:Lae,component:"span",labelDisplayedRows:k,sx:{justifyContent:C?"flex-start":"flex-end",display:C?"flex":"block"},...oe.sanitizeListRestProps(o)});const N=n||(!i&&d!=null?gv:void 0);return p.jsx(E.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,onRowsPerPageChange:R,ActionsComponent:N,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:h("ra.navigation.page_rows_per_page"),labelDisplayedRows:k,getItemAriaLabel:F,rowsPerPageOptions:t,...oe.sanitizeListRestProps(o)})});mv.propTypes={actions:oe.ComponentPropType,limit:x.element,rowsPerPageOptions:x.arrayOf(x.oneOfType([x.number,x.shape({label:x.string.isRequired,value:x.number.isRequired})]))};const Bae=[5,10,25,50],Lae=[],qE=P.createContext({sidebarOpen:!1,setSidebarOpen:()=>{}});function YE(e){const[t,n]=P.useState(!1);return p.jsx(qE.Provider,{value:{sidebarOpen:t,setSidebarOpen:n},children:e.children})}function vv(){return P.useContext(qE)}function Nae({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=$ae,filterDefaultValues:i,perPage:a=10,queryOptions:l,resource:u,sort:d,storeKey:f,...g}){return p.jsx(oe.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:i,perPage:a,queryOptions:l,resource:u,sort:d,storeKey:f,children:p.jsx(YE,{children:p.jsx(kae,{...g})})})}const $ae={},Vae=Ql(Nae,{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),[e.breakpoints.down("sm")]:{flexDirection:"row"},"& 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}},"& .ApplicaEmpty-root":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"calc(100vh - 260px)"}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function Wae(e){return p.jsx(Vae,{...e,pagination:p.jsx(mv,{})})}function zae(){const e=z.useRefresh(),t=z.useNotify(),n=z.useResourceContext(),r=z.useUnselectAll(n),{selectedIds:o,data:i}=z.useListContext(),a=z.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)),[u,{isLoading:d}]=z.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Fr().toISOString()},rows:l},{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"})}),f=P.useCallback(()=>{u()},[u]);return p.jsx(z.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:f,children:p.jsx(cn.Email,{})})}function Uae(){const e=z.useRefresh(),t=z.useNotify(),n=z.useResourceContext(),r=z.useUnselectAll(n),{selectedIds:o,data:i}=z.useListContext(),a=z.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)).concat([a]),[u,{isLoading:d}]=z.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:l},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),f=P.useCallback(()=>{u()},[u]);return p.jsx(z.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:f,children:p.jsx(cn.Drafts,{})})}function Hae(e){const t=z.useRecordContext(e),n=z.useResourceContext(e),r=z.useRedirect(),o=z.useNotify(),i=z.useTranslate(),[a]=z.useLocaleState(),l=P.useMemo(()=>t!=null&&t.readed?Fr(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]=z.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Fr().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=P.useCallback(()=>u(),[u]);return p.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[p.jsx(E.Typography,{variant:"subtitle1",children:p.jsxs(E.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),p.jsx(E.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),l?p.jsx(E.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:i("ra.notification.readed",{readed:l})}):null]})}function Gae({...e}){const t=E.useTheme(),{mode:n,colorize:r,density:o}=P.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?E.darken:E.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function i(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return p.jsxs(z.Datagrid,{...e,rowSx:i,children:[p.jsx(Hae,{source:"notification",sortable:!1}),p.jsx(R6,{source:"created"}),p.jsxs(si,{children:[p.jsx(zae,{}),p.jsx(Uae,{})]})]})}function qae({empty:e,...t}){const n=z.useTranslate(),r=p.jsx(ac,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(E.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:n("ra.navigation.no_results")})});return p.jsx(z.SimpleList,{...t,empty:e||r})}const Yae={width:36,height:36,fontSize:"1rem"},Kae={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function KE(){const{enable:e}=If();return e?p.jsx(Xae,{}):null}function Xae(){const e=oe.useTranslate(),t=E.useTheme(),n=oe.useRefresh(),r=oe.useNotify(),{downMd:o}=or(),{resource:i}=If(),[a,l]=P.useState([]),{data:u,isLoading:d}=oe.useGetList(i,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),f=a.filter(I=>I.readed===null).length,{open:g,anchorEl:h,handleClose:m,handleToggle:y}=ba();P.useEffect(()=>{!d&&u&&l(u??[])},[u,d]);const b=a.filter(I=>!I.readed).map(I=>I.id),[C]=oe.useUpdateMany(i,{ids:b,data:{readed:Fr().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),A=P.useCallback(()=>{C()},[C]);return p.jsxs(p.Fragment,{children:[p.jsx(Aa,{value:"notifications",selected:g,onChange:y,children:p.jsx(E.Badge,{badgeContent:f,color:"primary",children:p.jsx(ze.BellOutlined,{})})}),p.jsx(E.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:h,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:I})=>p.jsx(ii,{type:"grow",position:o?"top":"top-right",in:g,...I,children:p.jsx(E.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:p.jsx(E.ClickAwayListener,{onClickAway:m,children:p.jsxs(Ln,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:p.jsx(p.Fragment,{children:f>0&&p.jsx(E.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:A,children:p.jsx(of,{color:"success",size:"small",children:p.jsx(ze.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[a.length===0?p.jsx(ac,{hasCreate:!1,title:p.jsx(E.Typography,{variant:"h5",children:e("ra.notification.empty")}),sx:{"& .ApplicaEmpty-icon":{fontSize:"60px"},"& .ApplicaEmpty-toolbar":{display:"none"}}}):p.jsxs(p.Fragment,{children:[p.jsx(E.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":Yae,"& .MuiListItemSecondaryAction-root":{...Kae,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((S,T)=>p.jsx(nae,{selected:f>0,notification:S,onClick:m,divider:T<a.length-1},S.id))}),p.jsx(E.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${i}`,LinkComponent:gt.Link,onClick:m,children:p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})})]}),p.jsx(E.Divider,{})]})})})})})]})}function XE(){const[e,t]=P.useState(!1),n=P.useCallback(()=>t(!1),[t]),r=P.useCallback(()=>t(!0),[t]),o=oe.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsxs(E.ListItemButton,{onClick:r,children:[p.jsx(E.ListItemIcon,{children:p.jsx(cn.Key,{})}),p.jsx(E.ListItemText,{primary:o("ra.auth.change_password")})]}),p.jsx(E.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:p.jsx(Q0,{onSuccess:n})})]})}function ZE(){const e=oe.useLogout(),t=oe.useTranslate();return p.jsx(p.Fragment,{children:p.jsxs(E.ListItemButton,{onClick:e,children:[p.jsx(E.ListItemIcon,{children:p.jsx(cn.LogoutOutlined,{})}),p.jsx(E.ListItemText,{primary:t("ra.auth.logout")})]})})}function QE(){const e=oe.useTranslate(),t=oe.useAuthProvider(),n=P.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=P.useState(!1);return P.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(i=>o(i))},[t,o]),r?p.jsx(p.Fragment,{children:p.jsxs(E.ListItemButton,{onClick:n,children:[p.jsx(E.ListItemIcon,{children:p.jsx(cn.LogoutOutlined,{})}),p.jsx(E.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function JE(e){var b;const{roles:t}=e,n=E.useTheme(),r=oe.useDataProvider(),{identity:o}=oe.useGetIdentity(),i=o!==void 0&&o.image&&o.image!==null&&o.image!=="",[a,l]=P.useState(null),{open:u,anchorEl:d,handleToggle:f,handleClose:g}=ba(),h=oe.useLogout(),m=P.useCallback(()=>{h()},[h]);P.useEffect(()=>{i&&r.getFile("/profile/me/image").then(C=>l(C))},[r,i]);const y=P.useMemo(()=>{var C;return P.isValidElement(t)?t:t?p.jsx(p.Fragment,{children:t}):(C=o==null?void 0:o.roles)==null?void 0:C.map(A=>A.name.replace("ROLE_","")).join(",")},[t,o]);return p.jsxs(p.Fragment,{children:[p.jsx(Aa,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:p.jsxs(E.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[p.jsx(ed,{alt:(b=o==null?void 0:o.name)==null?void 0:b.toUpperCase(),src:a,size:"xs"}),p.jsx(E.Typography,{variant:"subtitle1",children:o==null?void 0:o.name})]})}),p.jsx(t0,{placement:"bottom-end",open:u,anchorEl:d,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:C})=>p.jsx(ii,{type:"grow",position:"top-right",in:u,...C,children:p.jsx(E.Paper,{sx:{boxShadow:n.customShadows.z1,width:290,minWidth:240,maxWidth:290,[n.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(E.ClickAwayListener,{onClickAway:g,children:p.jsxs(Ln,{elevation:0,border:!1,content:!1,children:[p.jsx(E.CardContent,{sx:{px:2.5,pt:3},children:p.jsxs(E.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[p.jsx(E.Grid,{item:!0,children:p.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[p.jsx(ed,{alt:"profile user",src:a,sx:{width:32,height:32}}),p.jsxs(E.Stack,{children:[p.jsx(E.Typography,{variant:"h6",children:o==null?void 0:o.name}),p.jsx(E.Typography,{variant:"body2",color:"textSecondary",children:y})]})]})}),p.jsx(E.Grid,{item:!0,children:p.jsx(E.Tooltip,{title:"Logout",children:p.jsx(of,{size:"large",sx:{color:"text.primary"},onClick:m,children:p.jsx(ze.LogoutOutlined,{})})})})]})}),p.jsx(E.Grid,{container:!0,children:p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[p.jsx(XE,{}),p.jsx(ZE,{}),p.jsx(QE,{})]})})})]})})})})})]})}function eT(e){const t=Et(),{downMd:n}=or(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=ba();return n?p.jsxs(p.Fragment,{children:[p.jsx(Aa,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:i,selected:r,children:p.jsx(ze.MoreOutlined,{})}),p.jsx(E.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:l})=>p.jsx(ii,{type:"fade",in:r,...l,children:p.jsx(E.Paper,{sx:{boxShadow:t.customShadows.z1},children:p.jsx(E.ClickAwayListener,{onClickAway:a,children:p.jsx(E.AppBar,{color:"inherit",children:p.jsx(E.Toolbar,{children:e.children})})})})})})]}):p.jsx(p.Fragment,{children:e.children})}function tT(e){return p.jsx(E.Box,{...e,flex:1})}function nT(e){const t=E.useTheme(),n=E.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=Pn();return t.shadows[4]=t.customShadows.z1,p.jsx(E.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:p.jsx(E.Container,{maxWidth:r?"xl":!1,children:p.jsx(E.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function rT(e){const{horizontal:t}=or();return t?p.jsx(nT,{children:e.children}):p.jsx(RE,{children:e.children})}function bl({item:e,level:t}){const n=Et(),{horizontal:r,downLg:o}=or(),{drawerOpen:i,openItem:a,activeItem:l,openDrawer:u}=kl();let d="_self";e.target&&(d="_blank");const f=(e==null?void 0:e.external)!==!1?{component:P.forwardRef((A,I)=>p.jsx(gt.Link,{...A,to:e.url,target:d,ref:I}))}:{component:"a",href:e.url,target:d},g=e.icon,h=e.icon?p.jsx(g,{style:{fontSize:i?"1rem":"1.25rem"}}):!1,m=a.findIndex(A=>A===e.id)>-1,{pathname:y}=gt.useLocation();P.useEffect(()=>{y.endsWith(e.url)&&l([e.id])},[y]);const b=n.palette.mode==="dark"?"grey.400":"text.primary",C=n.palette.mode==="dark"&&i?"text.primary":"primary.main";return p.jsx(p.Fragment,{children:r?p.jsxs(E.ListItemButton,{...f,disabled:e.disabled,selected:m,sx:{zIndex:1201,...i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:C,"&:hover":{color:C,bgcolor:"transparent"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[h?p.jsx(E.ListItemIcon,{sx:{minWidth:36,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&m&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:h}):null,!h&&p.jsx(E.ListItemIcon,{sx:{color:m?"primary.main":"secondary.main",...!i&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&m&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:p.jsx(Gm,{size:4,color:m?"primary":"secondary"})}),p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",color:"inherit",children:e.title})}),(i||!i&&t!==1)&&e.chip?p.jsx(E.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(E.Avatar,{children:e.chip.avatar}):null}):null]}):p.jsxs(E.ListItemButton,{...f,disabled:e.disabled,selected:m,sx:{zIndex:1201,pl:i?`${t*28}px`:1.5,py:!i&&t===1?1.25:1,...i&&{"&: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:C,"&:hover":{color:C,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[h?p.jsx(E.ListItemIcon,{sx:{minWidth:28,color:m?C:b,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!i&&m&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:h}):null,i||!i&&t!==1?p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",sx:{color:m?C:b},children:e.title})}):null,(i||!i&&t!==1)&&e.chip?p.jsx(E.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(E.Avatar,{children:e.chip.avatar}):null}):null]})})}const Mw=ge(E.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 xl({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:i,selectedLevel:a}){var W;const l=Et(),{activeItem:u}=kl(),{horizontal:d}=or(),{drawerOpen:f}=kl(),g=gt.useNavigate(),[h,m]=P.useState(!1),[y,b]=P.useState(null),[C,A]=P.useState(null);function I(ie){A(null),i(t),f?(m(!h),b(y?null:e.id),r(y?"":e.id),e.url&&g(`${e.url}`)):A(ie==null?void 0:ie.currentTarget)}function S(){f||e.url&&g(`${e.url}`)}function T(ie){A(ie==null?void 0:ie.currentTarget)}function O(){m(!1),b(null),A(null)}P.useMemo(()=>{y===o?t===1&&m(!0):t===a&&(m(!1),b(null))},[o,t,y,a]);const{pathname:R}=gt.useLocation(),k=!!C;function F(ie,K){ie.forEach($=>{$.url===R&&(m(!0),b(K))})}P.useEffect(()=>{m(!1),b(null),k&&A(null),e.children&&e.children.forEach(ie=>{var K;(K=ie.children)!=null&&K.length&&F(ie.children,e.id),ie.url===R&&(b(e.id),m(!0)),R.includes(ie.url)&&(b(e.id),m(!0))})},[R,e.children]),P.useEffect(()=>{e.url===R&&y!==e.id&&(u([e.id]),b(e.id),A(null),m(!0))},[R,e,y,u]);const N=(W=e.children)==null?void 0:W.map(ie=>{switch(ie.type){case"collapse":return p.jsx(xl,{setSelectedItems:r,setSelectedLevel:i,selectedLevel:a,selectedItems:o,menu:ie,level:t+1,parentId:n},ie.id);case"item":return p.jsx(bl,{item:ie,level:t+1},ie.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},ie.id)}}),M=y===e.id,D=t===1?p.jsx(ze.BorderOutlined,{style:{fontSize:"1rem"}}):!1,U=e.icon,G=e.icon?p.jsx(U,{style:{fontSize:f?"1rem":"1.25rem"}}):D,H=l.palette.mode==="dark"?"grey.400":"text.primary",Y=l.palette.mode==="dark"&&f?l.palette.text.primary:l.palette.primary.main,V=k?`collapse-pop-${e.id}`:void 0,X={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return p.jsx(p.Fragment,{children:d?p.jsx(p.Fragment,{children:p.jsxs(E.ListItemButton,{id:`boundary-${V}`,disableRipple:!0,selected:M,onMouseEnter:T,onMouseLeave:O,onClick:T,"aria-describedby":V,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[p.jsxs(E.Box,{onClick:S,sx:X,children:[G?p.jsx(E.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:l.palette.secondary.dark},children:G}):null,!G&&t!==1&&p.jsx(E.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:p.jsx(Gm,{size:4,color:M?"primary":"secondary"})}),p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),k?p.jsx(ze.RightOutlined,{}):p.jsx(ze.DownOutlined,{})]}),C?p.jsx(Mw,{id:V,open:k,anchorEl:C,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:ie})=>p.jsx(ii,{in:k,...ie,children:p.jsx(E.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:l.shadows[8],backgroundImage:"none"},children:p.jsx(E.ClickAwayListener,{onClickAway:O,children:p.jsx(E.Box,{children:N})})})})}):null]})}):p.jsxs(p.Fragment,{children:[p.jsxs(E.ListItemButton,{disableRipple:!0,selected:y===e.id,...!f&&{onMouseEnter:I,onMouseLeave:O},onClick:I,sx:{pl:f?`${t*28}px`:1.5,py:!f&&t===1?1.25:1,...f&&{"&:hover":{bgcolor:l.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:Y,"&:hover":{color:Y,bgcolor:l.palette.mode==="dark"?"divider":"transparent"}}},...!f&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[G?p.jsx(E.ListItemIcon,{onClick:S,sx:{minWidth:28,color:y===e.id?"primary.main":H,...!f&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:l.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!f&&y===e.id&&{bgcolor:l.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:l.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:G}):null,f||!f&&t!==1?p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",color:y===e.id?"primary":H,children:e.title}),secondary:e.caption?p.jsx(E.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,f||!f&&t!==1?k||h?p.jsx(ze.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:l.palette.primary.main}}):p.jsx(ze.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!f&&p.jsx(Mw,{open:k,anchorEl:C,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:ie})=>p.jsx(ii,{in:k,...ie,children:p.jsx(E.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:l.customShadows.z1,backgroundImage:"none",border:`1px solid ${l.palette.divider}`},children:p.jsx(E.ClickAwayListener,{onClickAway:O,children:p.jsx(E.Box,{children:N})})})})})]}),f?p.jsx(E.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:p.jsx(E.List,{sx:{p:0},children:N})}):null]})})}const Zae=ge(E.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 oT({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:i,setSelectedLevel:a,selectedLevel:l}){var V,X;const u=Et(),d=z.useTranslate(),{pathname:f}={pathname:""},{horizontal:g,downLg:h}=or(),m=kl(),{drawerOpen:y,selectedID:b,activeID:C}=m,[A,I]=P.useState(null),[S,T]=P.useState(e),O=!!A;P.useEffect(()=>{if(t)if(e.id===r){const W={...e},ie=n.map(K=>K.elements);W.children=ie.flat(1),T(W)}else T(e)},[e,t,h]);function R(W,ie){W.forEach(K=>{var $;($=K.children)!=null&&$.length&&R(K.children,S.id),K.url===f&&C(ie)})}function k(W){(W.children?W.children:[]).forEach(K=>{var $;($=K.children)!=null&&$.length&&R(K.children,S.id),K.url===f&&C(S.id)})}P.useEffect(()=>{k(S),O&&I(null)},[f,S]);function F(W){O||I(W==null?void 0:W.currentTarget)}function N(){I(null)}const M=S==null?void 0:S.icon,D=S!=null&&S.icon?p.jsx(M,{style:{fontSize:20,stroke:"1.5",color:b===S.id?u.palette.primary.main:u.palette.secondary.dark}}):null,U=(V=e.children)==null?void 0:V.map(W=>{switch(W.type){case"collapse":return p.jsx(xl,{menu:W,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i,level:1,parentId:S.id},W.id);case"item":return p.jsx(bl,{item:W,level:1},W.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),G=n.map((W,ie)=>{var K;return p.jsxs(P.Fragment,{children:[W.title?p.jsx(E.Typography,{variant:"caption",sx:{pl:2},children:W.title}):null,(K=W==null?void 0:W.elements)==null?void 0:K.map($=>{switch($.type){case"collapse":return p.jsx(xl,{menu:$,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},$.id);case"item":return p.jsx(bl,{item:$,level:1},$.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},$.id)}})]},ie)}),H=(X=S.children)==null?void 0:X.map(W=>{switch(W.type){case"collapse":return p.jsx(xl,{menu:W,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},W.id);case"item":return p.jsx(bl,{item:W,level:1},W.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),Y=O?`group-pop-${e.id}`:void 0;return p.jsx(p.Fragment,{children:g?p.jsx(E.List,{children:p.jsxs(E.ListItemButton,{selected:b===S.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:F,onClick:F,onMouseLeave:N,"aria-describedby":Y,children:[D?p.jsx(E.ListItemIcon,{sx:{minWidth:28},children:S.id===r?p.jsx(ze.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):D}):null,p.jsx(E.ListItemText,{sx:{mr:1},primary:p.jsx(E.Typography,{variant:"body1",color:b===S.id?u.palette.primary.main:u.palette.secondary.dark,children:S.id===r?d("ra.actions.more"):S.title})}),O?p.jsx(ze.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):p.jsx(ze.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),A?p.jsx(Zae,{id:Y,open:O,anchorEl:A,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:W})=>p.jsx(ii,{in:O,...W,children:p.jsx(E.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:p.jsx(E.ClickAwayListener,{onClickAway:N,children:p.jsx(E.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:S.id!==r?H:G})})})})}):null]})}):p.jsx(E.List,{subheader:e.title&&y?p.jsxs(E.Box,{sx:{pl:3,mb:1.5},children:[p.jsx(E.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?p.jsx(E.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:y&&e.title?1.5:0,py:0,zIndex:0},children:U})})}function iT(e){const{horizontal:t}=or(),{open:n}=ts(),r=Br(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return p.jsx(E.Box,{sx:r,children:e.children})}function sT(e){const{horizontal:t}=or(),{menu:n,isLoading:r}=D0(),[o,i]=P.useState(""),[a,l]=P.useState(0),{horizontalMaxItems:u}=Pn(),d=t?u:void 0;let f=r?0:(n??[]).length-1,g=[],h;return!r&&d&&d<(n??[]).length&&(h=(n??[])[d-1].id,f=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(m=>({title:m.title,elements:m.children,icon:m.icon}))),p.jsx(iT,{...e,children:!r&&se.map((n??[]).slice(0,f+1),m=>{const{type:y}=m;switch(y){case"group":return p.jsx(oT,{item:m,setSelectedItems:i,setSelectedLevel:l,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:h},m.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},m.id)}})})}function Qae({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:i}){const a=oe.useTranslate();return p.jsx(t0,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:l})=>p.jsx(ii,{type:"grow",position:"top-right",in:e,...l,children:p.jsx(E.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(E.ClickAwayListener,{onClickAway:n,children:p.jsx(Ln,{elevation:0,border:!1,content:!1,children:p.jsxs(E.List,{children:[p.jsxs(E.ListItemButton,{selected:o==="light",onClick:()=>i("light"),children:[p.jsx(ze.SunOutlined,{}),p.jsx(E.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),p.jsxs(E.ListItemButton,{selected:o==="dark",onClick:()=>i("dark"),children:[p.jsx(ze.MoonOutlined,{}),p.jsx(E.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),p.jsxs(E.ListItemButton,{selected:o==="auto",onClick:()=>i("auto"),children:[p.jsx(cn.Brightness6,{}),p.jsx(E.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function aT(){const e=E.useTheme(),{mode:t,setMode:n}=Pn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=ba(),l=P.useCallback(d=>{n(d)},[n]),u=P.useCallback(()=>{switch(t){case"light":return p.jsx(ze.SunOutlined,{});case"dark":return p.jsx(ze.MoonOutlined,{});default:return p.jsx(cn.Brightness6,{})}},[t]);return p.jsxs(Aa,{value:"theme-mode","aria-label":"toggle mode",onClick:i,selected:!1,children:[p.jsx(u,{}),r?p.jsx(Qae,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:l}):null]})}const lT=P.forwardRef((e,t)=>{const n=Br(e,{display:"flex",width:"100%"});return p.jsx(E.Box,{ref:t,...e,sx:n,children:e.children})});function yv({source:e="paper"}){const{mode:t}=Pn(),n=E.useTheme();return P.useEffect(()=>{var o;const r=se.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const cT=vA(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:i,enableLocaleSwitcher:a}=t,{isLoading:l,navigation:u,breadcrumbs:d}=US();return p.jsxs(lT,{children:[p.jsxs(FE,{children:[p.jsx(tT,{}),a?p.jsx(_E,{}):null,o?p.jsx(aT,{}):null,p.jsx(yv,{}),p.jsx(rS,{}),i?p.jsx(KE,{}):null,p.jsx(eT,{children:p.jsx(JE,{})})]}),p.jsx(rT,{children:p.jsx(sT,{})}),p.jsxs(bA,{error:t.error,children:[!l&&p.jsx(s5,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,p.jsx(gt.Outlet,{}),p.jsx(fv,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})});function uT(e){const t=E.useMediaQuery(n=>n.breakpoints.down("sm"));return p.jsx(ele,{disableGutters:!0,variant:t?"regular":"dense",...tle(e)})}uT.propTypes={children:x.node,className:x.string};const Jae="RaTopToolbar",ele=E.styled(E.Toolbar,{name:Jae,overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",gap:e.spacing(1),whiteSpace:"nowrap",flex:"0 1 auto",paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5),paddingInline:e.spacing(2),[e.breakpoints.down("md")]:{flex:"0 1 100%"},[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,justifyContent:"space-between",alignItems:"center"}}));function tle({hasCreate:e,...t}){return t}const nle=ge("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function dT(){return p.jsx(nle,{children:p.jsx(E.LinearProgress,{color:"primary"})})}function rle(e){return t=>p.jsx(P.Suspense,{fallback:p.jsx(dT,{}),children:p.jsx(e,{...t})})}function bv({title:e}){return p.jsxs(E.Stack,{direction:"row",children:[p.jsx(E.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",p.jsx(E.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const ole=ge(z.Notification,{})(({theme:e})=>({zIndex:2e3,"& *":{fontSize:e.typography.body1.fontSize}}));function fT(e){return p.jsx(ole,{...e})}var _l=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(_l||{});const pT=So().required(),hT=So().oneOf(Object.values(_l));function ile(e){var A;const t=Ni.useQueryClient(),[n,r]=P.useState(!1),[o,i]=P.useState(()=>()=>Promise.resolve()),a=oe.useGetIdentity(),l=(A=a==null?void 0:a.data)==null?void 0:A.email,u=oe.useDataProvider(),d=P.useCallback(()=>l?u.get("onboarding").then(I=>{var S;return(S=I==null?void 0:I.data)==null?void 0:S.value}):Promise.reject(),[u,l]),{data:f,isLoading:g,isError:h}=Ni.useQuery({queryKey:["GET","onboarding",l],queryFn:d,staleTime:24*60*60*1e3,retry:l!==void 0}),[m,y]=P.useState(()=>()=>Promise.resolve()),C=Ni.useMutation({mutationFn:m}).mutateAsync;return P.useEffect(()=>{function I(){const S=se.chain(f??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",S).then(()=>{t.invalidateQueries(["GET","onboarding",l])})}y(()=>I)},[u,f,e,t,l]),P.useEffect(()=>{r(se.isNil((f??{})[e]))},[f,e,r]),P.useEffect(()=>{i(()=>()=>C())},[C]),{loading:g,error:h,onboardingRequired:n,acknowledgeOnboarding:o}}function sle(e){const[t,n]=z0("onboarding",{}),[r,o]=P.useState(!1),[i,a]=P.useState(()=>()=>Promise.resolve());return P.useEffect(()=>{o(se.isNil((t??{})[e]))},[t,e,o]),P.useEffect(()=>{a(()=>()=>(n(l=>se.extend(l,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:i}}function ale(){return{onboardingRequired:!1,acknowledgeOnboarding:P.useRef(()=>Promise.resolve()).current}}function gT(e,t){V0({mode:hT,topic:pT}).validateSync({mode:e,topic:t});const n=ile(t),r=sle(t),o=ale();switch(e){case _l.USER:return n.loading?o:n.error?r:se.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case _l.BROWSER:return r;default:return o}}var Zs=(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))(Zs||{});function lle(e,t){var o;const n=se.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:i}=t;return se.extend(n,{show:i})}case"REGISTER_TIP":{const{payload:i}=t,{id:a}=i,l=se.chain(n.tips).clone().reject(f=>f.id===a).value(),u=se.find(n.tips,{id:a}),d=se.chain(u??{}).clone().extend(i).value();return l.push(d),se.extend(n,{tips:se.sortBy(l,["step"])})}case"UNREGISTER_TIP":{const{payload:i}=t,a=se.isString(i)?i:i.id,l=se.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return se.extend(n,{tips:l})}case"DISMISS_TIP":{const{payload:i}=t,a=se.isString(i)?i:i.id,l=se.chain(n.tips).reject(h=>h.id===a).value(),u=se.find(n.tips,{id:a});if(se.isNil(u))return n;const d=se.chain(u).clone().extend({dismissed:!0}).value();l.push(d);const f=((o=se.chain(l).reject(h=>h.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&se.chain(l).reject(h=>h.step<f).reject(h=>h.dismissed??!1).isEmpty().value()&&e.onComplete(),se.extend(n,{tips:se.sortBy(l,["step"]),currentStep:f})}case"SET_ON_COMPLETE":{const{payload:i}=t;return se.extend(n,{onComplete:i})}case"RESTART":{const i=se.chain(n.tips).clone().map(a=>se.omit(a,"dismissed")).value();return se.extend(n,{tips:i,currentStep:0})}default:return n}}const xv=P.createContext(void 0);function cle(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=gT(t,n),[i,a]=P.useReducer(lle,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),l=P.useMemo(()=>({state:i,dispatch:a}),[i,a]);return P.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),P.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),p.jsx(xv.Provider,{value:l,children:e.children})}function mT(){const e=P.useContext(xv);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function ule(){return mT().state}function vT(){return mT().dispatch}function yT(e){V0({id:So().required(),step:t6().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:i,currentStep:a}=ule(),l=se.find(i,{id:t}),{dismissed:u}=l??{},d=vT(),f=P.useCallback(()=>{d({type:Zs.DISMISS_TIP,payload:t})},[d,t]);return P.useEffect(()=>{(se.isNil(l)||n!==(l==null?void 0:l.step))&&d({type:Zs.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,l,d]),P.useEffect(()=>()=>{d({type:Zs.UNREGISTER_TIP,payload:t})},[t,d]),{tip:se.chain(l??e).clone().extend({open:o&&!se.isNil(l)&&a===n&&!u}).value(),dismiss:f}}function dle(){const e=vT();return P.useCallback(()=>{e({type:Zs.RESTART})},[e])}function fle(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:i,dismiss:a}=yT({id:t,step:n,completeOnboarding:o}),{open:l}=i,u=se.omit(e,["id","step","title","completeOnboarding"]);return p.jsx(uf,{...u,arrow:!0,open:l,title:p.jsxs(E.Stack,{gap:1,children:[p.jsx(E.Typography,{children:r}),p.jsx(E.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const ple=E.styled(fle)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${E.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${E.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${E.tooltipClasses.arrow}`]:{color:r.main}}});function bT({children:e}){const t=gt.useLocation(),{pathname:n}=t;return P.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),p.jsx(p.Fragment,{children:e})}const hle=ge("div")({width:"100%",overflowX:"auto",display:"block"});function gle({shadow:e,children:t,...n}){return p.jsx(Ln,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function xT({title:e}){return p.jsx(E.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}function mle({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:i,component:a,leftIcon:l,rightIcon:u,button:d,buttonProps:f,...g}){const{getCurrentDialog:h}=Z0(),m=oe.useResourceContext(g),y=h(),b=oe.useRecordContext(),C=r||b,A=Ke.get(C,e||"");return p.jsxs(E.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:I=>({pt:1,pb:1,borderBottom:`1px solid ${I.palette.divider}`,...o&&{mb:2},...i&&{mt:2}}),children:[p.jsxs(E.Stack,{direction:"row",alignItems:"start",children:[l?P.isValidElement(l)?P.cloneElement(l,{style:bu}):P.createElement(l,{style:bu}):null,p.jsx(oe.FieldTitle,{label:t,source:e,resource:y||m})]}),p.jsxs(E.Stack,{direction:"row",alignItems:"center",children:[a?P.isValidElement(a)?P.cloneElement(a,{record:C,resource:m,value:A}):P.createElement(a,{source:e,record:C,resource:m,value:A}):p.jsx(E.Typography,{variant:n,children:A}),u?P.isValidElement(u)?P.cloneElement(u,{style:bu}):P.createElement(u,{style:bu}):null,d?p.jsx(E.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...f,children:d}):null]})]})}const bu={width:"1.5rem",alignSelf:"center"};function vle({children:e}){const t=Et();return p.jsx(Ln,{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:p.jsx(E.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function Pf({version:e,name:t,copy:n,children:r,logo:o,background:i=df,footer:a=!0}){return p.jsxs(E.Box,{children:[p.jsx(yv,{source:"default"}),P.isValidElement(i)?i:P.createElement(i),p.jsxs(E.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{ml:3},children:o||p.jsx(bv,{title:t})}),p.jsxs(E.Grid,{item:!0,xs:12,children:[p.jsx(E.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:p.jsx(E.Grid,{item:!0,children:p.jsx(vle,{children:r})})}),a?p.jsx(E.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:p.jsx(fv,{name:t,copy:n,version:e})}):null]})]})]})}function yle({name:e,copy:t,logo:n,version:r,background:o}){const i=oe.useTranslate(),a=oe.useAuthProvider(),l=oe.useNotify(),u=gt.useNavigate(),{token:d}=gt.useParams();return P.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{l("ra.auth.activate_success",{type:"info"}),se.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),se.delay(()=>u("/login"),1e3)})},[d,a,l,u]),p.jsx(Pf,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:i("ra.auth.activate")}),p.jsx(E.Typography,{component:gt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),p.jsx(E.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})}function CT(){const e=P.useCallback(()=>location.reload(),[]);return p.jsx(E.Container,{children:p.jsxs(E.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[p.jsx("img",{alt:"Error",src:E5,style:{width:"100%",maxWidth:450}}),p.jsx(E.Typography,{variant:"h2",children:"Ops! An error occurred..."}),p.jsx(E.Typography,{children:"We're fixing the problem. Please try again later."}),p.jsx(E.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function wT({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:i=!1,oauth:a={},redirectTo:l,background:u=p.jsx(df,{})}){const[d,f]=oe.useSafeSetState(!1),g=oe.useLogin(),h=oe.useTranslate(),m=oe.useNotify(),y=oe.useCheckAuth(),b=gt.useNavigate();P.useEffect(()=>{y({},!1).then(()=>{b("/")}).catch(()=>{})},[y,b]);function C(A){f(!0),g(A,l).then(()=>{f(!1)}).catch(I=>{f(!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 p.jsx(Pf,{name:t,version:e,copy:n,logo:r,background:u,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:"Login"}),i?p.jsx(E.Typography,{component:gt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")}):null]})}),p.jsxs(E.Grid,{item:!0,xs:12,children:[p.jsxs(oe.Form,{onSubmit:C,children:[p.jsxs(E.Grid,{container:!0,children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(wr,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:oe.required(),placeholder:"user@company.name",fullWidth:!0})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(wr,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:oe.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:p.jsx(E.Link,{variant:"h6",component:gt.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}):null,p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Button,{variant:"contained",type:"submit",color:"primary",disabled:d,fullWidth:!0,children:d?p.jsx(E.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]}),se.isEmpty(a)?null:p.jsxs(p.Fragment,{children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:2},children:p.jsx(E.Divider,{})}),a.google?p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:2,width:"100%"},children:p.jsx(w6,{setLoading:f})}):null]})]})]})})}function ble({name:e,copy:t,logo:n,version:r,background:o}){const[i,a]=P.useState(!1),l=oe.useTranslate(),u=oe.useRedirect(),d=oe.useNotify(),f=oe.useAuthProvider();function g({email:h}){a(!0),f.recover(h).then(m=>{const y=`ra.auth.recover_${m.responseCode}`,b=m.responseCode==="ok"?"info":"error";d(y,{type:b}),u("/login")}).catch(m=>{d((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>a(!1))}return p.jsx(Pf,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:l("ra.auth.recover.title")}),p.jsx(E.Typography,{component:gt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.back_to_login")})]})}),p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(z.Form,{onSubmit:g,children:[p.jsx(E.Grid,{container:!0,children:p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"email",validate:[oe.required(),oe.email()]})})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:p.jsx(E.Typography,{variant:"caption",children:l("ra.auth.recover.inbox_help")})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(E.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})}function xle({name:e,copy:t,version:n,logo:r,background:o}){const[i,a]=P.useState(!1),l=oe.useTranslate(),u=oe.useRedirect(),d=oe.useNotify(),f=oe.useAuthProvider();function g(h){a(!0),f.register(h).then(m=>{const y=`ra.auth.register_${m.responseCode}`,b=m.responseCode==="ok"?"info":"error";d(y,{type:b}),u("/login")}).catch(m=>{d(m.message||m,{type:"error"})}).finally(()=>a(!1))}return p.jsx(Pf,{name:e,copy:t,logo:r,background:o,version:n,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:l("ra.auth.register.title")}),p.jsx(E.Typography,{component:gt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.already_have_account")})]})}),p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(z.Form,{onSubmit:g,children:[p.jsxs(E.Grid,{container:!0,children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"name",label:l("ra.register.name"),validate:oe.required()})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"email",type:"email",validate:[oe.required(),oe.email()]})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"password",type:"password",validate:oe.required()})})]}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(E.CircularProgress,{size:19,thickness:3}):l("ra.auth.create_account")})})]})})]})})}function Cle(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 wle(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Sle(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:p.jsx(ze.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=fn(t,e),{lighter:r,light:o,main:i}=n;return{borderColor:nt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:i}}}function Ale(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 Ele(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Tle(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 Ti({color:e,theme:t}){const n=fn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function Ile(e){const t=Ti({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Ti({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Ti({color:"secondary",theme:e}),"&.MuiBadge-colorError":Ti({color:"error",theme:e}),"&.MuiBadge-colorInfo":Ti({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Ti({color:"success",theme:e}),"&.MuiBadge-colorWarning":Ti({color:"warning",theme:e})}}}}}function it({variant:e,color:t,theme:n}){const r=fn(n,t),{lighter:o,main:i,dark:a,contrastText:l}=r,u=`${t}Button`,d=fa(n,u),f={"&::after":{boxShadow:`0 0 5px 5px ${nt(i,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${nt(i,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...f};case"shadow":return{color:l,backgroundColor:i,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...f};case"outlined":return{borderColor:i,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...f};case"dashed":return{color:i,borderColor:i,backgroundColor:o,"&:hover":{color:a,borderColor:a},...f};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...f}}}function Ole(e){const t=it({variant:"dashed",color:"primary",theme:e}),n=it({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":it({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":it({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":it({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":it({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":it({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":it({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":it({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":it({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":it({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":it({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":it({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":it({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:it({variant:"contained",color:"primary",theme:e}),containedSecondary:it({variant:"contained",color:"secondary",theme:e}),containedError:it({variant:"contained",color:"error",theme:e}),containedSuccess:it({variant:"contained",color:"success",theme:e}),containedInfo:it({variant:"contained",color:"info",theme:e}),containedWarning:it({variant:"contained",color:"warning",theme:e}),outlinedPrimary:it({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:it({variant:"outlined",color:"secondary",theme:e}),outlinedError:it({variant:"outlined",color:"error",theme:e}),outlinedSuccess:it({variant:"outlined",color:"success",theme:e}),outlinedInfo:it({variant:"outlined",color:"info",theme:e}),outlinedWarning:it({variant:"outlined",color:"warning",theme:e}),textPrimary:it({variant:"text",color:"primary",theme:e}),textSecondary:it({variant:"text",color:"secondary",theme:e}),textError:it({variant:"text",color:"error",theme:e}),textSuccess:it({variant:"text",color:"success",theme:e}),textInfo:it({variant:"text",color:"info",theme:e}),textWarning:it({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function Ple(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function jle(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function Rle(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function kle(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function js({color:e,theme:t}){const n=fn(t,e),{lighter:r,main:o,dark:i}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function Mle(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 Ph(e){const t=Mle(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function _le(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(ze.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(ze.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Ph("small")},"&.size-medium":{...Ph("medium")},"&.size-large":{...Ph("large")}},colorPrimary:js({color:"primary",theme:e}),colorSecondary:js({color:"secondary",theme:e}),colorSuccess:js({color:"success",theme:e}),colorWarning:js({color:"warning",theme:e}),colorInfo:js({color:"info",theme:e}),colorError:js({color:"error",theme:e})}}}}function Rs({color:e,theme:t}){const n=fn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Zn({color:e,theme:t}){const n=fn(t,e),{light:r,lighter:o,main:i}=n;return{color:i,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:i,"&:hover":{color:r}}}}function Dle(e){const t=Zn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Rs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Rs({color:"secondary",theme:e}),"&.MuiChip-colorError":Rs({color:"error",theme:e}),"&.MuiChip-colorInfo":Rs({color:"info",theme:e}),"&.MuiChip-colorSuccess":Rs({color:"success",theme:e}),"&.MuiChip-colorWarning":Rs({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 Fle(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:nt("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function Ble(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function Lle(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function ks({color:e,theme:t}){const n=fn(t,e),{main:r,dark:o,contrastText:i}=n,a=`${e}Button`,l=fa(t,a);return{color:i,backgroundColor:r,boxShadow:l,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${nt(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${nt(r,.9)}`}}}function Nle(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":ks({color:"primary",theme:e}),"&.MuiFab-secondary":ks({color:"secondary",theme:e}),"&.Mui-error":ks({color:"error",theme:e}),"&.MuiFab-success":ks({color:"success",theme:e}),"&.MuiFab-info":ks({color:"info",theme:e}),"&.MuiFab-warning":ks({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 $le(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 Vle(e){return{MuiInputBase:{styleOverrides:{}}}}function Wle(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 zle(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function Ule(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function Hle(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function Gle(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function qle(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function Yle(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Ii({variant:e,theme:t}){const n=fn(t,e),{light:r}=n,o=fa(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function Kle(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:{...Ii({variant:"primary",theme:e}),"&.Mui-error":{...Ii({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Ii({variant:"secondary",theme:e}),colorError:Ii({variant:"error",theme:e}),colorWarning:Ii({variant:"warning",theme:e}),colorInfo:Ii({variant:"info",theme:e}),colorSuccess:Ii({variant:"success",theme:e})}}}}function Xle(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function kt({variant:e,color:t,theme:n}){const r=fn(n,t),{lighter:o,light:i,dark:a,main:l,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:l,"&:hover":{backgroundColor:i},...d};case"outlined":return{borderColor:l,"&:hover":{backgroundColor:o,borderColor:i},...d};case"text":default:return{color:l,"&:hover":{backgroundColor:l,color:o},...d}}}function Zle(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":kt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":kt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":kt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":kt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":kt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":kt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":kt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":kt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":kt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":kt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":kt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":kt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":kt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":kt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":kt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":kt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":kt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":kt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":kt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":kt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":kt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":kt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":kt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":kt({variant:"outlined",color:"warning",theme:e})}}}}}}function Qle(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function Ms({color:e,theme:t}){const n=fn(t,e),{lighter:r,main:o,dark:i}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function Jle(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 jh(e){const t=Jle(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function ece(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:p.jsx(E.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":{...jh("small")},"&.size-medium":{...jh("medium")},"&.size-large":{...jh("large")}},colorPrimary:Ms({color:"primary",theme:e}),colorSecondary:Ms({color:"secondary",theme:e}),colorSuccess:Ms({color:"success",theme:e}),colorWarning:Ms({color:"warning",theme:e}),colorInfo:Ms({color:"info",theme:e}),colorError:Ms({color:"error",theme:e})}}}}function _s({color:e,theme:t}){const n=fn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function tce(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":_s({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":_s({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":_s({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":_s({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":_s({color:"info",theme:e}),"&.MuiSlider-thumbColorError":_s({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 nce(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 Rh(e,t){const n=nce(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 rce(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},...Rh(e,"medium")},sizeLarge:{...Rh(e,"large")},sizeSmall:{...Rh(e,"small")}}}}}function oce(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 ice(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 sce(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 ace(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function lce(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function cce(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function uce(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function dce(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function fce(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 pce(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function hce(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function gce(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function mce(e){return Ke.merge(Cle(e),wle(e),Sle(e),Ale(e),Ele(),Tle(e),Ile(e),Ole(e),Ple(),jle(),Rle(),kle(),_le(e),Dle(e),Fle(e),Ble(e),Lle(),Nle(e),$le(e),Vle(),Wle(e),zle(),Ule(),Hle(e),Gle(e),qle(),Yle(),Kle(e),Xle(),Zle(e),Qle(e),ece(e),tce(e),rce(e),oce(e),ice(e),sce(e),ace(e),lce(e),cce(),uce(),dce(),fce(e),pce(e),hce(),gce())}function vce(e){const{blue:t,red:n,gold:r,cyan:o,green:i,grey:a}=e,l={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:l[100],100:l[100],200:l[200],light:l[300],400:l[400],main:l[500],600:l[600],dark:l[700],800:l[800],darker:l[900],A100:l[0],A200:l.A400,A300:l.A700,contrastText:l[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:l[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:i[0],light:i[3],main:i[5],dark:i[7],darker:i[9],contrastText:u},grey:l}}function yce(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 i=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],l=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(i=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],l=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 bce(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 i=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 xce(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 i=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Cce(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 i=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 wce(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 i=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Sce(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 i=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Ace(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 i=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Ece(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 i=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Tce(e,t,n){switch(t){case"theme1":return yce(e,n);case"theme2":return bce(e,n);case"theme3":return xce(e,n);case"theme4":return Cce(e,n);case"theme5":return wce(e,n);case"theme6":return Sce(e,n);case"theme7":return Ace(e,n);case"theme8":return Ece(e,n);default:return vce(e)}}var kg=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];kg.primary=kg[5];var Mg=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Mg.primary=Mg[5];var _g=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];_g.primary=_g[5];var Dg=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Dg.primary=Dg[5];var Fg=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Fg.primary=Fg[5];var Bg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Bg.primary=Bg[5];var Lg=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Lg.primary=Lg[5];var Ng=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Ng.primary=Ng[5];var $g=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];$g.primary=$g[5];var Vg=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Vg.primary=Vg[5];var Wg=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Wg.primary=Wg[5];var zg=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];zg.primary=zg[5];var Ug=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Ug.primary=Ug[5];var Ice={red:kg,volcano:Mg,orange:_g,gold:Dg,yellow:Fg,lime:Bg,green:Lg,cyan:Ng,blue:$g,geekblue:Vg,purple:Wg,magenta:zg,grey:Ug},Hg=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Hg.primary=Hg[5];var Gg=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Gg.primary=Gg[5];var qg=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];qg.primary=qg[5];var Yg=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Yg.primary=Yg[5];var Kg=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Kg.primary=Kg[5];var Xg=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];Xg.primary=Xg[5];var Zg=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Zg.primary=Zg[5];var Qg=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];Qg.primary=Qg[5];var Jg=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Jg.primary=Jg[5];var em=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];em.primary=em[5];var tm=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];tm.primary=tm[5];var nm=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];nm.primary=nm[5];var rm=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];rm.primary=rm[5];var Oce={red:Hg,volcano:Gg,orange:qg,gold:Yg,yellow:Kg,lime:Xg,green:Zg,cyan:Qg,blue:Jg,geekblue:em,purple:tm,magenta:nm,grey:rm};function Pce(e,t){const n=e==="dark"?Oce:Ice;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#121212","#d3d8db"]),n.grey=[...r,...o,...i];const a=Tce(n,t,e);return Fm({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?nt(a.grey[900],.87):a.grey[700],secondary:e==="dark"?nt(a.grey[900],.45):a.grey[500],disabled:e==="dark"?nt(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?nt(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function jce(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%)",z0:"none",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 ${nt(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${nt(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${nt(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${nt(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${nt(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${nt(e.palette.info.main,.2)}`,success:`0 0 0 2px ${nt(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${nt(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${nt(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${nt(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${nt(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${nt(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${nt(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${nt(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${nt(e.palette.grey[500],.2)}`}}function Rce(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 Cv({themeOverrides:e,children:t}){const n=Pn(),{themeDirection:r,mode:o,presetColor:i,fontFamily:a}=n,l=f6(),u=P.useMemo(()=>o==="auto"?l:o,[o,l]),d=P.useMemo(()=>Pce(u,i),[u,i]),f=P.useMemo(()=>Rce(a),[a]),g=P.useMemo(()=>jce(d),[d]),h=P.useMemo(()=>se.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:d.palette,customShadows:g,typography:f,components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:d.spacing(2.6875),height:d.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(d):e),[r,d,f,g,e]),m=Fm(h),y=se.cloneDeep(m.components??{});return m.components=se.merge(mce(m),y),p.jsx(E.StyledEngineProvider,{injectFirst:!0,children:p.jsxs(n5,{theme:m,children:[p.jsx(E.CssBaseline,{enableColorScheme:!0}),t]})})}function kce({children:e,theme:t,...n}){return p.jsx(z.CoreAdminContext,{...n,children:p.jsx(Cv,{themeOverrides:t,children:p.jsx(bT,{children:e})})})}function ST(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:i,disableTelemetry:a,history:l,i18nProvider:u,layout:d,loading:f,loginPage:g,authCallbackPage:h,menu:m,notification:y,queryClient:b,requireAuth:C,store:A=z.localStorageStore(),ready:I,theme:S,title:T="React Admin"}=e;return p.jsx(kce,{authProvider:t,dataProvider:i,i18nProvider:u,store:A,history:l,queryClient:b,theme:S,children:p.jsx(z.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:m,catchAll:n,title:T,loading:f,loginPage:g,authCallbackPage:h,notification:y,requireAuth:C,ready:I,children:r})})}class AT{constructor({catch:t,display:n,log:r,error:o}){Ha(this,"catch");Ha(this,"display");Ha(this,"log");Ha(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}}var Dl,Fl,Qs;class Mce{constructor(t){go(this,Dl);go(this,Fl);go(this,Qs,new Set);const{apiUrl:n}=t??{};if(!se.isString(n)||se.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");zo(this,Fl,n),zo(this,Dl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var l;const{message:n,filename:r,lineno:o,colno:i}=t,a=`${n}${r}${o}${i}`;_n(this,Qs).has(a)||(_n(this,Qs).add(a),fetch(`${_n(this,Fl)}/ui/error-log`,{method:"PUT",headers:_n(this,Dl),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(l=t.error)==null?void 0:l.stack})}).catch(u=>{console.warn("Unable to send error to server",u),_n(this,Qs).delete(a)}))}}Dl=new WeakMap,Fl=new WeakMap,Qs=new WeakMap;function _ce({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=i=>new AT({catch:i!=null,display:!1,log:i!=null,error:i}),...o}){const i=L.useMemo(()=>o.errorHandler?o.errorHandler:new Mce({apiUrl:t}),[t,o.errorHandler]),a=console.error,l=L.useCallback(function(u,...d){var g;if(!u)return!1;const f=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return f.isCatched()||(f.logError()&&(u instanceof ErrorEvent?i.handle(u):i.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),f.displayError()&&a.apply(console,arguments)),!1},[r,i,a]);return L.useEffect(()=>(window.removeEventListener("error",l),window.addEventListener("error",l),console.error=l,()=>{window.removeEventListener("error",l),console.error=a}),[l,a]),!0}var Bl,Ll,Li;class Dce{constructor(t){go(this,Bl);go(this,Ll);go(this,Li,[]);const{apiUrl:n}=t??{};if(!se.isString(n)||se.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");zo(this,Ll,n),zo(this,Bl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!se.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!se.isString(n)||se.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!se.isString(r)||se.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!se.some(_n(this,Li),o=>se.isEqual(o,{code:n,lang:r}))){_n(this,Li).push({code:n,lang:r}),fetch(`${_n(this,Ll)}/i18n/message`,{method:"put",headers:_n(this,Bl),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),zo(this,Li,se.reject(_n(this,Li),i=>se.isEqual(i,{code:n,lang:r})))});return}}}Bl=new WeakMap,Ll=new WeakMap,Li=new WeakMap;function ET(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,i=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),l=new Dce({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(i))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((h,m)=>({...h,[m.lang]:{...h[m.lang]||{},[m.code]:m.text}}),{}))}function f(g,h,m){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&(se.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):l.handleMessage({code:g,lang:m}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[h,m]=g;function y(b){return se.get(m,b,{})}return _w(y,n,h,{allowMissing:r||o,onMissingKey:f})})}function Fce(e){const{defaultLocale:t,path:n}=e,r=[{locale:t,name:t}],o=new Headers({Accept:"application/json","Content-Type":"application/json"});function i(){return fetch(`${n}/languages.json`,{headers:o,method:"get"}).then(l=>l.json()).catch(()=>Promise.resolve(r))}function a(){return fetch(`${n}/messages.json`,{headers:o,method:"get"}).then(l=>l.json()).then(l=>l.reduce((u,d)=>({...u,[d.lang]:{...u[d.lang]||{},[d.code]:d.text}}),{}))}return Promise.all([i(),a()]).then(l=>{const[u,d]=l;function f(g){return se.get(d,g,{})}return _w(f,t,u,{allowMissing:!0})})}function Bce({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=P.useState({loading:!0,languages:null});return P.useEffect(()=>{const i=new Headers;i.append("Accept","application/json"),i.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:i}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function TT(e){const[t,n]=P.useState(),r=d6(e);return P.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}ET(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const Lce=new Ni.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function Nce({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:i,logoIcon:a,loginPage:l=p.jsx(wT,{version:"0.0.0",name:"Applica",redirectTo:"/",background:p.jsx(df,{})}),menu:u,name:d,copy:f,version:g="0.0.0",dataProvider:h,authProvider:m,i18nProvider:y,errorHandler:b,error:C,enableNotification:A=!1,enableRegistration:I=!1,enablePasswordRecover:S=!1,enableThemeToggler:T=!1,enableLocaleSwitcher:O=!1,oauth:R={},queryClient:k=Lce,background:F,notificationAPI:N="entities/notification",...M}){var Y;_ce({apiUrl:n,errorHandler:b,catcherFn:V=>{const X=V==null?void 0:V.toString(),ie=["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($=>X==null?void 0:X.includes($));return new AT({catch:ie,display:!ie,log:!ie&&o===!0,error:X})}});const D=P.useMemo(()=>P.isValidElement(l)?P.cloneElement(l,{name:d,copy:f,logo:i,version:g,background:F,enableRegistration:I,enablePasswordRecover:S,oauth:R}):l,[l,d,g,f,F,i,I,S,R]),U=P.useMemo(()=>V=>{const X=d?p.jsx(bv,{title:d}):i,W=d?p.jsx(xT,{title:d}):a;return p.jsx(cT,{...V,name:d,copy:f,version:g,logoMain:X,logoIcon:W,notification:N,enableThemeToggler:T,enableNotification:A,enableLocaleSwitcher:O,error:C})},[i,a,d,f,g,C,N,A,T,O]),G=TT({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:y});if(G===void 0)return p.jsx(p.Fragment,{});if(G.error)return p.jsx(Eg,{initialConfig:t,children:p.jsx(Cv,{themeOverrides:e,children:p.jsx(CT,{})})});const H=p.jsx(Jne,{children:p.jsx(zS,{menu:u,children:p.jsx(Eg,{initialConfig:t,children:p.jsx(ST,{theme:e,layout:U,notification:fT,queryClient:k,dataProvider:h,authProvider:m,i18nProvider:G,loginPage:D,...M})})})});return(Y=R.google)!=null&&Y.clientId?p.jsx(Gne,{clientId:R.google.clientId,children:H}):H}Object.defineProperty(exports,"ArrayField",{enumerable:!0,get:()=>z.ArrayField});Object.defineProperty(exports,"ArrayInputContext",{enumerable:!0,get:()=>z.ArrayInputContext});Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:()=>z.BooleanField});Object.defineProperty(exports,"ChipField",{enumerable:!0,get:()=>z.ChipField});Object.defineProperty(exports,"Confirm",{enumerable:!0,get:()=>z.Confirm});Object.defineProperty(exports,"CreateContextProvider",{enumerable:!0,get:()=>z.CreateContextProvider});Object.defineProperty(exports,"CustomRoutes",{enumerable:!0,get:()=>z.CustomRoutes});Object.defineProperty(exports,"DeleteWithUndoButton",{enumerable:!0,get:()=>z.DeleteWithUndoButton});Object.defineProperty(exports,"EditButton",{enumerable:!0,get:()=>z.EditButton});Object.defineProperty(exports,"EditContextProvider",{enumerable:!0,get:()=>z.EditContextProvider});Object.defineProperty(exports,"FieldTitle",{enumerable:!0,get:()=>z.FieldTitle});Object.defineProperty(exports,"FilterButton",{enumerable:!0,get:()=>z.FilterButton});Object.defineProperty(exports,"FilterList",{enumerable:!0,get:()=>z.FilterList});Object.defineProperty(exports,"FilterListItem",{enumerable:!0,get:()=>z.FilterListItem});Object.defineProperty(exports,"FilterLiveSearch",{enumerable:!0,get:()=>z.FilterLiveSearch});Object.defineProperty(exports,"Form",{enumerable:!0,get:()=>z.Form});Object.defineProperty(exports,"FormDataConsumer",{enumerable:!0,get:()=>z.FormDataConsumer});Object.defineProperty(exports,"HttpError",{enumerable:!0,get:()=>z.HttpError});Object.defineProperty(exports,"I18nContextProvider",{enumerable:!0,get:()=>z.I18nContextProvider});Object.defineProperty(exports,"ListBase",{enumerable:!0,get:()=>z.ListBase});Object.defineProperty(exports,"LoadingIndicator",{enumerable:!0,get:()=>z.LoadingIndicator});Object.defineProperty(exports,"RaSimpleFormIterator",{enumerable:!0,get:()=>z.SimpleFormIterator});Object.defineProperty(exports,"RecordContextProvider",{enumerable:!0,get:()=>z.RecordContextProvider});Object.defineProperty(exports,"ReferenceArrayField",{enumerable:!0,get:()=>z.ReferenceArrayField});Object.defineProperty(exports,"ReferenceField",{enumerable:!0,get:()=>z.ReferenceField});Object.defineProperty(exports,"Resource",{enumerable:!0,get:()=>z.Resource});Object.defineProperty(exports,"ResourceContextProvider",{enumerable:!0,get:()=>z.ResourceContextProvider});Object.defineProperty(exports,"SaveButton",{enumerable:!0,get:()=>z.SaveButton});Object.defineProperty(exports,"SavedQueriesList",{enumerable:!0,get:()=>z.SavedQueriesList});Object.defineProperty(exports,"SimpleFormIteratorContext",{enumerable:!0,get:()=>z.SimpleFormIteratorContext});Object.defineProperty(exports,"SimpleShowLayout",{enumerable:!0,get:()=>z.SimpleShowLayout});Object.defineProperty(exports,"SingleFieldList",{enumerable:!0,get:()=>z.SingleFieldList});Object.defineProperty(exports,"TabbedFormTabs",{enumerable:!0,get:()=>z.TabbedFormTabs});Object.defineProperty(exports,"UrlField",{enumerable:!0,get:()=>z.UrlField});Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:()=>z.ValidationError});Object.defineProperty(exports,"WithListContext",{enumerable:!0,get:()=>z.WithListContext});Object.defineProperty(exports,"choices",{enumerable:!0,get:()=>z.choices});Object.defineProperty(exports,"email",{enumerable:!0,get:()=>z.email});Object.defineProperty(exports,"maxLength",{enumerable:!0,get:()=>z.maxLength});Object.defineProperty(exports,"maxValue",{enumerable:!0,get:()=>z.maxValue});Object.defineProperty(exports,"minLength",{enumerable:!0,get:()=>z.minLength});Object.defineProperty(exports,"minValue",{enumerable:!0,get:()=>z.minValue});Object.defineProperty(exports,"number",{enumerable:!0,get:()=>z.number});Object.defineProperty(exports,"regex",{enumerable:!0,get:()=>z.regex});Object.defineProperty(exports,"required",{enumerable:!0,get:()=>z.required});Object.defineProperty(exports,"useArrayInput",{enumerable:!0,get:()=>z.useArrayInput});Object.defineProperty(exports,"useAuthProvider",{enumerable:!0,get:()=>z.useAuthProvider});Object.defineProperty(exports,"useCheckAuth",{enumerable:!0,get:()=>z.useCheckAuth});Object.defineProperty(exports,"useChoices",{enumerable:!0,get:()=>z.useChoices});Object.defineProperty(exports,"useChoicesContext",{enumerable:!0,get:()=>z.useChoicesContext});Object.defineProperty(exports,"useCreate",{enumerable:!0,get:()=>z.useCreate});Object.defineProperty(exports,"useCreateContext",{enumerable:!0,get:()=>z.useCreateContext});Object.defineProperty(exports,"useCreateController",{enumerable:!0,get:()=>z.useCreateController});Object.defineProperty(exports,"useCreateSuggestionContext",{enumerable:!0,get:()=>z.useCreateSuggestionContext});Object.defineProperty(exports,"useDataProvider",{enumerable:!0,get:()=>z.useDataProvider});Object.defineProperty(exports,"useDeleteMany",{enumerable:!0,get:()=>z.useDeleteMany});Object.defineProperty(exports,"useEditContext",{enumerable:!0,get:()=>z.useEditContext});Object.defineProperty(exports,"useEditController",{enumerable:!0,get:()=>z.useEditController});Object.defineProperty(exports,"useGetIdentity",{enumerable:!0,get:()=>z.useGetIdentity});Object.defineProperty(exports,"useGetList",{enumerable:!0,get:()=>z.useGetList});Object.defineProperty(exports,"useGetMany",{enumerable:!0,get:()=>z.useGetMany});Object.defineProperty(exports,"useGetManyReference",{enumerable:!0,get:()=>z.useGetManyReference});Object.defineProperty(exports,"useGetOne",{enumerable:!0,get:()=>z.useGetOne});Object.defineProperty(exports,"useInput",{enumerable:!0,get:()=>z.useInput});Object.defineProperty(exports,"useListContext",{enumerable:!0,get:()=>z.useListContext});Object.defineProperty(exports,"useListController",{enumerable:!0,get:()=>z.useListController});Object.defineProperty(exports,"useLocaleState",{enumerable:!0,get:()=>z.useLocaleState});Object.defineProperty(exports,"useLocales",{enumerable:!0,get:()=>z.useLocales});Object.defineProperty(exports,"useLogin",{enumerable:!0,get:()=>z.useLogin});Object.defineProperty(exports,"useLogout",{enumerable:!0,get:()=>z.useLogout});Object.defineProperty(exports,"useNotify",{enumerable:!0,get:()=>z.useNotify});Object.defineProperty(exports,"usePermissions",{enumerable:!0,get:()=>z.usePermissions});Object.defineProperty(exports,"useRecordContext",{enumerable:!0,get:()=>z.useRecordContext});Object.defineProperty(exports,"useReferenceArrayFieldController",{enumerable:!0,get:()=>z.useReferenceArrayFieldController});Object.defineProperty(exports,"useRefresh",{enumerable:!0,get:()=>z.useRefresh});Object.defineProperty(exports,"useRemoveFromStore",{enumerable:!0,get:()=>z.useRemoveFromStore});Object.defineProperty(exports,"useResetStore",{enumerable:!0,get:()=>z.useResetStore});Object.defineProperty(exports,"useResourceContext",{enumerable:!0,get:()=>z.useResourceContext});Object.defineProperty(exports,"useResourceDefinition",{enumerable:!0,get:()=>z.useResourceDefinition});Object.defineProperty(exports,"useResourceDefinitions",{enumerable:!0,get:()=>z.useResourceDefinitions});Object.defineProperty(exports,"useSafeSetState",{enumerable:!0,get:()=>z.useSafeSetState});Object.defineProperty(exports,"useShowContext",{enumerable:!0,get:()=>z.useShowContext});Object.defineProperty(exports,"useShowController",{enumerable:!0,get:()=>z.useShowController});Object.defineProperty(exports,"useSimpleFormIterator",{enumerable:!0,get:()=>z.useSimpleFormIterator});Object.defineProperty(exports,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>z.useSimpleFormIteratorItem});Object.defineProperty(exports,"useStore",{enumerable:!0,get:()=>z.useStore});Object.defineProperty(exports,"useStoreContext",{enumerable:!0,get:()=>z.useStoreContext});Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:()=>z.useTranslate});Object.defineProperty(exports,"useTranslateLabel",{enumerable:!0,get:()=>z.useTranslateLabel});Object.defineProperty(exports,"useUnselect",{enumerable:!0,get:()=>z.useUnselect});Object.defineProperty(exports,"useUnselectAll",{enumerable:!0,get:()=>z.useUnselectAll});Object.defineProperty(exports,"useUpdate",{enumerable:!0,get:()=>z.useUpdate});Object.defineProperty(exports,"useUpdateMany",{enumerable:!0,get:()=>z.useUpdateMany});Object.defineProperty(exports,"withLifecycleCallbacks",{enumerable:!0,get:()=>z.withLifecycleCallbacks});exports.ActionsField=nre;exports.ActionsMenu=si;exports.ActivatePage=yle;exports.ActiveFiltersChips=Rg;exports.AddTableRow=rv;exports.Admin=ST;exports.AnimateButton=X_;exports.AppBarStyled=kE;exports.ApplicaAdmin=Nce;exports.ArrayInput=tre;exports.AttachmentField=I6;exports.AttachmentInput=Ire;exports.AuthBackground=df;exports.AutocompleteArrayInput=Pre;exports.AutocompleteInput=Rre;exports.Avatar=ed;exports.BooleanInput=Mre;exports.Breadcrumbs=s5;exports.BulkActionsToolbar=BE;exports.BulkDeleteWithConfirmButton=g6;exports.BulkFloatingActionsToolbar=oae;exports.Button=Qi;exports.CardForm=h6;exports.ChangePasswordButton=XE;exports.ChangePasswordForm=Q0;exports.CircularWithLabel=eW;exports.CircularWithPath=tW;exports.CoverField=P6;exports.Create=doe;exports.CreateButton=v6;exports.CreateButtonClasses=Ad;exports.CreateInDialogButton=vne;exports.Datagrid=dae;exports.DateAgoField=R6;exports.DateField=dre;exports.DateInput=Fre;exports.DateTimeInput=Lre;exports.DeleteWithConfirmButton=Ji;exports.Dot=Gm;exports.Drawer=RE;exports.DrawerHeader=wA;exports.DrawerHeaderStyled=xA;exports.DrawerToggle=DE;exports.Edit=hoe;exports.EditInDialogButton=xne;exports.EmailField=pre;exports.Empty=ac;exports.EmptyClasses=Wi;exports.Error=_0;exports.Field=uA;exports.FileField=k6;exports.FileInput=$re;exports.FilterSidebar=Lu;exports.FilterSidebarButton=Tae;exports.FilterSidebarContext=pv;exports.Footer=fv;exports.FormHeader=voe;exports.FunctionField=gre;exports.GenericErrorPage=CT;exports.GoogleLoginButton=w6;exports.Header=FE;exports.HeaderButton=ME;exports.HeaderIconButton=eae;exports.HeaderNotification=KE;exports.HeaderProfile=JE;exports.HeaderSpacer=tT;exports.HeaderToggleButton=Aa;exports.HorizontalBar=nT;exports.IconButton=of;exports.ImageField=O6;exports.ImageInput=Vre;exports.ImpersonateUserButton=Zne;exports.LabeledArrayInput=T6;exports.LabeledInput=xn;exports.Layout=cT;exports.LayoutContent=bA;exports.LayoutProvider=mA;exports.LayoutWrapper=lT;exports.LinearWithIcon=nW;exports.LinearWithLabel=rW;exports.List=Wae;exports.ListItem=mle;exports.ListToolbar=GE;exports.ListViewProvider=YE;exports.Loadable=rle;exports.Loader=dT;exports.LoadingButton=C5;exports.LocalStorage=i6;exports.LocaleButton=_E;exports.LocalizedTextField=vre;exports.LocalizedTextInput=Ure;exports.LoginPage=wT;exports.Logo=CA;exports.LogoutButton=ZE;exports.LongForm=Vt;exports.MainCard=Ln;exports.MainIcon=bv;exports.MenuConfigProvider=zS;exports.MenuPopover=A5;exports.NavCollapse=xl;exports.NavGroup=oT;exports.NavItem=bl;exports.NavList=iT;exports.NavMenu=rT;exports.Navigation=sT;exports.Notification=fT;exports.NotificationList=Gae;exports.NumberInput=Gre;exports.OnboardingActionType=Zs;exports.OnboardingContext=xv;exports.OnboardingModes=_l;exports.OnboardingProvider=cle;exports.OnboardingTip=ple;exports.Pagination=mv;exports.PaginationActions=gv;exports.PopupTransition=JV;exports.RadioButtonGroupInput=Yre;exports.ReadonlyField=Cre;exports.RecordInput=Kre;exports.RecoverPage=ble;exports.ReferenceArrayInput=Xre;exports.ReferenceInput=Zre;exports.ReferenceManyField=_6;exports.ReferenceManyInput=Qre;exports.RegisterPage=xle;exports.RemoveSavedQueryDialog=zE;exports.ResponsiveSection=eT;exports.SaveFiltersButton=WE;exports.SaveFiltersDialog=VE;exports.SavedFiltersList=UE;exports.ScrollTop=bT;exports.ScrollX=hle;exports.SearchInput=eoe;exports.SelectArrayInput=noe;exports.SelectInput=ooe;exports.ShadowBox=gle;exports.Show=Moe;exports.Sidebar=xr;exports.SimpleBar=jE;exports.SimpleForm=X0;exports.SimpleFormIterator=Doe;exports.SimpleList=qae;exports.SizeField=Are;exports.SmallIcon=xT;exports.SmartTextInput=ioe;exports.StopImpersonateButton=QE;exports.StyledArrow=w5;exports.TabbedForm=nv;exports.TableCreateButton=iv;exports.TableFormIterator=Ef;exports.TableFormIteratorContext=sv;exports.TableFormIteratorItem=fA;exports.TableFormIteratorItemContext=ov;exports.TextField=M6;exports.TextInput=wr;exports.ThemeColor=yv;exports.ThemeContext=H0;exports.ThemeCustomizationProvider=Cv;exports.ThemeProvider=Eg;exports.ThemeToggler=aT;exports.TimeInput=coe;exports.Toolbar=ui;exports.Tooltip=uf;exports.TopToolbar=uT;exports.Transitions=ii;exports.WizardForm=hA;exports.createI18nProvider=ET;exports.createJsonI18nProvider=Fce;exports.getLocalizedValue=W0;exports.getPosition=S5;exports.getThemeColor=fn;exports.getThemeShadow=fa;exports.localizedValueHasAllLocales=wd;exports.localizedValueHasAtLeastOneLocale=s6;exports.onboardingModesSchema=hT;exports.onboardingTopicSchema=pT;exports.parseTime=c6;exports.useBreadcrumbs=US;exports.useGetChipValue=hv;exports.useGetLocalizedValue=Gte;exports.useI18nLanguages=Bce;exports.useI18nProvider=TT;exports.useIsEnabledSidebarFilter=$E;exports.useLayoutContext=av;exports.useLayoutDispatch=Qoe;exports.useLayoutDrawerState=ts;exports.useLayoutLogoState=yA;exports.useLayoutMediaState=or;exports.useLayoutNotificationsState=If;exports.useLayoutState=wa;exports.useLayoutThemeState=Joe;exports.useListViewContext=vv;exports.useLocalStorage=z0;exports.useLocalizedValue=Hte;exports.useMemoizedObject=d6;exports.useMenu=D0;exports.useMenuConfig=kl;exports.useMenuContext=bf;exports.useOnboardingDataProvider=gT;exports.useOnboardingTip=yT;exports.usePopoverState=ba;exports.useRefDimensions=qte;exports.useResourceDefaultValues=foe;exports.useResourceTitle=U0;exports.useRestartOnboarding=dle;exports.useSx=Br;exports.useSystemTheme=f6;exports.useTableFormIterator=dA;exports.useTableFormIteratorItem=cA;exports.useThemeConfig=Pn;exports.useThemeContext=G0;exports.useWizardFormContext=Tf;exports.uuid=Yee;exports.walkChildren=Sf;exports.withLayoutProvider=vA;
|
|
238
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var yn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},zn={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"},Sa={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},vie={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},yie=function(t){switch(t){case yn.Mobile:return{isMobile:!0};case yn.Tablet:return{isTablet:!0};case yn.SmartTv:return{isSmartTV:!0};case yn.Console:return{isConsole:!0};case yn.Wearable:return{isWearable:!0};case yn.Browser:return{isBrowser:!0};case yn.Embedded:return{isEmbedded:!0};default:return vie}},bie=function(t){return AA(t)},Be=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},cv=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},uv=function(t){var n=cv();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},xie=function(t,n,r,o,i){return{isBrowser:t,browserMajorVersion:Be(n.major),browserFullVersion:Be(n.version),browserName:Be(n.name),engineName:Be(r.name),engineVersion:Be(r.version),osName:Be(o.name),osVersion:Be(o.version),userAgent:Be(i)}},ww=function(t,n,r,o){return oie({},t,{vendor:Be(n.vendor),model:Be(n.model),os:Be(r.name),osVersion:Be(r.version),ua:Be(o)})},Cie=function(t,n,r,o){return{isSmartTV:t,engineName:Be(n.name),engineVersion:Be(n.version),osName:Be(r.name),osVersion:Be(r.version),userAgent:Be(o)}},wie=function(t,n,r,o){return{isConsole:t,engineName:Be(n.name),engineVersion:Be(n.version),osName:Be(r.name),osVersion:Be(r.version),userAgent:Be(o)}},Sie=function(t,n,r,o){return{isWearable:t,engineName:Be(n.name),engineVersion:Be(n.version),osName:Be(r.name),osVersion:Be(r.version),userAgent:Be(o)}},Aie=function(t,n,r,o,i){return{isEmbedded:t,vendor:Be(n.vendor),model:Be(n.model),engineName:Be(r.name),engineVersion:Be(r.version),osName:Be(o.name),osVersion:Be(o.version),userAgent:Be(i)}};function Eie(e){var t=e?sc(e):EA,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,l=yie(n.type),u=l.isBrowser,d=l.isMobile,f=l.isTablet,g=l.isSmartTV,h=l.isConsole,m=l.isWearable,y=l.isEmbedded;if(u)return xie(u,r,o,i,a);if(g)return Cie(g,o,i,a);if(h)return wie(h,o,i,a);if(d||f)return ww(l,n,i,a);if(m)return Sie(m,o,i,a);if(y)return Aie(y,n,o,i,a)}var TA=function(t){var n=t.type;return n===yn.Mobile},IA=function(t){var n=t.type;return n===yn.Tablet},OA=function(t){var n=t.type;return n===yn.Mobile||n===yn.Tablet},PA=function(t){var n=t.type;return n===yn.SmartTv},Od=function(t){var n=t.type;return n===yn.Browser},jA=function(t){var n=t.type;return n===yn.Wearable},RA=function(t){var n=t.type;return n===yn.Console},kA=function(t){var n=t.type;return n===yn.Embedded},MA=function(t){var n=t.vendor;return Be(n)},_A=function(t){var n=t.model;return Be(n)},DA=function(t){var n=t.type;return Be(n,"browser")},FA=function(t){var n=t.name;return n===Sa.Android},BA=function(t){var n=t.name;return n===Sa.Windows},LA=function(t){var n=t.name;return n===Sa.MAC_OS},NA=function(t){var n=t.name;return n===Sa.WindowsPhone},$A=function(t){var n=t.name;return n===Sa.IOS},VA=function(t){var n=t.version;return Be(n)},WA=function(t){var n=t.name;return Be(n)},zA=function(t){var n=t.name;return n===zn.Chrome},UA=function(t){var n=t.name;return n===zn.Firefox},HA=function(t){var n=t.name;return n===zn.Chromium},Pd=function(t){var n=t.name;return n===zn.Edge},GA=function(t){var n=t.name;return n===zn.Yandex},qA=function(t){var n=t.name;return n===zn.Safari||n===zn.MobileSafari},YA=function(t){var n=t.name;return n===zn.MobileSafari},KA=function(t){var n=t.name;return n===zn.Opera},XA=function(t){var n=t.name;return n===zn.InternetExplorer||n===zn.Ie},ZA=function(t){var n=t.name;return n===zn.MIUI},QA=function(t){var n=t.name;return n===zn.SamsungBrowser},JA=function(t){var n=t.version;return Be(n)},eE=function(t){var n=t.major;return Be(n)},tE=function(t){var n=t.name;return Be(n)},nE=function(t){var n=t.name;return Be(n)},rE=function(t){var n=t.version;return Be(n)},oE=function(){var t=cv(),n=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},Xs=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},iE=function(){var t=cv();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Hr=function(){return uv("iPad")},sE=function(){return uv("iPhone")},aE=function(){return uv("iPod")},lE=function(t){return Be(t)};function cE(e){var t=e||EA,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:PA(n),isConsole:RA(n),isWearable:jA(n),isEmbedded:kA(n),isMobileSafari:YA(r)||Hr(),isChromium:HA(r),isMobile:OA(n)||Hr(),isMobileOnly:TA(n),isTablet:IA(n)||Hr(),isBrowser:Od(n),isDesktop:Od(n),isAndroid:FA(o),isWinPhone:NA(o),isIOS:$A(o)||Hr(),isChrome:zA(r),isFirefox:UA(r),isSafari:qA(r),isOpera:KA(r),isIE:XA(r),osVersion:VA(o),osName:WA(o),fullBrowserVersion:JA(r),browserVersion:eE(r),browserName:tE(r),mobileVendor:MA(n),mobileModel:_A(n),engineName:nE(i),engineVersion:rE(i),getUA:lE(a),isEdge:Pd(r)||Xs(a),isYandex:GA(r),deviceType:DA(n),isIOS13:iE(),isIPad13:Hr(),isIPhone13:sE(),isIPod13:aE(),isElectron:oE(),isEdgeChromium:Xs(a),isLegacyEdge:Pd(r)&&!Xs(a),isWindows:BA(o),isMacOs:LA(o),isMIUI:ZA(r),isSamsungBrowser:QA(r)}}var uE=PA(ir),dE=RA(ir),fE=jA(ir),Tie=kA(ir),Iie=YA(Cn)||Hr(),Oie=HA(Cn),Of=OA(ir)||Hr(),pE=TA(ir),hE=IA(ir)||Hr(),gE=Od(ir),Pie=Od(ir),mE=FA(fi),vE=NA(fi),yE=$A(fi)||Hr(),jie=zA(Cn),Rie=UA(Cn),kie=qA(Cn),Mie=KA(Cn),bE=XA(Cn),_ie=VA(fi),Die=WA(fi),Fie=JA(Cn),Bie=eE(Cn),Lie=tE(Cn),Nie=MA(ir),$ie=_A(ir),Vie=nE(lv),Wie=rE(lv),zie=lE(ic),Uie=Pd(Cn)||Xs(ic),Hie=GA(Cn),Gie=DA(ir),qie=iE(),Yie=Hr(),Kie=sE(),Xie=aE(),Zie=oE(),Qie=Xs(ic),Jie=Pd(Cn)&&!Xs(ic),ese=BA(fi),tse=LA(fi),nse=ZA(Cn),rse=QA(Cn),ose=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=sc(t),r=n.device,o=n.browser,i=n.os,a=n.engine,l=n.ua;return cE({device:r,browser:o,os:i,engine:a,ua:l})},ise=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return mE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},sse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return gE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},ase=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return bE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},lse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return yE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},cse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return Of?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},use=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return hE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},dse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return vE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},fse=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=Pr(t,["renderWithFragment","children","viewClassName","style"]);return pE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},pse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return uE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},hse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return dE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},gse=function(t){var n=t.renderWithFragment,r=t.children,o=Pr(t,["renderWithFragment","children"]);return fE?n?At.createElement(bn.Fragment,null,r):At.createElement("div",o,r):null},mse=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,i=Pr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?At.createElement(bn.Fragment,null,r):At.createElement("div",i,r):null};function vse(e){return function(t){cie(n,t);function n(r){var o;return iie(this,n),o=die(this,Pg(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(Fu(o)),o.onOrientationChange=o.onOrientationChange.bind(Fu(o)),o.onPageLoad=o.onPageLoad.bind(Fu(o)),o.state={isLandscape:!1,isPortrait:!1},o}return aie(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":vl(window))!==void 0&&Of&&(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 At.createElement(e,Og({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(At.Component)}function yse(){var e=bn.useState(function(){var i=window.innerWidth>window.innerHeight?90:0;return{isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"}}),t=fie(e,2),n=t[0],r=t[1],o=bn.useCallback(function(){var i=window.innerWidth>window.innerHeight?90:0,a={isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return bn.useEffect(function(){return(typeof window>"u"?"undefined":vl(window))!==void 0&&Of&&(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 xE(e){var t=e||window.navigator.userAgent;return sc(t)}function bse(e){var t=e||window.navigator.userAgent,n=xE(t),r=cE(n);return[r,n]}Ae.AndroidView=ise;Ae.BrowserTypes=zn;var xse=Ae.BrowserView=sse;Ae.ConsoleView=hse;Ae.CustomView=mse;Ae.IEView=ase;Ae.IOSView=lse;Ae.MobileOnlyView=fse;var Cse=Ae.MobileView=cse;Ae.OsTypes=Sa;Ae.SmartTVView=pse;Ae.TabletView=use;Ae.WearableView=gse;Ae.WinPhoneView=dse;Ae.browserName=Lie;Ae.browserVersion=Bie;Ae.deviceDetect=Eie;Ae.deviceType=Gie;Ae.engineName=Vie;Ae.engineVersion=Wie;Ae.fullBrowserVersion=Fie;Ae.getSelectorsByUserAgent=ose;Ae.getUA=zie;Ae.isAndroid=mE;Ae.isBrowser=gE;Ae.isChrome=jie;Ae.isChromium=Oie;Ae.isConsole=dE;Ae.isDesktop=Pie;Ae.isEdge=Uie;Ae.isEdgeChromium=Qie;Ae.isElectron=Zie;Ae.isEmbedded=Tie;Ae.isFirefox=Rie;Ae.isIE=bE;Ae.isIOS=yE;Ae.isIOS13=qie;Ae.isIPad13=Yie;Ae.isIPhone13=Kie;Ae.isIPod13=Xie;Ae.isLegacyEdge=Jie;Ae.isMIUI=nse;Ae.isMacOs=tse;Ae.isMobile=Of;Ae.isMobileOnly=pE;Ae.isMobileSafari=Iie;Ae.isOpera=Mie;Ae.isSafari=kie;Ae.isSamsungBrowser=rse;Ae.isSmartTV=uE;Ae.isTablet=hE;Ae.isWearable=fE;Ae.isWinPhone=vE;Ae.isWindows=ese;Ae.isYandex=Hie;Ae.mobileModel=$ie;Ae.mobileVendor=Nie;Ae.osName=Die;Ae.osVersion=_ie;Ae.parseUserAgent=sc;Ae.setUserAgent=bie;Ae.useDeviceData=xE;Ae.useDeviceSelectors=bse;Ae.useMobileOrientation=yse;Ae.withOrientationChange=vse;var wse=typeof global=="object"&&global&&global.Object===Object&&global,Sse=typeof self=="object"&&self&&self.Object===Object&&self,CE=wse||Sse||Function("return this")(),jd=CE.Symbol,wE=Object.prototype,Ase=wE.hasOwnProperty,Ese=wE.toString,tl=jd?jd.toStringTag:void 0;function Tse(e){var t=Ase.call(e,tl),n=e[tl];try{e[tl]=void 0;var r=!0}catch{}var o=Ese.call(e);return r&&(t?e[tl]=n:delete e[tl]),o}var Ise=Object.prototype,Ose=Ise.toString;function Pse(e){return Ose.call(e)}var jse="[object Null]",Rse="[object Undefined]",Sw=jd?jd.toStringTag:void 0;function kse(e){return e==null?e===void 0?Rse:jse:Sw&&Sw in Object(e)?Tse(e):Pse(e)}function Mse(e){return e!=null&&typeof e=="object"}var _se="[object Symbol]";function Dse(e){return typeof e=="symbol"||Mse(e)&&kse(e)==_se}var Fse=/\s/;function Bse(e){for(var t=e.length;t--&&Fse.test(e.charAt(t)););return t}var Lse=/^\s+/;function Nse(e){return e&&e.slice(0,Bse(e)+1).replace(Lse,"")}function Rd(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Aw=NaN,$se=/^[-+]0x[0-9a-f]+$/i,Vse=/^0b[01]+$/i,Wse=/^0o[0-7]+$/i,zse=parseInt;function Ew(e){if(typeof e=="number")return e;if(Dse(e))return Aw;if(Rd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Rd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Nse(e);var n=Vse.test(e);return n||Wse.test(e)?zse(e.slice(2),n?2:8):$se.test(e)?Aw:+e}var Th=function(){return CE.Date.now()},Use="Expected a function",Hse=Math.max,Gse=Math.min;function Bu(e,t,n){var r,o,i,a,l,u,d=0,f=!1,g=!1,h=!0;if(typeof e!="function")throw new TypeError(Use);t=Ew(t)||0,Rd(n)&&(f=!!n.leading,g="maxWait"in n,i=g?Hse(Ew(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(R){var k=r,F=o;return r=o=void 0,d=R,a=e.apply(F,k),a}function y(R){return d=R,l=setTimeout(A,t),f?m(R):a}function b(R){var k=R-u,F=R-d,N=t-k;return g?Gse(N,i-F):N}function C(R){var k=R-u,F=R-d;return u===void 0||k>=t||k<0||g&&F>=i}function A(){var R=Th();if(C(R))return I(R);l=setTimeout(A,b(R))}function I(R){return l=void 0,h&&r?m(R):(r=o=void 0,a)}function S(){l!==void 0&&clearTimeout(l),d=0,r=u=o=l=void 0}function T(){return l===void 0?a:I(Th())}function O(){var R=Th(),k=C(R);if(r=arguments,o=this,u=R,k){if(l===void 0)return y(u);if(g)return clearTimeout(l),l=setTimeout(A,t),m(u)}return l===void 0&&(l=setTimeout(A,t)),a}return O.cancel=S,O.flush=T,O}var qse="Expected a function";function Yse(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(qse);return Rd(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Bu(e,t,{leading:r,maxWait:t,trailing:o})}var Gs=function(){return Gs=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Gs.apply(this,arguments)};function SE(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function AE(e){return!e||!e.ownerDocument?document:e.ownerDocument}var EE=function(e){var t={},n=Array.prototype.reduce.call(e,function(r,o){var i=o.name.match(/data-simplebar-(.+)/);if(i){var a=i[1].replace(/\W+(.)/g,function(l,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 TE(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function IE(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function OE(e){return".".concat(e.split(" ").join("."))}var dv=!!(typeof window<"u"&&window.document&&window.document.createElement),Kse=Object.freeze({__proto__:null,addClasses:TE,canUseDOM:dv,classNamesToQuery:OE,getElementDocument:AE,getElementWindow:SE,getOptions:EE,removeClasses:IE}),Fs=null,Tw=null;dv&&window.addEventListener("resize",function(){Tw!==window.devicePixelRatio&&(Tw=window.devicePixelRatio,Fs=null)});function Iw(){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 Ho=SE,Ih=AE,Xse=EE,Go=TE,qo=IE,Dn=OE,yu=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=Ho(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,Go(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(){qo(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(Go(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){qo(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 i,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)&&(i=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(a=r.isWithinBounds(r.axis.y.track.rect)),(i||a)&&(o.stopPropagation(),o.type==="pointerdown"&&o.pointerType!=="touch"&&(i&&(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 i,a,l,u,d,f,g,h,m,y,b;if(!(!r.draggedAxis||!r.contentWrapperEl)){var C,A=r.axis[r.draggedAxis].track,I=(a=(i=A.rect)===null||i===void 0?void 0:i[r.axis[r.draggedAxis].sizeAttr])!==null&&a!==void 0?a:0,S=r.axis[r.draggedAxis].scrollbar,T=(u=(l=r.contentWrapperEl)===null||l===void 0?void 0:l[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&u!==void 0?u:0,O=parseInt((f=(d=r.elStyles)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&f!==void 0?f:"0px",10);o.preventDefault(),o.stopPropagation(),r.draggedAxis==="y"?C=o.pageY:C=o.pageX;var R=C-((h=(g=A.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-r.axis[r.draggedAxis].dragOffset;R=r.draggedAxis==="x"&&r.isRtl?((y=(m=A.rect)===null||m===void 0?void 0:m[r.axis[r.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-S.size-R:R;var k=R/(I-S.size),F=k*(T-O);r.draggedAxis==="x"&&r.isRtl&&(F=!((b=e.getRtlHelpers())===null||b===void 0)&&b.isScrollingToNegative?-F:F),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=F}},this.onEndDrag=function(o){r.isDragging=!1;var i=Ih(r.el),a=Ho(r.el);o.preventDefault(),o.stopPropagation(),qo(r.el,r.classNames.dragging),r.onStopScrolling(),i.removeEventListener("mousemove",r.drag,!0),i.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=a.setTimeout(function(){i.removeEventListener("click",r.preventClick,!0),i.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(o){o.preventDefault(),o.stopPropagation()},this.el=t,this.options=Gs(Gs({},e.defaultOptions),n),this.classNames=Gs(Gs({},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=Yse(this._onMouseMove,64),this.onWindowResize=Bu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=Bu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Bu(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),i=e.getOffset(r);n.scrollLeft=-999;var a=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:o.left!==i.left,isScrollingToNegative:i.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:Iw()}catch{return Iw()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=Ih(t),o=Ho(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){dv&&(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(Dn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Dn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Dn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Dn(this.classNames.offset)),this.maskEl=this.el.querySelector(Dn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Dn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Dn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Dn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Dn(this.classNames.track)).concat(Dn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Dn(this.classNames.track)).concat(Dn(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Dn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(Dn(this.classNames.scrollbar)))||null,this.options.autoHide||(Go(this.axis.x.scrollbar.el,this.classNames.visible),Go(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=Ho(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,i=r.ResizeObserver||ResizeObserver;this.resizeObserver=new i(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=Ho(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,i=this.contentWrapperEl.offsetWidth,a=this.elStyles.overflowX,l=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 f=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&d>n,this.axis.y.isOverflowing=u>f,this.axis.x.isOverflowing=a==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=l==="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,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&d>i-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&u>f-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],i=(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=i/o,l;return l=Math.max(~~(a*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(l=Math.min(l,this.options.scrollbarMaxSize)),l},e.prototype.positionScrollbar=function(t){var n,r,o;t===void 0&&(t="y");var i=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!i.el||!this.elStyles)){var a=this.contentWrapperEl[this.axis[t].scrollSizeAttr],l=((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 f=d/(a-u),g=~~((l-i.size)*f);g=t==="x"&&this.isRtl?-g+(l-i.size):g,i.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&&(Go(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&&(qo(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),Go(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?Go(n.scrollbar.el,this.classNames.hover):qo(n.scrollbar.el,this.classNames.hover)):(qo(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),qo(this.axis[t].track.el,this.classNames.hover),qo(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=Ih(this.el),i=Ho(this.el),a=this.axis[n].scrollbar,l=n==="y"?t.pageY:t.pageX;this.axis[n].dragOffset=l-(((r=a.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,Go(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)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,n){var r=this,o,i,a,l;n===void 0&&(n="y");var u=this.axis[n];if(!(!this.options.clickOnTrack||!u.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var d=Ho(this.el);this.axis[n].scrollbar.rect=u.scrollbar.el.getBoundingClientRect();var f=this.axis[n].scrollbar,g=(i=(o=f.rect)===null||o===void 0?void 0:o[this.axis[n].offsetAttr])!==null&&i!==void 0?i:0,h=parseInt((l=(a=this.elStyles)===null||a===void 0?void 0:a[this.axis[n].sizeAttr])!==null&&l!==void 0?l:"0px",10),m=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],y=n==="y"?this.mouseY-g:this.mouseX-g,b=y<0?-1:1,C=b===-1?m-h:m+h,A=40,I=function(){r.contentWrapperEl&&(b===-1?m>C&&(m-=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,d.requestAnimationFrame(I)):m<C&&(m+=A,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,d.requestAnimationFrame(I)))};I()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Ho(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=Xse,e.helpers=Kse,e}(),Qn=function(){return Qn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Qn.apply(this,arguments)};function Zse(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 PE=L.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,i=Zse(e,["children","scrollableNodeProps"]),a=L.useRef(),l=L.useRef(),u=L.useRef(),d={},f={};Object.keys(i).forEach(function(m){Object.prototype.hasOwnProperty.call(yu.defaultOptions,m)?d[m]=i[m]:f[m]=i[m]});var g=Qn(Qn({},yu.defaultOptions.classNames),d.classNames),h=Qn(Qn({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||yu.defaultOptions.ariaLabel});return L.useEffect(function(){var m;return l.current=h.ref?h.ref.current:l.current,a.current&&(m=new yu(a.current,Qn(Qn(Qn({},d),l.current&&{scrollableNode:l.current}),u.current&&{contentNode:u.current})),typeof t=="function"?t(m):t&&(t.current=m)),function(){m==null||m.unMount(),m=null,typeof t=="function"&&t(null)}},[]),L.createElement("div",Qn({"data-simplebar":"init",ref:a},f),L.createElement("div",{className:g.wrapper},L.createElement("div",{className:g.heightAutoObserverWrapperEl},L.createElement("div",{className:g.heightAutoObserverEl})),L.createElement("div",{className:g.mask},L.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:l,scrollableNodeProps:Qn(Qn({},h),{ref:l}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):L.createElement("div",Qn({},h),L.createElement("div",{className:g.contentEl},n)))),L.createElement("div",{className:g.placeholder})),L.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},L.createElement("div",{className:g.scrollbar})),L.createElement("div",{className:"".concat(g.track," simplebar-vertical")},L.createElement("div",{className:g.scrollbar})))});PE.displayName="SimpleBar";const Qse=ge(xse)({flexGrow:1,height:"100%",overflow:"hidden"}),Jse=ge(PE)(({theme:e})=>({maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:nt(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 jE({children:e,sx:t,...n}){return p.jsxs(p.Fragment,{children:[p.jsx(Qse,{children:p.jsx(Jse,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),p.jsx(Cse,{children:p.jsx(E.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function RE(e){const t=E.useTheme(),n=Br(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=or(),{open:o,handleDrawerToggle:i,width:a}=ts(),l=r?E.Drawer:eie,u=document.body,d=P.useMemo(()=>r?{container:u,variant:"temporary",onClose:i,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,i,a,t.palette.divider]);return p.jsx(E.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:p.jsxs(l,{...d,open:o,children:[p.jsx(wA,{}),p.jsx(jE,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function fv(e){const{name:t,version:n,copy:r="© Applica Software Guru for"}=e;return p.jsx(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:p.jsxs(E.Typography,{variant:"caption",children:[p.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const kE=ge(E.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=Pn();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})}}}),ME=P.forwardRef(function(t,n){const r=Br(t,{color:"text.primary"},{defaults:!0});return p.jsx(E.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),eae=P.forwardRef(function(t,n){const r=Br(t,{color:"text.primary"},{defaults:!0});return p.jsx(of,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Aa=P.forwardRef(function(t,n){const r=Br(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return p.jsx(E.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function _E({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=ba(),[i,a]=oe.useLocaleState(),l=oe.useLocales();if(l.length===0)return null;function u(d){if(e){e(d,r);return}a(d),r()}return p.jsxs(p.Fragment,{children:[p.jsx(ME,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:p.jsxs(E.Stack,{direction:"row",spacing:.5,children:[p.jsx(E.Typography,{variant:"body1",children:i.toUpperCase()}),t?p.jsx(ze.CaretUpOutlined,{}):p.jsx(ze.CaretDownOutlined,{})]})}),p.jsx(E.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:l.map((d,f)=>p.jsx(E.MenuItem,{onClick:()=>u(d.locale),children:d.name},f))})]})}const tae={ml:{xs:0,lg:-2}};function DE(){const{open:e,handleDrawerToggle:t}=ts();return p.jsx(Aa,{value:"drawer","aria-label":"open drawer",sx:tae,onChange:t,selected:e,children:e?p.jsx(ze.MenuFoldOutlined,{}):p.jsx(ze.MenuUnfoldOutlined,{})})}function FE(e){const t=P.useRef(),n=E.useTheme(),{downLg:r,horizontal:o}=or(),{open:i,width:a}=ts(),l=r?E.AppBar:kE,d={position:"fixed",color:"inherit",elevation:0,sx:Br(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":i?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}})};return r||se.extend(d,{open:i}),p.jsx(l,{ref:t,...d,children:p.jsxs(E.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&p.jsx(DE,{}),e.children]})})}function nae(e){const t=E.useTheme(),{notification:n,onClick:r,selected:o,divider:i}=e,{resource:a}=If(),l=oe.useNotify(),u=oe.useRedirect(),[d]=oe.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Fr().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:()=>{l("resources.notifications.messages.readed.error","warning")}}),f=P.useCallback(()=>d(),[d]),[g]=oe.useLocaleState(),h=P.useMemo(()=>Fr(n.created).locale(g).fromNow(),[n,g]);return p.jsx(E.ListItem,{disablePadding:!0,divider:i,children:p.jsxs(E.ListItemButton,{selected:o,onClick:f,children:[p.jsx(E.ListItemAvatar,{children:p.jsx(E.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:p.jsx(ze.MessageOutlined,{})})}),p.jsx(E.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),p.jsx(E.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),p.jsx(E.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:h,primaryTypographyProps:{variant:"caption"}})]})})}function BE(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:i,resource:a,selectedIds:l=[],onUnselectItems:u}=oe.useListContext(e),d=oe.useTranslate(),f=P.useCallback(()=>{u()},[u]);return p.jsx(rae,{className:r,children:p.jsxs(E.Toolbar,{"data-test":"bulk-actions-toolbar",className:$e(_r.toolbar,{[_r.collapsed]:l.length===0}),...oe.sanitizeListRestProps(o),children:[p.jsxs("div",{className:_r.title,children:[p.jsx(E.IconButton,{className:_r.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:f,size:"small",children:p.jsx(cn.Close,{fontSize:"small"})}),p.jsx(E.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:l.length})})]}),p.jsx(z.TopToolbar,{className:_r.topToolbar,children:P.Children.map(n,g=>P.isValidElement(g)?P.cloneElement(g,{filterValues:i,resource:a,selectedIds:l}):null)})]})})}const Mi="RaBulkActionsToolbar",_r={toolbar:`${Mi}-toolbar`,topToolbar:`${Mi}-topToolbar`,buttons:`${Mi}-buttons`,collapsed:`${Mi}-collapsed`,title:`${Mi}-title`,icon:`${Mi}-icon`},rae=ge("div",{name:Mi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${_r.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"?tg(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},[`& .${_r.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${_r.buttons}`]:{},[`& .${_r.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${_r.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${_r.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),Oh={p:0,m:0},Ow={p:2,m:0,borderRadius:0,width:"100%"};function oae(e){const{children:t}=e,[n,r]=L.useState(null);function o(y){r(y.currentTarget)}function i(){r(null)}const a=E.useMediaQuery(y=>y.breakpoints.down("md")),{filterValues:l,resource:u,selectedIds:d=[],onUnselectItems:f}=z.useListContext(e),g=!!n&&d!==void 0&&d.length>0,h=g?"simple-popover":void 0,m=L.useCallback(()=>{f(),r(null)},[f,r]);return p.jsx(E.Fade,{in:d!==void 0&&d.length>0,children:p.jsxs(E.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[p.jsx(E.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),p.jsx(E.Popover,{id:h,open:g,anchorEl:n,onClose:i,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:p.jsxs(E.List,{sx:Oh,children:[p.jsx(E.ListItem,{sx:Oh,children:p.jsx(z.Button,{onClick:m,sx:Ow,label:"ra.action.unselect",startIcon:p.jsx(xg,{}),children:p.jsx(xg,{})})}),L.Children.map(t,y=>{var b;return p.jsx(E.ListItem,{sx:Oh,children:L.isValidElement(y)?L.cloneElement(y,{filterValues:l,resource:u,selectedIds:d,sx:Ow,...(b=y.props)!=null&&b.popover?{closePopover:i}:{}}):null})})]})})]})})}const LE=P.createContext({});LE.displayName="DatagridContext";function iae({children:e,value:t}){return p.jsx(LE.Provider,{value:t,children:e})}const sae=E.styled("div")(({theme:e})=>({padding:e.spacing(2),display:"flex",justifyContent:"center",gap:e.spacing(2)})),yl="ApplicaEmpty",Wi={message:`${yl}-message`,icon:`${yl}-icon`,toolbar:`${yl}-toolbar`},aae=E.styled("span",{name:yl,slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,height:"calc(100vh - 200px)",[`& .${Wi.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${Wi.icon}`]:{fontSize:"9em",marginTop:"16px",marginBottom:"16px"},[`& .${Wi.toolbar}`]:{textAlign:"center"}}));function ac({actions:e,className:t,hasCreate:n,icon:r=p.jsx(ze.DropboxOutlined,{className:Wi.icon}),title:o,subtitle:i,sx:a,...l}){const{hasCreate:u}=oe.useResourceDefinition(l),d=n??u,f=oe.useResourceContext(l),g=oe.useTranslate(),h=oe.useGetResourceLabel(),m=f?g(`resources.${f}.forcedCaseName`,{smart_count:0,_:h(f,0)}):g("ra.empty.no_resource"),y=g("ra.page.empty",{name:m}),b=g("ra.page.invite");return p.jsxs(aae,{className:$e(`${yl}-root`,t),sx:a,children:[p.jsxs(E.Box,{className:Wi.message,children:[r,p.jsx(E.Typography,{variant:"h4",paragraph:!0,children:o||g(`resources.${f}.empty`,{_:y})}),i||(d?p.jsx(E.Typography,{variant:"body1",children:g(`resources.${f}.invite`,{_:b})}):null)]}),p.jsx(sae,{className:Wi.toolbar,children:e||(d?p.jsx(v6,{disableFloatingButton:!0}):null)})]})}const Pw=p.jsx(z.BulkDeleteButton,{}),NE=L.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?z.PureDatagridBody:z.DatagridBody,header:o=z.DatagridHeader,children:i,className:a,empty:l,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:f=Pw,hover:g,isRowSelectable:h,isRowExpandable:m,resource:y,rowClick:b,rowSx:C,rowStyle:A,size:I="small",sx:S,expandSingle:T=!1,...O}=e,R=oe.useTranslate(),{sort:k,data:F,isLoading:N,onSelect:M,onToggleItem:D,selectedIds:U,setSort:G,total:H}=oe.useListContext(e),Y=!!f,V=P.useMemo(()=>({isRowExpandable:m,expandSingle:T}),[m,T]),X=P.useRef(null);P.useEffect(()=>{(!U||U.length===0)&&(X.current=null)},[JSON.stringify(U)]);const W=P.useCallback((K,$)=>{const ee=F.map(Q=>Q.id),ne=ee.indexOf(X.current);if(X.current=$.target.checked?K:null,$.shiftKey&&ne!==-1){const Q=ee.indexOf(K),de=ee.slice(Math.min(ne,Q),Math.max(ne,Q)+1),pe=$.target.checked?wee(U,de):Bee(U,de);M(h?pe.filter(ye=>h(F.find(ce=>ce.id===ye))):pe)}else D(K)},[F,h,M,D,U]),ie=p.jsx(ac,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(E.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:R("ra.navigation.no_results")})});return N===!0?p.jsx(z.DatagridLoading,{className:a,expand:u,hasBulkActions:Y,nbChildren:L.Children.count(i),size:I}):F==null||F.length===0||H===0?l||ie:p.jsx(iae,{value:V,children:p.jsxs(z.DatagridRoot,{sx:S,className:$e(z.DatagridClasses.root,a),children:[d!=null&&P.isValidElement(d)?P.cloneElement(d,{selectedIds:U,total:H}):f!==!1?p.jsx(BE,{children:P.isValidElement(f)?f:Pw}):null,p.jsx("div",{className:z.DatagridClasses.tableWrapper,children:p.jsxs(E.Table,{ref:t,className:z.DatagridClasses.table,size:I,...cae(O),children:[jw(o,{children:i,sort:k,data:F,hasExpand:!!u,hasBulkActions:Y,isRowSelectable:h,onSelect:M,resource:y,selectedIds:U,setSort:G},i),jw(r,{expand:u,rowClick:b,data:F,hasBulkActions:Y,hover:g,onToggleItem:W,resource:y,rowSx:C,rowStyle:A,selectedIds:U,isRowSelectable:h},i)]})})]})})});function jw(e,t,n){return P.isValidElement(e)?P.cloneElement(e,t,n):P.createElement(e,t,n)}const lae=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function cae(e){return Object.keys(oe.sanitizeListRestProps(e)).filter(t=>!lae.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}NE.displayName="Datagrid";const uae=ge(NE,{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 dae(e){return p.jsx(uae,{...e})}const pv=P.createContext({hasFilterSidebar:!1});function $E(){var e;return((e=P.useContext(pv))==null?void 0:e.hasFilterSidebar)??!1}function hv({source:e,value:t}){const n=P.useContext(z.FilterContext),r=z.useResourceContext(),o=P.useMemo(()=>n.find(u=>{var d;return P.isValidElement(u)&&((d=u.props)==null?void 0:d.source)===e}),[n,e]),i=P.useMemo(()=>P.isValidElement(o)?o.props:{},[o]);if(!(i!=null&&i.chip))throw new Error(`No chip component found for filter source "${e}". Ensure your filter components define a 'chip' prop.`);const a={...i,record:{[e]:t},value:t,resource:r};return P.isValidElement(i.chip)?P.cloneElement(i.chip,a):Ke.isFunction(i.chip)?P.createElement(i.chip,a):null}function fae(e){const{value:t,source:n,lastItem:r}=e,o=hv({source:n,value:t});return p.jsxs(E.Stack,{children:[p.jsx(E.ListItem,{alignItems:"flex-start",sx:{pl:0},children:p.jsx(E.ListItemText,{primary:o,sx:{my:0}})}),r===n?null:p.jsx(E.Divider,{})]})}function pae(){const{filterValues:e}=oe.useListContext(),t=oe.useTranslate();return p.jsxs(E.Stack,{mt:4,width:"100%",children:[p.jsx(E.Typography,{variant:"h6",fontWeight:"bold",color:"secondary",children:t("ra.title.selected_filters")}),p.jsx(E.List,{sx:{bgcolor:"background.paper",pt:0},children:e?Object.entries(e).map(([n,r])=>{const o=Object.entries(e).pop(),i=o?o[0]:"";return p.jsx(fae,{lastItem:i,value:r,source:n},n)}):null})]})}function hae(e){const{onClose:t,addQuery:n}=e,r=oe.useTranslate(),{handleSubmit:o}=un.useFormContext(),i=P.useCallback(a=>{n(a.queryName)},[n]);return p.jsxs(E.Toolbar,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[p.jsx(E.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(E.Button,{variant:"contained",onClick:o(i),children:r("ra.action.save")})]})}function VE(e){const{open:t,onClose:n}=e,{filterValues:r,sort:o,perPage:i,displayedFilters:a,resource:l}=oe.useListContext(),[u,d]=DS(l),f=oe.useTranslate(),g=P.useCallback(m=>{const y={label:m.trim(),value:{filter:r,sort:o,perPage:i,displayedFilters:a}},b=FS(u);d(b.concat(y)),n()},[r,o,i,a,u,d,n]),h=P.useCallback(()=>m=>{if(u.some(y=>y.label===(m==null?void 0:m.trim())))return"ra.validation.already_exists"},[u]);return p.jsx(E.Dialog,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:p.jsxs(X0,{toolbar:p.jsx(hae,{addQuery:g,onClose:n}),title:f("ra.title.save_favorite_filter"),modal:!0,children:[p.jsx(wr,{fullWidth:!0,source:"queryName",label:f("ra.input.query_name"),placeholder:f("ra.input.query_name_placeholder"),validate:[oe.required(),h()]}),p.jsx(pae,{})]})})}function WE(){const[e,t]=P.useState(!1),n=oe.useTranslate(),r=P.useCallback(()=>{t(!1)},[]),o=P.useCallback(()=>{t(!0)},[]);return p.jsxs(p.Fragment,{children:[p.jsx(E.Button,{sx:{height:"36px"},variant:"contained",onClick:o,children:n("ra.action.save_filter")}),p.jsx(VE,{open:e,onClose:r})]})}function gae(e){const{onDelete:t,value:n,source:r}=e,o=hv({source:r,value:n});return o&&p.jsx(E.Chip,{label:o,variant:"combined",color:"primary",sx:{height:"36px","& .MuiChip-deleteIcon":{fontSize:"1rem !important",mr:1}},deleteIcon:p.jsx(cn.Close,{}),onDelete:t})}function mae(){const{filterValues:e,setFilters:t}=oe.useListContext(),n=E.useTheme(),r=E.useMediaQuery(n.breakpoints.down("sm")),o=oe.useTranslate(),i=P.useCallback(()=>{t({})},[t]),a=P.useCallback(u=>{const d={...e};delete d[u],t(d)},[e,t]),l=P.useCallback(()=>p.jsxs(E.Stack,{flexDirection:"row",gap:2,children:[p.jsx(WE,{}),p.jsx(E.Button,{variant:"outlined",onClick:i,children:o("ra.action.reset_filters")})]}),[i,o]);return p.jsxs(E.Stack,{gap:2,flexDirection:r?"column":"row",children:[p.jsxs(E.Stack,{flexDirection:"row",flexWrap:r?"nowrap":"wrap",gap:2,py:.5,overflow:"auto",width:r?window.innerWidth-58:"auto",children:[Object.entries(e).map(([u,d])=>p.jsx(gae,{source:u,value:d,onDelete:()=>a(u)},u)),r?null:p.jsx(l,{})]}),r?p.jsx(l,{}):null]})}function Rg(){const{filterValues:e}=oe.useListContext(),t=E.useTheme(),n=E.useMediaQuery(t.breakpoints.down("sm")),r=oe.useTranslate();return e&&!Ke.isEmpty(e)?p.jsxs(E.Stack,{flexDirection:n?"column":"row",alignItems:"baseline",gap:2,m:n?2:0,children:[p.jsx(E.Typography,{variant:"h6",color:"secondary",whiteSpace:"nowrap",children:r("ra.title.active_filters")}),p.jsx(mae,{})]}):null}function zE({open:e,onClose:t,filterToRemove:n}){var y;const r=oe.useTranslate(),{resource:o,filterValues:i,sort:a,perPage:l,displayedFilters:u}=oe.useListContext(),d=((y=n==null?void 0:n.value)==null?void 0:y.filter)||i,f=(n==null?void 0:n.label)??"",[g,h]=z.useSavedQueries(o);function m(){const b={filter:d,sort:a,perPage:l,displayedFilters:u},C=z.extractValidSavedQueries(g),A=C.findIndex(I=>jl(I.value,b));h([...C.slice(0,A),...C.slice(A+1)]),t()}return p.jsxs(E.Dialog,{open:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[p.jsx(E.DialogTitle,{id:"alert-dialog-title",children:r("ra.saved_queries.remove_dialog_title",{label:f,_:"Remove saved query?"})}),p.jsx(E.DialogContent,{children:p.jsx(E.DialogContentText,{children:r("ra.saved_queries.remove_message",{_:"Are you sure you want to remove that item from your list of saved queries?"})})}),p.jsxs(E.DialogActions,{children:[p.jsx(E.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(E.Button,{onClick:m,color:"primary",autoFocus:!0,children:r("ra.action.confirm")})]})]})}function vae(e){const{query:t}=e,[n,r]=P.useState(!1),o=P.useCallback(()=>{r(a=>!a)},[]),i=oe.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(E.Button,{size:"small",color:"primary",onClick:o,children:i("ra.action.delete")}),p.jsx(zE,{open:n,onClose:o,filterToRemove:t})]})}function UE(e){const{closeSidebar:t}=e,{resource:n,setFilters:r,setSort:o,setPage:i,setPerPage:a}=oe.useListContext(),[l,u]=P.useState(!1),d=Et(),[f]=DS(n),g=FS(f),h=oe.useTranslate(),m=P.useCallback(()=>{u(b=>!b)},[]),y=P.useCallback(b=>{const{value:C}=b;r(C.filter),o({field:C.sort.field,order:C.sort.order}),i(1),a(C.perPage),t()},[r,o,i,a,t]);return f&&f.length>0?p.jsx(E.Box,{sx:{mt:"-1px",mb:2,"& .MuiAccordion-root":{borderColor:d.palette.divider,"& .Mui-expanded:last-of-type":{marginBottom:"inherit"},"& .MuiAccordionSummary-root":{bgcolor:"transparent",flexDirection:"row"},"& .MuiAccordionSummary-content":{justifyContent:"space-between",marginLeft:0},"& .MuiAccordionDetails-root":{borderColor:d.palette.divider},"& .MuiAccordionSummary-expandIconWrapper":{color:d.palette.text.primary,"&.Mui-expanded":{transform:"rotate(180deg)"}}}},children:p.jsxs(E.Accordion,{expanded:l,onChange:m,children:[p.jsx(E.AccordionSummary,{sx:{px:"20px"},expandIcon:p.jsx(hS,{fontSize:"small"}),children:p.jsxs(E.Typography,{variant:"h5",fontWeight:"bold",children:[h("ra.action.saved_filters")," (",g.length,")"]})}),g==null?void 0:g.map((b,C)=>p.jsxs(E.AccordionDetails,{sx:{display:"flex",justifyContent:"space-between",px:"20px",alignItems:"center"},children:[p.jsx(E.Typography,{variant:"body1",children:b.label}),p.jsxs(E.Stack,{flexDirection:"row",alignItems:"center",children:[p.jsx(vae,{query:b}),p.jsx(E.Button,{size:"small",color:"primary",onClick:()=>y({value:b.value}),children:h("ra.action.apply")})]})]},C))]})}):p.jsx(E.Box,{height:16})}function yae(e){const{sx:t}=e;return p.jsx(E.Box,{sx:{...t,flex:"1 1 auto",backgroundColor:"background.paper",overflowY:"auto"},children:e.children})}const bae=444;function xae(e){const{sx:t,anchor:n="right",variant:r="temporary",open:o=!1,onClose:i}=e,a=E.useTheme(),u=E.useMediaQuery(a.breakpoints.down("sm"))?"bottom":n,d=P.useCallback(()=>{Ke.isFunction(i)&&i()},[i]),f={backgroundImage:"none",boxShadow:"-10px 4px 42px 0px rgba(0, 0, 0, 0.25)",width:{sm:"30%"},maxWidth:{sm:bae},[a.breakpoints.down("sm")]:{width:"100% !important",maxWidth:"100% !important"}};return p.jsx(E.Drawer,{...e,anchor:u,onClose:d,open:o,PaperProps:{sx:{...f,...t}},variant:r,children:e.children})}function Cae(e){return p.jsxs(E.Box,{children:[p.jsx(E.Divider,{}),p.jsx(E.Box,{bgcolor:"background.paper",px:2,py:2.5,children:e.children})]})}function wae(e){const{sx:t}=e;return p.jsxs(E.Box,{children:[p.jsx(E.Stack,{alignItems:"center",bgcolor:"background.paper",direction:"row",px:2.5,py:2,spacing:2,minHeight:"64px",sx:t,children:e.children}),p.jsx(E.Divider,{sx:{opacity:.6}})]})}function Sae(e){const{primary:t,secondary:n}=e;return p.jsxs(E.Box,{display:"inline-flex",flexGrow:1,flexShrink:1,flexDirection:"column",children:[t?p.jsx(E.Typography,{variant:"h5",children:t}):null,n?p.jsx(E.Typography,{variant:"h6",children:n}):null]})}function Aae(e){return p.jsx(E.Box,{display:"inline-flex",flexGrow:0,flexShrink:0,children:e.children})}const xr=xae;xr.Content=yae;xr.Footer=Cae;xr.Header=wae;xr.HeaderText=Sae;xr.HeaderAction=Aae;function Eae(e){const{form:t,filters:n}=e,r=oe.useResourceContext();return p.jsx(z.FilterContext.Provider,{value:Array.isArray(n)?n:[n],children:p.jsx(un.FormProvider,{...t,children:p.jsx(E.Box,{px:"20px",children:n?(Array.isArray(n)?n:[n]).map((o,i)=>{const a={...o.props,display:"label"};return P.isValidElement(o)?p.jsx(E.Box,{mb:1,children:P.cloneElement(o,{...a,resource:r})},i):null}):null})})})}function Lu(e){const{filters:t}=e,[n,r]=P.useState(!1),{setSidebarOpen:o,sidebarOpen:i}=vv(),{filterValues:a,setFilters:l}=oe.useListContext(),u=oe.useTranslate(),d=un.useForm({defaultValues:a}),{handleSubmit:f,getValues:g,reset:h,watch:m}=d,y=m(),b=P.useMemo(()=>{const O={};return t&&(Array.isArray(t)?t:[t]).forEach(R=>{O[R.props.source]=(a==null?void 0:a[R.props.source])??""}),O},[t,a]);P.useEffect(()=>{const O=z.getFilterFormValues(g(),a),R=g();Ke.isEqual(O,R)||h(O)},[JSON.stringify(a),a,g,h]);const C=P.useCallback(()=>{Ke.isFunction(o)&&o(!1)},[o]),A=P.useCallback(O=>{l(O),C()},[l,C]),I=P.useCallback(()=>{h({}),l({})},[h,l]),S=P.useCallback(()=>{r(O=>!O),I(),setTimeout(()=>{r(!1)},1e3)},[I]),T=P.useMemo(()=>{const O=g();return Ke.isEmpty(b)||Ke.isEqual(O,b)},[b,g,y]);return p.jsxs(xr,{sx:{height:"100%"},open:i,onClose:C,children:[p.jsxs(xr.Header,{children:[p.jsx(xr.HeaderText,{primary:u("ra.action.add_filter")}),p.jsx(xr.HeaderAction,{children:p.jsx(C5,{variant:"text",loading:n,loadingPosition:"start",startIcon:p.jsx(ze.ReloadOutlined,{}),onClick:S,children:u("ra.action.reset_filters")})})]}),p.jsxs(xr.Content,{children:[p.jsx(UE,{closeSidebar:C}),p.jsx(Eae,{form:d,filters:t})]}),p.jsx(xr.Footer,{children:p.jsxs(E.Stack,{direction:"row",spacing:2,children:[p.jsx(E.Button,{fullWidth:!0,onClick:()=>{h({}),C()},children:u("ra.action.close")}),p.jsx(E.Button,{fullWidth:!0,disabled:T,variant:"contained",color:"primary",onClick:f(A),children:u("ra.action.apply_filters")})]})})]})}function Tae(){const{setSidebarOpen:e}=vv(),t=P.useContext(z.FilterContext),n=$E(),r=z.useTranslate(),o=E.useTheme(),i=E.useMediaQuery(o.breakpoints.down("sm"));if(!n)throw new Error("The <FilterSidebarButton> component requires the <List aside={<FilterSidebar />}> prop to be set");if(t===void 0)throw new Error("The <FilterSidebarButton> component requires the <List filters> prop to be set");const a=P.useCallback(()=>{Ke.isFunction(e)&&e(!0)},[e]);return i?p.jsxs(E.Button,{className:"add-filter",onClick:a,children:[p.jsx(cn.FilterList,{sx:{fontSize:"1rem",mr:.5}}),p.jsx(E.Typography,{variant:"h6",children:r("ra.action.add_filter")})]}):p.jsx(Qi,{label:"ra.action.add_filter",onClick:a,children:p.jsx(cn.FilterList,{})})}function HE(e){const{filters:t,actions:n,className:r,hasFilterSidebar:o,...i}=e,a=Et(),l=E.useMediaQuery(a.breakpoints.down("sm")),u=n?P.cloneElement(n,{...i,...n.props}):null,{filterValues:d}=oe.useListContext();return Array.isArray(t)?p.jsx(pv.Provider,{value:{hasFilterSidebar:o},children:p.jsx(z.FilterContext.Provider,{value:t,children:l&&o?p.jsxs("div",{children:[u,Ke.isEmpty(d)?null:p.jsxs("div",{children:[p.jsx(E.Divider,{}),p.jsx(Rg,{})]})]}):p.jsxs(Rw,{className:r,children:[o?p.jsx(Rg,{}):p.jsx(z.FilterForm,{}),p.jsx("span",{}),u]})})}):p.jsxs(Rw,{className:r,children:[t?P.cloneElement(t,{...i,context:"form"}):null,p.jsx("span",{}),n?P.cloneElement(n,{...i,filters:t,...n.props}):null]})}HE.propTypes={filters:x.oneOfType([x.element,x.arrayOf(x.element)]),actions:x.oneOfType([x.bool,x.element]),exporter:x.oneOfType([x.func,x.bool])};const Iae="RaListToolbar",Rw=ge("div",{name:Iae,overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",position:"relative",justifyContent:"space-between",alignItems:"flex-end",width:"100%",[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,flexWrap:"inherit",flexDirection:"column-reverse"}})),GE=P.memo(HE),Oae=p.jsx(z.ListActions,{}),Pae=p.jsx(z.Pagination,{}),jae=p.jsx(ac,{}),Rae=E.Card;function kae(e){const{actions:t=Oae,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:i,hasCreate:a,pagination:l=Pae,children:u,className:d,component:f=Rae,title:g,empty:h=jae,...m}=e,{defaultTitle:y,data:b,error:C,isLoading:A,filterValues:I,resource:S}=oe.useListContext(e),T=Et(),O=L.isValidElement(n)&&(n==null?void 0:n.type)!==Lu,R=L.isValidElement(n)&&(n==null?void 0:n.type)===Lu;if(!u||!b&&A&&i)return null;function k(Y){return p.jsxs("div",{className:Gr.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?T.palette.mode==="dark"?T.palette.divider:T.palette.grey.A800:"transparent",backgroundColor:O?T.palette.background.paper:"transparent"},children:[r||t?p.jsx(GE,{className:Gr.actions,filters:r,actions:t,hasCreate:a,hasFilterSidebar:R}):null,!C&&p.jsx(f,{className:Gr.content,sx:Y?{background:"transparent"}:{},children:o&&u&&L.isValidElement(u)?P.cloneElement(u,{bulkActionButtons:o}):u}),C?p.jsx(_0,{error:C,resetErrorBoundary:null}):l!==!1&&l]})}function F(){return h!==!1&&P.cloneElement(h,{className:Gr.noResults,hasCreate:a})}const N=!A&&(b==null?void 0:b.length)===0,M=!A&&(b==null?void 0:b.length)===0&&!Object.keys(I).length&&h!==!1,D=L.isValidElement(n),U=D&&(n==null?void 0:n.type)===Lu,G=A||M||D&&!U?L.Fragment:Ln,H=!A&&!M&&(!n||U)?{content:!1}:void 0;return p.jsxs(_ae,{className:$e("list-page",d),...m,sx:N?{"& .MuiPaper-root":{backgroundColor:"transparent",border:"none"},"& .RaList-actions":{border:"1px solid",borderRadius:`${T.shape.borderRadius}px`,borderColor:T.palette.mode==="dark"?T.palette.divider:T.palette.grey.A800,backgroundColor:T.palette.background.paper}}:{},children:[p.jsx(z.Title,{title:g,defaultTitle:y,preferenceKey:`${S}.list.title`}),p.jsx(G,{...H,children:A?p.jsx(E.CircularProgress,{sx:{position:"absolute",top:"50%",left:"50%",marginTop:"-20px",marginLeft:"-20px"}}):M?F():k(N)}),O?p.jsx(Mae,{aside:n}):null,R?L.cloneElement(n,{filters:r}):null]})}function Mae({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=Et();return p.jsx(E.Card,{className:Gr.asideCard,sx:{order:t,mr:t===-1?2:0,ml:t!==-1?2:0,width:200,border:"1px solid",borderRadius:1,borderColor:n.palette.mode==="dark"?n.palette.divider:n.palette.grey.A800,backgroundColor:n.palette.background.paper,backgroundImage:"none"},children:p.jsx(E.CardContent,{sx:{pt:1},children:P.cloneElement(e,{})})})}const Bs="RaList",Gr={main:`${Bs}-main`,content:`${Bs}-content`,actions:`${Bs}-actions`,noResults:`${Bs}-noResults`,asideCard:`${Bs}-asideCard`},_ae=ge("div",{name:Bs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex","& >.MuiPaper-root":{flex:1},[`& .${Gr.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Gr.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Gr.actions}`]:{},[`& .${Gr.noResults}`]:{alignContent:"center"},[`& .${Gr.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${z.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${z.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}})),gv=P.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:i="small",className:a,...l}=e,u=oe.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return p.jsx(kw,{className:a});function f(g,h,m){return g==="page"?m?u("ra.navigation.current_page",{page:h,_:`page ${h}`}):u("ra.navigation.page",{page:h,_:`Go to page ${h}`}):u(`ra.navigation.${g}`,{_:`Go to ${g} page`})}return p.jsx(kw,{className:a,children:p.jsx(E.Pagination,{size:i,count:d,page:t+1,onChange:(g,h)=>o(g,h-1),...Fae(l),getItemAriaLabel:f})})});gv.propTypes={count:x.number.isRequired,onPageChange:x.func.isRequired,page:x.number.isRequired,rowsPerPage:x.number.isRequired,color:x.oneOf(["primary","secondary","standard"]),size:x.oneOf(["small","medium","large"])};const Dae="RaPaginationActions",kw=ge("div",{name:Dae,overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function Fae({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const mv=P.memo(e=>{const{rowsPerPageOptions:t=Bae,actions:n,limit:r=null,...o}=e,{isLoading:i,hasNextPage:a,page:l,perPage:u,total:d,setPage:f,setPerPage:g}=oe.useListPaginationContext(e),h=oe.useTranslate(),m=E.useMediaQuery(M=>M.breakpoints.down("md")),[y,b]=P.useState(l-1),{hasCreate:C}=oe.useResourceDefinition(e),[A,I]=P.useState(!1);P.useEffect(()=>{l!==y+1&&!A&&b(l-1)},[y,A,l]),P.useEffect(()=>{I(!1)},[l]);const S=P.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),T=P.useCallback(Ke.debounce(M=>{f(M+1)},500),[f]),O=P.useCallback((M,D)=>{var H,Y;if(!M)return;if(M.preventDefault(),D<0||S!==void 0&&D>S-1)throw new Error(h("ra.navigation.page_out_of_boundaries",{page:D+1}));const U=(((H=M.target.dataset)==null?void 0:H.testid)||((Y=M.target.classList)==null?void 0:Y.value))??"",G=U.includes("MuiPaginationItem-previousNext")||U.includes("NavigateBeforeIcon")||U.includes("NavigateNextIcon")||U.includes("KeyboardArrowLeftIcon")||U.includes("KeyboardArrowRightIcon");b(D),I(!0),G?T(D):f(D+1)},[T,f,h,S,I]),R=P.useCallback(M=>{g(Number(M.target.value))},[g]),k=P.useCallback(({from:M,to:D,count:U})=>U===-1&&a?h("ra.navigation.partial_page_range_info",{offsetBegin:M,offsetEnd:D,_:"%{from}-%{to} of more than %{to}"}):h("ra.navigation.page_range_info",{offsetBegin:M,offsetEnd:D,total:U===-1?D:U,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[h,a]),F=P.useCallback(M=>h(`ra.navigation.${M}`,{_:`Go to ${M} page`}),[h]);if(i)return p.jsx(E.Toolbar,{variant:"dense"});if(d===0||l<1||S!==void 0&&l>S)return r!=null&&process.env.NODE_ENV==="development"&&console.warn("The Pagination limit prop is deprecated. Empty state should be handled by the component displaying data (Datagrid, SimpleList)."),null;if(m)return p.jsx(E.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,rowsPerPageOptions:Lae,component:"span",labelDisplayedRows:k,sx:{justifyContent:C?"flex-start":"flex-end",display:C?"flex":"block"},...oe.sanitizeListRestProps(o)});const N=n||(!i&&d!=null?gv:void 0);return p.jsx(E.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,onRowsPerPageChange:R,ActionsComponent:N,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:h("ra.navigation.page_rows_per_page"),labelDisplayedRows:k,getItemAriaLabel:F,rowsPerPageOptions:t,...oe.sanitizeListRestProps(o)})});mv.propTypes={actions:oe.ComponentPropType,limit:x.element,rowsPerPageOptions:x.arrayOf(x.oneOfType([x.number,x.shape({label:x.string.isRequired,value:x.number.isRequired})]))};const Bae=[5,10,25,50],Lae=[],qE=P.createContext({sidebarOpen:!1,setSidebarOpen:()=>{}});function YE(e){const[t,n]=P.useState(!1);return p.jsx(qE.Provider,{value:{sidebarOpen:t,setSidebarOpen:n},children:e.children})}function vv(){return P.useContext(qE)}function Nae({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=$ae,filterDefaultValues:i,perPage:a=10,queryOptions:l,resource:u,sort:d,storeKey:f,...g}){return p.jsx(oe.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:i,perPage:a,queryOptions:l,resource:u,sort:d,storeKey:f,children:p.jsx(YE,{children:p.jsx(kae,{...g})})})}const $ae={},Vae=Ql(Nae,{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),[e.breakpoints.down("sm")]:{flexDirection:"row"},"& 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}},"& .ApplicaEmpty-root":{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"calc(100vh - 260px)"}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function Wae(e){const t={...e,pagination:e.pagination??p.jsx(mv,{})};return p.jsx(Vae,{...t})}function zae(){const e=z.useRefresh(),t=z.useNotify(),n=z.useResourceContext(),r=z.useUnselectAll(n),{selectedIds:o,data:i}=z.useListContext(),a=z.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)),[u,{isLoading:d}]=z.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Fr().toISOString()},rows:l},{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"})}),f=P.useCallback(()=>{u()},[u]);return p.jsx(z.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:f,children:p.jsx(cn.Email,{})})}function Uae(){const e=z.useRefresh(),t=z.useNotify(),n=z.useResourceContext(),r=z.useUnselectAll(n),{selectedIds:o,data:i}=z.useListContext(),a=z.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)).concat([a]),[u,{isLoading:d}]=z.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:l},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),f=P.useCallback(()=>{u()},[u]);return p.jsx(z.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:f,children:p.jsx(cn.Drafts,{})})}function Hae(e){const t=z.useRecordContext(e),n=z.useResourceContext(e),r=z.useRedirect(),o=z.useNotify(),i=z.useTranslate(),[a]=z.useLocaleState(),l=P.useMemo(()=>t!=null&&t.readed?Fr(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]=z.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Fr().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=P.useCallback(()=>u(),[u]);return p.jsxs("div",{onClick:d,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[p.jsx(E.Typography,{variant:"subtitle1",children:p.jsxs(E.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),p.jsx(E.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),l?p.jsx(E.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:i("ra.notification.readed",{readed:l})}):null]})}function Gae({...e}){const t=E.useTheme(),{mode:n,colorize:r,density:o}=P.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?E.darken:E.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]);function i(a){return{backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)}}return p.jsxs(z.Datagrid,{...e,rowSx:i,children:[p.jsx(Hae,{source:"notification",sortable:!1}),p.jsx(R6,{source:"created"}),p.jsxs(si,{children:[p.jsx(zae,{}),p.jsx(Uae,{})]})]})}function qae({empty:e,...t}){const n=z.useTranslate(),r=p.jsx(ac,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(E.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:n("ra.navigation.no_results")})});return p.jsx(z.SimpleList,{...t,empty:e||r})}const Yae={width:36,height:36,fontSize:"1rem"},Kae={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function KE(){const{enable:e}=If();return e?p.jsx(Xae,{}):null}function Xae(){const e=oe.useTranslate(),t=E.useTheme(),n=oe.useRefresh(),r=oe.useNotify(),{downMd:o}=or(),{resource:i}=If(),[a,l]=P.useState([]),{data:u,isLoading:d}=oe.useGetList(i,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),f=a.filter(I=>I.readed===null).length,{open:g,anchorEl:h,handleClose:m,handleToggle:y}=ba();P.useEffect(()=>{!d&&u&&l(u??[])},[u,d]);const b=a.filter(I=>!I.readed).map(I=>I.id),[C]=oe.useUpdateMany(i,{ids:b,data:{readed:Fr().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),A=P.useCallback(()=>{C()},[C]);return p.jsxs(p.Fragment,{children:[p.jsx(Aa,{value:"notifications",selected:g,onChange:y,children:p.jsx(E.Badge,{badgeContent:f,color:"primary",children:p.jsx(ze.BellOutlined,{})})}),p.jsx(E.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:h,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:I})=>p.jsx(ii,{type:"grow",position:o?"top":"top-right",in:g,...I,children:p.jsx(E.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:p.jsx(E.ClickAwayListener,{onClickAway:m,children:p.jsxs(Ln,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:p.jsx(p.Fragment,{children:f>0&&p.jsx(E.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:A,children:p.jsx(of,{color:"success",size:"small",children:p.jsx(ze.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[a.length===0?p.jsx(ac,{hasCreate:!1,title:p.jsx(E.Typography,{variant:"h5",children:e("ra.notification.empty")}),sx:{"& .ApplicaEmpty-icon":{fontSize:"60px"},"& .ApplicaEmpty-toolbar":{display:"none"}}}):p.jsxs(p.Fragment,{children:[p.jsx(E.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":Yae,"& .MuiListItemSecondaryAction-root":{...Kae,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((S,T)=>p.jsx(nae,{selected:f>0,notification:S,onClick:m,divider:T<a.length-1},S.id))}),p.jsx(E.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${i}`,LinkComponent:gt.Link,onClick:m,children:p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})})]}),p.jsx(E.Divider,{})]})})})})})]})}function XE(){const[e,t]=P.useState(!1),n=P.useCallback(()=>t(!1),[t]),r=P.useCallback(()=>t(!0),[t]),o=oe.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsxs(E.ListItemButton,{onClick:r,children:[p.jsx(E.ListItemIcon,{children:p.jsx(cn.Key,{})}),p.jsx(E.ListItemText,{primary:o("ra.auth.change_password")})]}),p.jsx(E.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:p.jsx(Q0,{onSuccess:n})})]})}function ZE(){const e=oe.useLogout(),t=oe.useTranslate();return p.jsx(p.Fragment,{children:p.jsxs(E.ListItemButton,{onClick:e,children:[p.jsx(E.ListItemIcon,{children:p.jsx(cn.LogoutOutlined,{})}),p.jsx(E.ListItemText,{primary:t("ra.auth.logout")})]})})}function QE(){const e=oe.useTranslate(),t=oe.useAuthProvider(),n=P.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t]),[r,o]=P.useState(!1);return P.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(i=>o(i))},[t,o]),r?p.jsx(p.Fragment,{children:p.jsxs(E.ListItemButton,{onClick:n,children:[p.jsx(E.ListItemIcon,{children:p.jsx(cn.LogoutOutlined,{})}),p.jsx(E.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function JE(e){var b;const{roles:t}=e,n=E.useTheme(),r=oe.useDataProvider(),{identity:o}=oe.useGetIdentity(),i=o!==void 0&&o.image&&o.image!==null&&o.image!=="",[a,l]=P.useState(null),{open:u,anchorEl:d,handleToggle:f,handleClose:g}=ba(),h=oe.useLogout(),m=P.useCallback(()=>{h()},[h]);P.useEffect(()=>{i&&r.getFile("/profile/me/image").then(C=>l(C))},[r,i]);const y=P.useMemo(()=>{var C;return P.isValidElement(t)?t:t?p.jsx(p.Fragment,{children:t}):(C=o==null?void 0:o.roles)==null?void 0:C.map(A=>A.name.replace("ROLE_","")).join(",")},[t,o]);return p.jsxs(p.Fragment,{children:[p.jsx(Aa,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:p.jsxs(E.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[p.jsx(ed,{alt:(b=o==null?void 0:o.name)==null?void 0:b.toUpperCase(),src:a,size:"xs"}),p.jsx(E.Typography,{variant:"subtitle1",children:o==null?void 0:o.name})]})}),p.jsx(t0,{placement:"bottom-end",open:u,anchorEl:d,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:C})=>p.jsx(ii,{type:"grow",position:"top-right",in:u,...C,children:p.jsx(E.Paper,{sx:{boxShadow:n.customShadows.z1,width:290,minWidth:240,maxWidth:290,[n.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(E.ClickAwayListener,{onClickAway:g,children:p.jsxs(Ln,{elevation:0,border:!1,content:!1,children:[p.jsx(E.CardContent,{sx:{px:2.5,pt:3},children:p.jsxs(E.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[p.jsx(E.Grid,{item:!0,children:p.jsxs(E.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[p.jsx(ed,{alt:"profile user",src:a,sx:{width:32,height:32}}),p.jsxs(E.Stack,{children:[p.jsx(E.Typography,{variant:"h6",children:o==null?void 0:o.name}),p.jsx(E.Typography,{variant:"body2",color:"textSecondary",children:y})]})]})}),p.jsx(E.Grid,{item:!0,children:p.jsx(E.Tooltip,{title:"Logout",children:p.jsx(of,{size:"large",sx:{color:"text.primary"},onClick:m,children:p.jsx(ze.LogoutOutlined,{})})})})]})}),p.jsx(E.Grid,{container:!0,children:p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[p.jsx(XE,{}),p.jsx(ZE,{}),p.jsx(QE,{})]})})})]})})})})})]})}function eT(e){const t=Et(),{downMd:n}=or(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=ba();return n?p.jsxs(p.Fragment,{children:[p.jsx(Aa,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:i,selected:r,children:p.jsx(ze.MoreOutlined,{})}),p.jsx(E.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:l})=>p.jsx(ii,{type:"fade",in:r,...l,children:p.jsx(E.Paper,{sx:{boxShadow:t.customShadows.z1},children:p.jsx(E.ClickAwayListener,{onClickAway:a,children:p.jsx(E.AppBar,{color:"inherit",children:p.jsx(E.Toolbar,{children:e.children})})})})})})]}):p.jsx(p.Fragment,{children:e.children})}function tT(e){return p.jsx(E.Box,{...e,flex:1})}function nT(e){const t=E.useTheme(),n=E.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=Pn();return t.shadows[4]=t.customShadows.z1,p.jsx(E.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:p.jsx(E.Container,{maxWidth:r?"xl":!1,children:p.jsx(E.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function rT(e){const{horizontal:t}=or();return t?p.jsx(nT,{children:e.children}):p.jsx(RE,{children:e.children})}function bl({item:e,level:t}){const n=Et(),{horizontal:r,downLg:o}=or(),{drawerOpen:i,openItem:a,activeItem:l,openDrawer:u}=kl();let d="_self";e.target&&(d="_blank");const f=(e==null?void 0:e.external)!==!1?{component:P.forwardRef((A,I)=>p.jsx(gt.Link,{...A,to:e.url,target:d,ref:I}))}:{component:"a",href:e.url,target:d},g=e.icon,h=e.icon?p.jsx(g,{style:{fontSize:i?"1rem":"1.25rem"}}):!1,m=a.findIndex(A=>A===e.id)>-1,{pathname:y}=gt.useLocation();P.useEffect(()=>{y.endsWith(e.url)&&l([e.id])},[y]);const b=n.palette.mode==="dark"?"grey.400":"text.primary",C=n.palette.mode==="dark"&&i?"text.primary":"primary.main";return p.jsx(p.Fragment,{children:r?p.jsxs(E.ListItemButton,{...f,disabled:e.disabled,selected:m,sx:{zIndex:1201,...i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{bgcolor:"transparent",color:C,"&:hover":{color:C,bgcolor:"transparent"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[h?p.jsx(E.ListItemIcon,{sx:{minWidth:36,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&m&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:h}):null,!h&&p.jsx(E.ListItemIcon,{sx:{color:m?"primary.main":"secondary.main",...!i&&{borderRadius:1.5,alignItems:"center",justifyContent:"flex-start","&:hover":{bgcolor:"transparent"}},...!i&&m&&{bgcolor:"transparent","&:hover":{bgcolor:"transparent"}}},children:p.jsx(Gm,{size:4,color:m?"primary":"secondary"})}),p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",color:"inherit",children:e.title})}),(i||!i&&t!==1)&&e.chip?p.jsx(E.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(E.Avatar,{children:e.chip.avatar}):null}):null]}):p.jsxs(E.ListItemButton,{...f,disabled:e.disabled,selected:m,sx:{zIndex:1201,pl:i?`${t*28}px`:1.5,py:!i&&t===1?1.25:1,...i&&{"&: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:C,"&:hover":{color:C,bgcolor:n.palette.mode==="dark"?"divider":"primary.lighter"}}},...!i&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},...o&&{onClick:()=>u(!1)},children:[h?p.jsx(E.ListItemIcon,{sx:{minWidth:28,color:m?C:b,...!i&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:n.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!i&&m&&{bgcolor:n.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:n.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:h}):null,i||!i&&t!==1?p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",sx:{color:m?C:b},children:e.title})}):null,(i||!i&&t!==1)&&e.chip?p.jsx(E.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(E.Avatar,{children:e.chip.avatar}):null}):null]})})}const Mw=ge(E.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 xl({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:i,selectedLevel:a}){var W;const l=Et(),{activeItem:u}=kl(),{horizontal:d}=or(),{drawerOpen:f}=kl(),g=gt.useNavigate(),[h,m]=P.useState(!1),[y,b]=P.useState(null),[C,A]=P.useState(null);function I(ie){A(null),i(t),f?(m(!h),b(y?null:e.id),r(y?"":e.id),e.url&&g(`${e.url}`)):A(ie==null?void 0:ie.currentTarget)}function S(){f||e.url&&g(`${e.url}`)}function T(ie){A(ie==null?void 0:ie.currentTarget)}function O(){m(!1),b(null),A(null)}P.useMemo(()=>{y===o?t===1&&m(!0):t===a&&(m(!1),b(null))},[o,t,y,a]);const{pathname:R}=gt.useLocation(),k=!!C;function F(ie,K){ie.forEach($=>{$.url===R&&(m(!0),b(K))})}P.useEffect(()=>{m(!1),b(null),k&&A(null),e.children&&e.children.forEach(ie=>{var K;(K=ie.children)!=null&&K.length&&F(ie.children,e.id),ie.url===R&&(b(e.id),m(!0)),R.includes(ie.url)&&(b(e.id),m(!0))})},[R,e.children]),P.useEffect(()=>{e.url===R&&y!==e.id&&(u([e.id]),b(e.id),A(null),m(!0))},[R,e,y,u]);const N=(W=e.children)==null?void 0:W.map(ie=>{switch(ie.type){case"collapse":return p.jsx(xl,{setSelectedItems:r,setSelectedLevel:i,selectedLevel:a,selectedItems:o,menu:ie,level:t+1,parentId:n},ie.id);case"item":return p.jsx(bl,{item:ie,level:t+1},ie.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},ie.id)}}),M=y===e.id,D=t===1?p.jsx(ze.BorderOutlined,{style:{fontSize:"1rem"}}):!1,U=e.icon,G=e.icon?p.jsx(U,{style:{fontSize:f?"1rem":"1.25rem"}}):D,H=l.palette.mode==="dark"?"grey.400":"text.primary",Y=l.palette.mode==="dark"&&f?l.palette.text.primary:l.palette.primary.main,V=k?`collapse-pop-${e.id}`:void 0,X={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return p.jsx(p.Fragment,{children:d?p.jsx(p.Fragment,{children:p.jsxs(E.ListItemButton,{id:`boundary-${V}`,disableRipple:!0,selected:M,onMouseEnter:T,onMouseLeave:O,onClick:T,"aria-describedby":V,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[p.jsxs(E.Box,{onClick:S,sx:X,children:[G?p.jsx(E.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:l.palette.secondary.dark},children:G}):null,!G&&t!==1&&p.jsx(E.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:p.jsx(Gm,{size:4,color:M?"primary":"secondary"})}),p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),k?p.jsx(ze.RightOutlined,{}):p.jsx(ze.DownOutlined,{})]}),C?p.jsx(Mw,{id:V,open:k,anchorEl:C,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:ie})=>p.jsx(ii,{in:k,...ie,children:p.jsx(E.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:l.shadows[8],backgroundImage:"none"},children:p.jsx(E.ClickAwayListener,{onClickAway:O,children:p.jsx(E.Box,{children:N})})})})}):null]})}):p.jsxs(p.Fragment,{children:[p.jsxs(E.ListItemButton,{disableRipple:!0,selected:y===e.id,...!f&&{onMouseEnter:I,onMouseLeave:O},onClick:I,sx:{pl:f?`${t*28}px`:1.5,py:!f&&t===1?1.25:1,...f&&{"&:hover":{bgcolor:l.palette.mode==="dark"?"divider":"primary.lighter"},"&.Mui-selected":{bgcolor:"transparent",color:Y,"&:hover":{color:Y,bgcolor:l.palette.mode==="dark"?"divider":"transparent"}}},...!f&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[G?p.jsx(E.ListItemIcon,{onClick:S,sx:{minWidth:28,color:y===e.id?"primary.main":H,...!f&&{borderRadius:1.5,width:36,height:36,alignItems:"center",justifyContent:"center","&:hover":{bgcolor:l.palette.mode==="dark"?"secondary.light":"secondary.lighter"}},...!f&&y===e.id&&{bgcolor:l.palette.mode==="dark"?"primary.900":"primary.lighter","&:hover":{bgcolor:l.palette.mode==="dark"?"primary.darker":"primary.lighter"}}},children:G}):null,f||!f&&t!==1?p.jsx(E.ListItemText,{primary:p.jsx(E.Typography,{variant:"h6",color:y===e.id?"primary":H,children:e.title}),secondary:e.caption?p.jsx(E.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,f||!f&&t!==1?k||h?p.jsx(ze.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:l.palette.primary.main}}):p.jsx(ze.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!f&&p.jsx(Mw,{open:k,anchorEl:C,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:ie})=>p.jsx(ii,{in:k,...ie,children:p.jsx(E.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:l.customShadows.z1,backgroundImage:"none",border:`1px solid ${l.palette.divider}`},children:p.jsx(E.ClickAwayListener,{onClickAway:O,children:p.jsx(E.Box,{children:N})})})})})]}),f?p.jsx(E.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:p.jsx(E.List,{sx:{p:0},children:N})}):null]})})}const Zae=ge(E.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 oT({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:i,setSelectedLevel:a,selectedLevel:l}){var V,X;const u=Et(),d=z.useTranslate(),{pathname:f}={pathname:""},{horizontal:g,downLg:h}=or(),m=kl(),{drawerOpen:y,selectedID:b,activeID:C}=m,[A,I]=P.useState(null),[S,T]=P.useState(e),O=!!A;P.useEffect(()=>{if(t)if(e.id===r){const W={...e},ie=n.map(K=>K.elements);W.children=ie.flat(1),T(W)}else T(e)},[e,t,h]);function R(W,ie){W.forEach(K=>{var $;($=K.children)!=null&&$.length&&R(K.children,S.id),K.url===f&&C(ie)})}function k(W){(W.children?W.children:[]).forEach(K=>{var $;($=K.children)!=null&&$.length&&R(K.children,S.id),K.url===f&&C(S.id)})}P.useEffect(()=>{k(S),O&&I(null)},[f,S]);function F(W){O||I(W==null?void 0:W.currentTarget)}function N(){I(null)}const M=S==null?void 0:S.icon,D=S!=null&&S.icon?p.jsx(M,{style:{fontSize:20,stroke:"1.5",color:b===S.id?u.palette.primary.main:u.palette.secondary.dark}}):null,U=(V=e.children)==null?void 0:V.map(W=>{switch(W.type){case"collapse":return p.jsx(xl,{menu:W,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i,level:1,parentId:S.id},W.id);case"item":return p.jsx(bl,{item:W,level:1},W.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),G=n.map((W,ie)=>{var K;return p.jsxs(P.Fragment,{children:[W.title?p.jsx(E.Typography,{variant:"caption",sx:{pl:2},children:W.title}):null,(K=W==null?void 0:W.elements)==null?void 0:K.map($=>{switch($.type){case"collapse":return p.jsx(xl,{menu:$,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},$.id);case"item":return p.jsx(bl,{item:$,level:1},$.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},$.id)}})]},ie)}),H=(X=S.children)==null?void 0:X.map(W=>{switch(W.type){case"collapse":return p.jsx(xl,{menu:W,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},W.id);case"item":return p.jsx(bl,{item:W,level:1},W.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}}),Y=O?`group-pop-${e.id}`:void 0;return p.jsx(p.Fragment,{children:g?p.jsx(E.List,{children:p.jsxs(E.ListItemButton,{selected:b===S.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:F,onClick:F,onMouseLeave:N,"aria-describedby":Y,children:[D?p.jsx(E.ListItemIcon,{sx:{minWidth:28},children:S.id===r?p.jsx(ze.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):D}):null,p.jsx(E.ListItemText,{sx:{mr:1},primary:p.jsx(E.Typography,{variant:"body1",color:b===S.id?u.palette.primary.main:u.palette.secondary.dark,children:S.id===r?d("ra.actions.more"):S.title})}),O?p.jsx(ze.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):p.jsx(ze.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),A?p.jsx(Zae,{id:Y,open:O,anchorEl:A,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:W})=>p.jsx(ii,{in:O,...W,children:p.jsx(E.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:p.jsx(E.ClickAwayListener,{onClickAway:N,children:p.jsx(E.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:S.id!==r?H:G})})})})}):null]})}):p.jsx(E.List,{subheader:e.title&&y?p.jsxs(E.Box,{sx:{pl:3,mb:1.5},children:[p.jsx(E.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?p.jsx(E.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:y&&e.title?1.5:0,py:0,zIndex:0},children:U})})}function iT(e){const{horizontal:t}=or(),{open:n}=ts(),r=Br(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return p.jsx(E.Box,{sx:r,children:e.children})}function sT(e){const{horizontal:t}=or(),{menu:n,isLoading:r}=D0(),[o,i]=P.useState(""),[a,l]=P.useState(0),{horizontalMaxItems:u}=Pn(),d=t?u:void 0;let f=r?0:(n??[]).length-1,g=[],h;return!r&&d&&d<(n??[]).length&&(h=(n??[])[d-1].id,f=d-1,g=(n??[]).slice(d-1,(n??[]).length).map(m=>({title:m.title,elements:m.children,icon:m.icon}))),p.jsx(iT,{...e,children:!r&&se.map((n??[]).slice(0,f+1),m=>{const{type:y}=m;switch(y){case"group":return p.jsx(oT,{item:m,setSelectedItems:i,setSelectedLevel:l,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:h},m.id);default:return p.jsx(E.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},m.id)}})})}function Qae({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:i}){const a=oe.useTranslate();return p.jsx(t0,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:l})=>p.jsx(ii,{type:"grow",position:"top-right",in:e,...l,children:p.jsx(E.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(E.ClickAwayListener,{onClickAway:n,children:p.jsx(Ln,{elevation:0,border:!1,content:!1,children:p.jsxs(E.List,{children:[p.jsxs(E.ListItemButton,{selected:o==="light",onClick:()=>i("light"),children:[p.jsx(ze.SunOutlined,{}),p.jsx(E.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),p.jsxs(E.ListItemButton,{selected:o==="dark",onClick:()=>i("dark"),children:[p.jsx(ze.MoonOutlined,{}),p.jsx(E.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),p.jsxs(E.ListItemButton,{selected:o==="auto",onClick:()=>i("auto"),children:[p.jsx(cn.Brightness6,{}),p.jsx(E.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function aT(){const e=E.useTheme(),{mode:t,setMode:n}=Pn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=ba(),l=P.useCallback(d=>{n(d)},[n]),u=P.useCallback(()=>{switch(t){case"light":return p.jsx(ze.SunOutlined,{});case"dark":return p.jsx(ze.MoonOutlined,{});default:return p.jsx(cn.Brightness6,{})}},[t]);return p.jsxs(Aa,{value:"theme-mode","aria-label":"toggle mode",onClick:i,selected:!1,children:[p.jsx(u,{}),r?p.jsx(Qae,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:l}):null]})}const lT=P.forwardRef((e,t)=>{const n=Br(e,{display:"flex",width:"100%"});return p.jsx(E.Box,{ref:t,...e,sx:n,children:e.children})});function yv({source:e="paper"}){const{mode:t}=Pn(),n=E.useTheme();return P.useEffect(()=>{var o;const r=se.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const cT=vA(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:i,enableLocaleSwitcher:a}=t,{isLoading:l,navigation:u,breadcrumbs:d}=US();return p.jsxs(lT,{children:[p.jsxs(FE,{children:[p.jsx(tT,{}),a?p.jsx(_E,{}):null,o?p.jsx(aT,{}):null,p.jsx(yv,{}),p.jsx(rS,{}),i?p.jsx(KE,{}):null,p.jsx(eT,{children:p.jsx(JE,{})})]}),p.jsx(rT,{children:p.jsx(sT,{})}),p.jsxs(bA,{error:t.error,children:[!l&&p.jsx(s5,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,p.jsx(gt.Outlet,{}),p.jsx(fv,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})});function uT(e){const t=E.useMediaQuery(n=>n.breakpoints.down("sm"));return p.jsx(ele,{disableGutters:!0,variant:t?"regular":"dense",...tle(e)})}uT.propTypes={children:x.node,className:x.string};const Jae="RaTopToolbar",ele=E.styled(E.Toolbar,{name:Jae,overridesResolver:e=>e.root})(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",gap:e.spacing(1),whiteSpace:"nowrap",flex:"0 1 auto",paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5),paddingInline:e.spacing(2),[e.breakpoints.down("md")]:{flex:"0 1 100%"},[e.breakpoints.down("sm")]:{backgroundColor:e.palette.background.paper,justifyContent:"space-between",alignItems:"center"}}));function tle({hasCreate:e,...t}){return t}const nle=ge("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function dT(){return p.jsx(nle,{children:p.jsx(E.LinearProgress,{color:"primary"})})}function rle(e){return t=>p.jsx(P.Suspense,{fallback:p.jsx(dT,{}),children:p.jsx(e,{...t})})}function bv({title:e}){return p.jsxs(E.Stack,{direction:"row",children:[p.jsx(E.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",p.jsx(E.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const ole=ge(z.Notification,{})(({theme:e})=>({zIndex:2e3,"& *":{fontSize:e.typography.body1.fontSize}}));function fT(e){return p.jsx(ole,{...e})}var _l=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(_l||{});const pT=So().required(),hT=So().oneOf(Object.values(_l));function ile(e){var A;const t=Ni.useQueryClient(),[n,r]=P.useState(!1),[o,i]=P.useState(()=>()=>Promise.resolve()),a=oe.useGetIdentity(),l=(A=a==null?void 0:a.data)==null?void 0:A.email,u=oe.useDataProvider(),d=P.useCallback(()=>l?u.get("onboarding").then(I=>{var S;return(S=I==null?void 0:I.data)==null?void 0:S.value}):Promise.reject(),[u,l]),{data:f,isLoading:g,isError:h}=Ni.useQuery({queryKey:["GET","onboarding",l],queryFn:d,staleTime:24*60*60*1e3,retry:l!==void 0}),[m,y]=P.useState(()=>()=>Promise.resolve()),C=Ni.useMutation({mutationFn:m}).mutateAsync;return P.useEffect(()=>{function I(){const S=se.chain(f??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",S).then(()=>{t.invalidateQueries(["GET","onboarding",l])})}y(()=>I)},[u,f,e,t,l]),P.useEffect(()=>{r(se.isNil((f??{})[e]))},[f,e,r]),P.useEffect(()=>{i(()=>()=>C())},[C]),{loading:g,error:h,onboardingRequired:n,acknowledgeOnboarding:o}}function sle(e){const[t,n]=z0("onboarding",{}),[r,o]=P.useState(!1),[i,a]=P.useState(()=>()=>Promise.resolve());return P.useEffect(()=>{o(se.isNil((t??{})[e]))},[t,e,o]),P.useEffect(()=>{a(()=>()=>(n(l=>se.extend(l,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:i}}function ale(){return{onboardingRequired:!1,acknowledgeOnboarding:P.useRef(()=>Promise.resolve()).current}}function gT(e,t){V0({mode:hT,topic:pT}).validateSync({mode:e,topic:t});const n=ile(t),r=sle(t),o=ale();switch(e){case _l.USER:return n.loading?o:n.error?r:se.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case _l.BROWSER:return r;default:return o}}var Zs=(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))(Zs||{});function lle(e,t){var o;const n=se.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:i}=t;return se.extend(n,{show:i})}case"REGISTER_TIP":{const{payload:i}=t,{id:a}=i,l=se.chain(n.tips).clone().reject(f=>f.id===a).value(),u=se.find(n.tips,{id:a}),d=se.chain(u??{}).clone().extend(i).value();return l.push(d),se.extend(n,{tips:se.sortBy(l,["step"])})}case"UNREGISTER_TIP":{const{payload:i}=t,a=se.isString(i)?i:i.id,l=se.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return se.extend(n,{tips:l})}case"DISMISS_TIP":{const{payload:i}=t,a=se.isString(i)?i:i.id,l=se.chain(n.tips).reject(h=>h.id===a).value(),u=se.find(n.tips,{id:a});if(se.isNil(u))return n;const d=se.chain(u).clone().extend({dismissed:!0}).value();l.push(d);const f=((o=se.chain(l).reject(h=>h.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&se.chain(l).reject(h=>h.step<f).reject(h=>h.dismissed??!1).isEmpty().value()&&e.onComplete(),se.extend(n,{tips:se.sortBy(l,["step"]),currentStep:f})}case"SET_ON_COMPLETE":{const{payload:i}=t;return se.extend(n,{onComplete:i})}case"RESTART":{const i=se.chain(n.tips).clone().map(a=>se.omit(a,"dismissed")).value();return se.extend(n,{tips:i,currentStep:0})}default:return n}}const xv=P.createContext(void 0);function cle(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=gT(t,n),[i,a]=P.useReducer(lle,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),l=P.useMemo(()=>({state:i,dispatch:a}),[i,a]);return P.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),P.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),p.jsx(xv.Provider,{value:l,children:e.children})}function mT(){const e=P.useContext(xv);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function ule(){return mT().state}function vT(){return mT().dispatch}function yT(e){V0({id:So().required(),step:t6().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:i,currentStep:a}=ule(),l=se.find(i,{id:t}),{dismissed:u}=l??{},d=vT(),f=P.useCallback(()=>{d({type:Zs.DISMISS_TIP,payload:t})},[d,t]);return P.useEffect(()=>{(se.isNil(l)||n!==(l==null?void 0:l.step))&&d({type:Zs.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,l,d]),P.useEffect(()=>()=>{d({type:Zs.UNREGISTER_TIP,payload:t})},[t,d]),{tip:se.chain(l??e).clone().extend({open:o&&!se.isNil(l)&&a===n&&!u}).value(),dismiss:f}}function dle(){const e=vT();return P.useCallback(()=>{e({type:Zs.RESTART})},[e])}function fle(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:i,dismiss:a}=yT({id:t,step:n,completeOnboarding:o}),{open:l}=i,u=se.omit(e,["id","step","title","completeOnboarding"]);return p.jsx(uf,{...u,arrow:!0,open:l,title:p.jsxs(E.Stack,{gap:1,children:[p.jsx(E.Typography,{children:r}),p.jsx(E.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const ple=E.styled(fle)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${E.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${E.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${E.tooltipClasses.arrow}`]:{color:r.main}}});function bT({children:e}){const t=gt.useLocation(),{pathname:n}=t;return P.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),p.jsx(p.Fragment,{children:e})}const hle=ge("div")({width:"100%",overflowX:"auto",display:"block"});function gle({shadow:e,children:t,...n}){return p.jsx(Ln,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function xT({title:e}){return p.jsx(E.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}function mle({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:i,component:a,leftIcon:l,rightIcon:u,button:d,buttonProps:f,...g}){const{getCurrentDialog:h}=Z0(),m=oe.useResourceContext(g),y=h(),b=oe.useRecordContext(),C=r||b,A=Ke.get(C,e||"");return p.jsxs(E.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:I=>({pt:1,pb:1,borderBottom:`1px solid ${I.palette.divider}`,...o&&{mb:2},...i&&{mt:2}}),children:[p.jsxs(E.Stack,{direction:"row",alignItems:"start",children:[l?P.isValidElement(l)?P.cloneElement(l,{style:bu}):P.createElement(l,{style:bu}):null,p.jsx(oe.FieldTitle,{label:t,source:e,resource:y||m})]}),p.jsxs(E.Stack,{direction:"row",alignItems:"center",children:[a?P.isValidElement(a)?P.cloneElement(a,{record:C,resource:m,value:A}):P.createElement(a,{source:e,record:C,resource:m,value:A}):p.jsx(E.Typography,{variant:n,children:A}),u?P.isValidElement(u)?P.cloneElement(u,{style:bu}):P.createElement(u,{style:bu}):null,d?p.jsx(E.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...f,children:d}):null]})]})}const bu={width:"1.5rem",alignSelf:"center"};function vle({children:e}){const t=Et();return p.jsx(Ln,{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:p.jsx(E.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function Pf({version:e,name:t,copy:n,children:r,logo:o,background:i=df,footer:a=!0}){return p.jsxs(E.Box,{children:[p.jsx(yv,{source:"default"}),P.isValidElement(i)?i:P.createElement(i),p.jsxs(E.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{ml:3},children:o||p.jsx(bv,{title:t})}),p.jsxs(E.Grid,{item:!0,xs:12,children:[p.jsx(E.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:p.jsx(E.Grid,{item:!0,children:p.jsx(vle,{children:r})})}),a?p.jsx(E.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:p.jsx(fv,{name:t,copy:n,version:e})}):null]})]})]})}function yle({name:e,copy:t,logo:n,version:r,background:o}){const i=oe.useTranslate(),a=oe.useAuthProvider(),l=oe.useNotify(),u=gt.useNavigate(),{token:d}=gt.useParams();return P.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(d).then(()=>{l("ra.auth.activate_success",{type:"info"}),se.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),se.delay(()=>u("/login"),1e3)})},[d,a,l,u]),p.jsx(Pf,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:i("ra.auth.activate")}),p.jsx(E.Typography,{component:gt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),p.jsx(E.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})}function CT(){const e=P.useCallback(()=>location.reload(),[]);return p.jsx(E.Container,{children:p.jsxs(E.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[p.jsx("img",{alt:"Error",src:E5,style:{width:"100%",maxWidth:450}}),p.jsx(E.Typography,{variant:"h2",children:"Ops! An error occurred..."}),p.jsx(E.Typography,{children:"We're fixing the problem. Please try again later."}),p.jsx(E.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function wT({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:i=!1,oauth:a={},redirectTo:l,background:u=p.jsx(df,{})}){const[d,f]=oe.useSafeSetState(!1),g=oe.useLogin(),h=oe.useTranslate(),m=oe.useNotify(),y=oe.useCheckAuth(),b=gt.useNavigate();P.useEffect(()=>{y({},!1).then(()=>{b("/")}).catch(()=>{})},[y,b]);function C(A){f(!0),g(A,l).then(()=>{f(!1)}).catch(I=>{f(!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 p.jsx(Pf,{name:t,version:e,copy:n,logo:r,background:u,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:"Login"}),i?p.jsx(E.Typography,{component:gt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")}):null]})}),p.jsxs(E.Grid,{item:!0,xs:12,children:[p.jsxs(oe.Form,{onSubmit:C,children:[p.jsxs(E.Grid,{container:!0,children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(wr,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:oe.required(),placeholder:"user@company.name",fullWidth:!0})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(wr,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:oe.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:p.jsx(E.Link,{variant:"h6",component:gt.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}):null,p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Button,{variant:"contained",type:"submit",color:"primary",disabled:d,fullWidth:!0,children:d?p.jsx(E.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]}),se.isEmpty(a)?null:p.jsxs(p.Fragment,{children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:2},children:p.jsx(E.Divider,{})}),a.google?p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:2,width:"100%"},children:p.jsx(w6,{setLoading:f})}):null]})]})]})})}function ble({name:e,copy:t,logo:n,version:r,background:o}){const[i,a]=P.useState(!1),l=oe.useTranslate(),u=oe.useRedirect(),d=oe.useNotify(),f=oe.useAuthProvider();function g({email:h}){a(!0),f.recover(h).then(m=>{const y=`ra.auth.recover_${m.responseCode}`,b=m.responseCode==="ok"?"info":"error";d(y,{type:b}),u("/login")}).catch(m=>{d((m==null?void 0:m.message)||(m==null?void 0:m.toString()),{type:"error"})}).finally(()=>a(!1))}return p.jsx(Pf,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:l("ra.auth.recover.title")}),p.jsx(E.Typography,{component:gt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.back_to_login")})]})}),p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(z.Form,{onSubmit:g,children:[p.jsx(E.Grid,{container:!0,children:p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"email",validate:[oe.required(),oe.email()]})})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:p.jsx(E.Typography,{variant:"caption",children:l("ra.auth.recover.inbox_help")})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(E.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})}function xle({name:e,copy:t,version:n,logo:r,background:o}){const[i,a]=P.useState(!1),l=oe.useTranslate(),u=oe.useRedirect(),d=oe.useNotify(),f=oe.useAuthProvider();function g(h){a(!0),f.register(h).then(m=>{const y=`ra.auth.register_${m.responseCode}`,b=m.responseCode==="ok"?"info":"error";d(y,{type:b}),u("/login")}).catch(m=>{d(m.message||m,{type:"error"})}).finally(()=>a(!1))}return p.jsx(Pf,{name:e,copy:t,logo:r,background:o,version:n,children:p.jsxs(E.Grid,{container:!0,spacing:3,children:[p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(E.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(E.Typography,{variant:"h3",children:l("ra.auth.register.title")}),p.jsx(E.Typography,{component:gt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.already_have_account")})]})}),p.jsx(E.Grid,{item:!0,xs:12,children:p.jsxs(z.Form,{onSubmit:g,children:[p.jsxs(E.Grid,{container:!0,children:[p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"name",label:l("ra.register.name"),validate:oe.required()})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"email",type:"email",validate:[oe.required(),oe.email()]})}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(wr,{source:"password",type:"password",validate:oe.required()})})]}),p.jsx(E.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(E.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(E.CircularProgress,{size:19,thickness:3}):l("ra.auth.create_account")})})]})})]})})}function Cle(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 wle(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Sle(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:p.jsx(ze.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=fn(t,e),{lighter:r,light:o,main:i}=n;return{borderColor:nt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:i}}}function Ale(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 Ele(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Tle(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 Ti({color:e,theme:t}){const n=fn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function Ile(e){const t=Ti({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Ti({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Ti({color:"secondary",theme:e}),"&.MuiBadge-colorError":Ti({color:"error",theme:e}),"&.MuiBadge-colorInfo":Ti({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Ti({color:"success",theme:e}),"&.MuiBadge-colorWarning":Ti({color:"warning",theme:e})}}}}}function it({variant:e,color:t,theme:n}){const r=fn(n,t),{lighter:o,main:i,dark:a,contrastText:l}=r,u=`${t}Button`,d=fa(n,u),f={"&::after":{boxShadow:`0 0 5px 5px ${nt(i,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${nt(i,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...f};case"shadow":return{color:l,backgroundColor:i,boxShadow:d,"&:hover":{boxShadow:"none",backgroundColor:a},...f};case"outlined":return{borderColor:i,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...f};case"dashed":return{color:i,borderColor:i,backgroundColor:o,"&:hover":{color:a,borderColor:a},...f};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...f}}}function Ole(e){const t=it({variant:"dashed",color:"primary",theme:e}),n=it({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":it({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":it({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":it({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":it({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":it({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":it({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":it({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":it({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":it({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":it({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":it({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":it({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:it({variant:"contained",color:"primary",theme:e}),containedSecondary:it({variant:"contained",color:"secondary",theme:e}),containedError:it({variant:"contained",color:"error",theme:e}),containedSuccess:it({variant:"contained",color:"success",theme:e}),containedInfo:it({variant:"contained",color:"info",theme:e}),containedWarning:it({variant:"contained",color:"warning",theme:e}),outlinedPrimary:it({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:it({variant:"outlined",color:"secondary",theme:e}),outlinedError:it({variant:"outlined",color:"error",theme:e}),outlinedSuccess:it({variant:"outlined",color:"success",theme:e}),outlinedInfo:it({variant:"outlined",color:"info",theme:e}),outlinedWarning:it({variant:"outlined",color:"warning",theme:e}),textPrimary:it({variant:"text",color:"primary",theme:e}),textSecondary:it({variant:"text",color:"secondary",theme:e}),textError:it({variant:"text",color:"error",theme:e}),textSuccess:it({variant:"text",color:"success",theme:e}),textInfo:it({variant:"text",color:"info",theme:e}),textWarning:it({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function Ple(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function jle(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function Rle(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function kle(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function js({color:e,theme:t}){const n=fn(t,e),{lighter:r,main:o,dark:i}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function Mle(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 Ph(e){const t=Mle(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function _le(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(ze.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(ze.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...Ph("small")},"&.size-medium":{...Ph("medium")},"&.size-large":{...Ph("large")}},colorPrimary:js({color:"primary",theme:e}),colorSecondary:js({color:"secondary",theme:e}),colorSuccess:js({color:"success",theme:e}),colorWarning:js({color:"warning",theme:e}),colorInfo:js({color:"info",theme:e}),colorError:js({color:"error",theme:e})}}}}function Rs({color:e,theme:t}){const n=fn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Zn({color:e,theme:t}){const n=fn(t,e),{light:r,lighter:o,main:i}=n;return{color:i,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:i,"&:hover":{color:r}}}}function Dle(e){const t=Zn({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Rs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Rs({color:"secondary",theme:e}),"&.MuiChip-colorError":Rs({color:"error",theme:e}),"&.MuiChip-colorInfo":Rs({color:"info",theme:e}),"&.MuiChip-colorSuccess":Rs({color:"success",theme:e}),"&.MuiChip-colorWarning":Rs({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 Fle(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:nt("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function Ble(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function Lle(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function ks({color:e,theme:t}){const n=fn(t,e),{main:r,dark:o,contrastText:i}=n,a=`${e}Button`,l=fa(t,a);return{color:i,backgroundColor:r,boxShadow:l,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${nt(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${nt(r,.9)}`}}}function Nle(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":ks({color:"primary",theme:e}),"&.MuiFab-secondary":ks({color:"secondary",theme:e}),"&.Mui-error":ks({color:"error",theme:e}),"&.MuiFab-success":ks({color:"success",theme:e}),"&.MuiFab-info":ks({color:"info",theme:e}),"&.MuiFab-warning":ks({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 $le(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 Vle(e){return{MuiInputBase:{styleOverrides:{}}}}function Wle(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 zle(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function Ule(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function Hle(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function Gle(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function qle(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function Yle(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Ii({variant:e,theme:t}){const n=fn(t,e),{light:r}=n,o=fa(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function Kle(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:{...Ii({variant:"primary",theme:e}),"&.Mui-error":{...Ii({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Ii({variant:"secondary",theme:e}),colorError:Ii({variant:"error",theme:e}),colorWarning:Ii({variant:"warning",theme:e}),colorInfo:Ii({variant:"info",theme:e}),colorSuccess:Ii({variant:"success",theme:e})}}}}function Xle(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function kt({variant:e,color:t,theme:n}){const r=fn(n,t),{lighter:o,light:i,dark:a,main:l,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:l,"&:hover":{backgroundColor:i},...d};case"outlined":return{borderColor:l,"&:hover":{backgroundColor:o,borderColor:i},...d};case"text":default:return{color:l,"&:hover":{backgroundColor:l,color:o},...d}}}function Zle(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":kt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":kt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":kt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":kt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":kt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":kt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":kt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":kt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":kt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":kt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":kt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":kt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":kt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":kt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":kt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":kt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":kt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":kt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":kt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":kt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":kt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":kt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":kt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":kt({variant:"outlined",color:"warning",theme:e})}}}}}}function Qle(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function Ms({color:e,theme:t}){const n=fn(t,e),{lighter:r,main:o,dark:i}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${i}`,outlineOffset:-4}}}function Jle(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 jh(e){const t=Jle(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function ece(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:p.jsx(E.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:p.jsx(E.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":{...jh("small")},"&.size-medium":{...jh("medium")},"&.size-large":{...jh("large")}},colorPrimary:Ms({color:"primary",theme:e}),colorSecondary:Ms({color:"secondary",theme:e}),colorSuccess:Ms({color:"success",theme:e}),colorWarning:Ms({color:"warning",theme:e}),colorInfo:Ms({color:"info",theme:e}),colorError:Ms({color:"error",theme:e})}}}}function _s({color:e,theme:t}){const n=fn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function tce(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":_s({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":_s({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":_s({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":_s({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":_s({color:"info",theme:e}),"&.MuiSlider-thumbColorError":_s({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 nce(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 Rh(e,t){const n=nce(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 rce(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},...Rh(e,"medium")},sizeLarge:{...Rh(e,"large")},sizeSmall:{...Rh(e,"small")}}}}}function oce(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 ice(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 sce(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 ace(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function lce(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function cce(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function uce(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function dce(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function fce(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 pce(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function hce(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function gce(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function mce(e){return Ke.merge(Cle(e),wle(e),Sle(e),Ale(e),Ele(),Tle(e),Ile(e),Ole(e),Ple(),jle(),Rle(),kle(),_le(e),Dle(e),Fle(e),Ble(e),Lle(),Nle(e),$le(e),Vle(),Wle(e),zle(),Ule(),Hle(e),Gle(e),qle(),Yle(),Kle(e),Xle(),Zle(e),Qle(e),ece(e),tce(e),rce(e),oce(e),ice(e),sce(e),ace(e),lce(e),cce(),uce(),dce(),fce(e),pce(e),hce(),gce())}function vce(e){const{blue:t,red:n,gold:r,cyan:o,green:i,grey:a}=e,l={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:l[100],100:l[100],200:l[200],light:l[300],400:l[400],main:l[500],600:l[600],dark:l[700],800:l[800],darker:l[900],A100:l[0],A200:l.A400,A300:l.A700,contrastText:l[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:l[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:i[0],light:i[3],main:i[5],dark:i[7],darker:i[9],contrastText:u},grey:l}}function yce(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 i=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],l=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],d=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(i=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],l=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],d=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 bce(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 i=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 xce(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 i=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Cce(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 i=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 wce(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 i=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Sce(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 i=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Ace(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 i=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Ece(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 i=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],l=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],d=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(i=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],l=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],d=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:i[0],100:i[1],200:i[2],light:i[3],400:i[4],main:i[5],dark:i[6],700:i[7],darker:i[8],900:i[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:l[0],light:l[1],main:l[2],dark:l[3],darker:l[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 Tce(e,t,n){switch(t){case"theme1":return yce(e,n);case"theme2":return bce(e,n);case"theme3":return xce(e,n);case"theme4":return Cce(e,n);case"theme5":return wce(e,n);case"theme6":return Sce(e,n);case"theme7":return Ace(e,n);case"theme8":return Ece(e,n);default:return vce(e)}}var kg=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];kg.primary=kg[5];var Mg=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Mg.primary=Mg[5];var _g=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];_g.primary=_g[5];var Dg=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Dg.primary=Dg[5];var Fg=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Fg.primary=Fg[5];var Bg=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Bg.primary=Bg[5];var Lg=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Lg.primary=Lg[5];var Ng=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Ng.primary=Ng[5];var $g=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];$g.primary=$g[5];var Vg=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Vg.primary=Vg[5];var Wg=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Wg.primary=Wg[5];var zg=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];zg.primary=zg[5];var Ug=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Ug.primary=Ug[5];var Ice={red:kg,volcano:Mg,orange:_g,gold:Dg,yellow:Fg,lime:Bg,green:Lg,cyan:Ng,blue:$g,geekblue:Vg,purple:Wg,magenta:zg,grey:Ug},Hg=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Hg.primary=Hg[5];var Gg=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Gg.primary=Gg[5];var qg=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];qg.primary=qg[5];var Yg=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Yg.primary=Yg[5];var Kg=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];Kg.primary=Kg[5];var Xg=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];Xg.primary=Xg[5];var Zg=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];Zg.primary=Zg[5];var Qg=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];Qg.primary=Qg[5];var Jg=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];Jg.primary=Jg[5];var em=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];em.primary=em[5];var tm=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];tm.primary=tm[5];var nm=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];nm.primary=nm[5];var rm=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];rm.primary=rm[5];var Oce={red:Hg,volcano:Gg,orange:qg,gold:Yg,yellow:Kg,lime:Xg,green:Zg,cyan:Qg,blue:Jg,geekblue:em,purple:tm,magenta:nm,grey:rm};function Pce(e,t){const n=e==="dark"?Oce:Ice;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],i=["#121212","#d3d8db"]),n.grey=[...r,...o,...i];const a=Tce(n,t,e);return Fm({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?nt(a.grey[900],.87):a.grey[700],secondary:e==="dark"?nt(a.grey[900],.45):a.grey[500],disabled:e==="dark"?nt(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?nt(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})}function jce(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%)",z0:"none",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 ${nt(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${nt(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${nt(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${nt(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${nt(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${nt(e.palette.info.main,.2)}`,success:`0 0 0 2px ${nt(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${nt(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${nt(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${nt(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${nt(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${nt(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${nt(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${nt(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${nt(e.palette.grey[500],.2)}`}}function Rce(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 Cv({themeOverrides:e,children:t}){const n=Pn(),{themeDirection:r,mode:o,presetColor:i,fontFamily:a}=n,l=f6(),u=P.useMemo(()=>o==="auto"?l:o,[o,l]),d=P.useMemo(()=>Pce(u,i),[u,i]),f=P.useMemo(()=>Rce(a),[a]),g=P.useMemo(()=>jce(d),[d]),h=P.useMemo(()=>se.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:d.palette,customShadows:g,typography:f,components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:d.spacing(2.6875),height:d.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(d):e),[r,d,f,g,e]),m=Fm(h),y=se.cloneDeep(m.components??{});return m.components=se.merge(mce(m),y),p.jsx(E.StyledEngineProvider,{injectFirst:!0,children:p.jsxs(n5,{theme:m,children:[p.jsx(E.CssBaseline,{enableColorScheme:!0}),t]})})}function kce({children:e,theme:t,...n}){return p.jsx(z.CoreAdminContext,{...n,children:p.jsx(Cv,{themeOverrides:t,children:p.jsx(bT,{children:e})})})}function ST(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:i,disableTelemetry:a,history:l,i18nProvider:u,layout:d,loading:f,loginPage:g,authCallbackPage:h,menu:m,notification:y,queryClient:b,requireAuth:C,store:A=z.localStorageStore(),ready:I,theme:S,title:T="React Admin"}=e;return p.jsx(kce,{authProvider:t,dataProvider:i,i18nProvider:u,store:A,history:l,queryClient:b,theme:S,children:p.jsx(z.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:m,catchAll:n,title:T,loading:f,loginPage:g,authCallbackPage:h,notification:y,requireAuth:C,ready:I,children:r})})}class AT{constructor({catch:t,display:n,log:r,error:o}){Ha(this,"catch");Ha(this,"display");Ha(this,"log");Ha(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}}var Dl,Fl,Qs;class Mce{constructor(t){go(this,Dl);go(this,Fl);go(this,Qs,new Set);const{apiUrl:n}=t??{};if(!se.isString(n)||se.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");zo(this,Fl,n),zo(this,Dl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var l;const{message:n,filename:r,lineno:o,colno:i}=t,a=`${n}${r}${o}${i}`;_n(this,Qs).has(a)||(_n(this,Qs).add(a),fetch(`${_n(this,Fl)}/ui/error-log`,{method:"PUT",headers:_n(this,Dl),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(l=t.error)==null?void 0:l.stack})}).catch(u=>{console.warn("Unable to send error to server",u),_n(this,Qs).delete(a)}))}}Dl=new WeakMap,Fl=new WeakMap,Qs=new WeakMap;function _ce({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=i=>new AT({catch:i!=null,display:!1,log:i!=null,error:i}),...o}){const i=L.useMemo(()=>o.errorHandler?o.errorHandler:new Mce({apiUrl:t}),[t,o.errorHandler]),a=console.error,l=L.useCallback(function(u,...d){var g;if(!u)return!1;const f=r(u instanceof ErrorEvent?u:(g=u==null?void 0:u.toString())==null?void 0:g.replace(/%s/g,()=>d.shift()));return f.isCatched()||(f.logError()&&(u instanceof ErrorEvent?i.handle(u):i.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),f.displayError()&&a.apply(console,arguments)),!1},[r,i,a]);return L.useEffect(()=>(window.removeEventListener("error",l),window.addEventListener("error",l),console.error=l,()=>{window.removeEventListener("error",l),console.error=a}),[l,a]),!0}var Bl,Ll,Li;class Dce{constructor(t){go(this,Bl);go(this,Ll);go(this,Li,[]);const{apiUrl:n}=t??{};if(!se.isString(n)||se.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");zo(this,Ll,n),zo(this,Bl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!se.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!se.isString(n)||se.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!se.isString(r)||se.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!se.some(_n(this,Li),o=>se.isEqual(o,{code:n,lang:r}))){_n(this,Li).push({code:n,lang:r}),fetch(`${_n(this,Ll)}/i18n/message`,{method:"put",headers:_n(this,Bl),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),zo(this,Li,se.reject(_n(this,Li),i=>se.isEqual(i,{code:n,lang:r})))});return}}}Bl=new WeakMap,Ll=new WeakMap,Li=new WeakMap;function ET(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,i=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),l=new Dce({apiUrl:t});function u(){return fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(g=>g.json()).catch(()=>Promise.resolve(i))}function d(){return fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(g=>g.json()).then(g=>g.reduce((h,m)=>({...h,[m.lang]:{...h[m.lang]||{},[m.code]:m.text}}),{}))}function f(g,h,m){return r||console.error(`Warning: Missing translation for key: "${g}"`),o&&(se.isString(g)?g.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${g}`):l.handleMessage({code:g,lang:m}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),g}return Promise.all([u(),d()]).then(g=>{const[h,m]=g;function y(b){return se.get(m,b,{})}return _w(y,n,h,{allowMissing:r||o,onMissingKey:f})})}function Fce(e){const{locales:t,defaultLocale:n,path:r}=e,o=new Headers({Accept:"application/json","Content-Type":"application/json"});function i(a){return fetch(`${r}/${a.locale}.json`,{headers:o,method:"get"}).then(l=>l.json()).then(l=>l.reduce((u,d)=>({...u,[d.lang]:{...u[d.lang]||{},[d.code]:d.text}}),{}))}return Promise.all(t.map(i)).then(a=>se.reduce(a,(l,u)=>({...l,...u}),{})).then(a=>{function l(u){return se.get(a,u,{})}return _w(l,n,t,{allowMissing:!0})})}function Bce({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})}){const[r,o]=P.useState({loading:!0,languages:null});return P.useEffect(()=>{const i=new Headers;i.append("Accept","application/json"),i.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:i}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r}function TT(e){const[t,n]=P.useState(),r=d6(e);return P.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}ET(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const Lce=new Ni.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function Nce({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:i,logoIcon:a,loginPage:l=p.jsx(wT,{version:"0.0.0",name:"Applica",redirectTo:"/",background:p.jsx(df,{})}),menu:u,name:d,copy:f,version:g="0.0.0",dataProvider:h,authProvider:m,i18nProvider:y,errorHandler:b,error:C,enableNotification:A=!1,enableRegistration:I=!1,enablePasswordRecover:S=!1,enableThemeToggler:T=!1,enableLocaleSwitcher:O=!1,oauth:R={},queryClient:k=Lce,background:F,notificationAPI:N="entities/notification",...M}){var Y;_ce({apiUrl:n,errorHandler:b,catcherFn:V=>{const X=V==null?void 0:V.toString(),ie=["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($=>X==null?void 0:X.includes($));return new AT({catch:ie,display:!ie,log:!ie&&o===!0,error:X})}});const D=P.useMemo(()=>P.isValidElement(l)?P.cloneElement(l,{name:d,copy:f,logo:i,version:g,background:F,enableRegistration:I,enablePasswordRecover:S,oauth:R}):l,[l,d,g,f,F,i,I,S,R]),U=P.useMemo(()=>V=>{const X=d?p.jsx(bv,{title:d}):i,W=d?p.jsx(xT,{title:d}):a;return p.jsx(cT,{...V,name:d,copy:f,version:g,logoMain:X,logoIcon:W,notification:N,enableThemeToggler:T,enableNotification:A,enableLocaleSwitcher:O,error:C})},[i,a,d,f,g,C,N,A,T,O]),G=TT({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:y});if(G===void 0)return p.jsx(p.Fragment,{});if(G.error)return p.jsx(Eg,{initialConfig:t,children:p.jsx(Cv,{themeOverrides:e,children:p.jsx(CT,{})})});const H=p.jsx(Jne,{children:p.jsx(zS,{menu:u,children:p.jsx(Eg,{initialConfig:t,children:p.jsx(ST,{theme:e,layout:U,notification:fT,queryClient:k,dataProvider:h,authProvider:m,i18nProvider:G,loginPage:D,...M})})})});return(Y=R.google)!=null&&Y.clientId?p.jsx(Gne,{clientId:R.google.clientId,children:H}):H}Object.defineProperty(exports,"ArrayField",{enumerable:!0,get:()=>z.ArrayField});Object.defineProperty(exports,"ArrayInputContext",{enumerable:!0,get:()=>z.ArrayInputContext});Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:()=>z.BooleanField});Object.defineProperty(exports,"ChipField",{enumerable:!0,get:()=>z.ChipField});Object.defineProperty(exports,"Confirm",{enumerable:!0,get:()=>z.Confirm});Object.defineProperty(exports,"CreateContextProvider",{enumerable:!0,get:()=>z.CreateContextProvider});Object.defineProperty(exports,"CustomRoutes",{enumerable:!0,get:()=>z.CustomRoutes});Object.defineProperty(exports,"DeleteWithUndoButton",{enumerable:!0,get:()=>z.DeleteWithUndoButton});Object.defineProperty(exports,"EditButton",{enumerable:!0,get:()=>z.EditButton});Object.defineProperty(exports,"EditContextProvider",{enumerable:!0,get:()=>z.EditContextProvider});Object.defineProperty(exports,"FieldTitle",{enumerable:!0,get:()=>z.FieldTitle});Object.defineProperty(exports,"FilterButton",{enumerable:!0,get:()=>z.FilterButton});Object.defineProperty(exports,"FilterList",{enumerable:!0,get:()=>z.FilterList});Object.defineProperty(exports,"FilterListItem",{enumerable:!0,get:()=>z.FilterListItem});Object.defineProperty(exports,"FilterLiveSearch",{enumerable:!0,get:()=>z.FilterLiveSearch});Object.defineProperty(exports,"Form",{enumerable:!0,get:()=>z.Form});Object.defineProperty(exports,"FormDataConsumer",{enumerable:!0,get:()=>z.FormDataConsumer});Object.defineProperty(exports,"HttpError",{enumerable:!0,get:()=>z.HttpError});Object.defineProperty(exports,"I18nContextProvider",{enumerable:!0,get:()=>z.I18nContextProvider});Object.defineProperty(exports,"ListBase",{enumerable:!0,get:()=>z.ListBase});Object.defineProperty(exports,"LoadingIndicator",{enumerable:!0,get:()=>z.LoadingIndicator});Object.defineProperty(exports,"RaSimpleFormIterator",{enumerable:!0,get:()=>z.SimpleFormIterator});Object.defineProperty(exports,"RecordContextProvider",{enumerable:!0,get:()=>z.RecordContextProvider});Object.defineProperty(exports,"ReferenceArrayField",{enumerable:!0,get:()=>z.ReferenceArrayField});Object.defineProperty(exports,"ReferenceField",{enumerable:!0,get:()=>z.ReferenceField});Object.defineProperty(exports,"Resource",{enumerable:!0,get:()=>z.Resource});Object.defineProperty(exports,"ResourceContextProvider",{enumerable:!0,get:()=>z.ResourceContextProvider});Object.defineProperty(exports,"SaveButton",{enumerable:!0,get:()=>z.SaveButton});Object.defineProperty(exports,"SavedQueriesList",{enumerable:!0,get:()=>z.SavedQueriesList});Object.defineProperty(exports,"SimpleFormIteratorContext",{enumerable:!0,get:()=>z.SimpleFormIteratorContext});Object.defineProperty(exports,"SimpleShowLayout",{enumerable:!0,get:()=>z.SimpleShowLayout});Object.defineProperty(exports,"SingleFieldList",{enumerable:!0,get:()=>z.SingleFieldList});Object.defineProperty(exports,"TabbedFormTabs",{enumerable:!0,get:()=>z.TabbedFormTabs});Object.defineProperty(exports,"UrlField",{enumerable:!0,get:()=>z.UrlField});Object.defineProperty(exports,"ValidationError",{enumerable:!0,get:()=>z.ValidationError});Object.defineProperty(exports,"WithListContext",{enumerable:!0,get:()=>z.WithListContext});Object.defineProperty(exports,"choices",{enumerable:!0,get:()=>z.choices});Object.defineProperty(exports,"email",{enumerable:!0,get:()=>z.email});Object.defineProperty(exports,"maxLength",{enumerable:!0,get:()=>z.maxLength});Object.defineProperty(exports,"maxValue",{enumerable:!0,get:()=>z.maxValue});Object.defineProperty(exports,"minLength",{enumerable:!0,get:()=>z.minLength});Object.defineProperty(exports,"minValue",{enumerable:!0,get:()=>z.minValue});Object.defineProperty(exports,"number",{enumerable:!0,get:()=>z.number});Object.defineProperty(exports,"regex",{enumerable:!0,get:()=>z.regex});Object.defineProperty(exports,"required",{enumerable:!0,get:()=>z.required});Object.defineProperty(exports,"useArrayInput",{enumerable:!0,get:()=>z.useArrayInput});Object.defineProperty(exports,"useAuthProvider",{enumerable:!0,get:()=>z.useAuthProvider});Object.defineProperty(exports,"useCheckAuth",{enumerable:!0,get:()=>z.useCheckAuth});Object.defineProperty(exports,"useChoices",{enumerable:!0,get:()=>z.useChoices});Object.defineProperty(exports,"useChoicesContext",{enumerable:!0,get:()=>z.useChoicesContext});Object.defineProperty(exports,"useCreate",{enumerable:!0,get:()=>z.useCreate});Object.defineProperty(exports,"useCreateContext",{enumerable:!0,get:()=>z.useCreateContext});Object.defineProperty(exports,"useCreateController",{enumerable:!0,get:()=>z.useCreateController});Object.defineProperty(exports,"useCreateSuggestionContext",{enumerable:!0,get:()=>z.useCreateSuggestionContext});Object.defineProperty(exports,"useDataProvider",{enumerable:!0,get:()=>z.useDataProvider});Object.defineProperty(exports,"useDeleteMany",{enumerable:!0,get:()=>z.useDeleteMany});Object.defineProperty(exports,"useEditContext",{enumerable:!0,get:()=>z.useEditContext});Object.defineProperty(exports,"useEditController",{enumerable:!0,get:()=>z.useEditController});Object.defineProperty(exports,"useGetIdentity",{enumerable:!0,get:()=>z.useGetIdentity});Object.defineProperty(exports,"useGetList",{enumerable:!0,get:()=>z.useGetList});Object.defineProperty(exports,"useGetMany",{enumerable:!0,get:()=>z.useGetMany});Object.defineProperty(exports,"useGetManyReference",{enumerable:!0,get:()=>z.useGetManyReference});Object.defineProperty(exports,"useGetOne",{enumerable:!0,get:()=>z.useGetOne});Object.defineProperty(exports,"useInput",{enumerable:!0,get:()=>z.useInput});Object.defineProperty(exports,"useListContext",{enumerable:!0,get:()=>z.useListContext});Object.defineProperty(exports,"useListController",{enumerable:!0,get:()=>z.useListController});Object.defineProperty(exports,"useLocaleState",{enumerable:!0,get:()=>z.useLocaleState});Object.defineProperty(exports,"useLocales",{enumerable:!0,get:()=>z.useLocales});Object.defineProperty(exports,"useLogin",{enumerable:!0,get:()=>z.useLogin});Object.defineProperty(exports,"useLogout",{enumerable:!0,get:()=>z.useLogout});Object.defineProperty(exports,"useNotify",{enumerable:!0,get:()=>z.useNotify});Object.defineProperty(exports,"usePermissions",{enumerable:!0,get:()=>z.usePermissions});Object.defineProperty(exports,"useRecordContext",{enumerable:!0,get:()=>z.useRecordContext});Object.defineProperty(exports,"useReferenceArrayFieldController",{enumerable:!0,get:()=>z.useReferenceArrayFieldController});Object.defineProperty(exports,"useRefresh",{enumerable:!0,get:()=>z.useRefresh});Object.defineProperty(exports,"useRemoveFromStore",{enumerable:!0,get:()=>z.useRemoveFromStore});Object.defineProperty(exports,"useResetStore",{enumerable:!0,get:()=>z.useResetStore});Object.defineProperty(exports,"useResourceContext",{enumerable:!0,get:()=>z.useResourceContext});Object.defineProperty(exports,"useResourceDefinition",{enumerable:!0,get:()=>z.useResourceDefinition});Object.defineProperty(exports,"useResourceDefinitions",{enumerable:!0,get:()=>z.useResourceDefinitions});Object.defineProperty(exports,"useSafeSetState",{enumerable:!0,get:()=>z.useSafeSetState});Object.defineProperty(exports,"useShowContext",{enumerable:!0,get:()=>z.useShowContext});Object.defineProperty(exports,"useShowController",{enumerable:!0,get:()=>z.useShowController});Object.defineProperty(exports,"useSimpleFormIterator",{enumerable:!0,get:()=>z.useSimpleFormIterator});Object.defineProperty(exports,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>z.useSimpleFormIteratorItem});Object.defineProperty(exports,"useStore",{enumerable:!0,get:()=>z.useStore});Object.defineProperty(exports,"useStoreContext",{enumerable:!0,get:()=>z.useStoreContext});Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:()=>z.useTranslate});Object.defineProperty(exports,"useTranslateLabel",{enumerable:!0,get:()=>z.useTranslateLabel});Object.defineProperty(exports,"useUnselect",{enumerable:!0,get:()=>z.useUnselect});Object.defineProperty(exports,"useUnselectAll",{enumerable:!0,get:()=>z.useUnselectAll});Object.defineProperty(exports,"useUpdate",{enumerable:!0,get:()=>z.useUpdate});Object.defineProperty(exports,"useUpdateMany",{enumerable:!0,get:()=>z.useUpdateMany});Object.defineProperty(exports,"withLifecycleCallbacks",{enumerable:!0,get:()=>z.withLifecycleCallbacks});exports.ActionsField=nre;exports.ActionsMenu=si;exports.ActivatePage=yle;exports.ActiveFiltersChips=Rg;exports.AddTableRow=rv;exports.Admin=ST;exports.AnimateButton=X_;exports.AppBarStyled=kE;exports.ApplicaAdmin=Nce;exports.ArrayInput=tre;exports.AttachmentField=I6;exports.AttachmentInput=Ire;exports.AuthBackground=df;exports.AutocompleteArrayInput=Pre;exports.AutocompleteInput=Rre;exports.Avatar=ed;exports.BooleanInput=Mre;exports.Breadcrumbs=s5;exports.BulkActionsToolbar=BE;exports.BulkDeleteWithConfirmButton=g6;exports.BulkFloatingActionsToolbar=oae;exports.Button=Qi;exports.CardForm=h6;exports.ChangePasswordButton=XE;exports.ChangePasswordForm=Q0;exports.CircularWithLabel=eW;exports.CircularWithPath=tW;exports.CoverField=P6;exports.Create=doe;exports.CreateButton=v6;exports.CreateButtonClasses=Ad;exports.CreateInDialogButton=vne;exports.Datagrid=dae;exports.DateAgoField=R6;exports.DateField=dre;exports.DateInput=Fre;exports.DateTimeInput=Lre;exports.DeleteWithConfirmButton=Ji;exports.Dot=Gm;exports.Drawer=RE;exports.DrawerHeader=wA;exports.DrawerHeaderStyled=xA;exports.DrawerToggle=DE;exports.Edit=hoe;exports.EditInDialogButton=xne;exports.EmailField=pre;exports.Empty=ac;exports.EmptyClasses=Wi;exports.Error=_0;exports.Field=uA;exports.FileField=k6;exports.FileInput=$re;exports.FilterSidebar=Lu;exports.FilterSidebarButton=Tae;exports.FilterSidebarContext=pv;exports.Footer=fv;exports.FormHeader=voe;exports.FunctionField=gre;exports.GenericErrorPage=CT;exports.GoogleLoginButton=w6;exports.Header=FE;exports.HeaderButton=ME;exports.HeaderIconButton=eae;exports.HeaderNotification=KE;exports.HeaderProfile=JE;exports.HeaderSpacer=tT;exports.HeaderToggleButton=Aa;exports.HorizontalBar=nT;exports.IconButton=of;exports.ImageField=O6;exports.ImageInput=Vre;exports.ImpersonateUserButton=Zne;exports.LabeledArrayInput=T6;exports.LabeledInput=xn;exports.Layout=cT;exports.LayoutContent=bA;exports.LayoutProvider=mA;exports.LayoutWrapper=lT;exports.LinearWithIcon=nW;exports.LinearWithLabel=rW;exports.List=Wae;exports.ListItem=mle;exports.ListToolbar=GE;exports.ListViewProvider=YE;exports.Loadable=rle;exports.Loader=dT;exports.LoadingButton=C5;exports.LocalStorage=i6;exports.LocaleButton=_E;exports.LocalizedTextField=vre;exports.LocalizedTextInput=Ure;exports.LoginPage=wT;exports.Logo=CA;exports.LogoutButton=ZE;exports.LongForm=Vt;exports.MainCard=Ln;exports.MainIcon=bv;exports.MenuConfigProvider=zS;exports.MenuPopover=A5;exports.NavCollapse=xl;exports.NavGroup=oT;exports.NavItem=bl;exports.NavList=iT;exports.NavMenu=rT;exports.Navigation=sT;exports.Notification=fT;exports.NotificationList=Gae;exports.NumberInput=Gre;exports.OnboardingActionType=Zs;exports.OnboardingContext=xv;exports.OnboardingModes=_l;exports.OnboardingProvider=cle;exports.OnboardingTip=ple;exports.Pagination=mv;exports.PaginationActions=gv;exports.PopupTransition=JV;exports.RadioButtonGroupInput=Yre;exports.ReadonlyField=Cre;exports.RecordInput=Kre;exports.RecoverPage=ble;exports.ReferenceArrayInput=Xre;exports.ReferenceInput=Zre;exports.ReferenceManyField=_6;exports.ReferenceManyInput=Qre;exports.RegisterPage=xle;exports.RemoveSavedQueryDialog=zE;exports.ResponsiveSection=eT;exports.SaveFiltersButton=WE;exports.SaveFiltersDialog=VE;exports.SavedFiltersList=UE;exports.ScrollTop=bT;exports.ScrollX=hle;exports.SearchInput=eoe;exports.SelectArrayInput=noe;exports.SelectInput=ooe;exports.ShadowBox=gle;exports.Show=Moe;exports.Sidebar=xr;exports.SimpleBar=jE;exports.SimpleForm=X0;exports.SimpleFormIterator=Doe;exports.SimpleList=qae;exports.SizeField=Are;exports.SmallIcon=xT;exports.SmartTextInput=ioe;exports.StopImpersonateButton=QE;exports.StyledArrow=w5;exports.TabbedForm=nv;exports.TableCreateButton=iv;exports.TableFormIterator=Ef;exports.TableFormIteratorContext=sv;exports.TableFormIteratorItem=fA;exports.TableFormIteratorItemContext=ov;exports.TextField=M6;exports.TextInput=wr;exports.ThemeColor=yv;exports.ThemeContext=H0;exports.ThemeCustomizationProvider=Cv;exports.ThemeProvider=Eg;exports.ThemeToggler=aT;exports.TimeInput=coe;exports.Toolbar=ui;exports.Tooltip=uf;exports.TopToolbar=uT;exports.Transitions=ii;exports.WizardForm=hA;exports.createI18nProvider=ET;exports.createJsonI18nProvider=Fce;exports.getLocalizedValue=W0;exports.getPosition=S5;exports.getThemeColor=fn;exports.getThemeShadow=fa;exports.localizedValueHasAllLocales=wd;exports.localizedValueHasAtLeastOneLocale=s6;exports.onboardingModesSchema=hT;exports.onboardingTopicSchema=pT;exports.parseTime=c6;exports.useBreadcrumbs=US;exports.useGetChipValue=hv;exports.useGetLocalizedValue=Gte;exports.useI18nLanguages=Bce;exports.useI18nProvider=TT;exports.useIsEnabledSidebarFilter=$E;exports.useLayoutContext=av;exports.useLayoutDispatch=Qoe;exports.useLayoutDrawerState=ts;exports.useLayoutLogoState=yA;exports.useLayoutMediaState=or;exports.useLayoutNotificationsState=If;exports.useLayoutState=wa;exports.useLayoutThemeState=Joe;exports.useListViewContext=vv;exports.useLocalStorage=z0;exports.useLocalizedValue=Hte;exports.useMemoizedObject=d6;exports.useMenu=D0;exports.useMenuConfig=kl;exports.useMenuContext=bf;exports.useOnboardingDataProvider=gT;exports.useOnboardingTip=yT;exports.usePopoverState=ba;exports.useRefDimensions=qte;exports.useResourceDefaultValues=foe;exports.useResourceTitle=U0;exports.useRestartOnboarding=dle;exports.useSx=Br;exports.useSystemTheme=f6;exports.useTableFormIterator=dA;exports.useTableFormIteratorItem=cA;exports.useThemeConfig=Pn;exports.useThemeContext=G0;exports.useWizardFormContext=Tf;exports.uuid=Yee;exports.walkChildren=Sf;exports.withLayoutProvider=vA;
|
|
239
239
|
//# sourceMappingURL=react-admin.cjs.js.map
|