1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00
invoiceninja/public/built.js

29 lines
985 KiB
JavaScript
Raw Normal View History

function generatePDF(t,e,n,i){if(t&&e){if(!n)return refreshTimer&&clearTimeout(refreshTimer),void(refreshTimer=setTimeout(function(){generatePDF(t,e,!0,i)},500));if(refreshTimer=null,t=calculateAmounts(t),parseInt(t.account.signature_on_pdf)&&(t=convertSignature(t)),!t)return!1;var o=GetPdfMake(t,e,i);return i&&o.getDataUrl(i),o}}function copyObject(t){return!!t&&JSON.parse(JSON.stringify(t))}function processVariables(t){if(!t)return"";for(var e=["MONTH","QUARTER","YEAR"],n=0;n<e.length;n++){var i=e[n],o=new RegExp(":"+i+"[+-]?[\\d]*","g"),a=t.match(o);if(a)for(var s=0;s<a.length;s++){var r=a[s],c=0;r.split("+").length>1?c=r.split("+")[1]:r.split("-").length>1&&(c=parseInt(r.split("-")[1])*-1),t=t.replace(r,getDatePart(i,c))}}return t}function getDatePart(t,e){return e=parseInt(e),e||(e=0),"MONTH"==t?getMonth(e):"QUARTER"==t?getQuarter(e):"YEAR"==t?getYear(e):void 0}function getMonth(t){var e=new Date,n=["January","February","March","April","May","June","July","August","September","October","November","December"],i=e.getMonth();return i=parseInt(i)+t,i%=12,i<0&&(i+=12),n[i]}function getYear(t){var e=new Date,n=e.getFullYear();return parseInt(n)+t}function getQuarter(t){var e=new Date,n=Math.floor((e.getMonth()+3)/3);return n+=t,n%=4,0==n&&(n=4),"Q"+n}function isStorageSupported(){try{return"localStorage"in window&&null!==window.localStorage}catch(t){return!1}}function isValidEmailAddress(t){var e=new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);return e.test(t)}function enableHoverClick(t,e,n){}function setAsLink(t,e){e?(t.css("text-decoration","underline"),t.css("cursor","pointer")):(t.css("text-decoration","none"),t.css("cursor","text"))}function setComboboxValue(t,e,n){t.find("input").val(e),t.find("input.form-control").val(n),e&&n?(t.find("select").combobox("setSelected"),t.find(".combobox-container").addClass("combobox-selected")):t.find(".combobox-container").removeClass("combobox-selected")}function convertDataURIToBinary(t){var e=t.indexOf(BASE64_MARKER)+BASE64_MARKER.length,n=t.substring(e);return base64DecToArr(n)}function comboboxHighlighter(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=t.replace(new RegExp("<br/>","g"),"\n");return n=_.escape(n),n=n.replace(new RegExp("("+e+")","ig"),function(t,n){return n?"<strong>"+n+"</strong>":e}),n.replace(new RegExp("\n","g"),"<br/>")}function inIframe(){try{return window.self!==window.top}catch(t){return!0}}function getContactDisplayName(t){return t.first_name||t.last_name?$.trim((t.first_name||"")+" "+(t.last_name||"")):t.email}function getContactDisplayNameWithEmail(t){var e="";return(t.first_name||t.last_name)&&(e+=$.trim((t.first_name||"")+" "+(t.last_name||""))),t.email&&(e&&(e+=" - "),e+=t.email),$.trim(e)}function getClientDisplayName(t){var e=!!t.contacts&&t.contacts[0];return t.name?t.name:e?getContactDisplayName(e):""}function formatAddress(t,e,n,i){var o="";return i?(o+=n?n+" ":"",o+=t?t:"",o+=t&&e?", ":t?" ":"",o+=e):(o+=t?t:"",o+=t&&e?", ":e?" ":"",o+=e+" "+n),o}function concatStrings(){for(var t="",e=[],n=0;n<arguments.length;n++){var i=arguments[n];i&&e.push(i)}for(var n=0;n<e.length;n++)t+=e[n],0==n&&e.length>1?t+=", ":n<e.length-1&&(t+=" ");return e.length?t:""}function calc
e=t,t=o),ot.isFunction(t))return n=V.call(arguments,2),i=function(){return t.apply(e||this,n.concat(V.call(arguments)))},i.guid=t.guid=t.guid||ot.guid++,i},now:function(){return+new Date},support:nt}),ot.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){Z["[object "+e+"]"]=e.toLowerCase()});var lt=function(t){function e(t,e,n,i){var o,a,s,r,c,l,d,p,f,m;if((e?e.ownerDocument||e:X)!==D&&L(e),e=e||D,n=n||[],r=e.nodeType,"string"!=typeof t||!t||1!==r&&9!==r&&11!==r)return n;if(!i&&q){if(11!==r&&(o=vt.exec(t)))if(s=o[1]){if(9===r){if(a=e.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(e.ownerDocument&&(a=e.ownerDocument.getElementById(s))&&I(e,a)&&a.id===s)return n.push(a),n}else{if(o[2])return Q.apply(n,e.getElementsByTagName(t)),n;if((s=o[3])&&A.getElementsByClassName)return Q.apply(n,e.getElementsByClassName(s)),n}if(A.qsa&&(!W||!W.test(t))){if(p=d=P,f=e,m=1!==r&&t,1===r&&"object"!==e.nodeName.toLowerCase()){for(l=w(t),(d=e.getAttribute("id"))?p=d.replace(yt,"\\$&"):e.setAttribute("id",p),p="[id='"+p+"'] ",c=l.length;c--;)l[c]=p+h(l[c]);f=Mt.test(t)&&u(e.parentNode)||e,m=l.join(",")}if(m)try{return Q.apply(n,f.querySelectorAll(m)),n}catch(g){}finally{d||e.removeAttribute("id")}}}return N(t.replace(ct,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>_.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[P]=!0,t}function o(t){var e=D.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function a(t,e){for(var n=t.split("|"),i=t.length;i--;)_.attrHandle[n[i]]=e}function s(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||J)-(~t.sourceIndex||J);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function r(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function c(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function l(t){return i(function(e){return e=+e,i(function(n,i){for(var o,a=t([],n.length,e),s=a.length;s--;)n[o=a[s]]&&(n[o]=!(i[o]=n[o]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function h(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function p(t,e,n){var i=e.dir,o=n&&"parentNode"===i,a=F++;return e.first?function(e,n,a){for(;e=e[i];)if(1===e.nodeType||o)return t(e,n,a)}:function(e,n,s){var r,c,l=[R,a];if(s){for(;e=e[i];)if((1===e.nodeType||o)&&t(e,n,s))return!0}else for(;e=e[i];)if(1===e.nodeType||o){if(c=e[P]||(e[P]={}),(r=c[i])&&r[0]===R&&r[1]===a)return l[2]=r[2];if(c[i]=l,l[2]=t(e,n,s))return!0}}}function f(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function m(t,n,i){for(var o=0,a=n.length;o<a;o++)e(t,n[o],i);return i}function g(t,e,n,i,o){for(var a,s=[],r=0,c=t.length,l=null!=e;r<c;r++)(a=t[r])&&(n&&!n(a,i,o)||(s.push(a),l&&e.push(r)));return s}function b(t,e,n,o,a,s){return o&&!o[P]&&(o=b(o)),a&&!a[P]&&(a=b(a,s)),i(function(i,s,r,c){var l,u,d,h=[],p=[],f=s.length,b=i||m(e||"*",r.nodeType?[r]:r,[]),v=!t||!i&&e?b:g(b,h,t,r,c),M=n?a||(i?t:f||o)?[]:s:v;if(n&&n(v,M,r,c),o)for(l=g(M,p),o(l,[],r,c),u=l.length;u--;)(d=l[u])&&(M[p[u]]=!(v[p[u]]=d));if(i){if(a||t){if(a){for(l=[],u=M.length;u--;)(d=M[u])&&l.push(v[u]=d);a(null,M=[],l,c)}for(u=M.length;u--;)(d=M[u])&&(l=a?tt(i,d):h[u])>-1&&(i[l]=!(s[l]=d))}}else M=g(M===s?M.splice(f,M.length):M),a?a(null,s,M,c):Q.apply(s,M)})}function v(t){for(var e,n,i,o=t.length,a=_.relative[t[0].type],s=a||_.relative[" "],r=a?1:0,c=p(function(t){return t===e},s,!0),l=p(function(t){return tt(e,t)>-1},s,!0),u=[function(t,n,i){var o=!a&&(i||n!==O)||((e=n).nodeType?c(t,n,i):l(t,n,i));return e=null,o}];r<o;r++)if(n=_.relative[t[r].type])u=[p(f(u),n)];else{if(n=_.filter[t[r].type].apply(null,t[r].matches),n[P]){for(i=++r;i<o&&!_.relative[t[i].type];i++);return b(r>1&&f(u),r>1&&h(t.slice(0,r-1).concat({value:" "===t[r-2].type?"*":""})).replace(ct,"$1"),n,r<i&&v(t
var a,s,r,c,l,u,d,h,p,f,m,g=ot.hasData(t)&&ot._data(t);if(g&&(u=g.events)){for(e=(e||"").match(Mt)||[""],l=e.length;l--;)if(r=Wt.exec(e[l])||[],p=m=r[1],f=(r[2]||"").split(".").sort(),p){for(d=ot.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,h=u[p]||[],r=r[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),c=a=h.length;a--;)s=h[a],!o&&m!==s.origType||n&&n.guid!==s.guid||r&&!r.test(s.namespace)||i&&i!==s.selector&&("**"!==i||!s.selector)||(h.splice(a,1),s.selector&&h.delegateCount--,d.remove&&d.remove.call(t,s));c&&!h.length&&(d.teardown&&d.teardown.call(t,f,g.handle)!==!1||ot.removeEvent(t,p,g.handle),delete u[p])}else for(p in u)ot.event.remove(t,p+e[l],n,i,!0);ot.isEmptyObject(u)&&(delete g.handle,ot._removeData(t,"events"))}},trigger:function(e,n,i,o){var a,s,r,c,l,u,d,h=[i||ft],p=et.call(e,"type")?e.type:e,f=et.call(e,"namespace")?e.namespace.split("."):[];if(r=u=i=i||ft,3!==i.nodeType&&8!==i.nodeType&&!qt.test(p+ot.event.triggered)&&(p.indexOf(".")>=0&&(f=p.split("."),p=f.shift(),f.sort()),s=p.indexOf(":")<0&&"on"+p,e=e[ot.expando]?e:new ot.Event(p,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=f.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:ot.makeArray(n,[e]),l=ot.event.special[p]||{},o||!l.trigger||l.trigger.apply(i,n)!==!1)){if(!o&&!l.noBubble&&!ot.isWindow(i)){for(c=l.delegateType||p,qt.test(c+p)||(r=r.parentNode);r;r=r.parentNode)h.push(r),u=r;u===(i.ownerDocument||ft)&&h.push(u.defaultView||u.parentWindow||t)}for(d=0;(r=h[d++])&&!e.isPropagationStopped();)e.type=d>1?c:l.bindType||p,a=(ot._data(r,"events")||{})[e.type]&&ot._data(r,"handle"),a&&a.apply(r,n),a=s&&r[s],a&&a.apply&&ot.acceptData(r)&&(e.result=a.apply(r,n),e.result===!1&&e.preventDefault());if(e.type=p,!o&&!e.isDefaultPrevented()&&(!l._default||l._default.apply(h.pop(),n)===!1)&&ot.acceptData(i)&&s&&i[p]&&!ot.isWindow(i)){u=i[s],u&&(i[s]=null),ot.event.triggered=p;try{i[p]()}catch(m){}ot.event.triggered=void 0,u&&(i[s]=u)}return e.result}},dispatch:function(t){t=ot.event.fix(t);var e,n,i,o,a,s=[],r=V.call(arguments),c=(ot._data(this,"events")||{})[t.type]||[],l=ot.event.special[t.type]||{};if(r[0]=t,t.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,t)!==!1){for(s=ot.event.handlers.call(this,t,c),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,a=0;(i=o.handlers[a++])&&!t.isImmediatePropagationStopped();)t.namespace_re&&!t.namespace_re.test(i.namespace)||(t.handleObj=i,t.data=i.data,n=((ot.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,r),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,a,s=[],r=e.delegateCount,c=t.target;if(r&&c.nodeType&&(!t.button||"click"!==t.type))for(;c!=this;c=c.parentNode||this)if(1===c.nodeType&&(c.disabled!==!0||"click"!==t.type)){for(o=[],a=0;a<r;a++)i=e[a],n=i.selector+" ",void 0===o[n]&&(o[n]=i.needsContext?ot(n,this).index(c)>=0:ot.find(n,this,null,[c]).length),o[n]&&o.push(i);o.length&&s.push({elem:c,handlers:o})}return r<e.length&&s.push({elem:this,handlers:e.slice(r)}),s},fix:function(t){if(t[ot.expando])return t;var e,n,i,o=t.type,a=t,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=kt.test(o)?this.mouseHooks:Dt.test(o)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,t=new ot.Event(a),e=i.length;e--;)n=i[e],t[n]=a[n];return t.target||(t.target=a.srcElement||ft),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,s.filter?s.filter(t,a):t},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,
try{this[t]=void 0,delete this[t]}catch(e){}})}}),ot.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var i,o,a,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return a=1!==s||!ot.isXMLDoc(t),a&&(e=ot.propFix[e]||e,o=ot.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=ot.find.attr(t,"tabindex");return e?parseInt(e,10):Ne.test(t.nodeName)||Oe.test(t.nodeName)&&t.href?0:-1}}}}),nt.hrefNormalized||ot.each(["href","src"],function(t,e){ot.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),nt.optSelected||(ot.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this}),nt.enctype||(ot.propFix.enctype="encoding");var Se=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(t){var e,n,i,o,a,s,r=0,c=this.length,l="string"==typeof t&&t;if(ot.isFunction(t))return this.each(function(e){ot(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(Mt)||[];r<c;r++)if(n=this[r],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Se," "):" ")){for(a=0;o=e[a++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");s=ot.trim(i),n.className!==s&&(n.className=s)}return this},removeClass:function(t){var e,n,i,o,a,s,r=0,c=this.length,l=0===arguments.length||"string"==typeof t&&t;if(ot.isFunction(t))return this.each(function(e){ot(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(Mt)||[];r<c;r++)if(n=this[r],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Se," "):"")){for(a=0;o=e[a++];)for(;i.indexOf(" "+o+" ")>=0;)i=i.replace(" "+o+" "," ");s=t?ot.trim(i):"",n.className!==s&&(n.className=s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):ot.isFunction(t)?this.each(function(n){ot(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var e,i=0,o=ot(this),a=t.match(Mt)||[];e=a[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else n!==zt&&"boolean"!==n||(this.className&&ot._data(this,"__className__",this.className),this.className=this.className||t===!1?"":ot._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Se," ").indexOf(e)>=0)return!0;return!1}}),ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){ot.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),ot.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var xe=ot.now(),Le=/\?/,De=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;ot.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,o=ot.trim(e+"");return o&&!ot.trim(o.replace(De,function(t,e,o,a){return n&&e&&(i=0),0===i?t:(n=o||e,i+=!a-!o,"")}))?Function("return "+o)():ot.error("Invalid JSON: "+e)},ot.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new DOMParser,n=i.parseFromString(e,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(o){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||ot.error("Invalid XML: "+e),n};var ke,qe,We=/#.*$/,Ee=/([?&])_=[^&]*/,Be=/^(.*?):[ \t]*([^\r\n]*)\r
return!(i&&!o&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return n._mouseMove(t)},this._mouseUpDelegate=function(t){return n._mouseUp(t)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),d=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),d=!1,!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});!function(){function e(t,e,n){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?n/100:1)]}function n(e,n){return parseInt(t.css(e,n),10)||0}function i(e){var n=e[0];return 9===n.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(n)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a,s=Math.max,r=Math.abs,c=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,h=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==o)return o;var e,n,i=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=i.children()[0];return t("body").append(i),e=a.offsetWidth,i.css("overflow","scroll"),n=a.offsetWidth,e===n&&(n=i[0].clientWidth),i.remove(),o=e-n},getScrollInfo:function(e){var n=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),i=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),o="scroll"===n||"auto"===n&&e.width<e.element[0].scrollWidth,a="scroll"===i||"auto"===i&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:o?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var n=t(e||window),i=t.isWindow(n[0]),o=!!n[0]&&9===n[0].nodeType;return{element:n,isWindow:i,isDocument:o,offset:n.offset()||{left:0,top:0},scrollLeft:n.scrollLeft(),scrollTop:n.scrollTop(),width:i||o?n.width():n.outerWidth(),height:i||o?n.height():n.outerHeight()}}},t.fn.position=function(o){if(!o||!o.of)return f.apply(this,arguments);o=t.extend({},o);var p,m,g,b,v,M,y=t(o.of),A=t.position.getWithinInfo(o.within),_=t.position.getScrollInfo(A),z=(o.collision||"flip").split(" "),T={};return M=i(y),y[0].preventDefault&&(o.at="left top"),m=M.width,g=M.height,b=M.offset,v=t.extend({},b),t.each(["my","at"],function(){var t,e,n=(o[this]||"").split(" ");1===n.length&&(n=l.test(n[0])?n.concat(["center"]):u.test(n[0])?["center"].concat(n):["center","center"]),n[0]=l.test(n[0])?n[0]:"center",n[1]=u.test(n[1])?n[1]:"center",t=d.ex
return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,n){return t("<li>").text(n.label).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,n){var i=new RegExp(t.ui.autocomplete.escapeRegex(n),"i");return t.grep(e,function(t){return i.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var n;this._superApply(arguments),this.options.disabled||this.cancelSearch||(n=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(n).appendTo(this.liveRegion))}});var h,p=(t.ui.autocomplete,"ui-button ui-widget ui-state-default ui-corner-all"),f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},g=function(e){var n=e.name,i=e.form,o=t([]);return n&&(n=n.replace(/'/g,"\\'"),o=i?t(i).find("[name='"+n+"'][type=radio]"):t("[name='"+n+"'][type=radio]",e.ownerDocument).filter(function(){return!this.form})),o};t.widget("ui.button",{version:"1.11.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,n=this.options,i="checkbox"===this.type||"radio"===this.type,o=i?"":"ui-state-active";null===n.label&&(n.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){n.disabled||this===h&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){n.disabled||t(this).removeClass(o)}).bind("click"+this.eventNamespace,function(t){n.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),i&&this.element.bind("change"+this.eventNamespace,function(){e.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(n.disabled)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];g(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!n.disabled&&(t(this).addClass("ui-state-active"),h=this,void e.document.one("mouseup",function(){h=null}))}).bind("mouseup"+this.eventNamespace,function(){return!n.disabled&&void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return!n.disabled&&void(e.keyCode!==t.ui.keyCode.SPACE&&e.keyCode!==t.ui.keyCode.ENTER||t(this).addClass("ui-state-active"))}).bin
if(Z<0&&(Z+=12,tt--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-$[0]*$[1]+1,Q.getDate())),e=G&&e<G?G:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,n=this._get(t,"prevText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z-Y,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+n+"</span></a>":j?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+n+"</span></a>",o=this._get(t,"nextText"),o=U?this.formatDate(o,this._daylightSavingAdjust(new Date(tt,Z+Y,1)),this._getFormatConfig(t)):o,a=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"w":"e")+"'>"+o+"</span></a>":j?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+o+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"w":"e")+"'>"+o+"</span></a>",s=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?K:R,s=U?this.formatDate(s,r,this._getFormatConfig(t)):s,c=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=H?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(F?c:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+s+"</button>":"")+(F?"":c)+"</div>":"",u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(t,"showWeek"),h=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),b=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),M=this._getDefaultDate(t),y="",_=0;_<$[0];_++){for(z="",this.maxRows=4,T=0;T<$[1];T++){if(w=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),C=" ui-corner-all",N="",V){if(N+="<div class='ui-datepicker-group",$[1]>1)switch(T){case 0:N+=" ui-datepicker-group-first",C=" ui-corner-"+(F?"right":"left");break;case $[1]-1:N+=" ui-datepicker-group-last",C=" ui-corner-"+(F?"left":"right");break;default:N+=" ui-datepicker-group-middle",C=""}N+="'>"}for(N+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===_?F?a:i:"")+(/all|right/.test(C)&&0===_?F?i:a:"")+this._generateMonthYearHeader(t,Z,tt,G,Q,_>0||T>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",O=d?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",A=0;A<7;A++)S=(A+u)%7,O+="<th scope='col'"+((A+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[S]+"'>"+p[S]+"</span></th>";for(N+=O+"</tr></thead><tbody>",x=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,x)),L=(this._getFirstDayOfMonth(tt,Z)-u+7)%7,D=Math.ceil((L+x)/7),k=V&&this.maxRows>D?this.maxRows:D,this.maxRows=k,q=this._daylightSavingAdjust(new Date(tt,Z,1-L)),W=0;W<k;W++){for(N+="<tr>",E=d?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(q)+"</td>":"",A=0;A<7;A++)B=g?g.apply(t.input?t.input[0]:null,[q]):[!0,""],I=q.getMonth()!==Z,P=I&&!v||!B[0]||G&&q<G||Q&&q>Q,E+="<td class='"+((A+u+6)%7>=5?" ui-datepicker-week-end":"")+(I?" ui-datepicker-other-month":"")+(q.getTime()===w.getTime()&&Z===t.selectedMonth&&t._keyEvent||M.getTime()===q.getTime()&&M.getTime()===w.getTime()?" "+this._dayOverClass:"")+(P?" "+this._unselectableClass+" ui-state-disabled":"")+(I&&!b?"":" "+B[1]+(q.getTime()===K.getTime()?" "+this._currentClass:"")+(q.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(I&&!b||!B[2]?"":" title='"+B[2].replace(/'/g,"&#39;")+"'")+(P?"":" d
n(this.originalElement),this},_mouseCapture:function(e){var n,i,o=!1;for(n in this.handles)i=t(this.handles[n])[0],(i===e.target||t.contains(i,e.target))&&(o=!0);return!this.options.disabled&&o},_mouseStart:function(e){var n,i,o,a=this.options,s=this.element;return this.resizing=!0,this._renderProxy(),n=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),a.containment&&(n+=t(a.containment).scrollLeft()||0,i+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:n,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:s.width(),height:s.height()},this.originalSize=this._helper?{width:s.outerWidth(),height:s.outerHeight()}:{width:s.width(),height:s.height()},this.sizeDiff={width:s.outerWidth()-s.width(),height:s.outerHeight()-s.height()},this.originalPosition={left:n,top:i},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),s.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var n,i,o=this.originalMousePosition,a=this.axis,s=e.pageX-o.left||0,r=e.pageY-o.top||0,c=this._change[a];return this._updatePrevProperties(),!!c&&(n=c.apply(this,[e,s,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(n=this._updateRatio(n,e)),n=this._respectSize(n,e),this._updateCache(n),this._propagate("resize",e),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1)},_mouseStop:function(e){this.resizing=!1;var n,i,o,a,s,r,c,l=this.options,u=this;return this._helper&&(n=this._proportionallyResizeElements,i=n.length&&/textarea/i.test(n[0].nodeName),o=i&&this._hasScroll(n[0],"left")?0:u.sizeDiff.height,a=i?0:u.sizeDiff.width,s={width:u.helper.width()-a,height:u.helper.height()-o},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,c=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(t.extend(s,{top:c,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,n,i,o,a,s=this.options;a={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,i=a.minWidth/this.aspectRatio,n=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),i>a.minHeight&&(a.minHeight=i),n<a.maxWidth&&(a.maxWidth=n),o<a.maxHeight&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,n=this.size,i=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this
}function o(t,e,n){return n=(n+1)%1,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}var a,s="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,c=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,n,i,o){return new t.Color.fn.parse(e,n,i,o)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},h=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",h.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(o,s,r,c){if(o===e)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=t(o).css(s),s=e);var d=this,h=t.type(o),p=this._rgba=[];return s!==e&&(o=[o,s,r,c],h="array"),"string"===h?this.parse(i(o)||a._default):"array"===h?(f(u.rgba.props,function(t,e){p[e.idx]=n(o[e.idx],e)}),this):"object"===h?(o instanceof l?f(u,function(t,e){o[e.cache]&&(d[e.cache]=o[e.cache].slice())}):f(u,function(e,i){var a=i.cache;f(i.props,function(t,e){if(!d[a]&&i.to){if("alpha"===t||null==o[t])return;d[a]=i.to(d._rgba)}d[a][e.idx]=n(o[t],e,!0)}),d[a]&&t.inArray(null,d[a].slice(0,3))<0&&(d[a][3]=1,i.from&&(d._rgba=i.from(d[a])))}),this):void 0},is:function(t){var e=l(t),n=!0,i=this;return f(u,function(t,o){var a,s=e[o.cache];return s&&(a=i[o.cache]||o.to&&o.to(i._rgba)||[],f(o.props,function(t,e){if(null!=s[e.idx])return n=s[e.idx]===a[e.idx]})),n}),n},_space:function(){var t=[],e=this;return f(u,function(n,i){e[i.cache]&&t.push(n)}),t.pop()},transition:function(t,e){var i=l(t),o=i._space(),a=u[o],s=0===this.alpha()?l("transparent"):this,r=s[a.cache]||a.to(s._rgba),c=r.slice();return i=i[a.cache],f(a.props,function(t,o){var a=o.idx,s=r[a],l=i[a],u=d[o.type]||{};null!==l&&(null===s?c[a]=l:(u.mod&&(l-s>u.mod/2?s+=u.mod:s-l>u.mod/2&&(s-=u.mod)),c[a]=n((l-s)*e+s,o)))}),this[o](c)},blend:function(e){if(1===this._rgba[3])return this;var n=this._rgba.slice(),i=n.pop(),o=l(e)._rgba;return l(t.map(n,function(t,e){return(1-i)*o[e]+i*t}))},toRgbaString:function(){var e="rgba(",n=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===n[3]&&(n.pop(),e="rgb("),e+n.join()+")"},toHslaString:function(){var e="hsla(",n=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===n[3]&&(n.pop(),e="hsl("),e+n.join()+")"},toHexString:function(e){var n=this._rgba.slice(),i=n.pop();return e&&n.push(~~(255*i)),"#"+t.map(n,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,n,i=t[0]/255,o=t[1]/255,a=t[2]/255,s=t[3],r=Math.max(i,o,a),c=Math.min(i,o,a),l=r-c,u=r+c,d=.5*u;return e=c===r?0:i===r?60*(o-a)/l+360:o===r?60*(a-i)/l+120:60*(i-o)/l+240,n=0===l?0:d<=.5?l/u:l/(2-u),[Math.round(e)%360,n,d,null==s?1:s]},u.hsla.from=function(t){if(null==t[0]||null==t[1]||null=
this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var t,e=this.element.find("option");e.length&&(this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(e,n){var i=this,o="";t.each(n,function(n,a){a.optgroup!==o&&(t("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(a.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:a.optgroup}).appendTo(e),o=a.optgroup),i._renderItemData(e,a)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,n){var i=t("<li>");return n.disabled&&i.addClass("ui-state-disabled"),this._setText(i,n.label),i.appendTo(e)},_setText:function(t,e){e?t.text(e):t.html("&#160;")},_move:function(t,e){var n,i,o=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex):(n=this.menuItems.eq(this.element[0].selectedIndex),o+=":not(.ui-state-disabled)"),i="first"===t||"last"===t?n["first"===t?"prevAll":"nextAll"](o).eq(-1):n[t+"All"](o).eq(0),i.length&&this.menuInstance.focus(e,i)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var n=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),n=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),n=!1}n&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex);e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this._setText(this.buttonText,t.label),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==n&&this._trigger("change",e,{item:t})
return i.parents("body").length||t("parent"!==n.appendTo?n.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!n.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!n.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===o.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===o.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],n=t(o.containment).offset(),i="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var i="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(o[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:o.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:o.scrollLeft())*i}},_generatePosition:function(e){var n,i,o=this.options,a=e.pageX,s=e.pageY,r="absolute"!==this.cssPositio
if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.1",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){s.detach().trigger("closed.bs.alert").remove()}var o=t(this),a=o.attr("data-target");a||(a=o.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,""));var s=t(a);e&&e.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),a="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,a)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",a=i.data();e+="Text",null==a.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==a[e]?this.options[e]:a[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")&&(n.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.carousel"),a=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),s="string"==typeof e?e:a.slide;o||i.data("bs.carousel",o=new n(this,a)),"number"==typeof e?o.to(e):s?o[s]():a.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchst
e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=i.find("> .active"),r=o&&t.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&r?s.one("bsTransitionEnd",a).emulateTransitionEnd(n.TRANSITION_DURATION):a(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),a="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,a)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.1",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),a=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o<n&&"top";if("bottom"==this.affixed)return null!=n?!(o+this.unpin<=a.top)&&"bottom":!(o+s<=t-i)&&"bottom";var r=null==this.affixed,c=r?o:a.top,l=r?s:e;return null!=n&&c<=n?"top":null!=i&&c+l>=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,a=i.bottom,s=t("body").height();"object"!=typeof i&&(a=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof a&&(a=i.bottom(this.$element));var r=this.getState(s,e,o,a);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var c="affix"+(r?"-"+r:""),l=t.Event(c+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(c).trigger(c.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:s-e-a})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),function(t,e,n){!function(t){"use strict";"function"==typeof define&&define.amd?define("datatables",["jquery"],t):"object"==typeof exports?t(require("jquery")):jQuery&&!jQuery.fn.dataTable&&t(jQuery)}(function(i){"use strict";function o(t){var e,n,a="a aa ai ao as b fn i m o s ",s={};i.each(t,function(i,r){e=i.match(/^([^A-Z]+?)([A-Z])/),e&&a.indexOf(e[1]+" ")!==-1&&(n=i.replace(e[0],e[2].toLowerCase()),s[n]=i,"o"===e[1]&&o(t[i]))}),t._hungarianMap=s}function a(t,e,s){t._hungarianMap||o(t);var r;i.each(e,function(o,c){r=t._hungarianMap[o],r===n||!s&&e[r]!==n||("o"===r.charAt(0)?(e[r]||(e[r]={}),i.extend(!0,e[r],e[o]),a(t[r],e[r],s)):e[r]=e[o])})}function s(t){var e=Yt.defaults.oLanguage,n=t.sZeroRecords;!t.sEmptyTable&&n&&"No data available in table"===e.sEmptyTable&&Bt(t,t,"sZeroRecords","sEmptyTable"),!t.sLoadingRecords&&n&&"Loading..."===e.sLoadingRecords&&Bt(t,t,"sZeroRecords","sLoadingRecords"),t.sInfoThousands&&(t.sThousands=t.sI
c.style.width=Tt(z.css("width")),z.remove()}else for(n=0;n<m;n++)l[n].sWidth=Tt(M.eq(n).width());y&&(c.style.width=Tt(y)),!y&&!h||e._reszEvt||(i(t).bind("resize.DT-"+e.sInstance,Mt(function(){p(e)})),e._reszEvt=!0)}function Mt(t,e){var i,o,a=e!==n?e:200;return function(){var e=this,s=+new Date,r=arguments;i&&s<i+a?(clearTimeout(o),o=setTimeout(function(){i=n,t.apply(e,r)},a)):i?(i=s,t.apply(e,r)):i=s}}function yt(t,n){if(!t)return 0;var o=i("<div/>").css("width",Tt(t)).appendTo(n||e.body),a=o[0].offsetWidth;return o.remove(),a}function At(t,e){var n=t.oScroll;if(n.sX||n.sY){var o=n.sX?0:n.iBarWidth;e.style.width=Tt(i(e).outerWidth()-o)}}function _t(t,e){var n=zt(t,e);if(n<0)return null;var o=t.aoData[n];return o.nTr?o.anCells[e]:i("<td/>").html(T(t,n,e,"display"))[0]}function zt(t,e){for(var n,i=-1,o=-1,a=0,s=t.aoData.length;a<s;a++)n=T(t,a,e,"display")+"",n=n.replace(ze,""),n.length>i&&(i=n.length,o=a);return o}function Tt(t){return null===t?"0px":"number"==typeof t?t<0?"0px":t+"px":t.match(/\d$/)?t+"px":t}function wt(){if(!Yt.__scrollbarWidth){var t=i("<p/>").css({width:"100%",height:200,padding:0})[0],e=i("<div/>").css({position:"absolute",top:0,left:0,width:200,height:150,padding:0,overflow:"hidden",visibility:"hidden"}).append(t).appendTo("body"),n=t.offsetWidth;e.css("overflow","scroll");var o=t.offsetWidth;n===o&&(o=e[0].clientWidth),e.remove(),Yt.__scrollbarWidth=n-o}return Yt.__scrollbarWidth}function Ct(t){var e,o,a,s,r,c,l,u=[],d=t.aoColumns,h=t.aaSortingFixed,p=i.isPlainObject(h),f=[],m=function(t){t.length&&!i.isArray(t[0])?f.push(t):f.push.apply(f,t)};for(i.isArray(h)&&m(h),p&&h.pre&&m(h.pre),m(t.aaSorting),p&&h.post&&m(h.post),e=0;e<f.length;e++)for(l=f[e][0],s=d[l].aDataSort,o=0,a=s.length;o<a;o++)r=s[o],c=d[r].sType||"string",f[e]._idx===n&&(f[e]._idx=i.inArray(f[e][1],d[r].asSorting)),u.push({src:l,col:r,dir:f[e][1],index:f[e]._idx,type:c,formatter:Yt.ext.type.order[c+"-pre"]});return u}function Nt(t){var e,n,i,o,a,s=[],r=Yt.ext.type.order,c=t.aoData,l=(t.aoColumns,0),u=t.aiDisplayMaster;for(v(t),a=Ct(t),e=0,n=a.length;e<n;e++)o=a[e],o.formatter&&l++,Dt(t,o.col);if("ssp"!=jt(t)&&0!==a.length){for(e=0,i=u.length;e<i;e++)s[u[e]]=e;l===a.length?u.sort(function(t,e){var n,i,o,r,l,u=a.length,d=c[t]._aSortData,h=c[e]._aSortData;for(o=0;o<u;o++)if(l=a[o],n=d[l.col],i=h[l.col],r=n<i?-1:n>i?1:0,0!==r)return"asc"===l.dir?r:-r;return n=s[t],i=s[e],n<i?-1:n>i?1:0}):u.sort(function(t,e){var n,i,o,l,u,d,h=a.length,p=c[t]._aSortData,f=c[e]._aSortData;for(o=0;o<h;o++)if(u=a[o],n=p[u.col],i=f[u.col],d=r[u.type+"-"+u.dir]||r["string-"+u.dir],l=d(n,i),0!==l)return l;return n=s[t],i=s[e],n<i?-1:n>i?1:0})}t.bSorted=!0}function Ot(t){for(var e,n,i=t.aoColumns,o=Ct(t),a=t.oLanguage.oAria,s=0,r=i.length;s<r;s++){var c=i[s],l=c.asSorting,u=c.sTitle.replace(/<.*?>/g,""),d=c.nTh;d.removeAttribute("aria-sort"),c.bSortable?(o.length>0&&o[0].col==s?(d.setAttribute("aria-sort","asc"==o[0].dir?"ascending":"descending"),n=l[o[0].index+1]||l[0]):n=l[0],e=u+("asc"===n?a.sSortAscending:a.sSortDescending)):e=u,d.setAttribute("aria-label",e)}}function St(t,e,o,a){var s,r=t.aoColumns[e],c=t.aaSorting,l=r.asSorting,u=function(t,e){var o=t._idx;return o===n&&(o=i.inArray(t[1],l)),o+1<l.length?o+1:e?null:0};if("number"==typeof c[0]&&(c=t.aaSorting=[c]),o&&t.oFeatures.bSortMulti){var d=i.inArray(e,he(c,"0"));d!==-1?(s=u(c[d],!0),null===s?c.splice(d,1):(c[d][1]=l[s],c[d]._idx=s)):(c.push([e,l[0],0]),c[c.length-1]._idx=0)}else c.length&&c[0][0]==e?(s=u(c[0]),c.length=1,c[0][1]=l[s],c[0]._idx=s):(c.length=0,c.push([e,l[0]]),c[0]._idx=0);P(t),"function"==typeof a&&a(t)}function xt(t,e,n,i){var o=t.aoColumns[n];Pt(e,{},function(e){o.bSortable!==!1&&(t.oFeatures.bProcessing?(ft(t,!0),setTimeout(function(){St(t,n,e.shiftKey,i),"ssp"!==jt(t)&&ft(t,!1)},0)):St(t,n,e.shiftKey,i))})}function Lt(t){var e,n,o,a=t.aLastSort,s=t.oClasses.sSortColumn,r=Ct(t),c=t.oFeatures;if(c.bSort&&c.bSortClasses){for(e=0,n=a.length;e<n;e++)o=a[e].src,i(he(t.aoData,"anCells",o)).removeClass(s+(e<2?e+1:3));for(e=0,n=r.length;e<n;e++)o=r[e].src,i(he(t.aoData,"anCells",o)).addC
return Ue(e,t,xe(o))});var a,s,r,c,l,u=this.columns(e,o),d=this.rows(t,o),h=this.iterator("table",function(t,e){for(a=[],s=0,r=d[e].length;s<r;s++)for(c=0,l=u[e].length;c<l;c++)a.push({row:d[e][s],column:u[e][c]});return a},1);return i.extend(h.selector,{cols:e,rows:t,opts:o}),h}),Qt("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(t,e,i){var o=t.aoData[e].anCells;return o?o[i]:n},1)}),Gt("cells().data()",function(){return this.iterator("cell",function(t,e,n){return T(t,e,n)},1)}),Qt("cells().cache()","cell().cache()",function(t){return t="search"===t?"_aFilterData":"_aSortData",this.iterator("cell",function(e,n,i){return e.aoData[n][t][i]},1)}),Qt("cells().render()","cell().render()",function(t){return this.iterator("cell",function(e,n,i){return T(e,n,i,t)},1)}),Qt("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(t,e,n){return{row:e,column:n,columnVisible:m(t,n)}},1)}),Qt("cells().invalidate()","cell().invalidate()",function(t){return this.iterator("cell",function(e,n,i){D(e,n,t,i)})}),Gt("cell()",function(t,e,n){return Le(this.cells(t,e,n))}),Gt("cell().data()",function(t){var e=this.context,i=this[0];return t===n?e.length&&i.length?T(e[0],i[0].row,i[0].column):n:(w(e[0],i[0].row,i[0].column,t),D(e[0],i[0].row,"data",i[0].column),this)}),Gt("order()",function(t,e){var o=this.context;return t===n?0!==o.length?o[0].aaSorting:n:("number"==typeof t?t=[[t,e]]:i.isArray(t[0])||(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),Gt("order.listener()",function(t,e,n){return this.iterator("table",function(i){xt(i,t,e,n)})}),Gt(["columns().order()","column().order()"],function(t){var e=this;return this.iterator("table",function(n,o){var a=[];i.each(e[o],function(e,n){a.push([n,t])}),n.aaSorting=a})}),Gt("search()",function(t,e,o,a){var s=this.context;return t===n?0!==s.length?s[0].oPreviousSearch.sSearch:n:this.iterator("table",function(n){n.oFeatures.bFilter&&V(n,i.extend({},n.oPreviousSearch,{sSearch:t+"",bRegex:null!==e&&e,bSmart:null===o||o,bCaseInsensitive:null===a||a}),1)})}),Qt("columns().search()","column().search()",function(t,e,o,a){return this.iterator("column",function(s,r){var c=s.aoPreSearchCols;return t===n?c[r].sSearch:void(s.oFeatures.bFilter&&(i.extend(c[r],{sSearch:t+"",bRegex:null!==e&&e,bSmart:null===o||o,bCaseInsensitive:null===a||a}),V(s,s.oPreviousSearch,1)))})}),Gt("state()",function(){return this.context.length?this.context[0].oSavedState:null}),Gt("state.clear()",function(){return this.iterator("table",function(t){t.fnStateSaveCallback.call(t.oInstance,t,{})})}),Gt("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),Gt("state.save()",function(){return this.iterator("table",function(t){kt(t)})}),Yt.versionCheck=Yt.fnVersionCheck=function(t){for(var e,n,i=Yt.version.split("."),o=t.split("."),a=0,s=o.length;a<s;a++)if(e=parseInt(i[a],10)||0,n=parseInt(o[a],10)||0,e!==n)return e>n;return!0},Yt.isDataTable=Yt.fnIsDataTable=function(t){var e=i(t).get(0),n=!1;return i.each(Yt.settings,function(t,i){i.nTable!==e&&i.nScrollHead!==e&&i.nScrollFoot!==e||(n=!0)}),n},Yt.tables=Yt.fnTables=function(t){return i.map(Yt.settings,function(e){if(!t||t&&i(e.nTable).is(":visible"))return e.nTable})},Yt.util={throttle:Mt,escapeRegex:tt},Yt.camelToHungarian=a,Gt("$()",function(t,e){var n=this.rows(e).nodes(),o=i(n);return i([].concat(o.filter(t).toArray(),o.find(t).toArray()))}),i.each(["on","one","off"],function(t,e){Gt(e+"()",function(){var t=Array.prototype.slice.call(arguments);t[0].match(/\.dt\b/)||(t[0]+=".dt");var n=i(this.tables().nodes());return n[e].apply(n,t),this})}),Gt("clear()",function(){return this.iterator("table",function(t){x(t)})}),Gt("settings()",function(){return new Kt(this.context,this.context)}),Gt("data()",function(){return this.iterator("table",function(t){return he(t.aoData,"_aData")}).flatten()}),Gt("destroy()",function(e){return e=e||!1,this.iterator("table",function(n){var o,a=n.nTableWrapper.parentNode,s=n.oClasses,r=n.nTable,c=n.nTBody
d.a.Vb(e)},Cb:function(t,e){if(t.name=e,7>=f)try{t.mergeAttributes(n.createElement("<input name='"+t.name+"'/>"),!1)}catch(i){}},Vb:function(t){9<=f&&(t=1==t.nodeType?t:t.parentNode,t.style&&(t.style.zoom=t.style.zoom))},Tb:function(t){if(f){var e=t.style.width;t.style.width=0,t.style.width=e}},ic:function(t,e){t=d.a.c(t),e=d.a.c(e);for(var n=[],i=t;i<=e;i++)n.push(i);return n},R:function(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e},mc:6===f,nc:7===f,oa:f,ob:function(t,e){for(var n=d.a.R(t.getElementsByTagName("input")).concat(d.a.R(t.getElementsByTagName("textarea"))),i="string"==typeof e?function(t){return t.name===e}:function(t){return e.test(t.name)},o=[],a=n.length-1;0<=a;a--)i(n[a])&&o.push(n[a]);return o},fc:function(t){return"string"==typeof t&&(t=d.a.ta(t))?a&&a.parse?a.parse(t):new Function("return "+t)():null},Ya:function(t,e,n){if(!a||!a.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return a.stringify(d.a.c(t),e,n)},gc:function(t,e,i){i=i||{};var o=i.params||{},a=i.includeFields||this.mb,r=t;if("object"==typeof t&&"form"===d.a.B(t))for(var r=t.action,c=a.length-1;0<=c;c--)for(var l=d.a.ob(t,a[c]),u=l.length-1;0<=u;u--)o[l[u].name]=l[u].value;e=d.a.c(e);var h=n.createElement("form");h.style.display="none",h.action=r,h.method="post";for(var p in e)t=n.createElement("input"),t.name=p,t.value=d.a.Ya(d.a.c(e[p])),h.appendChild(t);s(o,function(t,e){var i=n.createElement("input");i.name=t,i.value=e,h.appendChild(i)}),n.body.appendChild(h),i.submitter?i.submitter(h):h.submit(),setTimeout(function(){h.parentNode.removeChild(h)},0)}}}(),d.b("utils",d.a),d.b("utils.arrayForEach",d.a.r),d.b("utils.arrayFirst",d.a.hb),d.b("utils.arrayFilter",d.a.la),d.b("utils.arrayGetDistinctValues",d.a.ib),d.b("utils.arrayIndexOf",d.a.l),d.b("utils.arrayMap",d.a.ya),d.b("utils.arrayPushAll",d.a.$),d.b("utils.arrayRemoveItem",d.a.ma),d.b("utils.extend",d.a.extend),d.b("utils.fieldsIncludedWithJsonPost",d.a.mb),d.b("utils.getFormFields",d.a.ob),d.b("utils.peekObservable",d.a.Sa),d.b("utils.postJson",d.a.gc),d.b("utils.parseJson",d.a.fc),d.b("utils.registerEventHandler",d.a.q),d.b("utils.stringifyJson",d.a.Ya),d.b("utils.range",d.a.ic),d.b("utils.toggleDomNodeCssClass",d.a.ua),d.b("utils.triggerEvent",d.a.ha),d.b("utils.unwrapObservable",d.a.c),d.b("utils.objectForEach",d.a.A),d.b("utils.addOrRemoveItem",d.a.Y),d.b("unwrap",d.a.c),Function.prototype.bind||(Function.prototype.bind=function(t){var e=this,n=Array.prototype.slice.call(arguments);return t=n.shift(),function(){return e.apply(t,n.concat(Array.prototype.slice.call(arguments)))}}),d.a.f=new function(){function e(e,a){var s=e[i];if(!s||"null"===s||!o[s]){if(!a)return t;s=e[i]="ko"+n++,o[s]={}}return o[s]}var n=0,i="__ko__"+(new Date).getTime(),o={};return{get:function(n,i){var o=e(n,!1);return o===t?t:o[i]},set:function(n,i,o){o===t&&e(n,!1)===t||(e(n,!0)[i]=o)},clear:function(t){var e=t[i];return!!e&&(delete o[e],t[i]=null,!0)},L:function(){return n++ +i}}},d.b("utils.domData",d.a.f),d.b("utils.domData.clear",d.a.f.clear),d.a.u=new function(){function e(e,n){var o=d.a.f.get(e,i);return o===t&&n&&(o=[],d.a.f.set(e,i,o)),o}function n(t){var i=e(t,!1);if(i)for(var i=i.slice(0),o=0;o<i.length;o++)i[o](t);if(d.a.f.clear(t),d.a.u.cleanExternalData(t),s[t.nodeType])for(i=t.firstChild;t=i;)i=t.nextSibling,8===t.nodeType&&n(t)}var i=d.a.f.L(),a={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{ja:function(t,n){if("function"!=typeof n)throw Error("Callback must be a function");e(t,!0).push(n)},Ab:function(n,o){var a=e(n,!1);a&&(d.a.ma(a,o),0==a.length&&d.a.f.set(n,i,t))},M:function(t){if(a[t.nodeType]&&(n(t),s[t.nodeType])){var e=[];d.a.$(e,t.getElementsByTagName("*"));for(var i=0,o=e.length;i<o;i++)n(e[i])}return t},removeNode:function(t){d.M(t),t.parentNode&&t.parentNode.removeChild(t)},cleanExternalData:function(t){o&&"function"==typeof o.cleanData&&o.cleanData([t])}}},d.M=d.a.u.M,d.removeNode=d.a.u.remove
2018-04-29 16:27:55 +02:00
},d.C.prototype.makeTemplateSource=function(t,e){if("string"==typeof t){e=e||n;var i=e.getElementById(t);if(!i)throw Error("Cannot find template with ID "+t);return new d.n.j(i)}if(1==t.nodeType||8==t.nodeType)return new d.n.Z(t);throw Error("Unknown template type: "+t)},d.C.prototype.renderTemplate=function(t,e,n,i){return t=this.makeTemplateSource(t,i),this.renderTemplateSource(t,e,n)},d.C.prototype.isTemplateRewritten=function(t,e){return!1===this.allowTemplateRewriting||this.makeTemplateSource(t,e).data("isRewritten")},d.C.prototype.rewriteTemplate=function(t,e,n){t=this.makeTemplateSource(t,n),e=e(t.text()),t.text(e),t.data("isRewritten",!0)},d.b("templateEngine",d.C),d.Za=function(){function t(t,e,n,i){t=d.g.Ra(t);for(var o=d.g.aa,a=0;a<t.length;a++){var s=t[a].key;if(o.hasOwnProperty(s)){var r=o[s];if("function"==typeof r){if(s=r(t[a].value))throw Error(s)}else if(!r)throw Error("This template engine does not support the '"+s+"' binding within its templates")}}return n="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+d.g.qa(t,{valueAccessors:!0})+" } })()},'"+n.toLowerCase()+"')",i.createJavaScriptEvaluatorBlock(n)+e}var e=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,n=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Ub:function(t,e,n){e.isTemplateRewritten(t,n)||e.rewriteTemplate(t,function(t){return d.Za.dc(t,e)},n)},dc:function(i,o){return i.replace(e,function(e,n,i,a,s){return t(s,n,i,o)}).replace(n,function(e,n){return t(n,"<!-- ko -->","#comment",o)})},Mb:function(t,e){return d.w.Na(function(n,i){var o=n.nextSibling;o&&o.nodeName.toLowerCase()===e&&d.xa(o,t,i)})}}}(),d.b("__tr_ambtns",d.Za.Mb),function(){d.n={},d.n.j=function(t){this.j=t},d.n.j.prototype.text=function(){var t=d.a.B(this.j),t="script"===t?"text":"textarea"===t?"value":"innerHTML";if(0==arguments.length)return this.j[t];var e=arguments[0];"innerHTML"===t?d.a.Va(this.j,e):this.j[t]=e};var e=d.a.f.L()+"_";d.n.j.prototype.data=function(t){return 1===arguments.length?d.a.f.get(this.j,e+t):void d.a.f.set(this.j,e+t,arguments[1])};var n=d.a.f.L();d.n.Z=function(t){this.j=t},d.n.Z.prototype=new d.n.j,d.n.Z.prototype.text=function(){if(0==arguments.length){var e=d.a.f.get(this.j,n)||{};return e.$a===t&&e.Ba&&(e.$a=e.Ba.innerHTML),e.$a}d.a.f.set(this.j,n,{$a:arguments[0]})},d.n.j.prototype.nodes=function(){return 0==arguments.length?(d.a.f.get(this.j,n)||{}).Ba:void d.a.f.set(this.j,n,{Ba:arguments[0]})},d.b("templateSources",d.n),d.b("templateSources.domElement",d.n.j),d.b("templateSources.anonymousTemplate",d.n.Z)}(),function(){function e(t,e,n){var i;for(e=d.e.nextSibling(e);t&&(i=t)!==e;)t=d.e.nextSibling(i),n(i,t)}function n(t,n){if(t.length){var i=t[0],o=t[t.length-1],a=i.parentNode,s=d.J.instance,r=s.preprocessNode;if(r){if(e(i,o,function(t,e){var n=t.previousSibling,a=r.call(s,t);a&&(t===i&&(i=a[0]||e),t===o&&(o=a[a.length-1]||n))}),t.length=0,!i)return;i===o?t.push(i):(t.push(i,o),d.a.ea(t,a))}e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||d.fb(n,t)}),e(i,o,function(t){1!==t.nodeType&&8!==t.nodeType||d.w.Ib(t,[n])}),d.a.ea(t,a)}}function i(t){return t.nodeType?t:0<t.length?t[0]:null}function o(t,e,o,s,r){r=r||{};var c=t&&i(t),c=c&&c.ownerDocument,l=r.templateEngine||a;if(d.Za.Ub(o,l,c),o=l.renderTemplate(o,s,r,c),"number"!=typeof o.length||0<o.length&&"number"!=typeof o[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(c=!1,e){case"replaceChildren":d.e.U(t,o),c=!0;break;case"replaceNode":d.a.Bb(t,o),c=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+e)}return c&&(n(o,s),r.afterRender&&d.k.t(r.afterRender,null,[o,s.$data])),o}var a;d.Wa=function(e){if(e!=t&&!(e instanceof d.C))throw Error("templateEngine must inherit from ko.templateEngine");a=e},d.Ta=function(e,n,s,r,c){if(s=s||{},(s.templateEngine||a)==t)throw Error("Set a template engine before calling renderTemplate");if(c=c||"replaceChildren",r){var l=i(r);return d.h(function(){var t=n&&n instanceof d.I?n:new d.I(d.a.c(n
var n;return function(){return--t>0?n=e.apply(this,arguments):e=null,n}},p.once=p.partial(p.before,2),p.keys=function(t){if(!p.isObject(t))return[];if(d)return d(t);var e=[];for(var n in t)p.has(t,n)&&e.push(n);return e},p.values=function(t){for(var e=p.keys(t),n=e.length,i=Array(n),o=0;o<n;o++)i[o]=t[e[o]];return i},p.pairs=function(t){for(var e=p.keys(t),n=e.length,i=Array(n),o=0;o<n;o++)i[o]=[e[o],t[e[o]]];return i},p.invert=function(t){for(var e={},n=p.keys(t),i=0,o=n.length;i<o;i++)e[t[n[i]]]=n[i];return e},p.functions=p.methods=function(t){var e=[];for(var n in t)p.isFunction(t[n])&&e.push(n);return e.sort()},p.extend=function(t){if(!p.isObject(t))return t;for(var e,n,i=1,o=arguments.length;i<o;i++){e=arguments[i];for(n in e)l.call(e,n)&&(t[n]=e[n])}return t},p.pick=function(t,e,n){var i,o={};if(null==t)return o;if(p.isFunction(e)){e=f(e,n);for(i in t){var a=t[i];e(a,i,t)&&(o[i]=a)}}else{var c=r.apply([],s.call(arguments,1));t=new Object(t);for(var l=0,u=c.length;l<u;l++)i=c[l],i in t&&(o[i]=t[i])}return o},p.omit=function(t,e,n){if(p.isFunction(e))e=p.negate(e);else{var i=p.map(r.apply([],s.call(arguments,1)),String);e=function(t,e){return!p.contains(i,e)}}return p.pick(t,e,n)},p.defaults=function(t){if(!p.isObject(t))return t;for(var e=1,n=arguments.length;e<n;e++){var i=arguments[e];for(var o in i)void 0===t[o]&&(t[o]=i[o])}return t},p.clone=function(t){return p.isObject(t)?p.isArray(t)?t.slice():p.extend({},t):t},p.tap=function(t,e){return e(t),t};var M=function(t,e,n,i){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof p&&(t=t._wrapped),e instanceof p&&(e=e._wrapped);var o=c.call(t);if(o!==c.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}if("object"!=typeof t||"object"!=typeof e)return!1;for(var a=n.length;a--;)if(n[a]===t)return i[a]===e;var s=t.constructor,r=e.constructor;if(s!==r&&"constructor"in t&&"constructor"in e&&!(p.isFunction(s)&&s instanceof s&&p.isFunction(r)&&r instanceof r))return!1;n.push(t),i.push(e);var l,u;if("[object Array]"===o){if(l=t.length,u=l===e.length)for(;l--&&(u=M(t[l],e[l],n,i)););}else{var d,h=p.keys(t);if(l=h.length,u=p.keys(e).length===l)for(;l--&&(d=h[l],u=p.has(e,d)&&M(t[d],e[d],n,i)););}return n.pop(),i.pop(),u};p.isEqual=function(t,e){return M(t,e,[],[])},p.isEmpty=function(t){if(null==t)return!0;if(p.isArray(t)||p.isString(t)||p.isArguments(t))return 0===t.length;for(var e in t)if(p.has(t,e))return!1;return!0},p.isElement=function(t){return!(!t||1!==t.nodeType)},p.isArray=u||function(t){return"[object Array]"===c.call(t)},p.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},p.each(["Arguments","Function","String","Number","Date","RegExp"],function(t){p["is"+t]=function(e){return c.call(e)==="[object "+t+"]"}}),p.isArguments(arguments)||(p.isArguments=function(t){return p.has(t,"callee")}),"function"!=typeof/./&&(p.isFunction=function(t){return"function"==typeof t||!1}),p.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},p.isNaN=function(t){return p.isNumber(t)&&t!==+t},p.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===c.call(t)},p.isNull=function(t){return null===t},p.isUndefined=function(t){return void 0===t},p.has=function(t,e){return null!=t&&l.call(t,e)},p.noConflict=function(){return t._=e,this},p.identity=function(t){return t},p.constant=function(t){return function(){return t}},p.noop=function(){},p.property=function(t){return function(e){return e[t]}},p.matches=function(t){var e=p.pairs(t),n=e.length;return function(t){if(null==t)return!n;t=new Object(t);for(var i=0;i<n;i++){var o=e[i],a=o[0];if(o[1]!==t[a]||!(a in t))return!1}return!0}},p.times=function(t,e,n){var i=Array(Math.max(0,t));e=f(e,n,1);for(var o=0;o<t;o++)i[o]=e(o);return i},p.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},p.now=Date.now||function(){return(new Date).getTime()};var y={"&":"&amp;","<":"&lt;",">":"&gt;"
return{separators:e,parts:n}},parseDate:function(i,o,a){function s(){var t=this.slice(0,h[u].length),e=h[u].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!i)return e;if(i instanceof Date)return i;"string"==typeof o&&(o=g.parseFormat(o));var r,c,u,d=/([\-+]\d+)([dmwy])/,h=i.match(/([\-+]\d+)([dmwy])/g);if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(i)){for(i=new Date,u=0;u<h.length;u++)switch(r=d.exec(h[u]),c=parseInt(r[1]),r[2]){case"d":i.setUTCDate(i.getUTCDate()+c);break;case"m":i=l.prototype.moveMonth.call(l.prototype,i,c);break;case"w":i.setUTCDate(i.getUTCDate()+7*c);break;case"y":i=l.prototype.moveYear.call(l.prototype,i,c)}return n(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),0,0,0)}h=i&&i.match(this.nonpunctuation)||[],i=new Date;var p,f,b={},v=["yyyy","yy","M","MM","m","mm","d","dd"],M={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){if(isNaN(t))return t;for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!==e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};M.M=M.MM=M.mm=M.m,M.dd=M.d,i=n(i.getFullYear(),i.getMonth(),i.getDate(),0,0,0);var y=o.parts.slice();if(h.length!==y.length&&(y=t(y).filter(function(e,n){return t.inArray(n,v)!==-1}).toArray()),h.length===y.length){var A;for(u=0,A=y.length;u<A;u++){if(p=parseInt(h[u],10),r=y[u],isNaN(p))switch(r){case"MM":f=t(m[a].months).filter(s),p=t.inArray(f[0],m[a].months)+1;break;case"M":f=t(m[a].monthsShort).filter(s),p=t.inArray(f[0],m[a].monthsShort)+1}b[r]=p}var _,z;for(u=0;u<v.length;u++)z=v[u],z in b&&!isNaN(b[z])&&(_=new Date(i),M[z](_,b[z]),isNaN(_)||(i=_))}return i},formatDate:function(e,n,i){if(!e)return"";"string"==typeof n&&(n=g.parseFormat(n));var o={d:e.getUTCDate(),D:m[i].daysShort[e.getUTCDay()],DD:m[i].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:m[i].monthsShort[e.getUTCMonth()],MM:m[i].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m,e=[];for(var a=t.extend([],n.separators),s=0,r=n.parts.length;s<=r;s++)a.length&&e.push(a.shift()),e.push(o[n.parts[s]]);return e.join("")},headTemplate:'<thead><tr><th class="prev">&#171;</th><th colspan="5" class="datepicker-switch"></th><th class="next">&#187;</th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};g.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+g.headTemplate+"<tbody></tbody>"+g.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+g.headTemplate+g.contTemplate+g.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=g,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=d,this},t.fn.datepicker.version="1.4.0",t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var n=t(this);n.data("datepicker")||(e.preventDefault(),h.call(n,"show"))}),t(function(){h.call(t('[data-provide="datepicker-inline"]'))})}(window.jQuery),!function(t){t.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}(jQuery),!function(t){t.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],mon
(e.status!==n.UPLOADING||t)&&this.removeFile(e);return null},n.prototype.createThumbnail=function(t,e){var n;return n=new FileReader,n.onload=function(i){return function(){return"image/svg+xml"===t.type?(i.emit("thumbnail",t,n.result),void(null!=e&&e())):i.createThumbnailFromUrl(t,n.result,e)}}(this),n.readAsDataURL(t)},n.prototype.createThumbnailFromUrl=function(t,e,n,i){var o;return o=document.createElement("img"),i&&(o.crossOrigin=i),o.onload=function(e){return function(){var i,s,r,c,l,u,d,h;if(t.width=o.width,t.height=o.height,r=e.options.resize.call(e,t),null==r.trgWidth&&(r.trgWidth=r.optWidth),null==r.trgHeight&&(r.trgHeight=r.optHeight),i=document.createElement("canvas"),s=i.getContext("2d"),i.width=r.trgWidth,i.height=r.trgHeight,a(s,o,null!=(l=r.srcX)?l:0,null!=(u=r.srcY)?u:0,r.srcWidth,r.srcHeight,null!=(d=r.trgX)?d:0,null!=(h=r.trgY)?h:0,r.trgWidth,r.trgHeight),c=i.toDataURL("image/png"),e.emit("thumbnail",t,c),null!=n)return n()}}(this),null!=n&&(o.onerror=n),o.src=e},n.prototype.processQueue=function(){var t,e,n,i;if(e=this.options.parallelUploads,n=this.getUploadingFiles().length,t=n,!(n>=e)&&(i=this.getQueuedFiles(),i.length>0)){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,e-n));for(;t<e;){if(!i.length)return;this.processFile(i.shift()),t++}}},n.prototype.processFile=function(t){return this.processFiles([t])},n.prototype.processFiles=function(t){var e,i,o;for(i=0,o=t.length;i<o;i++)e=t[i],e.processing=!0,e.status=n.UPLOADING,this.emit("processing",e);return this.options.uploadMultiple&&this.emit("processingmultiple",t),this.uploadFiles(t)},n.prototype._getFilesWithXhr=function(t){var e,n;return n=function(){var n,i,o,a;for(o=this.files,a=[],n=0,i=o.length;n<i;n++)e=o[n],e.xhr===t&&a.push(e);return a}.call(this)},n.prototype.cancelUpload=function(t){var e,i,o,a,s,r,c;if(t.status===n.UPLOADING){for(i=this._getFilesWithXhr(t.xhr),o=0,s=i.length;o<s;o++)e=i[o],e.status=n.CANCELED;for(t.xhr.abort(),a=0,r=i.length;a<r;a++)e=i[a],this.emit("canceled",e);this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else(c=t.status)!==n.ADDED&&c!==n.QUEUED||(t.status=n.CANCELED,this.emit("canceled",t),this.options.uploadMultiple&&this.emit("canceledmultiple",[t]));if(this.options.autoProcessQueue)return this.processQueue()},o=function(){var t,e;return e=arguments[0],t=2<=arguments.length?c.call(arguments,1):[],"function"==typeof e?e.apply(this,t):e},n.prototype.uploadFile=function(t){return this.uploadFiles([t])},n.prototype.uploadFiles=function(t){var e,a,s,r,c,l,u,d,h,p,f,m,g,b,v,M,y,A,_,z,T,w,C,N,O,S,x,L,D,k,q,W,E,B;for(_=new XMLHttpRequest,z=0,N=t.length;z<N;z++)e=t[z],e.xhr=_;m=o(this.options.method,t),y=o(this.options.url,t),_.open(m,y,!0),_.withCredentials=!!this.options.withCredentials,v=null,s=function(n){return function(){var i,o,a;for(a=[],i=0,o=t.length;i<o;i++)e=t[i],a.push(n._errorProcessing(t,v||n.options.dictResponseError.replace("{{statusCode}}",_.status),_));return a}}(this),M=function(n){return function(i){var o,a,s,r,c,l,u,d,h;if(null!=i)for(a=100*i.loaded/i.total,s=0,l=t.length;s<l;s++)e=t[s],e.upload={progress:a,total:i.total,bytesSent:i.loaded};else{for(o=!0,a=100,r=0,u=t.length;r<u;r++)e=t[r],100===e.upload.progress&&e.upload.bytesSent===e.upload.total||(o=!1),e.upload.progress=a,e.upload.bytesSent=e.upload.total;if(o)return}for(h=[],c=0,d=t.length;c<d;c++)e=t[c],h.push(n.emit("uploadprogress",e,a,e.upload.bytesSent));return h}}(this),_.onload=function(e){return function(i){var o;if(t[0].status!==n.CANCELED&&4===_.readyState){if(v=_.responseText,_.getResponseHeader("content-type")&&~_.getResponseHeader("content-type").indexOf("application/json"))try{v=JSON.parse(v)}catch(a){i=a,v="Invalid JSON response from server."}return M(),200<=(o=_.status)&&o<300?e._finished(t,v,i):s()}}}(this),_.onerror=function(e){return function(){if(t[0].status!==n.CANCELED)return s()}}(this),b=null!=(D=_.upload)?D:_,b.onprogress=M,l={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"},this.options.headers&&i(l,this.options.headers);for(r in l)c=l[r],c&&_.s
2018-05-01 16:57:35 +02:00
this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(t){this.input.setQuery(e.toStr(t))},getVal:function(){return this.input.getQuery()},select:function(t){var e=this.menu.getSelectableData(t);return!(!e||this.eventBus.before("select",e.obj))&&(this.input.setQuery(e.val,!0),this.eventBus.trigger("select",e.obj),this.close(),!0)},autocomplete:function(t){var e,n,i;return e=this.input.getQuery(),n=this.menu.getSelectableData(t),i=n&&e!==n.val,!(!i||this.eventBus.before("autocomplete",n.obj))&&(this.input.setQuery(n.val),this.eventBus.trigger("autocomplete",n.obj),!0)},moveCursor:function(t){var e,n,i,o,a;return e=this.input.getQuery(),n=this.menu.selectableRelativeToCursor(t),i=this.menu.getSelectableData(n),o=i?i.obj:null,a=this._minLengthMet()&&this.menu.update(e),!a&&!this.eventBus.before("cursorchange",o)&&(this.menu.setCursor(n),i?this.input.setInputValue(i.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",o),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),n}();!function(){"use strict";function o(e,n){e.each(function(){var e,i=t(this);(e=i.data(m.typeahead))&&n(e,i)})}function a(t,e){return t.clone().addClass(e.classes.hint).removeData().css(e.css.hint).css(d(t)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function r(t,e){t.data(m.attrs,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(e.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!t.attr("dir")&&t.attr("dir","auto")}catch(n){}return t}function d(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function h(t){var n,i;n=t.data(m.www),i=t.parent().filter(n.selectors.wrapper),e.each(t.data(m.attrs),function(n,i){e.isUndefined(n)?t.removeAttr(i):t.attr(i,n)}),t.removeData(m.typeahead).removeData(m.www).removeData(m.attr).removeClass(n.classes.input),i.length&&(t.detach().insertAfter(i),i.remove())}function p(n){var i,o;return i=e.isJQuery(n)||e.isElement(n),o=i?t(n).first():[],o.length?o:null}var f,m,g;f=t.fn.typeahead,m={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},g={initialize:function(o,d){function h(){var n,h,g,b,v,M,y,A,_,z,T;e.each(d,function(t){t.highlight=!!o.highlight}),n=t(this),h=t(f.html.wrapper),g=p(o.hint),b=p(o.menu),v=o.hint!==!1&&!g,M=o.menu!==!1&&!b,v&&(g=a(n,f)),M&&(b=t(f.html.menu).css(f.css.menu)),g&&g.val(""),n=r(n,f),(v||M)&&(h.css(f.css.wrapper),n.css(v?f.css.input:f.css.inputWithNoHint),n.wrap(h).parent().prepend(v?g:null).append(M?b:null)),T=M?l:c,y=new i({el:n}),A=new s({hint:g,input:n},f),_=new T({node:b,datasets:d},f),z=new u({input:A,menu:_,eventBus:y,minLength:o.minLength},f),n.data(m.www,f),n.data(m.typeahead,z)}var f;return d=e.isArray(d)?d:[].slice.call(arguments,1),o=o||{},f=n(o.classNames),this.each(h)},isEnabled:function(){var t;return o(this.first(),function(e){t=e.isEnabled()}),t},enable:function(){return o(this,function(t){t.enable()}),this},disable:function(){return o(this,function(t){t.disable()}),this},isActive:function(){var t;return o(this.first(),function(e){t=e.isActive()}),t},activate:function(){return o(this,function(t){t.activate()}),this},deactivate:function(){return o(this,function(t){t.deactivate()}),this},isOpen:function(){var t;return o(this.first(),function(e){t=e.isOpen()}),t},open:function(){return o(this,function(t){t.open()}),this},close:function(){return o(this,function(t){t.close()}),this},select:function(e){var n=!1,i=t(e);return o(this.first(),function(
},greyscale:function(){return this._applyModification(u,arguments)},spin:function(){return this._applyModification(f,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(y,arguments)},splitcomplement:function(){return this._applyCombination(v,arguments)},triad:function(){return this._applyCombination(g,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},R.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&("a"===i?n[i]=t[i]:n[i]=S(t[i]));t=n}return R(t,e)},R.equals=function(t,e){return!(!t||!e)&&R(t).toRgbString()==R(e).toRgbString()},R.random=function(){return R.fromRatio({r:X(),g:X(),b:X()})},R.mix=function(t,e,n){n=0===n?0:n||50;var i,o=R(t).toRgb(),a=R(e).toRgb(),s=n/100,r=2*s-1,c=a.a-o.a;i=r*c==-1?r:(r+c)/(1+r*c),i=(i+1)/2;var l=1-i,u={r:a.r*i+o.r*l,g:a.g*i+o.g*l,b:a.b*i+o.b*l,a:a.a*s+o.a*(1-s)};return R(u)},R.readability=function(t,e){var n=R(t),i=R(e),o=n.toRgb(),a=i.toRgb(),s=n.getBrightness(),r=i.getBrightness(),c=Math.max(o.r,a.r)-Math.min(o.r,a.r)+Math.max(o.g,a.g)-Math.min(o.g,a.g)+Math.max(o.b,a.b)-Math.min(o.b,a.b);return{brightness:Math.abs(s-r),color:c}},R.isReadable=function(t,e){var n=R.readability(t,e);return n.brightness>125&&n.color>500},R.mostReadable=function(t,e){for(var n=null,i=0,o=!1,a=0;a<e.length;a++){var s=R.readability(t,e[a]),r=s.brightness>125&&s.color>500,c=3*(s.brightness/125)+s.color/500;(r&&!o||r&&o&&c>i||!r&&!o&&c>i)&&(o=r,i=c,n=R(e[a]))}return n};var F=R.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513
}function Ke(t,e,n,i){return i=i||"()",("("===i[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===i[1]?this.isBefore(e,n):!this.isAfter(e,n))}function Ge(t,e){var n,i=b(t)?t:be(t);return!(!this.isValid()||!i.isValid())&&(e=W(e||"millisecond"),"millisecond"===e?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))}function Qe(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Ze(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function tn(t,e,n){var i,o,a,s;return this.isValid()?(i=Ce(t,this),i.isValid()?(o=6e4*(i.utcOffset()-this.utcOffset()),e=W(e),"year"===e||"month"===e||"quarter"===e?(s=en(this,i),"quarter"===e?s/=3:"year"===e&&(s/=12)):(a=this-i,s="second"===e?a/1e3:"minute"===e?a/6e4:"hour"===e?a/36e5:"day"===e?(a-o)/864e5:"week"===e?(a-o)/6048e5:a),n?s:v(s)):NaN):NaN}function en(t,e){var n,i,o=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(o,"months");return e-a<0?(n=t.clone().add(o-1,"months"),i=(e-a)/(a-n)):(n=t.clone().add(o+1,"months"),i=(e-a)/(n-a)),-(o+i)||0}function nn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function on(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?T(Date.prototype.toISOString)?this.toDate().toISOString():Y(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Y(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function an(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=Y(this,e);return this.localeData().postformat(n)}function sn(t,e){return this.isValid()&&(b(t)&&t.isValid()||be(t).isValid())?Pe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function rn(t){return this.from(be(),t)}function cn(t,e){return this.isValid()&&(b(t)&&t.isValid()||be(t).isValid())?Pe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ln(t){return this.to(be(),t)}function un(t){var e;return void 0===t?this._locale._abbr:(e=te(t),null!=e&&(this._locale=e),this)}function dn(){return this._locale}function hn(t){switch(t=W(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function pn(t){return t=W(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function fn(){return this._d.valueOf()-6e4*(this._offset||0)}function mn(){return Math.floor(this.valueOf()/1e3)}function gn(){return new Date(this.valueOf())}function bn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function vn(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Mn(){return this.isValid()?this.toISOString():null}function yn(){return h(this)}function An(){return c({},d(this))}function _n(){return d(this).overflow}function zn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Tn(t,e){U(0,[t,t.length],0,e)}function wn(t){return Sn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Cn(t){return Sn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Nn(){return _t(this.year(),1,4)}function On(){var t=this.localeData()._week;return _t(this.year(),t.dow,t.doy)}function Sn(t,e,n,i,o){var a;return null==t?At(this,i,o).year:(a=_t(t,i,o),e>a&&(e=a),xn.call(this,t,e,n,i,o))}function xn(t,e,n,i,o){var a=yt(t,e,n,i,o),s=vt(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Ln(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Dn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return nu
links:["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Sao_Tome","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/St_Helena","Africa/Addis_Ababa|Africa/Asmara","Africa/Addis_Ababa|Africa/Asmera","Africa/Addis_Ababa|Africa/Dar_es_Salaam","Africa/Addis_Ababa|Africa/Djibouti","Africa/Addis_Ababa|Africa/Kampala","Africa/Addis_Ababa|Africa/Mogadishu","Africa/Addis_Ababa|Africa/Nairobi","Africa/Addis_Ababa|Indian/Antananarivo","Africa/Addis_Ababa|Indian/Comoro","Africa/Addis_Ababa|Indian/Mayotte","Africa/Bangui|Africa/Brazzaville","Africa/Bangui|Africa/Douala","Africa/Bangui|Africa/Kinshasa","Africa/Bangui|Africa/Lagos","Africa/Bangui|Africa/Libreville","Africa/Bangui|Africa/Luanda","Africa/Bangui|Africa/Malabo","Africa/Bangui|Africa/Niamey","Africa/Bangui|Africa/Porto-Novo","Africa/Blantyre|Africa/Bujumbura","Africa/Blantyre|Africa/Gaborone","Africa/Blantyre|Africa/Harare","Africa/Blantyre|Africa/Kigali","Africa/Blantyre|Africa/Lubumbashi","Africa/Blantyre|Africa/Lusaka","Africa/Blantyre|Africa/Maputo","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Juba|Africa/Khartoum","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Anguilla|America/Antigua","America/Anguilla|America/Dominica","America/Anguilla|America/Grenada","America/Anguilla|America/Guadeloupe","America/Anguilla|America/Marigot","America/Anguilla|America/Montserrat","America/Anguilla|America/Port_of_Spain","America/Anguilla|America/St_Barthelemy","America/Anguilla|America/St_Kitts","America/Anguilla|America/St_Lucia","America/Anguilla|America/St_Thomas","America/Anguilla|America/St_Vincent","America/Anguilla|America/Tortola","America/Anguilla|America/Virgin","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Aruba|America/Curacao","America/Aruba|America/Kralendijk","America/Aruba|America/Lower_Princes","America/Atikokan|America/Coral_Harbour","America/Chicago|US/Central","America/Denver|America/Shiprock","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Ensenada|America/Tijuana","America/Ensenada|Mexico/BajaNorte","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/Montreal|America/Toronto","America/Montreal|Canada/Eastern","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Phoenix|US/Arizona","America/Porto_Acre|America/Rio_Branco","America/Porto_Acre|Brazil/Acre","America/Regina|Canada/East-Saskatchewan","America/Regina|Canada/Saskatchewan","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Antarctica/McMurdo|Antarctica/South_Pole","Antarctica/McMurdo|NZ","Antarctica/McMurdo|Pacific/Auckland","Arctic/Longyearbyen|Atlantic/Jan_Mayen","Arctic/Longyearbyen|Europe/Oslo","Asia/Aden|Asia/Kuwait","Asia/Aden|Asia/Riyadh","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bahrain|Asia/Qatar","Asia/Bangkok|Asia/Phnom_Penh","Asia/B
r.style.backgroundColor=t.cancelButtonColor),s.className=l.confirm,L(s,t.confirmButtonClass),r.className=l.cancel,L(r,t.cancelButtonClass),t.buttonsStyling?(L(s,l.styled),L(r,l.styled)):(D(s,l.styled),D(r,l.styled),s.style.backgroundColor=s.style.borderLeftColor=s.style.borderRightColor="",r.style.backgroundColor=r.style.borderLeftColor=r.style.borderRightColor=""),t.animation===!0?D(e,l.noanimation):L(e,l.noanimation)},Y=function(e,i){var o=y();e?(L(o,l.show),L(s,l.fade),D(o,l.hide)):D(o,l.fade),q(o),s.style.overflowY="hidden",R&&!S(o,l.noanimation)?o.addEventListener(R,function a(){o.removeEventListener(R,a),s.style.overflowY="auto"}):s.style.overflowY="auto",L(s,l["in"]),L(document.body,l["in"]),t(),n(),b.previousActiveElement=document.activeElement,null!==i&&"function"==typeof i&&i.call(this,o)};return a.isVisible=function(){var t=y();return B(t)},a.queue=function(t){$=t;var e=y(),n=function(){$=[],e.removeAttribute("data-queue-step")},i=[];return new Promise(function(t,o){!function s(r,c){r<$.length?(e.setAttribute("data-queue-step",r),a($[r]).then(function(t){i.push(t),s(r+1,c)},function(t){n(),o(t)})):(n(),t(i))}(0)})},a.getQueueStep=function(){return y().getAttribute("data-queue-step")},a.insertQueueStep=function(t,e){return e&&e<$.length?$.splice(e,0,t):$.push(t)},a.deleteQueueStep=function(t){"undefined"!=typeof $[t]&&$.splice(t,1)},a.close=a.closeModal=function(t){var n=y();D(n,l.show),L(n,l.hide);var o=n.querySelector("."+l.icon+"."+u.success);D(o,"animate"),D(o.querySelector(".tip"),"animate-success-tip"),D(o.querySelector(".long"),"animate-success-long");var a=n.querySelector("."+l.icon+"."+u.error);D(a,"animate-error-icon"),D(a.querySelector(".x-mark"),"animate-x-mark");var r=n.querySelector("."+l.icon+"."+u.warning);D(r,"pulse-warning"),F();var c=function(){W(n),n.style.minHeight="",D(s,l["in"]),D(document.body,l["in"]),e(),i()};R&&!S(n,l.noanimation)?n.addEventListener(R,function d(){n.removeEventListener(R,d),S(n,l.hide)&&c()}):c(),null!==t&&"function"==typeof t&&t.call(this,n)},a.clickConfirm=function(){w().click()},a.clickCancel=function(){C().click()},a.setDefaults=function(t){if(!t)throw new Error("userParams is required");if("object"!=typeof t)throw new Error("userParams has to be a object");m(U,t)},a.resetDefaults=function(){U=m({},d)},a.noop=function(){},a.version="5.3.8","function"==typeof Promise&&(Promise.prototype.done=Promise.prototype.done||function(){return this["catch"](function(){})}),a}),window.Sweetalert2&&(window.sweetAlert=window.swal=window.Sweetalert2),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function e(t,e){return Math.round(t/e)*e}function n(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,i=n.documentElement,o=d();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0),{top:e.top+o.y-i.clientTop,left:e.left+o.x-i.clientLeft}}function i(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function o(t,e,n){c(t,e),setTimeout(function(){l(t,e)},n)}function a(t){return Math.max(Math.min(t,100),0)}function s(t){return Array.isArray(t)?t:[t]}function r(t){var e=t.split(".");return e.length>1?e[1].length:0}function c(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function l(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function u(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function d(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||""),n=t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,i=t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop;return{x:n,y:i}}function h(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerU
2018-06-10 10:28:35 +02:00
this.options.maxPatternLength=e.maxPatternLength||a.defaultOptions.maxPatternLength,this.pattern=e.caseSensitive?t:t.toLowerCase(),this.patternLen=t.length,this.patternLen<=this.options.maxPatternLength&&(this.matchmask=1<<this.patternLen-1,this.patternAlphabet=this._calculatePatternAlphabet())}var s=/ +/g,r={id:null,caseSensitive:!1,include:[],shouldSort:!0,searchFn:a,sortFn:function(t,e){return t.score-e.score},getFn:i,keys:[],verbose:!1,tokenize:!1};n.VERSION="2.0.1",n.prototype.set=function(t){return this.list=t,t},n.prototype.search=function(t){this.options.verbose&&e("=====================\n","Search term:",t),this.pattern=t,this.results=[],this.resultMap={},this._prepareSearchers(),this._startSearch(),this._computeScore(),this._sort();var n=this._format();return n},n.prototype._prepareSearchers=function(){var t=this.options,e=this.pattern,n=t.searchFn,i=e.split(s),o=0,a=i.length;if(this.options.tokenize)for(this.tokenSearchers=[];o<a;o++)this.tokenSearchers.push(new n(i[o],t));this.fullSeacher=new n(e,t)},n.prototype._startSearch=function(){var t,e,n=this.options,i=n.getFn,o=this.list,a=o.length,s=this.options.keys,r=s.length,c=null;if("string"==typeof o[0])for(t=0;t<a;t++)this._analyze(o[t],t,t);else for(t=0;t<a;t++)for(c=o[t],e=0;e<r;e++)this._analyze(i(c,s[e],[]),c,t)},n.prototype._analyze=function(t,n,i){var a,r,c,l,u,d,h,p,f,m,g,b,v,M,y,A=this.options,_=!1;if(void 0!==t&&null!==t)if(r=[],"string"==typeof t){if(a=t.split(s),A.verbose&&e("---------\n","Record:",a),this.options.tokenize){for(c=this.tokenSearchers,l=c.length,M=0;M<this.tokenSearchers.length;M++){for(m=this.tokenSearchers[M],g=[],y=0;y<a.length;y++)b=a[y],v=m.search(b),v.isMatch?(_=!0,g.push(v.score),r.push(v.score)):(g.push(1),r.push(1));A.verbose&&e('Score for "'+m.pattern+'":',g)}for(d=r[0],p=r.length,M=1;M<p;M++)d+=r[M];d/=p,A.verbose&&e("Individual word score average:",d)}f=this.fullSeacher.search(t),A.verbose&&e("Full text score:",f.score),h=f.score,void 0!==d&&(h=(h+d)/2),A.verbose&&e("Average",h),(_||f.isMatch)&&(u=this.resultMap[i],u?u.scores.push(h):(this.resultMap[i]={item:n,scores:[h]},this.results.push(this.resultMap[i])))}else if(o(t))for(M=0;M<t.length;M++)this._analyze(t[M],n,i)},n.prototype._computeScore=function(){var t,e,n,i,o,a=this.results;for(t=0;t<a.length;t++){for(n=0,i=a[t].scores,o=i.length,e=0;e<o;e++)n+=i[e];a[t].score=n/o}},n.prototype._sort=function(){var t=this.options;t.shouldSort&&(t.verbose&&e("Sorting...."),this.results.sort(t.sortFn))},n.prototype._format=function(){var t,n,i,o,a,s=this.options,r=s.getFn,c=[],l=this.results;for(s.verbose&&e("------------\n","Output:\n",l),o=s.id?function(t){l[t].item=r(l[t].item,s.id,[])[0]}:function(){},a=function(t){var e,n,i;if(s.include.length>0)for(e={item:l[t].item},i=0;i<s.include.length;i++)n=s.include[i],e[n]=l[t][n];else e=l[t].item;return e},n=0,i=l.length;n<i;n++)o(n),t=a(n),c.push(t);return c},a.defaultOptions={location:0,distance:100,threshold:.6,maxPatternLength:32},a.prototype._calculatePatternAlphabet=function(){var t={},e=0;for(e=0;e<this.patternLen;e++)t[this.pattern.charAt(e)]=0;for(e=0;e<this.patternLen;e++)t[this.pattern.charAt(e)]|=1<<this.pattern.length-e-1;return t},a.prototype._bitapScore=function(t,e){var n=t/this.patternLen,i=Math.abs(this.options.location-e);return this.options.distance?n+i/this.options.distance:i?1:n},a.prototype.search=function(t){var e,n,i,o,a,r,c,l,u,d,h,p,f,m,g,b,v,M,y=this.options;if(t=y.caseSensitive?t:t.toLowerCase(),this.pattern===t)return{isMatch:!0,score:0};if(this.patternLen>y.maxPatternLength)return v=t.match(new RegExp(this.pattern.replace(s,"|"))),M=!!v,{isMatch:M,score:M?.5:1};for(o=y.location,i=t.length,a=y.threshold,r=t.indexOf(this.pattern,o),r!=-1&&(a=Math.min(this._bitapScore(0,r),a),r=t.lastIndexOf(this.pattern,o+this.patternLen),r!=-1&&(a=Math.min(this._bitapScore(0,r),a))),r=-1,g=1,b=[],u=this.patternLen+i,e=0;e<this.patternLen;e++){for(c=0,l=u;c<l;)this._bitapScore(e,o+l)<=a?c=l:u=l,l=Math.floor((u-c)/2+c);for(u=l,d=Math.max(1,o-l+1),h=Math.min(o+l,i)+this.patternLen,p=Array(h+2),p[h+1]=(1<<e)-1,n=h;n>=d;n--
2018-06-17 10:04:29 +02:00
function e(t){var e=t.base64;e||(e="docs/"+t.public_id+"/"+t.name),e&&(window.pdfMake.vfs[e]||t.base64)&&(n%3==0&&(o={columns:[]},i.push(o)),o.columns.push({stack:[{image:e,style:"invoiceDocument",fit:[150,150]}],width:175}),n++)}if("1"!=t.account.invoice_embed_documents)return[];var n=0,i=[],o=null;if(t.documents)for(var a=0;a<t.documents.length;a++)e(t.documents[a]);if(t.expenses)for(var a=0;a<t.expenses.length;a++)for(var s=t.expenses[a],n=0;n<s.documents.length;n++)e(s.documents[n]);return i.length?{stack:i}:[]},NINJA.subtotals=function(t,e){if(!t||t.is_delivery_note)return[[]];var n=t.account,i=[];i.push([{text:invoiceLabels.subtotal,style:["subtotalsLabel","subtotalLabel"]},{text:formatMoneyInvoice(t.subtotal_amount,t),style:["subtotals","subtotal"]}]),0!=t.discount_amount&&i.push([{text:invoiceLabels.discount,style:["subtotalsLabel","discountLabel"]},{text:formatMoneyInvoice(t.discount_amount,t),style:["subtotals","discount"]}]);var o=NINJA.parseFloat(t.custom_value1),a=n.custom_fields.invoice1||invoiceLabels.surcharge,s=NINJA.parseFloat(t.custom_value2),r=n.custom_fields.invoice2||invoiceLabels.surcharge;o&&"1"==t.custom_taxes1&&i.push([{text:a,style:["subtotalsLabel","customTax1Label"]},{text:formatMoneyInvoice(t.custom_value1,t),style:["subtotals","customTax1"]}]),s&&"1"==t.custom_taxes2&&i.push([{text:r,style:["subtotalsLabel","customTax2Label"]},{text:formatMoneyInvoice(t.custom_value2,t),style:["subtotals","customTax2"]}]);for(var c in t.item_taxes)if(t.item_taxes.hasOwnProperty(c)){var l=t.item_taxes[c],u=l.name+" "+(1*l.rate).toString()+"%";i.push([{text:u,style:["subtotalsLabel","taxLabel"]},{text:formatMoneyInvoice(l.amount,t),style:["subtotals","tax"]}])}if(0!=parseFloat(t.tax_rate1||0)||t.tax_name1){var u=t.tax_name1+" "+(1*t.tax_rate1).toString()+"%";i.push([{text:u,style:["subtotalsLabel","tax1Label"]},{text:formatMoneyInvoice(t.tax_amount1,t),style:["subtotals","tax1"]}])}if(0!=parseFloat(t.tax_rate2||0)||t.tax_name2){var u=t.tax_name2+" "+(1*t.tax_rate2).toString()+"%";i.push([{text:u,style:["subtotalsLabel","tax2Label"]},{text:formatMoneyInvoice(t.tax_amount2,t),style:["subtotals","tax2"]}])}o&&"1"!=t.custom_taxes1&&i.push([{text:a,style:["subtotalsLabel","custom1Label"]},{text:formatMoneyInvoice(t.custom_value1,t),style:["subtotals","custom1"]}]),s&&"1"!=t.custom_taxes2&&i.push([{text:r,style:["subtotalsLabel","custom2Label"]},{text:formatMoneyInvoice(t.custom_value2,t),style:["subtotals","custom2"]}]);var d=t.amount-t.balance;!t.is_quote&&t.balance_amount>=0&&("1"!=t.account.hide_paid_to_date||d)&&i.push([{text:invoiceLabels.paid_to_date,style:["subtotalsLabel","paidToDateLabel"]},{text:formatMoneyInvoice(d,t),style:["subtotals","paidToDate"]}]);var h=NINJA.parseFloat(t.partial);return e&&!h||i.push([{text:t.is_quote||t.balance_amount<0?invoiceLabels.total:invoiceLabels.balance_due,style:["subtotalsLabel",h?"":"subtotalsBalanceDueLabel"]},{text:formatMoneyInvoice(t.total_amount,t),style:["subtotals",h?"":"subtotalsBalanceDue"]}]),e||h&&i.push([{text:invoiceLabels.partial_due,style:["subtotalsLabel","subtotalsBalanceDueLabel"]},{text:formatMoneyInvoice(t.balance_amount,t),style:["subtotals","subtotalsBalanceDue"]}]),NINJA.prepareDataPairs(i,"subtotals")},NINJA.subtotalsBalance=function(t){if(t.is_delivery_note)return[[]];var e=NINJA.parseFloat(t.partial);return[[{text:e?invoiceLabels.partial_due:t.is_quote||t.balance_amount<0?invoiceLabels.total:invoiceLabels.balance_due,style:["subtotalsLabel","subtotalsBalanceDueLabel"]},{text:formatMoneyInvoice(t.balance_amount,t),style:["subtotals","subtotalsBalanceDue"]}]]},NINJA.accountDetails=function(t){var e=t.account;if(t.features.invoice_settings&&e.invoice_fields)var n=JSON.parse(e.invoice_fields).account_fields1;else var n=["account.company_name","account.id_number","account.vat_number","account.website","account.email","account.phone"];for(var i=[],o=0;o<n.length;o++){var a=n[o],s=NINJA.renderField(t,a);s&&i.push(s)}return NINJA.prepareDataList(i,"accountDetails")},NINJA.accountAddress=function(t){var e=t.account;if(t.features.invoice_settings&&e.i
2016-08-15 00:03:47 +02:00
//# sourceMappingURL=built.js.map