@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.
@@ -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})}(i5)),i5.exports}var a5={exports:{}},l5;function iZ(){return l5||(l5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,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})}(a5)),a5.exports}var c5={exports:{}},u5;function sZ(){return u5||(u5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,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})}(c5)),c5.exports}var d5={exports:{}},f5;function aZ(){return f5||(f5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,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})}(d5)),d5.exports}var p5={exports:{}},h5;function lZ(){return h5||(h5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,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})}(p5)),p5.exports}var g5={exports:{}},m5;function cZ(){return m5||(m5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,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})}(g5)),g5.exports}var v5={exports:{}},y5;function uZ(){return y5||(y5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,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})}(v5)),v5.exports}var b5={exports:{}},x5;function dZ(){return x5||(x5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(b5)),b5.exports}var C5={exports:{}},w5;function fZ(){return w5||(w5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),fn())})(tt,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})}(C5)),C5.exports}var S5={exports:{}},E5;function pZ(){return E5||(E5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Hs(),Gs(),Li(),fn())})(tt,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=[],A=0;A<256;A++)A<128?S[A]=A<<1:S[A]=A<<1^283;for(var O=0,k=0,A=0;A<256;A++){var M=k^k<<1^k<<2^k<<3^k<<4;M=M>>>8^M&255^99,l[O]=M,u[M]=O;var R=S[O],V=S[R],_=S[V],D=S[M]*257^M*16843008;d[O]=D<<24|D>>>8,f[O]=D<<16|D>>>16,g[O]=D<<8|D>>>24,h[O]=D;var D=_*16843009^V*65537^R*257^O*16843008;m[M]=D<<24|D>>>8,y[M]=D<<16|D>>>16,b[M]=D<<8|D>>>24,C[M]=D,O?(O=R^S[S[S[_^R]]],k^=S[S[k]]):O=k=1}})();var E=[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,A=S.words,O=S.sigBytes/4,k=this._nRounds=O+6,M=(k+1)*4,R=this._keySchedule=[],V=0;V<M;V++)if(V<O)R[V]=A[V];else{var _=R[V-1];V%O?O>6&&V%O==4&&(_=l[_>>>24]<<24|l[_>>>16&255]<<16|l[_>>>8&255]<<8|l[_&255]):(_=_<<8|_>>>24,_=l[_>>>24]<<24|l[_>>>16&255]<<16|l[_>>>8&255]<<8|l[_&255],_^=E[V/O|0]<<24),R[V]=R[V-O]^_}for(var D=this._invKeySchedule=[],G=0;G<M;G++){var V=M-G;if(G%4)var _=R[V];else var _=R[V-4];G<4||V<=4?D[G]=_:D[G]=m[l[_>>>24]]^y[l[_>>>16&255]]^b[l[_>>>8&255]]^C[l[_&255]]}}},encryptBlock:function(S,A){this._doCryptBlock(S,A,this._keySchedule,d,f,g,h,l)},decryptBlock:function(S,A){var O=S[A+1];S[A+1]=S[A+3],S[A+3]=O,this._doCryptBlock(S,A,this._invKeySchedule,m,y,b,C,u);var O=S[A+1];S[A+1]=S[A+3],S[A+3]=O},_doCryptBlock:function(S,A,O,k,M,R,V,_){for(var D=this._nRounds,G=S[A]^O[0],K=S[A+1]^O[1],Y=S[A+2]^O[2],Z=S[A+3]^O[3],z=4,J=1;J<D;J++){var U=k[G>>>24]^M[K>>>16&255]^R[Y>>>8&255]^V[Z&255]^O[z++],se=k[K>>>24]^M[Y>>>16&255]^R[Z>>>8&255]^V[G&255]^O[z++],Q=k[Y>>>24]^M[Z>>>16&255]^R[G>>>8&255]^V[K&255]^O[z++],W=k[Z>>>24]^M[G>>>16&255]^R[K>>>8&255]^V[Y&255]^O[z++];G=U,K=se,Y=Q,Z=W}var U=(_[G>>>24]<<24|_[K>>>16&255]<<16|_[Y>>>8&255]<<8|_[Z&255])^O[z++],se=(_[K>>>24]<<24|_[Y>>>16&255]<<16|_[Z>>>8&255]<<8|_[G&255])^O[z++],Q=(_[Y>>>24]<<24|_[Z>>>16&255]<<16|_[G>>>8&255]<<8|_[K&255])^O[z++],W=(_[Z>>>24]<<24|_[G>>>16&255]<<16|_[K>>>8&255]<<8|_[Y&255])^O[z++];S[A]=U,S[A+1]=se,S[A+2]=Q,S[A+3]=W},keySize:256/32});r.AES=i._createHelper(I)}(),n.AES})}(S5)),S5.exports}var T5={exports:{}},A5;function hZ(){return A5||(A5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Hs(),Gs(),Li(),fn())})(tt,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 E=this._key,I=E.words,S=[],A=0;A<56;A++){var O=u[A]-1;S[A]=I[O>>>5]>>>31-O%32&1}for(var k=this._subKeys=[],M=0;M<16;M++){for(var R=k[M]=[],V=f[M],A=0;A<24;A++)R[A/6|0]|=S[(d[A]-1+V)%28]<<31-A%6,R[4+(A/6|0)]|=S[28+(d[A+24]-1+V)%28]<<31-A%6;R[0]=R[0]<<1|R[0]>>>31;for(var A=1;A<7;A++)R[A]=R[A]>>>(A-1)*4+3;R[7]=R[7]<<5|R[7]>>>27}for(var _=this._invSubKeys=[],A=0;A<16;A++)_[A]=k[15-A]},encryptBlock:function(E,I){this._doCryptBlock(E,I,this._subKeys)},decryptBlock:function(E,I){this._doCryptBlock(E,I,this._invSubKeys)},_doCryptBlock:function(E,I,S){this._lBlock=E[I],this._rBlock=E[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 A=0;A<16;A++){for(var O=S[A],k=this._lBlock,M=this._rBlock,R=0,V=0;V<8;V++)R|=g[V][((M^O[V])&h[V])>>>0];this._lBlock=M,this._rBlock=k^R}var _=this._lBlock;this._lBlock=this._rBlock,this._rBlock=_,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),E[I]=this._lBlock,E[I+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function y(E,I){var S=(this._lBlock>>>E^this._rBlock)&I;this._rBlock^=S,this._lBlock^=S<<E}function b(E,I){var S=(this._rBlock>>>E^this._lBlock)&I;this._lBlock^=S,this._rBlock^=S<<E}r.DES=a._createHelper(m);var C=l.TripleDES=a.extend({_doReset:function(){var E=this._key,I=E.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(E,I){this._des1.encryptBlock(E,I),this._des2.decryptBlock(E,I),this._des3.encryptBlock(E,I)},decryptBlock:function(E,I){this._des3.decryptBlock(E,I),this._des2.encryptBlock(E,I),this._des1.decryptBlock(E,I)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=a._createHelper(C)}(),n.TripleDES})}(T5)),T5.exports}var I5={exports:{}},O5;function gZ(){return O5||(O5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Hs(),Gs(),Li(),fn())})(tt,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,E=g[C>>>2]>>>24-C%4*8&255;b=(b+m[y]+E)%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})}(I5)),I5.exports}var P5={exports:{}},j5;function mZ(){return j5||(j5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Hs(),Gs(),Li(),fn())})(tt,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 E=m.words,I=E[0],S=E[1],A=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,O=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,k=A>>>16|O&4294901760,M=O<<16|A&65535;C[0]^=A,C[1]^=k,C[2]^=O,C[3]^=M,C[4]^=A,C[5]^=k,C[6]^=O,C[7]^=M;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,E=b>>>16,I=((C*C>>>17)+C*E>>>15)+E*E,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})}(P5)),P5.exports}var k5={exports:{}},M5;function vZ(){return M5||(M5=1,function(e,t){(function(n,r,o){e.exports=r(rt(),Hs(),Gs(),Li(),fn())})(tt,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 E=m.words,I=E[0],S=E[1],A=(I<<8|I>>>24)&16711935|(I<<24|I>>>8)&4278255360,O=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,k=A>>>16|O&4294901760,M=O<<16|A&65535;b[0]^=A,b[1]^=k,b[2]^=O,b[3]^=M,b[4]^=A,b[5]^=k,b[6]^=O,b[7]^=M;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,E=b>>>16,I=((C*C>>>17)+C*E>>>15)+E*E,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})}(k5)),k5.exports}(function(e,t){(function(n,r,o){e.exports=r(rt(),xd(),ZX(),QX(),Hs(),Gs(),Jg(),B3(),JX(),V3(),qX(),$X(),eZ(),qg(),tZ(),Li(),fn(),nZ(),rZ(),oZ(),iZ(),sZ(),aZ(),lZ(),cZ(),uZ(),dZ(),fZ(),pZ(),hZ(),gZ(),mZ(),vZ())})(tt,function(n){return n})})(XX);var _5=(e=>(e.GOOGLE="google",e))(_5||{});function yZ(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 F5=P.createContext(null);function bZ({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:o}){const i=yZ({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),a=P.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:i}),[e,i]);return P.createElement(F5.Provider,{value:a},o)}function xZ(){const e=P.useContext(F5);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function CZ(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const wZ={large:40,medium:32,small:20};function SZ({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:E}=xZ(),I=P.useRef(e);I.current=e;const S=P.useRef(t);S.current=t;const A=P.useRef(r);return A.current=r,P.useEffect(()=>{var O,k,M,R,V,_,D,G,K;if(E)return(M=(k=(O=window==null?void 0:window.google)===null||O===void 0?void 0:O.accounts)===null||k===void 0?void 0:k.id)===null||M===void 0||M.initialize({client_id:C,callback:Y=>{var Z;if(!(Y!=null&&Y.credential))return(Z=S.current)===null||Z===void 0?void 0:Z.call(S);const{credential:z,select_by:J}=Y;I.current({credential:z,clientId:CZ(Y),select_by:J})},...y}),(_=(V=(R=window==null?void 0:window.google)===null||R===void 0?void 0:R.accounts)===null||V===void 0?void 0:V.id)===null||_===void 0||_.renderButton(b.current,{type:o,theme:i,size:a,text:l,shape:u,logo_alignment:d,width:f,locale:g,click_listener:h}),n&&((K=(G=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||G===void 0?void 0:G.id)===null||K===void 0||K.prompt(A.current)),()=>{var Y,Z,z;n&&((z=(Z=(Y=window==null?void 0:window.google)===null||Y===void 0?void 0:Y.accounts)===null||Z===void 0?void 0:Z.id)===null||z===void 0||z.cancel())}},[C,E,n,o,i,a,l,u,d,f,g]),P.createElement("div",{...m,ref:b,style:{height:wZ[a],...m==null?void 0:m.style}})}function B5({setLoading:e}){const n=T.useTheme().palette.mode==="dark",r=ie.useAuthProvider(),o=ie.useNotify(),i=dt.useNavigate(),[a,l]=P.useState(395),u=P.useRef(null);P.useEffect(()=>{const g=Qe.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:_5.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(T.Box,{sx:{colorScheme:n?"light":"dark",width:"100%"},ref:u,children:p.jsx(SZ,{theme:"outline",width:a,onSuccess:d,onError:f})})}function EZ({label:e="ra.auth.sign_in",...t}){const n=H.useRecordContext(),[r,o]=P.useState(!1),i=H.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(H.Button,{disabled:r||i.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:p.jsx(an.VpnKey,{})})}const TZ=rl(H.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function $g({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=p.jsx(Qo,{children:p.jsx(H.SaveButton,{type:"button"})}),secondary:i=p.jsx(Go,{children:p.jsx(Ri,{})}),sx:a,...l}){const u=Yg(e),d=H.useRecordContext(),f=Wp();return p.jsx(Fn,{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(TZ,{toolbar:o,...l})})}const D5={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}`)}},R5=P.createContext(D5);function AZ(e){const[t,n]=P.useState(D5);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(R5.Provider,{value:{...t,openDialog:r,closeDialog:o,getCurrentDialog:i},children:e.children})}function L5(){const e=P.useContext(R5);if(e===void 0)throw new Error("useAppState must be used within an AppStateProvider");return e}function e0(){return L5()}function N5({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:i,divider:a=!1,fullWidth:l,...u}){const d=Xt.useTheme(),{getCurrentDialog:f}=e0(),{source:g,resource:h,isRequired:m}=u,{getFieldState:y,formState:b}=ln.useFormContext(),{error:C}=y(g,b),E=f();return p.jsxs(T.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(T.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(H.FieldTitle,{label:e,source:g,resource:E||h,isRequired:m})}),P.isValidElement(t)?P.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r?p.jsx(T.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!C,children:r}):null]})}const IZ=me(H.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 OZ({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...i}){return p.jsx(N5,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:i==null?void 0:i.fullWidth,children:p.jsx(IZ,{source:n,label:!1,...i})})}function PZ({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:p.jsxs(Go,{children:[e?p.jsx(H.EditButton,{}):null,t?p.jsx(Ri,{}):null,n?p.jsx(H.CloneButton,{}):null]})}const V5=me("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),jZ=me("ul")({display:"inline-block"});function kZ(e){var f;const{className:t,emptyText:n,source:r,title:o,...i}=e,a=ie.useRecordContext(e),l=Qe.get(a,r),u=ie.useTranslate();if(!l)return n?p.jsx(T.Typography,{component:"span",variant:"body2",className:t,...i,children:n?u(n,{_:n}):null}):p.jsx(V5,{className:t,...i});if(Array.isArray(l))return p.jsx(jZ,{className:t,...i,children:l.map((g,h)=>{var y;const m=o instanceof String?(y=Qe.get(g,o))==null?void 0:y.toString():o;return p.jsx("li",{children:m},h)})});const d=o instanceof String?(f=Qe.get(a,o))==null?void 0:f.toString():o;return p.jsx(V5,{className:t,...i,children:d})}function W5({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",resource:i,...a}){const[l,u]=P.useState(null),d=H.useRecordContext(a),f=H.useDataProvider(),g=H.useResourceContext(),h=H.useNotify(),m=P.useCallback(async C=>{C.preventDefault(),C.stopPropagation(),h("ra.notification.download",{type:"info"});const E=Qe.get(d,a==null?void 0:a.source),I=(i||g).replace("entities/",""),S=e||(d==null?void 0:d.id),A=await f.getFile(`/attachments/${I}/${S}/${t||(a==null?void 0:a.source)}/${(E==null?void 0:E.id)||(d==null?void 0:d.id)}`),O=document.createElement("a");O.href=A,O.download=Qe.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)||Qe.get(d,a==null?void 0:a.source),[a==null?void 0:a.title]:(d==null?void 0:d.title)||Qe.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=H.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(kZ,{...a,disabled:n,record:y,onClick:m,title:p.jsxs(T.Box,{sx:{cursor:"pointer"},children:[p.jsx(T.Typography,{variant:"subtitle1",children:Qe.get(y,(a==null?void 0:a.title)||(a==null?void 0:a.source))}),p.jsxs(T.Typography,{variant:"caption",color:"secondary",children:[Qe.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 MZ=me(H.ImageField,{slot:"root"})(()=>({}));function z5(e){const t=`_${e==null?void 0:e.source}`;return p.jsx(MZ,{...e,source:t})}function U5({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=H.useRecordContext(),d=o||u;return p.jsx(z5,{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 _Z={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Tn,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])+"]"}}})})(_Z);var FZ={exports:{}};(function(e,t){(function(n,r){e.exports=r(c3)})(Tn,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})})(FZ);var H5={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Tn,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,E=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,A=0;A<S;A+=1){var O=I[A];O.d&&(y=h?o(d).diff(g,O.d,!0):g.diff(d,O.d,!0));var k=(n.rounding||Math.round)(Math.abs(y));if(C=y>0,k<=O.r||!O.r){k<=1&&A>0&&(O=I[A-1]);var M=E[O.l];m&&(k=m(""+k)),b=typeof M=="string"?M.replace("%d",k):M(k,f,O.l,C);break}}if(f)return b;var R=C?E.future:E.past;return typeof R=="function"?R(b):R.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)}}})})(H5);var BZ=H5.exports;const DZ=Wr(BZ);Fr.extend(DZ);function G5(e){const t=H.useRecordContext(e),[n]=H.useLocaleState(),r=P.useMemo(()=>Fr(Qe.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(H.DateField,{record:t,source:e.source,showTime:!0}),p.jsx("br",{}),p.jsx(T.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const RZ=me(H.DateField,{slot:"Root"})(()=>({}));function LZ({variant:e="body1",...t}){return p.jsx(RZ,{...t,variant:e})}const NZ=me(H.EmailField,{slot:"Root"})(()=>({}));function VZ({variant:e="body1",...t}){return p.jsx(NZ,{...t,variant:e})}const WZ=me(H.FileField,{slot:"root"})(()=>({}));function Y5({...e}){const t=H.useRecordContext(e),n=P.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=Qe.get(t,`_${e==null?void 0:e.source}`,Qe.get(t,e==null?void 0:e.source)),i=Qe.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(WZ,{...e,record:t,onClick:n})}function zZ({variant:e="body1",...t}){return p.jsx(H.FunctionField,{...t,variant:e})}const UZ=me(H.TextField,{slot:"Root"})(()=>({}));function K5({variant:e="body1",...t}){return p.jsx(UZ,{...t,variant:e})}function HZ(e){const t=T.useTheme(),n=ie.useLocales(),{source:r=""}=e,i=ie.useRecordContext(e)[r],a=!md(i,n),l=_r(e,{flex:1}),[u]=ie.useLocaleState(),d=P.useMemo(()=>a?p.jsx(He.FlagFilled,{style:{color:t.palette.warning.main}}):p.jsx(He.FlagOutlined,{}),[a,t.palette.warning.main]),f=P.useMemo(()=>p.jsx(T.Stack,{children:ae.map(n,(g,h)=>p.jsx(T.Typography,{children:`${g.locale.toUpperCase()}: ${(i??{})[g.locale]??""}`},h))}),[i,n]);return p.jsx(ku,{title:f,arrow:!1,children:p.jsxs(T.Stack,{alignItems:"center",direction:"row",gap:1,children:[d,p.jsx(K5,{...e,source:`${r}.${u}`,sx:l})]})})}const GZ=me("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 YZ({source:e,defaultValue:t="&nbsp;",...n}){const r=H.useRecordContext(n),o=Qe.get(r,e,t);return p.jsx(T.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})}function KZ({title:e,children:t}){return t==null?null:typeof e=="string"||e===!0?p.jsx(T.Tooltip,{title:e,placement:"top",children:t}):t}function XZ({label:e,source:t,defaultValue:n="&nbsp;",children:r=p.jsx(YZ,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...i}){const a=P.Children.only(r),{getCurrentDialog:l}=L5(),u=H.useRecordContext(i),d=H.useResourceContext(i),f=l(),g=P.useMemo(()=>o===!1?!1:typeof o=="function"?o(u):typeof o=="string"?Qe.get(u,o,o):o,[u,o]),h=_r(i,{width:i!=null&&i.fullWidth?"100%":"auto"});return p.jsx(KZ,{title:g,children:p.jsxs(p.Fragment,{children:[p.jsx(T.InputLabel,{sx:{pt:1},children:p.jsx(H.FieldTitle,{label:e,source:t,resource:f||d})}),p.jsx(GZ,{...i,children:P.isValidElement(a)?P.cloneElement(a,{...a.props,source:t,record:u,defaultValue:n,resource:f||d,sx:h}):null})]})})}function ZZ({children:e=null,className:t=""}){return p.jsx("div",{className:t,children:e})}const QZ=rl(ZZ,{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 X5(e){return p.jsx(QZ,{...e,children:p.jsx(H.ReferenceManyField,{pagination:p.jsx(H.Pagination,{}),...e})})}function JZ({source:e,...t}){const n=H.useRecordContext(t),r=Qe.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(T.Typography,{component:"span",variant:"body1",...t,children:l})}function yn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:i,divider:a=!1,...l}){const u=St(),{getCurrentDialog:d}=e0(),{source:f,resource:g,isRequired:h,chip:m}=l,{fieldState:{invalid:y}}=H.useInput(l),b=d();return p.jsxs(T.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(T.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(H.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(T.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:y===!0,children:r}):null]})}function qZ(e){return e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{}}const $Z=me(H.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}},...qZ(e)}));function eQ({children:e=p.jsx(W5,{title:"name",source:"path"}),multiple:t=!1,disabled:n=!1,type:r="attachment",...o}){const i=H.useRecordContext(o),a=o==null?void 0:o.source,l=i==null?void 0:i.id;return H.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),p.jsx(yn,{...o,disabled:n,children:p.jsx($Z,{type:r,multiple:t,disabled:n,children:P.cloneElement(e,{entityId:l,property:a,...e.props})})})}const tQ=me(H.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 nQ({size:e="small",...t}){return p.jsx(yn,{...t,children:p.jsx(tQ,{size:e})})}const rQ=me(H.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function oQ({size:e="small",...t}){const{perPage:n,...r}=t;return p.jsx(yn,{...r,children:p.jsx(rQ,{size:e})})}const iQ=me(H.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function sQ({...e}){const t=Xt.useTheme();return p.jsx(yn,{...e,children:p.jsx(iQ,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const aQ=4,lQ=me(H.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function cQ(e){const[t,n]=P.useState(""),r=P.useCallback(o=>{const i=o.target.value;Fr(i).year().toString().length>aQ?o.target.value=t:n(i)},[t]);return p.jsx(yn,{...e,children:p.jsx(lQ,{...e,onInput:r})})}const uQ=me(H.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function dQ(e){return p.jsx(yn,{...e,children:p.jsx(uQ,{})})}const fQ=me(H.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 pQ({children:e=p.jsx(Y5,{source:"",title:""}),title:t,...n}){const r=ln.useWatch({name:n.source}),o=H.useRecordContext(n),{source:i}=n,a=P.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const l=Qe.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(yn,{...n,children:p.jsx(fQ,{children:P.cloneElement(e,{...e.props,title:t||i,source:i,record:{...o,[i]:(r==null?void 0:r.title)||Qe.get(o,i),[`_${i}`]:(r==null?void 0:r.src)||Qe.get(o,`_${i}`),[t||i]:a}})})})}function hQ({children:e=p.jsx(U5,{}),title:t,multiple:n=!1,...r}){const o=ln.useWatch({name:r.source}),i=H.useRecordContext(r),{source:a}=r;return H.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),p.jsx(yn,{...r,multiple:n,children:p.jsx(H.ImageInput,{accept:"image/*",children:P.cloneElement(e,{...e.props,title:t,source:a,record:{...i,[a]:(o==null?void 0:o.title)||Qe.get(i,a),[`_${a}`]:(o==null?void 0:o.src)||Qe.get(i,`_${a}`)}})})})}function xr(e){return p.jsx(yn,{...e,children:p.jsx(H.TextInput,{})})}const gQ={vertical:"bottom",horizontal:"right"},mQ={vertical:"top",horizontal:"right"};function vQ({requiredAtLeastOneLocale:e,requiredLocale:t,validate:n,required:r,...o}){const{source:i}=o,a=ie.useLocales(),l=P.useCallback((k="ra.validation.required",M="ra.validation.required_locale")=>R=>{if(e&&!t&&!a3(R,a))return k;if(t&&(!ae.has(R,t)||ae.isEmpty(ae.get(R,t))))return{message:M,args:{locale:t}};if(!e&&r&&!md(R,a))return k},[e,t,a,r]),u=P.useMemo(()=>ie.composeValidators(n,l()),[n,l]),{fieldState:d}=ie.useInput({...o,validate:u}),{error:f}=d,g=ln.useWatch({name:i}),h=!md(g,a),[m]=ie.useLocaleState(),[y,b]=P.useState(m),[C,E]=P.useState(null),I=!!C,S=P.useCallback(k=>E(I?null:k.currentTarget),[I,E]),A=P.useCallback(()=>E(null),[E]),O=P.useMemo(()=>ae.map(a,(k,M)=>p.jsx(T.MenuItem,{onClick:()=>{b(k.locale),A()},children:p.jsx(T.ListItemText,{primary:`${k.locale.toUpperCase()}: ${(g??{})[k.locale]??""}`})},M)),[a,b,A,g]);return p.jsx(yn,{...o,validate:u,helperText:f!=null&&f.message?p.jsx(ie.ValidationError,{error:f==null?void 0:f.message}):o==null?void 0:o.helperText,children:p.jsx(p.Fragment,{children:p.jsxs(T.Box,{flex:1,children:[ae.map(a,(k,M)=>p.jsx(xr,{...o,source:`${i}.${k.locale}`,sx:{width:"100%",display:k.locale===y?"inline-flex":"none"},label:!1,helperText:!1,required:!1,InputProps:{endAdornment:p.jsx(T.Chip,{label:p.jsx(T.Typography,{variant:"button",children:y}),size:"small",onClick:S,color:h?"warning":void 0})}},M)),p.jsx(T.Menu,{anchorEl:C,open:I,anchorOrigin:gQ,transformOrigin:mQ,onClose:A,children:O})]})})})}const yQ=me(H.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function bQ(e){return p.jsx(yn,{...e,children:p.jsx(yQ,{})})}const xQ=me(H.RadioButtonGroupInput,{slot:"root"})(()=>({marginTop:"0 !important","& .MuiFormControlLabel-root":{marginLeft:-8}}));function CQ(e){return p.jsx(yn,{...e,children:p.jsx(xQ,{})})}function wQ({source:e,minWidth:t=300,children:n}){const r=H.useResourceContext(),o=H.useRecordContext(),[i,a]=P.useState(Qe.get(o,e,"")),[l,u]=P.useState(!1),d=P.useCallback(y=>a(y.target.value),[]),f=H.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(()=>{Qe.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(Qe.get(o,e)),[o,e]),n?P.cloneElement(n,{...n.props,source:e,value:i,onChange:m}):p.jsx(T.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 SQ({children:e,...t}){const n=P.Children.only(e);return p.jsx(H.ReferenceArrayInput,{...t,children:P.cloneElement(n,{...t,source:n.props.source||t.source})})}function EQ({children:e,...t}){const n=P.Children.only(e);return p.jsx(H.ReferenceInput,{...t,children:P.cloneElement(n,{...t,source:n.props.source||t.source})})}function TQ({reference:e,target:t,children:n,filters:r,actions:o,...i}){return p.jsx(H.ResourceContextProvider,{value:e,children:p.jsx(X5,{perPage:5,pagination:p.jsx(H.Pagination,{}),...i,reference:e,target:t,children:p.jsxs(p.Fragment,{children:[p.jsx(H.ListToolbar,{filters:r,actions:o}),n]})})})}const AQ=me(H.SearchInput,{slot:"root"})(()=>({}));function IQ(e){return p.jsx(AQ,{...e})}const OQ=me(H.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 PQ({optionText:e="name",optionValue:t="id",...n}){return p.jsx(yn,{...n,children:p.jsx(OQ,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const jQ=me(H.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function kQ(e){return p.jsx(yn,{...e,children:p.jsx(jQ,{})})}function MQ({multiline:e=!1,...t}){var u,d;const n=H.useTranslate(),r=H.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(d=(u=ln.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(xr,{...t,validate:a,helperText:i,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function _Q(e){if(!e)return"";const t=u3(e);return t?t.format("HH:mm"):""}function FQ(e){return e}const BQ=me(H.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function DQ({parse:e=FQ,format:t=_Q,...n}){return p.jsx(yn,{...n,children:p.jsx(BQ,{parse:e,format:t,...n})})}function t0({onSuccess:e,firstAccess:t}){const{spacing:n}=An(),[r,o]=P.useState(!1),i=ie.useAuthProvider(),a=ie.useTranslate(),l=ie.useNotify(),u=mi.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(ie.ResourceContextProvider,{value:"user/change-password",children:p.jsx(ie.EditContextProvider,{value:{record:{},resource:"user/change-password",save:d},children:p.jsx($g,{onSubmit:d,toolbar:p.jsx(Qo,{children:p.jsx(H.SaveButton,{disabled:r})}),children:p.jsxs(T.Grid,{container:!0,spacing:n,children:[t===!0&&p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Alert,{severity:"warning",children:[p.jsx(T.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),p.jsx(T.Grid,{item:!0,xs:12,children:p.jsx(xr,{source:"oldPassword",type:"password",validate:ie.required()})}),p.jsx(T.Grid,{item:!0,xs:12,children:p.jsx(xr,{source:"newPassword",type:"password",validate:ie.required()})})]})})})})}const Z5=P.createContext({});function RQ(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=H.useResourceContext(),o=H.useDataProvider(),{search:i}=gi.useLocation(),a=`${r}/new`,l=P.useCallback(()=>{if(!t||!ae.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(()=>ae.chain(n).extend({queryKey:[r,i],queryFn:l}).value(),[r,i,l,n]),{data:d,isLoading:f}=mi.useQuery(u),g=ae.omit(e,["useDefaults"]);return f?p.jsx(T.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:p.jsx(T.CircularProgress,{})}):p.jsx(Z5.Provider,{value:d??{},children:p.jsx(H.Create,{...g,children:e.children})})}const LQ=me(RQ,{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 NQ(){return P.useContext(Z5)}const VQ=me(H.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 WQ(e){return p.jsx(VQ,{...e})}const zQ=me(T.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),UQ=me(T.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function HQ({title:e,divider:t=!0,variant:n="h5"}){const r=H.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(zQ,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t?p.jsx(UQ,{}):null]})}function n0(e){return e.id??e.label}function Q5(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function GQ(e){return ae.map(e,"id")}function Cd(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function J5(e,t){const n=e!==void 0?Cd(e):0;return ae.chain(t).filter(o=>e!==void 0?Q5(e,o.id):!0).filter(o=>Cd(o.id)===n+1).value()}function YQ(e,t){var i;const n=ae.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ae.extend(n,{formRootPath:o});case"setSyncWithLocation":return ae.extend(n,{syncWithLocation:o});case"setErrorCount":return ae.extend(n,{errorCount:o});case"setActiveItem":return ae.includes(GQ(e.items),o)?ae.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return ae.extend(n,{items:ae.chain(n.items).clone().reject(l=>l.id===a).concat([o]).orderBy(l=>l.index).value()})}case"removeItem":{const a=ae.isString(o)?o:o.id,l=ae.chain(n.items).clone().reject(u=>u.id===a).value();return ae.extend(n,{items:l}),n.activeItem===a&&ae.extend(n,{activeItem:((i=ae.first(l))==null?void 0:i.id)??void 0}),n}default:return n}}const KQ={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},q5=P.createContext(void 0);function $5(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=gi.useLocation(),[i,a]=P.useReducer(YQ,ae.cloneDeep(KQ)),{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=ae.chain(f).map(m=>gi.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(/^\/?/),"");ae.isEmpty(g)&&(g=((f=ae.chain(u).filter(h=>J5(h.id,u).length===0).orderBy([h=>Cd(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(q5.Provider,{value:d,children:e.children})}function eS(){const e=P.useContext(q5);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Al(){return eS().state}function r0(){return eS().dispatch}function tS(){return Al().formRootPath}function nS(){return Al().activeItem}function rS(){return Al().items}function oS(){return Al().syncWithLocation}function iS(){return Al().errorCount}function sS(){const e=r0();return P.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function aS(){const e=r0();return P.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function lS(){const e=r0();return P.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}const XQ=me(T.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 cS(e){const{spacing:t}=An(),{spacing:n=t}=e,r=ae.omit(e,["spacing"]);return p.jsx(H.Form,{...r,className:"LongFormView",children:p.jsx(XQ,{container:!0,spacing:n*2,children:e.children})})}function uS(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ae.omit(e,["disposition"]);return p.jsx(T.Grid,{...n,item:!0,...t,children:e.children})}function dS(e){const t=nS();return t===void 0?!1:e===t||Q5(e,t)}function fS(e){const t=rS();return P.useMemo(()=>J5(e,t),[t,e])}function ZQ(){const e=tS(),{search:t}=gi.useLocation(),n=gi.useNavigate();return P.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n,t])}function pS(){const e=fS();return p.jsx(T.Card,{variant:"outlined",children:p.jsx(T.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:ae.map(e,(t,n)=>p.jsx(o0,{...t},n))})})}function o0(e){const t=ie.useTranslate()??ae.identity,n=hS(e),{selected:r,label:o,icon:i,onClick:a,badge:l,items:u,isGroup:d,level:f,errors:g=0}=n,{spacing:h}=An(),[m,y]=P.useState(r),b=P.useCallback(I=>{y(!m),a(I)},[a,m]),C=i!==void 0,E=ae.omit(e,["label","icon","selected","badge"]);return P.useEffect(()=>{r&&!m&&y(r)},[r,m,y]),p.jsxs(p.Fragment,{children:[p.jsx(T.ListItem,{...E,disablePadding:!0,children:p.jsxs(T.ListItemButton,{selected:r?!d:null,onClick:b,sx:{pl:h*f},children:[C?p.jsx(T.ListItemIcon,{children:i}):null,p.jsx(T.ListItemText,{inset:!C,primary:g===0?t(o):p.jsx(T.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),l?p.jsx(T.ListItemAvatar,{children:p.jsx(pu,{type:"filled",size:"xs",color:l.color??"default",children:l.content})}):null,d?m?p.jsx(an.ExpandLess,{}):p.jsx(an.ExpandMore,{}):null]})}),d?p.jsx(T.Collapse,{in:m,timeout:"auto",children:p.jsx(T.List,{children:ae.map(u,(I,S)=>p.jsx(o0,{...I},S))})}):null]})}function hS(e){const{id:t}=e,n=dS(t),r=Cd(t),o=ZQ(),i=oS(),a=sS(),l=fS(t),u=!ae.isEmpty(l),d=P.useCallback(g=>{u||(i?o(e.id):a(e.id)),ae.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 QQ=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},gS=e=>e.firstChild?e.firstChild.offsetParent===e:!0,JQ=(e,t)=>{let n=e,r=0;gS(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},qQ=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Il=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Il="sticky":CSS.supports("position","-webkit-sticky")&&(Il="-webkit-sticky"));var wd=!1;try{const e=Object.defineProperty({},"passive",{get(){wd={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var i0=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,wd),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}},$Q=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}},eJ=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:i}=n,a=QQ(e);let l=!1;const u=()=>{l||requestAnimationFrame(()=>{const M=g();M!==S&&A(M),l=!1}),l=!0};let d=a===window?window.scrollY:a.scrollTop;const f=M=>{const{offsetTop:R,height:V}=m,{naturalTop:_}=C,{height:D}=E;return M+R+V>=_+D+I+o},g=()=>{const{height:M}=m,{height:R}=E;return R+i+o<=M?3:f(d)?1:2},h=a!==window&&gS(a),m=i0({el:a,onChange:u,unsubs:t,measure:({height:M,top:R})=>({height:M,offsetTop:h?R:0})}),y=qQ(e),b=y===window?{top:0,bottom:0}:$Q(y),C=i0({el:y,onChange:u,unsubs:t,measure:({height:M})=>({height:M-b.top-b.bottom,naturalTop:y===window?0:JQ(y,a)+b.top+m.offsetTop})}),E=i0({el:e,onChange:u,unsubs:t,measure:({height:M})=>({height:M})});let I=0,S=g();const A=M=>{const R=S;if(S=M,R===2&&(I=-1),M===3){e.style.position=Il,r?e.style.bottom=`${o}px`:e.style.top=`${i}px`;return}const{height:V,offsetTop:_}=m,{height:D,naturalTop:G}=C,{height:K}=E;if(M===2)if(e.style.position="relative",I=R===0?Math.max(0,_+d-G+i):Math.max(0,_+d+V-(G+K+o)),r){const Y=Math.max(0,D-K-I);e.style.bottom=`${Y}px`}else e.style.top=`${I}px`;else e.style.position=Il,M===1?r?e.style.bottom=`${o}px`:e.style.top=`${V-K-o}px`:r?e.style.bottom=`${V-K-o}px`:e.style.top=`${i}px`};A(S);const O=M=>{if(M===d)return;const R=M-d;if(d=M,S===3)return;const{offsetTop:V,height:_}=m,{naturalTop:D,height:G}=C,{height:K}=E;if(R>0)if(S===0){if(M+V+i>D){const Y=Math.max(0,V+d-D+i);M+V+_<=D+K+Y+o?A(2):A(1)}}else S===2&&f(M)&&A(1);else if(S===1){if(V+M+_<D+G+o){const Y=Math.max(0,V+d+_-(D+K+o));V+M+i>=D+Y?A(2):A(0)}}else S===2&&V+M+i<D+I&&A(0)},k=a===window?()=>O(window.scrollY):()=>O(a.scrollTop);a.addEventListener("scroll",k,wd),a.addEventListener("mousewheel",k,wd),t.push(()=>a.removeEventListener("scroll",k),()=>a.removeEventListener("mousewheel",k))},tJ=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=P.useState(null);return P.useEffect(()=>{if(!r||!Il)return;const i=[];return eJ(r,i,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{i.forEach(a=>a())}},[r,t,e,n]),o},nJ=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:i,style:a}=e,l=tJ({offsetTop:t,offsetBottom:n,bottom:r});return p.jsx("div",{className:i,style:a,ref:l,children:o})},rJ=nJ,mS=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(mS||{});function vS(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ae.omit(e,["sticky","disposition","spacing"]),i=t?rJ:T.Box,a=P.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return p.jsx(T.Grid,{...o,item:!0,...n,children:p.jsx(i,{...a,children:p.jsx(T.Stack,{spacing:r,children:e.children})})})}function yS(e){return p.jsx(p.Fragment,{children:e.children})}function bS(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)===yS){const{position:i}=o.props;switch(i){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function xS(e){const{errors:t}=ln.useFormState(),n=iS(),{label:r,icon:o,badge:i,index:a=0,children:l}=e,u=n0(e),d=aS(),f=lS(),g=dS(u),h=[];n&&(e.sources!==void 0?h.push(...e.sources):vd(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=ae.chain(h).uniq().map(y=>ae.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(T.Box,{display:g?"unset":"none",children:e.children})}function CS(e){const t=s0(e),n=n0(e);return p.jsx(xS,{...e,id:n,children:P.Children.map(t,r=>{const o=n0(r.props);return P.cloneElement(r,{id:`${n}.${o}`})})})}function wS(e){return p.jsx(xS,{...e})}function s0(e){const{children:t}=e;return P.useMemo(()=>ae.chain(P.Children.toArray(t)).filter(r=>P.isValidElement(r)&&((r==null?void 0:r.type)===wS||(r==null?void 0:r.type)===CS)).map((r,o)=>P.cloneElement(r,{index:o})).value(),[t])}function oJ(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ae.pick(e,["syncWithLocation","errorCount"]),i=ae.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:l}=bS(e),u=s0(e);return p.jsx($5,{...o,children:p.jsxs(cS,{...i,spacing:r,children:[p.jsxs(vS,{disposition:t,spacing:r,children:[a,p.jsx(pS,{}),l]}),p.jsx(uS,{disposition:n,children:u})]})})}const Vt=oJ;Vt.BaseForm=cS,Vt.Content=uS,Vt.Provider=$5,Vt.useItems=rS,Vt.useSyncWithLocation=oS,Vt.useErrorCount=iS,Vt.useFormRootPath=tS,Vt.useActiveItem=nS,Vt.useSetActiveItem=sS,Vt.useAddItem=aS,Vt.useRemoveItem=lS,Vt.Sidebar=vS,Vt.SidebarSection=yS,Vt.SidebarSectionPosition=mS,Vt.useSidebarChildren=bS,Vt.NavMenu=pS,Vt.NavMenuItem=o0,Vt.useNavMenuItem=hS,Vt.Tab=wS,Vt.Group=CS,Vt.useBaseItemChildren=s0;const iJ=me(H.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 sJ(e){return p.jsx(iJ,{...e})}const aJ=me(H.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 lJ(e){return p.jsx(aJ,{...e})}const cJ=rl(H.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function uJ({children:e}){return p.jsx(p.Fragment,{children:e})}function a0(e){const{title:t,modal:n,content:r,subheader:o,secondary:i=p.jsx(Go,{children:p.jsx(Ri,{})}),sx:a,noPadding:l,toolbar:u=p.jsx(Qo,{children:p.jsx(H.SaveButton,{type:"button"})}),...d}=e,f=Yg(t),g=T.useTheme();return p.jsx(Fn,{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(cJ,{toolbar:u,component:l?uJ:void 0,...d})})}function dJ({children:e,...t}){return p.jsx(H.TabbedForm.Tab,{...t,children:p.jsx(T.Box,{sx:{width:"100%",p:2.5},children:e})})}a0.Tab=H.TabbedForm.Tab,a0.TabStack=dJ;function l0(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,i=T.useTheme(),a=i.palette.mode==="dark"?i.palette.grey.A400:i.palette.grey.A800,l=i.palette.mode==="light"?"#000000":"#FFFFFF";return p.jsxs(T.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&p.jsx(T.Typography,{children:t}),!n&&(P.isValidElement(e==null?void 0:e.customButton)?P.cloneElement(e==null?void 0:e.customButton,{onClick:r}):p.jsx(T.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:p.jsx(He.PlusCircleOutlined,{style:{color:l}})}))]})}const c0=P.createContext(void 0);function SS(){return P.useContext(c0)}function Sd(e){const{children:t}=e,{item:n,index:r}=SS(),[o,i]=P.useState(!1),{update:a}=H.useArrayInput(),l=H.useTranslate(),u=P.useCallback(d=>(i(!1),a(r,d),Promise.resolve()),[r,a]);return p.jsxs(p.Fragment,{children:[p.jsx(T.Button,{color:"primary",onClick:()=>i(!0),sx:{justifyContent:"flex-start"},children:l("ra.action.edit")}),p.jsx(T.Dialog,{open:o,onClose:()=>i(!1),maxWidth:"xs",fullWidth:!0,children:p.jsx(H.EditContextProvider,{value:{record:n,save:u},children:t})})]})}function ES({source:e,children:t}){const n=P.Children.only(t),{getValues:r}=ln.useFormContext(),o=H.useRecordContext({record:r()});return P.isValidElement(n)?P.cloneElement(n,{source:e,record:o}):null}function u0(e){const{label:t,disableAdd:n,inset:r,source:o,template:i}=e,[a,l]=P.useState(!1),{append:u}=H.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(l0,{}),{label:t,source:o,disableAdd:n,template:i,onClick:d,inset:r}),p.jsx(T.Dialog,{open:a,onClose:d,maxWidth:"xs",children:p.jsx(ie.CreateContextProvider,{value:{save:f},children:e.children})})]})}const d0=P.createContext(void 0);function TS(){return P.useContext(d0)}const AS=N.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:i,member:a,resource:l,record:u}=e,d=H.useTranslate(),{total:f,remove:g}=TS(),h=N.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)===Sd&&N.isValidElement(b)?b:null),[n]);return p.jsxs(c0.Provider,{value:m,children:[P.Children.map(n,(b,C)=>{if(b.type===Sd||!P.isValidElement(b))return null;const{source:E,...I}=b.props;return p.jsx(T.TableCell,{children:P.cloneElement(b,{source:E?`${a}.${E}`:a,index:E?void 0:C,resource:l,disabled:r,...I,label:""})})}),!o&&p.jsx(T.TableCell,{children:p.jsx(T.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:p.jsxs(Go,{horizontal:!0,children:[p.jsx(Ri,{onConfirm:h,confirmContent:d("ra.message.remove_item")}),y]})})}),o&&y?p.jsx(T.TableCell,{children:p.jsx(T.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:p.jsx(Go,{horizontal:!0,children:y})})}):null]})});function fJ(e){var Z,z;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(l0,{}),inset:h,sx:m}=e,{fields:y,remove:b,replace:C,append:E}=H.useArrayInput(e),{resetField:I}=ln.useFormContext(),S=St(),A=ie.useTranslate(),O=P.useRef(f||{}),k=ie.useTranslateLabel(),M=P.useCallback(J=>{b(J)},[b]);if(y.length>0){const{...J}=y[0];O.current=J;for(const U in O.current)O.current[U]=null}const R=P.useCallback((J=void 0)=>{let U=J;J==null&&(U=O.current,P.Children.count(t)===1&&N.isValidElement(P.Children.only(t))&&!P.Children.only(t).props.source&&P.Children.map(t,Q=>N.isValidElement(Q)&&Q.type!==ie.FormDataConsumer).some(Boolean)?U="":(U=U||{},P.Children.forEach(t,Q=>{N.isValidElement(Q)&&Q.type!==ie.FormDataConsumer&&Q.props.source&&(U[Q.props.source]=Q.props.defaultValue??null)})));const se={...U,...f};E(se),I(`${r}.${y.length}`,{defaultValue:U})},[E,t,I,r,y.length,f]);function V(J){return U=>{R(),J&&J(U)}}const _=P.useCallback(()=>{C([])},[C]),D=P.useMemo(()=>({total:y.length,remove:M,source:r}),[y.length,M,r]),G=S.palette.mode==="dark"?S.palette.grey.A400:S.palette.grey.A800,K=y.length>0&&l,Y=h===!0?{borderRadius:0,borderBottom:`1px solid ${S.palette.divider}`}:{mt:2,border:`1px solid ${G}`,boxShadow:S.customShadows.z0};return y?p.jsx(d0.Provider,{value:D,children:p.jsxs("div",{className:u,children:[N.cloneElement(g,{label:o,source:r,disableAdd:i,template:f,onClick:(g==null?void 0:g.type)!==u0?V((z=(Z=e==null?void 0:e.addButton)==null?void 0:Z.props)==null?void 0:z.onClick):void 0,inset:h}),p.jsx(T.TableContainer,{component:T.Paper,sx:{...Y,boxShadow:S.customShadows.z0,...m},children:p.jsxs(T.Table,{size:"small",children:[p.jsx(T.TableHead,{sx:h===!0?{}:{borderTop:0,borderBottom:`1px solid ${G}`},children:p.jsxs(T.TableRow,{children:[P.Children.map(t,(J,U)=>{if(J.type===Sd||!N.isValidElement(J))return null;const se=p.jsx(T.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:k({...J.props,resource:n})});return p.jsx(T.TableCell,{children:J.props.title?p.jsx(ku,{title:J.props.title,arrow:!0,children:se}):se},U)}),!a&&K?p.jsx(T.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:p.jsx(Go,{horizontal:!0,children:p.jsx(Ri,{onConfirm:_,confirmContent:A("ra.message.clear_array_input")})})},"actions"):p.jsx(T.TableCell,{},"empty_actions")]})}),p.jsxs(T.TableBody,{children:[y.length===0&&p.jsx(T.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:p.jsx(T.TableCell,{colSpan:4+(a?0:1),align:"center",children:d||p.jsx(T.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),y.length>0&&y.map((J,U)=>p.jsx(T.TableRow,{sx:{borderBottom:0},children:p.jsx(AS,{disableRemove:a,index:U,member:`${r}.${U}`,onRemoveField:M,record:y&&y[U]||{},resource:n,source:r,children:t})},J.id))]})]})})]})}):null}const Ed=me(fJ,{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}}}));Ed.CreateButton=u0,Ed.EditButton=Sd,Ed.Field=ES;const IS=P.createContext(void 0);function Td(){const e=P.useContext(IS);if(!e)throw new Error("useWizardFormContext must be used within a WizardFormProvider");return e}function pJ({value:e,children:t}){return p.jsx(IS.Provider,{value:e,children:t})}function hJ({cancelButton:e,...t}){const{hasNextStep:n,hasPreviousStep:r,goToNextStep:o,goToPreviousStep:i}=Td(),a=ie.useTranslate(),{handleSubmit:l}=ln.useFormContext(),u=P.useCallback(()=>{o()},[o]);return p.jsxs(Qo,{...t,children:[p.jsx(T.Box,{sx:{"& .MuiButtonBase-root":{ml:0}},children:e?P.cloneElement(e):null}),p.jsx(T.Box,{sx:{flex:"1 1 auto"}}),r()&&p.jsx(T.Button,{variant:"text",color:"primary",onClick:i,children:a("ra.action.back")}),n()?p.jsx(T.Button,{variant:"contained",color:"primary",onClick:l(u),children:a("ra.action.next")}):p.jsx(H.SaveButton,{})]})}const gJ=T.styled(T.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}})),mJ=T.styled(T.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 vJ({completed:e,active:t,error:n,icon:r,className:o}){return p.jsx(mJ,{ownerState:{completed:e,active:t,error:n},className:o,children:n?"!":r})}function yJ({isHorizontal:e,setCurrentStep:t,stepFields:n}){const{currentStep:r,steps:o}=Td(),{errors:i}=ln.useFormState();function a(l){l<=r&&t(l)}return p.jsx(gJ,{activeStep:r,orientation:e?"horizontal":"vertical",isHorizontal:e,sx:{p:3,mt:1},children:o.map((l,u)=>{const d=n[u].some(h=>ae.get(i,h)),{label:f,icon:g}=l.props;return p.jsx(T.Step,{children:p.jsx(T.StepLabel,{StepIconComponent:vJ,error:d,icon:g,onClick:()=>a(u),style:{cursor:u<=r?"pointer":"default"},children:e?null:f})},u)})})}function bJ({title:e,subheader:t,secondary:n,toolbar:r,progress:o,isSmall:i,modal:a,sx:l,setCurrentStep:u}){const{currentStep:d,steps:f}=Td(),g=H.useTranslate(),h=T.useTheme(),m=i||a,y=P.useMemo(()=>r?P.Children.toArray(r.props.children).find(C=>{var E;return P.isValidElement(C)&&C.type===T.Button&&((E=C.props)==null?void 0:E.children)===g("ra.action.cancel")}):null,[r,g]),b=f.map(C=>{const E=[],{sources:I}=C.props;return I!==void 0?E.push(...I):vd(C,S=>{var A;((A=S==null?void 0:S.props)==null?void 0:A.source)!==void 0&&E.push(S.props.source)}),E});return p.jsxs(T.Grid,{container:!0,spacing:2,sx:l,children:[p.jsx(T.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(yJ,{isHorizontal:m,setCurrentStep:u,stepFields:b})}),a?p.jsx(T.Divider,{sx:{width:"100%"}}):null,p.jsx(T.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(Fn,{title:e||f[d].props.label,subheader:t,secondary:n,border:!a,divider:!0,children:[p.jsx(T.Box,{children:f[d]}),p.jsx(T.Box,{sx:{"& .MuiToolbar-root":{paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:h.spacing(2)}},children:r&&!y?r:p.jsx(hJ,{cancelButton:y})})]})})]})}const xJ=T.styled(H.Form,{shouldForwardProp:e=>e!=="modal"})(({theme:e,modal:t})=>({[e.breakpoints.down("sm")]:t?{}:{paddingBottom:`${e.spacing(2.5)}`}}));function OS({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=T.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 E={currentStep:d,steps:g,hasNextStep:m,hasPreviousStep:y,goToNextStep:b,goToPreviousStep:C};return p.jsx(pJ,{value:E,children:p.jsx(xJ,{...u,modal:l,children:p.jsx(bJ,{title:r,subheader:o,secondary:i,modal:l,sx:a,toolbar:t,progress:n,isSmall:h,setCurrentStep:f})})})}function CJ({children:e}){return p.jsx(p.Fragment,{children:e})}OS.Step=CJ;function wJ(e,t){const n=ae.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const i=ae.chain(n.media).clone().extend(o).value();return ae.extend(n,{media:i})}case"updateDrawer":{const i=ae.chain(n.drawer).clone().extend(o).value();return ae.extend(n,{drawer:i})}case"updateLogo":{const i=ae.chain(n.logo).clone().extend(o).value();return ae.extend(n,{logo:i})}case"updateNotifications":{const i=ae.chain(n.notifications).clone().extend(o).value();return ae.extend(n,{notifications:i})}case"updateTheme":{const i=ae.chain(n.theme).clone().extend(o).value();return ae.extend(n,{theme:i})}default:return n}}const SJ={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"}},PS=P.createContext(void 0);function jS(e){var _;const t=ie.useAuthProvider(),n=ie.useGetIdentity(),r=T.useTheme(),o=T.useMediaQuery(r.breakpoints.down("md")),i=T.useMediaQuery(r.breakpoints.down("lg")),a=T.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:l,isHorizontalLayout:u,themeDirection:d,drawerWidth:f}=Zg(),g=u(d)&&!i,{drawerOpen:h,openDrawer:m}=ad(),y=P.useCallback(()=>{m(!h)},[h,m]),[b,C]=P.useState(!1),[E,I]=P.useReducer(wJ,ae.chain(SJ).clone().merge({drawer:{open:!l||h}}).value()),S=P.useCallback(()=>C(!1),[]),A=P.useMemo(()=>({state:E,dispatch:I}),[E,I]),{logoIcon:O,logoMain:k,enableNotification:M,notification:R}=e,V=H.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:k,icon:O}})},[O,k]),P.useEffect(()=>{I({type:"updateNotifications",payload:{enable:M,resource:R??"entities/notification"}})},[M,R]),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(!V){if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(D=>{var G;C(!D&&((G=n==null?void 0:n.data)==null?void 0:G.needToChangePassword)===!0)})}},[(_=n==null?void 0:n.data)==null?void 0:_.needToChangePassword,t,V]),p.jsxs(PS.Provider,{value:A,children:[p.jsx(T.Dialog,{open:b,maxWidth:"xs",fullWidth:!0,children:p.jsx(t0,{onSuccess:S,firstAccess:!0})}),e.children]})}function kS(e){return P.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:i,notification:a}=t;return p.jsx(jS,{logoIcon:r,logoMain:o,enableNotification:i,notification:a,children:p.jsx(e,{ref:n,...t})})})}function f0(){const e=P.useContext(PS);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function EJ(){return f0().dispatch}function Ys(){return f0().state}function Jn(){return Ys().media}function Ni(){return Ys().drawer}function MS(){return Ys().logo}function Ad(){return Ys().notifications}function TJ(){return Ys().theme}function _S(e){const{width:t}=Ni(),{horizontal:n}=Jn(),{container:r}=An(),[o,i]=P.useState(null);function a(u,d){i(d)}const l=St();return p.jsx(hG,{onError:a,fallbackRender:({error:u,resetErrorBoundary:d})=>p.jsx(jg,{error:u,errorComponent:e.error,errorInfo:o,resetErrorBoundary:d}),children:p.jsx(P.Suspense,{fallback:p.jsx(r4,{}),children:p.jsxs(T.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[p.jsx(T.Toolbar,{sx:{mt:n?8:"inherit"}})," ",p.jsx(T.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 FS=me(T.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 BS({isIcon:e,sx:t,to:n,logoIcon:r,logoMain:o}){const{appDefaultPath:i}=An();return p.jsx(T.ButtonBase,{disableRipple:!0,component:dt.Link,to:n||i,sx:t,children:e?r:o})}function DS(e){const t=T.useTheme(),{horizontal:n}=Jn(),{open:r}=Ni(),{icon:o,main:i}=MS(),a=_r(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(FS,{theme:t,open:r,sx:a,children:p.jsx(BS,{to:"/",isIcon:!r,sx:{width:r?"auto":35,height:35},logoMain:i,logoIcon:o})})}function RS(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 LS(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 AJ=me(T.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=An();return{width:n,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...RS(e,n),"& .MuiDrawer-paper":RS(e,n)},...!t&&{...LS(e),"& .MuiDrawer-paper":LS(e)}}});var Te={},p0={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",E="architecture",I="console",S="mobile",A="tablet",O="smarttv",k="wearable",M="embedded",R=500,V="Amazon",_="Apple",D="ASUS",G="BlackBerry",K="Browser",Y="Chrome",Z="Edge",z="Firefox",J="Google",U="Huawei",se="LG",Q="Microsoft",W="Motorola",te="Opera",re="Samsung",$="Sharp",fe="Sony",he="Xiaomi",be="Zebra",ue="Facebook",xe="Chromium OS",Ce="Mac OS",Ae=" Browser",ve=function(je,ke){var Oe={};for(var we in je)ke[we]&&ke[we].length%2===0?Oe[we]=ke[we].concat(je[we]):Oe[we]=je[we];return Oe},Me=function(je){for(var ke={},Oe=0;Oe<je.length;Oe++)ke[je[Oe].toUpperCase()]=je[Oe];return ke},ye=function(je,ke){return typeof je===f?Xe(ke).indexOf(Xe(je))!==-1:!1},Xe=function(je){return je.toLowerCase()},Wt=function(je){return typeof je===f?je.replace(/[^\d\.]/g,i).split(".")[0]:r},xt=function(je,ke){if(typeof je===f)return je=je.replace(/^\s\s*/,i),typeof ke===u?je:je.substring(0,R)},ct=function(je,ke){for(var Oe=0,we,yt,Ct,Re,Pe,en;Oe<ke.length&&!Pe;){var In=ke[Oe],tr=ke[Oe+1];for(we=yt=0;we<In.length&&!Pe&&In[we];)if(Pe=In[we++].exec(je),Pe)for(Ct=0;Ct<tr.length;Ct++)en=Pe[++yt],Re=tr[Ct],typeof Re===d&&Re.length>0?Re.length===2?typeof Re[1]==l?this[Re[0]]=Re[1].call(this,en):this[Re[0]]=Re[1]:Re.length===3?typeof Re[1]===l&&!(Re[1].exec&&Re[1].test)?this[Re[0]]=en?Re[1].call(this,en,Re[2]):r:this[Re[0]]=en?en.replace(Re[1],Re[2]):r:Re.length===4&&(this[Re[0]]=en?Re[3].call(this,en.replace(Re[1],Re[2])):r):this[Re]=en||r;Oe+=2}},pn=function(je,ke){for(var Oe in ke)if(typeof ke[Oe]===d&&ke[Oe].length>0){for(var we=0;we<ke[Oe].length;we++)if(ye(ke[Oe][we],je))return Oe===a?r:Oe}else if(ye(ke[Oe],je))return Oe===a?r:Oe;return ke.hasOwnProperty("*")?ke["*"]:je},vt={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Je={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"},Bt={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,te+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[C,[m,te+" GX"]],[/\bopr\/([\w\.]+)/i],[C,[m,te]],[/\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"+K]],[/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 "+K]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure "+K],C],[/\bfocus\/([\w\.]+)/i],[C,[m,z+" Focus"]],[/\bopt\/([\w\.]+)/i],[C,[m,te+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[C,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[C,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[C,[m,te+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[C,[m,"MIUI "+K]],[/fxios\/([-\w\.]+)/i],[C,[m,z]],[/\bqihu|(qi?ho?o?|360)browser/i],[[m,"360"+Ae]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],C],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+Ae],C],[/samsungbrowser\/([\w\.]+)/i],[C,[m,re+" 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,ue],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,Y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,Y+" WebView"],C],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[C,[m,"Android "+K]],[/(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,pn,vt]],[/(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,z+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[m,[C,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[C,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,Xe]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/windows (ce|mobile); ppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[E,/ower/,i,Xe]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[E,Xe]]],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,re],[y,A]],[/\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,re],[y,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[b,_],[y,S]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[b,_],[y,A]],[/(macintosh);/i],[h,[b,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[b,$],[y,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[b,U],[y,A]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[b,U],[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,he],[y,S]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[b,he],[y,A]],[/; (\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,A]],[/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,W],[y,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[b,W],[y,A]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[b,se],[y,A]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[b,se],[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,A]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[b,"Nokia"],[y,S]],[/(pixel c)\b/i],[h,[b,J],[y,A]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[b,J],[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,fe],[y,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[b,fe],[y,A]],[/ (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,V],[y,A]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[b,V],[y,S]],[/(playbook);[-\w\),; ]+(rim)/i],[h,b,[y,A]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[b,G],[y,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[b,D],[y,A]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[b,D],[y,S]],[/(nexus 9)/i],[h,[b,"HTC"],[y,A]],[/(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,A]],[/(itel) ((\w+))/i],[[b,Xe],h,[y,pn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[b,"Acer"],[y,A]],[/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,A]],[/(surface duo)/i],[h,[b,Q],[y,A]],[/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,A]],[/\b(venue[\d ]{2,7}) b/i],[h,[b,"Dell"],[y,A]],[/\b(q(?:mv|ta)\w+) b/i],[h,[b,"Verizon"],[y,A]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[b,"Barnes & Noble"],[y,A]],[/\b(tm\d{3}\w+) b/i],[h,[b,"NuVision"],[y,A]],[/\b(k88) b/i],[h,[b,"ZTE"],[y,A]],[/\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,A]],[/\b((zeki)?tb.*\b) b/i],[h,[b,"Zeki"],[y,A]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[b,"Dragon Touch"],h,[y,A]],[/\b(ns-?\w{0,9}) b/i],[h,[b,"Insignia"],[y,A]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[b,"NextBook"],[y,A]],[/\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,A]],[/\b(trio[-\w\. ]+) b/i],[h,[b,"MachSpeed"],[y,A]],[/\btu_(1491) b/i],[h,[b,"Rotor"],[y,A]],[/(shield[\w ]+) b/i],[h,[b,"Nvidia"],[y,A]],[/(sprint) (\w+)/i],[b,h,[y,S]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[b,Q],[y,S]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[b,be],[y,A]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[b,be],[y,S]],[/smart-tv.+(samsung)/i],[b,[y,O]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[b,re],[y,O]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,se],[y,O]],[/(apple) ?tv/i],[b,[h,_+" TV"],[y,O]],[/crkey/i],[[h,Y+"cast"],[b,J],[y,O]],[/droid.+aft(\w+)( bui|\))/i],[h,[b,V],[y,O]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[b,$],[y,O]],[/(bravia[\w ]+)( bui|\))/i],[h,[b,fe],[y,O]],[/(mitv-\w{5}) bui/i],[h,[b,he],[y,O]],[/Hbbtv.*(technisat) (.*);/i],[b,h,[y,O]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,xt],[h,xt],[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,fe],[y,I]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[b,Q],[y,I]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[h,[b,re],[y,k]],[/((pebble))app/i],[b,h,[y,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[b,_],[y,k]],[/droid.+; (glass) \d/i],[h,[b,J],[y,k]],[/droid.+; (wt63?0{2,3})\)/i],[h,[b,be],[y,k]],[/(quest( \d| pro)?)/i],[h,[b,ue],[y,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[y,M]],[/(aeobc)\b/i],[h,[b,V],[y,M]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[h,[y,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[y,A]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[y,A]],[/(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,Z+"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,pn,Je]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,pn,Je],[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,Ce],[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,G]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[C,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[C,[m,z+" 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,Y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,xe],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]]},ot=function(je,ke){if(typeof je===d&&(ke=je,je=r),!(this instanceof ot))return new ot(je,ke).getResult();var Oe=typeof n!==u&&n.navigator?n.navigator:r,we=je||(Oe&&Oe.userAgent?Oe.userAgent:i),yt=Oe&&Oe.userAgentData?Oe.userAgentData:r,Ct=ke?ve(Bt,ke):Bt,Re=Oe&&Oe.userAgent==we;return this.getBrowser=function(){var Pe={};return Pe[m]=r,Pe[C]=r,ct.call(Pe,we,Ct.browser),Pe[g]=Wt(Pe[C]),Re&&Oe&&Oe.brave&&typeof Oe.brave.isBrave==l&&(Pe[m]="Brave"),Pe},this.getCPU=function(){var Pe={};return Pe[E]=r,ct.call(Pe,we,Ct.cpu),Pe},this.getDevice=function(){var Pe={};return Pe[b]=r,Pe[h]=r,Pe[y]=r,ct.call(Pe,we,Ct.device),Re&&!Pe[y]&&yt&&yt.mobile&&(Pe[y]=S),Re&&Pe[h]=="Macintosh"&&Oe&&typeof Oe.standalone!==u&&Oe.maxTouchPoints&&Oe.maxTouchPoints>2&&(Pe[h]="iPad",Pe[y]=A),Pe},this.getEngine=function(){var Pe={};return Pe[m]=r,Pe[C]=r,ct.call(Pe,we,Ct.engine),Pe},this.getOS=function(){var Pe={};return Pe[m]=r,Pe[C]=r,ct.call(Pe,we,Ct.os),Re&&!Pe[m]&&yt&&yt.platform&&yt.platform!="Unknown"&&(Pe[m]=yt.platform.replace(/chrome os/i,xe).replace(/macos/i,Ce)),Pe},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return we},this.setUA=function(Pe){return we=typeof Pe===f&&Pe.length>R?xt(Pe,R):Pe,this},this.setUA(we),this};ot.VERSION=o,ot.BROWSER=Me([m,C,g]),ot.CPU=Me([E]),ot.DEVICE=Me([h,b,y,I,S,O,A,k,M]),ot.ENGINE=ot.OS=Me([m,C]),e.exports&&(t=e.exports=ot),t.UAParser=ot;var st=typeof n!==u&&(n.jQuery||n.Zepto);if(st&&!st.ua){var Tt=new ot;st.ua=Tt.getResult(),st.ua.get=function(){return Tt.getUA()},st.ua.set=function(je){Tt.setUA(je);var ke=Tt.getResult();for(var Oe in ke)st.ua[Oe]=ke[Oe]}}})(typeof window=="object"?window:Tn)})(p0,p0.exports);var IJ=p0.exports;Object.defineProperty(Te,"__esModule",{value:!0});function OJ(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var bn=P,Et=OJ(bn),NS=IJ,Jo=new NS,xn=Jo.getBrowser(),PJ=Jo.getCPU(),qn=Jo.getDevice(),h0=Jo.getEngine(),qo=Jo.getOS(),Ol=Jo.getUA(),VS=function(t){return Jo.setUA(t)},Pl=function(t){if(!t){console.error("No userAgent string was provided");return}var n=new NS(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)}}},WS=Object.freeze({ClientUAInstance:Jo,browser:xn,cpu:PJ,device:qn,engine:h0,os:qo,ua:Ol,setUa:VS,parseUserAgent:Pl});function zS(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 jJ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zS(Object(n),!0).forEach(function(r){FJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jl(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jl=function(t){return typeof t}:jl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(e)}function kJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MJ(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 _J(e,t,n){return t&&MJ(e.prototype,t),e}function FJ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g0(){return g0=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},g0.apply(this,arguments)}function BJ(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&&v0(e,t)}function m0(e){return m0=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},m0(e)}function v0(e,t){return v0=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},v0(e,t)}function DJ(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 Cr(e,t){if(e==null)return{};var n=DJ(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 Id(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RJ(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 Id(e)}function LJ(e,t){return NJ(e)||VJ(e,t)||WJ(e,t)||zJ()}function NJ(e){if(Array.isArray(e))return e}function VJ(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 WJ(e,t){if(e){if(typeof e=="string")return US(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 US(e,t)}}function US(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 zJ(){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 Cn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},Nn={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"},Ks={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},UJ={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},HJ=function(t){switch(t){case Cn.Mobile:return{isMobile:!0};case Cn.Tablet:return{isTablet:!0};case Cn.SmartTv:return{isSmartTV:!0};case Cn.Console:return{isConsole:!0};case Cn.Wearable:return{isWearable:!0};case Cn.Browser:return{isBrowser:!0};case Cn.Embedded:return{isEmbedded:!0};default:return UJ}},GJ=function(t){return VS(t)},Ne=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},y0=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},b0=function(t){var n=y0();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},YJ=function(t,n,r,o,i){return{isBrowser:t,browserMajorVersion:Ne(n.major),browserFullVersion:Ne(n.version),browserName:Ne(n.name),engineName:Ne(r.name),engineVersion:Ne(r.version),osName:Ne(o.name),osVersion:Ne(o.version),userAgent:Ne(i)}},HS=function(t,n,r,o){return jJ({},t,{vendor:Ne(n.vendor),model:Ne(n.model),os:Ne(r.name),osVersion:Ne(r.version),ua:Ne(o)})},KJ=function(t,n,r,o){return{isSmartTV:t,engineName:Ne(n.name),engineVersion:Ne(n.version),osName:Ne(r.name),osVersion:Ne(r.version),userAgent:Ne(o)}},XJ=function(t,n,r,o){return{isConsole:t,engineName:Ne(n.name),engineVersion:Ne(n.version),osName:Ne(r.name),osVersion:Ne(r.version),userAgent:Ne(o)}},ZJ=function(t,n,r,o){return{isWearable:t,engineName:Ne(n.name),engineVersion:Ne(n.version),osName:Ne(r.name),osVersion:Ne(r.version),userAgent:Ne(o)}},QJ=function(t,n,r,o,i){return{isEmbedded:t,vendor:Ne(n.vendor),model:Ne(n.model),engineName:Ne(r.name),engineVersion:Ne(r.version),osName:Ne(o.name),osVersion:Ne(o.version),userAgent:Ne(i)}};function JJ(e){var t=e?Pl(e):WS,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,l=HJ(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 YJ(u,r,o,i,a);if(g)return KJ(g,o,i,a);if(h)return XJ(h,o,i,a);if(d||f)return HS(l,n,i,a);if(m)return ZJ(m,o,i,a);if(y)return QJ(y,n,o,i,a)}var GS=function(t){var n=t.type;return n===Cn.Mobile},YS=function(t){var n=t.type;return n===Cn.Tablet},KS=function(t){var n=t.type;return n===Cn.Mobile||n===Cn.Tablet},XS=function(t){var n=t.type;return n===Cn.SmartTv},Od=function(t){var n=t.type;return n===Cn.Browser},ZS=function(t){var n=t.type;return n===Cn.Wearable},QS=function(t){var n=t.type;return n===Cn.Console},JS=function(t){var n=t.type;return n===Cn.Embedded},qS=function(t){var n=t.vendor;return Ne(n)},$S=function(t){var n=t.model;return Ne(n)},e6=function(t){var n=t.type;return Ne(n,"browser")},t6=function(t){var n=t.name;return n===Ks.Android},n6=function(t){var n=t.name;return n===Ks.Windows},r6=function(t){var n=t.name;return n===Ks.MAC_OS},o6=function(t){var n=t.name;return n===Ks.WindowsPhone},i6=function(t){var n=t.name;return n===Ks.IOS},s6=function(t){var n=t.version;return Ne(n)},a6=function(t){var n=t.name;return Ne(n)},l6=function(t){var n=t.name;return n===Nn.Chrome},c6=function(t){var n=t.name;return n===Nn.Firefox},u6=function(t){var n=t.name;return n===Nn.Chromium},Pd=function(t){var n=t.name;return n===Nn.Edge},d6=function(t){var n=t.name;return n===Nn.Yandex},f6=function(t){var n=t.name;return n===Nn.Safari||n===Nn.MobileSafari},p6=function(t){var n=t.name;return n===Nn.MobileSafari},h6=function(t){var n=t.name;return n===Nn.Opera},g6=function(t){var n=t.name;return n===Nn.InternetExplorer||n===Nn.Ie},m6=function(t){var n=t.name;return n===Nn.MIUI},v6=function(t){var n=t.name;return n===Nn.SamsungBrowser},y6=function(t){var n=t.version;return Ne(n)},b6=function(t){var n=t.major;return Ne(n)},x6=function(t){var n=t.name;return Ne(n)},C6=function(t){var n=t.name;return Ne(n)},w6=function(t){var n=t.version;return Ne(n)},S6=function(){var t=y0(),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},E6=function(){var t=y0();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},eo=function(){return b0("iPad")},T6=function(){return b0("iPhone")},A6=function(){return b0("iPod")},I6=function(t){return Ne(t)};function O6(e){var t=e||WS,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:XS(n),isConsole:QS(n),isWearable:ZS(n),isEmbedded:JS(n),isMobileSafari:p6(r)||eo(),isChromium:u6(r),isMobile:KS(n)||eo(),isMobileOnly:GS(n),isTablet:YS(n)||eo(),isBrowser:Od(n),isDesktop:Od(n),isAndroid:t6(o),isWinPhone:o6(o),isIOS:i6(o)||eo(),isChrome:l6(r),isFirefox:c6(r),isSafari:f6(r),isOpera:h6(r),isIE:g6(r),osVersion:s6(o),osName:a6(o),fullBrowserVersion:y6(r),browserVersion:b6(r),browserName:x6(r),mobileVendor:qS(n),mobileModel:$S(n),engineName:C6(i),engineVersion:w6(i),getUA:I6(a),isEdge:Pd(r)||Xs(a),isYandex:d6(r),deviceType:e6(n),isIOS13:E6(),isIPad13:eo(),isIPhone13:T6(),isIPod13:A6(),isElectron:S6(),isEdgeChromium:Xs(a),isLegacyEdge:Pd(r)&&!Xs(a),isWindows:n6(o),isMacOs:r6(o),isMIUI:m6(r),isSamsungBrowser:v6(r)}}var P6=XS(qn),j6=QS(qn),k6=ZS(qn),qJ=JS(qn),$J=p6(xn)||eo(),eq=u6(xn),jd=KS(qn)||eo(),M6=GS(qn),_6=YS(qn)||eo(),F6=Od(qn),tq=Od(qn),B6=t6(qo),D6=o6(qo),R6=i6(qo)||eo(),nq=l6(xn),rq=c6(xn),oq=f6(xn),iq=h6(xn),L6=g6(xn),sq=s6(qo),aq=a6(qo),lq=y6(xn),cq=b6(xn),uq=x6(xn),dq=qS(qn),fq=$S(qn),pq=C6(h0),hq=w6(h0),gq=I6(Ol),mq=Pd(xn)||Xs(Ol),vq=d6(xn),yq=e6(qn),bq=E6(),xq=eo(),Cq=T6(),wq=A6(),Sq=S6(),Eq=Xs(Ol),Tq=Pd(xn)&&!Xs(Ol),Aq=n6(qo),Iq=r6(qo),Oq=m6(xn),Pq=v6(xn),jq=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Pl(t),r=n.device,o=n.browser,i=n.os,a=n.engine,l=n.ua;return O6({device:r,browser:o,os:i,engine:a,ua:l})},kq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return B6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Mq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return F6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},_q=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return L6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Fq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return R6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Bq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return jd?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Dq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return _6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Rq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return D6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Lq=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=Cr(t,["renderWithFragment","children","viewClassName","style"]);return M6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Nq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return P6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Vq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return j6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Wq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return k6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},zq=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,i=Cr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",i,r):null};function Uq(e){return function(t){BJ(n,t);function n(r){var o;return kJ(this,n),o=RJ(this,m0(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(Id(o)),o.onOrientationChange=o.onOrientationChange.bind(Id(o)),o.onPageLoad=o.onPageLoad.bind(Id(o)),o.state={isLandscape:!1,isPortrait:!1},o}return _J(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":jl(window))!==void 0&&jd&&(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 Et.createElement(e,g0({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Et.Component)}function Hq(){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=LJ(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":jl(window))!==void 0&&jd&&(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 N6(e){var t=e||window.navigator.userAgent;return Pl(t)}function Gq(e){var t=e||window.navigator.userAgent,n=N6(t),r=O6(n);return[r,n]}Te.AndroidView=kq,Te.BrowserTypes=Nn;var Yq=Te.BrowserView=Mq;Te.ConsoleView=Vq,Te.CustomView=zq,Te.IEView=_q,Te.IOSView=Fq,Te.MobileOnlyView=Lq;var Kq=Te.MobileView=Bq;Te.OsTypes=Ks,Te.SmartTVView=Nq,Te.TabletView=Dq,Te.WearableView=Wq,Te.WinPhoneView=Rq,Te.browserName=uq,Te.browserVersion=cq,Te.deviceDetect=JJ,Te.deviceType=yq,Te.engineName=pq,Te.engineVersion=hq,Te.fullBrowserVersion=lq,Te.getSelectorsByUserAgent=jq,Te.getUA=gq,Te.isAndroid=B6,Te.isBrowser=F6,Te.isChrome=nq,Te.isChromium=eq,Te.isConsole=j6,Te.isDesktop=tq,Te.isEdge=mq,Te.isEdgeChromium=Eq,Te.isElectron=Sq,Te.isEmbedded=qJ,Te.isFirefox=rq,Te.isIE=L6,Te.isIOS=R6,Te.isIOS13=bq,Te.isIPad13=xq,Te.isIPhone13=Cq,Te.isIPod13=wq,Te.isLegacyEdge=Tq,Te.isMIUI=Oq,Te.isMacOs=Iq,Te.isMobile=jd,Te.isMobileOnly=M6,Te.isMobileSafari=$J,Te.isOpera=iq,Te.isSafari=oq,Te.isSamsungBrowser=Pq,Te.isSmartTV=P6,Te.isTablet=_6,Te.isWearable=k6,Te.isWinPhone=D6,Te.isWindows=Aq,Te.isYandex=vq,Te.mobileModel=fq,Te.mobileVendor=dq,Te.osName=aq,Te.osVersion=sq,Te.parseUserAgent=Pl,Te.setUserAgent=GJ,Te.useDeviceData=N6,Te.useDeviceSelectors=Gq,Te.useMobileOrientation=Hq,Te.withOrientationChange=Uq;var Xq=typeof global=="object"&&global&&global.Object===Object&&global,Zq=typeof self=="object"&&self&&self.Object===Object&&self,V6=Xq||Zq||Function("return this")(),kd=V6.Symbol,W6=Object.prototype,Qq=W6.hasOwnProperty,Jq=W6.toString,kl=kd?kd.toStringTag:void 0;function qq(e){var t=Qq.call(e,kl),n=e[kl];try{e[kl]=void 0;var r=!0}catch{}var o=Jq.call(e);return r&&(t?e[kl]=n:delete e[kl]),o}var $q=Object.prototype,e$=$q.toString;function t$(e){return e$.call(e)}var n$="[object Null]",r$="[object Undefined]",z6=kd?kd.toStringTag:void 0;function o$(e){return e==null?e===void 0?r$:n$:z6&&z6 in Object(e)?qq(e):t$(e)}function i$(e){return e!=null&&typeof e=="object"}var s$="[object Symbol]";function a$(e){return typeof e=="symbol"||i$(e)&&o$(e)==s$}var l$=/\s/;function c$(e){for(var t=e.length;t--&&l$.test(e.charAt(t)););return t}var u$=/^\s+/;function d$(e){return e&&e.slice(0,c$(e)+1).replace(u$,"")}function Md(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var U6=NaN,f$=/^[-+]0x[0-9a-f]+$/i,p$=/^0b[01]+$/i,h$=/^0o[0-7]+$/i,g$=parseInt;function H6(e){if(typeof e=="number")return e;if(a$(e))return U6;if(Md(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Md(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=d$(e);var n=p$.test(e);return n||h$.test(e)?g$(e.slice(2),n?2:8):f$.test(e)?U6:+e}var x0=function(){return V6.Date.now()},m$="Expected a function",v$=Math.max,y$=Math.min;function _d(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(m$);t=H6(t)||0,Md(n)&&(f=!!n.leading,g="maxWait"in n,i=g?v$(H6(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(k){var M=r,R=o;return r=o=void 0,d=k,a=e.apply(R,M),a}function y(k){return d=k,l=setTimeout(E,t),f?m(k):a}function b(k){var M=k-u,R=k-d,V=t-M;return g?y$(V,i-R):V}function C(k){var M=k-u,R=k-d;return u===void 0||M>=t||M<0||g&&R>=i}function E(){var k=x0();if(C(k))return I(k);l=setTimeout(E,b(k))}function I(k){return l=void 0,h&&r?m(k):(r=o=void 0,a)}function S(){l!==void 0&&clearTimeout(l),d=0,r=u=o=l=void 0}function A(){return l===void 0?a:I(x0())}function O(){var k=x0(),M=C(k);if(r=arguments,o=this,u=k,M){if(l===void 0)return y(u);if(g)return clearTimeout(l),l=setTimeout(E,t),m(u)}return l===void 0&&(l=setTimeout(E,t)),a}return O.cancel=S,O.flush=A,O}var b$="Expected a function";function x$(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(b$);return Md(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),_d(e,t,{leading:r,maxWait:t,trailing:o})}var Zs=function(){return Zs=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},Zs.apply(this,arguments)};function G6(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Y6(e){return!e||!e.ownerDocument?document:e.ownerDocument}var K6=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 X6(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function Z6(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function Q6(e){return".".concat(e.split(" ").join("."))}var C0=!!(typeof window<"u"&&window.document&&window.document.createElement),C$=Object.freeze({__proto__:null,addClasses:X6,canUseDOM:C0,classNamesToQuery:Q6,getElementDocument:Y6,getElementWindow:G6,getOptions:K6,removeClasses:Z6}),Qs=null,J6=null;C0&&window.addEventListener("resize",function(){J6!==window.devicePixelRatio&&(J6=window.devicePixelRatio,Qs=null)});function q6(){if(Qs===null){if(typeof document>"u")return Qs=0,Qs;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),Qs=n}return Qs}var $o=G6,w0=Y6,w$=K6,ei=X6,ti=Z6,Vn=Q6,Fd=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=$o(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,ei(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(){ti(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(ei(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){ti(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,E=r.axis[r.draggedAxis].track,I=(a=(i=E.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,A=(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 k=C-((h=(g=E.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-r.axis[r.draggedAxis].dragOffset;k=r.draggedAxis==="x"&&r.isRtl?((y=(m=E.rect)===null||m===void 0?void 0:m[r.axis[r.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-S.size-k:k;var M=k/(I-S.size),R=M*(A-O);r.draggedAxis==="x"&&r.isRtl&&(R=!((b=e.getRtlHelpers())===null||b===void 0)&&b.isScrollingToNegative?-R:R),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=R}},this.onEndDrag=function(o){r.isDragging=!1;var i=w0(r.el),a=$o(r.el);o.preventDefault(),o.stopPropagation(),ti(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=Zs(Zs({},e.defaultOptions),n),this.classNames=Zs(Zs({},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=x$(this._onMouseMove,64),this.onWindowResize=_d(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=_d(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=_d(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:q6()}catch{return q6()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=w0(t),o=$o(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){C0&&(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(Vn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Vn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Vn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Vn(this.classNames.offset)),this.maskEl=this.el.querySelector(Vn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Vn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Vn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Vn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Vn(this.classNames.track)).concat(Vn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Vn(this.classNames.track)).concat(Vn(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Vn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(Vn(this.classNames.scrollbar)))||null,this.options.autoHide||(ei(this.axis.x.scrollbar.el,this.classNames.visible),ei(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=$o(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=$o(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&&(ei(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&&(ti(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),ei(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?ei(n.scrollbar.el,this.classNames.hover):ti(n.scrollbar.el,this.classNames.hover)):(ti(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),ti(this.axis[t].track.el,this.classNames.hover),ti(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=w0(this.el),i=$o(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,ei(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=$o(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,E=40,I=function(){r.contentWrapperEl&&(b===-1?m>C&&(m-=E,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,d.requestAnimationFrame(I)):m<C&&(m+=E,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=$o(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=w$,e.helpers=C$,e}(),$n=function(){return $n=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},$n.apply(this,arguments)};function S$(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 $6=N.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,i=S$(e,["children","scrollableNodeProps"]),a=N.useRef(),l=N.useRef(),u=N.useRef(),d={},f={};Object.keys(i).forEach(function(m){Object.prototype.hasOwnProperty.call(Fd.defaultOptions,m)?d[m]=i[m]:f[m]=i[m]});var g=$n($n({},Fd.defaultOptions.classNames),d.classNames),h=$n($n({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||Fd.defaultOptions.ariaLabel});return N.useEffect(function(){var m;return l.current=h.ref?h.ref.current:l.current,a.current&&(m=new Fd(a.current,$n($n($n({},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)}},[]),N.createElement("div",$n({"data-simplebar":"init",ref:a},f),N.createElement("div",{className:g.wrapper},N.createElement("div",{className:g.heightAutoObserverWrapperEl},N.createElement("div",{className:g.heightAutoObserverEl})),N.createElement("div",{className:g.mask},N.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:l,scrollableNodeProps:$n($n({},h),{ref:l}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):N.createElement("div",$n({},h),N.createElement("div",{className:g.contentEl},n)))),N.createElement("div",{className:g.placeholder})),N.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},N.createElement("div",{className:g.scrollbar})),N.createElement("div",{className:"".concat(g.track," simplebar-vertical")},N.createElement("div",{className:g.scrollbar})))});$6.displayName="SimpleBar";const E$=me(Yq)({flexGrow:1,height:"100%",overflow:"hidden"}),T$=me($6)(({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 e2({children:e,sx:t,...n}){return p.jsxs(p.Fragment,{children:[p.jsx(E$,{children:p.jsx(T$,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),p.jsx(Kq,{children:p.jsx(T.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function t2(e){const t=T.useTheme(),n=_r(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Jn(),{open:o,handleDrawerToggle:i,width:a}=Ni(),l=r?T.Drawer:AJ,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(T.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:p.jsxs(l,{...d,open:o,children:[p.jsx(DS,{}),p.jsx(e2,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function S0(e){const{name:t,version:n,copy:r="&copy; Applica Software Guru for"}=e;return p.jsx(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:p.jsxs(T.Typography,{variant:"caption",children:[p.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const n2=me(T.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=An();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})}}}),r2=P.forwardRef(function(t,n){const r=_r(t,{color:"text.primary"},{defaults:!0});return p.jsx(T.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),A$=P.forwardRef(function(t,n){const r=_r(t,{color:"text.primary"},{defaults:!0});return p.jsx(bu,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Js=P.forwardRef(function(t,n){const r=_r(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return p.jsx(T.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function o2({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=Us(),[i,a]=ie.useLocaleState(),l=ie.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(r2,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:p.jsxs(T.Stack,{direction:"row",spacing:.5,children:[p.jsx(T.Typography,{variant:"body1",children:i.toUpperCase()}),t?p.jsx(He.CaretUpOutlined,{}):p.jsx(He.CaretDownOutlined,{})]})}),p.jsx(T.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:l.map((d,f)=>p.jsx(T.MenuItem,{onClick:()=>u(d.locale),children:d.name},f))})]})}const I$={ml:{xs:0,lg:-2}};function i2(){const{open:e,handleDrawerToggle:t}=Ni();return p.jsx(Js,{value:"drawer","aria-label":"open drawer",sx:I$,onChange:t,selected:e,children:e?p.jsx(He.MenuFoldOutlined,{}):p.jsx(He.MenuUnfoldOutlined,{})})}function s2(e){const t=P.useRef(),n=T.useTheme(),{downLg:r,horizontal:o}=Jn(),{open:i,width:a}=Ni(),l=r?T.AppBar:n2,d={position:"fixed",color:"inherit",elevation:0,sx:_r(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||ae.extend(d,{open:i}),p.jsx(l,{ref:t,...d,children:p.jsxs(T.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&p.jsx(i2,{}),e.children]})})}function O$(e){const t=T.useTheme(),{notification:n,onClick:r,selected:o,divider:i}=e,{resource:a}=Ad(),l=ie.useNotify(),u=ie.useRedirect(),[d]=ie.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]=ie.useLocaleState(),h=P.useMemo(()=>Fr(n.created).locale(g).fromNow(),[n,g]);return p.jsx(T.ListItem,{disablePadding:!0,divider:i,children:p.jsxs(T.ListItemButton,{selected:o,onClick:f,children:[p.jsx(T.ListItemAvatar,{children:p.jsx(T.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:p.jsx(He.MessageOutlined,{})})}),p.jsx(T.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),p.jsx(T.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),p.jsx(T.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:h,primaryTypographyProps:{variant:"caption"}})]})})}function a2(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:i,resource:a,selectedIds:l=[],onUnselectItems:u}=ie.useListContext(e),d=ie.useTranslate(),f=P.useCallback(()=>{u()},[u]);return p.jsx(P$,{className:r,children:p.jsxs(T.Toolbar,{"data-test":"bulk-actions-toolbar",className:Ve(Br.toolbar,{[Br.collapsed]:l.length===0}),...ie.sanitizeListRestProps(o),children:[p.jsxs("div",{className:Br.title,children:[p.jsx(T.IconButton,{className:Br.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:f,size:"small",children:p.jsx(an.Close,{fontSize:"small"})}),p.jsx(T.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:l.length})})]}),p.jsx(H.TopToolbar,{className:Br.topToolbar,children:P.Children.map(n,g=>P.isValidElement(g)?P.cloneElement(g,{filterValues:i,resource:a,selectedIds:l}):null)})]})})}const Vi="RaBulkActionsToolbar",Br={toolbar:`${Vi}-toolbar`,topToolbar:`${Vi}-topToolbar`,buttons:`${Vi}-buttons`,collapsed:`${Vi}-collapsed`,title:`${Vi}-title`,icon:`${Vi}-icon`},P$=me("div",{name:Vi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Br.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"?lh(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},[`& .${Br.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Br.buttons}`]:{},[`& .${Br.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Br.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Br.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),E0={p:0,m:0},l2={p:2,m:0,borderRadius:0,width:"100%"};function j$(e){const{children:t}=e,[n,r]=N.useState(null);function o(y){r(y.currentTarget)}function i(){r(null)}const a=T.useMediaQuery(y=>y.breakpoints.down("md")),{filterValues:l,resource:u,selectedIds:d=[],onUnselectItems:f}=H.useListContext(e),g=!!n&&d!==void 0&&d.length>0,h=g?"simple-popover":void 0,m=N.useCallback(()=>{f(),r(null)},[f,r]);return p.jsx(T.Fade,{in:d!==void 0&&d.length>0,children:p.jsxs(T.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[p.jsx(T.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),p.jsx(T.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(T.List,{sx:E0,children:[p.jsx(T.ListItem,{sx:E0,children:p.jsx(H.Button,{onClick:m,sx:l2,label:"ra.action.unselect",startIcon:p.jsx(Pg,{}),children:p.jsx(Pg,{})})}),N.Children.map(t,y=>{var b;return p.jsx(T.ListItem,{sx:E0,children:N.isValidElement(y)?N.cloneElement(y,{filterValues:l,resource:u,selectedIds:d,sx:l2,...(b=y.props)!=null&&b.popover?{closePopover:i}:{}}):null})})]})})]})})}const c2=P.createContext({});c2.displayName="DatagridContext";function k$({children:e,value:t}){return p.jsx(c2.Provider,{value:t,children:e})}const M$=T.styled("div")(({theme:e})=>({padding:e.spacing(2),display:"flex",justifyContent:"center",gap:e.spacing(2)})),Ml="ApplicaEmpty",Wi={message:`${Ml}-message`,icon:`${Ml}-icon`,toolbar:`${Ml}-toolbar`},_$=T.styled("span",{name:Ml,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 _l({actions:e,className:t,hasCreate:n,icon:r=p.jsx(He.DropboxOutlined,{className:Wi.icon}),title:o,subtitle:i,sx:a,...l}){const{hasCreate:u}=ie.useResourceDefinition(l),d=n??u,f=ie.useResourceContext(l),g=ie.useTranslate(),h=ie.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(_$,{className:Ve(`${Ml}-root`,t),sx:a,children:[p.jsxs(T.Box,{className:Wi.message,children:[r,p.jsx(T.Typography,{variant:"h4",paragraph:!0,children:o||g(`resources.${f}.empty`,{_:y})}),i||(d?p.jsx(T.Typography,{variant:"body1",children:g(`resources.${f}.invite`,{_:b})}):null)]}),p.jsx(M$,{className:Wi.toolbar,children:e||(d?p.jsx(y3,{disableFloatingButton:!0}):null)})]})}const u2=p.jsx(H.BulkDeleteButton,{}),d2=N.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?H.PureDatagridBody:H.DatagridBody,header:o=H.DatagridHeader,children:i,className:a,empty:l,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:f=u2,hover:g,isRowSelectable:h,isRowExpandable:m,resource:y,rowClick:b,rowSx:C,rowStyle:E,size:I="small",sx:S,expandSingle:A=!1,...O}=e,k=ie.useTranslate(),{sort:M,data:R,isLoading:V,onSelect:_,onToggleItem:D,selectedIds:G,setSort:K,total:Y}=ie.useListContext(e),Z=!!f,z=P.useMemo(()=>({isRowExpandable:m,expandSingle:A}),[m,A]),J=P.useRef(null);P.useEffect(()=>{(!G||G.length===0)&&(J.current=null)},[JSON.stringify(G)]);const U=P.useCallback((Q,W)=>{const te=R.map($=>$.id),re=te.indexOf(J.current);if(J.current=W.target.checked?Q:null,W.shiftKey&&re!==-1){const $=te.indexOf(Q),fe=te.slice(Math.min(re,$),Math.max(re,$)+1),he=W.target.checked?rK(G,fe):yK(G,fe);_(h?he.filter(be=>h(R.find(ue=>ue.id===be))):he)}else D(Q)},[R,h,_,D,G]),se=p.jsx(_l,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(T.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:k("ra.navigation.no_results")})});return V===!0?p.jsx(H.DatagridLoading,{className:a,expand:u,hasBulkActions:Z,nbChildren:N.Children.count(i),size:I}):R==null||R.length===0||Y===0?l||se:p.jsx(k$,{value:z,children:p.jsxs(H.DatagridRoot,{sx:S,className:Ve(H.DatagridClasses.root,a),children:[d!=null&&P.isValidElement(d)?P.cloneElement(d,{selectedIds:G,total:Y}):f!==!1?p.jsx(a2,{children:P.isValidElement(f)?f:u2}):null,p.jsx("div",{className:H.DatagridClasses.tableWrapper,children:p.jsxs(T.Table,{ref:t,className:H.DatagridClasses.table,size:I,...B$(O),children:[f2(o,{children:i,sort:M,data:R,hasExpand:!!u,hasBulkActions:Z,isRowSelectable:h,onSelect:_,resource:y,selectedIds:G,setSort:K},i),f2(r,{expand:u,rowClick:b,data:R,hasBulkActions:Z,hover:g,onToggleItem:U,resource:y,rowSx:C,rowStyle:E,selectedIds:G,isRowSelectable:h},i)]})})]})})});function f2(e,t,n){return P.isValidElement(e)?P.cloneElement(e,t,n):P.createElement(e,t,n)}const F$=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function B$(e){return Object.keys(ie.sanitizeListRestProps(e)).filter(t=>!F$.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}d2.displayName="Datagrid";const D$=me(d2,{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 R$(e){return p.jsx(D$,{...e})}const T0=P.createContext({hasFilterSidebar:!1});function p2(){var e;return((e=P.useContext(T0))==null?void 0:e.hasFilterSidebar)??!1}function A0({source:e,value:t}){const n=P.useContext(H.FilterContext),r=H.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):Qe.isFunction(i.chip)?P.createElement(i.chip,a):null}function L$(e){const{value:t,source:n,lastItem:r}=e,o=A0({source:n,value:t});return p.jsxs(T.Stack,{children:[p.jsx(T.ListItem,{alignItems:"flex-start",sx:{pl:0},children:p.jsx(T.ListItemText,{primary:o,sx:{my:0}})}),r===n?null:p.jsx(T.Divider,{})]})}function N$(){const{filterValues:e}=ie.useListContext(),t=ie.useTranslate();return p.jsxs(T.Stack,{mt:4,width:"100%",children:[p.jsx(T.Typography,{variant:"h6",fontWeight:"bold",color:"secondary",children:t("ra.title.selected_filters")}),p.jsx(T.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(L$,{lastItem:i,value:r,source:n},n)}):null})]})}function V$(e){const{onClose:t,addQuery:n}=e,r=ie.useTranslate(),{handleSubmit:o}=ln.useFormContext(),i=P.useCallback(a=>{n(a.queryName)},[n]);return p.jsxs(T.Toolbar,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[p.jsx(T.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(T.Button,{variant:"contained",onClick:o(i),children:r("ra.action.save")})]})}function h2(e){const{open:t,onClose:n}=e,{filterValues:r,sort:o,perPage:i,displayedFilters:a,resource:l}=ie.useListContext(),[u,d]=I4(l),f=ie.useTranslate(),g=P.useCallback(m=>{const y={label:m.trim(),value:{filter:r,sort:o,perPage:i,displayedFilters:a}},b=O4(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(T.Dialog,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:p.jsxs($g,{toolbar:p.jsx(V$,{addQuery:g,onClose:n}),title:f("ra.title.save_favorite_filter"),modal:!0,children:[p.jsx(xr,{fullWidth:!0,source:"queryName",label:f("ra.input.query_name"),placeholder:f("ra.input.query_name_placeholder"),validate:[ie.required(),h()]}),p.jsx(N$,{})]})})}function g2(){const[e,t]=P.useState(!1),n=ie.useTranslate(),r=P.useCallback(()=>{t(!1)},[]),o=P.useCallback(()=>{t(!0)},[]);return p.jsxs(p.Fragment,{children:[p.jsx(T.Button,{sx:{height:"36px"},variant:"contained",onClick:o,children:n("ra.action.save_filter")}),p.jsx(h2,{open:e,onClose:r})]})}function W$(e){const{onDelete:t,value:n,source:r}=e,o=A0({source:r,value:n});return o&&p.jsx(T.Chip,{label:o,variant:"combined",color:"primary",sx:{height:"36px","& .MuiChip-deleteIcon":{fontSize:"1rem !important",mr:1}},deleteIcon:p.jsx(an.Close,{}),onDelete:t})}function z$(){const{filterValues:e,setFilters:t}=ie.useListContext(),n=T.useTheme(),r=T.useMediaQuery(n.breakpoints.down("sm")),o=ie.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(T.Stack,{flexDirection:"row",gap:2,children:[p.jsx(g2,{}),p.jsx(T.Button,{variant:"outlined",onClick:i,children:o("ra.action.reset_filters")})]}),[i,o]);return p.jsxs(T.Stack,{gap:2,flexDirection:r?"column":"row",children:[p.jsxs(T.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(W$,{source:u,value:d,onDelete:()=>a(u)},u)),r?null:p.jsx(l,{})]}),r?p.jsx(l,{}):null]})}function I0(){const{filterValues:e}=ie.useListContext(),t=T.useTheme(),n=T.useMediaQuery(t.breakpoints.down("sm")),r=ie.useTranslate();return e&&!Qe.isEmpty(e)?p.jsxs(T.Stack,{flexDirection:n?"column":"row",alignItems:"baseline",gap:2,m:n?2:0,children:[p.jsx(T.Typography,{variant:"h6",color:"secondary",whiteSpace:"nowrap",children:r("ra.title.active_filters")}),p.jsx(z$,{})]}):null}function m2({open:e,onClose:t,filterToRemove:n}){var y;const r=ie.useTranslate(),{resource:o,filterValues:i,sort:a,perPage:l,displayedFilters:u}=ie.useListContext(),d=((y=n==null?void 0:n.value)==null?void 0:y.filter)||i,f=(n==null?void 0:n.label)??"",[g,h]=H.useSavedQueries(o);function m(){const b={filter:d,sort:a,perPage:l,displayedFilters:u},C=H.extractValidSavedQueries(g),E=C.findIndex(I=>vl(I.value,b));h([...C.slice(0,E),...C.slice(E+1)]),t()}return p.jsxs(T.Dialog,{open:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[p.jsx(T.DialogTitle,{id:"alert-dialog-title",children:r("ra.saved_queries.remove_dialog_title",{label:f,_:"Remove saved query?"})}),p.jsx(T.DialogContent,{children:p.jsx(T.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(T.DialogActions,{children:[p.jsx(T.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(T.Button,{onClick:m,color:"primary",autoFocus:!0,children:r("ra.action.confirm")})]})]})}function U$(e){const{query:t}=e,[n,r]=P.useState(!1),o=P.useCallback(()=>{r(a=>!a)},[]),i=ie.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(T.Button,{size:"small",color:"primary",onClick:o,children:i("ra.action.delete")}),p.jsx(m2,{open:n,onClose:o,filterToRemove:t})]})}function v2(e){const{closeSidebar:t}=e,{resource:n,setFilters:r,setSort:o,setPage:i,setPerPage:a}=ie.useListContext(),[l,u]=P.useState(!1),d=St(),[f]=I4(n),g=O4(f),h=ie.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(T.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(T.Accordion,{expanded:l,onChange:m,children:[p.jsx(T.AccordionSummary,{sx:{px:"20px"},expandIcon:p.jsx($w,{fontSize:"small"}),children:p.jsxs(T.Typography,{variant:"h5",fontWeight:"bold",children:[h("ra.action.saved_filters")," (",g.length,")"]})}),g==null?void 0:g.map((b,C)=>p.jsxs(T.AccordionDetails,{sx:{display:"flex",justifyContent:"space-between",px:"20px",alignItems:"center"},children:[p.jsx(T.Typography,{variant:"body1",children:b.label}),p.jsxs(T.Stack,{flexDirection:"row",alignItems:"center",children:[p.jsx(U$,{query:b}),p.jsx(T.Button,{size:"small",color:"primary",onClick:()=>y({value:b.value}),children:h("ra.action.apply")})]})]},C))]})}):p.jsx(T.Box,{height:16})}function H$(e){const{sx:t}=e;return p.jsx(T.Box,{sx:{...t,flex:"1 1 auto",backgroundColor:"background.paper",overflowY:"auto"},children:e.children})}const G$=444;function Y$(e){const{sx:t,anchor:n="right",variant:r="temporary",open:o=!1,onClose:i}=e,a=T.useTheme(),u=T.useMediaQuery(a.breakpoints.down("sm"))?"bottom":n,d=P.useCallback(()=>{Qe.isFunction(i)&&i()},[i]),f={backgroundImage:"none",boxShadow:"-10px 4px 42px 0px rgba(0, 0, 0, 0.25)",width:{sm:"30%"},maxWidth:{sm:G$},[a.breakpoints.down("sm")]:{width:"100% !important",maxWidth:"100% !important"}};return p.jsx(T.Drawer,{...e,anchor:u,onClose:d,open:o,PaperProps:{sx:{...f,...t}},variant:r,children:e.children})}function K$(e){return p.jsxs(T.Box,{children:[p.jsx(T.Divider,{}),p.jsx(T.Box,{bgcolor:"background.paper",px:2,py:2.5,children:e.children})]})}function X$(e){const{sx:t}=e;return p.jsxs(T.Box,{children:[p.jsx(T.Stack,{alignItems:"center",bgcolor:"background.paper",direction:"row",px:2.5,py:2,spacing:2,minHeight:"64px",sx:t,children:e.children}),p.jsx(T.Divider,{sx:{opacity:.6}})]})}function Z$(e){const{primary:t,secondary:n}=e;return p.jsxs(T.Box,{display:"inline-flex",flexGrow:1,flexShrink:1,flexDirection:"column",children:[t?p.jsx(T.Typography,{variant:"h5",children:t}):null,n?p.jsx(T.Typography,{variant:"h6",children:n}):null]})}function Q$(e){return p.jsx(T.Box,{display:"inline-flex",flexGrow:0,flexShrink:0,children:e.children})}const wr=Y$;wr.Content=H$,wr.Footer=K$,wr.Header=X$,wr.HeaderText=Z$,wr.HeaderAction=Q$;function J$(e){const{form:t,filters:n}=e,r=ie.useResourceContext();return p.jsx(H.FilterContext.Provider,{value:Array.isArray(n)?n:[n],children:p.jsx(ln.FormProvider,{...t,children:p.jsx(T.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(T.Box,{mb:1,children:P.cloneElement(o,{...a,resource:r})},i):null}):null})})})}function Bd(e){const{filters:t}=e,[n,r]=P.useState(!1),{setSidebarOpen:o,sidebarOpen:i}=j0(),{filterValues:a,setFilters:l}=ie.useListContext(),u=ie.useTranslate(),d=ln.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(k=>{O[k.props.source]=(a==null?void 0:a[k.props.source])??""}),O},[t,a]);P.useEffect(()=>{const O=H.getFilterFormValues(g(),a),k=g();Qe.isEqual(O,k)||h(O)},[JSON.stringify(a),a,g,h]);const C=P.useCallback(()=>{Qe.isFunction(o)&&o(!1)},[o]),E=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]),A=P.useMemo(()=>{const O=g();return Qe.isEmpty(b)||Qe.isEqual(O,b)},[b,g,y]);return p.jsxs(wr,{sx:{height:"100%"},open:i,onClose:C,children:[p.jsxs(wr.Header,{children:[p.jsx(wr.HeaderText,{primary:u("ra.action.add_filter")}),p.jsx(wr.HeaderAction,{children:p.jsx(wC,{variant:"text",loading:n,loadingPosition:"start",startIcon:p.jsx(He.ReloadOutlined,{}),onClick:S,children:u("ra.action.reset_filters")})})]}),p.jsxs(wr.Content,{children:[p.jsx(v2,{closeSidebar:C}),p.jsx(J$,{form:d,filters:t})]}),p.jsx(wr.Footer,{children:p.jsxs(T.Stack,{direction:"row",spacing:2,children:[p.jsx(T.Button,{fullWidth:!0,onClick:()=>{h({}),C()},children:u("ra.action.close")}),p.jsx(T.Button,{fullWidth:!0,disabled:A,variant:"contained",color:"primary",onClick:f(E),children:u("ra.action.apply_filters")})]})})]})}function q$(){const{setSidebarOpen:e}=j0(),t=P.useContext(H.FilterContext),n=p2(),r=H.useTranslate(),o=T.useTheme(),i=T.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(()=>{Qe.isFunction(e)&&e(!0)},[e]);return i?p.jsxs(T.Button,{className:"add-filter",onClick:a,children:[p.jsx(an.FilterList,{sx:{fontSize:"1rem",mr:.5}}),p.jsx(T.Typography,{variant:"h6",children:r("ra.action.add_filter")})]}):p.jsx(Di,{label:"ra.action.add_filter",onClick:a,children:p.jsx(an.FilterList,{})})}function y2(e){const{filters:t,actions:n,className:r,hasFilterSidebar:o,...i}=e,a=St(),l=T.useMediaQuery(a.breakpoints.down("sm")),u=n?P.cloneElement(n,{...i,...n.props}):null,{filterValues:d}=ie.useListContext();return Array.isArray(t)?p.jsx(T0.Provider,{value:{hasFilterSidebar:o},children:p.jsx(H.FilterContext.Provider,{value:t,children:l&&o?p.jsxs("div",{children:[u,Qe.isEmpty(d)?null:p.jsxs("div",{children:[p.jsx(T.Divider,{}),p.jsx(I0,{})]})]}):p.jsxs(b2,{className:r,children:[o?p.jsx(I0,{}):p.jsx(H.FilterForm,{}),p.jsx("span",{}),u]})})}):p.jsxs(b2,{className:r,children:[t?P.cloneElement(t,{...i,context:"form"}):null,p.jsx("span",{}),n?P.cloneElement(n,{...i,filters:t,...n.props}):null]})}y2.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 b2=me("div",{name:"RaListToolbar",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"}})),x2=P.memo(y2),$$=p.jsx(H.ListActions,{}),eee=p.jsx(H.Pagination,{}),tee=p.jsx(_l,{}),nee=T.Card;function ree(e){const{actions:t=$$,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:i,hasCreate:a,pagination:l=eee,children:u,className:d,component:f=nee,title:g,empty:h=tee,...m}=e,{defaultTitle:y,data:b,error:C,isLoading:E,filterValues:I,resource:S}=ie.useListContext(e),A=St(),O=N.isValidElement(n)&&(n==null?void 0:n.type)!==Bd,k=N.isValidElement(n)&&(n==null?void 0:n.type)===Bd;if(!u||!b&&E&&i)return null;function M(Z){return p.jsxs("div",{className:to.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?A.palette.mode==="dark"?A.palette.divider:A.palette.grey.A800:"transparent",backgroundColor:O?A.palette.background.paper:"transparent"},children:[r||t?p.jsx(x2,{className:to.actions,filters:r,actions:t,hasCreate:a,hasFilterSidebar:k}):null,!C&&p.jsx(f,{className:to.content,sx:Z?{background:"transparent"}:{},children:o&&u&&N.isValidElement(u)?P.cloneElement(u,{bulkActionButtons:o}):u}),C?p.jsx(jg,{error:C,resetErrorBoundary:null}):l!==!1&&l]})}function R(){return h!==!1&&P.cloneElement(h,{className:to.noResults,hasCreate:a})}const V=!E&&(b==null?void 0:b.length)===0,_=!E&&(b==null?void 0:b.length)===0&&!Object.keys(I).length&&h!==!1,D=N.isValidElement(n),G=D&&(n==null?void 0:n.type)===Bd,K=E||_||D&&!G?N.Fragment:Fn,Y=!E&&!_&&(!n||G)?{content:!1}:void 0;return p.jsxs(iee,{className:Ve("list-page",d),...m,sx:V?{"& .MuiPaper-root":{backgroundColor:"transparent",border:"none"},"& .RaList-actions":{border:"1px solid",borderRadius:`${A.shape.borderRadius}px`,borderColor:A.palette.mode==="dark"?A.palette.divider:A.palette.grey.A800,backgroundColor:A.palette.background.paper}}:{},children:[p.jsx(H.Title,{title:g,defaultTitle:y,preferenceKey:`${S}.list.title`}),p.jsx(K,{...Y,children:E?p.jsx(T.CircularProgress,{sx:{position:"absolute",top:"50%",left:"50%",marginTop:"-20px",marginLeft:"-20px"}}):_?R():M(V)}),O?p.jsx(oee,{aside:n}):null,k?N.cloneElement(n,{filters:r}):null]})}function oee({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=St();return p.jsx(T.Card,{className:to.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(T.CardContent,{sx:{pt:1},children:P.cloneElement(e,{})})})}const qs="RaList",to={main:`${qs}-main`,content:`${qs}-content`,actions:`${qs}-actions`,noResults:`${qs}-noResults`,asideCard:`${qs}-asideCard`},iee=me("div",{name:qs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex","& >.MuiPaper-root":{flex:1},[`& .${to.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${to.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${to.actions}`]:{},[`& .${to.noResults}`]:{alignContent:"center"},[`& .${to.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${H.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${H.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}})),O0=P.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:i="small",className:a,...l}=e,u=ie.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return p.jsx(C2,{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(C2,{className:a,children:p.jsx(T.Pagination,{size:i,count:d,page:t+1,onChange:(g,h)=>o(g,h-1),...see(l),getItemAriaLabel:f})})});O0.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 C2=me("div",{name:"RaPaginationActions",overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function see({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const P0=P.memo(e=>{const{rowsPerPageOptions:t=aee,actions:n,limit:r=null,...o}=e,{isLoading:i,hasNextPage:a,page:l,perPage:u,total:d,setPage:f,setPerPage:g}=ie.useListPaginationContext(e),h=ie.useTranslate(),m=T.useMediaQuery(_=>_.breakpoints.down("md")),[y,b]=P.useState(l-1),{hasCreate:C}=ie.useResourceDefinition(e),[E,I]=P.useState(!1);P.useEffect(()=>{l!==y+1&&!E&&b(l-1)},[y,E,l]),P.useEffect(()=>{I(!1)},[l]);const S=P.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),A=P.useCallback(Qe.debounce(_=>{f(_+1)},500),[f]),O=P.useCallback((_,D)=>{var Y,Z;if(!_)return;if(_.preventDefault(),D<0||S!==void 0&&D>S-1)throw new Error(h("ra.navigation.page_out_of_boundaries",{page:D+1}));const G=(((Y=_.target.dataset)==null?void 0:Y.testid)||((Z=_.target.classList)==null?void 0:Z.value))??"",K=G.includes("MuiPaginationItem-previousNext")||G.includes("NavigateBeforeIcon")||G.includes("NavigateNextIcon")||G.includes("KeyboardArrowLeftIcon")||G.includes("KeyboardArrowRightIcon");b(D),I(!0),K?A(D):f(D+1)},[A,f,h,S,I]),k=P.useCallback(_=>{g(Number(_.target.value))},[g]),M=P.useCallback(({from:_,to:D,count:G})=>G===-1&&a?h("ra.navigation.partial_page_range_info",{offsetBegin:_,offsetEnd:D,_:"%{from}-%{to} of more than %{to}"}):h("ra.navigation.page_range_info",{offsetBegin:_,offsetEnd:D,total:G===-1?D:G,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[h,a]),R=P.useCallback(_=>h(`ra.navigation.${_}`,{_:`Go to ${_} page`}),[h]);if(i)return p.jsx(T.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(T.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,rowsPerPageOptions:lee,component:"span",labelDisplayedRows:M,sx:{justifyContent:C?"flex-start":"flex-end",display:C?"flex":"block"},...ie.sanitizeListRestProps(o)});const V=n||(!i&&d!=null?O0:void 0);return p.jsx(T.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,onRowsPerPageChange:k,ActionsComponent:V,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:h("ra.navigation.page_rows_per_page"),labelDisplayedRows:M,getItemAriaLabel:R,rowsPerPageOptions:t,...ie.sanitizeListRestProps(o)})});P0.propTypes={actions:ie.ComponentPropType,limit:x.element,rowsPerPageOptions:x.arrayOf(x.oneOfType([x.number,x.shape({label:x.string.isRequired,value:x.number.isRequired})]))};const aee=[5,10,25,50],lee=[],w2=P.createContext({sidebarOpen:!1,setSidebarOpen:()=>{}});function S2(e){const[t,n]=P.useState(!1);return p.jsx(w2.Provider,{value:{sidebarOpen:t,setSidebarOpen:n},children:e.children})}function j0(){return P.useContext(w2)}function cee({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=uee,filterDefaultValues:i,perPage:a=10,queryOptions:l,resource:u,sort:d,storeKey:f,...g}){return p.jsx(ie.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(S2,{children:p.jsx(ree,{...g})})})}const uee={},dee=rl(cee,{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 fee(e){return p.jsx(dee,{...e,pagination:p.jsx(P0,{})})}function pee(){const e=H.useRefresh(),t=H.useNotify(),n=H.useResourceContext(),r=H.useUnselectAll(n),{selectedIds:o,data:i}=H.useListContext(),a=H.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)),[u,{isLoading:d}]=H.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(H.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:f,children:p.jsx(an.Email,{})})}function hee(){const e=H.useRefresh(),t=H.useNotify(),n=H.useResourceContext(),r=H.useUnselectAll(n),{selectedIds:o,data:i}=H.useListContext(),a=H.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)).concat([a]),[u,{isLoading:d}]=H.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(H.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:f,children:p.jsx(an.Drafts,{})})}function gee(e){const t=H.useRecordContext(e),n=H.useResourceContext(e),r=H.useRedirect(),o=H.useNotify(),i=H.useTranslate(),[a]=H.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]=H.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(T.Typography,{variant:"subtitle1",children:p.jsxs(T.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),p.jsx(T.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(T.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:i("ra.notification.readed",{readed:l})}):null]})}function mee({...e}){const t=T.useTheme(),{mode:n,colorize:r,density:o}=P.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?T.darken:T.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(H.Datagrid,{...e,rowSx:i,children:[p.jsx(gee,{source:"notification",sortable:!1}),p.jsx(G5,{source:"created"}),p.jsxs(Go,{children:[p.jsx(pee,{}),p.jsx(hee,{})]})]})}function vee({empty:e,...t}){const n=H.useTranslate(),r=p.jsx(_l,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(T.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:n("ra.navigation.no_results")})});return p.jsx(H.SimpleList,{...t,empty:e||r})}const yee={width:36,height:36,fontSize:"1rem"},bee={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function E2(){const{enable:e}=Ad();return e?p.jsx(xee,{}):null}function xee(){const e=ie.useTranslate(),t=T.useTheme(),n=ie.useRefresh(),r=ie.useNotify(),{downMd:o}=Jn(),{resource:i}=Ad(),[a,l]=P.useState([]),{data:u,isLoading:d}=ie.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}=Us();P.useEffect(()=>{!d&&u&&l(u??[])},[u,d]);const b=a.filter(I=>!I.readed).map(I=>I.id),[C]=ie.useUpdateMany(i,{ids:b,data:{readed:Fr().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),E=P.useCallback(()=>{C()},[C]);return p.jsxs(p.Fragment,{children:[p.jsx(Js,{value:"notifications",selected:g,onChange:y,children:p.jsx(T.Badge,{badgeContent:f,color:"primary",children:p.jsx(He.BellOutlined,{})})}),p.jsx(T.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:h,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:I})=>p.jsx(Ho,{type:"grow",position:o?"top":"top-right",in:g,...I,children:p.jsx(T.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:p.jsx(T.ClickAwayListener,{onClickAway:m,children:p.jsxs(Fn,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:p.jsx(p.Fragment,{children:f>0&&p.jsx(T.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:E,children:p.jsx(bu,{color:"success",size:"small",children:p.jsx(He.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[a.length===0?p.jsx(_l,{hasCreate:!1,title:p.jsx(T.Typography,{variant:"h5",children:e("ra.notification.empty")}),sx:{"& .ApplicaEmpty-icon":{fontSize:"60px"},"& .ApplicaEmpty-toolbar":{display:"none"}}}):p.jsxs(p.Fragment,{children:[p.jsx(T.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":yee,"& .MuiListItemSecondaryAction-root":{...bee,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((S,A)=>p.jsx(O$,{selected:f>0,notification:S,onClick:m,divider:A<a.length-1},S.id))}),p.jsx(T.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${i}`,LinkComponent:dt.Link,onClick:m,children:p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})})]}),p.jsx(T.Divider,{})]})})})})})]})}function T2(){const[e,t]=P.useState(!1),n=P.useCallback(()=>t(!1),[t]),r=P.useCallback(()=>t(!0),[t]),o=ie.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsxs(T.ListItemButton,{onClick:r,children:[p.jsx(T.ListItemIcon,{children:p.jsx(an.Key,{})}),p.jsx(T.ListItemText,{primary:o("ra.auth.change_password")})]}),p.jsx(T.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:p.jsx(t0,{onSuccess:n})})]})}function A2(){const e=ie.useLogout(),t=ie.useTranslate();return p.jsx(p.Fragment,{children:p.jsxs(T.ListItemButton,{onClick:e,children:[p.jsx(T.ListItemIcon,{children:p.jsx(an.LogoutOutlined,{})}),p.jsx(T.ListItemText,{primary:t("ra.auth.logout")})]})})}function I2(){const e=ie.useTranslate(),t=ie.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(T.ListItemButton,{onClick:n,children:[p.jsx(T.ListItemIcon,{children:p.jsx(an.LogoutOutlined,{})}),p.jsx(T.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function O2(e){var b;const{roles:t}=e,n=T.useTheme(),r=ie.useDataProvider(),{identity:o}=ie.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}=Us(),h=ie.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(E=>E.name.replace("ROLE_","")).join(",")},[t,o]);return p.jsxs(p.Fragment,{children:[p.jsx(Js,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:p.jsxs(T.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[p.jsx(pu,{alt:(b=o==null?void 0:o.name)==null?void 0:b.toUpperCase(),src:a,size:"xs"}),p.jsx(T.Typography,{variant:"subtitle1",children:o==null?void 0:o.name})]})}),p.jsx(Ih,{placement:"bottom-end",open:u,anchorEl:d,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:C})=>p.jsx(Ho,{type:"grow",position:"top-right",in:u,...C,children:p.jsx(T.Paper,{sx:{boxShadow:n.customShadows.z1,width:290,minWidth:240,maxWidth:290,[n.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(T.ClickAwayListener,{onClickAway:g,children:p.jsxs(Fn,{elevation:0,border:!1,content:!1,children:[p.jsx(T.CardContent,{sx:{px:2.5,pt:3},children:p.jsxs(T.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[p.jsx(T.Grid,{item:!0,children:p.jsxs(T.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[p.jsx(pu,{alt:"profile user",src:a,sx:{width:32,height:32}}),p.jsxs(T.Stack,{children:[p.jsx(T.Typography,{variant:"h6",children:o==null?void 0:o.name}),p.jsx(T.Typography,{variant:"body2",color:"textSecondary",children:y})]})]})}),p.jsx(T.Grid,{item:!0,children:p.jsx(T.Tooltip,{title:"Logout",children:p.jsx(bu,{size:"large",sx:{color:"text.primary"},onClick:m,children:p.jsx(He.LogoutOutlined,{})})})})]})}),p.jsx(T.Grid,{container:!0,children:p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[p.jsx(T2,{}),p.jsx(A2,{}),p.jsx(I2,{})]})})})]})})})})})]})}function P2(e){const t=St(),{downMd:n}=Jn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=Us();return n?p.jsxs(p.Fragment,{children:[p.jsx(Js,{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(He.MoreOutlined,{})}),p.jsx(T.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(Ho,{type:"fade",in:r,...l,children:p.jsx(T.Paper,{sx:{boxShadow:t.customShadows.z1},children:p.jsx(T.ClickAwayListener,{onClickAway:a,children:p.jsx(T.AppBar,{color:"inherit",children:p.jsx(T.Toolbar,{children:e.children})})})})})})]}):p.jsx(p.Fragment,{children:e.children})}function j2(e){return p.jsx(T.Box,{...e,flex:1})}function k2(e){const t=T.useTheme(),n=T.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=An();return t.shadows[4]=t.customShadows.z1,p.jsx(T.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(T.Container,{maxWidth:r?"xl":!1,children:p.jsx(T.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function M2(e){const{horizontal:t}=Jn();return t?p.jsx(k2,{children:e.children}):p.jsx(t2,{children:e.children})}function Fl({item:e,level:t}){const n=St(),{horizontal:r,downLg:o}=Jn(),{drawerOpen:i,openItem:a,activeItem:l,openDrawer:u}=El();let d="_self";e.target&&(d="_blank");const f=(e==null?void 0:e.external)!==!1?{component:P.forwardRef((E,I)=>p.jsx(dt.Link,{...E,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(E=>E===e.id)>-1,{pathname:y}=dt.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(T.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(T.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(T.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(mh,{size:4,color:m?"primary":"secondary"})}),p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",color:"inherit",children:e.title})}),(i||!i&&t!==1)&&e.chip?p.jsx(T.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(T.Avatar,{children:e.chip.avatar}):null}):null]}):p.jsxs(T.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(T.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(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",sx:{color:m?C:b},children:e.title})}):null,(i||!i&&t!==1)&&e.chip?p.jsx(T.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(T.Avatar,{children:e.chip.avatar}):null}):null]})})}const _2=me(T.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 Bl({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:i,selectedLevel:a}){var U;const l=St(),{activeItem:u}=El(),{horizontal:d}=Jn(),{drawerOpen:f}=El(),g=dt.useNavigate(),[h,m]=P.useState(!1),[y,b]=P.useState(null),[C,E]=P.useState(null);function I(se){E(null),i(t),f?(m(!h),b(y?null:e.id),r(y?"":e.id),e.url&&g(`${e.url}`)):E(se==null?void 0:se.currentTarget)}function S(){f||e.url&&g(`${e.url}`)}function A(se){E(se==null?void 0:se.currentTarget)}function O(){m(!1),b(null),E(null)}P.useMemo(()=>{y===o?t===1&&m(!0):t===a&&(m(!1),b(null))},[o,t,y,a]);const{pathname:k}=dt.useLocation(),M=!!C;function R(se,Q){se.forEach(W=>{W.url===k&&(m(!0),b(Q))})}P.useEffect(()=>{m(!1),b(null),M&&E(null),e.children&&e.children.forEach(se=>{var Q;(Q=se.children)!=null&&Q.length&&R(se.children,e.id),se.url===k&&(b(e.id),m(!0)),k.includes(se.url)&&(b(e.id),m(!0))})},[k,e.children]),P.useEffect(()=>{e.url===k&&y!==e.id&&(u([e.id]),b(e.id),E(null),m(!0))},[k,e,y,u]);const V=(U=e.children)==null?void 0:U.map(se=>{switch(se.type){case"collapse":return p.jsx(Bl,{setSelectedItems:r,setSelectedLevel:i,selectedLevel:a,selectedItems:o,menu:se,level:t+1,parentId:n},se.id);case"item":return p.jsx(Fl,{item:se,level:t+1},se.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},se.id)}}),_=y===e.id,D=t===1?p.jsx(He.BorderOutlined,{style:{fontSize:"1rem"}}):!1,G=e.icon,K=e.icon?p.jsx(G,{style:{fontSize:f?"1rem":"1.25rem"}}):D,Y=l.palette.mode==="dark"?"grey.400":"text.primary",Z=l.palette.mode==="dark"&&f?l.palette.text.primary:l.palette.primary.main,z=M?`collapse-pop-${e.id}`:void 0,J={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return p.jsx(p.Fragment,{children:d?p.jsx(p.Fragment,{children:p.jsxs(T.ListItemButton,{id:`boundary-${z}`,disableRipple:!0,selected:_,onMouseEnter:A,onMouseLeave:O,onClick:A,"aria-describedby":z,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[p.jsxs(T.Box,{onClick:S,sx:J,children:[K?p.jsx(T.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:l.palette.secondary.dark},children:K}):null,!K&&t!==1&&p.jsx(T.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:p.jsx(mh,{size:4,color:_?"primary":"secondary"})}),p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),M?p.jsx(He.RightOutlined,{}):p.jsx(He.DownOutlined,{})]}),C?p.jsx(_2,{id:z,open:M,anchorEl:C,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:se})=>p.jsx(Ho,{in:M,...se,children:p.jsx(T.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:l.shadows[8],backgroundImage:"none"},children:p.jsx(T.ClickAwayListener,{onClickAway:O,children:p.jsx(T.Box,{children:V})})})})}):null]})}):p.jsxs(p.Fragment,{children:[p.jsxs(T.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:Z,"&:hover":{color:Z,bgcolor:l.palette.mode==="dark"?"divider":"transparent"}}},...!f&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[K?p.jsx(T.ListItemIcon,{onClick:S,sx:{minWidth:28,color:y===e.id?"primary.main":Y,...!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:K}):null,f||!f&&t!==1?p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",color:y===e.id?"primary":Y,children:e.title}),secondary:e.caption?p.jsx(T.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,f||!f&&t!==1?M||h?p.jsx(He.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:l.palette.primary.main}}):p.jsx(He.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!f&&p.jsx(_2,{open:M,anchorEl:C,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:se})=>p.jsx(Ho,{in:M,...se,children:p.jsx(T.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:l.customShadows.z1,backgroundImage:"none",border:`1px solid ${l.palette.divider}`},children:p.jsx(T.ClickAwayListener,{onClickAway:O,children:p.jsx(T.Box,{children:V})})})})})]}),f?p.jsx(T.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:p.jsx(T.List,{sx:{p:0},children:V})}):null]})})}const Cee=me(T.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 F2({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:i,setSelectedLevel:a,selectedLevel:l}){var z,J;const u=St(),d=H.useTranslate(),{pathname:f}={pathname:""},{horizontal:g,downLg:h}=Jn(),m=El(),{drawerOpen:y,selectedID:b,activeID:C}=m,[E,I]=P.useState(null),[S,A]=P.useState(e),O=!!E;P.useEffect(()=>{if(t)if(e.id===r){const U={...e},se=n.map(Q=>Q.elements);U.children=se.flat(1),A(U)}else A(e)},[e,t,h]);function k(U,se){U.forEach(Q=>{var W;(W=Q.children)!=null&&W.length&&k(Q.children,S.id),Q.url===f&&C(se)})}function M(U){(U.children?U.children:[]).forEach(Q=>{var W;(W=Q.children)!=null&&W.length&&k(Q.children,S.id),Q.url===f&&C(S.id)})}P.useEffect(()=>{M(S),O&&I(null)},[f,S]);function R(U){O||I(U==null?void 0:U.currentTarget)}function V(){I(null)}const _=S==null?void 0:S.icon,D=S!=null&&S.icon?p.jsx(_,{style:{fontSize:20,stroke:"1.5",color:b===S.id?u.palette.primary.main:u.palette.secondary.dark}}):null,G=(z=e.children)==null?void 0:z.map(U=>{switch(U.type){case"collapse":return p.jsx(Bl,{menu:U,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i,level:1,parentId:S.id},U.id);case"item":return p.jsx(Fl,{item:U,level:1},U.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},U.id)}}),K=n.map((U,se)=>{var Q;return p.jsxs(P.Fragment,{children:[U.title?p.jsx(T.Typography,{variant:"caption",sx:{pl:2},children:U.title}):null,(Q=U==null?void 0:U.elements)==null?void 0:Q.map(W=>{switch(W.type){case"collapse":return p.jsx(Bl,{menu:W,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},W.id);case"item":return p.jsx(Fl,{item:W,level:1},W.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}})]},se)}),Y=(J=S.children)==null?void 0:J.map(U=>{switch(U.type){case"collapse":return p.jsx(Bl,{menu:U,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},U.id);case"item":return p.jsx(Fl,{item:U,level:1},U.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},U.id)}}),Z=O?`group-pop-${e.id}`:void 0;return p.jsx(p.Fragment,{children:g?p.jsx(T.List,{children:p.jsxs(T.ListItemButton,{selected:b===S.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:R,onClick:R,onMouseLeave:V,"aria-describedby":Z,children:[D?p.jsx(T.ListItemIcon,{sx:{minWidth:28},children:S.id===r?p.jsx(He.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):D}):null,p.jsx(T.ListItemText,{sx:{mr:1},primary:p.jsx(T.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(He.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):p.jsx(He.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),E?p.jsx(Cee,{id:Z,open:O,anchorEl:E,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:U})=>p.jsx(Ho,{in:O,...U,children:p.jsx(T.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:p.jsx(T.ClickAwayListener,{onClickAway:V,children:p.jsx(T.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?Y:K})})})})}):null]})}):p.jsx(T.List,{subheader:e.title&&y?p.jsxs(T.Box,{sx:{pl:3,mb:1.5},children:[p.jsx(T.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?p.jsx(T.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:y&&e.title?1.5:0,py:0,zIndex:0},children:G})})}function B2(e){const{horizontal:t}=Jn(),{open:n}=Ni(),r=_r(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return p.jsx(T.Box,{sx:r,children:e.children})}function D2(e){const{horizontal:t}=Jn(),{menu:n,isLoading:r}=Mg(),[o,i]=P.useState(""),[a,l]=P.useState(0),{horizontalMaxItems:u}=An(),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(B2,{...e,children:!r&&ae.map((n??[]).slice(0,f+1),m=>{const{type:y}=m;switch(y){case"group":return p.jsx(F2,{item:m,setSelectedItems:i,setSelectedLevel:l,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:h},m.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},m.id)}})})}function wee({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:i}){const a=ie.useTranslate();return p.jsx(Ih,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:l})=>p.jsx(Ho,{type:"grow",position:"top-right",in:e,...l,children:p.jsx(T.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(T.ClickAwayListener,{onClickAway:n,children:p.jsx(Fn,{elevation:0,border:!1,content:!1,children:p.jsxs(T.List,{children:[p.jsxs(T.ListItemButton,{selected:o==="light",onClick:()=>i("light"),children:[p.jsx(He.SunOutlined,{}),p.jsx(T.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),p.jsxs(T.ListItemButton,{selected:o==="dark",onClick:()=>i("dark"),children:[p.jsx(He.MoonOutlined,{}),p.jsx(T.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),p.jsxs(T.ListItemButton,{selected:o==="auto",onClick:()=>i("auto"),children:[p.jsx(an.Brightness6,{}),p.jsx(T.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function R2(){const e=T.useTheme(),{mode:t,setMode:n}=An(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=Us(),l=P.useCallback(d=>{n(d)},[n]),u=P.useCallback(()=>{switch(t){case"light":return p.jsx(He.SunOutlined,{});case"dark":return p.jsx(He.MoonOutlined,{});default:return p.jsx(an.Brightness6,{})}},[t]);return p.jsxs(Js,{value:"theme-mode","aria-label":"toggle mode",onClick:i,selected:!1,children:[p.jsx(u,{}),r?p.jsx(wee,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:l}):null]})}const L2=P.forwardRef((e,t)=>{const n=_r(e,{display:"flex",width:"100%"});return p.jsx(T.Box,{ref:t,...e,sx:n,children:e.children})});function k0({source:e="paper"}){const{mode:t}=An(),n=T.useTheme();return P.useEffect(()=>{var o;const r=ae.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const N2=kS(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:i,enableLocaleSwitcher:a}=t,{isLoading:l,navigation:u,breadcrumbs:d}=D4();return p.jsxs(L2,{children:[p.jsxs(s2,{children:[p.jsx(j2,{}),a?p.jsx(o2,{}):null,o?p.jsx(R2,{}):null,p.jsx(k0,{}),p.jsx(Vw,{}),i?p.jsx(E2,{}):null,p.jsx(P2,{children:p.jsx(O2,{})})]}),p.jsx(M2,{children:p.jsx(D2,{})}),p.jsxs(_S,{error:t.error,children:[!l&&p.jsx(Kx,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,p.jsx(dt.Outlet,{}),p.jsx(S0,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})});function V2(e){const t=T.useMediaQuery(n=>n.breakpoints.down("sm"));return p.jsx(See,{disableGutters:!0,variant:t?"regular":"dense",...Eee(e)})}V2.propTypes={children:x.node,className:x.string};const See=T.styled(T.Toolbar,{name:"RaTopToolbar",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 Eee({hasCreate:e,...t}){return t}const Tee=me("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function W2(){return p.jsx(Tee,{children:p.jsx(T.LinearProgress,{color:"primary"})})}function Aee(e){return t=>p.jsx(P.Suspense,{fallback:p.jsx(W2,{}),children:p.jsx(e,{...t})})}function M0({title:e}){return p.jsxs(T.Stack,{direction:"row",children:[p.jsx(T.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",p.jsx(T.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const Iee=me(H.Notification,{})(({theme:e})=>({zIndex:2e3,"& *":{fontSize:e.typography.body1.fontSize}}));function z2(e){return p.jsx(Iee,{...e})}var Dl=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(Dl||{});const U2=wo().required(),H2=wo().oneOf(Object.values(Dl));function Oee(e){var E;const t=mi.useQueryClient(),[n,r]=P.useState(!1),[o,i]=P.useState(()=>()=>Promise.resolve()),a=ie.useGetIdentity(),l=(E=a==null?void 0:a.data)==null?void 0:E.email,u=ie.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}=mi.useQuery({queryKey:["GET","onboarding",l],queryFn:d,staleTime:24*60*60*1e3,retry:l!==void 0}),[m,y]=P.useState(()=>()=>Promise.resolve()),C=mi.useMutation({mutationFn:m}).mutateAsync;return P.useEffect(()=>{function I(){const S=ae.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(ae.isNil((f??{})[e]))},[f,e,r]),P.useEffect(()=>{i(()=>()=>C())},[C]),{loading:g,error:h,onboardingRequired:n,acknowledgeOnboarding:o}}function Pee(e){const[t,n]=Gg("onboarding",{}),[r,o]=P.useState(!1),[i,a]=P.useState(()=>()=>Promise.resolve());return P.useEffect(()=>{o(ae.isNil((t??{})[e]))},[t,e,o]),P.useEffect(()=>{a(()=>()=>(n(l=>ae.extend(l,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:i}}function jee(){return{onboardingRequired:!1,acknowledgeOnboarding:P.useRef(()=>Promise.resolve()).current}}function G2(e,t){Ug({mode:H2,topic:U2}).validateSync({mode:e,topic:t});const n=Oee(t),r=Pee(t),o=jee();switch(e){case Dl.USER:return n.loading?o:n.error?r:ae.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case Dl.BROWSER:return r;default:return o}}var $s=(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))($s||{});function kee(e,t){var o;const n=ae.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:i}=t;return ae.extend(n,{show:i})}case"REGISTER_TIP":{const{payload:i}=t,{id:a}=i,l=ae.chain(n.tips).clone().reject(f=>f.id===a).value(),u=ae.find(n.tips,{id:a}),d=ae.chain(u??{}).clone().extend(i).value();return l.push(d),ae.extend(n,{tips:ae.sortBy(l,["step"])})}case"UNREGISTER_TIP":{const{payload:i}=t,a=ae.isString(i)?i:i.id,l=ae.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return ae.extend(n,{tips:l})}case"DISMISS_TIP":{const{payload:i}=t,a=ae.isString(i)?i:i.id,l=ae.chain(n.tips).reject(h=>h.id===a).value(),u=ae.find(n.tips,{id:a});if(ae.isNil(u))return n;const d=ae.chain(u).clone().extend({dismissed:!0}).value();l.push(d);const f=((o=ae.chain(l).reject(h=>h.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&ae.chain(l).reject(h=>h.step<f).reject(h=>h.dismissed??!1).isEmpty().value()&&e.onComplete(),ae.extend(n,{tips:ae.sortBy(l,["step"]),currentStep:f})}case"SET_ON_COMPLETE":{const{payload:i}=t;return ae.extend(n,{onComplete:i})}case"RESTART":{const i=ae.chain(n.tips).clone().map(a=>ae.omit(a,"dismissed")).value();return ae.extend(n,{tips:i,currentStep:0})}default:return n}}const _0=P.createContext(void 0);function Mee(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=G2(t,n),[i,a]=P.useReducer(kee,{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(_0.Provider,{value:l,children:e.children})}function Y2(){const e=P.useContext(_0);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function _ee(){return Y2().state}function K2(){return Y2().dispatch}function X2(e){Ug({id:wo().required(),step:q4().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:i,currentStep:a}=_ee(),l=ae.find(i,{id:t}),{dismissed:u}=l??{},d=K2(),f=P.useCallback(()=>{d({type:$s.DISMISS_TIP,payload:t})},[d,t]);return P.useEffect(()=>{(ae.isNil(l)||n!==(l==null?void 0:l.step))&&d({type:$s.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,l,d]),P.useEffect(()=>()=>{d({type:$s.UNREGISTER_TIP,payload:t})},[t,d]),{tip:ae.chain(l??e).clone().extend({open:o&&!ae.isNil(l)&&a===n&&!u}).value(),dismiss:f}}function Fee(){const e=K2();return P.useCallback(()=>{e({type:$s.RESTART})},[e])}function Bee(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:i,dismiss:a}=X2({id:t,step:n,completeOnboarding:o}),{open:l}=i,u=ae.omit(e,["id","step","title","completeOnboarding"]);return p.jsx(ku,{...u,arrow:!0,open:l,title:p.jsxs(T.Stack,{gap:1,children:[p.jsx(T.Typography,{children:r}),p.jsx(T.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const Dee=T.styled(Bee)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${T.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${T.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${T.tooltipClasses.arrow}`]:{color:r.main}}});function Z2({children:e}){const t=dt.useLocation(),{pathname:n}=t;return P.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),p.jsx(p.Fragment,{children:e})}const Ree=me("div")({width:"100%",overflowX:"auto",display:"block"});function Lee({shadow:e,children:t,...n}){return p.jsx(Fn,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function Q2({title:e}){return p.jsx(T.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}function Nee({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}=e0(),m=ie.useResourceContext(g),y=h(),b=ie.useRecordContext(),C=r||b,E=Qe.get(C,e||"");return p.jsxs(T.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(T.Stack,{direction:"row",alignItems:"start",children:[l?P.isValidElement(l)?P.cloneElement(l,{style:Dd}):P.createElement(l,{style:Dd}):null,p.jsx(ie.FieldTitle,{label:t,source:e,resource:y||m})]}),p.jsxs(T.Stack,{direction:"row",alignItems:"center",children:[a?P.isValidElement(a)?P.cloneElement(a,{record:C,resource:m,value:E}):P.createElement(a,{source:e,record:C,resource:m,value:E}):p.jsx(T.Typography,{variant:n,children:E}),u?P.isValidElement(u)?P.cloneElement(u,{style:Dd}):P.createElement(u,{style:Dd}):null,d?p.jsx(T.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...f,children:d}):null]})]})}const Dd={width:"1.5rem",alignSelf:"center"};function Vee({children:e}){const t=St();return p.jsx(Fn,{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(T.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function Rd({version:e,name:t,copy:n,children:r,logo:o,background:i=Mu,footer:a=!0}){return p.jsxs(T.Box,{children:[p.jsx(k0,{source:"default"}),P.isValidElement(i)?i:P.createElement(i),p.jsxs(T.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{ml:3},children:o||p.jsx(M0,{title:t})}),p.jsxs(T.Grid,{item:!0,xs:12,children:[p.jsx(T.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(T.Grid,{item:!0,children:p.jsx(Vee,{children:r})})}),a?p.jsx(T.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:p.jsx(S0,{name:t,copy:n,version:e})}):null]})]})]})}function Wee({name:e,copy:t,logo:n,version:r,background:o}){const i=ie.useTranslate(),a=ie.useAuthProvider(),l=ie.useNotify(),u=dt.useNavigate(),{token:d}=dt.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"}),ae.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),ae.delay(()=>u("/login"),1e3)})},[d,a,l,u]),p.jsx(Rd,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:i("ra.auth.activate")}),p.jsx(T.Typography,{component:dt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),p.jsx(T.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})}function J2(){const e=P.useCallback(()=>location.reload(),[]);return p.jsx(T.Container,{children:p.jsxs(T.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[p.jsx("img",{alt:"Error",src:AC,style:{width:"100%",maxWidth:450}}),p.jsx(T.Typography,{variant:"h2",children:"Ops! An error occurred..."}),p.jsx(T.Typography,{children:"We're fixing the problem. Please try again later."}),p.jsx(T.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function q2({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:i=!1,oauth:a={},redirectTo:l,background:u=p.jsx(Mu,{})}){const[d,f]=ie.useSafeSetState(!1),g=ie.useLogin(),h=ie.useTranslate(),m=ie.useNotify(),y=ie.useCheckAuth(),b=dt.useNavigate();P.useEffect(()=>{y({},!1).then(()=>{b("/")}).catch(()=>{})},[y,b]);function C(E){f(!0),g(E,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(Rd,{name:t,version:e,copy:n,logo:r,background:u,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:"Login"}),i?p.jsx(T.Typography,{component:dt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")}):null]})}),p.jsxs(T.Grid,{item:!0,xs:12,children:[p.jsxs(ie.Form,{onSubmit:C,children:[p.jsxs(T.Grid,{container:!0,children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(xr,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:ie.required(),placeholder:"user@company.name",fullWidth:!0})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(xr,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:ie.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:p.jsx(T.Link,{variant:"h6",component:dt.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}):null,p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Button,{variant:"contained",type:"submit",color:"primary",disabled:d,fullWidth:!0,children:d?p.jsx(T.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]}),ae.isEmpty(a)?null:p.jsxs(p.Fragment,{children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:2},children:p.jsx(T.Divider,{})}),a.google?p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:2,width:"100%"},children:p.jsx(B5,{setLoading:f})}):null]})]})]})})}function zee({name:e,copy:t,logo:n,version:r,background:o}){const[i,a]=P.useState(!1),l=ie.useTranslate(),u=ie.useRedirect(),d=ie.useNotify(),f=ie.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(Rd,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:l("ra.auth.recover.title")}),p.jsx(T.Typography,{component:dt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.back_to_login")})]})}),p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(H.Form,{onSubmit:g,children:[p.jsx(T.Grid,{container:!0,children:p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"email",validate:[ie.required(),ie.email()]})})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:p.jsx(T.Typography,{variant:"caption",children:l("ra.auth.recover.inbox_help")})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(T.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})}function Uee({name:e,copy:t,version:n,logo:r,background:o}){const[i,a]=P.useState(!1),l=ie.useTranslate(),u=ie.useRedirect(),d=ie.useNotify(),f=ie.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(Rd,{name:e,copy:t,logo:r,background:o,version:n,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:l("ra.auth.register.title")}),p.jsx(T.Typography,{component:dt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.already_have_account")})]})}),p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(H.Form,{onSubmit:g,children:[p.jsxs(T.Grid,{container:!0,children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"name",label:l("ra.register.name"),validate:ie.required()})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"email",type:"email",validate:[ie.required(),ie.email()]})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"password",type:"password",validate:ie.required()})})]}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(T.CircularProgress,{size:19,thickness:3}):l("ra.auth.create_account")})})]})})]})})}function Hee(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 Gee(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Yee(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:p.jsx(He.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 zi({color:e,theme:t}){const n=cn(t,e),{lighter:r,light:o,main:i}=n;return{borderColor:nt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:i}}}function Kee(e){const t=zi({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":zi({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":zi({color:"secondary",theme:e}),"&.MuiAlert-borderError":zi({color:"error",theme:e}),"&.MuiAlert-borderSuccess":zi({color:"success",theme:e}),"&.MuiAlert-borderInfo":zi({color:"info",theme:e}),"&.MuiAlert-borderWarning":zi({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 Xee(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Zee(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 Ui({color:e,theme:t}){const n=cn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function Qee(e){const t=Ui({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Ui({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Ui({color:"secondary",theme:e}),"&.MuiBadge-colorError":Ui({color:"error",theme:e}),"&.MuiBadge-colorInfo":Ui({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Ui({color:"success",theme:e}),"&.MuiBadge-colorWarning":Ui({color:"warning",theme:e})}}}}}function it({variant:e,color:t,theme:n}){const r=cn(n,t),{lighter:o,main:i,dark:a,contrastText:l}=r,u=`${t}Button`,d=Os(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 Jee(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 qee(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function $ee(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function ete(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function tte(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function ea({color:e,theme:t}){const n=cn(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 nte(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 F0(e){const t=nte(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function rte(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(He.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(He.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...F0("small")},"&.size-medium":{...F0("medium")},"&.size-large":{...F0("large")}},colorPrimary:ea({color:"primary",theme:e}),colorSecondary:ea({color:"secondary",theme:e}),colorSuccess:ea({color:"success",theme:e}),colorWarning:ea({color:"warning",theme:e}),colorInfo:ea({color:"info",theme:e}),colorError:ea({color:"error",theme:e})}}}}function ta({color:e,theme:t}){const n=cn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function er({color:e,theme:t}){const n=cn(t,e),{light:r,lighter:o,main:i}=n;return{color:i,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:i,"&:hover":{color:r}}}}function ote(e){const t=er({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ta({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ta({color:"secondary",theme:e}),"&.MuiChip-colorError":ta({color:"error",theme:e}),"&.MuiChip-colorInfo":ta({color:"info",theme:e}),"&.MuiChip-colorSuccess":ta({color:"success",theme:e}),"&.MuiChip-colorWarning":ta({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":er({color:"primary",theme:e}),"&.MuiChip-lightSecondary":er({color:"secondary",theme:e}),"&.MuiChip-lightError":er({color:"error",theme:e}),"&.MuiChip-lightInfo":er({color:"info",theme:e}),"&.MuiChip-lightSuccess":er({color:"success",theme:e}),"&.MuiChip-lightWarning":er({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":er({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":er({color:"secondary",theme:e}),"&.MuiChip-combinedError":er({color:"error",theme:e}),"&.MuiChip-combinedInfo":er({color:"info",theme:e}),"&.MuiChip-combinedSuccess":er({color:"success",theme:e}),"&.MuiChip-combinedWarning":er({color:"warning",theme:e})}}}}}function ite(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 ste(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function ate(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function na({color:e,theme:t}){const n=cn(t,e),{main:r,dark:o,contrastText:i}=n,a=`${e}Button`,l=Os(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 lte(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":na({color:"primary",theme:e}),"&.MuiFab-secondary":na({color:"secondary",theme:e}),"&.Mui-error":na({color:"error",theme:e}),"&.MuiFab-success":na({color:"success",theme:e}),"&.MuiFab-info":na({color:"info",theme:e}),"&.MuiFab-warning":na({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 cte(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 ute(e){return{MuiInputBase:{styleOverrides:{}}}}function dte(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 fte(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function pte(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function hte(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function gte(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function mte(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function vte(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Hi({variant:e,theme:t}){const n=cn(t,e),{light:r}=n,o=Os(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function yte(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:{...Hi({variant:"primary",theme:e}),"&.Mui-error":{...Hi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Hi({variant:"secondary",theme:e}),colorError:Hi({variant:"error",theme:e}),colorWarning:Hi({variant:"warning",theme:e}),colorInfo:Hi({variant:"info",theme:e}),colorSuccess:Hi({variant:"success",theme:e})}}}}function bte(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function Mt({variant:e,color:t,theme:n}){const r=cn(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 xte(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":Mt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":Mt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":Mt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":Mt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":Mt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":Mt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":Mt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":Mt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":Mt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":Mt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":Mt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":Mt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":Mt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":Mt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":Mt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":Mt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":Mt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":Mt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":Mt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":Mt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":Mt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":Mt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":Mt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":Mt({variant:"outlined",color:"warning",theme:e})}}}}}}function Cte(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function ra({color:e,theme:t}){const n=cn(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 wte(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 B0(e){const t=wte(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function Ste(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:p.jsx(T.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":{...B0("small")},"&.size-medium":{...B0("medium")},"&.size-large":{...B0("large")}},colorPrimary:ra({color:"primary",theme:e}),colorSecondary:ra({color:"secondary",theme:e}),colorSuccess:ra({color:"success",theme:e}),colorWarning:ra({color:"warning",theme:e}),colorInfo:ra({color:"info",theme:e}),colorError:ra({color:"error",theme:e})}}}}function oa({color:e,theme:t}){const n=cn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function Ete(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":oa({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":oa({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":oa({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":oa({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":oa({color:"info",theme:e}),"&.MuiSlider-thumbColorError":oa({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 Tte(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 D0(e,t){const n=Tte(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 Ate(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},...D0(e,"medium")},sizeLarge:{...D0(e,"large")},sizeSmall:{...D0(e,"small")}}}}}function Ite(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 Ote(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 Pte(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 jte(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function kte(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function Mte(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function _te(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function Fte(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function Bte(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 Dte(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function Rte(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function Lte(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function Nte(e){return Qe.merge(Hee(e),Gee(e),Yee(e),Kee(e),Xee(),Zee(e),Qee(e),Jee(e),qee(),$ee(),ete(),tte(),rte(e),ote(e),ite(e),ste(e),ate(),lte(e),cte(e),ute(),dte(e),fte(),pte(),hte(e),gte(e),mte(),vte(),yte(e),bte(),xte(e),Cte(e),Ste(e),Ete(e),Ate(e),Ite(e),Ote(e),Pte(e),jte(e),kte(e),Mte(),_te(),Fte(),Bte(e),Dte(e),Rte(),Lte())}function Vte(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 Wte(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 zte(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 Ute(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 Hte(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 Gte(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 Yte(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 Kte(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 Xte(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 Zte(e,t,n){switch(t){case"theme1":return Wte(e,n);case"theme2":return zte(e,n);case"theme3":return Ute(e,n);case"theme4":return Hte(e,n);case"theme5":return Gte(e,n);case"theme6":return Yte(e,n);case"theme7":return Kte(e,n);case"theme8":return Xte(e,n);default:return Vte(e)}}var R0=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];R0.primary=R0[5];var L0=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];L0.primary=L0[5];var N0=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];N0.primary=N0[5];var V0=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];V0.primary=V0[5];var W0=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];W0.primary=W0[5];var z0=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];z0.primary=z0[5];var U0=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];U0.primary=U0[5];var H0=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];H0.primary=H0[5];var G0=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];G0.primary=G0[5];var Y0=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Y0.primary=Y0[5];var K0=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];K0.primary=K0[5];var X0=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];X0.primary=X0[5];var Z0=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Z0.primary=Z0[5];var Qte={red:R0,volcano:L0,orange:N0,gold:V0,yellow:W0,lime:z0,green:U0,cyan:H0,blue:G0,geekblue:Y0,purple:K0,magenta:X0,grey:Z0},Q0=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Q0.primary=Q0[5];var J0=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];J0.primary=J0[5];var q0=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];q0.primary=q0[5];var $0=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];$0.primary=$0[5];var em=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];em.primary=em[5];var tm=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];tm.primary=tm[5];var nm=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];nm.primary=nm[5];var rm=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];rm.primary=rm[5];var om=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];om.primary=om[5];var im=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];im.primary=im[5];var sm=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];sm.primary=sm[5];var am=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];am.primary=am[5];var lm=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];lm.primary=lm[5];var Jte={red:Q0,volcano:J0,orange:q0,gold:$0,yellow:em,lime:tm,green:nm,cyan:rm,blue:om,geekblue:im,purple:sm,magenta:am,grey:lm};function qte(e,t){const n=e==="dark"?Jte:Qte;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=Zte(n,t,e);return Yp({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 $te(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 ene(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 cm({themeOverrides:e,children:t}){const n=An(),{themeDirection:r,mode:o,presetColor:i,fontFamily:a}=n,l=p3(),u=P.useMemo(()=>o==="auto"?l:o,[o,l]),d=P.useMemo(()=>qte(u,i),[u,i]),f=P.useMemo(()=>ene(a),[a]),g=P.useMemo(()=>$te(d),[d]),h=P.useMemo(()=>ae.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=Yp(h),y=ae.cloneDeep(m.components??{});return m.components=ae.merge(Nte(m),y),p.jsx(T.StyledEngineProvider,{injectFirst:!0,children:p.jsxs(Bx,{theme:m,children:[p.jsx(T.CssBaseline,{enableColorScheme:!0}),t]})})}function tne({children:e,theme:t,...n}){return p.jsx(H.CoreAdminContext,{...n,children:p.jsx(cm,{themeOverrides:t,children:p.jsx(Z2,{children:e})})})}function $2(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:E=H.localStorageStore(),ready:I,theme:S,title:A="React Admin"}=e;return p.jsx(tne,{authProvider:t,dataProvider:i,i18nProvider:u,store:E,history:l,queryClient:b,theme:S,children:p.jsx(H.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:m,catchAll:n,title:A,loading:f,loginPage:g,authCallbackPage:h,notification:y,requireAuth:C,ready:I,children:r})})}class eE{constructor({catch:t,display:n,log:r,error:o}){ac(this,"catch");ac(this,"display");ac(this,"log");ac(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}class nne{constructor(t){_o(this,Rl);_o(this,Ll);_o(this,ia,new Set);const{apiUrl:n}=t??{};if(!ae.isString(n)||ae.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");hi(this,Ll,n),hi(this,Rl,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}`;Gn(this,ia).has(a)||(Gn(this,ia).add(a),fetch(`${Gn(this,Ll)}/ui/error-log`,{method:"PUT",headers:Gn(this,Rl),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),Gn(this,ia).delete(a)}))}}Rl=new WeakMap,Ll=new WeakMap,ia=new WeakMap;function rne({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=i=>new eE({catch:i!=null,display:!1,log:i!=null,error:i}),...o}){const i=N.useMemo(()=>o.errorHandler?o.errorHandler:new nne({apiUrl:t}),[t,o.errorHandler]),a=console.error,l=N.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 N.useEffect(()=>(window.removeEventListener("error",l),window.addEventListener("error",l),console.error=l,()=>{window.removeEventListener("error",l),console.error=a}),[l,a]),!0}class one{constructor(t){_o(this,Nl);_o(this,Vl);_o(this,Yi,[]);const{apiUrl:n}=t??{};if(!ae.isString(n)||ae.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");hi(this,Vl,n),hi(this,Nl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ae.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ae.isString(n)||ae.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ae.isString(r)||ae.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ae.some(Gn(this,Yi),o=>ae.isEqual(o,{code:n,lang:r}))){Gn(this,Yi).push({code:n,lang:r}),fetch(`${Gn(this,Vl)}/i18n/message`,{method:"put",headers:Gn(this,Nl),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),hi(this,Yi,ae.reject(Gn(this,Yi),i=>ae.isEqual(i,{code:n,lang:r})))});return}}}Nl=new WeakMap,Vl=new WeakMap,Yi=new WeakMap;function tE(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 one({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&&(ae.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 ae.get(m,b,{})}return Ev(y,n,h,{allowMissing:r||o,onMissingKey:f})})}function ine(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 ae.get(d,g,{})}return Ev(f,t,u,{allowMissing:!0})})}function sne({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 nE(e){const[t,n]=P.useState(),r=f3(e);return P.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}tE(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const ane=new mi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function lne({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:i,logoIcon:a,loginPage:l=p.jsx(q2,{version:"0.0.0",name:"Applica",redirectTo:"/",background:p.jsx(Mu,{})}),menu:u,name:d,copy:f,version:g="0.0.0",dataProvider:h,authProvider:m,i18nProvider:y,errorHandler:b,error:C,enableNotification:E=!1,enableRegistration:I=!1,enablePasswordRecover:S=!1,enableThemeToggler:A=!1,enableLocaleSwitcher:O=!1,oauth:k={},queryClient:M=ane,background:R,notificationAPI:V="entities/notification",..._}){var Z;rne({apiUrl:n,errorHandler:b,catcherFn:z=>{const J=z==null?void 0:z.toString(),se=["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(W=>J==null?void 0:J.includes(W));return new eE({catch:se,display:!se,log:!se&&o===!0,error:J})}});const D=P.useMemo(()=>P.isValidElement(l)?P.cloneElement(l,{name:d,copy:f,logo:i,version:g,background:R,enableRegistration:I,enablePasswordRecover:S,oauth:k}):l,[l,d,g,f,R,i,I,S,k]),G=P.useMemo(()=>z=>{const J=d?p.jsx(M0,{title:d}):i,U=d?p.jsx(Q2,{title:d}):a;return p.jsx(N2,{...z,name:d,copy:f,version:g,logoMain:J,logoIcon:U,notification:V,enableThemeToggler:A,enableNotification:E,enableLocaleSwitcher:O,error:C})},[i,a,d,f,g,C,V,E,A,O]),K=nE({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:y});if(K===void 0)return p.jsx(p.Fragment,{});if(K.error)return p.jsx(Xg,{initialConfig:t,children:p.jsx(cm,{themeOverrides:e,children:p.jsx(J2,{})})});const Y=p.jsx(AZ,{children:p.jsx(B4,{menu:u,children:p.jsx(Xg,{initialConfig:t,children:p.jsx($2,{theme:e,layout:G,notification:z2,queryClient:M,dataProvider:h,authProvider:m,i18nProvider:K,loginPage:D,..._})})})});return(Z=k.google)!=null&&Z.clientId?p.jsx(bZ,{clientId:k.google.clientId,children:Y}):Y}Object.defineProperty(F,"ArrayField",{enumerable:!0,get:()=>H.ArrayField}),Object.defineProperty(F,"ArrayInputContext",{enumerable:!0,get:()=>H.ArrayInputContext}),Object.defineProperty(F,"BooleanField",{enumerable:!0,get:()=>H.BooleanField}),Object.defineProperty(F,"ChipField",{enumerable:!0,get:()=>H.ChipField}),Object.defineProperty(F,"Confirm",{enumerable:!0,get:()=>H.Confirm}),Object.defineProperty(F,"CreateContextProvider",{enumerable:!0,get:()=>H.CreateContextProvider}),Object.defineProperty(F,"CustomRoutes",{enumerable:!0,get:()=>H.CustomRoutes}),Object.defineProperty(F,"DeleteWithUndoButton",{enumerable:!0,get:()=>H.DeleteWithUndoButton}),Object.defineProperty(F,"EditButton",{enumerable:!0,get:()=>H.EditButton}),Object.defineProperty(F,"EditContextProvider",{enumerable:!0,get:()=>H.EditContextProvider}),Object.defineProperty(F,"FieldTitle",{enumerable:!0,get:()=>H.FieldTitle}),Object.defineProperty(F,"FilterButton",{enumerable:!0,get:()=>H.FilterButton}),Object.defineProperty(F,"FilterList",{enumerable:!0,get:()=>H.FilterList}),Object.defineProperty(F,"FilterListItem",{enumerable:!0,get:()=>H.FilterListItem}),Object.defineProperty(F,"FilterLiveSearch",{enumerable:!0,get:()=>H.FilterLiveSearch}),Object.defineProperty(F,"Form",{enumerable:!0,get:()=>H.Form}),Object.defineProperty(F,"FormDataConsumer",{enumerable:!0,get:()=>H.FormDataConsumer}),Object.defineProperty(F,"HttpError",{enumerable:!0,get:()=>H.HttpError}),Object.defineProperty(F,"I18nContextProvider",{enumerable:!0,get:()=>H.I18nContextProvider}),Object.defineProperty(F,"ListBase",{enumerable:!0,get:()=>H.ListBase}),Object.defineProperty(F,"LoadingIndicator",{enumerable:!0,get:()=>H.LoadingIndicator}),Object.defineProperty(F,"RaSimpleFormIterator",{enumerable:!0,get:()=>H.SimpleFormIterator}),Object.defineProperty(F,"RecordContextProvider",{enumerable:!0,get:()=>H.RecordContextProvider}),Object.defineProperty(F,"ReferenceArrayField",{enumerable:!0,get:()=>H.ReferenceArrayField}),Object.defineProperty(F,"ReferenceField",{enumerable:!0,get:()=>H.ReferenceField}),Object.defineProperty(F,"Resource",{enumerable:!0,get:()=>H.Resource}),Object.defineProperty(F,"ResourceContextProvider",{enumerable:!0,get:()=>H.ResourceContextProvider}),Object.defineProperty(F,"SaveButton",{enumerable:!0,get:()=>H.SaveButton}),Object.defineProperty(F,"SavedQueriesList",{enumerable:!0,get:()=>H.SavedQueriesList}),Object.defineProperty(F,"SimpleFormIteratorContext",{enumerable:!0,get:()=>H.SimpleFormIteratorContext}),Object.defineProperty(F,"SimpleShowLayout",{enumerable:!0,get:()=>H.SimpleShowLayout}),Object.defineProperty(F,"SingleFieldList",{enumerable:!0,get:()=>H.SingleFieldList}),Object.defineProperty(F,"TabbedFormTabs",{enumerable:!0,get:()=>H.TabbedFormTabs}),Object.defineProperty(F,"UrlField",{enumerable:!0,get:()=>H.UrlField}),Object.defineProperty(F,"ValidationError",{enumerable:!0,get:()=>H.ValidationError}),Object.defineProperty(F,"WithListContext",{enumerable:!0,get:()=>H.WithListContext}),Object.defineProperty(F,"choices",{enumerable:!0,get:()=>H.choices}),Object.defineProperty(F,"email",{enumerable:!0,get:()=>H.email}),Object.defineProperty(F,"maxLength",{enumerable:!0,get:()=>H.maxLength}),Object.defineProperty(F,"maxValue",{enumerable:!0,get:()=>H.maxValue}),Object.defineProperty(F,"minLength",{enumerable:!0,get:()=>H.minLength}),Object.defineProperty(F,"minValue",{enumerable:!0,get:()=>H.minValue}),Object.defineProperty(F,"number",{enumerable:!0,get:()=>H.number}),Object.defineProperty(F,"regex",{enumerable:!0,get:()=>H.regex}),Object.defineProperty(F,"required",{enumerable:!0,get:()=>H.required}),Object.defineProperty(F,"useArrayInput",{enumerable:!0,get:()=>H.useArrayInput}),Object.defineProperty(F,"useAuthProvider",{enumerable:!0,get:()=>H.useAuthProvider}),Object.defineProperty(F,"useCheckAuth",{enumerable:!0,get:()=>H.useCheckAuth}),Object.defineProperty(F,"useChoices",{enumerable:!0,get:()=>H.useChoices}),Object.defineProperty(F,"useChoicesContext",{enumerable:!0,get:()=>H.useChoicesContext}),Object.defineProperty(F,"useCreate",{enumerable:!0,get:()=>H.useCreate}),Object.defineProperty(F,"useCreateContext",{enumerable:!0,get:()=>H.useCreateContext}),Object.defineProperty(F,"useCreateController",{enumerable:!0,get:()=>H.useCreateController}),Object.defineProperty(F,"useCreateSuggestionContext",{enumerable:!0,get:()=>H.useCreateSuggestionContext}),Object.defineProperty(F,"useDataProvider",{enumerable:!0,get:()=>H.useDataProvider}),Object.defineProperty(F,"useDeleteMany",{enumerable:!0,get:()=>H.useDeleteMany}),Object.defineProperty(F,"useEditContext",{enumerable:!0,get:()=>H.useEditContext}),Object.defineProperty(F,"useEditController",{enumerable:!0,get:()=>H.useEditController}),Object.defineProperty(F,"useGetIdentity",{enumerable:!0,get:()=>H.useGetIdentity}),Object.defineProperty(F,"useGetList",{enumerable:!0,get:()=>H.useGetList}),Object.defineProperty(F,"useGetMany",{enumerable:!0,get:()=>H.useGetMany}),Object.defineProperty(F,"useGetManyReference",{enumerable:!0,get:()=>H.useGetManyReference}),Object.defineProperty(F,"useGetOne",{enumerable:!0,get:()=>H.useGetOne}),Object.defineProperty(F,"useInput",{enumerable:!0,get:()=>H.useInput}),Object.defineProperty(F,"useListContext",{enumerable:!0,get:()=>H.useListContext}),Object.defineProperty(F,"useListController",{enumerable:!0,get:()=>H.useListController}),Object.defineProperty(F,"useLocaleState",{enumerable:!0,get:()=>H.useLocaleState}),Object.defineProperty(F,"useLocales",{enumerable:!0,get:()=>H.useLocales}),Object.defineProperty(F,"useLogin",{enumerable:!0,get:()=>H.useLogin}),Object.defineProperty(F,"useLogout",{enumerable:!0,get:()=>H.useLogout}),Object.defineProperty(F,"useNotify",{enumerable:!0,get:()=>H.useNotify}),Object.defineProperty(F,"usePermissions",{enumerable:!0,get:()=>H.usePermissions}),Object.defineProperty(F,"useRecordContext",{enumerable:!0,get:()=>H.useRecordContext}),Object.defineProperty(F,"useReferenceArrayFieldController",{enumerable:!0,get:()=>H.useReferenceArrayFieldController}),Object.defineProperty(F,"useRefresh",{enumerable:!0,get:()=>H.useRefresh}),Object.defineProperty(F,"useRemoveFromStore",{enumerable:!0,get:()=>H.useRemoveFromStore}),Object.defineProperty(F,"useResetStore",{enumerable:!0,get:()=>H.useResetStore}),Object.defineProperty(F,"useResourceContext",{enumerable:!0,get:()=>H.useResourceContext}),Object.defineProperty(F,"useResourceDefinition",{enumerable:!0,get:()=>H.useResourceDefinition}),Object.defineProperty(F,"useResourceDefinitions",{enumerable:!0,get:()=>H.useResourceDefinitions}),Object.defineProperty(F,"useSafeSetState",{enumerable:!0,get:()=>H.useSafeSetState}),Object.defineProperty(F,"useShowContext",{enumerable:!0,get:()=>H.useShowContext}),Object.defineProperty(F,"useShowController",{enumerable:!0,get:()=>H.useShowController}),Object.defineProperty(F,"useSimpleFormIterator",{enumerable:!0,get:()=>H.useSimpleFormIterator}),Object.defineProperty(F,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>H.useSimpleFormIteratorItem}),Object.defineProperty(F,"useStore",{enumerable:!0,get:()=>H.useStore}),Object.defineProperty(F,"useStoreContext",{enumerable:!0,get:()=>H.useStoreContext}),Object.defineProperty(F,"useTranslate",{enumerable:!0,get:()=>H.useTranslate}),Object.defineProperty(F,"useTranslateLabel",{enumerable:!0,get:()=>H.useTranslateLabel}),Object.defineProperty(F,"useUnselect",{enumerable:!0,get:()=>H.useUnselect}),Object.defineProperty(F,"useUnselectAll",{enumerable:!0,get:()=>H.useUnselectAll}),Object.defineProperty(F,"useUpdate",{enumerable:!0,get:()=>H.useUpdate}),Object.defineProperty(F,"useUpdateMany",{enumerable:!0,get:()=>H.useUpdateMany}),Object.defineProperty(F,"withLifecycleCallbacks",{enumerable:!0,get:()=>H.withLifecycleCallbacks}),F.ActionsField=PZ,F.ActionsMenu=Go,F.ActivatePage=Wee,F.ActiveFiltersChips=I0,F.AddTableRow=l0,F.Admin=$2,F.AnimateButton=DP,F.AppBarStyled=n2,F.ApplicaAdmin=lne,F.ArrayInput=OZ,F.AttachmentField=W5,F.AttachmentInput=eQ,F.AuthBackground=Mu,F.AutocompleteArrayInput=nQ,F.AutocompleteInput=oQ,F.Avatar=pu,F.BooleanInput=sQ,F.Breadcrumbs=Kx,F.BulkActionsToolbar=a2,F.BulkDeleteWithConfirmButton=m3,F.BulkFloatingActionsToolbar=j$,F.Button=Di,F.CardForm=g3,F.ChangePasswordButton=T2,F.ChangePasswordForm=t0,F.CircularWithLabel=BF,F.CircularWithPath=DF,F.CoverField=U5,F.Create=LQ,F.CreateButton=y3,F.CreateButtonClasses=bd,F.CreateInDialogButton=HX,F.Datagrid=R$,F.DateAgoField=G5,F.DateField=LZ,F.DateInput=cQ,F.DateTimeInput=dQ,F.DeleteWithConfirmButton=Ri,F.Dot=mh,F.Drawer=t2,F.DrawerHeader=DS,F.DrawerHeaderStyled=FS,F.DrawerToggle=i2,F.Edit=WQ,F.EditInDialogButton=KX,F.EmailField=VZ,F.Empty=_l,F.EmptyClasses=Wi,F.Error=jg,F.Field=ES,F.FileField=Y5,F.FileInput=pQ,F.FilterSidebar=Bd,F.FilterSidebarButton=q$,F.FilterSidebarContext=T0,F.Footer=S0,F.FormHeader=HQ,F.FunctionField=zZ,F.GenericErrorPage=J2,F.GoogleLoginButton=B5,F.Header=s2,F.HeaderButton=r2,F.HeaderIconButton=A$,F.HeaderNotification=E2,F.HeaderProfile=O2,F.HeaderSpacer=j2,F.HeaderToggleButton=Js,F.HorizontalBar=k2,F.IconButton=bu,F.ImageField=z5,F.ImageInput=hQ,F.ImpersonateUserButton=EZ,F.LabeledArrayInput=N5,F.LabeledInput=yn,F.Layout=N2,F.LayoutContent=_S,F.LayoutProvider=jS,F.LayoutWrapper=L2,F.LinearWithIcon=RF,F.LinearWithLabel=LF,F.List=fee,F.ListItem=Nee,F.ListToolbar=x2,F.ListViewProvider=S2,F.Loadable=Aee,F.Loader=W2,F.LoadingButton=wC,F.LocalStorage=s3,F.LocaleButton=o2,F.LocalizedTextField=HZ,F.LocalizedTextInput=vQ,F.LoginPage=q2,F.Logo=BS,F.LogoutButton=A2,F.LongForm=Vt,F.MainCard=Fn,F.MainIcon=M0,F.MenuConfigProvider=B4,F.MenuPopover=TC,F.NavCollapse=Bl,F.NavGroup=F2,F.NavItem=Fl,F.NavList=B2,F.NavMenu=M2,F.Navigation=D2,F.Notification=z2,F.NotificationList=mee,F.NumberInput=bQ,F.OnboardingActionType=$s,F.OnboardingContext=_0,F.OnboardingModes=Dl,F.OnboardingProvider=Mee,F.OnboardingTip=Dee,F.Pagination=P0,F.PaginationActions=O0,F.PopupTransition=FF,F.RadioButtonGroupInput=CQ,F.ReadonlyField=XZ,F.RecordInput=wQ,F.RecoverPage=zee,F.ReferenceArrayInput=SQ,F.ReferenceInput=EQ,F.ReferenceManyField=X5,F.ReferenceManyInput=TQ,F.RegisterPage=Uee,F.RemoveSavedQueryDialog=m2,F.ResponsiveSection=P2,F.SaveFiltersButton=g2,F.SaveFiltersDialog=h2,F.SavedFiltersList=v2,F.ScrollTop=Z2,F.ScrollX=Ree,F.SearchInput=IQ,F.SelectArrayInput=PQ,F.SelectInput=kQ,F.ShadowBox=Lee,F.Show=sJ,F.Sidebar=wr,F.SimpleBar=e2,F.SimpleForm=$g,F.SimpleFormIterator=lJ,F.SimpleList=vee,F.SizeField=JZ,F.SmallIcon=Q2,F.SmartTextInput=MQ,F.StopImpersonateButton=I2,F.StyledArrow=SC,F.TabbedForm=a0,F.TableCreateButton=u0,F.TableFormIterator=Ed,F.TableFormIteratorContext=d0,F.TableFormIteratorItem=AS,F.TableFormIteratorItemContext=c0,F.TextField=K5,F.TextInput=xr,F.ThemeColor=k0,F.ThemeContext=Kg,F.ThemeCustomizationProvider=cm,F.ThemeProvider=Xg,F.ThemeToggler=R2,F.TimeInput=DQ,F.Toolbar=Qo,F.Tooltip=ku,F.TopToolbar=V2,F.Transitions=Ho,F.WizardForm=OS,F.createI18nProvider=tE,F.createJsonI18nProvider=ine,F.getLocalizedValue=Hg,F.getPosition=EC,F.getThemeColor=cn,F.getThemeShadow=Os,F.localizedValueHasAllLocales=md,F.localizedValueHasAtLeastOneLocale=a3,F.onboardingModesSchema=H2,F.onboardingTopicSchema=U2,F.parseTime=u3,F.useBreadcrumbs=D4,F.useGetChipValue=A0,F.useGetLocalizedValue=xX,F.useI18nLanguages=sne,F.useI18nProvider=nE,F.useIsEnabledSidebarFilter=p2,F.useLayoutContext=f0,F.useLayoutDispatch=EJ,F.useLayoutDrawerState=Ni,F.useLayoutLogoState=MS,F.useLayoutMediaState=Jn,F.useLayoutNotificationsState=Ad,F.useLayoutState=Ys,F.useLayoutThemeState=TJ,F.useListViewContext=j0,F.useLocalStorage=Gg,F.useLocalizedValue=bX,F.useMemoizedObject=f3,F.useMenu=Mg,F.useMenuConfig=El,F.useMenuContext=ad,F.useOnboardingDataProvider=G2,F.useOnboardingTip=X2,F.usePopoverState=Us,F.useRefDimensions=CX,F.useResourceDefaultValues=NQ,F.useResourceTitle=Yg,F.useRestartOnboarding=Fee,F.useSx=_r,F.useSystemTheme=p3,F.useTableFormIterator=TS,F.useTableFormIteratorItem=SS,F.useThemeConfig=An,F.useThemeContext=Zg,F.useWizardFormContext=Td,F.uuid=PK,F.walkChildren=vd,F.withLayoutProvider=kS,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
238
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Cn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},Nn={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"},Ks={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},UJ={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},HJ=function(t){switch(t){case Cn.Mobile:return{isMobile:!0};case Cn.Tablet:return{isTablet:!0};case Cn.SmartTv:return{isSmartTV:!0};case Cn.Console:return{isConsole:!0};case Cn.Wearable:return{isWearable:!0};case Cn.Browser:return{isBrowser:!0};case Cn.Embedded:return{isEmbedded:!0};default:return UJ}},GJ=function(t){return VS(t)},Ne=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||n},y0=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},b0=function(t){var n=y0();return n&&n.platform&&(n.platform.indexOf(t)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},YJ=function(t,n,r,o,i){return{isBrowser:t,browserMajorVersion:Ne(n.major),browserFullVersion:Ne(n.version),browserName:Ne(n.name),engineName:Ne(r.name),engineVersion:Ne(r.version),osName:Ne(o.name),osVersion:Ne(o.version),userAgent:Ne(i)}},HS=function(t,n,r,o){return jJ({},t,{vendor:Ne(n.vendor),model:Ne(n.model),os:Ne(r.name),osVersion:Ne(r.version),ua:Ne(o)})},KJ=function(t,n,r,o){return{isSmartTV:t,engineName:Ne(n.name),engineVersion:Ne(n.version),osName:Ne(r.name),osVersion:Ne(r.version),userAgent:Ne(o)}},XJ=function(t,n,r,o){return{isConsole:t,engineName:Ne(n.name),engineVersion:Ne(n.version),osName:Ne(r.name),osVersion:Ne(r.version),userAgent:Ne(o)}},ZJ=function(t,n,r,o){return{isWearable:t,engineName:Ne(n.name),engineVersion:Ne(n.version),osName:Ne(r.name),osVersion:Ne(r.version),userAgent:Ne(o)}},QJ=function(t,n,r,o,i){return{isEmbedded:t,vendor:Ne(n.vendor),model:Ne(n.model),engineName:Ne(r.name),engineVersion:Ne(r.version),osName:Ne(o.name),osVersion:Ne(o.version),userAgent:Ne(i)}};function JJ(e){var t=e?Pl(e):WS,n=t.device,r=t.browser,o=t.engine,i=t.os,a=t.ua,l=HJ(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 YJ(u,r,o,i,a);if(g)return KJ(g,o,i,a);if(h)return XJ(h,o,i,a);if(d||f)return HS(l,n,i,a);if(m)return ZJ(m,o,i,a);if(y)return QJ(y,n,o,i,a)}var GS=function(t){var n=t.type;return n===Cn.Mobile},YS=function(t){var n=t.type;return n===Cn.Tablet},KS=function(t){var n=t.type;return n===Cn.Mobile||n===Cn.Tablet},XS=function(t){var n=t.type;return n===Cn.SmartTv},Od=function(t){var n=t.type;return n===Cn.Browser},ZS=function(t){var n=t.type;return n===Cn.Wearable},QS=function(t){var n=t.type;return n===Cn.Console},JS=function(t){var n=t.type;return n===Cn.Embedded},qS=function(t){var n=t.vendor;return Ne(n)},$S=function(t){var n=t.model;return Ne(n)},e6=function(t){var n=t.type;return Ne(n,"browser")},t6=function(t){var n=t.name;return n===Ks.Android},n6=function(t){var n=t.name;return n===Ks.Windows},r6=function(t){var n=t.name;return n===Ks.MAC_OS},o6=function(t){var n=t.name;return n===Ks.WindowsPhone},i6=function(t){var n=t.name;return n===Ks.IOS},s6=function(t){var n=t.version;return Ne(n)},a6=function(t){var n=t.name;return Ne(n)},l6=function(t){var n=t.name;return n===Nn.Chrome},c6=function(t){var n=t.name;return n===Nn.Firefox},u6=function(t){var n=t.name;return n===Nn.Chromium},Pd=function(t){var n=t.name;return n===Nn.Edge},d6=function(t){var n=t.name;return n===Nn.Yandex},f6=function(t){var n=t.name;return n===Nn.Safari||n===Nn.MobileSafari},p6=function(t){var n=t.name;return n===Nn.MobileSafari},h6=function(t){var n=t.name;return n===Nn.Opera},g6=function(t){var n=t.name;return n===Nn.InternetExplorer||n===Nn.Ie},m6=function(t){var n=t.name;return n===Nn.MIUI},v6=function(t){var n=t.name;return n===Nn.SamsungBrowser},y6=function(t){var n=t.version;return Ne(n)},b6=function(t){var n=t.major;return Ne(n)},x6=function(t){var n=t.name;return Ne(n)},C6=function(t){var n=t.name;return Ne(n)},w6=function(t){var n=t.version;return Ne(n)},S6=function(){var t=y0(),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},E6=function(){var t=y0();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},eo=function(){return b0("iPad")},T6=function(){return b0("iPhone")},A6=function(){return b0("iPod")},I6=function(t){return Ne(t)};function O6(e){var t=e||WS,n=t.device,r=t.browser,o=t.os,i=t.engine,a=t.ua;return{isSmartTV:XS(n),isConsole:QS(n),isWearable:ZS(n),isEmbedded:JS(n),isMobileSafari:p6(r)||eo(),isChromium:u6(r),isMobile:KS(n)||eo(),isMobileOnly:GS(n),isTablet:YS(n)||eo(),isBrowser:Od(n),isDesktop:Od(n),isAndroid:t6(o),isWinPhone:o6(o),isIOS:i6(o)||eo(),isChrome:l6(r),isFirefox:c6(r),isSafari:f6(r),isOpera:h6(r),isIE:g6(r),osVersion:s6(o),osName:a6(o),fullBrowserVersion:y6(r),browserVersion:b6(r),browserName:x6(r),mobileVendor:qS(n),mobileModel:$S(n),engineName:C6(i),engineVersion:w6(i),getUA:I6(a),isEdge:Pd(r)||Xs(a),isYandex:d6(r),deviceType:e6(n),isIOS13:E6(),isIPad13:eo(),isIPhone13:T6(),isIPod13:A6(),isElectron:S6(),isEdgeChromium:Xs(a),isLegacyEdge:Pd(r)&&!Xs(a),isWindows:n6(o),isMacOs:r6(o),isMIUI:m6(r),isSamsungBrowser:v6(r)}}var P6=XS(qn),j6=QS(qn),k6=ZS(qn),qJ=JS(qn),$J=p6(xn)||eo(),eq=u6(xn),jd=KS(qn)||eo(),M6=GS(qn),_6=YS(qn)||eo(),F6=Od(qn),tq=Od(qn),B6=t6(qo),D6=o6(qo),R6=i6(qo)||eo(),nq=l6(xn),rq=c6(xn),oq=f6(xn),iq=h6(xn),L6=g6(xn),sq=s6(qo),aq=a6(qo),lq=y6(xn),cq=b6(xn),uq=x6(xn),dq=qS(qn),fq=$S(qn),pq=C6(h0),hq=w6(h0),gq=I6(Ol),mq=Pd(xn)||Xs(Ol),vq=d6(xn),yq=e6(qn),bq=E6(),xq=eo(),Cq=T6(),wq=A6(),Sq=S6(),Eq=Xs(Ol),Tq=Pd(xn)&&!Xs(Ol),Aq=n6(qo),Iq=r6(qo),Oq=m6(xn),Pq=v6(xn),jq=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var n=Pl(t),r=n.device,o=n.browser,i=n.os,a=n.engine,l=n.ua;return O6({device:r,browser:o,os:i,engine:a,ua:l})},kq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return B6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Mq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return F6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},_q=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return L6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Fq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return R6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Bq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return jd?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Dq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return _6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Rq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return D6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Lq=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=Cr(t,["renderWithFragment","children","viewClassName","style"]);return M6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Nq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return P6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Vq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return j6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},Wq=function(t){var n=t.renderWithFragment,r=t.children,o=Cr(t,["renderWithFragment","children"]);return k6?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",o,r):null},zq=function(t){var n=t.renderWithFragment,r=t.children;t.viewClassName,t.style;var o=t.condition,i=Cr(t,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?Et.createElement(bn.Fragment,null,r):Et.createElement("div",i,r):null};function Uq(e){return function(t){BJ(n,t);function n(r){var o;return kJ(this,n),o=RJ(this,m0(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(Id(o)),o.onOrientationChange=o.onOrientationChange.bind(Id(o)),o.onPageLoad=o.onPageLoad.bind(Id(o)),o.state={isLandscape:!1,isPortrait:!1},o}return _J(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":jl(window))!==void 0&&jd&&(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 Et.createElement(e,g0({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Et.Component)}function Hq(){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=LJ(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":jl(window))!==void 0&&jd&&(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 N6(e){var t=e||window.navigator.userAgent;return Pl(t)}function Gq(e){var t=e||window.navigator.userAgent,n=N6(t),r=O6(n);return[r,n]}Te.AndroidView=kq,Te.BrowserTypes=Nn;var Yq=Te.BrowserView=Mq;Te.ConsoleView=Vq,Te.CustomView=zq,Te.IEView=_q,Te.IOSView=Fq,Te.MobileOnlyView=Lq;var Kq=Te.MobileView=Bq;Te.OsTypes=Ks,Te.SmartTVView=Nq,Te.TabletView=Dq,Te.WearableView=Wq,Te.WinPhoneView=Rq,Te.browserName=uq,Te.browserVersion=cq,Te.deviceDetect=JJ,Te.deviceType=yq,Te.engineName=pq,Te.engineVersion=hq,Te.fullBrowserVersion=lq,Te.getSelectorsByUserAgent=jq,Te.getUA=gq,Te.isAndroid=B6,Te.isBrowser=F6,Te.isChrome=nq,Te.isChromium=eq,Te.isConsole=j6,Te.isDesktop=tq,Te.isEdge=mq,Te.isEdgeChromium=Eq,Te.isElectron=Sq,Te.isEmbedded=qJ,Te.isFirefox=rq,Te.isIE=L6,Te.isIOS=R6,Te.isIOS13=bq,Te.isIPad13=xq,Te.isIPhone13=Cq,Te.isIPod13=wq,Te.isLegacyEdge=Tq,Te.isMIUI=Oq,Te.isMacOs=Iq,Te.isMobile=jd,Te.isMobileOnly=M6,Te.isMobileSafari=$J,Te.isOpera=iq,Te.isSafari=oq,Te.isSamsungBrowser=Pq,Te.isSmartTV=P6,Te.isTablet=_6,Te.isWearable=k6,Te.isWinPhone=D6,Te.isWindows=Aq,Te.isYandex=vq,Te.mobileModel=fq,Te.mobileVendor=dq,Te.osName=aq,Te.osVersion=sq,Te.parseUserAgent=Pl,Te.setUserAgent=GJ,Te.useDeviceData=N6,Te.useDeviceSelectors=Gq,Te.useMobileOrientation=Hq,Te.withOrientationChange=Uq;var Xq=typeof global=="object"&&global&&global.Object===Object&&global,Zq=typeof self=="object"&&self&&self.Object===Object&&self,V6=Xq||Zq||Function("return this")(),kd=V6.Symbol,W6=Object.prototype,Qq=W6.hasOwnProperty,Jq=W6.toString,kl=kd?kd.toStringTag:void 0;function qq(e){var t=Qq.call(e,kl),n=e[kl];try{e[kl]=void 0;var r=!0}catch{}var o=Jq.call(e);return r&&(t?e[kl]=n:delete e[kl]),o}var $q=Object.prototype,e$=$q.toString;function t$(e){return e$.call(e)}var n$="[object Null]",r$="[object Undefined]",z6=kd?kd.toStringTag:void 0;function o$(e){return e==null?e===void 0?r$:n$:z6&&z6 in Object(e)?qq(e):t$(e)}function i$(e){return e!=null&&typeof e=="object"}var s$="[object Symbol]";function a$(e){return typeof e=="symbol"||i$(e)&&o$(e)==s$}var l$=/\s/;function c$(e){for(var t=e.length;t--&&l$.test(e.charAt(t)););return t}var u$=/^\s+/;function d$(e){return e&&e.slice(0,c$(e)+1).replace(u$,"")}function Md(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var U6=NaN,f$=/^[-+]0x[0-9a-f]+$/i,p$=/^0b[01]+$/i,h$=/^0o[0-7]+$/i,g$=parseInt;function H6(e){if(typeof e=="number")return e;if(a$(e))return U6;if(Md(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Md(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=d$(e);var n=p$.test(e);return n||h$.test(e)?g$(e.slice(2),n?2:8):f$.test(e)?U6:+e}var x0=function(){return V6.Date.now()},m$="Expected a function",v$=Math.max,y$=Math.min;function _d(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(m$);t=H6(t)||0,Md(n)&&(f=!!n.leading,g="maxWait"in n,i=g?v$(H6(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(k){var M=r,R=o;return r=o=void 0,d=k,a=e.apply(R,M),a}function y(k){return d=k,l=setTimeout(E,t),f?m(k):a}function b(k){var M=k-u,R=k-d,V=t-M;return g?y$(V,i-R):V}function C(k){var M=k-u,R=k-d;return u===void 0||M>=t||M<0||g&&R>=i}function E(){var k=x0();if(C(k))return I(k);l=setTimeout(E,b(k))}function I(k){return l=void 0,h&&r?m(k):(r=o=void 0,a)}function S(){l!==void 0&&clearTimeout(l),d=0,r=u=o=l=void 0}function A(){return l===void 0?a:I(x0())}function O(){var k=x0(),M=C(k);if(r=arguments,o=this,u=k,M){if(l===void 0)return y(u);if(g)return clearTimeout(l),l=setTimeout(E,t),m(u)}return l===void 0&&(l=setTimeout(E,t)),a}return O.cancel=S,O.flush=A,O}var b$="Expected a function";function x$(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(b$);return Md(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),_d(e,t,{leading:r,maxWait:t,trailing:o})}var Zs=function(){return Zs=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},Zs.apply(this,arguments)};function G6(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Y6(e){return!e||!e.ownerDocument?document:e.ownerDocument}var K6=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 X6(e,t){var n;e&&(n=e.classList).add.apply(n,t.split(" "))}function Z6(e,t){e&&t.split(" ").forEach(function(n){e.classList.remove(n)})}function Q6(e){return".".concat(e.split(" ").join("."))}var C0=!!(typeof window<"u"&&window.document&&window.document.createElement),C$=Object.freeze({__proto__:null,addClasses:X6,canUseDOM:C0,classNamesToQuery:Q6,getElementDocument:Y6,getElementWindow:G6,getOptions:K6,removeClasses:Z6}),Qs=null,J6=null;C0&&window.addEventListener("resize",function(){J6!==window.devicePixelRatio&&(J6=window.devicePixelRatio,Qs=null)});function q6(){if(Qs===null){if(typeof document>"u")return Qs=0,Qs;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),Qs=n}return Qs}var $o=G6,w0=Y6,w$=K6,ei=X6,ti=Z6,Vn=Q6,Fd=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=$o(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,ei(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(){ti(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(ei(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){ti(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,E=r.axis[r.draggedAxis].track,I=(a=(i=E.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,A=(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 k=C-((h=(g=E.rect)===null||g===void 0?void 0:g[r.axis[r.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-r.axis[r.draggedAxis].dragOffset;k=r.draggedAxis==="x"&&r.isRtl?((y=(m=E.rect)===null||m===void 0?void 0:m[r.axis[r.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-S.size-k:k;var M=k/(I-S.size),R=M*(A-O);r.draggedAxis==="x"&&r.isRtl&&(R=!((b=e.getRtlHelpers())===null||b===void 0)&&b.isScrollingToNegative?-R:R),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=R}},this.onEndDrag=function(o){r.isDragging=!1;var i=w0(r.el),a=$o(r.el);o.preventDefault(),o.stopPropagation(),ti(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=Zs(Zs({},e.defaultOptions),n),this.classNames=Zs(Zs({},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=x$(this._onMouseMove,64),this.onWindowResize=_d(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=_d(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=_d(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:q6()}catch{return q6()}},e.getOffset=function(t){var n=t.getBoundingClientRect(),r=w0(t),o=$o(t);return{top:n.top+(o.pageYOffset||r.documentElement.scrollTop),left:n.left+(o.pageXOffset||r.documentElement.scrollLeft)}},e.prototype.init=function(){C0&&(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(Vn(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(Vn(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(Vn(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(Vn(this.classNames.offset)),this.maskEl=this.el.querySelector(Vn(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,Vn(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(Vn(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(Vn(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(Vn(this.classNames.track)).concat(Vn(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(Vn(this.classNames.track)).concat(Vn(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(Vn(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(Vn(this.classNames.scrollbar)))||null,this.options.autoHide||(ei(this.axis.x.scrollbar.el,this.classNames.visible),ei(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,n,r=$o(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=$o(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&&(ei(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&&(ti(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),ei(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?ei(n.scrollbar.el,this.classNames.hover):ti(n.scrollbar.el,this.classNames.hover)):(ti(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),ti(this.axis[t].track.el,this.classNames.hover),ti(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=w0(this.el),i=$o(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,ei(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=$o(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,E=40,I=function(){r.contentWrapperEl&&(b===-1?m>C&&(m-=E,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=m,d.requestAnimationFrame(I)):m<C&&(m+=E,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=$o(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=w$,e.helpers=C$,e}(),$n=function(){return $n=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},$n.apply(this,arguments)};function S$(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 $6=N.forwardRef(function(e,t){var n=e.children,r=e.scrollableNodeProps,o=r===void 0?{}:r,i=S$(e,["children","scrollableNodeProps"]),a=N.useRef(),l=N.useRef(),u=N.useRef(),d={},f={};Object.keys(i).forEach(function(m){Object.prototype.hasOwnProperty.call(Fd.defaultOptions,m)?d[m]=i[m]:f[m]=i[m]});var g=$n($n({},Fd.defaultOptions.classNames),d.classNames),h=$n($n({},o),{className:"".concat(g.contentWrapper).concat(o.className?" ".concat(o.className):""),tabIndex:0,role:"region","aria-label":d.ariaLabel||Fd.defaultOptions.ariaLabel});return N.useEffect(function(){var m;return l.current=h.ref?h.ref.current:l.current,a.current&&(m=new Fd(a.current,$n($n($n({},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)}},[]),N.createElement("div",$n({"data-simplebar":"init",ref:a},f),N.createElement("div",{className:g.wrapper},N.createElement("div",{className:g.heightAutoObserverWrapperEl},N.createElement("div",{className:g.heightAutoObserverEl})),N.createElement("div",{className:g.mask},N.createElement("div",{className:g.offset},typeof n=="function"?n({scrollableNodeRef:l,scrollableNodeProps:$n($n({},h),{ref:l}),contentNodeRef:u,contentNodeProps:{className:g.contentEl,ref:u}}):N.createElement("div",$n({},h),N.createElement("div",{className:g.contentEl},n)))),N.createElement("div",{className:g.placeholder})),N.createElement("div",{className:"".concat(g.track," simplebar-horizontal")},N.createElement("div",{className:g.scrollbar})),N.createElement("div",{className:"".concat(g.track," simplebar-vertical")},N.createElement("div",{className:g.scrollbar})))});$6.displayName="SimpleBar";const E$=me(Yq)({flexGrow:1,height:"100%",overflow:"hidden"}),T$=me($6)(({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 e2({children:e,sx:t,...n}){return p.jsxs(p.Fragment,{children:[p.jsx(E$,{children:p.jsx(T$,{timeout:500,clickOnTrack:!1,sx:t,...n,children:e})}),p.jsx(Kq,{children:p.jsx(T.Box,{sx:{overflowX:"auto",...t},...n,children:e})})]})}function t2(e){const t=T.useTheme(),n=_r(e,{flexShrink:{md:0},zIndex:1200}),{downLg:r}=Jn(),{open:o,handleDrawerToggle:i,width:a}=Ni(),l=r?T.Drawer:AJ,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(T.Box,{component:"nav",sx:n,"aria-label":"mailbox folders",children:p.jsxs(l,{...d,open:o,children:[p.jsx(DS,{}),p.jsx(e2,{sx:{"& .simplebar-content":{display:"flex",flexDirection:"column"}},children:e.children})]})})}function S0(e){const{name:t,version:n,copy:r="&copy; Applica Software Guru for"}=e;return p.jsx(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"flex-end",flexGrow:1,height:"auto",sx:{pt:1},children:p.jsxs(T.Typography,{variant:"caption",children:[p.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}const n2=me(T.AppBar,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{const{drawerWidth:n}=An();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})}}}),r2=P.forwardRef(function(t,n){const r=_r(t,{color:"text.primary"},{defaults:!0});return p.jsx(T.Button,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),A$=P.forwardRef(function(t,n){const r=_r(t,{color:"text.primary"},{defaults:!0});return p.jsx(bu,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),Js=P.forwardRef(function(t,n){const r=_r(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return p.jsx(T.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function o2({onClick:e=void 0}){const{open:t,anchorEl:n,handleClose:r,handleToggle:o}=Us(),[i,a]=ie.useLocaleState(),l=ie.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(r2,{value:"locale",onClick:o,sx:{minWidth:"auto"},children:p.jsxs(T.Stack,{direction:"row",spacing:.5,children:[p.jsx(T.Typography,{variant:"body1",children:i.toUpperCase()}),t?p.jsx(He.CaretUpOutlined,{}):p.jsx(He.CaretDownOutlined,{})]})}),p.jsx(T.Menu,{id:"menu-appbar",anchorEl:n,keepMounted:!0,open:t,onClose:r,children:l.map((d,f)=>p.jsx(T.MenuItem,{onClick:()=>u(d.locale),children:d.name},f))})]})}const I$={ml:{xs:0,lg:-2}};function i2(){const{open:e,handleDrawerToggle:t}=Ni();return p.jsx(Js,{value:"drawer","aria-label":"open drawer",sx:I$,onChange:t,selected:e,children:e?p.jsx(He.MenuFoldOutlined,{}):p.jsx(He.MenuUnfoldOutlined,{})})}function s2(e){const t=P.useRef(),n=T.useTheme(),{downLg:r,horizontal:o}=Jn(),{open:i,width:a}=Ni(),l=r?T.AppBar:n2,d={position:"fixed",color:"inherit",elevation:0,sx:_r(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||ae.extend(d,{open:i}),p.jsx(l,{ref:t,...d,children:p.jsxs(T.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&p.jsx(i2,{}),e.children]})})}function O$(e){const t=T.useTheme(),{notification:n,onClick:r,selected:o,divider:i}=e,{resource:a}=Ad(),l=ie.useNotify(),u=ie.useRedirect(),[d]=ie.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]=ie.useLocaleState(),h=P.useMemo(()=>Fr(n.created).locale(g).fromNow(),[n,g]);return p.jsx(T.ListItem,{disablePadding:!0,divider:i,children:p.jsxs(T.ListItemButton,{selected:o,onClick:f,children:[p.jsx(T.ListItemAvatar,{children:p.jsx(T.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:p.jsx(He.MessageOutlined,{})})}),p.jsx(T.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),p.jsx(T.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),p.jsx(T.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:h,primaryTypographyProps:{variant:"caption"}})]})})}function a2(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:i,resource:a,selectedIds:l=[],onUnselectItems:u}=ie.useListContext(e),d=ie.useTranslate(),f=P.useCallback(()=>{u()},[u]);return p.jsx(P$,{className:r,children:p.jsxs(T.Toolbar,{"data-test":"bulk-actions-toolbar",className:Ve(Br.toolbar,{[Br.collapsed]:l.length===0}),...ie.sanitizeListRestProps(o),children:[p.jsxs("div",{className:Br.title,children:[p.jsx(T.IconButton,{className:Br.icon,"aria-label":d("ra.action.unselect"),title:d("ra.action.unselect"),onClick:f,size:"small",children:p.jsx(an.Close,{fontSize:"small"})}),p.jsx(T.Typography,{color:"inherit",variant:"subtitle1",children:d(t,{_:t,smart_count:l.length})})]}),p.jsx(H.TopToolbar,{className:Br.topToolbar,children:P.Children.map(n,g=>P.isValidElement(g)?P.cloneElement(g,{filterValues:i,resource:a,selectedIds:l}):null)})]})})}const Vi="RaBulkActionsToolbar",Br={toolbar:`${Vi}-toolbar`,topToolbar:`${Vi}-topToolbar`,buttons:`${Vi}-buttons`,collapsed:`${Vi}-collapsed`,title:`${Vi}-title`,icon:`${Vi}-icon`},P$=me("div",{name:Vi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Br.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"?lh(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},[`& .${Br.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Br.buttons}`]:{},[`& .${Br.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Br.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Br.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),E0={p:0,m:0},l2={p:2,m:0,borderRadius:0,width:"100%"};function j$(e){const{children:t}=e,[n,r]=N.useState(null);function o(y){r(y.currentTarget)}function i(){r(null)}const a=T.useMediaQuery(y=>y.breakpoints.down("md")),{filterValues:l,resource:u,selectedIds:d=[],onUnselectItems:f}=H.useListContext(e),g=!!n&&d!==void 0&&d.length>0,h=g?"simple-popover":void 0,m=N.useCallback(()=>{f(),r(null)},[f,r]);return p.jsx(T.Fade,{in:d!==void 0&&d.length>0,children:p.jsxs(T.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[p.jsx(T.Fab,{color:"primary","aria-label":"manage",onClick:o,children:d==null?void 0:d.length}),p.jsx(T.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(T.List,{sx:E0,children:[p.jsx(T.ListItem,{sx:E0,children:p.jsx(H.Button,{onClick:m,sx:l2,label:"ra.action.unselect",startIcon:p.jsx(Pg,{}),children:p.jsx(Pg,{})})}),N.Children.map(t,y=>{var b;return p.jsx(T.ListItem,{sx:E0,children:N.isValidElement(y)?N.cloneElement(y,{filterValues:l,resource:u,selectedIds:d,sx:l2,...(b=y.props)!=null&&b.popover?{closePopover:i}:{}}):null})})]})})]})})}const c2=P.createContext({});c2.displayName="DatagridContext";function k$({children:e,value:t}){return p.jsx(c2.Provider,{value:t,children:e})}const M$=T.styled("div")(({theme:e})=>({padding:e.spacing(2),display:"flex",justifyContent:"center",gap:e.spacing(2)})),Ml="ApplicaEmpty",Wi={message:`${Ml}-message`,icon:`${Ml}-icon`,toolbar:`${Ml}-toolbar`},_$=T.styled("span",{name:Ml,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 _l({actions:e,className:t,hasCreate:n,icon:r=p.jsx(He.DropboxOutlined,{className:Wi.icon}),title:o,subtitle:i,sx:a,...l}){const{hasCreate:u}=ie.useResourceDefinition(l),d=n??u,f=ie.useResourceContext(l),g=ie.useTranslate(),h=ie.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(_$,{className:Ve(`${Ml}-root`,t),sx:a,children:[p.jsxs(T.Box,{className:Wi.message,children:[r,p.jsx(T.Typography,{variant:"h4",paragraph:!0,children:o||g(`resources.${f}.empty`,{_:y})}),i||(d?p.jsx(T.Typography,{variant:"body1",children:g(`resources.${f}.invite`,{_:b})}):null)]}),p.jsx(M$,{className:Wi.toolbar,children:e||(d?p.jsx(y3,{disableFloatingButton:!0}):null)})]})}const u2=p.jsx(H.BulkDeleteButton,{}),d2=N.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?H.PureDatagridBody:H.DatagridBody,header:o=H.DatagridHeader,children:i,className:a,empty:l,expand:u,bulkActionsToolbar:d=!1,bulkActionButtons:f=u2,hover:g,isRowSelectable:h,isRowExpandable:m,resource:y,rowClick:b,rowSx:C,rowStyle:E,size:I="small",sx:S,expandSingle:A=!1,...O}=e,k=ie.useTranslate(),{sort:M,data:R,isLoading:V,onSelect:_,onToggleItem:D,selectedIds:G,setSort:K,total:Y}=ie.useListContext(e),Z=!!f,z=P.useMemo(()=>({isRowExpandable:m,expandSingle:A}),[m,A]),J=P.useRef(null);P.useEffect(()=>{(!G||G.length===0)&&(J.current=null)},[JSON.stringify(G)]);const U=P.useCallback((Q,W)=>{const te=R.map($=>$.id),re=te.indexOf(J.current);if(J.current=W.target.checked?Q:null,W.shiftKey&&re!==-1){const $=te.indexOf(Q),fe=te.slice(Math.min(re,$),Math.max(re,$)+1),he=W.target.checked?rK(G,fe):yK(G,fe);_(h?he.filter(be=>h(R.find(ue=>ue.id===be))):he)}else D(Q)},[R,h,_,D,G]),se=p.jsx(_l,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(T.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:k("ra.navigation.no_results")})});return V===!0?p.jsx(H.DatagridLoading,{className:a,expand:u,hasBulkActions:Z,nbChildren:N.Children.count(i),size:I}):R==null||R.length===0||Y===0?l||se:p.jsx(k$,{value:z,children:p.jsxs(H.DatagridRoot,{sx:S,className:Ve(H.DatagridClasses.root,a),children:[d!=null&&P.isValidElement(d)?P.cloneElement(d,{selectedIds:G,total:Y}):f!==!1?p.jsx(a2,{children:P.isValidElement(f)?f:u2}):null,p.jsx("div",{className:H.DatagridClasses.tableWrapper,children:p.jsxs(T.Table,{ref:t,className:H.DatagridClasses.table,size:I,...B$(O),children:[f2(o,{children:i,sort:M,data:R,hasExpand:!!u,hasBulkActions:Z,isRowSelectable:h,onSelect:_,resource:y,selectedIds:G,setSort:K},i),f2(r,{expand:u,rowClick:b,data:R,hasBulkActions:Z,hover:g,onToggleItem:U,resource:y,rowSx:C,rowStyle:E,selectedIds:G,isRowSelectable:h},i)]})})]})})});function f2(e,t,n){return P.isValidElement(e)?P.cloneElement(e,t,n):P.createElement(e,t,n)}const F$=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"];function B$(e){return Object.keys(ie.sanitizeListRestProps(e)).filter(t=>!F$.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{})}d2.displayName="Datagrid";const D$=me(d2,{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 R$(e){return p.jsx(D$,{...e})}const T0=P.createContext({hasFilterSidebar:!1});function p2(){var e;return((e=P.useContext(T0))==null?void 0:e.hasFilterSidebar)??!1}function A0({source:e,value:t}){const n=P.useContext(H.FilterContext),r=H.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):Qe.isFunction(i.chip)?P.createElement(i.chip,a):null}function L$(e){const{value:t,source:n,lastItem:r}=e,o=A0({source:n,value:t});return p.jsxs(T.Stack,{children:[p.jsx(T.ListItem,{alignItems:"flex-start",sx:{pl:0},children:p.jsx(T.ListItemText,{primary:o,sx:{my:0}})}),r===n?null:p.jsx(T.Divider,{})]})}function N$(){const{filterValues:e}=ie.useListContext(),t=ie.useTranslate();return p.jsxs(T.Stack,{mt:4,width:"100%",children:[p.jsx(T.Typography,{variant:"h6",fontWeight:"bold",color:"secondary",children:t("ra.title.selected_filters")}),p.jsx(T.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(L$,{lastItem:i,value:r,source:n},n)}):null})]})}function V$(e){const{onClose:t,addQuery:n}=e,r=ie.useTranslate(),{handleSubmit:o}=ln.useFormContext(),i=P.useCallback(a=>{n(a.queryName)},[n]);return p.jsxs(T.Toolbar,{sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[p.jsx(T.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(T.Button,{variant:"contained",onClick:o(i),children:r("ra.action.save")})]})}function h2(e){const{open:t,onClose:n}=e,{filterValues:r,sort:o,perPage:i,displayedFilters:a,resource:l}=ie.useListContext(),[u,d]=I4(l),f=ie.useTranslate(),g=P.useCallback(m=>{const y={label:m.trim(),value:{filter:r,sort:o,perPage:i,displayedFilters:a}},b=O4(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(T.Dialog,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:p.jsxs($g,{toolbar:p.jsx(V$,{addQuery:g,onClose:n}),title:f("ra.title.save_favorite_filter"),modal:!0,children:[p.jsx(xr,{fullWidth:!0,source:"queryName",label:f("ra.input.query_name"),placeholder:f("ra.input.query_name_placeholder"),validate:[ie.required(),h()]}),p.jsx(N$,{})]})})}function g2(){const[e,t]=P.useState(!1),n=ie.useTranslate(),r=P.useCallback(()=>{t(!1)},[]),o=P.useCallback(()=>{t(!0)},[]);return p.jsxs(p.Fragment,{children:[p.jsx(T.Button,{sx:{height:"36px"},variant:"contained",onClick:o,children:n("ra.action.save_filter")}),p.jsx(h2,{open:e,onClose:r})]})}function W$(e){const{onDelete:t,value:n,source:r}=e,o=A0({source:r,value:n});return o&&p.jsx(T.Chip,{label:o,variant:"combined",color:"primary",sx:{height:"36px","& .MuiChip-deleteIcon":{fontSize:"1rem !important",mr:1}},deleteIcon:p.jsx(an.Close,{}),onDelete:t})}function z$(){const{filterValues:e,setFilters:t}=ie.useListContext(),n=T.useTheme(),r=T.useMediaQuery(n.breakpoints.down("sm")),o=ie.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(T.Stack,{flexDirection:"row",gap:2,children:[p.jsx(g2,{}),p.jsx(T.Button,{variant:"outlined",onClick:i,children:o("ra.action.reset_filters")})]}),[i,o]);return p.jsxs(T.Stack,{gap:2,flexDirection:r?"column":"row",children:[p.jsxs(T.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(W$,{source:u,value:d,onDelete:()=>a(u)},u)),r?null:p.jsx(l,{})]}),r?p.jsx(l,{}):null]})}function I0(){const{filterValues:e}=ie.useListContext(),t=T.useTheme(),n=T.useMediaQuery(t.breakpoints.down("sm")),r=ie.useTranslate();return e&&!Qe.isEmpty(e)?p.jsxs(T.Stack,{flexDirection:n?"column":"row",alignItems:"baseline",gap:2,m:n?2:0,children:[p.jsx(T.Typography,{variant:"h6",color:"secondary",whiteSpace:"nowrap",children:r("ra.title.active_filters")}),p.jsx(z$,{})]}):null}function m2({open:e,onClose:t,filterToRemove:n}){var y;const r=ie.useTranslate(),{resource:o,filterValues:i,sort:a,perPage:l,displayedFilters:u}=ie.useListContext(),d=((y=n==null?void 0:n.value)==null?void 0:y.filter)||i,f=(n==null?void 0:n.label)??"",[g,h]=H.useSavedQueries(o);function m(){const b={filter:d,sort:a,perPage:l,displayedFilters:u},C=H.extractValidSavedQueries(g),E=C.findIndex(I=>vl(I.value,b));h([...C.slice(0,E),...C.slice(E+1)]),t()}return p.jsxs(T.Dialog,{open:e,onClose:t,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[p.jsx(T.DialogTitle,{id:"alert-dialog-title",children:r("ra.saved_queries.remove_dialog_title",{label:f,_:"Remove saved query?"})}),p.jsx(T.DialogContent,{children:p.jsx(T.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(T.DialogActions,{children:[p.jsx(T.Button,{onClick:t,children:r("ra.action.cancel")}),p.jsx(T.Button,{onClick:m,color:"primary",autoFocus:!0,children:r("ra.action.confirm")})]})]})}function U$(e){const{query:t}=e,[n,r]=P.useState(!1),o=P.useCallback(()=>{r(a=>!a)},[]),i=ie.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsx(T.Button,{size:"small",color:"primary",onClick:o,children:i("ra.action.delete")}),p.jsx(m2,{open:n,onClose:o,filterToRemove:t})]})}function v2(e){const{closeSidebar:t}=e,{resource:n,setFilters:r,setSort:o,setPage:i,setPerPage:a}=ie.useListContext(),[l,u]=P.useState(!1),d=St(),[f]=I4(n),g=O4(f),h=ie.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(T.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(T.Accordion,{expanded:l,onChange:m,children:[p.jsx(T.AccordionSummary,{sx:{px:"20px"},expandIcon:p.jsx($w,{fontSize:"small"}),children:p.jsxs(T.Typography,{variant:"h5",fontWeight:"bold",children:[h("ra.action.saved_filters")," (",g.length,")"]})}),g==null?void 0:g.map((b,C)=>p.jsxs(T.AccordionDetails,{sx:{display:"flex",justifyContent:"space-between",px:"20px",alignItems:"center"},children:[p.jsx(T.Typography,{variant:"body1",children:b.label}),p.jsxs(T.Stack,{flexDirection:"row",alignItems:"center",children:[p.jsx(U$,{query:b}),p.jsx(T.Button,{size:"small",color:"primary",onClick:()=>y({value:b.value}),children:h("ra.action.apply")})]})]},C))]})}):p.jsx(T.Box,{height:16})}function H$(e){const{sx:t}=e;return p.jsx(T.Box,{sx:{...t,flex:"1 1 auto",backgroundColor:"background.paper",overflowY:"auto"},children:e.children})}const G$=444;function Y$(e){const{sx:t,anchor:n="right",variant:r="temporary",open:o=!1,onClose:i}=e,a=T.useTheme(),u=T.useMediaQuery(a.breakpoints.down("sm"))?"bottom":n,d=P.useCallback(()=>{Qe.isFunction(i)&&i()},[i]),f={backgroundImage:"none",boxShadow:"-10px 4px 42px 0px rgba(0, 0, 0, 0.25)",width:{sm:"30%"},maxWidth:{sm:G$},[a.breakpoints.down("sm")]:{width:"100% !important",maxWidth:"100% !important"}};return p.jsx(T.Drawer,{...e,anchor:u,onClose:d,open:o,PaperProps:{sx:{...f,...t}},variant:r,children:e.children})}function K$(e){return p.jsxs(T.Box,{children:[p.jsx(T.Divider,{}),p.jsx(T.Box,{bgcolor:"background.paper",px:2,py:2.5,children:e.children})]})}function X$(e){const{sx:t}=e;return p.jsxs(T.Box,{children:[p.jsx(T.Stack,{alignItems:"center",bgcolor:"background.paper",direction:"row",px:2.5,py:2,spacing:2,minHeight:"64px",sx:t,children:e.children}),p.jsx(T.Divider,{sx:{opacity:.6}})]})}function Z$(e){const{primary:t,secondary:n}=e;return p.jsxs(T.Box,{display:"inline-flex",flexGrow:1,flexShrink:1,flexDirection:"column",children:[t?p.jsx(T.Typography,{variant:"h5",children:t}):null,n?p.jsx(T.Typography,{variant:"h6",children:n}):null]})}function Q$(e){return p.jsx(T.Box,{display:"inline-flex",flexGrow:0,flexShrink:0,children:e.children})}const wr=Y$;wr.Content=H$,wr.Footer=K$,wr.Header=X$,wr.HeaderText=Z$,wr.HeaderAction=Q$;function J$(e){const{form:t,filters:n}=e,r=ie.useResourceContext();return p.jsx(H.FilterContext.Provider,{value:Array.isArray(n)?n:[n],children:p.jsx(ln.FormProvider,{...t,children:p.jsx(T.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(T.Box,{mb:1,children:P.cloneElement(o,{...a,resource:r})},i):null}):null})})})}function Bd(e){const{filters:t}=e,[n,r]=P.useState(!1),{setSidebarOpen:o,sidebarOpen:i}=j0(),{filterValues:a,setFilters:l}=ie.useListContext(),u=ie.useTranslate(),d=ln.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(k=>{O[k.props.source]=(a==null?void 0:a[k.props.source])??""}),O},[t,a]);P.useEffect(()=>{const O=H.getFilterFormValues(g(),a),k=g();Qe.isEqual(O,k)||h(O)},[JSON.stringify(a),a,g,h]);const C=P.useCallback(()=>{Qe.isFunction(o)&&o(!1)},[o]),E=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]),A=P.useMemo(()=>{const O=g();return Qe.isEmpty(b)||Qe.isEqual(O,b)},[b,g,y]);return p.jsxs(wr,{sx:{height:"100%"},open:i,onClose:C,children:[p.jsxs(wr.Header,{children:[p.jsx(wr.HeaderText,{primary:u("ra.action.add_filter")}),p.jsx(wr.HeaderAction,{children:p.jsx(wC,{variant:"text",loading:n,loadingPosition:"start",startIcon:p.jsx(He.ReloadOutlined,{}),onClick:S,children:u("ra.action.reset_filters")})})]}),p.jsxs(wr.Content,{children:[p.jsx(v2,{closeSidebar:C}),p.jsx(J$,{form:d,filters:t})]}),p.jsx(wr.Footer,{children:p.jsxs(T.Stack,{direction:"row",spacing:2,children:[p.jsx(T.Button,{fullWidth:!0,onClick:()=>{h({}),C()},children:u("ra.action.close")}),p.jsx(T.Button,{fullWidth:!0,disabled:A,variant:"contained",color:"primary",onClick:f(E),children:u("ra.action.apply_filters")})]})})]})}function q$(){const{setSidebarOpen:e}=j0(),t=P.useContext(H.FilterContext),n=p2(),r=H.useTranslate(),o=T.useTheme(),i=T.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(()=>{Qe.isFunction(e)&&e(!0)},[e]);return i?p.jsxs(T.Button,{className:"add-filter",onClick:a,children:[p.jsx(an.FilterList,{sx:{fontSize:"1rem",mr:.5}}),p.jsx(T.Typography,{variant:"h6",children:r("ra.action.add_filter")})]}):p.jsx(Di,{label:"ra.action.add_filter",onClick:a,children:p.jsx(an.FilterList,{})})}function y2(e){const{filters:t,actions:n,className:r,hasFilterSidebar:o,...i}=e,a=St(),l=T.useMediaQuery(a.breakpoints.down("sm")),u=n?P.cloneElement(n,{...i,...n.props}):null,{filterValues:d}=ie.useListContext();return Array.isArray(t)?p.jsx(T0.Provider,{value:{hasFilterSidebar:o},children:p.jsx(H.FilterContext.Provider,{value:t,children:l&&o?p.jsxs("div",{children:[u,Qe.isEmpty(d)?null:p.jsxs("div",{children:[p.jsx(T.Divider,{}),p.jsx(I0,{})]})]}):p.jsxs(b2,{className:r,children:[o?p.jsx(I0,{}):p.jsx(H.FilterForm,{}),p.jsx("span",{}),u]})})}):p.jsxs(b2,{className:r,children:[t?P.cloneElement(t,{...i,context:"form"}):null,p.jsx("span",{}),n?P.cloneElement(n,{...i,filters:t,...n.props}):null]})}y2.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 b2=me("div",{name:"RaListToolbar",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"}})),x2=P.memo(y2),$$=p.jsx(H.ListActions,{}),eee=p.jsx(H.Pagination,{}),tee=p.jsx(_l,{}),nee=T.Card;function ree(e){const{actions:t=$$,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:i,hasCreate:a,pagination:l=eee,children:u,className:d,component:f=nee,title:g,empty:h=tee,...m}=e,{defaultTitle:y,data:b,error:C,isLoading:E,filterValues:I,resource:S}=ie.useListContext(e),A=St(),O=N.isValidElement(n)&&(n==null?void 0:n.type)!==Bd,k=N.isValidElement(n)&&(n==null?void 0:n.type)===Bd;if(!u||!b&&E&&i)return null;function M(Z){return p.jsxs("div",{className:to.main,style:{border:O?"1px solid":"none",borderRadius:O?4:0,borderColor:O?A.palette.mode==="dark"?A.palette.divider:A.palette.grey.A800:"transparent",backgroundColor:O?A.palette.background.paper:"transparent"},children:[r||t?p.jsx(x2,{className:to.actions,filters:r,actions:t,hasCreate:a,hasFilterSidebar:k}):null,!C&&p.jsx(f,{className:to.content,sx:Z?{background:"transparent"}:{},children:o&&u&&N.isValidElement(u)?P.cloneElement(u,{bulkActionButtons:o}):u}),C?p.jsx(jg,{error:C,resetErrorBoundary:null}):l!==!1&&l]})}function R(){return h!==!1&&P.cloneElement(h,{className:to.noResults,hasCreate:a})}const V=!E&&(b==null?void 0:b.length)===0,_=!E&&(b==null?void 0:b.length)===0&&!Object.keys(I).length&&h!==!1,D=N.isValidElement(n),G=D&&(n==null?void 0:n.type)===Bd,K=E||_||D&&!G?N.Fragment:Fn,Y=!E&&!_&&(!n||G)?{content:!1}:void 0;return p.jsxs(iee,{className:Ve("list-page",d),...m,sx:V?{"& .MuiPaper-root":{backgroundColor:"transparent",border:"none"},"& .RaList-actions":{border:"1px solid",borderRadius:`${A.shape.borderRadius}px`,borderColor:A.palette.mode==="dark"?A.palette.divider:A.palette.grey.A800,backgroundColor:A.palette.background.paper}}:{},children:[p.jsx(H.Title,{title:g,defaultTitle:y,preferenceKey:`${S}.list.title`}),p.jsx(K,{...Y,children:E?p.jsx(T.CircularProgress,{sx:{position:"absolute",top:"50%",left:"50%",marginTop:"-20px",marginLeft:"-20px"}}):_?R():M(V)}),O?p.jsx(oee,{aside:n}):null,k?N.cloneElement(n,{filters:r}):null]})}function oee({aside:e}){var r;const t=((r=e==null?void 0:e.props)==null?void 0:r.order)??-1,n=St();return p.jsx(T.Card,{className:to.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(T.CardContent,{sx:{pt:1},children:P.cloneElement(e,{})})})}const qs="RaList",to={main:`${qs}-main`,content:`${qs}-content`,actions:`${qs}-actions`,noResults:`${qs}-noResults`,asideCard:`${qs}-asideCard`},iee=me("div",{name:qs,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex","& >.MuiPaper-root":{flex:1},[`& .${to.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${to.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${to.actions}`]:{},[`& .${to.noResults}`]:{alignContent:"center"},[`& .${to.asideCard}`]:{[e.breakpoints.down("md")]:{display:"none"},[`& .${H.SavedQueriesListClasses.floatingIcon}`]:{fontSize:"1.125rem"},[`& .${H.SavedQueriesListClasses.floatingTooltip}`]:{top:"-1.2em"},"& form":{marginTop:e.spacing(2)}}})),O0=P.memo(e=>{const{page:t,rowsPerPage:n,count:r,onPageChange:o,size:i="small",className:a,...l}=e,u=ie.useTranslate(),d=Math.ceil(r/n)||1;if(d===1)return p.jsx(C2,{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(C2,{className:a,children:p.jsx(T.Pagination,{size:i,count:d,page:t+1,onChange:(g,h)=>o(g,h-1),...see(l),getItemAriaLabel:f})})});O0.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 C2=me("div",{name:"RaPaginationActions",overridesResolver:e=>e.root})(()=>({flexShrink:0,ml:4}));function see({nextIconButtonProps:e,backIconButtonProps:t,slotProps:n,...r}){return r}const P0=P.memo(e=>{const{rowsPerPageOptions:t=aee,actions:n,limit:r=null,...o}=e,{isLoading:i,hasNextPage:a,page:l,perPage:u,total:d,setPage:f,setPerPage:g}=ie.useListPaginationContext(e),h=ie.useTranslate(),m=T.useMediaQuery(_=>_.breakpoints.down("md")),[y,b]=P.useState(l-1),{hasCreate:C}=ie.useResourceDefinition(e),[E,I]=P.useState(!1);P.useEffect(()=>{l!==y+1&&!E&&b(l-1)},[y,E,l]),P.useEffect(()=>{I(!1)},[l]);const S=P.useMemo(()=>d!=null?Math.ceil(d/u):void 0,[u,d]),A=P.useCallback(Qe.debounce(_=>{f(_+1)},500),[f]),O=P.useCallback((_,D)=>{var Y,Z;if(!_)return;if(_.preventDefault(),D<0||S!==void 0&&D>S-1)throw new Error(h("ra.navigation.page_out_of_boundaries",{page:D+1}));const G=(((Y=_.target.dataset)==null?void 0:Y.testid)||((Z=_.target.classList)==null?void 0:Z.value))??"",K=G.includes("MuiPaginationItem-previousNext")||G.includes("NavigateBeforeIcon")||G.includes("NavigateNextIcon")||G.includes("KeyboardArrowLeftIcon")||G.includes("KeyboardArrowRightIcon");b(D),I(!0),K?A(D):f(D+1)},[A,f,h,S,I]),k=P.useCallback(_=>{g(Number(_.target.value))},[g]),M=P.useCallback(({from:_,to:D,count:G})=>G===-1&&a?h("ra.navigation.partial_page_range_info",{offsetBegin:_,offsetEnd:D,_:"%{from}-%{to} of more than %{to}"}):h("ra.navigation.page_range_info",{offsetBegin:_,offsetEnd:D,total:G===-1?D:G,_:"%{from}-%{to} of %{count === -1 ? to : count}"}),[h,a]),R=P.useCallback(_=>h(`ra.navigation.${_}`,{_:`Go to ${_} page`}),[h]);if(i)return p.jsx(T.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(T.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,rowsPerPageOptions:lee,component:"span",labelDisplayedRows:M,sx:{justifyContent:C?"flex-start":"flex-end",display:C?"flex":"block"},...ie.sanitizeListRestProps(o)});const V=n||(!i&&d!=null?O0:void 0);return p.jsx(T.TablePagination,{count:d??-1,rowsPerPage:u,page:y,onPageChange:O,onRowsPerPageChange:k,ActionsComponent:V,nextIconButtonProps:{disabled:!a},component:"span",labelRowsPerPage:h("ra.navigation.page_rows_per_page"),labelDisplayedRows:M,getItemAriaLabel:R,rowsPerPageOptions:t,...ie.sanitizeListRestProps(o)})});P0.propTypes={actions:ie.ComponentPropType,limit:x.element,rowsPerPageOptions:x.arrayOf(x.oneOfType([x.number,x.shape({label:x.string.isRequired,value:x.number.isRequired})]))};const aee=[5,10,25,50],lee=[],w2=P.createContext({sidebarOpen:!1,setSidebarOpen:()=>{}});function S2(e){const[t,n]=P.useState(!1);return p.jsx(w2.Provider,{value:{sidebarOpen:t,setSidebarOpen:n},children:e.children})}function j0(){return P.useContext(w2)}function cee({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=uee,filterDefaultValues:i,perPage:a=10,queryOptions:l,resource:u,sort:d,storeKey:f,...g}){return p.jsx(ie.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(S2,{children:p.jsx(ree,{...g})})})}const uee={},dee=rl(cee,{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 fee(e){const t={...e,pagination:e.pagination??p.jsx(P0,{})};return p.jsx(dee,{...t})}function pee(){const e=H.useRefresh(),t=H.useNotify(),n=H.useResourceContext(),r=H.useUnselectAll(n),{selectedIds:o,data:i}=H.useListContext(),a=H.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)),[u,{isLoading:d}]=H.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(H.Button,{label:"ra.notification.mark_as_readed",disabled:d||(a==null?void 0:a.readed)!==null,onClick:f,children:p.jsx(an.Email,{})})}function hee(){const e=H.useRefresh(),t=H.useNotify(),n=H.useResourceContext(),r=H.useUnselectAll(n),{selectedIds:o,data:i}=H.useListContext(),a=H.useRecordContext(),l=o.map(g=>i.find(h=>h.id===g)).concat([a]),[u,{isLoading:d}]=H.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(H.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:d||a&&!(a!=null&&a.readed),onClick:f,children:p.jsx(an.Drafts,{})})}function gee(e){const t=H.useRecordContext(e),n=H.useResourceContext(e),r=H.useRedirect(),o=H.useNotify(),i=H.useTranslate(),[a]=H.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]=H.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(T.Typography,{variant:"subtitle1",children:p.jsxs(T.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),p.jsx(T.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(T.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:i("ra.notification.readed",{readed:l})}):null]})}function mee({...e}){const t=T.useTheme(),{mode:n,colorize:r,density:o}=P.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?T.darken:T.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(H.Datagrid,{...e,rowSx:i,children:[p.jsx(gee,{source:"notification",sortable:!1}),p.jsx(G5,{source:"created"}),p.jsxs(Go,{children:[p.jsx(pee,{}),p.jsx(hee,{})]})]})}function vee({empty:e,...t}){const n=H.useTranslate(),r=p.jsx(_l,{sx:{"& .ApplicaEmpty-icon":{fontSize:"7em"}},title:p.jsx(T.Typography,{variant:"subtitle1",style:{color:"inherit"},gutterBottom:!0,children:n("ra.navigation.no_results")})});return p.jsx(H.SimpleList,{...t,empty:e||r})}const yee={width:36,height:36,fontSize:"1rem"},bee={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function E2(){const{enable:e}=Ad();return e?p.jsx(xee,{}):null}function xee(){const e=ie.useTranslate(),t=T.useTheme(),n=ie.useRefresh(),r=ie.useNotify(),{downMd:o}=Jn(),{resource:i}=Ad(),[a,l]=P.useState([]),{data:u,isLoading:d}=ie.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}=Us();P.useEffect(()=>{!d&&u&&l(u??[])},[u,d]);const b=a.filter(I=>!I.readed).map(I=>I.id),[C]=ie.useUpdateMany(i,{ids:b,data:{readed:Fr().toISOString()}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),E=P.useCallback(()=>{C()},[C]);return p.jsxs(p.Fragment,{children:[p.jsx(Js,{value:"notifications",selected:g,onChange:y,children:p.jsx(T.Badge,{badgeContent:f,color:"primary",children:p.jsx(He.BellOutlined,{})})}),p.jsx(T.Popper,{placement:o?"bottom":"bottom-end",open:g,anchorEl:h,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:I})=>p.jsx(Ho,{type:"grow",position:o?"top":"top-right",in:g,...I,children:p.jsx(T.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:p.jsx(T.ClickAwayListener,{onClickAway:m,children:p.jsxs(Fn,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:p.jsx(p.Fragment,{children:f>0&&p.jsx(T.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:E,children:p.jsx(bu,{color:"success",size:"small",children:p.jsx(He.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[a.length===0?p.jsx(_l,{hasCreate:!1,title:p.jsx(T.Typography,{variant:"h5",children:e("ra.notification.empty")}),sx:{"& .ApplicaEmpty-icon":{fontSize:"60px"},"& .ApplicaEmpty-toolbar":{display:"none"}}}):p.jsxs(p.Fragment,{children:[p.jsx(T.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":yee,"& .MuiListItemSecondaryAction-root":{...bee,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((S,A)=>p.jsx(O$,{selected:f>0,notification:S,onClick:m,divider:A<a.length-1},S.id))}),p.jsx(T.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${i}`,LinkComponent:dt.Link,onClick:m,children:p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})})]}),p.jsx(T.Divider,{})]})})})})})]})}function T2(){const[e,t]=P.useState(!1),n=P.useCallback(()=>t(!1),[t]),r=P.useCallback(()=>t(!0),[t]),o=ie.useTranslate();return p.jsxs(p.Fragment,{children:[p.jsxs(T.ListItemButton,{onClick:r,children:[p.jsx(T.ListItemIcon,{children:p.jsx(an.Key,{})}),p.jsx(T.ListItemText,{primary:o("ra.auth.change_password")})]}),p.jsx(T.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:p.jsx(t0,{onSuccess:n})})]})}function A2(){const e=ie.useLogout(),t=ie.useTranslate();return p.jsx(p.Fragment,{children:p.jsxs(T.ListItemButton,{onClick:e,children:[p.jsx(T.ListItemIcon,{children:p.jsx(an.LogoutOutlined,{})}),p.jsx(T.ListItemText,{primary:t("ra.auth.logout")})]})})}function I2(){const e=ie.useTranslate(),t=ie.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(T.ListItemButton,{onClick:n,children:[p.jsx(T.ListItemIcon,{children:p.jsx(an.LogoutOutlined,{})}),p.jsx(T.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null}function O2(e){var b;const{roles:t}=e,n=T.useTheme(),r=ie.useDataProvider(),{identity:o}=ie.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}=Us(),h=ie.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(E=>E.name.replace("ROLE_","")).join(",")},[t,o]);return p.jsxs(p.Fragment,{children:[p.jsx(Js,{sx:{p:.25,width:"auto"},onClick:f,value:"profile",selected:u,children:p.jsxs(T.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[p.jsx(pu,{alt:(b=o==null?void 0:o.name)==null?void 0:b.toUpperCase(),src:a,size:"xs"}),p.jsx(T.Typography,{variant:"subtitle1",children:o==null?void 0:o.name})]})}),p.jsx(Ih,{placement:"bottom-end",open:u,anchorEl:d,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:C})=>p.jsx(Ho,{type:"grow",position:"top-right",in:u,...C,children:p.jsx(T.Paper,{sx:{boxShadow:n.customShadows.z1,width:290,minWidth:240,maxWidth:290,[n.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(T.ClickAwayListener,{onClickAway:g,children:p.jsxs(Fn,{elevation:0,border:!1,content:!1,children:[p.jsx(T.CardContent,{sx:{px:2.5,pt:3},children:p.jsxs(T.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[p.jsx(T.Grid,{item:!0,children:p.jsxs(T.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[p.jsx(pu,{alt:"profile user",src:a,sx:{width:32,height:32}}),p.jsxs(T.Stack,{children:[p.jsx(T.Typography,{variant:"h6",children:o==null?void 0:o.name}),p.jsx(T.Typography,{variant:"body2",color:"textSecondary",children:y})]})]})}),p.jsx(T.Grid,{item:!0,children:p.jsx(T.Tooltip,{title:"Logout",children:p.jsx(bu,{size:"large",sx:{color:"text.primary"},onClick:m,children:p.jsx(He.LogoutOutlined,{})})})})]})}),p.jsx(T.Grid,{container:!0,children:p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[p.jsx(T2,{}),p.jsx(A2,{}),p.jsx(I2,{})]})})})]})})})})})]})}function P2(e){const t=St(),{downMd:n}=Jn(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=Us();return n?p.jsxs(p.Fragment,{children:[p.jsx(Js,{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(He.MoreOutlined,{})}),p.jsx(T.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(Ho,{type:"fade",in:r,...l,children:p.jsx(T.Paper,{sx:{boxShadow:t.customShadows.z1},children:p.jsx(T.ClickAwayListener,{onClickAway:a,children:p.jsx(T.AppBar,{color:"inherit",children:p.jsx(T.Toolbar,{children:e.children})})})})})})]}):p.jsx(p.Fragment,{children:e.children})}function j2(e){return p.jsx(T.Box,{...e,flex:1})}function k2(e){const t=T.useTheme(),n=T.useScrollTrigger({disableHysteresis:!0,threshold:0}),{container:r}=An();return t.shadows[4]=t.customShadows.z1,p.jsx(T.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(T.Container,{maxWidth:r?"xl":!1,children:p.jsx(T.Box,{sx:{display:"flex",alignItems:"center"},children:e.children})})})}function M2(e){const{horizontal:t}=Jn();return t?p.jsx(k2,{children:e.children}):p.jsx(t2,{children:e.children})}function Fl({item:e,level:t}){const n=St(),{horizontal:r,downLg:o}=Jn(),{drawerOpen:i,openItem:a,activeItem:l,openDrawer:u}=El();let d="_self";e.target&&(d="_blank");const f=(e==null?void 0:e.external)!==!1?{component:P.forwardRef((E,I)=>p.jsx(dt.Link,{...E,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(E=>E===e.id)>-1,{pathname:y}=dt.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(T.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(T.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(T.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(mh,{size:4,color:m?"primary":"secondary"})}),p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",color:"inherit",children:e.title})}),(i||!i&&t!==1)&&e.chip?p.jsx(T.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(T.Avatar,{children:e.chip.avatar}):null}):null]}):p.jsxs(T.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(T.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(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",sx:{color:m?C:b},children:e.title})}):null,(i||!i&&t!==1)&&e.chip?p.jsx(T.Chip,{color:e.chip.color,variant:e.chip.variant,size:e.chip.size,label:e.chip.label,avatar:e.chip.avatar?p.jsx(T.Avatar,{children:e.chip.avatar}):null}):null]})})}const _2=me(T.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 Bl({menu:e,level:t,parentId:n,setSelectedItems:r,selectedItems:o,setSelectedLevel:i,selectedLevel:a}){var U;const l=St(),{activeItem:u}=El(),{horizontal:d}=Jn(),{drawerOpen:f}=El(),g=dt.useNavigate(),[h,m]=P.useState(!1),[y,b]=P.useState(null),[C,E]=P.useState(null);function I(se){E(null),i(t),f?(m(!h),b(y?null:e.id),r(y?"":e.id),e.url&&g(`${e.url}`)):E(se==null?void 0:se.currentTarget)}function S(){f||e.url&&g(`${e.url}`)}function A(se){E(se==null?void 0:se.currentTarget)}function O(){m(!1),b(null),E(null)}P.useMemo(()=>{y===o?t===1&&m(!0):t===a&&(m(!1),b(null))},[o,t,y,a]);const{pathname:k}=dt.useLocation(),M=!!C;function R(se,Q){se.forEach(W=>{W.url===k&&(m(!0),b(Q))})}P.useEffect(()=>{m(!1),b(null),M&&E(null),e.children&&e.children.forEach(se=>{var Q;(Q=se.children)!=null&&Q.length&&R(se.children,e.id),se.url===k&&(b(e.id),m(!0)),k.includes(se.url)&&(b(e.id),m(!0))})},[k,e.children]),P.useEffect(()=>{e.url===k&&y!==e.id&&(u([e.id]),b(e.id),E(null),m(!0))},[k,e,y,u]);const V=(U=e.children)==null?void 0:U.map(se=>{switch(se.type){case"collapse":return p.jsx(Bl,{setSelectedItems:r,setSelectedLevel:i,selectedLevel:a,selectedItems:o,menu:se,level:t+1,parentId:n},se.id);case"item":return p.jsx(Fl,{item:se,level:t+1},se.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Collapse or Item"},se.id)}}),_=y===e.id,D=t===1?p.jsx(He.BorderOutlined,{style:{fontSize:"1rem"}}):!1,G=e.icon,K=e.icon?p.jsx(G,{style:{fontSize:f?"1rem":"1.25rem"}}):D,Y=l.palette.mode==="dark"?"grey.400":"text.primary",Z=l.palette.mode==="dark"&&f?l.palette.text.primary:l.palette.primary.main,z=M?`collapse-pop-${e.id}`:void 0,J={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"};return p.jsx(p.Fragment,{children:d?p.jsx(p.Fragment,{children:p.jsxs(T.ListItemButton,{id:`boundary-${z}`,disableRipple:!0,selected:_,onMouseEnter:A,onMouseLeave:O,onClick:A,"aria-describedby":z,sx:{"&.Mui-selected":{bgcolor:"transparent"}},children:[p.jsxs(T.Box,{onClick:S,sx:J,children:[K?p.jsx(T.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,color:l.palette.secondary.dark},children:K}):null,!K&&t!==1&&p.jsx(T.ListItemIcon,{sx:{my:"auto",minWidth:e.icon?36:18,bgcolor:"transparent","&:hover":{bgcolor:"transparent"}},children:p.jsx(mh,{size:4,color:_?"primary":"secondary"})}),p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"body1",color:"inherit",sx:{my:"auto"},children:e.title})}),M?p.jsx(He.RightOutlined,{}):p.jsx(He.DownOutlined,{})]}),C?p.jsx(_2,{id:z,open:M,anchorEl:C,placement:"right-start",style:{zIndex:2001},modifiers:[{name:"offset",options:{offset:[-10,0]}}],children:({TransitionProps:se})=>p.jsx(Ho,{in:M,...se,children:p.jsx(T.Paper,{sx:{overflow:"hidden",mt:1.5,py:.5,boxShadow:l.shadows[8],backgroundImage:"none"},children:p.jsx(T.ClickAwayListener,{onClickAway:O,children:p.jsx(T.Box,{children:V})})})})}):null]})}):p.jsxs(p.Fragment,{children:[p.jsxs(T.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:Z,"&:hover":{color:Z,bgcolor:l.palette.mode==="dark"?"divider":"transparent"}}},...!f&&{"&:hover":{bgcolor:"transparent"},"&.Mui-selected":{"&:hover":{bgcolor:"transparent"},bgcolor:"transparent"}}},children:[K?p.jsx(T.ListItemIcon,{onClick:S,sx:{minWidth:28,color:y===e.id?"primary.main":Y,...!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:K}):null,f||!f&&t!==1?p.jsx(T.ListItemText,{primary:p.jsx(T.Typography,{variant:"h6",color:y===e.id?"primary":Y,children:e.title}),secondary:e.caption?p.jsx(T.Typography,{variant:"caption",color:"secondary",children:e.caption}):null}):null,f||!f&&t!==1?M||h?p.jsx(He.UpOutlined,{style:{fontSize:"0.625rem",marginLeft:1,color:l.palette.primary.main}}):p.jsx(He.DownOutlined,{style:{fontSize:"0.625rem",marginLeft:1}}):null,!f&&p.jsx(_2,{open:M,anchorEl:C,placement:"right-start",style:{zIndex:2001},popperOptions:{modifiers:[{name:"offset",options:{offset:[-12,1]}}]},children:({TransitionProps:se})=>p.jsx(Ho,{in:M,...se,children:p.jsx(T.Paper,{sx:{overflow:"hidden",mt:1.5,boxShadow:l.customShadows.z1,backgroundImage:"none",border:`1px solid ${l.palette.divider}`},children:p.jsx(T.ClickAwayListener,{onClickAway:O,children:p.jsx(T.Box,{children:V})})})})})]}),f?p.jsx(T.Collapse,{in:h,timeout:"auto",unmountOnExit:!0,children:p.jsx(T.List,{sx:{p:0},children:V})}):null]})})}const Cee=me(T.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 F2({item:e,lastItem:t,remItems:n,lastItemId:r,setSelectedItems:o,selectedItems:i,setSelectedLevel:a,selectedLevel:l}){var z,J;const u=St(),d=H.useTranslate(),{pathname:f}={pathname:""},{horizontal:g,downLg:h}=Jn(),m=El(),{drawerOpen:y,selectedID:b,activeID:C}=m,[E,I]=P.useState(null),[S,A]=P.useState(e),O=!!E;P.useEffect(()=>{if(t)if(e.id===r){const U={...e},se=n.map(Q=>Q.elements);U.children=se.flat(1),A(U)}else A(e)},[e,t,h]);function k(U,se){U.forEach(Q=>{var W;(W=Q.children)!=null&&W.length&&k(Q.children,S.id),Q.url===f&&C(se)})}function M(U){(U.children?U.children:[]).forEach(Q=>{var W;(W=Q.children)!=null&&W.length&&k(Q.children,S.id),Q.url===f&&C(S.id)})}P.useEffect(()=>{M(S),O&&I(null)},[f,S]);function R(U){O||I(U==null?void 0:U.currentTarget)}function V(){I(null)}const _=S==null?void 0:S.icon,D=S!=null&&S.icon?p.jsx(_,{style:{fontSize:20,stroke:"1.5",color:b===S.id?u.palette.primary.main:u.palette.secondary.dark}}):null,G=(z=e.children)==null?void 0:z.map(U=>{switch(U.type){case"collapse":return p.jsx(Bl,{menu:U,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i,level:1,parentId:S.id},U.id);case"item":return p.jsx(Fl,{item:U,level:1},U.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},U.id)}}),K=n.map((U,se)=>{var Q;return p.jsxs(P.Fragment,{children:[U.title?p.jsx(T.Typography,{variant:"caption",sx:{pl:2},children:U.title}):null,(Q=U==null?void 0:U.elements)==null?void 0:Q.map(W=>{switch(W.type){case"collapse":return p.jsx(Bl,{menu:W,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},W.id);case"item":return p.jsx(Fl,{item:W,level:1},W.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},W.id)}})]},se)}),Y=(J=S.children)==null?void 0:J.map(U=>{switch(U.type){case"collapse":return p.jsx(Bl,{menu:U,level:1,parentId:S.id,setSelectedItems:o,setSelectedLevel:a,selectedLevel:l,selectedItems:i},U.id);case"item":return p.jsx(Fl,{item:U,level:1},U.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Menu Items Error"},U.id)}}),Z=O?`group-pop-${e.id}`:void 0;return p.jsx(p.Fragment,{children:g?p.jsx(T.List,{children:p.jsxs(T.ListItemButton,{selected:b===S.id,sx:{p:1,my:.5,mr:1,display:"flex",alignItems:"center",backgroundColor:"inherit","&.Mui-selected":{bgcolor:"transparent"}},onMouseEnter:R,onClick:R,onMouseLeave:V,"aria-describedby":Z,children:[D?p.jsx(T.ListItemIcon,{sx:{minWidth:28},children:S.id===r?p.jsx(He.DownOutlined,{style:{fontSize:20,stroke:"1.5"}}):D}):null,p.jsx(T.ListItemText,{sx:{mr:1},primary:p.jsx(T.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(He.DownOutlined,{style:{fontSize:16,stroke:"1.5"}}):p.jsx(He.RightOutlined,{style:{fontSize:16,stroke:"1.5"}}),E?p.jsx(Cee,{id:Z,open:O,anchorEl:E,placement:"bottom-start",style:{zIndex:2001},children:({TransitionProps:U})=>p.jsx(Ho,{in:O,...U,children:p.jsx(T.Paper,{sx:{mt:.5,py:1.25,boxShadow:u.shadows[8],backgroundImage:"none"},children:p.jsx(T.ClickAwayListener,{onClickAway:V,children:p.jsx(T.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?Y:K})})})})}):null]})}):p.jsx(T.List,{subheader:e.title&&y?p.jsxs(T.Box,{sx:{pl:3,mb:1.5},children:[p.jsx(T.Typography,{variant:"subtitle2",color:u.palette.mode==="dark"?"textSecondary":"text.secondary",children:e.title}),e.caption?p.jsx(T.Typography,{variant:"caption",color:"secondary",children:e.caption}):null]}):null,sx:{mt:y&&e.title?1.5:0,py:0,zIndex:0},children:G})})}function B2(e){const{horizontal:t}=Jn(),{open:n}=Ni(),r=_r(e,{pt:n?t?0:2:0,"& > ul:first-of-type":{mt:0},display:t?{xs:"block",lg:"flex"}:"block"});return p.jsx(T.Box,{sx:r,children:e.children})}function D2(e){const{horizontal:t}=Jn(),{menu:n,isLoading:r}=Mg(),[o,i]=P.useState(""),[a,l]=P.useState(0),{horizontalMaxItems:u}=An(),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(B2,{...e,children:!r&&ae.map((n??[]).slice(0,f+1),m=>{const{type:y}=m;switch(y){case"group":return p.jsx(F2,{item:m,setSelectedItems:i,setSelectedLevel:l,selectedLevel:a,selectedItems:o,lastItem:d,remItems:g,lastItemId:h},m.id);default:return p.jsx(T.Typography,{variant:"h6",color:"error",align:"center",children:"Fix - Navigation Group"},m.id)}})})}function wee({open:e,anchorEl:t,handleClose:n,theme:r,mode:o,toggleThemeMode:i}){const a=ie.useTranslate();return p.jsx(Ih,{placement:"bottom-end",open:e,anchorEl:t,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:l})=>p.jsx(Ho,{type:"grow",position:"top-right",in:e,...l,children:p.jsx(T.Paper,{sx:{boxShadow:r.customShadows.z1,minWidth:200,[r.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:p.jsx(T.ClickAwayListener,{onClickAway:n,children:p.jsx(Fn,{elevation:0,border:!1,content:!1,children:p.jsxs(T.List,{children:[p.jsxs(T.ListItemButton,{selected:o==="light",onClick:()=>i("light"),children:[p.jsx(He.SunOutlined,{}),p.jsx(T.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.light")})]}),p.jsxs(T.ListItemButton,{selected:o==="dark",onClick:()=>i("dark"),children:[p.jsx(He.MoonOutlined,{}),p.jsx(T.Typography,{variant:"subtitle1",ml:1,children:a("ra.preferences.theme.dark")})]}),p.jsxs(T.ListItemButton,{selected:o==="auto",onClick:()=>i("auto"),children:[p.jsx(an.Brightness6,{}),p.jsx(T.Typography,{variant:"subtitle1",ml:1,textTransform:"none",children:a("ra.preferences.theme.auto")})]})]})})})})})})}function R2(){const e=T.useTheme(),{mode:t,setMode:n}=An(),{open:r,anchorEl:o,handleToggle:i,handleClose:a}=Us(),l=P.useCallback(d=>{n(d)},[n]),u=P.useCallback(()=>{switch(t){case"light":return p.jsx(He.SunOutlined,{});case"dark":return p.jsx(He.MoonOutlined,{});default:return p.jsx(an.Brightness6,{})}},[t]);return p.jsxs(Js,{value:"theme-mode","aria-label":"toggle mode",onClick:i,selected:!1,children:[p.jsx(u,{}),r?p.jsx(wee,{open:r,anchorEl:o,handleClose:a,theme:e,mode:t,toggleThemeMode:l}):null]})}const L2=P.forwardRef((e,t)=>{const n=_r(e,{display:"flex",width:"100%"});return p.jsx(T.Box,{ref:t,...e,sx:n,children:e.children})});function k0({source:e="paper"}){const{mode:t}=An(),n=T.useTheme();return P.useEffect(()=>{var o;const r=ae.get(n.palette.background,e);(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",r)},[t,n,e]),null}const N2=kS(function(t){const{name:n,version:r,enableThemeToggler:o,enableNotification:i,enableLocaleSwitcher:a}=t,{isLoading:l,navigation:u,breadcrumbs:d}=D4();return p.jsxs(L2,{children:[p.jsxs(s2,{children:[p.jsx(j2,{}),a?p.jsx(o2,{}):null,o?p.jsx(R2,{}):null,p.jsx(k0,{}),p.jsx(Vw,{}),i?p.jsx(E2,{}):null,p.jsx(P2,{children:p.jsx(O2,{})})]}),p.jsx(M2,{children:p.jsx(D2,{})}),p.jsxs(_S,{error:t.error,children:[!l&&p.jsx(Kx,{titleBottom:!0,mode:"breadcrumbs",navigation:u,breadcrumbs:d,card:!1,divider:!1,icon:!0,icons:!0}),t.children,p.jsx(dt.Outlet,{}),p.jsx(S0,{name:n,version:r,copy:t==null?void 0:t.copy})]})]})});function V2(e){const t=T.useMediaQuery(n=>n.breakpoints.down("sm"));return p.jsx(See,{disableGutters:!0,variant:t?"regular":"dense",...Eee(e)})}V2.propTypes={children:x.node,className:x.string};const See=T.styled(T.Toolbar,{name:"RaTopToolbar",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 Eee({hasCreate:e,...t}){return t}const Tee=me("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}}));function W2(){return p.jsx(Tee,{children:p.jsx(T.LinearProgress,{color:"primary"})})}function Aee(e){return t=>p.jsx(P.Suspense,{fallback:p.jsx(W2,{}),children:p.jsx(e,{...t})})}function M0({title:e}){return p.jsxs(T.Stack,{direction:"row",children:[p.jsx(T.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",p.jsx(T.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]})}const Iee=me(H.Notification,{})(({theme:e})=>({zIndex:2e3,"& *":{fontSize:e.typography.body1.fontSize}}));function z2(e){return p.jsx(Iee,{...e})}var Dl=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(Dl||{});const U2=wo().required(),H2=wo().oneOf(Object.values(Dl));function Oee(e){var E;const t=mi.useQueryClient(),[n,r]=P.useState(!1),[o,i]=P.useState(()=>()=>Promise.resolve()),a=ie.useGetIdentity(),l=(E=a==null?void 0:a.data)==null?void 0:E.email,u=ie.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}=mi.useQuery({queryKey:["GET","onboarding",l],queryFn:d,staleTime:24*60*60*1e3,retry:l!==void 0}),[m,y]=P.useState(()=>()=>Promise.resolve()),C=mi.useMutation({mutationFn:m}).mutateAsync;return P.useEffect(()=>{function I(){const S=ae.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(ae.isNil((f??{})[e]))},[f,e,r]),P.useEffect(()=>{i(()=>()=>C())},[C]),{loading:g,error:h,onboardingRequired:n,acknowledgeOnboarding:o}}function Pee(e){const[t,n]=Gg("onboarding",{}),[r,o]=P.useState(!1),[i,a]=P.useState(()=>()=>Promise.resolve());return P.useEffect(()=>{o(ae.isNil((t??{})[e]))},[t,e,o]),P.useEffect(()=>{a(()=>()=>(n(l=>ae.extend(l,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:i}}function jee(){return{onboardingRequired:!1,acknowledgeOnboarding:P.useRef(()=>Promise.resolve()).current}}function G2(e,t){Ug({mode:H2,topic:U2}).validateSync({mode:e,topic:t});const n=Oee(t),r=Pee(t),o=jee();switch(e){case Dl.USER:return n.loading?o:n.error?r:ae.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case Dl.BROWSER:return r;default:return o}}var $s=(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))($s||{});function kee(e,t){var o;const n=ae.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:i}=t;return ae.extend(n,{show:i})}case"REGISTER_TIP":{const{payload:i}=t,{id:a}=i,l=ae.chain(n.tips).clone().reject(f=>f.id===a).value(),u=ae.find(n.tips,{id:a}),d=ae.chain(u??{}).clone().extend(i).value();return l.push(d),ae.extend(n,{tips:ae.sortBy(l,["step"])})}case"UNREGISTER_TIP":{const{payload:i}=t,a=ae.isString(i)?i:i.id,l=ae.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return ae.extend(n,{tips:l})}case"DISMISS_TIP":{const{payload:i}=t,a=ae.isString(i)?i:i.id,l=ae.chain(n.tips).reject(h=>h.id===a).value(),u=ae.find(n.tips,{id:a});if(ae.isNil(u))return n;const d=ae.chain(u).clone().extend({dismissed:!0}).value();l.push(d);const f=((o=ae.chain(l).reject(h=>h.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(d==null?void 0:d.completeOnboarding)&&ae.chain(l).reject(h=>h.step<f).reject(h=>h.dismissed??!1).isEmpty().value()&&e.onComplete(),ae.extend(n,{tips:ae.sortBy(l,["step"]),currentStep:f})}case"SET_ON_COMPLETE":{const{payload:i}=t;return ae.extend(n,{onComplete:i})}case"RESTART":{const i=ae.chain(n.tips).clone().map(a=>ae.omit(a,"dismissed")).value();return ae.extend(n,{tips:i,currentStep:0})}default:return n}}const _0=P.createContext(void 0);function Mee(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=G2(t,n),[i,a]=P.useReducer(kee,{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(_0.Provider,{value:l,children:e.children})}function Y2(){const e=P.useContext(_0);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function _ee(){return Y2().state}function K2(){return Y2().dispatch}function X2(e){Ug({id:wo().required(),step:q4().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:i,currentStep:a}=_ee(),l=ae.find(i,{id:t}),{dismissed:u}=l??{},d=K2(),f=P.useCallback(()=>{d({type:$s.DISMISS_TIP,payload:t})},[d,t]);return P.useEffect(()=>{(ae.isNil(l)||n!==(l==null?void 0:l.step))&&d({type:$s.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,l,d]),P.useEffect(()=>()=>{d({type:$s.UNREGISTER_TIP,payload:t})},[t,d]),{tip:ae.chain(l??e).clone().extend({open:o&&!ae.isNil(l)&&a===n&&!u}).value(),dismiss:f}}function Fee(){const e=K2();return P.useCallback(()=>{e({type:$s.RESTART})},[e])}function Bee(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:i,dismiss:a}=X2({id:t,step:n,completeOnboarding:o}),{open:l}=i,u=ae.omit(e,["id","step","title","completeOnboarding"]);return p.jsx(ku,{...u,arrow:!0,open:l,title:p.jsxs(T.Stack,{gap:1,children:[p.jsx(T.Typography,{children:r}),p.jsx(T.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const Dee=T.styled(Bee)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${T.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${T.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${T.tooltipClasses.arrow}`]:{color:r.main}}});function Z2({children:e}){const t=dt.useLocation(),{pathname:n}=t;return P.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),p.jsx(p.Fragment,{children:e})}const Ree=me("div")({width:"100%",overflowX:"auto",display:"block"});function Lee({shadow:e,children:t,...n}){return p.jsx(Fn,{content:!1,border:!1,shadow:e,boxShadow:!0,...n,children:t})}function Q2({title:e}){return p.jsx(T.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substring(0,1).toUpperCase()})}function Nee({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}=e0(),m=ie.useResourceContext(g),y=h(),b=ie.useRecordContext(),C=r||b,E=Qe.get(C,e||"");return p.jsxs(T.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(T.Stack,{direction:"row",alignItems:"start",children:[l?P.isValidElement(l)?P.cloneElement(l,{style:Dd}):P.createElement(l,{style:Dd}):null,p.jsx(ie.FieldTitle,{label:t,source:e,resource:y||m})]}),p.jsxs(T.Stack,{direction:"row",alignItems:"center",children:[a?P.isValidElement(a)?P.cloneElement(a,{record:C,resource:m,value:E}):P.createElement(a,{source:e,record:C,resource:m,value:E}):p.jsx(T.Typography,{variant:n,children:E}),u?P.isValidElement(u)?P.cloneElement(u,{style:Dd}):P.createElement(u,{style:Dd}):null,d?p.jsx(T.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...f,children:d}):null]})]})}const Dd={width:"1.5rem",alignSelf:"center"};function Vee({children:e}){const t=St();return p.jsx(Fn,{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(T.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})}function Rd({version:e,name:t,copy:n,children:r,logo:o,background:i=Mu,footer:a=!0}){return p.jsxs(T.Box,{children:[p.jsx(k0,{source:"default"}),P.isValidElement(i)?i:P.createElement(i),p.jsxs(T.Grid,{container:!0,direction:"column",justifyContent:"flex-end",children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{ml:3},children:o||p.jsx(M0,{title:t})}),p.jsxs(T.Grid,{item:!0,xs:12,children:[p.jsx(T.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(T.Grid,{item:!0,children:p.jsx(Vee,{children:r})})}),a?p.jsx(T.Grid,{item:!0,sx:{pb:1,position:"absolute",bottom:0,ml:2},children:p.jsx(S0,{name:t,copy:n,version:e})}):null]})]})]})}function Wee({name:e,copy:t,logo:n,version:r,background:o}){const i=ie.useTranslate(),a=ie.useAuthProvider(),l=ie.useNotify(),u=dt.useNavigate(),{token:d}=dt.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"}),ae.delay(()=>u("/login"),1e3)}).catch(f=>{l(f,{type:"error"}),ae.delay(()=>u("/login"),1e3)})},[d,a,l,u]),p.jsx(Rd,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:i("ra.auth.activate")}),p.jsx(T.Typography,{component:dt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:i("ra.auth.back_to_login")})]})}),p.jsx(T.Grid,{item:!0,xs:12,children:i("ra.auth.activate_pending")})]})})}function J2(){const e=P.useCallback(()=>location.reload(),[]);return p.jsx(T.Container,{children:p.jsxs(T.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[p.jsx("img",{alt:"Error",src:AC,style:{width:"100%",maxWidth:450}}),p.jsx(T.Typography,{variant:"h2",children:"Ops! An error occurred..."}),p.jsx(T.Typography,{children:"We're fixing the problem. Please try again later."}),p.jsx(T.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}function q2({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:i=!1,oauth:a={},redirectTo:l,background:u=p.jsx(Mu,{})}){const[d,f]=ie.useSafeSetState(!1),g=ie.useLogin(),h=ie.useTranslate(),m=ie.useNotify(),y=ie.useCheckAuth(),b=dt.useNavigate();P.useEffect(()=>{y({},!1).then(()=>{b("/")}).catch(()=>{})},[y,b]);function C(E){f(!0),g(E,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(Rd,{name:t,version:e,copy:n,logo:r,background:u,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:"Login"}),i?p.jsx(T.Typography,{component:dt.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")}):null]})}),p.jsxs(T.Grid,{item:!0,xs:12,children:[p.jsxs(ie.Form,{onSubmit:C,children:[p.jsxs(T.Grid,{container:!0,children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(xr,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:ie.required(),placeholder:"user@company.name",fullWidth:!0})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:2},children:p.jsx(xr,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:ie.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o?p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:p.jsx(T.Link,{variant:"h6",component:dt.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}):null,p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Button,{variant:"contained",type:"submit",color:"primary",disabled:d,fullWidth:!0,children:d?p.jsx(T.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]}),ae.isEmpty(a)?null:p.jsxs(p.Fragment,{children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:2},children:p.jsx(T.Divider,{})}),a.google?p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:2,width:"100%"},children:p.jsx(B5,{setLoading:f})}):null]})]})]})})}function zee({name:e,copy:t,logo:n,version:r,background:o}){const[i,a]=P.useState(!1),l=ie.useTranslate(),u=ie.useRedirect(),d=ie.useNotify(),f=ie.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(Rd,{name:e,copy:t,logo:n,version:r,background:o,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:l("ra.auth.recover.title")}),p.jsx(T.Typography,{component:dt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.back_to_login")})]})}),p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(H.Form,{onSubmit:g,children:[p.jsx(T.Grid,{container:!0,children:p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"email",validate:[ie.required(),ie.email()]})})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:p.jsx(T.Typography,{variant:"caption",children:l("ra.auth.recover.inbox_help")})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(T.CircularProgress,{size:19,thickness:3}):l("ra.auth.recover")})})]})})]})})}function Uee({name:e,copy:t,version:n,logo:r,background:o}){const[i,a]=P.useState(!1),l=ie.useTranslate(),u=ie.useRedirect(),d=ie.useNotify(),f=ie.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(Rd,{name:e,copy:t,logo:r,background:o,version:n,children:p.jsxs(T.Grid,{container:!0,spacing:3,children:[p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(T.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[p.jsx(T.Typography,{variant:"h3",children:l("ra.auth.register.title")}),p.jsx(T.Typography,{component:dt.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:l("ra.auth.already_have_account")})]})}),p.jsx(T.Grid,{item:!0,xs:12,children:p.jsxs(H.Form,{onSubmit:g,children:[p.jsxs(T.Grid,{container:!0,children:[p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"name",label:l("ra.register.name"),validate:ie.required()})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"email",type:"email",validate:[ie.required(),ie.email()]})}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mb:1},children:p.jsx(xr,{source:"password",type:"password",validate:ie.required()})})]}),p.jsx(T.Grid,{item:!0,xs:12,sx:{mt:1},children:p.jsx(T.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,fullWidth:!0,children:i?p.jsx(T.CircularProgress,{size:19,thickness:3}):l("ra.auth.create_account")})})]})})]})})}function Hee(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 Gee(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function Yee(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:p.jsx(He.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 zi({color:e,theme:t}){const n=cn(t,e),{lighter:r,light:o,main:i}=n;return{borderColor:nt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:i}}}function Kee(e){const t=zi({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":zi({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":zi({color:"secondary",theme:e}),"&.MuiAlert-borderError":zi({color:"error",theme:e}),"&.MuiAlert-borderSuccess":zi({color:"success",theme:e}),"&.MuiAlert-borderInfo":zi({color:"info",theme:e}),"&.MuiAlert-borderWarning":zi({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 Xee(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function Zee(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 Ui({color:e,theme:t}){const n=cn(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function Qee(e){const t=Ui({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Ui({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Ui({color:"secondary",theme:e}),"&.MuiBadge-colorError":Ui({color:"error",theme:e}),"&.MuiBadge-colorInfo":Ui({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Ui({color:"success",theme:e}),"&.MuiBadge-colorWarning":Ui({color:"warning",theme:e})}}}}}function it({variant:e,color:t,theme:n}){const r=cn(n,t),{lighter:o,main:i,dark:a,contrastText:l}=r,u=`${t}Button`,d=Os(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 Jee(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 qee(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function $ee(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function ete(){return{MuiCard:{styleOverrides:{root:{boxShadow:"none"}}}}}function tte(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function ea({color:e,theme:t}){const n=cn(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 nte(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 F0(e){const t=nte(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function rte(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(He.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:p.jsx(He.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...F0("small")},"&.size-medium":{...F0("medium")},"&.size-large":{...F0("large")}},colorPrimary:ea({color:"primary",theme:e}),colorSecondary:ea({color:"secondary",theme:e}),colorSuccess:ea({color:"success",theme:e}),colorWarning:ea({color:"warning",theme:e}),colorInfo:ea({color:"info",theme:e}),colorError:ea({color:"error",theme:e})}}}}function ta({color:e,theme:t}){const n=cn(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function er({color:e,theme:t}){const n=cn(t,e),{light:r,lighter:o,main:i}=n;return{color:i,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:i,"&:hover":{color:r}}}}function ote(e){const t=er({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":ta({color:"primary",theme:e}),"&.MuiChip-colorSecondary":ta({color:"secondary",theme:e}),"&.MuiChip-colorError":ta({color:"error",theme:e}),"&.MuiChip-colorInfo":ta({color:"info",theme:e}),"&.MuiChip-colorSuccess":ta({color:"success",theme:e}),"&.MuiChip-colorWarning":ta({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":er({color:"primary",theme:e}),"&.MuiChip-lightSecondary":er({color:"secondary",theme:e}),"&.MuiChip-lightError":er({color:"error",theme:e}),"&.MuiChip-lightInfo":er({color:"info",theme:e}),"&.MuiChip-lightSuccess":er({color:"success",theme:e}),"&.MuiChip-lightWarning":er({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":er({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":er({color:"secondary",theme:e}),"&.MuiChip-combinedError":er({color:"error",theme:e}),"&.MuiChip-combinedInfo":er({color:"info",theme:e}),"&.MuiChip-combinedSuccess":er({color:"success",theme:e}),"&.MuiChip-combinedWarning":er({color:"warning",theme:e})}}}}}function ite(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 ste(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function ate(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function na({color:e,theme:t}){const n=cn(t,e),{main:r,dark:o,contrastText:i}=n,a=`${e}Button`,l=Os(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 lte(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":na({color:"primary",theme:e}),"&.MuiFab-secondary":na({color:"secondary",theme:e}),"&.Mui-error":na({color:"error",theme:e}),"&.MuiFab-success":na({color:"success",theme:e}),"&.MuiFab-info":na({color:"info",theme:e}),"&.MuiFab-warning":na({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 cte(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 ute(e){return{MuiInputBase:{styleOverrides:{}}}}function dte(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 fte(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function pte(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function hte(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function gte(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function mte(e){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function vte(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Hi({variant:e,theme:t}){const n=cn(t,e),{light:r}=n,o=Os(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function yte(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:{...Hi({variant:"primary",theme:e}),"&.Mui-error":{...Hi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Hi({variant:"secondary",theme:e}),colorError:Hi({variant:"error",theme:e}),colorWarning:Hi({variant:"warning",theme:e}),colorInfo:Hi({variant:"info",theme:e}),colorSuccess:Hi({variant:"success",theme:e})}}}}function bte(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function Mt({variant:e,color:t,theme:n}){const r=cn(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 xte(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":Mt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":Mt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":Mt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":Mt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":Mt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":Mt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":Mt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":Mt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":Mt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":Mt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":Mt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":Mt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":Mt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":Mt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":Mt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":Mt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":Mt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":Mt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":Mt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":Mt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":Mt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":Mt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":Mt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":Mt({variant:"outlined",color:"warning",theme:e})}}}}}}function Cte(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function ra({color:e,theme:t}){const n=cn(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 wte(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 B0(e){const t=wte(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function Ste(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:p.jsx(T.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:p.jsx(T.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":{...B0("small")},"&.size-medium":{...B0("medium")},"&.size-large":{...B0("large")}},colorPrimary:ra({color:"primary",theme:e}),colorSecondary:ra({color:"secondary",theme:e}),colorSuccess:ra({color:"success",theme:e}),colorWarning:ra({color:"warning",theme:e}),colorInfo:ra({color:"info",theme:e}),colorError:ra({color:"error",theme:e})}}}}function oa({color:e,theme:t}){const n=cn(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function Ete(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":oa({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":oa({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":oa({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":oa({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":oa({color:"info",theme:e}),"&.MuiSlider-thumbColorError":oa({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 Tte(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 D0(e,t){const n=Tte(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 Ate(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},...D0(e,"medium")},sizeLarge:{...D0(e,"large")},sizeSmall:{...D0(e,"small")}}}}}function Ite(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 Ote(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 Pte(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 jte(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function kte(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function Mte(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function _te(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function Fte(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function Bte(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 Dte(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function Rte(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function Lte(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function Nte(e){return Qe.merge(Hee(e),Gee(e),Yee(e),Kee(e),Xee(),Zee(e),Qee(e),Jee(e),qee(),$ee(),ete(),tte(),rte(e),ote(e),ite(e),ste(e),ate(),lte(e),cte(e),ute(),dte(e),fte(),pte(),hte(e),gte(e),mte(),vte(),yte(e),bte(),xte(e),Cte(e),Ste(e),Ete(e),Ate(e),Ite(e),Ote(e),Pte(e),jte(e),kte(e),Mte(),_te(),Fte(),Bte(e),Dte(e),Rte(),Lte())}function Vte(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 Wte(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 zte(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 Ute(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 Hte(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 Gte(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 Yte(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 Kte(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 Xte(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 Zte(e,t,n){switch(t){case"theme1":return Wte(e,n);case"theme2":return zte(e,n);case"theme3":return Ute(e,n);case"theme4":return Hte(e,n);case"theme5":return Gte(e,n);case"theme6":return Yte(e,n);case"theme7":return Kte(e,n);case"theme8":return Xte(e,n);default:return Vte(e)}}var R0=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];R0.primary=R0[5];var L0=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];L0.primary=L0[5];var N0=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];N0.primary=N0[5];var V0=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];V0.primary=V0[5];var W0=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];W0.primary=W0[5];var z0=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];z0.primary=z0[5];var U0=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];U0.primary=U0[5];var H0=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];H0.primary=H0[5];var G0=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];G0.primary=G0[5];var Y0=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Y0.primary=Y0[5];var K0=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];K0.primary=K0[5];var X0=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];X0.primary=X0[5];var Z0=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Z0.primary=Z0[5];var Qte={red:R0,volcano:L0,orange:N0,gold:V0,yellow:W0,lime:z0,green:U0,cyan:H0,blue:G0,geekblue:Y0,purple:K0,magenta:X0,grey:Z0},Q0=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Q0.primary=Q0[5];var J0=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];J0.primary=J0[5];var q0=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];q0.primary=q0[5];var $0=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];$0.primary=$0[5];var em=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];em.primary=em[5];var tm=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];tm.primary=tm[5];var nm=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];nm.primary=nm[5];var rm=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];rm.primary=rm[5];var om=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];om.primary=om[5];var im=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];im.primary=im[5];var sm=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];sm.primary=sm[5];var am=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];am.primary=am[5];var lm=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];lm.primary=lm[5];var Jte={red:Q0,volcano:J0,orange:q0,gold:$0,yellow:em,lime:tm,green:nm,cyan:rm,blue:om,geekblue:im,purple:sm,magenta:am,grey:lm};function qte(e,t){const n=e==="dark"?Jte:Qte;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=Zte(n,t,e);return Yp({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 $te(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 ene(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 cm({themeOverrides:e,children:t}){const n=An(),{themeDirection:r,mode:o,presetColor:i,fontFamily:a}=n,l=p3(),u=P.useMemo(()=>o==="auto"?l:o,[o,l]),d=P.useMemo(()=>qte(u,i),[u,i]),f=P.useMemo(()=>ene(a),[a]),g=P.useMemo(()=>$te(d),[d]),h=P.useMemo(()=>ae.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=Yp(h),y=ae.cloneDeep(m.components??{});return m.components=ae.merge(Nte(m),y),p.jsx(T.StyledEngineProvider,{injectFirst:!0,children:p.jsxs(Bx,{theme:m,children:[p.jsx(T.CssBaseline,{enableColorScheme:!0}),t]})})}function tne({children:e,theme:t,...n}){return p.jsx(H.CoreAdminContext,{...n,children:p.jsx(cm,{themeOverrides:t,children:p.jsx(Z2,{children:e})})})}function $2(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:E=H.localStorageStore(),ready:I,theme:S,title:A="React Admin"}=e;return p.jsx(tne,{authProvider:t,dataProvider:i,i18nProvider:u,store:E,history:l,queryClient:b,theme:S,children:p.jsx(H.AdminUI,{layout:d,dashboard:o,disableTelemetry:a,menu:m,catchAll:n,title:A,loading:f,loginPage:g,authCallbackPage:h,notification:y,requireAuth:C,ready:I,children:r})})}class eE{constructor({catch:t,display:n,log:r,error:o}){ac(this,"catch");ac(this,"display");ac(this,"log");ac(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}class nne{constructor(t){_o(this,Rl);_o(this,Ll);_o(this,ia,new Set);const{apiUrl:n}=t??{};if(!ae.isString(n)||ae.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");hi(this,Ll,n),hi(this,Rl,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}`;Gn(this,ia).has(a)||(Gn(this,ia).add(a),fetch(`${Gn(this,Ll)}/ui/error-log`,{method:"PUT",headers:Gn(this,Rl),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),Gn(this,ia).delete(a)}))}}Rl=new WeakMap,Ll=new WeakMap,ia=new WeakMap;function rne({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=i=>new eE({catch:i!=null,display:!1,log:i!=null,error:i}),...o}){const i=N.useMemo(()=>o.errorHandler?o.errorHandler:new nne({apiUrl:t}),[t,o.errorHandler]),a=console.error,l=N.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 N.useEffect(()=>(window.removeEventListener("error",l),window.addEventListener("error",l),console.error=l,()=>{window.removeEventListener("error",l),console.error=a}),[l,a]),!0}class one{constructor(t){_o(this,Nl);_o(this,Vl);_o(this,Yi,[]);const{apiUrl:n}=t??{};if(!ae.isString(n)||ae.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");hi(this,Vl,n),hi(this,Nl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ae.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ae.isString(n)||ae.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ae.isString(r)||ae.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ae.some(Gn(this,Yi),o=>ae.isEqual(o,{code:n,lang:r}))){Gn(this,Yi).push({code:n,lang:r}),fetch(`${Gn(this,Vl)}/i18n/message`,{method:"put",headers:Gn(this,Nl),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),hi(this,Yi,ae.reject(Gn(this,Yi),i=>ae.isEqual(i,{code:n,lang:r})))});return}}}Nl=new WeakMap,Vl=new WeakMap,Yi=new WeakMap;function tE(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 one({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&&(ae.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 ae.get(m,b,{})}return Ev(y,n,h,{allowMissing:r||o,onMissingKey:f})})}function ine(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=>ae.reduce(a,(l,u)=>({...l,...u}),{})).then(a=>{function l(u){return ae.get(a,u,{})}return Ev(l,n,t,{allowMissing:!0})})}function sne({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 nE(e){const[t,n]=P.useState(),r=f3(e);return P.useEffect(()=>{if(e.customProvider!==void 0){e.customProvider.then(n);return}tE(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r,e==null?void 0:e.customProvider]),t}const ane=new mi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function lne({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:i,logoIcon:a,loginPage:l=p.jsx(q2,{version:"0.0.0",name:"Applica",redirectTo:"/",background:p.jsx(Mu,{})}),menu:u,name:d,copy:f,version:g="0.0.0",dataProvider:h,authProvider:m,i18nProvider:y,errorHandler:b,error:C,enableNotification:E=!1,enableRegistration:I=!1,enablePasswordRecover:S=!1,enableThemeToggler:A=!1,enableLocaleSwitcher:O=!1,oauth:k={},queryClient:M=ane,background:R,notificationAPI:V="entities/notification",..._}){var Z;rne({apiUrl:n,errorHandler:b,catcherFn:z=>{const J=z==null?void 0:z.toString(),se=["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(W=>J==null?void 0:J.includes(W));return new eE({catch:se,display:!se,log:!se&&o===!0,error:J})}});const D=P.useMemo(()=>P.isValidElement(l)?P.cloneElement(l,{name:d,copy:f,logo:i,version:g,background:R,enableRegistration:I,enablePasswordRecover:S,oauth:k}):l,[l,d,g,f,R,i,I,S,k]),G=P.useMemo(()=>z=>{const J=d?p.jsx(M0,{title:d}):i,U=d?p.jsx(Q2,{title:d}):a;return p.jsx(N2,{...z,name:d,copy:f,version:g,logoMain:J,logoIcon:U,notification:V,enableThemeToggler:A,enableNotification:E,enableLocaleSwitcher:O,error:C})},[i,a,d,f,g,C,V,E,A,O]),K=nE({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o,customProvider:y});if(K===void 0)return p.jsx(p.Fragment,{});if(K.error)return p.jsx(Xg,{initialConfig:t,children:p.jsx(cm,{themeOverrides:e,children:p.jsx(J2,{})})});const Y=p.jsx(AZ,{children:p.jsx(B4,{menu:u,children:p.jsx(Xg,{initialConfig:t,children:p.jsx($2,{theme:e,layout:G,notification:z2,queryClient:M,dataProvider:h,authProvider:m,i18nProvider:K,loginPage:D,..._})})})});return(Z=k.google)!=null&&Z.clientId?p.jsx(bZ,{clientId:k.google.clientId,children:Y}):Y}Object.defineProperty(F,"ArrayField",{enumerable:!0,get:()=>H.ArrayField}),Object.defineProperty(F,"ArrayInputContext",{enumerable:!0,get:()=>H.ArrayInputContext}),Object.defineProperty(F,"BooleanField",{enumerable:!0,get:()=>H.BooleanField}),Object.defineProperty(F,"ChipField",{enumerable:!0,get:()=>H.ChipField}),Object.defineProperty(F,"Confirm",{enumerable:!0,get:()=>H.Confirm}),Object.defineProperty(F,"CreateContextProvider",{enumerable:!0,get:()=>H.CreateContextProvider}),Object.defineProperty(F,"CustomRoutes",{enumerable:!0,get:()=>H.CustomRoutes}),Object.defineProperty(F,"DeleteWithUndoButton",{enumerable:!0,get:()=>H.DeleteWithUndoButton}),Object.defineProperty(F,"EditButton",{enumerable:!0,get:()=>H.EditButton}),Object.defineProperty(F,"EditContextProvider",{enumerable:!0,get:()=>H.EditContextProvider}),Object.defineProperty(F,"FieldTitle",{enumerable:!0,get:()=>H.FieldTitle}),Object.defineProperty(F,"FilterButton",{enumerable:!0,get:()=>H.FilterButton}),Object.defineProperty(F,"FilterList",{enumerable:!0,get:()=>H.FilterList}),Object.defineProperty(F,"FilterListItem",{enumerable:!0,get:()=>H.FilterListItem}),Object.defineProperty(F,"FilterLiveSearch",{enumerable:!0,get:()=>H.FilterLiveSearch}),Object.defineProperty(F,"Form",{enumerable:!0,get:()=>H.Form}),Object.defineProperty(F,"FormDataConsumer",{enumerable:!0,get:()=>H.FormDataConsumer}),Object.defineProperty(F,"HttpError",{enumerable:!0,get:()=>H.HttpError}),Object.defineProperty(F,"I18nContextProvider",{enumerable:!0,get:()=>H.I18nContextProvider}),Object.defineProperty(F,"ListBase",{enumerable:!0,get:()=>H.ListBase}),Object.defineProperty(F,"LoadingIndicator",{enumerable:!0,get:()=>H.LoadingIndicator}),Object.defineProperty(F,"RaSimpleFormIterator",{enumerable:!0,get:()=>H.SimpleFormIterator}),Object.defineProperty(F,"RecordContextProvider",{enumerable:!0,get:()=>H.RecordContextProvider}),Object.defineProperty(F,"ReferenceArrayField",{enumerable:!0,get:()=>H.ReferenceArrayField}),Object.defineProperty(F,"ReferenceField",{enumerable:!0,get:()=>H.ReferenceField}),Object.defineProperty(F,"Resource",{enumerable:!0,get:()=>H.Resource}),Object.defineProperty(F,"ResourceContextProvider",{enumerable:!0,get:()=>H.ResourceContextProvider}),Object.defineProperty(F,"SaveButton",{enumerable:!0,get:()=>H.SaveButton}),Object.defineProperty(F,"SavedQueriesList",{enumerable:!0,get:()=>H.SavedQueriesList}),Object.defineProperty(F,"SimpleFormIteratorContext",{enumerable:!0,get:()=>H.SimpleFormIteratorContext}),Object.defineProperty(F,"SimpleShowLayout",{enumerable:!0,get:()=>H.SimpleShowLayout}),Object.defineProperty(F,"SingleFieldList",{enumerable:!0,get:()=>H.SingleFieldList}),Object.defineProperty(F,"TabbedFormTabs",{enumerable:!0,get:()=>H.TabbedFormTabs}),Object.defineProperty(F,"UrlField",{enumerable:!0,get:()=>H.UrlField}),Object.defineProperty(F,"ValidationError",{enumerable:!0,get:()=>H.ValidationError}),Object.defineProperty(F,"WithListContext",{enumerable:!0,get:()=>H.WithListContext}),Object.defineProperty(F,"choices",{enumerable:!0,get:()=>H.choices}),Object.defineProperty(F,"email",{enumerable:!0,get:()=>H.email}),Object.defineProperty(F,"maxLength",{enumerable:!0,get:()=>H.maxLength}),Object.defineProperty(F,"maxValue",{enumerable:!0,get:()=>H.maxValue}),Object.defineProperty(F,"minLength",{enumerable:!0,get:()=>H.minLength}),Object.defineProperty(F,"minValue",{enumerable:!0,get:()=>H.minValue}),Object.defineProperty(F,"number",{enumerable:!0,get:()=>H.number}),Object.defineProperty(F,"regex",{enumerable:!0,get:()=>H.regex}),Object.defineProperty(F,"required",{enumerable:!0,get:()=>H.required}),Object.defineProperty(F,"useArrayInput",{enumerable:!0,get:()=>H.useArrayInput}),Object.defineProperty(F,"useAuthProvider",{enumerable:!0,get:()=>H.useAuthProvider}),Object.defineProperty(F,"useCheckAuth",{enumerable:!0,get:()=>H.useCheckAuth}),Object.defineProperty(F,"useChoices",{enumerable:!0,get:()=>H.useChoices}),Object.defineProperty(F,"useChoicesContext",{enumerable:!0,get:()=>H.useChoicesContext}),Object.defineProperty(F,"useCreate",{enumerable:!0,get:()=>H.useCreate}),Object.defineProperty(F,"useCreateContext",{enumerable:!0,get:()=>H.useCreateContext}),Object.defineProperty(F,"useCreateController",{enumerable:!0,get:()=>H.useCreateController}),Object.defineProperty(F,"useCreateSuggestionContext",{enumerable:!0,get:()=>H.useCreateSuggestionContext}),Object.defineProperty(F,"useDataProvider",{enumerable:!0,get:()=>H.useDataProvider}),Object.defineProperty(F,"useDeleteMany",{enumerable:!0,get:()=>H.useDeleteMany}),Object.defineProperty(F,"useEditContext",{enumerable:!0,get:()=>H.useEditContext}),Object.defineProperty(F,"useEditController",{enumerable:!0,get:()=>H.useEditController}),Object.defineProperty(F,"useGetIdentity",{enumerable:!0,get:()=>H.useGetIdentity}),Object.defineProperty(F,"useGetList",{enumerable:!0,get:()=>H.useGetList}),Object.defineProperty(F,"useGetMany",{enumerable:!0,get:()=>H.useGetMany}),Object.defineProperty(F,"useGetManyReference",{enumerable:!0,get:()=>H.useGetManyReference}),Object.defineProperty(F,"useGetOne",{enumerable:!0,get:()=>H.useGetOne}),Object.defineProperty(F,"useInput",{enumerable:!0,get:()=>H.useInput}),Object.defineProperty(F,"useListContext",{enumerable:!0,get:()=>H.useListContext}),Object.defineProperty(F,"useListController",{enumerable:!0,get:()=>H.useListController}),Object.defineProperty(F,"useLocaleState",{enumerable:!0,get:()=>H.useLocaleState}),Object.defineProperty(F,"useLocales",{enumerable:!0,get:()=>H.useLocales}),Object.defineProperty(F,"useLogin",{enumerable:!0,get:()=>H.useLogin}),Object.defineProperty(F,"useLogout",{enumerable:!0,get:()=>H.useLogout}),Object.defineProperty(F,"useNotify",{enumerable:!0,get:()=>H.useNotify}),Object.defineProperty(F,"usePermissions",{enumerable:!0,get:()=>H.usePermissions}),Object.defineProperty(F,"useRecordContext",{enumerable:!0,get:()=>H.useRecordContext}),Object.defineProperty(F,"useReferenceArrayFieldController",{enumerable:!0,get:()=>H.useReferenceArrayFieldController}),Object.defineProperty(F,"useRefresh",{enumerable:!0,get:()=>H.useRefresh}),Object.defineProperty(F,"useRemoveFromStore",{enumerable:!0,get:()=>H.useRemoveFromStore}),Object.defineProperty(F,"useResetStore",{enumerable:!0,get:()=>H.useResetStore}),Object.defineProperty(F,"useResourceContext",{enumerable:!0,get:()=>H.useResourceContext}),Object.defineProperty(F,"useResourceDefinition",{enumerable:!0,get:()=>H.useResourceDefinition}),Object.defineProperty(F,"useResourceDefinitions",{enumerable:!0,get:()=>H.useResourceDefinitions}),Object.defineProperty(F,"useSafeSetState",{enumerable:!0,get:()=>H.useSafeSetState}),Object.defineProperty(F,"useShowContext",{enumerable:!0,get:()=>H.useShowContext}),Object.defineProperty(F,"useShowController",{enumerable:!0,get:()=>H.useShowController}),Object.defineProperty(F,"useSimpleFormIterator",{enumerable:!0,get:()=>H.useSimpleFormIterator}),Object.defineProperty(F,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>H.useSimpleFormIteratorItem}),Object.defineProperty(F,"useStore",{enumerable:!0,get:()=>H.useStore}),Object.defineProperty(F,"useStoreContext",{enumerable:!0,get:()=>H.useStoreContext}),Object.defineProperty(F,"useTranslate",{enumerable:!0,get:()=>H.useTranslate}),Object.defineProperty(F,"useTranslateLabel",{enumerable:!0,get:()=>H.useTranslateLabel}),Object.defineProperty(F,"useUnselect",{enumerable:!0,get:()=>H.useUnselect}),Object.defineProperty(F,"useUnselectAll",{enumerable:!0,get:()=>H.useUnselectAll}),Object.defineProperty(F,"useUpdate",{enumerable:!0,get:()=>H.useUpdate}),Object.defineProperty(F,"useUpdateMany",{enumerable:!0,get:()=>H.useUpdateMany}),Object.defineProperty(F,"withLifecycleCallbacks",{enumerable:!0,get:()=>H.withLifecycleCallbacks}),F.ActionsField=PZ,F.ActionsMenu=Go,F.ActivatePage=Wee,F.ActiveFiltersChips=I0,F.AddTableRow=l0,F.Admin=$2,F.AnimateButton=DP,F.AppBarStyled=n2,F.ApplicaAdmin=lne,F.ArrayInput=OZ,F.AttachmentField=W5,F.AttachmentInput=eQ,F.AuthBackground=Mu,F.AutocompleteArrayInput=nQ,F.AutocompleteInput=oQ,F.Avatar=pu,F.BooleanInput=sQ,F.Breadcrumbs=Kx,F.BulkActionsToolbar=a2,F.BulkDeleteWithConfirmButton=m3,F.BulkFloatingActionsToolbar=j$,F.Button=Di,F.CardForm=g3,F.ChangePasswordButton=T2,F.ChangePasswordForm=t0,F.CircularWithLabel=BF,F.CircularWithPath=DF,F.CoverField=U5,F.Create=LQ,F.CreateButton=y3,F.CreateButtonClasses=bd,F.CreateInDialogButton=HX,F.Datagrid=R$,F.DateAgoField=G5,F.DateField=LZ,F.DateInput=cQ,F.DateTimeInput=dQ,F.DeleteWithConfirmButton=Ri,F.Dot=mh,F.Drawer=t2,F.DrawerHeader=DS,F.DrawerHeaderStyled=FS,F.DrawerToggle=i2,F.Edit=WQ,F.EditInDialogButton=KX,F.EmailField=VZ,F.Empty=_l,F.EmptyClasses=Wi,F.Error=jg,F.Field=ES,F.FileField=Y5,F.FileInput=pQ,F.FilterSidebar=Bd,F.FilterSidebarButton=q$,F.FilterSidebarContext=T0,F.Footer=S0,F.FormHeader=HQ,F.FunctionField=zZ,F.GenericErrorPage=J2,F.GoogleLoginButton=B5,F.Header=s2,F.HeaderButton=r2,F.HeaderIconButton=A$,F.HeaderNotification=E2,F.HeaderProfile=O2,F.HeaderSpacer=j2,F.HeaderToggleButton=Js,F.HorizontalBar=k2,F.IconButton=bu,F.ImageField=z5,F.ImageInput=hQ,F.ImpersonateUserButton=EZ,F.LabeledArrayInput=N5,F.LabeledInput=yn,F.Layout=N2,F.LayoutContent=_S,F.LayoutProvider=jS,F.LayoutWrapper=L2,F.LinearWithIcon=RF,F.LinearWithLabel=LF,F.List=fee,F.ListItem=Nee,F.ListToolbar=x2,F.ListViewProvider=S2,F.Loadable=Aee,F.Loader=W2,F.LoadingButton=wC,F.LocalStorage=s3,F.LocaleButton=o2,F.LocalizedTextField=HZ,F.LocalizedTextInput=vQ,F.LoginPage=q2,F.Logo=BS,F.LogoutButton=A2,F.LongForm=Vt,F.MainCard=Fn,F.MainIcon=M0,F.MenuConfigProvider=B4,F.MenuPopover=TC,F.NavCollapse=Bl,F.NavGroup=F2,F.NavItem=Fl,F.NavList=B2,F.NavMenu=M2,F.Navigation=D2,F.Notification=z2,F.NotificationList=mee,F.NumberInput=bQ,F.OnboardingActionType=$s,F.OnboardingContext=_0,F.OnboardingModes=Dl,F.OnboardingProvider=Mee,F.OnboardingTip=Dee,F.Pagination=P0,F.PaginationActions=O0,F.PopupTransition=FF,F.RadioButtonGroupInput=CQ,F.ReadonlyField=XZ,F.RecordInput=wQ,F.RecoverPage=zee,F.ReferenceArrayInput=SQ,F.ReferenceInput=EQ,F.ReferenceManyField=X5,F.ReferenceManyInput=TQ,F.RegisterPage=Uee,F.RemoveSavedQueryDialog=m2,F.ResponsiveSection=P2,F.SaveFiltersButton=g2,F.SaveFiltersDialog=h2,F.SavedFiltersList=v2,F.ScrollTop=Z2,F.ScrollX=Ree,F.SearchInput=IQ,F.SelectArrayInput=PQ,F.SelectInput=kQ,F.ShadowBox=Lee,F.Show=sJ,F.Sidebar=wr,F.SimpleBar=e2,F.SimpleForm=$g,F.SimpleFormIterator=lJ,F.SimpleList=vee,F.SizeField=JZ,F.SmallIcon=Q2,F.SmartTextInput=MQ,F.StopImpersonateButton=I2,F.StyledArrow=SC,F.TabbedForm=a0,F.TableCreateButton=u0,F.TableFormIterator=Ed,F.TableFormIteratorContext=d0,F.TableFormIteratorItem=AS,F.TableFormIteratorItemContext=c0,F.TextField=K5,F.TextInput=xr,F.ThemeColor=k0,F.ThemeContext=Kg,F.ThemeCustomizationProvider=cm,F.ThemeProvider=Xg,F.ThemeToggler=R2,F.TimeInput=DQ,F.Toolbar=Qo,F.Tooltip=ku,F.TopToolbar=V2,F.Transitions=Ho,F.WizardForm=OS,F.createI18nProvider=tE,F.createJsonI18nProvider=ine,F.getLocalizedValue=Hg,F.getPosition=EC,F.getThemeColor=cn,F.getThemeShadow=Os,F.localizedValueHasAllLocales=md,F.localizedValueHasAtLeastOneLocale=a3,F.onboardingModesSchema=H2,F.onboardingTopicSchema=U2,F.parseTime=u3,F.useBreadcrumbs=D4,F.useGetChipValue=A0,F.useGetLocalizedValue=xX,F.useI18nLanguages=sne,F.useI18nProvider=nE,F.useIsEnabledSidebarFilter=p2,F.useLayoutContext=f0,F.useLayoutDispatch=EJ,F.useLayoutDrawerState=Ni,F.useLayoutLogoState=MS,F.useLayoutMediaState=Jn,F.useLayoutNotificationsState=Ad,F.useLayoutState=Ys,F.useLayoutThemeState=TJ,F.useListViewContext=j0,F.useLocalStorage=Gg,F.useLocalizedValue=bX,F.useMemoizedObject=f3,F.useMenu=Mg,F.useMenuConfig=El,F.useMenuContext=ad,F.useOnboardingDataProvider=G2,F.useOnboardingTip=X2,F.usePopoverState=Us,F.useRefDimensions=CX,F.useResourceDefaultValues=NQ,F.useResourceTitle=Yg,F.useRestartOnboarding=Fee,F.useSx=_r,F.useSystemTheme=p3,F.useTableFormIterator=TS,F.useTableFormIteratorItem=SS,F.useThemeConfig=An,F.useThemeContext=Zg,F.useWizardFormContext=Td,F.uuid=PK,F.walkChildren=vd,F.withLayoutProvider=kS,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
239
239
  //# sourceMappingURL=react-admin.umd.js.map