diff --git a/.gitignore b/.gitignore index 1097fee..3f683bc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ assets/lib/* nohup.out vendor/* *~ +npm-debug.log +*.log diff --git a/assets/dist/dashboard.js b/assets/dist/dashboard.js index f257dcd..add8baa 100644 --- a/assets/dist/dashboard.js +++ b/assets/dist/dashboard.js @@ -12019,7 +12019,10 @@ Array.prototype.remove = function(from, to) { var element = window.cardObjects[self.id]; if (e == "init") + { event2 = "preload"; + element[event2](self.id); + } element[e](); diff --git a/assets/dist/dashboard.min.js b/assets/dist/dashboard.min.js index 56f9d7d..4a0c315 100644 --- a/assets/dist/dashboard.min.js +++ b/assets/dist/dashboard.min.js @@ -7,5 +7,5 @@ }:Ti&&!/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)&&(li=function(e,t){if(t>1&&45==e.charCodeAt(t-1)){if(/\w/.test(e.charAt(t-2))&&/[^\-?\.]/.test(e.charAt(t)))return!0;if(t>2&&/[\d\.,]/.test(e.charAt(t-2))&&/[\d\.,]/.test(e.charAt(t)))return!1}return/[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(e.slice(t-1,t+1))});var Do,No,Lo=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)};e.splitLines=Lo;var Eo=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Ao=function(){var e=ri("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Fo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};e.keyNames=Fo,function(){for(var e=0;10>e;e++)Fo[e+48]=e+"";for(var e=65;90>=e;e++)Fo[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Fo[e+111]=Fo[e+63235]="F"+e}();var Oo,zo=function(){function e(e){return 255>=e?t.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1791>=e?n.charAt(e-1536):e>=1792&&2220>=e?"r":"L"}var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/,l="L";return function(t){if(!r.test(t))return!1;for(var n,c=t.length,u=[],d=0;c>d;++d)u.push(n=e(t.charCodeAt(d)));for(var d=0,h=l;c>d;++d){var n=u[d];"m"==n?u[d]=h:h=n}for(var d=0,p=l;c>d;++d){var n=u[d];"1"==n&&"r"==p?u[d]="n":o.test(n)&&(p=n,"r"==n&&(u[d]="R"))}for(var d=1,h=u[0];c-1>d;++d){var n=u[d];"+"==n&&"1"==h&&"1"==u[d+1]?u[d]="1":","!=n||h!=u[d+1]||"1"!=h&&"n"!=h||(u[d]=h),h=n}for(var d=0;c>d;++d){var n=u[d];if(","==n)u[d]="N";else if("%"==n){for(var f=d+1;c>f&&"%"==u[f];++f);for(var g=d&&"!"==u[d-1]||c-1>f&&"1"==u[f]?"1":"N",m=d;f>m;++m)u[m]=g;d=f-1}}for(var d=0,p=l;c>d;++d){var n=u[d];"L"==p&&"1"==n?u[d]="L":o.test(n)&&(p=n)}for(var d=0;c>d;++d)if(i.test(u[d])){for(var f=d+1;c>f&&i.test(u[f]);++f);for(var v="L"==(d?u[d-1]:l),b="L"==(c-1>f?u[f]:l),g=v||b?"L":"R",m=d;f>m;++m)u[m]=g;d=f-1}for(var y,x=[],d=0;c>d;)if(a.test(u[d])){var w=d;for(++d;c>d&&a.test(u[d]);++d);x.push({from:w,to:d,level:0})}else{var C=d,S=x.length;for(++d;c>d&&"L"!=u[d];++d);for(var m=C;d>m;)if(s.test(u[m])){m>C&&x.splice(S,0,{from:C,to:m,level:1});var $=m;for(++m;d>m&&s.test(u[m]);++m);x.splice(S,0,{from:$,to:m,level:2}),C=m}else++m;d>C&&x.splice(S,0,{from:C,to:d,level:1})}return 1==x[0].level&&(y=t.match(/^\s+/))&&(x[0].from=y[0].length,x.unshift({from:0,to:y[0].length,level:0})),1==Vr(x).level&&(y=t.match(/\s+$/))&&(Vr(x).to-=y[0].length,x.push({from:c-y[0].length,to:c,level:0})),x[0].level!=Vr(x).level&&x.push({from:c,to:c,level:x[0].level}),x}}();return e.version="3.15.0",e}();(function(){"use strict";var e=/^(\s*)([*+-]|(\d+)\.)(\s*)/,t="*+-";x.commands.newlineAndIndentContinueMarkdownList=function(n){var r,i=n.getCursor(),o=n.getStateAfter(i.line).list;if(!o||!(r=n.getLine(i.line).match(e)))return n.execCommand("newlineAndIndent"),void 0;var a=r[1],s=r[4],l=t.indexOf(r[2])>=0?r[2]:parseInt(r[3],10)+1+".";n.replaceSelection("\n"+a+l+s,"end")}})(),x.defineMode("xml",function(e,t){function n(e,t){function n(n){return t.tokenize=n,n(e,t)}var i=e.next();if("<"==i){if(e.eat("!"))return e.eat("[")?e.match("CDATA[")?n(o("atom","]]>")):null:e.match("--")?n(o("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(a(1))):null;if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),t.tokenize=o("meta","?>"),"meta";var s=e.eat("/");y="";for(var l;l=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)y+=l;return y?(x=s?"closeTag":"openTag",t.tokenize=r,"tag"):"error"}if("&"==i){var c;return c=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),c?"atom":"error"}return e.eatWhile(/[^&<]/),null}function r(e,t){var r=e.next();return">"==r||"/"==r&&e.eat(">")?(t.tokenize=n,x=">"==r?"endTag":"selfcloseTag","tag"):"="==r?(x="equals",null):"<"==r?"error":/[\'\"]/.test(r)?(t.tokenize=i(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function i(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=r;break}return"string"};return t.isInAttribute=!0,t}function o(e,t){return function(r,i){for(;!r.eol();){if(r.match(t)){i.tokenize=n;break}r.next()}return e}}function a(e){return function(t,r){for(var i;null!=(i=t.next());){if("<"==i)return r.tokenize=a(e+1),r.tokenize(t,r);if(">"==i){if(1==e){r.tokenize=n;break}return r.tokenize=a(e-1),r.tokenize(t,r)}}return"meta"}}function s(){for(var e=arguments.length-1;e>=0;e--)w.cc.push(arguments[e])}function l(){return s.apply(null,arguments),!0}function c(e,t){var n=T.doNotIndent.hasOwnProperty(e)||w.context&&w.context.noIndent;w.context={prev:w.context,tagName:e,indent:w.indented,startOfLine:t,noIndent:n}}function u(){w.context&&(w.context=w.context.prev)}function d(e){if("openTag"==e)return w.tagName=y,w.tagStart=C.column(),l(g,h(w.startOfLine));if("closeTag"==e){var t=!1;return w.context?w.context.tagName!=y&&(T.implicitlyClosed.hasOwnProperty(w.context.tagName.toLowerCase())&&u(),t=!w.context||w.context.tagName!=y):t=!0,t&&(S="error"),l(p(t))}return l()}function h(e){return function(t){var n=w.tagName;return w.tagName=w.tagStart=null,"selfcloseTag"==t||"endTag"==t&&T.autoSelfClosers.hasOwnProperty(n.toLowerCase())?(f(n.toLowerCase()),l()):"endTag"==t?(f(n.toLowerCase()),c(n,e),l()):l()}}function p(e){return function(t){return e&&(S="error"),"endTag"==t?(u(),l()):(S="error",l(arguments.callee))}}function f(e){for(var t;;){if(!w.context)return;if(t=w.context.tagName.toLowerCase(),!T.contextGrabbers.hasOwnProperty(t)||!T.contextGrabbers[t].hasOwnProperty(e))return;u()}}function g(e){return"word"==e?(S="attribute",l(m,g)):"endTag"==e||"selfcloseTag"==e?s():(S="error",l(g))}function m(e){return"equals"==e?l(v,g):(T.allowMissing?"word"==e&&(S="attribute"):S="error","endTag"==e||"selfcloseTag"==e?s():l())}function v(e){return"string"==e?l(b):"word"==e&&T.allowUnquoted?(S="string",l()):(S="error","endTag"==e||"selfCloseTag"==e?s():l())}function b(e){return"string"==e?l(b):s()}var y,x,w,C,S,$=e.indentUnit,k=t.multilineTagIndentFactor||1,_=t.multilineTagIndentPastTag||!0,T=t.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},M=t.alignCDATA;return{startState:function(){return{tokenize:n,cc:[],indented:0,startOfLine:!0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.startOfLine=!0,t.indented=e.indentation()),e.eatSpace())return null;S=x=y=null;var n=t.tokenize(e,t);if(t.type=x,(n||x)&&"comment"!=n)for(w=t,C=e;;){var r=t.cc.pop()||d;if(r(x||n))break}return t.startOfLine=!1,S||n},indent:function(e,t,i){var o=e.context;if(e.tokenize.isInAttribute)return e.stringStartCol+1;if(e.tokenize!=r&&e.tokenize!=n||o&&o.noIndent)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return _?e.tagStart+e.tagName.length+2:e.tagStart+$*k;if(M&&/",configuration:t.htmlMode?"html":"xml",helperType:t.htmlMode?"html":"xml"}}),x.defineMIME("text/xml","xml"),x.defineMIME("application/xml","xml"),x.mimeModes.hasOwnProperty("text/html")||x.defineMIME("text/html",{name:"xml",htmlMode:!0}),x.defineMode("markdown",function(e,t){function n(e,t,n){return t.f=t.inline=n,n(e,t)}function r(e,t,n){return t.f=t.block=n,n(e,t)}function i(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.quote=0,m||e.f!=a||(e.f=u,e.block=o),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.thisLineHasContent=!1,null}function o(e,i){var o=i.list!==!1;if(i.list!==!1&&i.indentationDiff>=0?(4>i.indentationDiff&&(i.indentation-=i.indentationDiff),i.list=null):i.list!==!1&&i.indentation>0?(i.list=null,i.listDepth=Math.floor(i.indentation/4)):i.list!==!1&&(i.list=!1,i.listDepth=0),i.indentationDiff>=4)return i.indentation-=4,e.skipToEnd(),S;if(e.eatSpace())return null;if("#"===e.peek()||i.prevLineHasContent&&e.match(P))i.header=!0;else if(e.eat(">"))for(i.indentation++,i.quote=1,e.eatSpace();e.eat(">");)e.eatSpace(),i.quote++;else{if("["===e.peek())return n(e,i,h);if(e.match(I,!0))return D;if(i.prevLineHasContent&&!o||!e.match(H,!0)&&!e.match(R,!0)){if(t.fencedCodeBlocks&&e.match(/^```([\w+#]*)/,!0))return i.localMode=y(RegExp.$1),i.localMode&&(i.localState=i.localMode.startState()),r(e,i,s),S}else i.indentation+=4,i.list=!0,i.listDepth++,t.taskLists&&e.match(j,!1)&&(i.taskList=!0)}return n(e,i,i.inline)}function a(e,t){var n=v.token(e,t.htmlState);return m&&"tag"===n&&"openTag"!==t.htmlState.type&&!t.htmlState.context&&(t.f=u,t.block=o),t.md_inside&&-1!=e.current().indexOf(">")&&(t.f=u,t.block=o,t.htmlState.context=void 0),n}function s(e,t){return e.sol()&&e.match(/^```/,!0)?(t.localMode=t.localState=null,t.f=u,t.block=o,S):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),S)}function l(e){var t=[];if(e.taskOpen)return"meta";if(e.taskClosed)return"property";if(e.strong&&t.push(z),e.em&&t.push(O),e.linkText&&t.push(A),e.code&&t.push(S),e.header&&t.push(C),e.quote&&t.push(e.quote%2?$:k),e.list!==!1){var n=(e.listDepth-1)%3;n?1===n?t.push(T):t.push(M):t.push(_)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function c(e,t){return e.match(W,!0)?l(t):void 0}function u(e,i){var o=i.text(e,i);if(o!==void 0)return o;if(i.list)return i.list=null,l(i);if(i.taskList){var s="x"!==e.match(j,!0)[1];return s?i.taskOpen=!0:i.taskClosed=!0,i.taskList=!1,l(i)}i.taskOpen=!1,i.taskClosed=!1;var c=e.next();if("\\"===c)return e.next(),l(i);if(i.linkTitle){i.linkTitle=!1;var u=c;"("===c&&(u=")"),u=(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var h="^\\s*(?:[^"+u+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(e.match(RegExp(h),!0))return F}if("`"===c){var p=l(i),f=e.pos;e.eatWhile("`");var m=1+e.pos-f;return i.code?m===w?(i.code=!1,p):l(i):(w=m,i.code=!0,l(i))}if(i.code)return l(i);if("!"===c&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return e.match(/\[[^\]]*\]/),i.inline=i.f=d,N;if("["===c&&e.match(/.*\](\(| ?\[)/,!1))return i.linkText=!0,l(i);if("]"===c&&i.linkText){var v=l(i);return i.linkText=!1,i.inline=i.f=d,v}if("<"===c&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return n(e,i,g(L,">"));if("<"===c&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return n(e,i,g(E,">"));if("<"===c&&e.match(/^\w/,!1)){if(-1!=e.string.indexOf(">")){var b=e.string.substring(1,e.string.indexOf(">"));/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return e.backUp(1),r(e,i,a)}if("<"===c&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";var y=!1;if(!t.underscoresBreakWords&&"_"===c&&"_"!==e.peek()&&e.match(/(\w)/,!1)){var x=e.pos-2;if(x>=0){var C=e.string.charAt(x);"_"!==C&&C.match(/(\w)/,!1)&&(y=!0)}}var p=l(i);if("*"===c||"_"===c&&!y){if(i.strong===c&&e.eat(c))return i.strong=!1,p;if(!i.strong&&e.eat(c))return i.strong=c,l(i);if(i.em===c)return i.em=!1,p;if(!i.em)return i.em=c,l(i)}else if(" "===c&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return l(i);e.backUp(1)}return" "===c&&(e.match(/ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),l(i)}function d(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?n(e,t,g(F,"("===r?")":"]")):"error"}function h(e,t){return e.match(/^[^\]]*\]:/,!0)?(t.f=p,A):n(e,t,u)}function p(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=u,F)}function f(e){return B[e]||(e=(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),B[e]=RegExp("^(?:[^\\\\]|\\\\.)*?("+e+")")),B[e]}function g(e,t,n){return n=n||u,function(r,i){return r.match(f(t)),i.inline=i.f=n,e}}var m=x.modes.hasOwnProperty("xml"),v=x.getMode(e,m?{name:"xml",htmlMode:!0}:"text/plain"),b={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp",scala:"text/x-scala"},y=function(){var t,n,r={},i={},o=[];for(var a in x.modes)x.modes.propertyIsEnumerable(a)&&o.push(a);for(t=0;o.length>t;t++)r[o[t]]=o[t];var s=[];for(var a in x.mimeModes)x.mimeModes.propertyIsEnumerable(a)&&s.push({mime:a,mode:x.mimeModes[a]});for(t=0;s.length>t;t++)n=s[t].mime,i[n]=s[t].mime;for(var l in b)(b[l]in r||b[l]in i)&&(r[l]=b[l]);return function(t){return r[t]?x.getMode(e,r[t]):null}}();void 0===t.underscoresBreakWords&&(t.underscoresBreakWords=!0),void 0===t.fencedCodeBlocks&&(t.fencedCodeBlocks=!1),void 0===t.taskLists&&(t.taskLists=!1);var w=0,C="header",S="comment",$="atom",k="number",_="variable-2",T="variable-3",M="keyword",D="hr",N="tag",L="link",E="link",A="link",F="string",O="em",z="strong",I=/^([*\-=_])(?:\s*\1){2,}\s*$/,H=/^[*\-+]\s+/,R=/^[0-9]+\.\s+/,j=/^\[(x| )\](?=\s)/,P=/^(?:\={1,}|-{1,})$/,W=/^[^!\[\]*_\\<>` "'(]+/,B=[];return{startState:function(){return{f:o,prevLineHasContent:!1,thisLineHasContent:!1,block:o,htmlState:x.startState(v),indentation:0,inline:u,text:c,linkText:!1,linkTitle:!1,em:!1,strong:!1,header:!1,taskList:!1,list:!1,listDepth:0,quote:0,trailingSpace:0,trailingSpaceNewLine:!1}},copyState:function(e){return{f:e.f,prevLineHasContent:e.prevLineHasContent,thisLineHasContent:e.thisLineHasContent,block:e.block,htmlState:x.copyState(v,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?x.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,linkTitle:e.linkTitle,em:e.em,strong:e.strong,header:e.header,taskList:e.taskList,list:e.list,listDepth:e.listDepth,quote:e.quote,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside}},token:function(e,t){if(e.sol()){if(e.match(/^\s*$/,!0))return t.prevLineHasContent=!1,i(t);t.prevLineHasContent=t.thisLineHasContent,t.thisLineHasContent=!0,t.header=!1,t.taskList=!1,t.code=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var n=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length,r=4*Math.floor((n-t.indentation)/4);r>4&&(r=4);var o=t.indentation+r;if(t.indentationDiff=o-t.indentation,t.indentation=o,n>0)return null}return t.f(e,t)},blankLine:i,getType:l}},"xml"),x.defineMIME("text/x-markdown","markdown");var w=/Mac/.test(navigator.platform),C={"Cmd-B":a,"Cmd-I":s,"Cmd-K":d,"Cmd-Alt-I":h,"Cmd-'":l,"Cmd-Alt-L":u,"Cmd-L":c},S=[{name:"bold",action:a},{name:"italic",action:s},"|",{name:"quote",action:l},{name:"unordered-list",action:c},{name:"ordered-list",action:u},"|",{name:"link",action:d},{name:"image",action:h},"|",{name:"info",action:"http://lab.lepture.com/editor/markdown"},{name:"preview",action:g},{name:"fullscreen",action:o}];y.toolbar=S,y.markdown=function(e){return window.marked?marked(e):void 0},y.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var n=this.options,r=this,i={};for(var o in C)(function(e){i[t(e)]=function(){C[e](r)}})(o);i.Enter="newlineAndIndentContinueMarkdownList",this.codemirror=x.fromTextArea(e,{mode:"markdown",theme:"paper",indentWithTabs:!0,lineNumbers:!1,extraKeys:i}),n.toolbar!==!1&&this.createToolbar(),n.status!==!1&&this.createStatusbar(),this._rendered=this.element}},y.prototype.createToolbar=function(e){if(e=e||this.options.toolbar,e&&0!==e.length){var t=document.createElement("div");t.className="editor-toolbar";var o=this;o.toolbar={};for(var a=0;e.length>a;a++)(function(e){var i;i=e.name?n(e.name,e):"|"===e?r():n(e),e.action&&("function"==typeof e.action?i.onclick=function(){e.action(o)}:"string"==typeof e.action&&(i.href=e.action,i.target="_blank")),o.toolbar[e.name||e]=i,t.appendChild(i)})(e[a]);var s=this.codemirror;s.on("cursorActivity",function(){var e=i(s);for(var t in o.toolbar)(function(t){var n=o.toolbar[t];e[t]?n.className+=" active":n.className=n.className.replace(/\s*active\s*/g,"")})(t)});var l=s.getWrapperElement();return l.parentNode.insertBefore(t,l),t}},y.prototype.createStatusbar=function(e){if(e=e||this.options.status,e&&0!==e.length){var t=document.createElement("div");t.className="editor-statusbar";for(var n,r=this.codemirror,i=0;e.length>i;i++)(function(e){var i=document.createElement("span");i.className=e,"words"===e?(i.innerHTML="0",r.on("update",function(){i.innerHTML=b(r.getValue())})):"lines"===e?(i.innerHTML="0",r.on("update",function(){i.innerHTML=r.lineCount()})):"cursor"===e&&(i.innerHTML="0:0",r.on("cursorActivity",function(){n=r.getCursor(),i.innerHTML=n.line+":"+n.ch})),t.appendChild(i)})(e[i]);var o=this.codemirror.getWrapperElement();return o.parentNode.insertBefore(t,o.nextSibling),t}},y.toggleBold=a,y.toggleItalic=s,y.toggleBlockquote=l,y.toggleUnOrderedList=c,y.toggleOrderedList=u,y.drawLink=d,y.drawImage=h,y.undo=p,y.redo=f,y.toggleFullScreen=o,y.prototype.toggleBold=function(){a(this)},y.prototype.toggleItalic=function(){s(this)},y.prototype.toggleBlockquote=function(){l(this)},y.prototype.toggleUnOrderedList=function(){c(this)},y.prototype.toggleOrderedList=function(){u(this)},y.prototype.drawLink=function(){d(this)},y.prototype.drawImage=function(){h(this)},y.prototype.undo=function(){p(this)},y.prototype.redo=function(){f(this)},y.prototype.toggleFullScreen=function(){o(this)},e.Editor=y}(this),!function(){function e(t){var n=e.modules[t];if(!n)throw Error('failed to require "'+t+'"');return"exports"in n||"function"!=typeof n.definition||(n.client=n.component=!0,n.definition.call(this,n.exports={},n),delete n.definition),n.exports}e.modules={},e.register=function(t,n){e.modules[t]={definition:n}},e.define=function(t,n){e.modules[t]={exports:n}},e.register("component~emitter@1.1.2",function(e,t){function n(e){return e?r(e):void 0}function r(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){r.off(e,n),t.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var r,i=0;n.length>i;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var r=0,i=n.length;i>r;++r)n[r].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}}),e.register("dropzone",function(t,n){n.exports=e("dropzone/lib/dropzone.js")}),e.register("dropzone/lib/dropzone.js",function(t,n){(function(){var t,r,i,o,a,s,l,c,u={}.hasOwnProperty,d=function(e,t){function n(){this.constructor=e}for(var r in t)u.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},h=[].slice;r="undefined"!=typeof Emitter&&null!==Emitter?Emitter:e("component~emitter@1.1.2"),l=function(){},t=function(e){function t(e,r){var i,o,a;if(this.element=e,this.version=t.version,this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,""),this.clickableElements=[],this.listeners=[],this.files=[],"string"==typeof this.element&&(this.element=document.querySelector(this.element)),!this.element||null==this.element.nodeType)throw Error("Invalid dropzone element.");if(this.element.dropzone)throw Error("Dropzone already attached.");if(t.instances.push(this),this.element.dropzone=this,i=null!=(a=t.optionsForElement(this.element))?a:{},this.options=n({},this.defaultOptions,i,null!=r?r:{}),this.options.forceFallback||!t.isBrowserSupported())return this.options.fallback.call(this);if(null==this.options.url&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.method=this.options.method.toUpperCase(),(o=this.getExistingFallback())&&o.parentNode&&o.parentNode.removeChild(o),this.options.previewsContainer!==!1&&(this.previewsContainer=this.options.previewsContainer?t.getElement(this.options.previewsContainer,"previewsContainer"):this.element),this.options.clickable&&(this.clickableElements=this.options.clickable===!0?[this.element]:t.getElements(this.options.clickable,"clickable")),this.init()}var n;return d(t,e),t.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached"],t.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:100,thumbnailHeight:100,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(e,t){return t()},init:function(){return l},forceFallback:!1,fallback:function(){var e,n,r,i,o,a;for(this.element.className=""+this.element.className+" dz-browser-not-supported",a=this.element.getElementsByTagName("div"),i=0,o=a.length;o>i;i++)e=a[i],/(^| )dz-message($| )/.test(e.className)&&(n=e,e.className="dz-message");return n||(n=t.createElement('
'),this.element.appendChild(n)),r=n.getElementsByTagName("span")[0],r&&(r.textContent=this.options.dictFallbackMessage),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,r;return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),r=t.optWidth/t.optHeight,e.heightr?(t.srcHeight=e.height,t.srcWidth=t.srcHeight*r):(t.srcWidth=e.width,t.srcHeight=t.srcWidth/r),t.srcX=(e.width-t.srcWidth)/2,t.srcY=(e.height-t.srcHeight)/2,t},drop:function(){return this.element.classList.remove("dz-drag-hover")},dragstart:l,dragend:function(){return this.element.classList.remove("dz-drag-hover")},dragenter:function(){return this.element.classList.add("dz-drag-hover")},dragover:function(){return this.element.classList.add("dz-drag-hover")},dragleave:function(){return this.element.classList.remove("dz-drag-hover")},paste:l,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var n,r,i,o,a,s,l,c,u,d,h,p,f;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),d=e.previewElement.querySelectorAll("[data-dz-name]"),o=0,l=d.length;l>o;o++)n=d[o],n.textContent=e.name;for(h=e.previewElement.querySelectorAll("[data-dz-size]"),a=0,c=h.length;c>a;a++)n=h[a],n.innerHTML=this.filesize(e.size);for(this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink)),r=function(n){return function(r){return r.preventDefault(),r.stopPropagation(),e.status===t.UPLOADING?t.confirm(n.options.dictCancelUploadConfirmation,function(){return n.removeFile(e)}):n.options.dictRemoveFileConfirmation?t.confirm(n.options.dictRemoveFileConfirmation,function(){return n.removeFile(e)}):n.removeFile(e)}}(this),p=e.previewElement.querySelectorAll("[data-dz-remove]"),f=[],s=0,u=p.length;u>s;s++)i=p[s],f.push(i.addEventListener("click",r));return f}},removedfile:function(e){var t;return e.previewElement&&null!=(t=e.previewElement)&&t.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){var n,r,i,o,a;if(e.previewElement){for(e.previewElement.classList.remove("dz-file-preview"),e.previewElement.classList.add("dz-image-preview"),o=e.previewElement.querySelectorAll("[data-dz-thumbnail]"),a=[],r=0,i=o.length;i>r;r++)n=o[r],n.alt=e.name,a.push(n.src=t);return a}},error:function(e,t){var n,r,i,o,a;if(e.previewElement){for(e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error),o=e.previewElement.querySelectorAll("[data-dz-errormessage]"),a=[],r=0,i=o.length;i>r;r++)n=o[r],a.push(n.textContent=t);return a}},errormultiple:l,processing:function(e){return e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink)?e._removeLink.textContent=this.options.dictCancelUpload:void 0},processingmultiple:l,uploadprogress:function(e,t){var n,r,i,o,a;if(e.previewElement){for(o=e.previewElement.querySelectorAll("[data-dz-uploadprogress]"),a=[],r=0,i=o.length;i>r;r++)n=o[r],a.push(n.style.width=""+t+"%");return a}},totaluploadprogress:l,sending:l,sendingmultiple:l,success:function(e){return e.previewElement?e.previewElement.classList.add("dz-success"):void 0},successmultiple:l,canceled:function(e){return this.emit("error",e,"Upload canceled.")},canceledmultiple:l,complete:function(e){return e._removeLink?e._removeLink.textContent=this.options.dictRemoveFile:void 0},completemultiple:l,maxfilesexceeded:l,maxfilesreached:l,previewTemplate:'
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
'},n=function(){var e,t,n,r,i,o,a;for(r=arguments[0],n=arguments.length>=2?h.call(arguments,1):[],o=0,a=n.length;a>o;o++){t=n[o];for(e in t)i=t[e],r[e]=i}return r},t.prototype.getAcceptedFiles=function(){var e,t,n,r,i;for(r=this.files,i=[],t=0,n=r.length;n>t;t++)e=r[t],e.accepted&&i.push(e);return i},t.prototype.getRejectedFiles=function(){var e,t,n,r,i;for(r=this.files,i=[],t=0,n=r.length;n>t;t++)e=r[t],e.accepted||i.push(e);return i},t.prototype.getFilesWithStatus=function(e){var t,n,r,i,o;for(i=this.files,o=[],n=0,r=i.length;r>n;n++)t=i[n],t.status===e&&o.push(t);return o},t.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(t.QUEUED)},t.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(t.UPLOADING)},t.prototype.getActiveFiles=function(){var e,n,r,i,o;for(i=this.files,o=[],n=0,r=i.length;r>n;n++)e=i[n],(e.status===t.UPLOADING||e.status===t.QUEUED)&&o.push(e);return o},t.prototype.init=function(){var e,n,r,i,o,a,s;for("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&(r=function(e){return function(){return e.hiddenFileInput&&document.body.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null==e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!=e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",document.body.appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t,n,i,o;if(n=e.hiddenFileInput.files,n.length)for(i=0,o=n.length;o>i;i++)t=n[i],e.addFile(t);return r()})}}(this))(),this.URL=null!=(a=window.URL)?a:window.webkitURL,s=this.events,i=0,o=s.length;o>i;i++)e=s[i],this.on(e,this.options[e]);return this.on("uploadprogress",function(e){return function(){return e.updateTotalUploadProgress() }}(this)),this.on("removedfile",function(e){return function(){return e.updateTotalUploadProgress()}}(this)),this.on("canceled",function(e){return function(t){return e.emit("complete",t)}}(this)),this.on("complete",function(e){return function(){return 0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length?setTimeout(function(){return e.emit("queuecomplete")},0):void 0}}(this)),n=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1},this.listeners=[{element:this.element,events:{dragstart:function(e){return function(t){return e.emit("dragstart",t)}}(this),dragenter:function(e){return function(t){return n(t),e.emit("dragenter",t)}}(this),dragover:function(e){return function(t){var r;try{r=t.dataTransfer.effectAllowed}catch(i){}return t.dataTransfer.dropEffect="move"===r||"linkMove"===r?"move":"copy",n(t),e.emit("dragover",t)}}(this),dragleave:function(e){return function(t){return e.emit("dragleave",t)}}(this),drop:function(e){return function(t){return n(t),e.drop(t)}}(this),dragend:function(e){return function(t){return e.emit("dragend",t)}}(this)}}],this.clickableElements.forEach(function(e){return function(n){return e.listeners.push({element:n,events:{click:function(r){return n!==e.element||r.target===e.element||t.elementInside(r.target,e.element.querySelector(".dz-message"))?e.hiddenFileInput.click():void 0}}})}}(this)),this.enable(),this.options.init.call(this)},t.prototype.destroy=function(){var e;return this.disable(),this.removeAllFiles(!0),(null!=(e=this.hiddenFileInput)?e.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)},t.prototype.updateTotalUploadProgress=function(){var e,t,n,r,i,o,a,s;if(r=0,n=0,e=this.getActiveFiles(),e.length){for(s=this.getActiveFiles(),o=0,a=s.length;a>o;o++)t=s[o],r+=t.upload.bytesSent,n+=t.upload.total;i=100*r/n}else i=100;return this.emit("totaluploadprogress",i,n,r)},t.prototype._getParamName=function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):""+this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")},t.prototype.getFallbackForm=function(){var e,n,r,i;return(e=this.getExistingFallback())?e:(r='
',this.options.dictFallbackText&&(r+="

"+this.options.dictFallbackText+"

"),r+='
',n=t.createElement(r),"FORM"!==this.element.tagName?(i=t.createElement('
'),i.appendChild(n)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:n)},t.prototype.getExistingFallback=function(){var e,t,n,r,i,o;for(t=function(e){var t,n,r;for(n=0,r=e.length;r>n;n++)if(t=e[n],/(^| )fallback($| )/.test(t.className))return t},o=["div","form"],r=0,i=o.length;i>r;r++)if(n=o[r],e=t(this.element.getElementsByTagName(n)))return e},t.prototype.setupEventListeners=function(){var e,t,n,r,i,o,a;for(o=this.listeners,a=[],r=0,i=o.length;i>r;r++)e=o[r],a.push(function(){var r,i;r=e.events,i=[];for(t in r)n=r[t],i.push(e.element.addEventListener(t,n,!1));return i}());return a},t.prototype.removeEventListeners=function(){var e,t,n,r,i,o,a;for(o=this.listeners,a=[],r=0,i=o.length;i>r;r++)e=o[r],a.push(function(){var r,i;r=e.events,i=[];for(t in r)n=r[t],i.push(e.element.removeEventListener(t,n,!1));return i}());return a},t.prototype.disable=function(){var e,t,n,r,i;for(this.clickableElements.forEach(function(e){return e.classList.remove("dz-clickable")}),this.removeEventListeners(),r=this.files,i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(this.cancelUpload(e));return i},t.prototype.enable=function(){return this.clickableElements.forEach(function(e){return e.classList.add("dz-clickable")}),this.setupEventListeners()},t.prototype.filesize=function(e){var t;return e>=109951162777.6?(e/=109951162777.6,t="TiB"):e>=107374182.4?(e/=107374182.4,t="GiB"):e>=104857.6?(e/=104857.6,t="MiB"):e>=102.4?(e/=102.4,t="KiB"):(e=10*e,t="b"),""+Math.round(e)/10+" "+t},t.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},t.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,t.length&&(n=e.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},t.prototype.paste=function(e){var t,n;return null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0)?(this.emit("paste",e),t=e.clipboardData.items,t.length?this._addFilesFromItems(t):void 0):void 0},t.prototype.handleFiles=function(e){var t,n,r,i;for(i=[],n=0,r=e.length;r>n;n++)t=e[n],i.push(this.addFile(t));return i},t.prototype._addFilesFromItems=function(e){var t,n,r,i,o;for(o=[],r=0,i=e.length;i>r;r++)n=e[r],o.push(null!=n.webkitGetAsEntry&&(t=n.webkitGetAsEntry())?t.isFile?this.addFile(n.getAsFile()):t.isDirectory?this._addFilesFromDirectory(t,t.name):void 0:null!=n.getAsFile?null==n.kind||"file"===n.kind?this.addFile(n.getAsFile()):void 0:void 0);return o},t.prototype._addFilesFromDirectory=function(e,t){var n,r;return n=e.createReader(),r=function(e){return function(n){var r,i,o;for(i=0,o=n.length;o>i;i++)r=n[i],r.isFile?r.file(function(n){return e.options.ignoreHiddenFiles&&"."===n.name.substring(0,1)?void 0:(n.fullPath=""+t+"/"+n.name,e.addFile(n))}):r.isDirectory&&e._addFilesFromDirectory(r,""+t+"/"+r.name)}}(this),n.readEntries(r,function(e){return"undefined"!=typeof console&&null!==console&&"function"==typeof console.log?console.log(e):void 0})},t.prototype.accept=function(e,n){return e.size>1024*1024*this.options.maxFilesize?n(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(n(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,n):n(this.options.dictInvalidFileType)},t.prototype.addFile=function(e){return e.upload={progress:0,total:e.size,bytesSent:0},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return function(n){return n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}}(this))},t.prototype.enqueueFiles=function(e){var t,n,r;for(n=0,r=e.length;r>n;n++)t=e[n],this.enqueueFile(t);return null},t.prototype.enqueueFile=function(e){if(e.status!==t.ADDED||e.accepted!==!0)throw Error("This file can't be queued because it has already been processed or was rejected.");return e.status=t.QUEUED,this.options.autoProcessQueue?setTimeout(function(e){return function(){return e.processQueue()}}(this),0):void 0},t.prototype._thumbnailQueue=[],t.prototype._processingThumbnail=!1,t.prototype._enqueueThumbnail=function(e){return this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*1024*this.options.maxThumbnailFilesize?(this._thumbnailQueue.push(e),setTimeout(function(e){return function(){return e._processThumbnailQueue()}}(this),0)):void 0},t.prototype._processThumbnailQueue=function(){return this._processingThumbnail||0===this._thumbnailQueue.length?void 0:(this._processingThumbnail=!0,this.createThumbnail(this._thumbnailQueue.shift(),function(e){return function(){return e._processingThumbnail=!1,e._processThumbnailQueue()}}(this)))},t.prototype.removeFile=function(e){return e.status===t.UPLOADING&&this.cancelUpload(e),this.files=c(this.files,e),this.emit("removedfile",e),0===this.files.length?this.emit("reset"):void 0},t.prototype.removeAllFiles=function(e){var n,r,i,o;for(null==e&&(e=!1),o=this.files.slice(),r=0,i=o.length;i>r;r++)n=o[r],(n.status!==t.UPLOADING||e)&&this.removeFile(n);return null},t.prototype.createThumbnail=function(e,t){var n;return n=new FileReader,n.onload=function(r){return function(){var i;return i=document.createElement("img"),i.onload=function(){var n,o,a,l,c,u,d,h;return e.width=i.width,e.height=i.height,a=r.options.resize.call(r,e),null==a.trgWidth&&(a.trgWidth=a.optWidth),null==a.trgHeight&&(a.trgHeight=a.optHeight),n=document.createElement("canvas"),o=n.getContext("2d"),n.width=a.trgWidth,n.height=a.trgHeight,s(o,i,null!=(c=a.srcX)?c:0,null!=(u=a.srcY)?u:0,a.srcWidth,a.srcHeight,null!=(d=a.trgX)?d:0,null!=(h=a.trgY)?h:0,a.trgWidth,a.trgHeight),l=n.toDataURL("image/png"),r.emit("thumbnail",e,l),null!=t?t():void 0},i.src=n.result}}(this),n.readAsDataURL(e)},t.prototype.processQueue=function(){var e,t,n,r;if(t=this.options.parallelUploads,n=this.getUploadingFiles().length,e=n,!(n>=t)&&(r=this.getQueuedFiles(),r.length>0)){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,t-n));for(;t>e;){if(!r.length)return;this.processFile(r.shift()),e++}}},t.prototype.processFile=function(e){return this.processFiles([e])},t.prototype.processFiles=function(e){var n,r,i;for(r=0,i=e.length;i>r;r++)n=e[r],n.processing=!0,n.status=t.UPLOADING,this.emit("processing",n);return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)},t.prototype._getFilesWithXhr=function(e){var t,n;return n=function(){var n,r,i,o;for(i=this.files,o=[],n=0,r=i.length;r>n;n++)t=i[n],t.xhr===e&&o.push(t);return o}.call(this)},t.prototype.cancelUpload=function(e){var n,r,i,o,a,s,l;if(e.status===t.UPLOADING){for(r=this._getFilesWithXhr(e.xhr),i=0,a=r.length;a>i;i++)n=r[i],n.status=t.CANCELED;for(e.xhr.abort(),o=0,s=r.length;s>o;o++)n=r[o],this.emit("canceled",n);this.options.uploadMultiple&&this.emit("canceledmultiple",r)}else((l=e.status)===t.ADDED||l===t.QUEUED)&&(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));return this.options.autoProcessQueue?this.processQueue():void 0},t.prototype.uploadFile=function(e){return this.uploadFiles([e])},t.prototype.uploadFiles=function(e){var r,i,o,a,s,l,c,u,d,h,p,f,g,m,v,b,y,x,w,C,S,$,k,_,T,M,D,N,L,E,A,F;for(y=new XMLHttpRequest,x=0,$=e.length;$>x;x++)r=e[x],r.xhr=y;y.open(this.options.method,this.options.url,!0),y.withCredentials=!!this.options.withCredentials,m=null,o=function(t){return function(){var n,i,o;for(o=[],n=0,i=e.length;i>n;n++)r=e[n],o.push(t._errorProcessing(e,m||t.options.dictResponseError.replace("{{statusCode}}",y.status),y));return o}}(this),v=function(t){return function(n){var i,o,a,s,l,c,u,d,h;if(null!=n)for(o=100*n.loaded/n.total,a=0,c=e.length;c>a;a++)r=e[a],r.upload={progress:o,total:n.total,bytesSent:n.loaded};else{for(i=!0,o=100,s=0,u=e.length;u>s;s++)r=e[s],(100!==r.upload.progress||r.upload.bytesSent!==r.upload.total)&&(i=!1),r.upload.progress=o,r.upload.bytesSent=r.upload.total;if(i)return}for(h=[],l=0,d=e.length;d>l;l++)r=e[l],h.push(t.emit("uploadprogress",r,o,r.upload.bytesSent));return h}}(this),y.onload=function(n){return function(r){var i;if(e[0].status!==t.CANCELED&&4===y.readyState){if(m=y.responseText,y.getResponseHeader("content-type")&&~y.getResponseHeader("content-type").indexOf("application/json"))try{m=JSON.parse(m)}catch(a){r=a,m="Invalid JSON response from server."}return v(),(i=y.status)>=200&&300>i?n._finished(e,m,r):o()}}}(this),y.onerror=function(){return function(){return e[0].status!==t.CANCELED?o():void 0}}(this),g=null!=(D=y.upload)?D:y,g.onprogress=v,l={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&n(l,this.options.headers);for(a in l)s=l[a],y.setRequestHeader(a,s);if(i=new FormData,this.options.params){N=this.options.params;for(p in N)b=N[p],i.append(p,b)}for(w=0,k=e.length;k>w;w++)r=e[w],this.emit("sending",r,y,i);if(this.options.uploadMultiple&&this.emit("sendingmultiple",e,y,i),"FORM"===this.element.tagName)for(L=this.element.querySelectorAll("input, textarea, select, button"),C=0,_=L.length;_>C;C++)if(u=L[C],d=u.getAttribute("name"),h=u.getAttribute("type"),"SELECT"===u.tagName&&u.hasAttribute("multiple"))for(E=u.options,S=0,T=E.length;T>S;S++)f=E[S],f.selected&&i.append(d,f.value);else(!h||"checkbox"!==(A=h.toLowerCase())&&"radio"!==A||u.checked)&&i.append(d,u.value);for(c=M=0,F=e.length-1;F>=0?F>=M:M>=F;c=F>=0?++M:--M)i.append(this._getParamName(c),e[c],e[c].name);return y.send(i)},t.prototype._finished=function(e,n,r){var i,o,a;for(o=0,a=e.length;a>o;o++)i=e[o],i.status=t.SUCCESS,this.emit("success",i,n,r),this.emit("complete",i);return this.options.uploadMultiple&&(this.emit("successmultiple",e,n,r),this.emit("completemultiple",e)),this.options.autoProcessQueue?this.processQueue():void 0},t.prototype._errorProcessing=function(e,n,r){var i,o,a;for(o=0,a=e.length;a>o;o++)i=e[o],i.status=t.ERROR,this.emit("error",i,n,r),this.emit("complete",i);return this.options.uploadMultiple&&(this.emit("errormultiple",e,n,r),this.emit("completemultiple",e)),this.options.autoProcessQueue?this.processQueue():void 0},t}(r),t.version="3.10.2",t.options={},t.optionsForElement=function(e){return e.getAttribute("id")?t.options[i(e.getAttribute("id"))]:void 0},t.instances=[],t.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},t.autoDiscover=!0,t.discover=function(){var e,n,r,i,o,a;for(document.querySelectorAll?r=document.querySelectorAll(".dropzone"):(r=[],e=function(e){var t,n,i,o;for(o=[],n=0,i=e.length;i>n;n++)t=e[n],o.push(/(^| )dropzone($| )/.test(t.className)?r.push(t):void 0);return o},e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))),a=[],i=0,o=r.length;o>i;i++)n=r[i],a.push(t.optionsForElement(n)!==!1?new t(n):void 0);return a},t.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i],t.isBrowserSupported=function(){var e,n,r,i,o;if(e=!0,window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(o=t.blacklistedBrowsers,r=0,i=o.length;i>r;r++)n=o[r],n.test(navigator.userAgent)&&(e=!1);else e=!1;else e=!1;return e},c=function(e,t){var n,r,i,o;for(o=[],r=0,i=e.length;i>r;r++)n=e[r],n!==t&&o.push(n);return o},i=function(e){return e.replace(/[\-_](\w)/g,function(e){return e.charAt(1).toUpperCase()})},t.createElement=function(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.childNodes[0]},t.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},t.getElement=function(e,t){var n;if("string"==typeof e?n=document.querySelector(e):null!=e.nodeType&&(n=e),null==n)throw Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return n},t.getElements=function(e,t){var n,r,i,o,a,s,l,c;if(e instanceof Array){i=[];try{for(o=0,s=e.length;s>o;o++)r=e[o],i.push(this.getElement(r,t))}catch(u){n=u,i=null}}else if("string"==typeof e)for(i=[],c=document.querySelectorAll(e),a=0,l=c.length;l>a;a++)r=c[a],i.push(r);else null!=e.nodeType&&(i=[e]);if(null==i||!i.length)throw Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return i},t.confirm=function(e,t,n){return window.confirm(e)?t():null!=n?n():void 0},t.isValidFile=function(e,t){var n,r,i,o,a;if(!t)return!0;for(t=t.split(","),r=e.type,n=r.replace(/\/.*$/,""),o=0,a=t.length;a>o;o++)if(i=t[o],i=i.trim(),"."===i.charAt(0)){if(-1!==e.name.toLowerCase().indexOf(i.toLowerCase(),e.name.length-i.length))return!0}else if(/\/\*$/.test(i)){if(n===i.replace(/\/.*$/,""))return!0}else if(r===i)return!0;return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each(function(){return new t(this,e)})}),n!==void 0&&null!==n?n.exports=t:window.Dropzone=t,t.ADDED="added",t.QUEUED="queued",t.ACCEPTED=t.QUEUED,t.UPLOADING="uploading",t.PROCESSING=t.UPLOADING,t.CANCELED="canceled",t.ERROR="error",t.SUCCESS="success",a=function(e){var t,n,r,i,o,a,s,l,c,u;for(s=e.naturalWidth,a=e.naturalHeight,n=document.createElement("canvas"),n.width=1,n.height=a,r=n.getContext("2d"),r.drawImage(e,0,0),i=r.getImageData(0,0,1,a).data,u=0,o=a,l=a;l>u;)t=i[4*(l-1)+3],0===t?o=l:u=l,l=o+u>>1;return c=l/a,0===c?1:c},s=function(e,t,n,r,i,o,s,l,c,u){var d;return d=a(t),e.drawImage(t,n,r,i,o,s,l,c,u/d)},o=function(e,t){var n,r,i,o,a,s,l,c,u;if(i=!1,u=!0,r=e.document,c=r.documentElement,n=r.addEventListener?"addEventListener":"attachEvent",l=r.addEventListener?"removeEventListener":"detachEvent",s=r.addEventListener?"":"on",o=function(n){return"readystatechange"!==n.type||"complete"===r.readyState?(("load"===n.type?e:r)[l](s+n.type,o,!1),!i&&(i=!0)?t.call(e,n.type||n):void 0):void 0},a=function(){var e;try{c.doScroll("left")}catch(t){return e=t,void setTimeout(a,50)}return o("poll")},"complete"!==r.readyState){if(r.createEventObject&&c.doScroll){try{u=!e.frameElement}catch(d){}u&&a()}return r[n](s+"DOMContentLoaded",o,!1),r[n](s+"readystatechange",o,!1),e[n](s+"load",o,!1)}},t._autoDiscoverFunction=function(){return t.autoDiscover?t.discover():void 0},o(window,t._autoDiscoverFunction)}).call(this)}),"object"==typeof exports?module.exports=e("dropzone"):"function"==typeof define&&define.amd?define([],function(){return e("dropzone")}):this.Dropzone=e("dropzone")}(),function(e){var t=[],n=[];e.fn.doAutosize=function(t){var n=e(this).data("minwidth"),r=e(this).data("maxwidth"),i="",o=e(this),a=e("#"+e(this).data("tester_id"));if(i!==(i=o.val())){var s=i.replace(/&/g,"&").replace(/\s/g," ").replace(//g,">");a.html(s);var l=a.width(),c=l+t.comfortZone>=n?l+t.comfortZone:n,u=o.width(),d=u>c&&c>=n||c>n&&r>c;d&&o.width(c)}},e.fn.resetAutosize=function(t){var n=e(this).data("minwidth")||t.minInputWidth||e(this).width(),r=e(this).data("maxwidth")||t.maxInputWidth||e(this).closest(".tagsinput").width()-t.inputPadding,i=e(this),o=e("").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:i.css("fontSize"),fontFamily:i.css("fontFamily"),fontWeight:i.css("fontWeight"),letterSpacing:i.css("letterSpacing"),whiteSpace:"nowrap"}),a=e(this).attr("id")+"_autosize_tester";!e("#"+a).length>0&&(o.attr("id",a),o.appendTo("body")),i.data("minwidth",n),i.data("maxwidth",r),i.data("tester_id",a),i.css("width",n)},e.fn.addTag=function(r,i){return i=jQuery.extend({focus:!1,callback:!0},i),this.each(function(){var o=e(this).attr("id"),a=e(this).val().split(t[o]);if(""==a[0]&&(a=[]),r=jQuery.trim(r),i.unique){var s=e(a).tagExist(r);1==s&&e("#"+o+"_tag").addClass("not_valid")}else var s=!1;if(""!=r&&1!=s){if(e("").addClass("tag").append(e("").text(r).append("  "),e("",{href:"#",title:"Removing tag",text:"x"}).click(function(){return e("#"+o).removeTag(escape(r))})).insertBefore("#"+o+"_addTag"),a.push(r),e("#"+o+"_tag").val(""),i.focus?e("#"+o+"_tag").focus():e("#"+o+"_tag").blur(),e.fn.tagsInput.updateTagsField(this,a),i.callback&&n[o]&&n[o].onAddTag){var l=n[o].onAddTag;l.call(this,r)}if(n[o]&&n[o].onChange){var c=a.length,l=n[o].onChange;l.call(this,e(this),a[c-1])}}}),!1},e.fn.removeTag=function(r){return r=unescape(r),this.each(function(){var o=e(this).attr("id"),a=e(this).val().split(t[o]);for(e("#"+o+"_tagsinput .tag").remove(),str="",i=0;a.length>i;i++)a[i]!=r&&(str=str+t[o]+a[i]);if(e.fn.tagsInput.importTags(this,str),n[o]&&n[o].onRemoveTag){var s=n[o].onRemoveTag;s.call(this,r)}}),!1},e.fn.tagExist=function(t){return jQuery.inArray(t,e(this))>=0},e.fn.importTags=function(t){id=e(this).attr("id"),e("#"+id+"_tagsinput .tag").remove(),e.fn.tagsInput.importTags(this,t)},e.fn.tagsInput=function(r){var i=jQuery.extend({interactive:!0,defaultText:"add a tag",minChars:0,width:"300px",height:"100px",autocomplete:{selectFirst:!1},hide:!0,delimiter:",",unique:!0,removeWithBackspace:!0,placeholderColor:"#666666",autosize:!0,comfortZone:20,inputPadding:12},r);return this.each(function(){i.hide&&e(this).hide();var r=e(this).attr("id"),o=jQuery.extend({pid:r,real_input:"#"+r,holder:"#"+r+"_tagsinput",input_wrapper:"#"+r+"_addTag",fake_input:"#"+r+"_tag"},i);t[r]=o.delimiter,(i.onAddTag||i.onRemoveTag||i.onChange)&&(n[r]=[],n[r].onAddTag=i.onAddTag,n[r].onRemoveTag=i.onRemoveTag,n[r].onChange=i.onChange);var a='
';if(i.interactive&&(a=a+''),a+='
',e(a).insertAfter(this),e(o.holder).css("width",i.width),e(o.holder).css("height",i.height),""!=e(o.real_input).val()&&e.fn.tagsInput.importTags(e(o.real_input),e(o.real_input).val()),i.interactive){if(e(o.fake_input).val(e(o.fake_input).attr("data-default")),e(o.fake_input).css("color",i.placeholderColor),e(o.fake_input).resetAutosize(i),e(o.holder).bind("click",o,function(t){e(t.data.fake_input).focus()}),e(o.fake_input).bind("focus",o,function(t){e(t.data.fake_input).val()==e(t.data.fake_input).attr("data-default")&&e(t.data.fake_input).val(""),e(t.data.fake_input).css("color","#000000")}),void 0!=i.autocomplete_url){autocomplete_options={source:i.autocomplete_url};for(attrname in i.autocomplete)autocomplete_options[attrname]=i.autocomplete[attrname];void 0!==jQuery.Autocompleter?(e(o.fake_input).autocomplete(i.autocomplete_url,i.autocomplete),e(o.fake_input).bind("result",o,function(t,n){n&&e("#"+r).addTag(n[0]+"",{focus:!0,unique:i.unique})})):void 0!==jQuery.ui.autocomplete&&(e(o.fake_input).autocomplete(autocomplete_options),e(o.fake_input).bind("autocompleteselect",o,function(t,n){return e(t.data.real_input).addTag(n.item.value,{focus:!0,unique:i.unique}),!1}))}else e(o.fake_input).bind("blur",o,function(t){var n=e(this).attr("data-default");return""!=e(t.data.fake_input).val()&&e(t.data.fake_input).val()!=n?t.data.minChars<=e(t.data.fake_input).val().length&&(!t.data.maxChars||t.data.maxChars>=e(t.data.fake_input).val().length)&&e(t.data.real_input).addTag(e(t.data.fake_input).val(),{focus:!0,unique:i.unique}):(e(t.data.fake_input).val(e(t.data.fake_input).attr("data-default")),e(t.data.fake_input).css("color",i.placeholderColor)),!1});e(o.fake_input).bind("keypress",o,function(t){return t.which==t.data.delimiter.charCodeAt(0)||13==t.which?(t.preventDefault(),t.data.minChars<=e(t.data.fake_input).val().length&&(!t.data.maxChars||t.data.maxChars>=e(t.data.fake_input).val().length)&&e(t.data.real_input).addTag(e(t.data.fake_input).val(),{focus:!0,unique:i.unique}),e(t.data.fake_input).resetAutosize(i),!1):(t.data.autosize&&e(t.data.fake_input).doAutosize(i),void 0)}),o.removeWithBackspace&&e(o.fake_input).bind("keydown",function(t){if(8==t.keyCode&&""==e(this).val()){t.preventDefault();var n=e(this).closest(".tagsinput").find(".tag:last").text(),r=e(this).attr("id").replace(/_tag$/,"");n=n.replace(/[\s]+x$/,""),e("#"+r).removeTag(escape(n)),e(this).trigger("focus")}}),e(o.fake_input).blur(),o.unique&&e(o.fake_input).keydown(function(t){(8==t.keyCode||String.fromCharCode(t.which).match(/\w+|[áéíóúÁÉÍÓÚñÑ,/]+/))&&e(this).removeClass("not_valid")})}return!1}),this},e.fn.tagsInput.updateTagsField=function(n,r){var i=e(n).attr("id");e(n).val(r.join(t[i]))},e.fn.tagsInput.importTags=function(r,o){e(r).val("");var a=e(r).attr("id"),s=o.split(t[a]);for(i=0;s.length>i;i++)e(r).addTag(s[i],{focus:!1,callback:!1});if(n[a]&&n[a].onChange){var l=n[a].onChange;l.call(r,r,s[i])}}}(jQuery),function(e){"use strict";var t={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeek:["ن","ث","ع","خ","ج","س","ح"]},ro:{months:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],dayOfWeek:["l","ma","mi","j","v","s","d"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeek:["Sen","Sel","Rab","Kam","Jum","Sab","Min"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeek:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeek:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeek:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeek:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeek:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeek:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeek:["Va","Hé","Ke","Sze","Cs","Pé","Szo"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],yearOffset:0,beforeShowDay:null};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,r;for(n=t||0,r=this.length;r>n;n+=1)if(this[n]===e)return n;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},e.fn.xdsoftScroller=function(t){return this.each(function(){var n,r,i,o,a,s=e(this),l=function(e){var t,n={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],n.x=t.pageX,n.y=t.pageY):("mousedown"===e.type||"mouseup"===e.type||"mousemove"===e.type||"mouseover"===e.type||"mouseout"===e.type||"mouseenter"===e.type||"mouseleave"===e.type)&&(n.x=e.pageX,n.y=e.pageY),n},c=0,u=100,d=!1;e(this).hasClass("xdsoft_scroller_box")||(n=s.children().eq(0),r=s[0].clientHeight,i=n[0].offsetHeight,o=e('
'),a=e('
'),o.append(a),s.addClass("xdsoft_scroller_box").append(o),a.on("mousedown.xdsoft_scroller",function(n){r||s.trigger("resize_scroll.xdsoft_scroller",[t]);var i=n.pageY,l=parseInt(a.css("margin-top"),10),d=o[0].offsetHeight;document&&e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function h(){e([document.body,window]).off("mouseup.xdsoft_scroller",h).off("mousemove.xdsoft_scroller",c).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",c=function(e){var t=e.pageY-i+l;0>t&&(t=0),t+a[0].offsetHeight>d&&(t=d-a[0].offsetHeight),s.trigger("scroll_element.xdsoft_scroller",[u?t/u:0])})}),s.on("scroll_element.xdsoft_scroller",function(e,t){r||s.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:0>t||isNaN(t)?0:t,a.css("margin-top",u*t),setTimeout(function(){n.css("marginTop",-parseInt((n[0].offsetHeight-r)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,l){var c,d;r=s[0].clientHeight,i=n[0].offsetHeight,c=r/i,d=c*o[0].offsetHeight,c>1?a.hide():(a.show(),a.css("height",parseInt(d>10?d:10,10)),u=o[0].offsetHeight-a[0].offsetHeight,l!==!0&&s.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(n.css("marginTop"),10))/(i-r)])) }),s.mousewheel&&s.mousewheel(function(e,t){var o=Math.abs(parseInt(n.css("marginTop"),10));return s.trigger("scroll_element.xdsoft_scroller",[(o-20*t)/(i-r)]),e.stopPropagation(),!1}),s.on("touchstart",function(e){d=l(e)}),s.on("touchmove",function(e){if(d){var t=l(e),o=Math.abs(parseInt(n.css("marginTop"),10));s.trigger("scroll_element.xdsoft_scroller",[(o-(t.y-d.y))/(i-r)]),e.stopPropagation(),e.preventDefault(),d=l(e)}}),s.on("touchend touchcancel",function(){d=!1})),s.trigger("resize_scroll.xdsoft_scroller",[t])})},e.fn.datetimepicker=function(n){var r,i,o,a=48,s=57,l=96,c=105,u=17,d=46,h=13,p=27,f=8,g=37,m=38,v=39,b=40,y=9,x=116,w=65,C=67,S=86,$=90,k=89,_=!1,T=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend(!0,{},t),M=0,D=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||r(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})};return r=function(t){function r(){var e,n=!1;return T.startDate?n=o.strToDate(T.startDate):(n=T.value||(t&&t.val&&t.val()?t.val():""),n?n=o.strToDateTime(n):T.defaultDate&&(n=o.strToDate(T.defaultDate),T.defaultTime&&(e=o.strtotime(T.defaultTime),n.setHours(e.getHours()),n.setMinutes(e.getMinutes())))),n&&o.isValidDate(n)?A.data("changed",!0):n="",n||0}var i,M,D,N,L,E,A=e("
'),F=e('
'),O=e('
'),z=e('
'),I=e('
'),H=e('
'),R=H.find(".xdsoft_time_box").eq(0),j=e('
'),P=e('
'),W=(e('
'),e('
')),B=e('
'),q=!1,U=0,Y=0;z.find(".xdsoft_month span").after(W),z.find(".xdsoft_year span").after(B),z.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){var n,r,i=e(this).find(".xdsoft_select").eq(0),a=0,s=0,l=i.is(":visible");for(z.find(".xdsoft_select").hide(),o.currentTime&&(a=o.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),i[l?"hide":"show"](),n=i.find("div.xdsoft_option"),r=0;n.length>r&&n.eq(r).data("value")!==a;r+=1)s+=n[0].offsetHeight;return i.xdsoftScroller(s/(i.children()[0].offsetHeight-i[0].clientHeight)),t.stopPropagation(),!1}),z.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(){var t=o.currentTime.getFullYear();o&&o.currentTime&&o.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),A.trigger("xchange.xdsoft"),T.onChangeMonth&&e.isFunction(T.onChangeMonth)&&T.onChangeMonth.call(A,o.currentTime,A.data("input")),t!==o.currentTime.getFullYear()&&e.isFunction(T.onChangeYear)&&T.onChangeYear.call(A,o.currentTime,A.data("input"))}),A.setOptions=function(n){if(T=e.extend(!0,{},T,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(T.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(T.weekends=e.extend(!0,[],n.weekends)),!T.open&&!T.opened||T.inline||t.trigger("open.xdsoft"),T.inline&&(q=!0,A.addClass("xdsoft_inline"),t.after(A).hide()),T.inverseButton&&(T.next="xdsoft_prev",T.prev="xdsoft_next"),T.datepicker?O.addClass("active"):O.removeClass("active"),T.timepicker?H.addClass("active"):H.removeClass("active"),T.value&&(t&&t.val&&t.val(T.value),o.setCurrentTime(T.value)),T.dayOfWeekStart=isNaN(T.dayOfWeekStart)?0:parseInt(T.dayOfWeekStart,10)%7,T.timepickerScrollbar||P.hide(),T.minDate&&/^-(.*)$/.test(T.minDate)&&(T.minDate=o.strToDateTime(T.minDate).dateFormat(T.formatDate)),T.maxDate&&/^\+(.*)$/.test(T.maxDate)&&(T.maxDate=o.strToDateTime(T.maxDate).dateFormat(T.formatDate)),z.find(".xdsoft_today_button").css("visibility",T.todayButton?"visible":"hidden"),T.mask){var r=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},i=function(e,t){if(e="string"==typeof e||e instanceof String?document.getElementById(e):e,!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select(),!0}return e.setSelectionRange?(e.setSelectionRange(t,t),!0):!1},M=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(n).test(t)};t.off("keydown.xdsoft"),T.mask===!0&&(T.mask=T.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===e.type(T.mask)&&(M(T.mask,t.val())||t.val(T.mask.replace(/[0-9]/g,"_")),t.on("keydown.xdsoft",function(n){var o,D,N=this.value,L=n.which;if(L>=a&&s>=L||L>=l&&c>=L||L===f||L===d){for(o=r(this),D=L!==f&&L!==d?String.fromCharCode(L>=l&&c>=L?L-a:L):"_",L!==f&&L!==d||!o||(o-=1,D="_");/[^0-9_]/.test(T.mask.substr(o,1))&&T.mask.length>o&&o>0;)o+=L===f||L===d?-1:1;if(N=N.substr(0,o)+D+N.substr(o+1),""===e.trim(N))N=T.mask.replace(/[0-9]/g,"_");else if(o===T.mask.length)return n.preventDefault(),!1;for(o+=L===f||L===d?0:1;/[^0-9_]/.test(T.mask.substr(o,1))&&T.mask.length>o&&o>0;)o+=L===f||L===d?-1:1;M(T.mask,N)?(this.value=N,i(this,o)):""===e.trim(N)?this.value=T.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft")}else if(-1!==[w,C,S,$,k].indexOf(L)&&_||-1!==[p,m,b,g,v,x,u,y,h].indexOf(L))return!0;return n.preventDefault(),!1}))}T.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){T.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),A.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),T.format)?A.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(o.now().dateFormat(T.format)),A.data("xdsoft_datetime").setCurrentTime(e(this).val())),A.trigger("changedatetime.xdsoft")}),T.dayOfWeekStartPrev=0===T.dayOfWeekStart?6:T.dayOfWeekStart-1,A.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},A.data("options",T).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),B.hide(),W.hide(),!1}),M=H.find(".xdsoft_time_box"),M.append(j),M.xdsoftScroller(),A.on("afterOpen.xdsoft",function(){M.xdsoftScroller()}),A.append(O).append(H),T.withoutCopyright!==!0&&A.append(F),O.append(z).append(I),e(T.parentID).append(A),i=function(){var t=this;t.now=function(e){var n,r,i=new Date;return!e&&T.defaultDate&&(n=t.strToDate(T.defaultDate),i.setFullYear(n.getFullYear()),i.setMonth(n.getMonth()),i.setDate(n.getDate())),T.yearOffset&&i.setFullYear(i.getFullYear()+T.yearOffset),!e&&T.defaultTime&&(r=t.strtotime(T.defaultTime),i.setHours(r.getHours()),i.setMinutes(r.getMinutes())),i},t.isValidDate=function(e){return"[object Date]"!==Object.prototype.toString.call(e)?!1:!isNaN(e.getTime())},t.setCurrentTime=function(e){t.currentTime="string"==typeof e?t.strToDateTime(e):t.isValidDate(e)?e:t.now(),A.trigger("xchange.xdsoft")},t.empty=function(){t.currentTime=null},t.getCurrentTime=function(){return t.currentTime},t.nextMonth=function(){var n,r=t.currentTime.getMonth()+1;return 12===r&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),r=0),n=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),r+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(r),T.onChangeMonth&&e.isFunction(T.onChangeMonth)&&T.onChangeMonth.call(A,o.currentTime,A.data("input")),n!==t.currentTime.getFullYear()&&e.isFunction(T.onChangeYear)&&T.onChangeYear.call(A,o.currentTime,A.data("input")),A.trigger("xchange.xdsoft"),r},t.prevMonth=function(){var n=t.currentTime.getMonth()-1;return-1===n&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),n=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),n+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(n),T.onChangeMonth&&e.isFunction(T.onChangeMonth)&&T.onChangeMonth.call(A,o.currentTime,A.data("input")),A.trigger("xchange.xdsoft"),n},t.getWeekOfYear=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},t.strToDateTime=function(e){var n,r,i=[];return e&&e instanceof Date&&t.isValidDate(e)?e:(i=/^(\+|\-)(.*)$/.exec(e),i&&(i[2]=Date.parseDate(i[2],T.formatDate)),i&&i[2]?(n=i[2].getTime()-6e4*i[2].getTimezoneOffset(),r=new Date(o.now().getTime()+parseInt(i[1]+"1",10)*n)):r=e?Date.parseDate(e,T.format):t.now(),t.isValidDate(r)||(r=t.now()),r)},t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var n=e?Date.parseDate(e,T.formatDate):t.now(!0);return t.isValidDate(n)||(n=t.now(!0)),n},t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var n=e?Date.parseDate(e,T.formatTime):t.now(!0);return t.isValidDate(n)||(n=t.now(!0)),n},t.str=function(){return t.currentTime.dateFormat(T.format)},t.currentTime=this.now()},o=new i,z.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){A.data("changed",!0),o.setCurrentTime(0),A.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(o.str()),A.trigger("close.xdsoft")}),z.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,r=!1;(function i(e){o.currentTime.getMonth(),t.hasClass(T.next)?o.nextMonth():t.hasClass(T.prev)&&o.prevMonth(),T.monthChangeSpinner&&(r||(n=setTimeout(i,e||100)))})(500),e([document.body,window]).on("mouseup.xdsoft",function a(){clearTimeout(n),r=!0,e([document.body,window]).off("mouseup.xdsoft",a)})}),H.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,r=!1,i=110;(function o(e){var a=R[0].clientHeight,s=j[0].offsetHeight,l=Math.abs(parseInt(j.css("marginTop"),10));t.hasClass(T.next)&&s-a-T.timeHeightInTimePicker>=l?j.css("marginTop","-"+(l+T.timeHeightInTimePicker)+"px"):t.hasClass(T.prev)&&l-T.timeHeightInTimePicker>=0&&j.css("marginTop","-"+(l-T.timeHeightInTimePicker)+"px"),R.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(j.css("marginTop"),10)/(s-a))]),i=i>10?10:i-10,r||(n=setTimeout(o,e||i))})(500),e([document.body,window]).on("mouseup.xdsoft",function a(){clearTimeout(n),r=!0,e([document.body,window]).off("mouseup.xdsoft",a)})}),D=0,A.on("xchange.xdsoft",function(t){clearTimeout(D),D=setTimeout(function(){for(var t,r,i,a,s,l,c,u="",d=new Date(o.currentTime.getFullYear(),o.currentTime.getMonth(),1,12,0,0),h=0,p=o.now(),f=!1,g=!1,m=[],v=!0,b="",y="";d.getDay()!==T.dayOfWeekStart;)d.setDate(d.getDate()-1);for(u+="",T.weeks&&(u+=""),t=0;7>t;t+=1)u+="";for(u+="",u+="",T.maxDate!==!1&&(f=o.strToDate(T.maxDate),f=new Date(f.getFullYear(),f.getMonth(),f.getDate(),23,59,59,999)),T.minDate!==!1&&(g=o.strToDate(T.minDate),g=new Date(g.getFullYear(),g.getMonth(),g.getDate()));o.currentTime.countDaysInMonth()>h||d.getDay()!==T.dayOfWeekStart||o.currentTime.getMonth()===d.getMonth();)m=[],h+=1,r=d.getDate(),i=d.getFullYear(),a=d.getMonth(),s=o.getWeekOfYear(d),m.push("xdsoft_date"),l=T.beforeShowDay&&e.isFunction(T.beforeShowDay.call)?T.beforeShowDay.call(A,d):null,(f!==!1&&d>f||g!==!1&&g>d||l&&l[0]===!1)&&m.push("xdsoft_disabled"),l&&""!==l[1]&&m.push(l[1]),o.currentTime.getMonth()!==a&&m.push("xdsoft_other_month"),(T.defaultSelect||A.data("changed"))&&o.currentTime.dateFormat(T.formatDate)===d.dateFormat(T.formatDate)&&m.push("xdsoft_current"),p.dateFormat(T.formatDate)===d.dateFormat(T.formatDate)&&m.push("xdsoft_today"),(0===d.getDay()||6===d.getDay()||-1===T.weekends.indexOf(d.dateFormat(T.formatDate)))&&m.push("xdsoft_weekend"),T.beforeShowDay&&e.isFunction(T.beforeShowDay)&&m.push(T.beforeShowDay(d)),v&&(u+="",v=!1,T.weeks&&(u+="")),u+='",d.getDay()===T.dayOfWeekStartPrev&&(u+="",v=!0),d.setDate(r+1);if(u+="
"+T.i18n[T.lang].dayOfWeek[(t+T.dayOfWeekStart)%7]+"
"+s+"'+"
"+r+"
"+"
",I.html(u),z.find(".xdsoft_label span").eq(0).text(T.i18n[T.lang].months[o.currentTime.getMonth()]),z.find(".xdsoft_label span").eq(1).text(o.currentTime.getFullYear()),b="",y="",a="",c=function c(e,t){var n=o.now();n.setHours(e),e=parseInt(n.getHours(),10),n.setMinutes(t),t=parseInt(n.getMinutes(),10),m=[],(T.maxTime!==!1&&o.strtotime(T.maxTime).getTime()n.getTime())&&m.push("xdsoft_disabled"),(T.initTime||T.defaultSelect||A.data("changed"))&&parseInt(o.currentTime.getHours(),10)===parseInt(e,10)&&(T.step>59||Math[T.roundTime](o.currentTime.getMinutes()/T.step)*T.step===parseInt(t,10))&&(T.defaultSelect||A.data("changed")?m.push("xdsoft_current"):T.initTime&&m.push("xdsoft_init_time")),parseInt(p.getHours(),10)===parseInt(e,10)&&parseInt(p.getMinutes(),10)===parseInt(t,10)&&m.push("xdsoft_today"),b+='
'+n.dateFormat(T.formatTime)+"
"},T.allowTimes&&e.isArray(T.allowTimes)&&T.allowTimes.length)for(h=0;T.allowTimes.length>h;h+=1)y=o.strtotime(T.allowTimes[h]).getHours(),a=o.strtotime(T.allowTimes[h]).getMinutes(),c(y,a);else for(h=0,t=0;(T.hours12?12:24)>h;h+=1)for(t=0;60>t;t+=T.step)y=(10>h?"0":"")+h,a=(10>t?"0":"")+t,c(y,a);for(j.html(b),n="",h=0,h=parseInt(T.yearStart,10)+T.yearOffset;parseInt(T.yearEnd,10)+T.yearOffset>=h;h+=1)n+='
'+h+"
";for(B.children().eq(0).html(n),h=0,n="";11>=h;h+=1)n+='
'+T.i18n[T.lang].months[h]+"
";W.children().eq(0).html(n),e(A).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(T.timepicker){var e,t,n,r;j.find(".xdsoft_current").length?e=".xdsoft_current":j.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=R[0].clientHeight,n=j[0].offsetHeight,r=j.find(e).index()*T.timeHeightInTimePicker+1,r>n-t&&(r=n-t),R.trigger("scroll_element.xdsoft_scroller",[parseInt(r,10)/(n-t)])):R.trigger("scroll_element.xdsoft_scroller",[0])}}),N=0,I.on("click.xdsoft","td",function(n){n.stopPropagation(),N+=1;var r=e(this),i=o.currentTime;return(void 0===i||null===i)&&(o.currentTime=o.now(),i=o.currentTime),r.hasClass("xdsoft_disabled")?!1:(i.setDate(1),i.setFullYear(r.data("year")),i.setMonth(r.data("month")),i.setDate(r.data("date")),A.trigger("select.xdsoft",[i]),t.val(o.str()),(N>1||T.closeOnDateSelect===!0||0===T.closeOnDateSelect&&!T.timepicker)&&!T.inline&&A.trigger("close.xdsoft"),T.onSelectDate&&e.isFunction(T.onSelectDate)&&T.onSelectDate.call(A,o.currentTime,A.data("input")),A.data("changed",!0),A.trigger("xchange.xdsoft"),A.trigger("changedatetime.xdsoft"),setTimeout(function(){N=0},200),void 0)}),j.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),r=o.currentTime;return(void 0===r||null===r)&&(o.currentTime=o.now(),r=o.currentTime),n.hasClass("xdsoft_disabled")?!1:(r.setHours(n.data("hour")),r.setMinutes(n.data("minute")),A.trigger("select.xdsoft",[r]),A.data("input").val(o.str()),T.inline||A.trigger("close.xdsoft"),T.onSelectTime&&e.isFunction(T.onSelectTime)&&T.onSelectTime.call(A,o.currentTime,A.data("input")),A.data("changed",!0),A.trigger("xchange.xdsoft"),A.trigger("changedatetime.xdsoft"),void 0)}),A.mousewheel&&(O.mousewheel(function(e,t){return T.scrollMonth?(0>t?o.nextMonth():o.prevMonth(),!1):!0}),R.unmousewheel().mousewheel(function(e,t){if(!T.scrollTime)return!0;var n=R[0].clientHeight,r=j[0].offsetHeight,i=Math.abs(parseInt(j.css("marginTop"),10)),o=!0;return 0>t&&r-n-T.timeHeightInTimePicker>=i?(j.css("marginTop","-"+(i+T.timeHeightInTimePicker)+"px"),o=!1):t>0&&i-T.timeHeightInTimePicker>=0&&(j.css("marginTop","-"+(i-T.timeHeightInTimePicker)+"px"),o=!1),R.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(j.css("marginTop"),10)/(r-n))]),e.stopPropagation(),o}),t.mousewheel(function(e,n,r,i){return T.scrollInput?!T.datepicker&&T.timepicker?(L=j.find(".xdsoft_current").length?j.find(".xdsoft_current").eq(0).index():0,L+n>=0&&j.children().length>L+n&&(L+=n),j.children().eq(L).length&&j.children().eq(L).trigger("mousedown"),!1):T.datepicker&&!T.timepicker?(O.trigger(e,[n,r,i]),t.val&&t.val(o.str()),A.trigger("changedatetime.xdsoft"),!1):void 0:!0})),A.on("changedatetime.xdsoft",function(){if(T.onChangeDateTime&&e.isFunction(T.onChangeDateTime)){var t=A.data("input");T.onChangeDateTime.call(A,o.currentTime,t),delete T.value,t.trigger("change")}}).on("generate.xdsoft",function(){T.onGenerate&&e.isFunction(T.onGenerate)&&T.onGenerate.call(A,o.currentTime,A.data("input")),q&&(A.trigger("afterOpen.xdsoft"),q=!1)}).on("click.xdsoft",function(e){e.stopPropagation()}),L=0,E=function(){var t=A.data("input").offset(),n=t.top+A.data("input")[0].offsetHeight-1,r=t.left,i="absolute";T.fixed?(n-=e(window).scrollTop(),r-=e(window).scrollLeft(),i="fixed"):(n+A[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-A[0].offsetHeight+1),0>n&&(n=0),r+A[0].offsetWidth>e(window).width()&&(r=e(window).width()-A[0].offsetWidth)),A.css({left:r,top:n,position:i})},A.on("open.xdsoft",function(){var t=!0;T.onShow&&e.isFunction(T.onShow)&&(t=T.onShow.call(A,o.currentTime,A.data("input"))),t!==!1&&(A.show(),E(),e(window).off("resize.xdsoft",E).on("resize.xdsoft",E),T.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function n(){A.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(t){var n=!0;z.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),T.onClose&&e.isFunction(T.onClose)&&(n=T.onClose.call(A,o.currentTime,A.data("input"))),n===!1||T.opened||T.inline||A.hide(),t.stopPropagation()}).data("input",t),U=0,Y=0,A.data("xdsoft_datetime",o),A.setOptions(T),o.setCurrentTime(r()),t.data("xdsoft_datetimepicker",A).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||t.data("xdsoft_datetimepicker").is(":visible")&&T.closeOnInputClick||(clearTimeout(U),U=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(q=!0,o.setCurrentTime(r()),A.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n,r=(this.value,t.which);return-1!==[h].indexOf(r)?(n=e("input:visible,textarea:visible"),A.trigger("close.xdsoft"),n.eq(n.index(this)+1).focus(),!1):-1!==[y].indexOf(r)?(A.trigger("close.xdsoft"),!0):void 0})},i=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())},e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode===u&&(_=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===u&&(_=!1)}),this.each(function(){var t=e(this).data("xdsoft_datetimepicker");if(t){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":i(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,T.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!T.lazyInit||T.open||T.inline?r(e(this)):D(e(this)))})},e.fn.datetimepicker.defaults=t}(jQuery),function(){(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)})(function(e){function t(t){var i,o=t||window.event,a=[].slice.call(arguments,1),s=0,l=0,c=0,u=0,d=0;return t=e.event.fix(o),t.type="mousewheel",o.wheelDelta&&(s=o.wheelDelta),o.detail&&(s=-1*o.detail),o.deltaY&&(c=-1*o.deltaY,s=c),o.deltaX&&(l=o.deltaX,s=-1*l),void 0!==o.wheelDeltaY&&(c=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(l=-1*o.wheelDeltaX),u=Math.abs(s),(!n||n>u)&&(n=u),d=Math.max(Math.abs(c),Math.abs(l)),(!r||r>d)&&(r=d),i=s>0?"floor":"ceil",s=Math[i](s/n),l=Math[i](l/r),c=Math[i](c/r),a.unshift(t,s,l,c),(e.event.dispatch||e.event.handle).apply(this,a)}var n,r,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var a=i.length;a;)e.event.fixHooks[i[--a]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;format.length>i;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;format.length>i;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return(""+this).replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;this.getMonth()>t;++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||0==e%400&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return 0>e?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return 0>e?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var r=new String(e);for(null==n&&(n=" ");t>r.length;)r=n+r;return r},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"}}(),function(){var e=function(e){if("string"==typeof e){var t=e;e={href:t}}e.rel||(e.rel="stylesheet");var n=document.createElement("link");for(var r in e)n.setAttribute(r,e[r]);var i=document.getElementsByTagName("head")[0];i.appendChild(n)};"undefined"==typeof jQuery?window.getCSS=e:jQuery.getCSS=e}(),function(){function e(e){return this.options=e,"undefined"==this.options.name?(console.log("Failed to instantiate new card without name! Aborting!"),void 0):("undefined"!=typeof module&&null!==module?module.exports=this:window[this.options.name]=this,void 0)}var e;e.prototype.options={},e.prototype.id=null,e.prototype.properties={},e.prototype.preload=function(e){this.id=e},e.prototype.init=function(){"function"==typeof this.options.init&&this.options.init(this.id)},e.prototype.render=function(){"function"==typeof this.options.render&&this.options.render()},e.prototype.reload=function(){"function"==typeof this.options.reload&&this.options.reload()},"undefined"!=typeof module&&null!==module?module.exports=e:window.CardPrototype=e}(this);var Analytics={ciims:{},changeTimeout:null,init:function(){this.ciims=CiiMSDashboard.getAuthData(),this.nanoscroller(),this.centerAlignImages(),this.providerClickBehavior(),this.changeBehavior()},providerClickBehavior:function(){var e=this;$(".provider").click(function(t){t.preventDefault(),$(".provider").removeClass("active"),$(this).addClass("active");var n=$(this).attr("data-attr-name");$(".options-panel").hide(),$(".options-panel."+n).show(),e.nanoscroller()})},centerAlignImages:function(){setTimeout(function(){$(".providers img").each(function(){var e=$(this).height(),t=50-e/2;$(this).css("padding-top",t)})},500)},ajaxSuccess:function(){var e=this;e.nanoscroller()},changeBehavior:function(){var e=this;$("input").change(function(){clearTimeout(e.changeTimeout),e.changeTimeout=setTimeout(function(){e.submitAjaxChangeRequest()},250)}),$("input").keyup(function(){clearTimeout(e.changeTimeout),e.changeTimeout=setTimeout(function(){e.submitAjaxChangeRequest() -},250)})},submitAjaxChangeRequest:function(){var e=this,t=$("form").serialize();$.ajax({url:window.location.origin+"/api/setting/analytics",type:"POST",headers:CiiMSDashboard.getRequestHeaders(),data:t,beforeSend:function(){CiiMSDashboard.ajaxBeforeSend()},success:function(t){e.ajaxSuccess(t.success)},completed:CiiMSDashboard.ajaxCompleted()})},nanoscroller:function(){return $(".nano").nanoScroller({iOSNativeScrolling:!0})}};Array.prototype.remove=function(e,t){var n=this.slice((t||e)+1||this.length);return this.length=0>e?this.length+e:e,this.push.apply(this,n)},function(){function e(e){return this.options=$.extend({},this.defaultOptions,e),this.id=this.options.id,null==this.options.name?(console.log("Card instantiated without name! Card will not be rendered"),void 0):null==this.options.version?(console.log("Card instantiated without version number! Card will not be rendered"),void 0):null==this.id?(console.log("Card initialized without ID! Card will not be rendered."),void 0):1==$(".dashboard-cards #"+this.id).length?(console.log("Card instance already in DOM! Card will not be rendered"),void 0):(null==this.options.size&&(this.options.size=this.options.availableTileSizes[0]),this.registerScript("js","init"),void 0)}var e,t={square:$("
").addClass("square"),rectangle:$("
").addClass("rectangle").attr("data-ss-colspan","2"),rectangleTall:$("
").addClass("rectangleTall"),squareBig:$("
").addClass("squareBig").attr("data-ss-colspan","2")};e.prototype.defaultOptions={id:null,name:null,version:null,footerText:"",properties:{},size:null,availableTileSizes:["square"],css:null,js:null,html:null},e.prototype.resize=function(){var e=this,t="#"+this.id,n=this.options.availableTileSizes.length,r=this.options.size,i=this.options.availableTileSizes.indexOf(r),o={};if(-1!=i){i+1>=n&&(i=-1);var a=e.options.availableTileSizes[i+1];$(t).removeClass(r).addClass(a),"square"==a||"rectangleTall"==a?$(t).attr("data-ss-colspan","1"):$(t).attr("data-ss-colspan","2"),e.options.size=a,$.each(e.options.properties,function(e,t){o[e]=t.value}),$.ajax({url:window.location.origin+"/api/card/details/id/"+e.id,type:"POST",headers:CiiMSDashboard.getRequestHeaders(),beforeSend:CiiMSDashboard.ajaxBeforeSend(),data:{size:e.options.size,properties:o},completed:CiiMSDashboard.ajaxCompleted()}),e.rebuild()}},e.prototype.rebuild=function(){$(".dashboard-cards").trigger("ss-destroy").trigger("ss-rearrange").shapeshift({align:"left",minColumns:1,maxColumns:2,gutterX:20,gutterY:20,paddingX:0,paddingY:0,enableResize:!0,enableDrag:!0,animated:!0,animationSpeed:225,animationThreshold:100})},e.prototype.bindEventListeners=function(e,t){var n=this;t.resize&&$("#"+e+" #card-resize-button").click(function(){n.resize()}),t.settings&&$("#"+e+" #card-settings-button").click(function(){$(".shader").addClass("visible"),n.settings()}),$(".shader").click(function(){$(this).removeClass("visible"),$(".settings-sidebar").removeClass("visible")})},e.prototype.settings=function(){var e=this,t=$(".settings-sidebar"),n=$(t).attr("card-id"),r={};if(n==e.options.id)return $(t).toggleClass("visible"),$(t).hasClass("visible")?$(".shader").addClass("visible"):$(".shader").removeClass("visible"),void 0;$(t).removeClass("visible").empty().attr("card-id",e.options.id);var i=$("#settings-text").text();h2=$("

").text(i.replace("{cardname}",e.options.name)),form=$("
").addClass("pure-form pure-form-stacked"),submit=$("#submit-card-button").clone().show(),remove=$("#card-uninstall-button").clone().show(),$.each(e.options.properties,function(e,t){var n=$("