@agendize/vue-tools 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-tools.es.js +4 -4
- package/dist/vue-tools.umd.js +1 -1
- package/package.json +1 -1
package/dist/vue-tools.es.js
CHANGED
|
@@ -19241,11 +19241,11 @@ const useAccountStore = defineStore({
|
|
|
19241
19241
|
});
|
|
19242
19242
|
},
|
|
19243
19243
|
fetchAccount(success, error) {
|
|
19244
|
-
return api.
|
|
19245
|
-
if (response) {
|
|
19246
|
-
this.account = response;
|
|
19244
|
+
return api.getAccount().then((response) => {
|
|
19245
|
+
if (response.result) {
|
|
19246
|
+
this.account = response.result;
|
|
19247
19247
|
if (success) {
|
|
19248
|
-
success(response);
|
|
19248
|
+
success(response.result);
|
|
19249
19249
|
}
|
|
19250
19250
|
} else {
|
|
19251
19251
|
if (error) {
|
package/dist/vue-tools.umd.js
CHANGED
|
@@ -59,4 +59,4 @@ Vous \xEAtes num\xE9ro {'{'}number_in_line{'}'} de la file d'attente.`,placehold
|
|
|
59
59
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
60
60
|
* derived from CryptoJS.mode.CTR
|
|
61
61
|
* Jan Hruby jhruby.web@gmail.com
|
|
62
|
-
*/return r.mode.CTRGladman=function(){var n=r.lib.BlockCipherMode.extend();function a(s){if((s>>24&255)===255){var l=s>>16&255,u=s>>8&255,f=s&255;l===255?(l=0,u===255?(u=0,f===255?f=0:++f):++u):++l,s=0,s+=l<<16,s+=u<<8,s+=f}else s+=1<<24;return s}function i(s){return(s[0]=a(s[0]))===0&&(s[1]=a(s[1])),s}var o=n.Encryptor=n.extend({processBlock:function(s,l){var u=this._cipher,f=u.blockSize,x=this._iv,y=this._counter;x&&(y=this._counter=x.slice(0),this._iv=void 0),i(y);var w=y.slice(0);u.encryptBlock(w,0);for(var S=0;S<f;S++)s[l+S]^=w[S]}});return n.Decryptor=o,n}(),r.mode.CTRGladman})}(au)),au.exports}var ou={exports:{}},su;function v0(){return su||(su=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.mode.OFB=function(){var n=r.lib.BlockCipherMode.extend(),a=n.Encryptor=n.extend({processBlock:function(i,o){var s=this._cipher,l=s.blockSize,u=this._iv,f=this._keystream;u&&(f=this._keystream=u.slice(0),this._iv=void 0),s.encryptBlock(f,0);for(var x=0;x<l;x++)i[o+x]^=f[x]}});return n.Decryptor=a,n}(),r.mode.OFB})}(ou)),ou.exports}var lu={exports:{}},cu;function y0(){return cu||(cu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.mode.ECB=function(){var n=r.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(a,i){this._cipher.encryptBlock(a,i)}}),n.Decryptor=n.extend({processBlock:function(a,i){this._cipher.decryptBlock(a,i)}}),n}(),r.mode.ECB})}(lu)),lu.exports}var uu={exports:{}},du;function b0(){return du||(du=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.AnsiX923={pad:function(n,a){var i=n.sigBytes,o=a*4,s=o-i%o,l=i+s-1;n.clamp(),n.words[l>>>2]|=s<<24-l%4*8,n.sigBytes+=s},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},r.pad.Ansix923})}(uu)),uu.exports}var fu={exports:{}},hu;function E0(){return hu||(hu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.Iso10126={pad:function(n,a){var i=a*4,o=i-n.sigBytes%i;n.concat(r.lib.WordArray.random(o-1)).concat(r.lib.WordArray.create([o<<24],1))},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},r.pad.Iso10126})}(fu)),fu.exports}var mu={exports:{}},pu;function x0(){return pu||(pu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.Iso97971={pad:function(n,a){n.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(n,a)},unpad:function(n){r.pad.ZeroPadding.unpad(n),n.sigBytes--}},r.pad.Iso97971})}(mu)),mu.exports}var gu={exports:{}},vu;function w0(){return vu||(vu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.ZeroPadding={pad:function(n,a){var i=a*4;n.clamp(),n.sigBytes+=i-(n.sigBytes%i||i)},unpad:function(n){for(var a=n.words,i=n.sigBytes-1,i=n.sigBytes-1;i>=0;i--)if(a[i>>>2]>>>24-i%4*8&255){n.sigBytes=i+1;break}}},r.pad.ZeroPadding})}(gu)),gu.exports}var yu={exports:{}},bu;function _0(){return bu||(bu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})}(yu)),yu.exports}var Eu={exports:{}},xu;function S0(){return xu||(xu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return function(n){var a=r,i=a.lib,o=i.CipherParams,s=a.enc,l=s.Hex,u=a.format;u.Hex={stringify:function(f){return f.ciphertext.toString(l)},parse:function(f){var x=l.parse(f);return o.create({ciphertext:x})}}}(),r.format.Hex})}(Eu)),Eu.exports}var wu={exports:{}},_u;function I0(){return _u||(_u=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.BlockCipher,o=n.algo,s=[],l=[],u=[],f=[],x=[],y=[],w=[],S=[],T=[],N=[];(function(){for(var A=[],I=0;I<256;I++)I<128?A[I]=I<<1:A[I]=I<<1^283;for(var D=0,P=0,I=0;I<256;I++){var z=P^P<<1^P<<2^P<<3^P<<4;z=z>>>8^z&255^99,s[D]=z,l[z]=D;var Y=A[D],Q=A[Y],B=A[Q],G=A[z]*257^z*16843008;u[D]=G<<24|G>>>8,f[D]=G<<16|G>>>16,x[D]=G<<8|G>>>24,y[D]=G;var G=B*16843009^Q*65537^Y*257^D*16843008;w[z]=G<<24|G>>>8,S[z]=G<<16|G>>>16,T[z]=G<<8|G>>>24,N[z]=G,D?(D=Y^A[A[A[B^Y]]],P^=A[A[P]]):D=P=1}})();var C=[0,1,2,4,8,16,32,64,128,27,54],E=o.AES=i.extend({_doReset:function(){var A;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var I=this._keyPriorReset=this._key,D=I.words,P=I.sigBytes/4,z=this._nRounds=P+6,Y=(z+1)*4,Q=this._keySchedule=[],B=0;B<Y;B++)B<P?Q[B]=D[B]:(A=Q[B-1],B%P?P>6&&B%P==4&&(A=s[A>>>24]<<24|s[A>>>16&255]<<16|s[A>>>8&255]<<8|s[A&255]):(A=A<<8|A>>>24,A=s[A>>>24]<<24|s[A>>>16&255]<<16|s[A>>>8&255]<<8|s[A&255],A^=C[B/P|0]<<24),Q[B]=Q[B-P]^A);for(var G=this._invKeySchedule=[],re=0;re<Y;re++){var B=Y-re;if(re%4)var A=Q[B];else var A=Q[B-4];re<4||B<=4?G[re]=A:G[re]=w[s[A>>>24]]^S[s[A>>>16&255]]^T[s[A>>>8&255]]^N[s[A&255]]}}},encryptBlock:function(A,I){this._doCryptBlock(A,I,this._keySchedule,u,f,x,y,s)},decryptBlock:function(A,I){var D=A[I+1];A[I+1]=A[I+3],A[I+3]=D,this._doCryptBlock(A,I,this._invKeySchedule,w,S,T,N,l);var D=A[I+1];A[I+1]=A[I+3],A[I+3]=D},_doCryptBlock:function(A,I,D,P,z,Y,Q,B){for(var G=this._nRounds,re=A[I]^D[0],L=A[I+1]^D[1],q=A[I+2]^D[2],$=A[I+3]^D[3],j=4,V=1;V<G;V++){var Z=P[re>>>24]^z[L>>>16&255]^Y[q>>>8&255]^Q[$&255]^D[j++],se=P[L>>>24]^z[q>>>16&255]^Y[$>>>8&255]^Q[re&255]^D[j++],ie=P[q>>>24]^z[$>>>16&255]^Y[re>>>8&255]^Q[L&255]^D[j++],F=P[$>>>24]^z[re>>>16&255]^Y[L>>>8&255]^Q[q&255]^D[j++];re=Z,L=se,q=ie,$=F}var Z=(B[re>>>24]<<24|B[L>>>16&255]<<16|B[q>>>8&255]<<8|B[$&255])^D[j++],se=(B[L>>>24]<<24|B[q>>>16&255]<<16|B[$>>>8&255]<<8|B[re&255])^D[j++],ie=(B[q>>>24]<<24|B[$>>>16&255]<<16|B[re>>>8&255]<<8|B[L&255])^D[j++],F=(B[$>>>24]<<24|B[re>>>16&255]<<16|B[L>>>8&255]<<8|B[q&255])^D[j++];A[I]=Z,A[I+1]=se,A[I+2]=ie,A[I+3]=F},keySize:256/32});n.AES=i._createHelper(E)}(),r.AES})}(wu)),wu.exports}var Su={exports:{}},Iu;function C0(){return Iu||(Iu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.WordArray,o=a.BlockCipher,s=n.algo,l=[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],u=[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],x=[{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}],y=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],w=s.DES=o.extend({_doReset:function(){for(var C=this._key,E=C.words,A=[],I=0;I<56;I++){var D=l[I]-1;A[I]=E[D>>>5]>>>31-D%32&1}for(var P=this._subKeys=[],z=0;z<16;z++){for(var Y=P[z]=[],Q=f[z],I=0;I<24;I++)Y[I/6|0]|=A[(u[I]-1+Q)%28]<<31-I%6,Y[4+(I/6|0)]|=A[28+(u[I+24]-1+Q)%28]<<31-I%6;Y[0]=Y[0]<<1|Y[0]>>>31;for(var I=1;I<7;I++)Y[I]=Y[I]>>>(I-1)*4+3;Y[7]=Y[7]<<5|Y[7]>>>27}for(var B=this._invSubKeys=[],I=0;I<16;I++)B[I]=P[15-I]},encryptBlock:function(C,E){this._doCryptBlock(C,E,this._subKeys)},decryptBlock:function(C,E){this._doCryptBlock(C,E,this._invSubKeys)},_doCryptBlock:function(C,E,A){this._lBlock=C[E],this._rBlock=C[E+1],S.call(this,4,252645135),S.call(this,16,65535),T.call(this,2,858993459),T.call(this,8,16711935),S.call(this,1,1431655765);for(var I=0;I<16;I++){for(var D=A[I],P=this._lBlock,z=this._rBlock,Y=0,Q=0;Q<8;Q++)Y|=x[Q][((z^D[Q])&y[Q])>>>0];this._lBlock=z,this._rBlock=P^Y}var B=this._lBlock;this._lBlock=this._rBlock,this._rBlock=B,S.call(this,1,1431655765),T.call(this,8,16711935),T.call(this,2,858993459),S.call(this,16,65535),S.call(this,4,252645135),C[E]=this._lBlock,C[E+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function S(C,E){var A=(this._lBlock>>>C^this._rBlock)&E;this._rBlock^=A,this._lBlock^=A<<C}function T(C,E){var A=(this._rBlock>>>C^this._lBlock)&E;this._lBlock^=A,this._rBlock^=A<<C}n.DES=o._createHelper(w);var N=s.TripleDES=o.extend({_doReset:function(){var C=this._key,E=C.words;if(E.length!==2&&E.length!==4&&E.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var A=E.slice(0,2),I=E.length<4?E.slice(0,2):E.slice(2,4),D=E.length<6?E.slice(0,2):E.slice(4,6);this._des1=w.createEncryptor(i.create(A)),this._des2=w.createEncryptor(i.create(I)),this._des3=w.createEncryptor(i.create(D))},encryptBlock:function(C,E){this._des1.encryptBlock(C,E),this._des2.decryptBlock(C,E),this._des3.encryptBlock(C,E)},decryptBlock:function(C,E){this._des3.decryptBlock(C,E),this._des2.encryptBlock(C,E),this._des1.decryptBlock(C,E)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=o._createHelper(N)}(),r.TripleDES})}(Su)),Su.exports}var Cu={exports:{}},Tu;function T0(){return Tu||(Tu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.StreamCipher,o=n.algo,s=o.RC4=i.extend({_doReset:function(){for(var f=this._key,x=f.words,y=f.sigBytes,w=this._S=[],S=0;S<256;S++)w[S]=S;for(var S=0,T=0;S<256;S++){var N=S%y,C=x[N>>>2]>>>24-N%4*8&255;T=(T+w[S]+C)%256;var E=w[S];w[S]=w[T],w[T]=E}this._i=this._j=0},_doProcessBlock:function(f,x){f[x]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var f=this._S,x=this._i,y=this._j,w=0,S=0;S<4;S++){x=(x+1)%256,y=(y+f[x])%256;var T=f[x];f[x]=f[y],f[y]=T,w|=f[(f[x]+f[y])%256]<<24-S*8}return this._i=x,this._j=y,w}n.RC4=i._createHelper(s);var u=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var f=this.cfg.drop;f>0;f--)l.call(this)}});n.RC4Drop=i._createHelper(u)}(),r.RC4})}(Cu)),Cu.exports}var ku={exports:{}},Au;function k0(){return Au||(Au=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.StreamCipher,o=n.algo,s=[],l=[],u=[],f=o.Rabbit=i.extend({_doReset:function(){for(var y=this._key.words,w=this.cfg.iv,S=0;S<4;S++)y[S]=(y[S]<<8|y[S]>>>24)&16711935|(y[S]<<24|y[S]>>>8)&4278255360;var T=this._X=[y[0],y[3]<<16|y[2]>>>16,y[1],y[0]<<16|y[3]>>>16,y[2],y[1]<<16|y[0]>>>16,y[3],y[2]<<16|y[1]>>>16],N=this._C=[y[2]<<16|y[2]>>>16,y[0]&4294901760|y[1]&65535,y[3]<<16|y[3]>>>16,y[1]&4294901760|y[2]&65535,y[0]<<16|y[0]>>>16,y[2]&4294901760|y[3]&65535,y[1]<<16|y[1]>>>16,y[3]&4294901760|y[0]&65535];this._b=0;for(var S=0;S<4;S++)x.call(this);for(var S=0;S<8;S++)N[S]^=T[S+4&7];if(w){var C=w.words,E=C[0],A=C[1],I=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,D=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,P=I>>>16|D&4294901760,z=D<<16|I&65535;N[0]^=I,N[1]^=P,N[2]^=D,N[3]^=z,N[4]^=I,N[5]^=P,N[6]^=D,N[7]^=z;for(var S=0;S<4;S++)x.call(this)}},_doProcessBlock:function(y,w){var S=this._X;x.call(this),s[0]=S[0]^S[5]>>>16^S[3]<<16,s[1]=S[2]^S[7]>>>16^S[5]<<16,s[2]=S[4]^S[1]>>>16^S[7]<<16,s[3]=S[6]^S[3]>>>16^S[1]<<16;for(var T=0;T<4;T++)s[T]=(s[T]<<8|s[T]>>>24)&16711935|(s[T]<<24|s[T]>>>8)&4278255360,y[w+T]^=s[T]},blockSize:128/32,ivSize:64/32});function x(){for(var y=this._X,w=this._C,S=0;S<8;S++)l[S]=w[S];w[0]=w[0]+1295307597+this._b|0,w[1]=w[1]+3545052371+(w[0]>>>0<l[0]>>>0?1:0)|0,w[2]=w[2]+886263092+(w[1]>>>0<l[1]>>>0?1:0)|0,w[3]=w[3]+1295307597+(w[2]>>>0<l[2]>>>0?1:0)|0,w[4]=w[4]+3545052371+(w[3]>>>0<l[3]>>>0?1:0)|0,w[5]=w[5]+886263092+(w[4]>>>0<l[4]>>>0?1:0)|0,w[6]=w[6]+1295307597+(w[5]>>>0<l[5]>>>0?1:0)|0,w[7]=w[7]+3545052371+(w[6]>>>0<l[6]>>>0?1:0)|0,this._b=w[7]>>>0<l[7]>>>0?1:0;for(var S=0;S<8;S++){var T=y[S]+w[S],N=T&65535,C=T>>>16,E=((N*N>>>17)+N*C>>>15)+C*C,A=((T&4294901760)*T|0)+((T&65535)*T|0);u[S]=E^A}y[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,y[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,y[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,y[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,y[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,y[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,y[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,y[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.Rabbit=i._createHelper(f)}(),r.Rabbit})}(ku)),ku.exports}var Du={exports:{}},Nu;function A0(){return Nu||(Nu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.StreamCipher,o=n.algo,s=[],l=[],u=[],f=o.RabbitLegacy=i.extend({_doReset:function(){var y=this._key.words,w=this.cfg.iv,S=this._X=[y[0],y[3]<<16|y[2]>>>16,y[1],y[0]<<16|y[3]>>>16,y[2],y[1]<<16|y[0]>>>16,y[3],y[2]<<16|y[1]>>>16],T=this._C=[y[2]<<16|y[2]>>>16,y[0]&4294901760|y[1]&65535,y[3]<<16|y[3]>>>16,y[1]&4294901760|y[2]&65535,y[0]<<16|y[0]>>>16,y[2]&4294901760|y[3]&65535,y[1]<<16|y[1]>>>16,y[3]&4294901760|y[0]&65535];this._b=0;for(var N=0;N<4;N++)x.call(this);for(var N=0;N<8;N++)T[N]^=S[N+4&7];if(w){var C=w.words,E=C[0],A=C[1],I=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,D=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,P=I>>>16|D&4294901760,z=D<<16|I&65535;T[0]^=I,T[1]^=P,T[2]^=D,T[3]^=z,T[4]^=I,T[5]^=P,T[6]^=D,T[7]^=z;for(var N=0;N<4;N++)x.call(this)}},_doProcessBlock:function(y,w){var S=this._X;x.call(this),s[0]=S[0]^S[5]>>>16^S[3]<<16,s[1]=S[2]^S[7]>>>16^S[5]<<16,s[2]=S[4]^S[1]>>>16^S[7]<<16,s[3]=S[6]^S[3]>>>16^S[1]<<16;for(var T=0;T<4;T++)s[T]=(s[T]<<8|s[T]>>>24)&16711935|(s[T]<<24|s[T]>>>8)&4278255360,y[w+T]^=s[T]},blockSize:128/32,ivSize:64/32});function x(){for(var y=this._X,w=this._C,S=0;S<8;S++)l[S]=w[S];w[0]=w[0]+1295307597+this._b|0,w[1]=w[1]+3545052371+(w[0]>>>0<l[0]>>>0?1:0)|0,w[2]=w[2]+886263092+(w[1]>>>0<l[1]>>>0?1:0)|0,w[3]=w[3]+1295307597+(w[2]>>>0<l[2]>>>0?1:0)|0,w[4]=w[4]+3545052371+(w[3]>>>0<l[3]>>>0?1:0)|0,w[5]=w[5]+886263092+(w[4]>>>0<l[4]>>>0?1:0)|0,w[6]=w[6]+1295307597+(w[5]>>>0<l[5]>>>0?1:0)|0,w[7]=w[7]+3545052371+(w[6]>>>0<l[6]>>>0?1:0)|0,this._b=w[7]>>>0<l[7]>>>0?1:0;for(var S=0;S<8;S++){var T=y[S]+w[S],N=T&65535,C=T>>>16,E=((N*N>>>17)+N*C>>>15)+C*C,A=((T&4294901760)*T|0)+((T&65535)*T|0);u[S]=E^A}y[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,y[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,y[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,y[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,y[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,y[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,y[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,y[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.RabbitLegacy=i._createHelper(f)}(),r.RabbitLegacy})}(Du)),Du.exports}(function(t,e){(function(r,n,a){t.exports=n(ze(),ia(),o0(),s0(),Gr(),l0(),Wr(),Ri(),Lc(),c0(),Bc(),u0(),d0(),f0(),Li(),h0(),wr(),ft(),m0(),p0(),g0(),v0(),y0(),b0(),E0(),x0(),w0(),_0(),S0(),I0(),C0(),T0(),k0(),A0())})(Ae,function(r){return r})})(t0);class D0 extends xr{async getAllServiceGroups(e,r,n){const a=this.instance.get(`/api/2.1/scheduling/companies/${n}/serviceGroups?account=${encodeURIComponent(r)}`,this.getAxiosConfig(e));if(a!==null)try{return(await a).items}catch(i){throw i}else throw new Ne(ke.INTERNAL_ERROR)}async getById(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/serviceGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.get(i,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async createServiceGroup(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/serviceGroups?account=${encodeURIComponent(r)}`;const o=this.instance.post(i,a,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async updateServiceGroup(e,r,n,a,i){let o=`/api/2.1/scheduling/companies/${n}/serviceGroups/${a}?account=${encodeURIComponent(r)}`;const s=this.instance.put(o,i,this.getAxiosConfig(e));if(s!==null)try{return await s}catch(l){throw l}else throw new Ne(ke.INTERNAL_ERROR)}async delete(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/serviceGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.delete(i,this.getAxiosConfig(e));if(o!==null)try{await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}filteredDataLog(e){return e!=null&&e.items?e==null?void 0:e.items.map(r=>({id:r.id})):e}}var N0=Object.defineProperty,O0=Object.getOwnPropertyDescriptor,Mi=(t,e,r,n)=>{for(var a=n>1?void 0:n?O0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&N0(e,r,a),a};let oa=class extends lr{constructor(t,e,r,n){super("serviceGroup",n),g(this,"serviceGroupDb"),g(this,"serviceGroupService"),this.serviceGroupDb=new sc(e),this.serviceGroupService=new D0(r,t,n)}dispose(){}async onCascadeDelete(t,e,r,n){r==_t&&await this.cascadeDelete({account:t.account,companyId:t.companyId},a=>(a==null?void 0:a.companyId)===t.companyId)}async getAllServiceGroups(t,e,r,n=Le.LOCAL_THEN_REMOTE){return this.list(t,n,{account:e,companyId:r})}async getServiceGroup(t,e,r,n,a=Le.LOCAL_THEN_REMOTE){return this.getById(t,a,{account:e,companyId:r,serviceGroupId:n})}async createServiceGroup(t,e,r,n){return super.create(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r},n)}async updateServiceGroup(t,e,r,n,a){return super.update(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r,serviceGroupId:n},a)}async deleteServiceGroup(t,e,r,n){return this.deleteById(t,{account:e,companyId:r,serviceGroupId:n})}async remoteList(t,e){return(await this.serviceGroupService.getAllServiceGroups(t,e.account,e.companyId)).map(r=>ir.fromServiceGroupDto(r,e.companyId))}async remoteGet(t,e){this.checkNullable(e);const r=await this.serviceGroupService.getById(t,e.account,e.companyId,e.serviceGroupId);return ir.fromServiceGroupDto(r,e.companyId)}async remoteCreate(t,e,r){const n=ir.toServiceGroupDto(r),a=await this.serviceGroupService.createServiceGroup(t,e.account,e.companyId,n);return ir.fromServiceGroupDto(a,e.companyId)}async remoteUpdate(t,e,r){this.checkNullable(e);const n=ir.toServiceGroupDto(r),a=await this.serviceGroupService.updateServiceGroup(t,e.account,e.companyId,e.serviceGroupId,n);return ir.fromServiceGroupDto(a,e.companyId)}async remoteDelete(t,e){this.checkNullable(e),await this.serviceGroupService.delete(t,e.account,e.companyId,e.serviceGroupId)}async localList(t){return this.serviceGroupDb.getAllServiceGroups(t.companyId)}async localGet(t){return this.checkNullable(t),this.serviceGroupDb.getById(t.companyId,t.serviceGroupId)}async localBulkSave(t,e){await this.serviceGroupDb.saveAllServiceGroups(e)}async localDelete(t){this.checkNullable(t),await this.serviceGroupDb.deleteById(t.companyId,t.serviceGroupId)}async localBulkDelete(t){await this.serviceGroupDb.deleteByServiceGroupIds(t.map(e=>e.id||""))}checkNullable(t){if(!t.serviceGroupId)throw Error("Invalid state:"+JSON.stringify(t))}};Mi([Me.Unsubscribe()],oa.prototype,"dispose",1),Mi([Me.Subscribe(Ke.DELETE)],oa.prototype,"onCascadeDelete",1),oa=Mi([Me.Subscriber({channel:_t})],oa);class R0 extends xr{async getAllStaffGroups(e,r,n){const a=this.instance.get(`/api/2.1/scheduling/companies/${n}/staffGroups?account=${encodeURIComponent(r)}`,this.getAxiosConfig(e));if(a!==null)try{return(await a).items}catch(i){throw i}else throw new Ne(ke.INTERNAL_ERROR)}async getById(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/staffGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.get(i,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async createStaffGroup(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/staffGroups?account=${encodeURIComponent(r)}`;const o=this.instance.post(i,a,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async updateStaffGroup(e,r,n,a,i){let o=`/api/2.1/scheduling/companies/${n}/staffGroups/${a}?account=${encodeURIComponent(r)}`;const s=this.instance.put(o,i,this.getAxiosConfig(e));if(s!==null)try{return await s}catch(l){throw l}else throw new Ne(ke.INTERNAL_ERROR)}async delete(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/staffGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.delete(i,this.getAxiosConfig(e));if(o!==null)try{await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}filteredDataLog(e){return e!=null&&e.items?e==null?void 0:e.items.map(r=>({id:r.id})):e}}class L0{constructor(e){g(this,"indexedDb"),this.indexedDb=e}async getAllStaffGroups(e){return(await this.indexedDb.getAllValue(jr)||[]).filter(r=>r.companyId===e)}async saveAllStaffGroups(e){await this.indexedDb.putBulkValue(jr,e)}async getById(e,r){const n=await this.indexedDb.getValue(jr,r);if((n==null?void 0:n.companyId)===e)return n;throw sr}async deleteById(e,r){await this.getById(e,r),await this.indexedDb.deleteValue(jr,r),await new lc(this.indexedDb).updateStaffSkills(e,r,void 0)}async deleteByStaffGroupIds(e){await this.indexedDb.deleteValues(jr,e)}async drop(){await this.indexedDb.deleteAllValues(jr)}updateStaffs(e,r,n){this.getAllStaffGroups(e).then(async a=>{const i=a.filter(o=>{var s;return(s=o.members)==null?void 0:s.find(l=>l.id===r)});i&&i.length>0&&(i.forEach(o=>{var s,l,u;const f=(s=o.members)==null?void 0:s.findIndex(x=>x.id===r);f!=null&&(n?(l=o.members)==null||l.splice(f,1,n):(u=o.members)==null||u.splice(f,1))}),await this.saveAllStaffGroups(i))})}}var M0=Object.defineProperty,P0=Object.getOwnPropertyDescriptor,Pi=(t,e,r,n)=>{for(var a=n>1?void 0:n?P0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&M0(e,r,a),a};let sa=class extends lr{constructor(t,e,r,n){super("staffGroup",n),g(this,"staffGroupDb"),g(this,"staffGroupService"),this.staffGroupDb=new L0(e),this.staffGroupService=new R0(r,t,n)}dispose(){}async onCascadeDelete(t,e,r,n){r==_t&&await this.cascadeDelete({account:t.account,companyId:t.companyId},a=>(a==null?void 0:a.companyId)===t.companyId)}async getAllStaffGroups(t,e,r,n=Le.LOCAL_THEN_REMOTE){return this.list(t,n,{account:e,companyId:r})}async getStaffGroup(t,e,r,n,a=Le.LOCAL_THEN_REMOTE){return this.getById(t,a,{account:e,companyId:r,staffGroupId:n})}async createStaffGroup(t,e,r,n){return this.create(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r},n)}async updateStaffGroup(t,e,r,n,a){return this.update(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r,staffGroupId:n},a)}async deleteStaffGroup(t,e,r,n){return this.deleteById(t,{account:e,companyId:r,staffGroupId:n})}async remoteList(t,e){return(await this.staffGroupService.getAllStaffGroups(t,e.account,e.companyId)).map(r=>or.fromStaffGroupDto(r,e.companyId))}async remoteGet(t,e){this.checkNullable(e);const r=await this.staffGroupService.getById(t,e.account,e.companyId,e.staffGroupId);return or.fromStaffGroupDto(r,e.companyId)}async remoteCreate(t,e,r){const n=or.toStaffGroupDto(r),a=await this.staffGroupService.createStaffGroup(t,e.account,e.companyId,n);return or.fromStaffGroupDto(a,e.companyId)}async remoteUpdate(t,e,r){this.checkNullable(e);const n=or.toStaffGroupDto(r),a=await this.staffGroupService.updateStaffGroup(t,e.account,e.companyId,e.staffGroupId,n);return or.fromStaffGroupDto(a,e.companyId)}async remoteDelete(t,e){this.checkNullable(e),await this.staffGroupService.delete(t,e.account,e.companyId,e.staffGroupId)}async localList(t){return this.staffGroupDb.getAllStaffGroups(t.companyId)}async localGet(t){return this.checkNullable(t),this.staffGroupDb.getById(t.companyId,t.staffGroupId)}async localBulkSave(t,e){await this.staffGroupDb.saveAllStaffGroups(e)}async localDelete(t){this.checkNullable(t),await this.staffGroupDb.deleteById(t.companyId,t.staffGroupId)}async localBulkDelete(t){await this.staffGroupDb.deleteByStaffGroupIds(t.map(e=>e.id||""))}checkNullable(t){if(!t.staffGroupId)throw Error("Invalid state:"+JSON.stringify(t))}};Pi([Me.Unsubscribe()],sa.prototype,"dispose",1),Pi([Me.Subscribe(Ke.DELETE)],sa.prototype,"onCascadeDelete",1),sa=Pi([Me.Subscriber({channel:_t})],sa);class F0 extends xr{async getAllServiceResources(e,r,n){const a=this.instance.get(`/api/2.1/scheduling/companies/${n}/service-resources?account=${r}`,this.getAxiosConfig(e));if(a!==null)try{return(await a).items}catch(i){throw i}else throw new Ne(ke.INTERNAL_ERROR)}async getById(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/service-resources/${a}?account=${r}`;const o=this.instance.get(i,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async createService(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/service-resources?account=${r}`;const o=this.instance.post(i,a,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async updateService(e,r,n,a,i){let o=`/api/2.1/scheduling/companies/${n}/service-resources/${a}?account=${r}`;const s=this.instance.put(o,i,this.getAxiosConfig(e));if(s!==null)try{return await s}catch(l){throw l}else throw new Ne(ke.INTERNAL_ERROR)}async delete(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/service-resources/${a}?account=${r}`;const o=this.instance.delete(i,this.getAxiosConfig(e));if(o!==null)try{await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}filteredDataLog(e){return e!=null&&e.items?e==null?void 0:e.items.map(r=>({id:r.id})):e}}class z0{constructor(e){g(this,"indexedDb"),this.indexedDb=e}async getAllServiceResources(e){return(await this.indexedDb.getAllValue(Ur)||[]).filter(r=>{var n;return((n=r.company)==null?void 0:n.id)===e})}async saveAllServiceResources(e){await this.indexedDb.putBulkValue(Ur,e)}async getById(e,r){var n;const a=await this.indexedDb.getValue(Ur,r);if(((n=a==null?void 0:a.company)==null?void 0:n.id)===e)return a;throw sr}async deleteById(e,r){await this.getById(e,r),await this.indexedDb.deleteValue(Ur,r)}async deleteByServiceIds(e){await this.indexedDb.deleteValues(Ur,e)}async drop(){await this.indexedDb.deleteAllValues(Ur)}}var B0=Object.defineProperty,U0=Object.getOwnPropertyDescriptor,Fi=(t,e,r,n)=>{for(var a=n>1?void 0:n?U0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&B0(e,r,a),a};const zi=new Me.Channel;let la=class extends lr{constructor(t,e,r,n){super("serviceResource",n),g(this,"serviceResourceDb"),g(this,"serviceResourceService"),this.serviceResourceDb=new z0(e),this.serviceResourceService=new F0(r,t,n)}dispose(){}async onCascadeDelete(t,e,r,n){r==_t&&await this.cascadeDelete({account:t.account,companyId:t.companyId},a=>{var i;return((i=a==null?void 0:a.company)==null?void 0:i.id)===t.companyId})}async getAllServiceResources(t,e,r,n=Le.LOCAL_THEN_REMOTE){return this.list(t,n,{account:e,companyId:r})}async getServiceResource(t,e,r,n,a=Le.LOCAL_THEN_REMOTE){return this.getById(t,a,{account:e,companyId:r,serviceResourceId:n})}async createServiceResource(t,e,r,n){const a=await super.create(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r},n);return zi.publish(Ke.CREATE,{account:e,companyId:r,resource:a}),a}async updateServiceResource(t,e,r,n,a){const i=await super.update(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r,serviceResourceId:n},a);return zi.publish(Ke.UPDATE,{account:e,companyId:r,serviceResourceId:n,resource:i}),i}async deleteServiceResource(t,e,r,n){await this.deleteById(t,{account:e,companyId:r,serviceResourceId:n}),zi.publish(Ke.DELETE,{account:e,companyId:r,serviceResourceId:n})}async remoteList(t,e){return(await this.serviceResourceService.getAllServiceResources(t,e.account,e.companyId)).map(r=>cr.fromServiceResourceDto(r,e.companyId))}async remoteGet(t,e){this.checkNullable(e);const r=await this.serviceResourceService.getById(t,e.account,e.companyId,e.serviceResourceId);return cr.fromServiceResourceDto(r,e.companyId)}async remoteCreate(t,e,r){const n=cr.toServiceResourceDto(r),a=await this.serviceResourceService.createService(t,e.account,e.companyId,n);return cr.fromServiceResourceDto(a,e.companyId)}async remoteUpdate(t,e,r){this.checkNullable(e);const n=cr.toServiceResourceDto(r),a=await this.serviceResourceService.updateService(t,e.account,e.companyId,e.serviceResourceId,n);return cr.fromServiceResourceDto(a,e.companyId)}async remoteDelete(t,e){this.checkNullable(e),await this.serviceResourceService.delete(t,e.account,e.companyId,e.serviceResourceId)}async localList(t){return this.serviceResourceDb.getAllServiceResources(t.companyId)}async localGet(t){return this.checkNullable(t),this.serviceResourceDb.getById(t.companyId,t.serviceResourceId)}async localBulkSave(t,e){await this.serviceResourceDb.saveAllServiceResources(e)}async localDelete(t){this.checkNullable(t),await this.serviceResourceDb.deleteById(t.companyId,t.serviceResourceId)}async localBulkDelete(t){await this.serviceResourceDb.deleteByServiceIds(t.map(e=>e.id||""))}checkNullable(t){if(!t.serviceResourceId)throw Error("Invalid state:"+JSON.stringify(t))}};Fi([Me.Unsubscribe()],la.prototype,"dispose",1),Fi([Me.Subscribe(Ke.DELETE)],la.prototype,"onCascadeDelete",1),la=Fi([Me.Subscriber({channel:_t})],la);var V0=Object.defineProperty,j0=Object.getOwnPropertyDescriptor,Bi=(t,e,r,n)=>{for(var a=n>1?void 0:n?j0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&V0(e,r,a),a};let ca=class{constructor(t){g(this,"logger"),this.logger=t}dispose(){}getItem(t){return localStorage.getItem(t)}setItem(t,e){localStorage.setItem(t,e)}clear(){localStorage.clear()}removeItem(t){localStorage.removeItem(t)}getItems(t){const e=localStorage.getItem(t);return e&&JSON.parse(e)}setItems(t,e){localStorage.setItem(t,JSON.stringify(e))}async _onCascadeDelete(t,e,r,n){var a,i,o,s,l;switch(r){case _t:(a=this.logger)==null||a.debug("js-calendar-api","Company deleted (clean localStorage)",t),this._cleanRecentsCompanies(t.companyId);break;case yn:(i=this.logger)==null||i.debug("js-calendar-api","Service deleted (clean localStorage)",t),this._cleanRecentsServices(t.serviceId);break;case vn:(o=this.logger)==null||o.debug("js-calendar-api","Staff deleted (clean localStorage)",t),this._cleanRecentsStaffs(t.staffId);break;case mc:(s=this.logger)==null||s.debug("js-calendar-api","Contact deleted (clean localStorage)",t),this._cleanRecentsContacts(t.contactId);break;case pc:(l=this.logger)==null||l.debug("js-calendar-api","User deleted (clean localStorage)",t),this._cleanRecentsUsers(t.userId);break}}_cleanRecentsCompanies(t){const e=this.getItems(Bt.RECENT_COMPANIES),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_COMPANIES,r||[])}_cleanRecentsServices(t){const e=this.getItems(Bt.RECENT_SERVICES),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_SERVICES,r||[])}_cleanRecentsStaffs(t){const e=this.getItems(Bt.RECENT_STAFFS),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_STAFFS,r||[])}_cleanRecentsContacts(t){const e=this.getItems(Bt.RECENT_CONTACTS),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_CONTACTS,r||[])}_cleanRecentsUsers(t){const e=this.getItems(Bt.RECENT_USERS),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_USERS,r||[])}};Bi([Me.Unsubscribe()],ca.prototype,"dispose",1),Bi([Me.Subscribe(Ke.DELETE)],ca.prototype,"_onCascadeDelete",1),ca=Bi([Me.Subscriber({channel:_t}),Me.Subscriber({channel:yn}),Me.Subscriber({channel:vn}),Me.Subscriber({channel:mc}),Me.Subscriber({channel:pc})],ca);var Bt=(t=>(t.RECENT_SERVICES="recent_services",t.RECENT_STAFFS="recent_staffs",t.RECENT_CONTACTS="recent_contacts",t.RECENT_COMPANIES="recent_companies",t.RECENT_USERS="recent_users",t))(Bt||{});let ua;const q0=t=>(ua=t,Jt.createPinia()),H0=Jt.defineStore({id:"account",state:()=>({account:{}}),actions:{async updateAccount(t){if(!!t)return ua.updateAccount(t).then(e=>{const r=e;r.picture&&(r.picture=new Fr(r.picture.mimeType,r.picture.url.length>0?r.picture.url+"?"+Math.random().toString(32):r.picture.url)),this.account=r})},fetchAccount(t,e){return ua.getUserInfo().then(r=>{r?(this.account=r,t&&t(r)):e&&e()}).catch(()=>{e&&e()})},async updatePassword(t,e){return ua.updatePassword(t,e)}}});class G0{constructor(e){Ui(this,"internalState");Ui(this,"listeners",[]);this.internalState=e}get state(){return this.internalState}changeState(e){this.internalState=e,this.listeners.length>0&&this.listeners.forEach(r=>r(this.state))}subscribe(e){this.listeners.push(e)}unsubscribe(e){const r=this.listeners.indexOf(e);r>-1&&this.listeners.splice(r,1)}}const W0=[{label:"English",value:"en"},{label:"Fran\xE7ais",value:"fr"},{label:"Espa\xF1ol",value:"es"},{label:"Portugu\xEAs",value:"pt"},{label:"Deutsch",value:"de"},{label:"Nederlands",value:"nl"},{label:"Italiano",value:"it"},{label:"\u65E5\u672C\u8A9E",value:"ja"}];He.Bloc=G0,He.QRCode=Zf,He.createStore=q0,He.dateToString=Ru,He.languages=W0,He.onPictureUpdated=Lu,He.pad=zu,He.parseToInt=Fu,He.readBlobFromUrl=Pu,He.useAccountStore=H0,He.useBlocState=Ou,Object.defineProperties(He,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
62
|
+
*/return r.mode.CTRGladman=function(){var n=r.lib.BlockCipherMode.extend();function a(s){if((s>>24&255)===255){var l=s>>16&255,u=s>>8&255,f=s&255;l===255?(l=0,u===255?(u=0,f===255?f=0:++f):++u):++l,s=0,s+=l<<16,s+=u<<8,s+=f}else s+=1<<24;return s}function i(s){return(s[0]=a(s[0]))===0&&(s[1]=a(s[1])),s}var o=n.Encryptor=n.extend({processBlock:function(s,l){var u=this._cipher,f=u.blockSize,x=this._iv,y=this._counter;x&&(y=this._counter=x.slice(0),this._iv=void 0),i(y);var w=y.slice(0);u.encryptBlock(w,0);for(var S=0;S<f;S++)s[l+S]^=w[S]}});return n.Decryptor=o,n}(),r.mode.CTRGladman})}(au)),au.exports}var ou={exports:{}},su;function v0(){return su||(su=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.mode.OFB=function(){var n=r.lib.BlockCipherMode.extend(),a=n.Encryptor=n.extend({processBlock:function(i,o){var s=this._cipher,l=s.blockSize,u=this._iv,f=this._keystream;u&&(f=this._keystream=u.slice(0),this._iv=void 0),s.encryptBlock(f,0);for(var x=0;x<l;x++)i[o+x]^=f[x]}});return n.Decryptor=a,n}(),r.mode.OFB})}(ou)),ou.exports}var lu={exports:{}},cu;function y0(){return cu||(cu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.mode.ECB=function(){var n=r.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(a,i){this._cipher.encryptBlock(a,i)}}),n.Decryptor=n.extend({processBlock:function(a,i){this._cipher.decryptBlock(a,i)}}),n}(),r.mode.ECB})}(lu)),lu.exports}var uu={exports:{}},du;function b0(){return du||(du=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.AnsiX923={pad:function(n,a){var i=n.sigBytes,o=a*4,s=o-i%o,l=i+s-1;n.clamp(),n.words[l>>>2]|=s<<24-l%4*8,n.sigBytes+=s},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},r.pad.Ansix923})}(uu)),uu.exports}var fu={exports:{}},hu;function E0(){return hu||(hu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.Iso10126={pad:function(n,a){var i=a*4,o=i-n.sigBytes%i;n.concat(r.lib.WordArray.random(o-1)).concat(r.lib.WordArray.create([o<<24],1))},unpad:function(n){var a=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=a}},r.pad.Iso10126})}(fu)),fu.exports}var mu={exports:{}},pu;function x0(){return pu||(pu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.Iso97971={pad:function(n,a){n.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(n,a)},unpad:function(n){r.pad.ZeroPadding.unpad(n),n.sigBytes--}},r.pad.Iso97971})}(mu)),mu.exports}var gu={exports:{}},vu;function w0(){return vu||(vu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.ZeroPadding={pad:function(n,a){var i=a*4;n.clamp(),n.sigBytes+=i-(n.sigBytes%i||i)},unpad:function(n){for(var a=n.words,i=n.sigBytes-1,i=n.sigBytes-1;i>=0;i--)if(a[i>>>2]>>>24-i%4*8&255){n.sigBytes=i+1;break}}},r.pad.ZeroPadding})}(gu)),gu.exports}var yu={exports:{}},bu;function _0(){return bu||(bu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})}(yu)),yu.exports}var Eu={exports:{}},xu;function S0(){return xu||(xu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),ft())})(Ae,function(r){return function(n){var a=r,i=a.lib,o=i.CipherParams,s=a.enc,l=s.Hex,u=a.format;u.Hex={stringify:function(f){return f.ciphertext.toString(l)},parse:function(f){var x=l.parse(f);return o.create({ciphertext:x})}}}(),r.format.Hex})}(Eu)),Eu.exports}var wu={exports:{}},_u;function I0(){return _u||(_u=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.BlockCipher,o=n.algo,s=[],l=[],u=[],f=[],x=[],y=[],w=[],S=[],T=[],N=[];(function(){for(var A=[],I=0;I<256;I++)I<128?A[I]=I<<1:A[I]=I<<1^283;for(var D=0,P=0,I=0;I<256;I++){var z=P^P<<1^P<<2^P<<3^P<<4;z=z>>>8^z&255^99,s[D]=z,l[z]=D;var Y=A[D],Q=A[Y],B=A[Q],G=A[z]*257^z*16843008;u[D]=G<<24|G>>>8,f[D]=G<<16|G>>>16,x[D]=G<<8|G>>>24,y[D]=G;var G=B*16843009^Q*65537^Y*257^D*16843008;w[z]=G<<24|G>>>8,S[z]=G<<16|G>>>16,T[z]=G<<8|G>>>24,N[z]=G,D?(D=Y^A[A[A[B^Y]]],P^=A[A[P]]):D=P=1}})();var C=[0,1,2,4,8,16,32,64,128,27,54],E=o.AES=i.extend({_doReset:function(){var A;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var I=this._keyPriorReset=this._key,D=I.words,P=I.sigBytes/4,z=this._nRounds=P+6,Y=(z+1)*4,Q=this._keySchedule=[],B=0;B<Y;B++)B<P?Q[B]=D[B]:(A=Q[B-1],B%P?P>6&&B%P==4&&(A=s[A>>>24]<<24|s[A>>>16&255]<<16|s[A>>>8&255]<<8|s[A&255]):(A=A<<8|A>>>24,A=s[A>>>24]<<24|s[A>>>16&255]<<16|s[A>>>8&255]<<8|s[A&255],A^=C[B/P|0]<<24),Q[B]=Q[B-P]^A);for(var G=this._invKeySchedule=[],re=0;re<Y;re++){var B=Y-re;if(re%4)var A=Q[B];else var A=Q[B-4];re<4||B<=4?G[re]=A:G[re]=w[s[A>>>24]]^S[s[A>>>16&255]]^T[s[A>>>8&255]]^N[s[A&255]]}}},encryptBlock:function(A,I){this._doCryptBlock(A,I,this._keySchedule,u,f,x,y,s)},decryptBlock:function(A,I){var D=A[I+1];A[I+1]=A[I+3],A[I+3]=D,this._doCryptBlock(A,I,this._invKeySchedule,w,S,T,N,l);var D=A[I+1];A[I+1]=A[I+3],A[I+3]=D},_doCryptBlock:function(A,I,D,P,z,Y,Q,B){for(var G=this._nRounds,re=A[I]^D[0],L=A[I+1]^D[1],q=A[I+2]^D[2],$=A[I+3]^D[3],j=4,V=1;V<G;V++){var Z=P[re>>>24]^z[L>>>16&255]^Y[q>>>8&255]^Q[$&255]^D[j++],se=P[L>>>24]^z[q>>>16&255]^Y[$>>>8&255]^Q[re&255]^D[j++],ie=P[q>>>24]^z[$>>>16&255]^Y[re>>>8&255]^Q[L&255]^D[j++],F=P[$>>>24]^z[re>>>16&255]^Y[L>>>8&255]^Q[q&255]^D[j++];re=Z,L=se,q=ie,$=F}var Z=(B[re>>>24]<<24|B[L>>>16&255]<<16|B[q>>>8&255]<<8|B[$&255])^D[j++],se=(B[L>>>24]<<24|B[q>>>16&255]<<16|B[$>>>8&255]<<8|B[re&255])^D[j++],ie=(B[q>>>24]<<24|B[$>>>16&255]<<16|B[re>>>8&255]<<8|B[L&255])^D[j++],F=(B[$>>>24]<<24|B[re>>>16&255]<<16|B[L>>>8&255]<<8|B[q&255])^D[j++];A[I]=Z,A[I+1]=se,A[I+2]=ie,A[I+3]=F},keySize:256/32});n.AES=i._createHelper(E)}(),r.AES})}(wu)),wu.exports}var Su={exports:{}},Iu;function C0(){return Iu||(Iu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.WordArray,o=a.BlockCipher,s=n.algo,l=[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],u=[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],x=[{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}],y=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],w=s.DES=o.extend({_doReset:function(){for(var C=this._key,E=C.words,A=[],I=0;I<56;I++){var D=l[I]-1;A[I]=E[D>>>5]>>>31-D%32&1}for(var P=this._subKeys=[],z=0;z<16;z++){for(var Y=P[z]=[],Q=f[z],I=0;I<24;I++)Y[I/6|0]|=A[(u[I]-1+Q)%28]<<31-I%6,Y[4+(I/6|0)]|=A[28+(u[I+24]-1+Q)%28]<<31-I%6;Y[0]=Y[0]<<1|Y[0]>>>31;for(var I=1;I<7;I++)Y[I]=Y[I]>>>(I-1)*4+3;Y[7]=Y[7]<<5|Y[7]>>>27}for(var B=this._invSubKeys=[],I=0;I<16;I++)B[I]=P[15-I]},encryptBlock:function(C,E){this._doCryptBlock(C,E,this._subKeys)},decryptBlock:function(C,E){this._doCryptBlock(C,E,this._invSubKeys)},_doCryptBlock:function(C,E,A){this._lBlock=C[E],this._rBlock=C[E+1],S.call(this,4,252645135),S.call(this,16,65535),T.call(this,2,858993459),T.call(this,8,16711935),S.call(this,1,1431655765);for(var I=0;I<16;I++){for(var D=A[I],P=this._lBlock,z=this._rBlock,Y=0,Q=0;Q<8;Q++)Y|=x[Q][((z^D[Q])&y[Q])>>>0];this._lBlock=z,this._rBlock=P^Y}var B=this._lBlock;this._lBlock=this._rBlock,this._rBlock=B,S.call(this,1,1431655765),T.call(this,8,16711935),T.call(this,2,858993459),S.call(this,16,65535),S.call(this,4,252645135),C[E]=this._lBlock,C[E+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function S(C,E){var A=(this._lBlock>>>C^this._rBlock)&E;this._rBlock^=A,this._lBlock^=A<<C}function T(C,E){var A=(this._rBlock>>>C^this._lBlock)&E;this._lBlock^=A,this._rBlock^=A<<C}n.DES=o._createHelper(w);var N=s.TripleDES=o.extend({_doReset:function(){var C=this._key,E=C.words;if(E.length!==2&&E.length!==4&&E.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var A=E.slice(0,2),I=E.length<4?E.slice(0,2):E.slice(2,4),D=E.length<6?E.slice(0,2):E.slice(4,6);this._des1=w.createEncryptor(i.create(A)),this._des2=w.createEncryptor(i.create(I)),this._des3=w.createEncryptor(i.create(D))},encryptBlock:function(C,E){this._des1.encryptBlock(C,E),this._des2.decryptBlock(C,E),this._des3.encryptBlock(C,E)},decryptBlock:function(C,E){this._des3.decryptBlock(C,E),this._des2.encryptBlock(C,E),this._des1.decryptBlock(C,E)},keySize:192/32,ivSize:64/32,blockSize:64/32});n.TripleDES=o._createHelper(N)}(),r.TripleDES})}(Su)),Su.exports}var Cu={exports:{}},Tu;function T0(){return Tu||(Tu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.StreamCipher,o=n.algo,s=o.RC4=i.extend({_doReset:function(){for(var f=this._key,x=f.words,y=f.sigBytes,w=this._S=[],S=0;S<256;S++)w[S]=S;for(var S=0,T=0;S<256;S++){var N=S%y,C=x[N>>>2]>>>24-N%4*8&255;T=(T+w[S]+C)%256;var E=w[S];w[S]=w[T],w[T]=E}this._i=this._j=0},_doProcessBlock:function(f,x){f[x]^=l.call(this)},keySize:256/32,ivSize:0});function l(){for(var f=this._S,x=this._i,y=this._j,w=0,S=0;S<4;S++){x=(x+1)%256,y=(y+f[x])%256;var T=f[x];f[x]=f[y],f[y]=T,w|=f[(f[x]+f[y])%256]<<24-S*8}return this._i=x,this._j=y,w}n.RC4=i._createHelper(s);var u=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var f=this.cfg.drop;f>0;f--)l.call(this)}});n.RC4Drop=i._createHelper(u)}(),r.RC4})}(Cu)),Cu.exports}var ku={exports:{}},Au;function k0(){return Au||(Au=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.StreamCipher,o=n.algo,s=[],l=[],u=[],f=o.Rabbit=i.extend({_doReset:function(){for(var y=this._key.words,w=this.cfg.iv,S=0;S<4;S++)y[S]=(y[S]<<8|y[S]>>>24)&16711935|(y[S]<<24|y[S]>>>8)&4278255360;var T=this._X=[y[0],y[3]<<16|y[2]>>>16,y[1],y[0]<<16|y[3]>>>16,y[2],y[1]<<16|y[0]>>>16,y[3],y[2]<<16|y[1]>>>16],N=this._C=[y[2]<<16|y[2]>>>16,y[0]&4294901760|y[1]&65535,y[3]<<16|y[3]>>>16,y[1]&4294901760|y[2]&65535,y[0]<<16|y[0]>>>16,y[2]&4294901760|y[3]&65535,y[1]<<16|y[1]>>>16,y[3]&4294901760|y[0]&65535];this._b=0;for(var S=0;S<4;S++)x.call(this);for(var S=0;S<8;S++)N[S]^=T[S+4&7];if(w){var C=w.words,E=C[0],A=C[1],I=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,D=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,P=I>>>16|D&4294901760,z=D<<16|I&65535;N[0]^=I,N[1]^=P,N[2]^=D,N[3]^=z,N[4]^=I,N[5]^=P,N[6]^=D,N[7]^=z;for(var S=0;S<4;S++)x.call(this)}},_doProcessBlock:function(y,w){var S=this._X;x.call(this),s[0]=S[0]^S[5]>>>16^S[3]<<16,s[1]=S[2]^S[7]>>>16^S[5]<<16,s[2]=S[4]^S[1]>>>16^S[7]<<16,s[3]=S[6]^S[3]>>>16^S[1]<<16;for(var T=0;T<4;T++)s[T]=(s[T]<<8|s[T]>>>24)&16711935|(s[T]<<24|s[T]>>>8)&4278255360,y[w+T]^=s[T]},blockSize:128/32,ivSize:64/32});function x(){for(var y=this._X,w=this._C,S=0;S<8;S++)l[S]=w[S];w[0]=w[0]+1295307597+this._b|0,w[1]=w[1]+3545052371+(w[0]>>>0<l[0]>>>0?1:0)|0,w[2]=w[2]+886263092+(w[1]>>>0<l[1]>>>0?1:0)|0,w[3]=w[3]+1295307597+(w[2]>>>0<l[2]>>>0?1:0)|0,w[4]=w[4]+3545052371+(w[3]>>>0<l[3]>>>0?1:0)|0,w[5]=w[5]+886263092+(w[4]>>>0<l[4]>>>0?1:0)|0,w[6]=w[6]+1295307597+(w[5]>>>0<l[5]>>>0?1:0)|0,w[7]=w[7]+3545052371+(w[6]>>>0<l[6]>>>0?1:0)|0,this._b=w[7]>>>0<l[7]>>>0?1:0;for(var S=0;S<8;S++){var T=y[S]+w[S],N=T&65535,C=T>>>16,E=((N*N>>>17)+N*C>>>15)+C*C,A=((T&4294901760)*T|0)+((T&65535)*T|0);u[S]=E^A}y[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,y[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,y[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,y[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,y[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,y[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,y[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,y[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.Rabbit=i._createHelper(f)}(),r.Rabbit})}(ku)),ku.exports}var Du={exports:{}},Nu;function A0(){return Nu||(Nu=1,function(t,e){(function(r,n,a){t.exports=n(ze(),Gr(),Wr(),wr(),ft())})(Ae,function(r){return function(){var n=r,a=n.lib,i=a.StreamCipher,o=n.algo,s=[],l=[],u=[],f=o.RabbitLegacy=i.extend({_doReset:function(){var y=this._key.words,w=this.cfg.iv,S=this._X=[y[0],y[3]<<16|y[2]>>>16,y[1],y[0]<<16|y[3]>>>16,y[2],y[1]<<16|y[0]>>>16,y[3],y[2]<<16|y[1]>>>16],T=this._C=[y[2]<<16|y[2]>>>16,y[0]&4294901760|y[1]&65535,y[3]<<16|y[3]>>>16,y[1]&4294901760|y[2]&65535,y[0]<<16|y[0]>>>16,y[2]&4294901760|y[3]&65535,y[1]<<16|y[1]>>>16,y[3]&4294901760|y[0]&65535];this._b=0;for(var N=0;N<4;N++)x.call(this);for(var N=0;N<8;N++)T[N]^=S[N+4&7];if(w){var C=w.words,E=C[0],A=C[1],I=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,D=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,P=I>>>16|D&4294901760,z=D<<16|I&65535;T[0]^=I,T[1]^=P,T[2]^=D,T[3]^=z,T[4]^=I,T[5]^=P,T[6]^=D,T[7]^=z;for(var N=0;N<4;N++)x.call(this)}},_doProcessBlock:function(y,w){var S=this._X;x.call(this),s[0]=S[0]^S[5]>>>16^S[3]<<16,s[1]=S[2]^S[7]>>>16^S[5]<<16,s[2]=S[4]^S[1]>>>16^S[7]<<16,s[3]=S[6]^S[3]>>>16^S[1]<<16;for(var T=0;T<4;T++)s[T]=(s[T]<<8|s[T]>>>24)&16711935|(s[T]<<24|s[T]>>>8)&4278255360,y[w+T]^=s[T]},blockSize:128/32,ivSize:64/32});function x(){for(var y=this._X,w=this._C,S=0;S<8;S++)l[S]=w[S];w[0]=w[0]+1295307597+this._b|0,w[1]=w[1]+3545052371+(w[0]>>>0<l[0]>>>0?1:0)|0,w[2]=w[2]+886263092+(w[1]>>>0<l[1]>>>0?1:0)|0,w[3]=w[3]+1295307597+(w[2]>>>0<l[2]>>>0?1:0)|0,w[4]=w[4]+3545052371+(w[3]>>>0<l[3]>>>0?1:0)|0,w[5]=w[5]+886263092+(w[4]>>>0<l[4]>>>0?1:0)|0,w[6]=w[6]+1295307597+(w[5]>>>0<l[5]>>>0?1:0)|0,w[7]=w[7]+3545052371+(w[6]>>>0<l[6]>>>0?1:0)|0,this._b=w[7]>>>0<l[7]>>>0?1:0;for(var S=0;S<8;S++){var T=y[S]+w[S],N=T&65535,C=T>>>16,E=((N*N>>>17)+N*C>>>15)+C*C,A=((T&4294901760)*T|0)+((T&65535)*T|0);u[S]=E^A}y[0]=u[0]+(u[7]<<16|u[7]>>>16)+(u[6]<<16|u[6]>>>16)|0,y[1]=u[1]+(u[0]<<8|u[0]>>>24)+u[7]|0,y[2]=u[2]+(u[1]<<16|u[1]>>>16)+(u[0]<<16|u[0]>>>16)|0,y[3]=u[3]+(u[2]<<8|u[2]>>>24)+u[1]|0,y[4]=u[4]+(u[3]<<16|u[3]>>>16)+(u[2]<<16|u[2]>>>16)|0,y[5]=u[5]+(u[4]<<8|u[4]>>>24)+u[3]|0,y[6]=u[6]+(u[5]<<16|u[5]>>>16)+(u[4]<<16|u[4]>>>16)|0,y[7]=u[7]+(u[6]<<8|u[6]>>>24)+u[5]|0}n.RabbitLegacy=i._createHelper(f)}(),r.RabbitLegacy})}(Du)),Du.exports}(function(t,e){(function(r,n,a){t.exports=n(ze(),ia(),o0(),s0(),Gr(),l0(),Wr(),Ri(),Lc(),c0(),Bc(),u0(),d0(),f0(),Li(),h0(),wr(),ft(),m0(),p0(),g0(),v0(),y0(),b0(),E0(),x0(),w0(),_0(),S0(),I0(),C0(),T0(),k0(),A0())})(Ae,function(r){return r})})(t0);class D0 extends xr{async getAllServiceGroups(e,r,n){const a=this.instance.get(`/api/2.1/scheduling/companies/${n}/serviceGroups?account=${encodeURIComponent(r)}`,this.getAxiosConfig(e));if(a!==null)try{return(await a).items}catch(i){throw i}else throw new Ne(ke.INTERNAL_ERROR)}async getById(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/serviceGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.get(i,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async createServiceGroup(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/serviceGroups?account=${encodeURIComponent(r)}`;const o=this.instance.post(i,a,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async updateServiceGroup(e,r,n,a,i){let o=`/api/2.1/scheduling/companies/${n}/serviceGroups/${a}?account=${encodeURIComponent(r)}`;const s=this.instance.put(o,i,this.getAxiosConfig(e));if(s!==null)try{return await s}catch(l){throw l}else throw new Ne(ke.INTERNAL_ERROR)}async delete(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/serviceGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.delete(i,this.getAxiosConfig(e));if(o!==null)try{await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}filteredDataLog(e){return e!=null&&e.items?e==null?void 0:e.items.map(r=>({id:r.id})):e}}var N0=Object.defineProperty,O0=Object.getOwnPropertyDescriptor,Mi=(t,e,r,n)=>{for(var a=n>1?void 0:n?O0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&N0(e,r,a),a};let oa=class extends lr{constructor(t,e,r,n){super("serviceGroup",n),g(this,"serviceGroupDb"),g(this,"serviceGroupService"),this.serviceGroupDb=new sc(e),this.serviceGroupService=new D0(r,t,n)}dispose(){}async onCascadeDelete(t,e,r,n){r==_t&&await this.cascadeDelete({account:t.account,companyId:t.companyId},a=>(a==null?void 0:a.companyId)===t.companyId)}async getAllServiceGroups(t,e,r,n=Le.LOCAL_THEN_REMOTE){return this.list(t,n,{account:e,companyId:r})}async getServiceGroup(t,e,r,n,a=Le.LOCAL_THEN_REMOTE){return this.getById(t,a,{account:e,companyId:r,serviceGroupId:n})}async createServiceGroup(t,e,r,n){return super.create(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r},n)}async updateServiceGroup(t,e,r,n,a){return super.update(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r,serviceGroupId:n},a)}async deleteServiceGroup(t,e,r,n){return this.deleteById(t,{account:e,companyId:r,serviceGroupId:n})}async remoteList(t,e){return(await this.serviceGroupService.getAllServiceGroups(t,e.account,e.companyId)).map(r=>ir.fromServiceGroupDto(r,e.companyId))}async remoteGet(t,e){this.checkNullable(e);const r=await this.serviceGroupService.getById(t,e.account,e.companyId,e.serviceGroupId);return ir.fromServiceGroupDto(r,e.companyId)}async remoteCreate(t,e,r){const n=ir.toServiceGroupDto(r),a=await this.serviceGroupService.createServiceGroup(t,e.account,e.companyId,n);return ir.fromServiceGroupDto(a,e.companyId)}async remoteUpdate(t,e,r){this.checkNullable(e);const n=ir.toServiceGroupDto(r),a=await this.serviceGroupService.updateServiceGroup(t,e.account,e.companyId,e.serviceGroupId,n);return ir.fromServiceGroupDto(a,e.companyId)}async remoteDelete(t,e){this.checkNullable(e),await this.serviceGroupService.delete(t,e.account,e.companyId,e.serviceGroupId)}async localList(t){return this.serviceGroupDb.getAllServiceGroups(t.companyId)}async localGet(t){return this.checkNullable(t),this.serviceGroupDb.getById(t.companyId,t.serviceGroupId)}async localBulkSave(t,e){await this.serviceGroupDb.saveAllServiceGroups(e)}async localDelete(t){this.checkNullable(t),await this.serviceGroupDb.deleteById(t.companyId,t.serviceGroupId)}async localBulkDelete(t){await this.serviceGroupDb.deleteByServiceGroupIds(t.map(e=>e.id||""))}checkNullable(t){if(!t.serviceGroupId)throw Error("Invalid state:"+JSON.stringify(t))}};Mi([Me.Unsubscribe()],oa.prototype,"dispose",1),Mi([Me.Subscribe(Ke.DELETE)],oa.prototype,"onCascadeDelete",1),oa=Mi([Me.Subscriber({channel:_t})],oa);class R0 extends xr{async getAllStaffGroups(e,r,n){const a=this.instance.get(`/api/2.1/scheduling/companies/${n}/staffGroups?account=${encodeURIComponent(r)}`,this.getAxiosConfig(e));if(a!==null)try{return(await a).items}catch(i){throw i}else throw new Ne(ke.INTERNAL_ERROR)}async getById(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/staffGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.get(i,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async createStaffGroup(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/staffGroups?account=${encodeURIComponent(r)}`;const o=this.instance.post(i,a,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async updateStaffGroup(e,r,n,a,i){let o=`/api/2.1/scheduling/companies/${n}/staffGroups/${a}?account=${encodeURIComponent(r)}`;const s=this.instance.put(o,i,this.getAxiosConfig(e));if(s!==null)try{return await s}catch(l){throw l}else throw new Ne(ke.INTERNAL_ERROR)}async delete(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/staffGroups/${a}?account=${encodeURIComponent(r)}`;const o=this.instance.delete(i,this.getAxiosConfig(e));if(o!==null)try{await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}filteredDataLog(e){return e!=null&&e.items?e==null?void 0:e.items.map(r=>({id:r.id})):e}}class L0{constructor(e){g(this,"indexedDb"),this.indexedDb=e}async getAllStaffGroups(e){return(await this.indexedDb.getAllValue(jr)||[]).filter(r=>r.companyId===e)}async saveAllStaffGroups(e){await this.indexedDb.putBulkValue(jr,e)}async getById(e,r){const n=await this.indexedDb.getValue(jr,r);if((n==null?void 0:n.companyId)===e)return n;throw sr}async deleteById(e,r){await this.getById(e,r),await this.indexedDb.deleteValue(jr,r),await new lc(this.indexedDb).updateStaffSkills(e,r,void 0)}async deleteByStaffGroupIds(e){await this.indexedDb.deleteValues(jr,e)}async drop(){await this.indexedDb.deleteAllValues(jr)}updateStaffs(e,r,n){this.getAllStaffGroups(e).then(async a=>{const i=a.filter(o=>{var s;return(s=o.members)==null?void 0:s.find(l=>l.id===r)});i&&i.length>0&&(i.forEach(o=>{var s,l,u;const f=(s=o.members)==null?void 0:s.findIndex(x=>x.id===r);f!=null&&(n?(l=o.members)==null||l.splice(f,1,n):(u=o.members)==null||u.splice(f,1))}),await this.saveAllStaffGroups(i))})}}var M0=Object.defineProperty,P0=Object.getOwnPropertyDescriptor,Pi=(t,e,r,n)=>{for(var a=n>1?void 0:n?P0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&M0(e,r,a),a};let sa=class extends lr{constructor(t,e,r,n){super("staffGroup",n),g(this,"staffGroupDb"),g(this,"staffGroupService"),this.staffGroupDb=new L0(e),this.staffGroupService=new R0(r,t,n)}dispose(){}async onCascadeDelete(t,e,r,n){r==_t&&await this.cascadeDelete({account:t.account,companyId:t.companyId},a=>(a==null?void 0:a.companyId)===t.companyId)}async getAllStaffGroups(t,e,r,n=Le.LOCAL_THEN_REMOTE){return this.list(t,n,{account:e,companyId:r})}async getStaffGroup(t,e,r,n,a=Le.LOCAL_THEN_REMOTE){return this.getById(t,a,{account:e,companyId:r,staffGroupId:n})}async createStaffGroup(t,e,r,n){return this.create(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r},n)}async updateStaffGroup(t,e,r,n,a){return this.update(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r,staffGroupId:n},a)}async deleteStaffGroup(t,e,r,n){return this.deleteById(t,{account:e,companyId:r,staffGroupId:n})}async remoteList(t,e){return(await this.staffGroupService.getAllStaffGroups(t,e.account,e.companyId)).map(r=>or.fromStaffGroupDto(r,e.companyId))}async remoteGet(t,e){this.checkNullable(e);const r=await this.staffGroupService.getById(t,e.account,e.companyId,e.staffGroupId);return or.fromStaffGroupDto(r,e.companyId)}async remoteCreate(t,e,r){const n=or.toStaffGroupDto(r),a=await this.staffGroupService.createStaffGroup(t,e.account,e.companyId,n);return or.fromStaffGroupDto(a,e.companyId)}async remoteUpdate(t,e,r){this.checkNullable(e);const n=or.toStaffGroupDto(r),a=await this.staffGroupService.updateStaffGroup(t,e.account,e.companyId,e.staffGroupId,n);return or.fromStaffGroupDto(a,e.companyId)}async remoteDelete(t,e){this.checkNullable(e),await this.staffGroupService.delete(t,e.account,e.companyId,e.staffGroupId)}async localList(t){return this.staffGroupDb.getAllStaffGroups(t.companyId)}async localGet(t){return this.checkNullable(t),this.staffGroupDb.getById(t.companyId,t.staffGroupId)}async localBulkSave(t,e){await this.staffGroupDb.saveAllStaffGroups(e)}async localDelete(t){this.checkNullable(t),await this.staffGroupDb.deleteById(t.companyId,t.staffGroupId)}async localBulkDelete(t){await this.staffGroupDb.deleteByStaffGroupIds(t.map(e=>e.id||""))}checkNullable(t){if(!t.staffGroupId)throw Error("Invalid state:"+JSON.stringify(t))}};Pi([Me.Unsubscribe()],sa.prototype,"dispose",1),Pi([Me.Subscribe(Ke.DELETE)],sa.prototype,"onCascadeDelete",1),sa=Pi([Me.Subscriber({channel:_t})],sa);class F0 extends xr{async getAllServiceResources(e,r,n){const a=this.instance.get(`/api/2.1/scheduling/companies/${n}/service-resources?account=${r}`,this.getAxiosConfig(e));if(a!==null)try{return(await a).items}catch(i){throw i}else throw new Ne(ke.INTERNAL_ERROR)}async getById(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/service-resources/${a}?account=${r}`;const o=this.instance.get(i,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async createService(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/service-resources?account=${r}`;const o=this.instance.post(i,a,this.getAxiosConfig(e));if(o!==null)try{return await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}async updateService(e,r,n,a,i){let o=`/api/2.1/scheduling/companies/${n}/service-resources/${a}?account=${r}`;const s=this.instance.put(o,i,this.getAxiosConfig(e));if(s!==null)try{return await s}catch(l){throw l}else throw new Ne(ke.INTERNAL_ERROR)}async delete(e,r,n,a){let i=`/api/2.1/scheduling/companies/${n}/service-resources/${a}?account=${r}`;const o=this.instance.delete(i,this.getAxiosConfig(e));if(o!==null)try{await o}catch(s){throw s}else throw new Ne(ke.INTERNAL_ERROR)}filteredDataLog(e){return e!=null&&e.items?e==null?void 0:e.items.map(r=>({id:r.id})):e}}class z0{constructor(e){g(this,"indexedDb"),this.indexedDb=e}async getAllServiceResources(e){return(await this.indexedDb.getAllValue(Ur)||[]).filter(r=>{var n;return((n=r.company)==null?void 0:n.id)===e})}async saveAllServiceResources(e){await this.indexedDb.putBulkValue(Ur,e)}async getById(e,r){var n;const a=await this.indexedDb.getValue(Ur,r);if(((n=a==null?void 0:a.company)==null?void 0:n.id)===e)return a;throw sr}async deleteById(e,r){await this.getById(e,r),await this.indexedDb.deleteValue(Ur,r)}async deleteByServiceIds(e){await this.indexedDb.deleteValues(Ur,e)}async drop(){await this.indexedDb.deleteAllValues(Ur)}}var B0=Object.defineProperty,U0=Object.getOwnPropertyDescriptor,Fi=(t,e,r,n)=>{for(var a=n>1?void 0:n?U0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&B0(e,r,a),a};const zi=new Me.Channel;let la=class extends lr{constructor(t,e,r,n){super("serviceResource",n),g(this,"serviceResourceDb"),g(this,"serviceResourceService"),this.serviceResourceDb=new z0(e),this.serviceResourceService=new F0(r,t,n)}dispose(){}async onCascadeDelete(t,e,r,n){r==_t&&await this.cascadeDelete({account:t.account,companyId:t.companyId},a=>{var i;return((i=a==null?void 0:a.company)==null?void 0:i.id)===t.companyId})}async getAllServiceResources(t,e,r,n=Le.LOCAL_THEN_REMOTE){return this.list(t,n,{account:e,companyId:r})}async getServiceResource(t,e,r,n,a=Le.LOCAL_THEN_REMOTE){return this.getById(t,a,{account:e,companyId:r,serviceResourceId:n})}async createServiceResource(t,e,r,n){const a=await super.create(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r},n);return zi.publish(Ke.CREATE,{account:e,companyId:r,resource:a}),a}async updateServiceResource(t,e,r,n,a){const i=await super.update(t,Le.REMOTE_THEN_LOCAL,{account:e,companyId:r,serviceResourceId:n},a);return zi.publish(Ke.UPDATE,{account:e,companyId:r,serviceResourceId:n,resource:i}),i}async deleteServiceResource(t,e,r,n){await this.deleteById(t,{account:e,companyId:r,serviceResourceId:n}),zi.publish(Ke.DELETE,{account:e,companyId:r,serviceResourceId:n})}async remoteList(t,e){return(await this.serviceResourceService.getAllServiceResources(t,e.account,e.companyId)).map(r=>cr.fromServiceResourceDto(r,e.companyId))}async remoteGet(t,e){this.checkNullable(e);const r=await this.serviceResourceService.getById(t,e.account,e.companyId,e.serviceResourceId);return cr.fromServiceResourceDto(r,e.companyId)}async remoteCreate(t,e,r){const n=cr.toServiceResourceDto(r),a=await this.serviceResourceService.createService(t,e.account,e.companyId,n);return cr.fromServiceResourceDto(a,e.companyId)}async remoteUpdate(t,e,r){this.checkNullable(e);const n=cr.toServiceResourceDto(r),a=await this.serviceResourceService.updateService(t,e.account,e.companyId,e.serviceResourceId,n);return cr.fromServiceResourceDto(a,e.companyId)}async remoteDelete(t,e){this.checkNullable(e),await this.serviceResourceService.delete(t,e.account,e.companyId,e.serviceResourceId)}async localList(t){return this.serviceResourceDb.getAllServiceResources(t.companyId)}async localGet(t){return this.checkNullable(t),this.serviceResourceDb.getById(t.companyId,t.serviceResourceId)}async localBulkSave(t,e){await this.serviceResourceDb.saveAllServiceResources(e)}async localDelete(t){this.checkNullable(t),await this.serviceResourceDb.deleteById(t.companyId,t.serviceResourceId)}async localBulkDelete(t){await this.serviceResourceDb.deleteByServiceIds(t.map(e=>e.id||""))}checkNullable(t){if(!t.serviceResourceId)throw Error("Invalid state:"+JSON.stringify(t))}};Fi([Me.Unsubscribe()],la.prototype,"dispose",1),Fi([Me.Subscribe(Ke.DELETE)],la.prototype,"onCascadeDelete",1),la=Fi([Me.Subscriber({channel:_t})],la);var V0=Object.defineProperty,j0=Object.getOwnPropertyDescriptor,Bi=(t,e,r,n)=>{for(var a=n>1?void 0:n?j0(e,r):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(a=(n?o(e,r,a):o(a))||a);return n&&a&&V0(e,r,a),a};let ca=class{constructor(t){g(this,"logger"),this.logger=t}dispose(){}getItem(t){return localStorage.getItem(t)}setItem(t,e){localStorage.setItem(t,e)}clear(){localStorage.clear()}removeItem(t){localStorage.removeItem(t)}getItems(t){const e=localStorage.getItem(t);return e&&JSON.parse(e)}setItems(t,e){localStorage.setItem(t,JSON.stringify(e))}async _onCascadeDelete(t,e,r,n){var a,i,o,s,l;switch(r){case _t:(a=this.logger)==null||a.debug("js-calendar-api","Company deleted (clean localStorage)",t),this._cleanRecentsCompanies(t.companyId);break;case yn:(i=this.logger)==null||i.debug("js-calendar-api","Service deleted (clean localStorage)",t),this._cleanRecentsServices(t.serviceId);break;case vn:(o=this.logger)==null||o.debug("js-calendar-api","Staff deleted (clean localStorage)",t),this._cleanRecentsStaffs(t.staffId);break;case mc:(s=this.logger)==null||s.debug("js-calendar-api","Contact deleted (clean localStorage)",t),this._cleanRecentsContacts(t.contactId);break;case pc:(l=this.logger)==null||l.debug("js-calendar-api","User deleted (clean localStorage)",t),this._cleanRecentsUsers(t.userId);break}}_cleanRecentsCompanies(t){const e=this.getItems(Bt.RECENT_COMPANIES),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_COMPANIES,r||[])}_cleanRecentsServices(t){const e=this.getItems(Bt.RECENT_SERVICES),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_SERVICES,r||[])}_cleanRecentsStaffs(t){const e=this.getItems(Bt.RECENT_STAFFS),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_STAFFS,r||[])}_cleanRecentsContacts(t){const e=this.getItems(Bt.RECENT_CONTACTS),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_CONTACTS,r||[])}_cleanRecentsUsers(t){const e=this.getItems(Bt.RECENT_USERS),r=e==null?void 0:e.filter(n=>n.id!==t);this.setItems(Bt.RECENT_USERS,r||[])}};Bi([Me.Unsubscribe()],ca.prototype,"dispose",1),Bi([Me.Subscribe(Ke.DELETE)],ca.prototype,"_onCascadeDelete",1),ca=Bi([Me.Subscriber({channel:_t}),Me.Subscriber({channel:yn}),Me.Subscriber({channel:vn}),Me.Subscriber({channel:mc}),Me.Subscriber({channel:pc})],ca);var Bt=(t=>(t.RECENT_SERVICES="recent_services",t.RECENT_STAFFS="recent_staffs",t.RECENT_CONTACTS="recent_contacts",t.RECENT_COMPANIES="recent_companies",t.RECENT_USERS="recent_users",t))(Bt||{});let ua;const q0=t=>(ua=t,Jt.createPinia()),H0=Jt.defineStore({id:"account",state:()=>({account:{}}),actions:{async updateAccount(t){if(!!t)return ua.updateAccount(t).then(e=>{const r=e;r.picture&&(r.picture=new Fr(r.picture.mimeType,r.picture.url.length>0?r.picture.url+"?"+Math.random().toString(32):r.picture.url)),this.account=r})},fetchAccount(t,e){return ua.getAccount().then(r=>{r.result?(this.account=r.result,t&&t(r.result)):e&&e()}).catch(()=>{e&&e()})},async updatePassword(t,e){return ua.updatePassword(t,e)}}});class G0{constructor(e){Ui(this,"internalState");Ui(this,"listeners",[]);this.internalState=e}get state(){return this.internalState}changeState(e){this.internalState=e,this.listeners.length>0&&this.listeners.forEach(r=>r(this.state))}subscribe(e){this.listeners.push(e)}unsubscribe(e){const r=this.listeners.indexOf(e);r>-1&&this.listeners.splice(r,1)}}const W0=[{label:"English",value:"en"},{label:"Fran\xE7ais",value:"fr"},{label:"Espa\xF1ol",value:"es"},{label:"Portugu\xEAs",value:"pt"},{label:"Deutsch",value:"de"},{label:"Nederlands",value:"nl"},{label:"Italiano",value:"it"},{label:"\u65E5\u672C\u8A9E",value:"ja"}];He.Bloc=G0,He.QRCode=Zf,He.createStore=q0,He.dateToString=Ru,He.languages=W0,He.onPictureUpdated=Lu,He.pad=zu,He.parseToInt=Fu,He.readBlobFromUrl=Pu,He.useAccountStore=H0,He.useBlocState=Ou,Object.defineProperties(He,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|