>>0?1:0),w=c.low=w+P,c.high=_+F+(w>>>0>>0?1:0),T=d.low=T+z,d.high=A+U+(T>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function e(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(s),e.HmacSHA512=t._createHmacHelper(s)}(),F=(H=ve).x64,P=F.Word,U=F.WordArray,z=H.algo,K=z.SHA512,V=z.SHA384=K.extend({_doReset:function(){this._hash=new U.init([new P.init(3418070365,3238371032),new P.init(1654270250,914150663),new P.init(2438529370,812702999),new P.init(355462360,4144912697),new P.init(1731405415,4290775857),new P.init(2394180231,1750603025),new P.init(3675008525,1694076839),new P.init(1203062813,3204075428)])},_doFinalize:function(){var e=K._doFinalize.call(this);return e.sigBytes-=16,e}}),H.SHA384=K._createHelper(V),H.HmacSHA384=K._createHmacHelper(V),ve.lib.Cipher||(G=(W=ve).lib,Y=G.Base,j=G.WordArray,q=G.BufferedBlockAlgorithm,(Z=W.enc).Utf8,X=Z.Base64,Q=W.algo.EvpKDF,J=G.Cipher=q.extend({cfg:Y.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){q.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(e){return"string"==typeof e?le:ie}return function(r){return{encrypt:function(e,t,n){return a(t).encrypt(r,e,t,n)},decrypt:function(e,t,n){return a(t).decrypt(r,e,t,n)}}}}()}),G.StreamCipher=J.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),ee=W.mode={},te=G.BlockCipherMode=Y.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),ne=ee.CBC=function(){var e=te.extend();function o(e,t,n){var r,a=this._iv;a?(r=a,this._iv=void 0):r=this._prevBlock;for(var o=0;o>>2];e.sigBytes-=t}},G.BlockCipher=J.extend({cfg:J.cfg.extend({mode:ne,padding:re}),reset:function(){var e;J.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),ae=G.CipherParams=Y.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),oe=(W.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?j.create([1398893684,1701076831]).concat(n).concat(t):t).toString(X)},parse:function(e){var t,n=X.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=j.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),ae.create({ciphertext:n,salt:t})}},ie=G.SerializableCipher=Y.extend({cfg:Y.extend({format:oe}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var a=e.createEncryptor(n,r),o=a.finalize(t),i=a.cfg;return ae.create({ciphertext:o,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),se=(W.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=j.random(8));var a=Q.create({keySize:t+n}).compute(e,r),o=j.create(a.words.slice(t),4*n);return a.sigBytes=4*t,ae.create({key:a,iv:o,salt:r})}},le=G.PasswordBasedCipher=ie.extend({cfg:ie.cfg.extend({kdf:se}),encrypt:function(e,t,n,r){var a=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=a.iv;var o=ie.encrypt.call(this,e,t,a.key,r);return o.mixIn(a),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var a=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=a.iv,ie.decrypt.call(this,e,t,a.key,r)}})),ve.mode.CFB=function(){var e=ve.lib.BlockCipherMode.extend();function o(e,t,n,r){var a,o=this._iv;o?(a=o.slice(0),this._iv=undefined):a=this._prevBlock,r.encryptBlock(a,0);for(var i=0;i>>2]|=a<<24-o%4*8,e.sigBytes+=a},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},ve.pad.Iso10126={pad:function(e,t){var n=4*t,r=n-e.sigBytes%n;e.concat(ve.lib.WordArray.random(r-1)).concat(ve.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},ve.pad.Iso97971={pad:function(e,t){e.concat(ve.lib.WordArray.create([2147483648],1)),ve.pad.ZeroPadding.pad(e,t)},unpad:function(e){ve.pad.ZeroPadding.unpad(e),e.sigBytes--}},ve.mode.OFB=(de=ve.lib.BlockCipherMode.extend(),fe=de.Encryptor=de.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,a=this._iv,o=this._keystream;a&&(o=this._keystream=a.slice(0),this._iv=undefined),n.encryptBlock(o,0);for(var i=0;i>>8^255&a^99,c[n]=a;var o=e[d[a]=n],i=e[o],s=e[i],l=257*e[a]^16843008*a;f[n]=l<<24|l>>>8,p[n]=l<<16|l>>>16,u[n]=l<<8|l>>>24,h[n]=l;l=16843009*s^65537*i^257*o^16843008*n;g[a]=l<<24|l>>>8,m[a]=l<<16|l>>>16,v[a]=l<<8|l>>>24,b[a]=l,n?(n=o^e[e[e[s^o]]],r^=e[e[r]]):n=r=1}}();var C=[0,1,2,4,8,16,32,64,128,27,54],r=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],o=0;o>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l]):(l=c[(l=l<<8|l>>>24)>>>24]<<24|c[l>>>16&255]<<16|c[l>>>8&255]<<8|c[255&l],l^=C[o/n|0]<<24),a[o]=a[o-n]^l);for(var i=this._invKeySchedule=[],s=0;s>>24]]^m[c[l>>>16&255]]^v[c[l>>>8&255]]^b[c[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,f,p,u,h,c)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,g,m,v,b,d);n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,a,o,i,s){for(var l=this._nRounds,c=e[t]^n[0],d=e[t+1]^n[1],f=e[t+2]^n[2],p=e[t+3]^n[3],u=4,h=1;h>>24]^a[d>>>16&255]^o[f>>>8&255]^i[255&p]^n[u++],m=r[d>>>24]^a[f>>>16&255]^o[p>>>8&255]^i[255&c]^n[u++],v=r[f>>>24]^a[p>>>16&255]^o[c>>>8&255]^i[255&d]^n[u++],b=r[p>>>24]^a[c>>>16&255]^o[d>>>8&255]^i[255&f]^n[u++];c=g,d=m,f=v,p=b}g=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^n[u++],m=(s[d>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^n[u++],v=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[u++],b=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&f])^n[u++];e[t]=g,e[t+1]=m,e[t+2]=v,e[t+3]=b},keySize:8});e.AES=t._createHelper(r)}(),function(){var e=ve,t=e.lib,a=t.WordArray,n=t.BlockCipher,r=e.algo,c=[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],p=[{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}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],o=r.DES=n.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=c[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var a=this._subKeys=[],o=0;o<16;o++){var i=a[o]=[],s=f[o];for(n=0;n<24;n++)i[n/6|0]|=t[(d[n]-1+s)%28]<<31-n%6,i[4+(n/6|0)]|=t[28+(d[n+24]-1+s)%28]<<31-n%6;i[0]=i[0]<<1|i[0]>>>31;for(n=1;n<7;n++)i[n]=i[n]>>>4*(n-1)+3;i[7]=i[7]<<5|i[7]>>>27}var l=this._invSubKeys=[];for(n=0;n<16;n++)l[n]=a[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var a=n[r],o=this._lBlock,i=this._rBlock,s=0,l=0;l<8;l++)s|=p[l][((i^a[l])&u[l])>>>0];this._lBlock=i,this._rBlock=o^s}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,h.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=o.createEncryptor(a.create(t)),this._des2=o.createEncryptor(a.create(n)),this._des3=o.createEncryptor(a.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=n._createHelper(i)}(),function(){var e=ve,t=e.lib.StreamCipher,n=e.algo,r=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],a=0;a<256;a++)r[a]=a;a=0;for(var o=0;a<256;a++){var i=a%n,s=t[i>>>2]>>>24-i%4*8&255;o=(o+r[a]+s)%256;var l=r[a];r[a]=r[o],r[o]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,a=0;a<4;a++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*a}return this._i=t,this._j=n,r}e.RC4=t._createHelper(r);var o=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;0>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=undefined),function l(e){return 0===(e[0]=c(e[0]))&&(e[1]=c(e[1])),e}(o);var i=o.slice(0);n.encryptBlock(i,0);for(var s=0;s>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(n=this._b=0;n<4;n++)p.call(this);for(n=0;n<8;n++)a[n]^=r[n+4&7];if(t){var o=t.words,i=o[0],s=o[1],l=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;a[0]^=l,a[1]^=d,a[2]^=c,a[3]^=f,a[4]^=l,a[5]^=d,a[6]^=c,a[7]^=f;for(n=0;n<4;n++)p.call(this)}},_doProcessBlock:function(e,t){var n=this._X;p.call(this),a[0]=n[0]^n[5]>>>16^n[3]<<16,a[1]=n[2]^n[7]>>>16^n[5]<<16,a[2]=n[4]^n[1]>>>16^n[7]<<16,a[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)a[r]=16711935&(a[r]<<8|a[r]>>>24)|4278255360&(a[r]<<24|a[r]>>>8),e[t+r]^=a[r]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,n=0;n<8;n++)l[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0;for(n=0;n<8;n++){var r=e[n]+t[n],a=65535&r,o=r>>>16,i=((a*a>>>17)+a*o>>>15)+o*o,s=((4294901760&r)*r|0)+((65535&r)*r|0);c[n]=i^s}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.Rabbit=t._createHelper(r)}(),ve.mode.CTR=(ge=ve.lib.BlockCipherMode.extend(),me=ge.Encryptor=ge.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=undefined);var i=o.slice(0);n.encryptBlock(i,0),o[r-1]=o[r-1]+1|0;for(var s=0;s>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],a=this._b=0;a<4;a++)p.call(this);for(a=0;a<8;a++)r[a]^=n[a+4&7];if(t){var o=t.words,i=o[0],s=o[1],l=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),c=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=l>>>16|4294901760&c,f=c<<16|65535&l;r[0]^=l,r[1]^=d,r[2]^=c,r[3]^=f,r[4]^=l,r[5]^=d,r[6]^=c,r[7]^=f;for(a=0;a<4;a++)p.call(this)}},_doProcessBlock:function(e,t){var n=this._X;p.call(this),a[0]=n[0]^n[5]>>>16^n[3]<<16,a[1]=n[2]^n[7]>>>16^n[5]<<16,a[2]=n[4]^n[1]>>>16^n[7]<<16,a[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)a[r]=16711935&(a[r]<<8|a[r]>>>24)|4278255360&(a[r]<<24|a[r]>>>8),e[t+r]^=a[r]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,n=0;n<8;n++)l[n]=t[n];t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0;for(n=0;n<8;n++){var r=e[n]+t[n],a=65535&r,o=r>>>16,i=((a*a>>>17)+a*o>>>15)+o*o,s=((4294901760&r)*r|0)+((65535&r)*r|0);c[n]=i^s}e[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,e[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,e[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,e[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,e[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,e[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,e[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,e[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}e.RabbitLegacy=t._createHelper(r)}(),ve.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;0<=n;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},{init:function be(){},cryptoJS:ve}},Object.assign(kt.DEFAULTS,{fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","Times New Roman,Times,serif,-webkit-standard":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},fontFamilySelection:!1,fontFamilyDefaultSelection:"Font Family"}),kt.PLUGINS.fontFamily=function(a){var o=a.$;function i(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return o(this).grep(t,function(e){return 0 span").text(a.opts.fontFamily[n()]||t[0]||a.language.translate(a.opts.fontFamilyDefaultSelection))}}}},kt.RegisterCommand("fontFamily",{type:"dropdown",displaySelection:function(e){return e.opts.fontFamilySelection},defaultSelection:function(e){return e.opts.fontFamilyDefaultSelection},displaySelectionWidth:120,html:function(){var e='',t=this.opts.fontFamily;for(var n in t)t.hasOwnProperty(n)&&(e+='- ').concat(t[n],"
"));return e+="
"},title:"Font Family",callback:function(e,t){this.fontFamily.apply(t)},refresh:function(e){this.fontFamily.refresh(e)},refreshOnShow:function(e,t){this.fontFamily.refreshOnShow(e,t)},plugin:"fontFamily"}),kt.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"}),Object.assign(kt.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),kt.PLUGINS.fontSize=function(r){var a=r.$;return{apply:function t(e){r.format.applyStyle("font-size",e)},refreshOnShow:function o(e,t){var n=a(r.selection.element()).css("font-size");"pt"===r.opts.fontSizeUnit&&(n="".concat(Math.round(72*parseFloat(n,10)/96),"pt")),t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'.concat(n,'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function n(e){if(r.opts.fontSizeSelection){var t=r.helpers.getPX(a(r.selection.element()).css("font-size"));"pt"===r.opts.fontSizeUnit&&(t="".concat(Math.round(72*parseFloat(t,10)/96),"pt")),e.find("> span").text(t)}}}},kt.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(e){return e.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(e){return e.opts.fontSizeDefaultSelection},html:function(){for(var e='"},callback:function(e,t){this.fontSize.apply(t)},refresh:function(e){this.fontSize.refresh(e)},refreshOnShow:function(e,t){this.fontSize.refreshOnShow(e,t)},plugin:"fontSize"}),kt.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"}),Object.assign(kt.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(kt.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),kt.PLUGINS.forms=function(i){var s,l=i.$;function t(e){i.selection.clear(),l(this).data("mousedown",!0)}function n(e){l(this).data("mousedown")&&(e.stopPropagation(),l(this).removeData("mousedown"),d(s=this)),e.preventDefault()}function r(){i.$el.find("input, textarea, button").removeData("mousedown")}function a(){l(this).removeData("mousedown")}function c(){return s||null}function d(e){if(-1==["checkbox","radio"].indexOf(e.type)){var t=i.popups.get("forms.edit");t||(t=function o(){var e="";0'.concat(i.button.buildList(i.opts.formEditButtons),""));var t={buttons:e},n=i.popups.create("forms.edit",t);return i.$wp&&i.events.$on(i.$wp,"scroll.link-edit",function(){c()&&i.popups.isVisible("forms.edit")&&d(c())}),n}());var n=l(s=e);i.popups.refresh("forms.edit"),i.popups.setContainer("forms.edit",i.$sc);var r=n.offset().left+n.outerWidth()/2,a=n.offset().top+n.outerHeight();i.popups.show("forms.edit",r,a,n.outerHeight())}}function o(){var e=i.popups.get("forms.update"),t=c();if(t){var n=l(t);n.is("button")?e.find('input[type="text"][name="text"]').val(n.text()):n.is("input[type=button]")||n.is("input[type=submit]")||n.is("input[type=reset]")?e.find('input[type="text"][name="text"]').val(n.val()):e.find('input[type="text"][name="text"]').val(n.attr("placeholder"))}e.find('input[type="text"][name="text"]').trigger("change")}function f(){s=null}function p(e){if(e)return i.popups.onRefresh("forms.update",o),i.popups.onHide("forms.update",f),!0;var t="";1<=i.opts.formUpdateButtons.length&&(t=''.concat(i.button.buildList(i.opts.formUpdateButtons),"
"));var n=0,r={buttons:t,text_layer:' \n
\n
")};return i.popups.create("forms.update",r)}return{_init:function u(){!function e(){i.events.$on(i.$el,i._mousedown,"input, textarea, button",t),i.events.$on(i.$el,i._mouseup,"input, textarea, button",n),i.events.$on(i.$el,"touchmove","input, textarea, button",a),i.events.$on(i.$el,i._mouseup,r),i.events.$on(i.$win,i._mouseup,r),p(!0)}(),i.events.$on(i.$el,"submit","form",function(e){return e.preventDefault(),!1})},updateInput:function h(){var e=i.popups.get("forms.update"),t=c();if(t){var n=l(t),r=e.find('input[type="text"][name="text"]').val()||"";n.is("button")?r.length?n.text(r):n.text("\u200b"):-1!=["button","submit","reset"].indexOf(t.type)?n.attr("value",r):n.attr("placeholder",r),i.popups.hide("forms.update"),d(t)}},getInput:c,applyStyle:function g(e,t,n){void 0===t&&(t=i.opts.formStyles),void 0===n&&(n=i.opts.formMultipleStyles);var r=c();if(!r)return!1;if(!n){var a=Object.keys(t);a.splice(a.indexOf(e),1),l(r).removeClass(a.join(" "))}l(r).toggleClass(e)},showUpdatePopup:function m(){var e=c();if(e){var t=l(e),n=i.popups.get("forms.update");n||(n=p()),i.popups.isVisible("forms.update")||i.popups.refresh("forms.update"),i.popups.setContainer("forms.update",i.$sc);var r=t.offset().left+t.outerWidth()/2,a=t.offset().top+t.outerHeight();i.popups.show("forms.update",r,a,t.outerHeight())}},showEditPopup:d,back:function v(){i.events.disableBlur(),i.selection.restore(),i.events.enableBlur();var e=c();e&&i.$wp&&("BUTTON"===e.tagName&&i.selection.restore(),d(e))}}},kt.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),kt.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),kt.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var e='"},callback:function(e,t){var n=this.forms.getInput();n&&(this.forms.applyStyle(t),this.forms.showEditPopup(n))},refreshOnShow:function(e,t){var n=this.$,r=this.forms.getInput();if(r){var a=n(r);t.find(".fr-command").each(function(){var e=n(this).data("param1");n(this).toggleClass("fr-active",a.hasClass(e))})}}}),kt.DefineIcon("inputEdit",{NAME:"edit",SVG_KEY:"edit"}),kt.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),kt.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),kt.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),kt.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),kt.PLUGINS.fullscreen=function(a){var t,n,r,o,i=a.$,s=function s(){return a.$box.hasClass("fr-fullscreen")};function l(){if(a.helpers.isIOS()&&a.core.hasFocus())return a.$el.blur(),setTimeout(d,250),!1;t=a.helpers.scrollTop(),a.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),a.helpers.isMobile()&&(a.opts.toolbarBottom?a.$tb[0].removeAttribute("style"):(a.$tb.data("parent",a.$tb.parent()),a.$box.prepend(a.$tb),a.$tb.data("sticky-dummy")&&a.$tb.after(a.$tb.data("sticky-dummy")))),n=a.opts.height,r=a.opts.heightMax,o=a.opts.zIndex,a.opts.height=a.o_win.innerHeight-(a.opts.toolbarInline?0:a.$tb.outerHeight()+(a.$second_tb?a.$second_tb.outerHeight():0)),a.opts.zIndex=2147483641,a.opts.heightMax=null,a.size.refresh(),a.opts.toolbarInline&&a.toolbar.showInline();for(var e=a.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();a.opts.toolbarContainer&&a.$box.prepend(a.$tb),a.events.trigger("charCounter.update"),a.events.trigger("codeView.update"),a.$win.trigger("scroll")}function c(){if(a.helpers.isIOS()&&a.core.hasFocus())return a.$el.blur(),setTimeout(d,250),!1;a.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),a.$tb.data("parent")&&a.$tb.data("parent").prepend(a.$tb),a.$tb.data("sticky-dummy")&&a.$tb.after(a.$tb.data("sticky-dummy")),a.opts.height=n,a.opts.heightMax=r,a.opts.zIndex=o,a.size.refresh(),i(a.o_win).scrollTop(t),a.opts.toolbarInline&&a.toolbar.showInline(),a.events.trigger("charCounter.update"),a.opts.toolbarSticky&&a.opts.toolbarStickyOffset&&(a.opts.toolbarBottom?a.$tb.css("bottom",a.opts.toolbarStickyOffset).data("bottom",a.opts.toolbarStickyOffset):a.$tb.css("top",a.opts.toolbarStickyOffset).data("top",a.opts.toolbarStickyOffset));for(var e=a.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();a.opts.toolbarContainer&&i(a.opts.toolbarContainer).append(a.$tb),i(a.o_win).trigger("scroll"),a.events.trigger("codeView.update")}function d(){s()?c():l(),f(a.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=a.$tb.find('.fr-command[data-cmd="moreText"]'),t=a.$tb.find('.fr-command[data-cmd="moreParagraph"]'),n=a.$tb.find('.fr-command[data-cmd="moreRich"]'),r=a.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&a.refresh.moreText(e),t.length&&a.refresh.moreParagraph(t),n.length&&a.refresh.moreRich(n),r.length&&a.refresh.moreMisc(r)}function f(e){var t=s();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?a.icon.create("fullscreenCompress"):a.icon.create("fullscreen"))}return{_init:function e(){if(!a.$wp)return!1;a.events.$on(i(a.o_win),"resize",function(){s()&&(c(),l())}),a.events.on("toolbar.hide",function(){if(s()&&a.helpers.isMobile())return!1}),a.events.on("position.refresh",function(){if(a.helpers.isIOS())return!s()}),a.events.on("destroy",function(){s()&&c()},!0)},toggle:d,refresh:f,isActive:s}},kt.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),kt.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),kt.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"}),Object.assign(kt.DEFAULTS,{helpSets:[{title:"Inline Editor",commands:[{val:"OSkeyE",desc:"Show the editor"}]},{title:"Common actions",commands:[{val:"OSkeyC",desc:"Copy"},{val:"OSkeyX",desc:"Cut"},{val:"OSkeyV",desc:"Paste"},{val:"OSkeyZ",desc:"Undo"},{val:"OSkeyShift+Z",desc:"Redo"},{val:"OSkeyK",desc:"Insert Link"},{val:"OSkeyP",desc:"Insert Image"}]},{title:"Basic Formatting",commands:[{val:"OSkeyA",desc:"Select All"},{val:"OSkeyB",desc:"Bold"},{val:"OSkeyI",desc:"Italic"},{val:"OSkeyU",desc:"Underline"},{val:"OSkeyS",desc:"Strikethrough"},{val:"OSkey]",desc:"Increase Indent"},{val:"OSkey[",desc:"Decrease Indent"}]},{title:"Quote",commands:[{val:"OSkey'",desc:"Increase quote level"},{val:"OSkeyShift+'",desc:"Decrease quote level"}]},{title:"Image / Video",commands:[{val:"OSkey+",desc:"Resize larger"},{val:"OSkey-",desc:"Resize smaller"}]},{title:"Table",commands:[{val:"Alt+Space",desc:"Select table cell"},{val:"Shift+Left/Right arrow",desc:"Extend selection one cell"},{val:"Shift+Up/Down arrow",desc:"Extend selection one row"}]},{title:"Navigation",commands:[{val:"OSkey/",desc:"Shortcuts"},{val:"Alt+F10",desc:"Focus popup / toolbar"},{val:"Esc",desc:"Return focus to previous position"}]}]}),kt.PLUGINS.help=function(s){var r,a=s.$,o="help";return{_init:function e(){},show:function l(){if(!r){var e="".concat(s.language.translate("Shortcuts"),"
"),t=function i(){for(var e='',t=0;t";r+="".concat(s.language.translate(n.title)," |
"),r+="";for(var a=0;a",r+="".concat(s.language.translate(o.desc)," | "),r+="".concat(o.val.replace("OSkey",s.helpers.isMac()?"⌘":"Ctrl+")," | "),r+=""}e+=r+=""}return e+="
"}(),n=s.modals.create(o,e,t);r=n.$modal,s.events.$on(a(s.o_win),"resize",function(){s.modals.resize(o)})}s.modals.show(o),s.modals.resize(o)},hide:function t(){s.modals.hide(o)}}},kt.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),kt.RegisterShortcut(kt.KEYCODE.SLASH,"help",null,"/"),kt.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1}),Object.assign(kt.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(kt.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),kt.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,kt.PLUGINS.image=function(y){var L,c,d,f,s,n,_=y.$,w="https://i.froala.com/upload",t=!1,r=1,p=2,u=3,h=4,A=5,T=6,a={};function g(){var e=y.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),L&&e.val(L.attr("src")),e.trigger("change")}function i(e){return window.pageYOffset+e.get(0).getBoundingClientRect().top}function o(){var e=y.popups.get("image.edit");if(e||(e=N()),e){var t=L;y.popups.setContainer("image.edit",y.$sc),y.popups.refresh("image.edit");var n=t.offset().left+t.outerWidth()/2,r=t&&i(t),a=y.$wp&&i(y.$wp);a||(a=r);var o=0;y.opts.iframe?((o=y.$wp.scrollTop()+e.outerHeight())t.get(0).getBoundingClientRect().top+t.height()&&(o=t.get(0).getBoundingClientRect().top+t.height())):o=a"),$(L)),a=n,o=e.timeStamp}},!0),y.events.on("keyup",function(){r=1})}}(),!L)return!1;var e=y.$wp||y.$sc;e.append(c),c.data("instance",y);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),n=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);n-=y.helpers.getPX(e.css("border-left-width")),t-=y.helpers.getPX(e.css("border-top-width")),y.$el.is("img")&&y.$sc.is("body")&&(n=t=0);var r=Le();_e()&&(r=r.find(".fr-img-wrap"));var a=0,o=0;y.opts.iframe&&(a=y.helpers.getPX(y.$wp.find(".fr-iframe").css("padding-top")),o=y.helpers.getPX(y.$wp.find(".fr-iframe").css("padding-left"))),c.css("top",(y.opts.iframe?r.offset().top+a:r.offset().top+t)-1).css("left",(y.opts.iframe?r.offset().left+o:r.offset().left+n)-1).css("width",r.get(0).getBoundingClientRect().width).css("height",r.get(0).getBoundingClientRect().height).addClass("fr-active")}function C(e){return'')}function E(e){_e()&&L.parents(".fr-img-caption").css("width",e),L.css("width",e)}function k(e){if(!y.core.sameInstance(c))return!0;if(e.preventDefault(),e.stopPropagation(),y.$el.find("img.fr-error").left)return!1;y.undo.canDo()||y.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var n=y.$oel.get(0),r=n.ownerDocument,a=r.defaultView||r.parentWindow,o=!1;try{o=a.location!=a.parent.location&&!(a.$&&a.$.FE)}catch(l){}o&&a.frameElement&&(t+=y.helpers.getPX(_(n).offset().left)+a.frameElement.clientLeft)}(d=_(this)).data("start-x",t),d.data("start-width",L.width()),d.data("start-height",L.height());var i=L.width();if(y.opts.imageResizeWithPercent){var s=L.parentsUntil(y.$el,y.html.blockTagsQuery()).get(0)||y.el;i=(i/_(s).outerWidth()*100).toFixed(2)+"%"}E(i),f.show(),y.popups.hideAll(),ge()}function x(e){if(!y.core.sameInstance(c))return!0;var t;if(d&&L){if(e.preventDefault(),y.$el.find("img.fr-error").left)return!1;var n=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!n)return!1;var r=n-d.data("start-x"),a=d.data("start-width");if((d.hasClass("fr-hnw")||d.hasClass("fr-hsw"))&&(r=0-r),y.opts.imageResizeWithPercent){var o=L.parentsUntil(y.$el,y.html.blockTagsQuery()).get(0)||y.el;a=((a+r)/_(o).outerWidth()*100).toFixed(2),y.opts.imageRoundPercent&&(a=Math.round(a)),E("".concat(a,"%")),(t=_e()?(y.helpers.getPX(L.parents(".fr-img-caption").css("width"))/_(o).outerWidth()*100).toFixed(2):(y.helpers.getPX(L.css("width"))/_(o).outerWidth()*100).toFixed(2))===a||y.opts.imageRoundPercent||E("".concat(t,"%")),L.css("height","").removeAttr("height")}else a+r>=y.opts.imageMinWidth&&(E(a+r),t=_e()?y.helpers.getPX(L.parents(".fr-img-caption").css("width")):y.helpers.getPX(L.css("width"))),t!==a+r&&E(t),((L.attr("style")||"").match(/(^height:)|(; *height:)/)||L.attr("height"))&&(L.css("height",d.data("start-height")*L.width()/d.data("start-width")),L.removeAttr("height"));S(),y.events.trigger("image.resize",[ye()])}}function R(e){if(!y.core.sameInstance(c))return!0;if(d&&L){if(e&&e.stopPropagation(),y.$el.find("img.fr-error").left)return!1;d=null,f.hide(),S(),o(),y.undo.saveStep(),y.events.trigger("image.resizeEnd",[ye()])}else c.removeClass("fr-active")}function M(e,t,n){y.edit.on(),L&&L.addClass("fr-error"),a[e]?B(y.language.translate(a[e])):B(y.language.translate("Something went wrong. Please try again.")),!L&&n&&ne(n),y.events.trigger("image.error",[{code:e,message:a[e]},t,n])}function N(e){if(e)return y.$wp&&y.events.$on(y.$wp,"scroll.image-edit",function(){L&&y.popups.isVisible("image.edit")&&(y.events.disableBlur(),o())}),!0;var t="";if(0\n '.concat(y.button.buildList(y.opts.imageEditButtons),"\n ")};return y.popups.create("image.edit",n)}return!1}function O(e){var t=y.popups.get("image.insert");if(t||(t=j()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),L){var n=Le();y.popups.setContainer("image.insert",y.$sc);var r=n.offset().left,a=n.offset().top+n.height();y.popups.show("image.insert",r,a,n.outerHeight())}void 0===e&&D(y.language.translate("Uploading"),0)}function I(e){var t=y.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||y.$el.find("img.fr-error").length)){if(y.events.focus(),y.$el.find("img.fr-error").length&&(y.$el.find("img.fr-error").remove(),y.undo.saveStep(),y.undo.run(),y.undo.dropRedo()),!y.$wp&&L){var n=L;pe(!0),y.selection.setAfter(n.get(0)),y.selection.restore()}y.popups.hide("image.insert")}}function D(e,t){var n=y.popups.get("image.insert");if(n){var r=n.find(".fr-image-progress-bar-layer");r.find("h3").text(e+(t?" ".concat(t,"%"):"")),r.removeClass("fr-error"),t?(r.find("div").removeClass("fr-indeterminate"),r.find("div > span").css("width","".concat(t,"%"))):r.find("div").addClass("fr-indeterminate")}}function B(e){O();var t=y.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var n=t.find("h3");n.text(e),y.events.disableBlur(),n.focus()}function $(e){fe.call(e.get(0))}function H(){var e=_(this);y.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),$(e),y.events.trigger("image.loaded",[e])}function F(i,e,s,l,c){l&&"string"==typeof l&&(l=y.$(l)),y.edit.off(),D(y.language.translate("Loading image")),e&&(i=y.helpers.sanitizeURL(i));var t=new Image;t.onload=function(){var e,t;if(l){y.undo.canDo()||l.hasClass("fr-uploading")||y.undo.saveStep();var n=l.data("fr-old-src");l.data("fr-image-pasted")&&(n=null),y.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),n&&l.attr("src",n),!y.opts.trackChangesEnabled||l[0].parentNode&&"SPAN"===l[0].parentNode.tagName&&l[0].parentNode.hasAttribute("data-tracking")||y.track_changes.replaceSpecialItem(l),l.replaceWith(e)):e=l;for(var r=e.get(0).attributes,a=0;ay.opts.imageMaxSize)return M(A),!1;if(y.opts.imageAllowedTypes.indexOf(r.type.replace(/image\//g,""))<0)return M(T),!1;if(y.drag_support.formdata&&(n=y.drag_support.formdata?new FormData:null),n){var a;if(!1!==y.opts.imageUploadToS3)for(a in n.append("key",y.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(r.name||"untitled")),n.append("success_action_status","201"),n.append("X-Requested-With","xhr"),n.append("Content-Type",r.type),y.opts.imageUploadToS3.params)y.opts.imageUploadToS3.params.hasOwnProperty(a)&&n.append(a,y.opts.imageUploadToS3.params[a]);for(a in y.opts.imageUploadParams)y.opts.imageUploadParams.hasOwnProperty(a)&&n.append(a,y.opts.imageUploadParams[a]);n.append(y.opts.imageUploadParam,r,r.name);var o,i,s=y.opts.imageUploadURL,l=y.opts.imageUploadMethod;y.opts.imageUploadToS3&&(s=y.opts.imageUploadToS3.uploadURL?y.opts.imageUploadToS3.uploadURL:"https://".concat(y.opts.imageUploadToS3.region,".amazonaws.com/").concat(y.opts.imageUploadToS3.bucket)),y.opts.imageUploadToAzure&&(o=s=y.opts.imageUploadToAzure.uploadURL?"".concat(y.opts.imageUploadToAzure.uploadURL,"/").concat(r.name):encodeURI("https://".concat(y.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(y.opts.imageUploadToAzure.container,"/").concat(r.name)),y.opts.imageUploadToAzure.SASToken&&(s+=y.opts.imageUploadToAzure.SASToken),l="PUT");var c=y.core.getXHR(s,l);if(y.opts.imageUploadToAzure){var d=(new Date).toUTCString();if(!y.opts.imageUploadToAzure.SASToken&&y.opts.imageUploadToAzure.accessKey){var f=y.opts.imageUploadToAzure.account,p=y.opts.imageUploadToAzure.container;if(y.opts.imageUploadToAzure.uploadURL){var u=y.opts.imageUploadToAzure.uploadURL.split("/");p=u.pop(),f=u.pop().split(".")[0]}var h="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(d,"\nx-ms-version:2019-07-07"),g=encodeURI("/"+f+"/"+p+"/"+r.name),m=l+"\n\n\n"+r.size+"\n\n"+r.type+"\n\n\n\n\n\n\n"+h+"\n"+g,v=y.cryptoJSPlugin.cryptoJS.HmacSHA256(m,y.cryptoJSPlugin.cryptoJS.enc.Base64.parse(y.opts.imageUploadToAzure.accessKey)).toString(y.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+f+":"+v;i=v,c.setRequestHeader("Authorization",b)}for(a in c.setRequestHeader("x-ms-version","2019-07-07"),c.setRequestHeader("x-ms-date",d),c.setRequestHeader("Content-Type",r.type),c.setRequestHeader("x-ms-blob-type","BlockBlob"),y.opts.imageUploadParams)y.opts.imageUploadParams.hasOwnProperty(a)&&c.setRequestHeader(a,y.opts.imageUploadParams[a]);for(a in y.opts.imageUploadToAzure.params)y.opts.imageUploadToAzure.params.hasOwnProperty(a)&&c.setRequestHeader(a,y.opts.imageUploadToAzure.params[a])}!function E(t,n,r,a,o,i){function s(){var e=_(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),y.placeholder.refresh(),$(e),S(),O(),y.edit.off(),t.onload=function(){P.call(t,e,o,i)},t.onerror=U,t.upload.onprogress=z,t.onabort=V,_(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),a?(a.attr("src",a.data("fr-old-src")),a.removeClass("fr-uploading")):e.remove(),pe(!0))}),t.send(y.opts.imageUploadToAzure?r:n)}var l=new FileReader;l.onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),n=[],r=0;r'.concat(a,""));var o=y.opts.imageInsertButtons.indexOf("imageUpload"),i=y.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=o&&(t=" fr-active",0<=i&&i').concat(y.language.translate("Drop image"),"
(").concat(y.language.translate("or click"),')'));var l="";0<=i&&(t=" fr-active",0<=o&&o"));var c={buttons:r,upload_layer:s,by_url_layer:l,progress_bar:''};return 1<=y.opts.imageInsertButtons.length&&(n=y.popups.create("image.insert",c)),y.$wp&&y.events.$on(y.$wp,"scroll",function(){L&&y.popups.isVisible("image.insert")&&Ce()}),function d(r){y.events.$on(r,"dragover dragenter",".fr-image-upload-layer",function(e){return _(this).addClass("fr-drop"),(y.browser.msie||y.browser.edge)&&e.preventDefault(),!1},!0),y.events.$on(r,"dragleave dragend",".fr-image-upload-layer",function(e){return _(this).removeClass("fr-drop"),(y.browser.msie||y.browser.edge)&&e.preventDefault(),!1},!0),y.events.$on(r,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),_(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var n=r.data("instance")||y;n.events.disableBlur(),n.image.upload(t.files),n.events.enableBlur()}},!0),y.helpers.isIOS()&&y.events.$on(r,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){_(this).trigger("click")},!0),y.events.$on(r,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=r.data("instance")||y;e.events.disableBlur(),r.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,L)}_(this).val("")},!0)}(n),n}function q(){L&&y.popups.get("image.alt").find("input").val(L.attr("alt")||"").trigger("change")}function Z(){var e=y.popups.get("image.alt");e||(e=X()),I(),y.popups.refresh("image.alt"),y.popups.setContainer("image.alt",y.$sc);var t=Le(),n=t.outerWidth()/2;_e()&&(t=t.find(".fr-img-wrap"),n=L.outerWidth()/2);var r=t.offset().left+n,a=t.offset().top+t.outerHeight(),o=t.outerHeight();y.opts.iframe&&_e()&&(o=L?L.outerHeight():0),y.popups.show("image.alt",r,a,o,!0)}function X(e){if(e)return y.popups.onRefresh("image.alt",q),!0;var t={buttons:''.concat(y.button.buildList(y.opts.imageAltButtons),"
"),alt_layer:'")},n=y.popups.create("image.alt",t);return y.$wp&&y.events.$on(y.$wp,"scroll.image-alt",function(){L&&y.popups.isVisible("image.alt")&&Z()}),n}function Q(){var e=y.popups.get("image.size"),t=L.get(0).style.height?L.get(0).style.height:"auto",n=L.get(0).style.width?L.get(0).style.width:"auto";if(L)if(_e()){var r=L.parent();r.get(0).style.width||(r=L.parent().parent()),e.find('input[name="width"]').val(n).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}else e.find('input[name="width"]').val(n).trigger("change"),e.find('input[name="height"]').val(t).trigger("change")}function J(){var e=y.popups.get("image.size");e||(e=ee()),I(),y.popups.refresh("image.size"),y.popups.setContainer("image.size",y.$sc);var t=Le(),n=t.outerWidth()/2;_e()&&(t=t.find(".fr-img-wrap"),n=L.outerWidth()/2);var r=t.outerHeight();y.opts.iframe&&_e()&&(r=L?L.outerHeight():0);var a=t.offset().left+n,o=t.offset().top+t.outerHeight();y.popups.show("image.size",a,o,r,!0)}function ee(e){if(e)return y.popups.onRefresh("image.size",Q),!0;var t={buttons:''.concat(y.button.buildList(y.opts.imageSizeButtons),"
"),size_layer:' ")},n=y.popups.create("image.size",t);return y.$wp&&y.events.$on(y.$wp,"scroll.image-size",function(){L&&y.popups.isVisible("image.size")&&J()}),n}function te(e,t,n,r){return e.pageX=t,k.call(this,e),e.pageX=e.pageX+n*Math.floor(Math.pow(1.1,r)),x.call(this,e),R.call(this,e),++r}function ne(e){if(e=e||Le(),y.opts.trackChangesEnabled&&!y.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return y.track_changes.removeSpecialItem(e),y.popups.hideAll(),void pe(!0);e&&!1!==y.events.trigger("image.beforeRemove",[e])&&(y.popups.hideAll(),Ee(),pe(!0),y.undo.canDo()||y.undo.saveStep(),e.get(0)==y.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(y.selection.setBefore(e.get(0).parentNode)||y.selection.setAfter(e.get(0).parentNode)||e.parent().after(kt.MARKERS),_(e.get(0).parentNode).remove()):(y.selection.setBefore(e.get(0))||y.selection.setAfter(e.get(0))||e.after(kt.MARKERS),e.remove()),y.html.fillEmptyBlocks(),y.selection.restore()),y.undo.saveStep())}function re(e){var t=e.which;if(L&&(t==kt.KEYCODE.BACKSPACE||t==kt.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),ne(),!1;if(L&&t==kt.KEYCODE.ESC){var n=L;return pe(!0),y.selection.setAfter(n.get(0)),y.selection.restore(),e.preventDefault(),!1}if(!L||t!=kt.KEYCODE.ARROW_LEFT&&t!=kt.KEYCODE.ARROW_RIGHT)return L&&t===kt.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),pe(!0),!1):L&&t!=kt.KEYCODE.F10&&!y.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var r=L.get(0);return pe(!0),t==kt.KEYCODE.ARROW_LEFT?y.selection.setBefore(r):y.selection.setAfter(r),y.selection.restore(),e.preventDefault(),!1}function ae(e){if(e&&"IMG"==e.tagName){if(y.node.hasClass(e,"fr-uploading")||y.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):y.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&y.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var n=e.nextSibling;n&&n.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var r=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),a=0;a"));var r=y.$el.find('img[data-fr-image-pasted="true"]');r&&me(r,y.opts.imageDefaultDisplay,y.opts.imageDefaultAlign),y.events.trigger("paste.after")}function le(e,t){var n=new FileReader;n.onload=function r(e){var t=y.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=y.opts.imageResizeWithPercent?"%":"px"),y.html.insert('"));var n=y.$el.find('img[data-fr-image-pasted="true"]');n&&me(n,y.opts.imageDefaultDisplay,y.opts.imageDefaultAlign),y.events.trigger("paste.after")}(t),n.readAsDataURL(e,t)}function ce(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"";y.browser.mozilla&&(""===t||/([ ])/.test(t))&&(t=y.win.localStorage.getItem("fr-copied-html"));var n=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(n&&!y.opts.imageUploadURL){if(!n)return!1;var r=n.src,a=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))a=e.clipboardData.items[0].getAsFile();else for(var o=0;o"):_(y.node.blockParent(e.get(0))).after("<".concat(y.html.defaultTag(),">
").concat(y.html.defaultTag(),">")))})})(),"IMG"==y.el.tagName&&y.$el.addClass("fr-view"),y.events.$on(y.$el,y.helpers.isMobile()&&!y.helpers.isWindowsPhone()?"touchend":"click","IMG"==y.el.tagName?null:'img:not([contenteditable="false"])',fe),y.helpers.isMobile()&&(y.events.$on(y.$el,"touchstart","IMG"==y.el.tagName?null:'img:not([contenteditable="false"])',function(){n=!1}),y.events.$on(y.$el,"touchmove",function(){n=!0})),y.$wp?(y.events.on("window.keydown keydown",re,!0),y.events.on("keyup",function(e){if(L&&e.which==kt.KEYCODE.ENTER)return!1},!0),y.events.$on(y.$el,"keydown",function(){var e=y.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&y.node.isLastSibling(e))&&(e=e.parentNode),y.node.hasClass(e,"fr-inner")||(y.node.hasClass(e,"fr-img-caption")||(e=_(e).parents(".fr-img-caption").get(0)),y.node.hasClass(e,"fr-img-caption")&&(y.opts.trackChangesEnabled||_(e).after(kt.INVISIBLE_SPACE+kt.MARKERS),y.selection.restore()))})):y.events.$on(y.$win,"keydown",re),y.events.on("toolbar.esc",function(){if(L){if(y.$wp)y.events.disableBlur(),y.events.focus();else{var e=L;pe(!0),y.selection.setAfter(e.get(0)),y.selection.restore()}return!1}},!0),y.events.on("toolbar.focusEditor",function(){if(L)return!1},!0),y.events.on("window.cut window.copy",function(e){if(L&&y.popups.isVisible("image.edit")&&!y.popups.get("image.edit").find(":focus").length){var t=Le();_e()?(t.before(kt.START_MARKER),t.after(kt.END_MARKER),y.selection.restore(),y.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(Ee(),y.paste.saveCopiedText(L.get(0).outerHTML,L.attr("alt"))),"copy"==e.type?setTimeout(function(){$(L)}):(pe(!0),y.undo.saveStep(),setTimeout(function(){y.undo.saveStep()},0))}},!0),y.browser.msie&&y.events.on("keydown",function(e){if(!y.selection.isCollapsed()||!L)return!0;var t=e.which;t==kt.KEYCODE.C&&y.keys.ctrlKey(e)?y.events.trigger("window.copy"):t==kt.KEYCODE.X&&y.keys.ctrlKey(e)&&y.events.trigger("window.cut")}),y.events.$on(_(y.o_win),"keydown",function(e){var t=e.which;if(L&&t==kt.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),y.events.$on(y.$win,"keydown",function(e){var t=e.which;L&&L.hasClass("fr-uploading")&&t==kt.KEYCODE.ESC&&L.trigger("abortUpload")}),y.events.on("destroy",function(){L&&L.hasClass("fr-uploading")&&L.trigger("abortUpload")}),y.events.on("paste.before",ce),y.events.on("paste.beforeCleanup",de),y.events.on("paste.after",ie),y.events.on("html.set",v),y.events.on("html.inserted",v),v(),y.events.on("destroy",function(){s=[]}),y.events.on("html.processGet",ae),y.opts.imageOutputSize&&y.events.on("html.beforeGet",function(){r=y.el.querySelectorAll("img");for(var e=0;e *").first().replaceWith(y.icon.create("image-align-".concat(ve())))},refreshAlignOnShow:function Oe(e,t){L&&t.find('.fr-command[data-param1="'.concat(ve(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function Ie(e){var t=Le();t.removeClass("fr-dii fr-dib"),!y.opts.htmlUntouched&&y.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ve()),Ee(),S(),o(),y.selection.clear()},refreshDisplayOnShow:function De(e,t){L&&t.find('.fr-command[data-param1="'.concat(be(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:Ce,back:function e(){L?(y.events.disableBlur(),_(".fr-popup input:focus").blur(),$(L)):(y.events.disableBlur(),y.selection.restore(),y.events.enableBlur(),y.popups.hide("image.insert"),y.toolbar.showInline())},get:ye,getEl:Le,insert:F,showProgressBar:O,remove:ne,hideProgressBar:I,applyStyle:function Be(e,t,n){if(void 0===t&&(t=y.opts.imageStyles),void 0===n&&(n=y.opts.imageMultipleStyles),!L)return!1;var r=Le();if(!n){var a=Object.keys(t);a.splice(a.indexOf(e),1),r.removeClass(a.join(" "))}"object"==St(t[e])?(r.removeAttr("style"),r.css(t[e].style)):(r.toggleClass(e),_e()&&L.hasClass(e)&&L.removeClass(e)),$(L)},showAltPopup:Z,showSizePopup:J,setAlt:function $e(e){if(L){var t=y.popups.get("image.alt");L.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),$(L)}},setSize:function He(e,t){if(L){var n=y.popups.get("image.size");e=e||n.find('input[name="width"]').val()||"",t=t||n.find('input[name="height"]').val()||"";var r=/^[\d]+((px)|%)*$/g;L.removeAttr("width").removeAttr("height"),e.match(r)?L.css("width",e):L.css("width",""),t.match(r)?L.css("height",t):L.css("height",""),_e()&&(L.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(r)?L.parents(".fr-img-caption").css("width",e):L.parents(".fr-img-caption").css("width",""),t.match(r)?L.parents(".fr-img-caption").css("height",t):L.parents(".fr-img-caption").css("height","")),n&&n.find("input:focus").blur(),$(L)}},toggleCaption:function Fe(){var e;if(L&&!_e()){(e=L).parent().is("a")&&(e=L.parent());var t,n,r=L.parents("ul")&&0'),e.wrap(''),L.after('").concat(kt.START_MARKER).concat(y.language.translate("Image Caption")).concat(kt.END_MARKER,"")),L.parents(".fr-img-caption").css("width",s);var l=L.parents(".fr-img-space-wrap").length;1==l?we(document.querySelector(".fr-img-space-wrap")):1').concat(this.icon.create("image-align-".concat(n)),'').concat(this.language.translate(t[n]),""));return e+=""},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),kt.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),kt.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),kt.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),kt.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),kt.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),kt.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),kt.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),kt.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),kt.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,r=this.image.getEl();r&&t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),kt.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),kt.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),kt.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),kt.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),kt.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),kt.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),kt.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),kt.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}}),Object.assign(kt.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),kt.PLUGINS.imageManager=function(s){var l,c,o,i,d,f,p,u,h,g,m,v=s.$,b="image_manager",e=10,C=11,E=12,y=13,L=14,_=15,n=21,r=22,a={};function w(){var e=v(window).outerWidth();return e<768?2:e<1200?3:4}function A(){d.empty();for(var e=0;e')}function T(){if(h=o[0].scrollHeight-s.opts.imageManagerScrollOffset-o.outerHeight()){u++;for(var e=s.opts.imageManagerPageSize*(u-1);e').concat(e[t],"