snipe-it/public/js/vendor.js

12 lines
343 KiB
JavaScript
Raw Normal View History

if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");!function(t){"use strict";function e(e,i){if(this.element=e,this.options=i,this.$overlay=t(i.overlayTemplate),""===i.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()}function i(i){return this.each(function(){var o=t(this),r=o.data(n);if(!r){var s=t.extend({},a,o.data(),"object"==typeof i&&i);o.data(n,r=new e(o,s))}if("string"==typeof r){if(void 0===r[i])throw new Error("No method named "+i);r[i]()}})}var n="lte.boxrefresh",a={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',onLoadStart:function(){},onLoadDone:function(t){return t}};e.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(t(this)),t.get(this.options.source,this.options.params,function(e){this.options.loadInContent&&t(this.element).find(this.options.content).html(e),this.options.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},e.prototype._setUpListeners=function(){t(this.element).on("click",this.options.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},e.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},e.prototype._removeOverlay=function(){t(this.$overlay).remove()};var o=t.fn.boxRefresh;t.fn.boxRefresh=i,t.fn.boxRefresh.Constructor=e,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=o,this},t(window).on("load",function(){t('[data-widget="box-refresh"]').each(function(){i.call(t(this))})})}(jQuery),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}function i(i){return this.each(function(){var o=t(this),r=o.data(n);if(!r){var s=t.extend({},a,o.data(),"object"==typeof i&&i);o.data(n,r=new e(o,s))}if("string"==typeof i){if(void 0===r[i])throw new Error("No method named "+i);r[i]()}})}var n="lte.boxwidget",a={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},o=".box-header",r=".box-body",s=".box-footer",l=".box-tools",d="collapsed-box";e.prototype.toggle=function(){t(this.element).is(".collapsed-box")?this.expand():this.collapse()},e.prototype.expand=function(){var e=t.Event("expanded.boxwidget"),i=t.Event("expanding.boxwidget"),n=this.options.collapseIcon,a=this.options.expandIcon;t(this.element).removeClass(d),t(this.element).children(o+", "+r+", "+s).children(l).find("."+a).removeClass(a).addClass(n),t(this.element).children(r+", "+s).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.collapse=function(){var e=t.Event("collapsed.boxwidget"),i=t.Event("collapsing.boxwidget"),n=this.options.collapseIcon,a=this.options.expandIcon;t(this.element).children(o+", "+r+", "+s).children(l).find("."+n).removeClass(n).addClass(a),t(this.element).children(r+", "+s).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(d),t(this.element).trigger(e)}.bind(this)).trigger(i)},e.prototype.remove=function(){var e=t.Event("removed.boxwidget"),i=t.Event("removing.boxwidget");t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this)).trigger(i)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.collapseTrigger,function(i){return i&&i.preventDefault(),e.toggle(t(this)),!1}),t(this.element).on("click",this.options.removeTrigger,function(i){return i&&i.preventDefault(),e.remove(t(this)),!1})};var h=t.fn.boxWidget;t.fn.boxWidget=i,t.fn.boxWidget.Constructor=e,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=h,this},t(window).on("load",function(){t(".box").each(function(){i.call(t(this))})})}(jQuery),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this.hasBindedResi
var i=[],n=!0,a=!1,o=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){a=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(a)throw o}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=_.Utils,a=E.getBounds,s=E.extend,f=E.updateClasses,T=E.defer,$=["left","top","right","bottom"];_.modules.push({position:function(t){var e=this,i=t.top,n=t.left,o=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return a(e.element)}),l=r.height,d=r.width;if(0===d&&0===l&&void 0!==this.lastSize){var h=this.lastSize;d=h.width,l=h.height}var u=this.cache("target-bounds",function(){return e.getTargetBounds()}),c=u.height,p=u.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,i=t.pinnedClass;e&&g.push(e),i&&g.push(i)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=s({},o),b=s({},this.attachment);return this.options.constraints.forEach(function(t){var a=t.to,r=t.attachment,s=t.pin;void 0===r&&(r="");var h=void 0,u=void 0;if(r.indexOf(" ")>=0){var f=r.split(" "),g=P(f,2);u=g[0],h=g[1]}else h=u=r;var x=y(e,a);"target"!==u&&"both"!==u||(i<x[1]&&"top"===v.top&&(i+=c,v.top="bottom"),i+l>x[3]&&"bottom"===v.top&&(i-=c,v.top="top")),"together"===u&&("top"===v.top&&("bottom"===b.top&&i<x[1]?(i+=c,v.top="bottom",i+=l,b.top="top"):"top"===b.top&&i+l>x[3]&&i-(l-c)>=x[1]&&(i-=l-c,v.top="bottom",b.top="bottom")),"bottom"===v.top&&("top"===b.top&&i+l>x[3]?(i-=c,v.top="top",i-=l,b.top="bottom"):"bottom"===b.top&&i<x[1]&&i+(2*l-c)<=x[3]&&(i+=l-c,v.top="top",b.top="top")),"middle"===v.top&&(i+l>x[3]&&"top"===b.top?(i-=l,b.top="bottom"):i<x[1]&&"bottom"===b.top&&(i+=l,b.top="top"))),"target"!==h&&"both"!==h||(n<x[0]&&"left"===v.left&&(n+=p,v.left="right"),n+d>x[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(n<x[0]&&"left"===v.left?"right"===b.left?(n+=p,v.left="right",n+=d,b.left="left"):"left"===b.left&&(n+=p,v.left="right",n-=d,b.left="right"):n+d>x[2]&&"right"===v.left?"left"===b.left?(n-=p,v.left="left",n-=d,b.left="right"):"right"===b.left&&(n-=p,v.left="left",n+=d,b.left="left"):"center"===v.left&&(n+d>x[2]&&"left"===b.left?(n-=d,b.left="right"):n<x[0]&&"right"===b.left&&(n+=d,b.left="left"))),"element"!==u&&"both"!==u||(i<x[1]&&"bottom"===b.top&&(i+=l,b.top="top"),i+l>x[3]&&"top"===b.top&&(i-=l,b.top="bottom")),"element"!==h&&"both"!==h||(n<x[0]&&("right"===b.left?(n+=d,b.left="left"):"center"===b.left&&(n+=d/2,b.left="left")),n+d>x[2]&&("left"===b.left?(n-=d,b.left="right"):"center"===b.left&&(n-=d/2,b.left="right"))),"string"==typeof s?s=s.split(",").map(function(t){return t.trim()}):!0===s&&(s=["top","left","right","bottom"]),s=s||[];var _=[],w=[];i<x[1]&&(s.indexOf("top")>=0?(i=x[1],_.push("top")):w.push("top")),i+l>x[3]&&(s.indexOf("bottom")>=0?(i=x[3]-l,_.push("bottom")):w.push("bottom")),n<x[0]&&(s.indexOf("left")>=0?(n=x[0],_.push("left")):w.push("left")),n+d>x[2]&&(s.indexOf("right")>=0?(n=x[2]-d,_.push("right")):w.push("right")),_.length&&function(){var t=void 0;t=void 0!==e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),_.forEach(function(e){m.push(t+"-"+e)})}(),w.length&&function(){var t=void 0;t=void 0!==e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),w.forEach(function(e){m.push(t+"-"+e)})}(),(_.indexOf("left")>=0||_.indexOf("right")>=0)&&(b.left=v.left=!1),(_.indexOf("top")>=0||_.indexOf("bottom")>=0)&&(b.top=v.top=!1),v.top===o.top&&v.left===o.left&&b.top===e.attachment.top&&b.left===e.attachment.left||(e.updateAttachClasses(b,v),e.trigger("update",{attachment:b,targetAttachment:v}))}),T(function(){!1!==e.options.addTargetClasses&&f(e.target,m,g),f(e.element,m,g)}),{top:i,left:n}}});var E=_.Utils,a=E.getBounds,f=E.updateClasses,T=E.defer;_.modules.push({positio
darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",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",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",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:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:void 0!==t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a),t*=360;var a,o,r,s,l;return t=t%360/60,l=i*e,s=l*(1-Math.abs(t%2-1)),a=o=r=i-l,t=~~t,a+=[l,s,0,0,s,l][t],o+=[s,l,l,s,0,0][t],r+=[0,0,s,l,l,s][t],{r:Math.round(255*a),g:Math.round(255*o),b:Math.round(255*r),a:n}},toHex:function(t,e,i,n,a){arguments.length<=1&&(e=this.value.h,i=this.value.s,n=this.value.b,a=this.value.a);var o="#",r=this.toRGB(e,i,n,a);return this.rgbaIsTransparent(r)?"transparent":(t||(o=this.hexNumberSignPrefix?"#":""),o+((1<<24)+(parseInt(r.r)<<16)+(parseInt(r.g)<<8)+parseInt(r.b)).toString(16).slice(1))},toHSL:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a);var a=t,o=(2-e)*i,r=e*i;return r/=o>0&&o<=1?o:2-o,o/=2,r>1&&(r=1),{h:isNaN(a)?0:a,s:isNaN(r)?0:r,l:isNaN(o)?0:o,a:isNaN(n)?0:n}},toAlias:function(t,e,i,n){var a,o=0===arguments.length?this.toHex(!0):this.
this.picker.addClass("datepicker-orient-"+g),"top"===g?f-=i+parseInt(this.picker.css("padding-top")):f+=h,this.o.rtl){var m=a-(c+u);this.picker.css({top:f,right:m,zIndex:l})}else this.picker.css({top:f,left:c,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),n=!0):(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),i=i&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return v.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=t.grep(i,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+='<th class="cw">&#160;</th>');e<this.o.weekStart+7;)i+='<th class="dow',-1!==t.inArray(e,this.o.daysOfWeekDisabled)&&(i+=" disabled"),i+='">'+m[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t,e=this._utc_to_local(this.viewDate),i="",n=0;n<12;n++)t=e&&e.getMonth()===n?" focused":"",i+='<span class="month'+t+'">'+m[this.o.language].monthsShort[n]+"</span>";this.picker.find(".datepicker-months td").html(i)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],o=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),s=n();return e.getUTCFullYear()<o||e.getUTCFullYear()===o&&e.getUTCMonth()<r?i.push("old"):(e.getUTCFullYear()>o||e.getUTCFullYear()===o&&e.getUTCMonth()>r)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&a(e,s)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&i.push("range"),-1!==t.inArray(e.valueOf(),this.range)&&i.push("selected"),e.valueOf()===this.range[0]&&i.push("range-start"),e.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,n,a,o,r,s,l){for(var d,h,u,c="",f=a/10,p=this.picker.find(i),g=Math.floor(o/a)*a,m=g+9*f,v=Math.floor(this.viewDate.getFullYear()/f)*f,b=t.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/f)*f}),y=g-f;y<=m+f;y+=f)d=[n],h=null,y===g-f?d.push("old"):y===m+f&&d.push("new"),-1!==t.inArray(y,b)&&d.push("active"),(y<r||y>s)&&d.push("disabled"),y===v&&d.push("focused"),l!==t.noop&&(u=l(new Date(y,0,1)),u===e?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&d.push("disabled"),u.classes&&(d=d.concat(u.classes.split(/\s+/))),u.tooltip&&(h=u.tooltip)),c+='<span class="'+d.join(" ")+'"'+(h?' title="'+h+'"':"")+">"+y+"</span>";p.find(".datepicker-switch").text(g+"-"+m),p.find("td").html(c)},fill:function(){var a,o,r=new Date(this.viewDate),s=r.getUTCFullYear(),l=r.getUTCMonth(),d=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,h=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,u=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,f=m[this.o.language
;return e.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+i+'" height="'+n+'" src="'+t+'" preload="auto" autoplay controls class="embed-responsive-item"></video></div>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(e,i){var n=this,a=this._$element.data("width")||560,o=this._$element.data("height")||560,r=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),r||this._isExternal(e)?(i.html('<iframe src="'+e+'" frameborder="0" allowfullscreen></iframe>'),this._config.onContentLoaded.call(this)):i.load(e,t.proxy(function(){return n._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(a,o),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&e[1].length>0&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&e[2].length>0&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(t){return console.error(t),this._containerToUse().html(t),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(e,i){if(this._$galleryItems){var n=t(this._$galleryItems.get(e),!1);if(void 0!==n){var a=n.attr("data-remote")||n.attr("href");return("image"===n.attr("data-type")||this._isImage(a))&&this._preloadImage(a,!1),i>0?this._preloadImageByIndex(e+1,i-1):void 0}}}},{key:"_preloadImage",value:function(e,i){var n=this;i=i||!1;var a=new Image;return i&&function(){var o=setTimeout(function(){i.append(n._config.loadingMessage)},200);a.onload=function(){o&&clearTimeout(o),o=null;var e=t("<img />");return e.attr("src",a.src),e.addClass("img-fluid"),e.css("width","100%"),i.html(e),n._$modalArrows&&n._$modalArrows.css("display",""),n._resize(a.width,a.height),n._toggleLoading(!1),n._config.onContentLoaded.call(n)},a.onerror=function(){return n._toggleLoading(!1),n._error(n._config.strings.fail+" "+e)}}(),a.src=e,a}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(e,i){i=i||e,this._wantedWidth=e,this._wantedHeight=i;var n=e/i,a=this._padding.left+this._padding.right+this._border.left+this._border.right,o=this._config.doc.body.clientWidth>575?20:0,r=this._config.doc.body.clientWidth>575?0:20,s=Math.min(e+a,this._config.doc.body.clientWidth-o,this._config.maxWidth);e+a>s?(i=(s-a-r)/n,e=s):e+=a;var l=0,d=0;this._footerIsShown&&(d=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(l=this._$modalHeader.outerHeight(!0)||67);var h=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,u=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),c=Math.min(i,t(window).height()-h-u-l-d,this._config.maxHeight-h-l-d);i>c&&(e=Math.ceil(c*n)+a),this._$lightboxContainer.css("height",c),this._$modalDialog.css("flex",1).css("maxWidth",e);var f=this._$modal.data("bs.modal");if(f)try{f._handleUpdate()}catch(t){f.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(e){var i=this;return e=e||{},this.each(function(){var a=t(i),o=t.extend({},n.Default,a.data(),"object"==typeof e&&e);new n(i,o)})}}]),n}();t.fn[n]=r._jQueryInterface,t.fn[n].Constructor=r,t.fn[n].noConflict=function(){return t.fn[n]=a,r._jQueryInterface}}(jQuery)}(jQuery),function(t){function e(t,e,a){var o=t[0],r=/er/.test(a)?g:/bl/.test(a)?f:u,s=a==m?{checked:o[u],disabled:o[f],indeterminate:"true"==t.attr(g)||"false"==t.attr(p)}:o[r];if(/^(ch|di|in)/.test(a)&&!s)i(t,r);else if(/^(un|en|de)/.test(a)&&s)n(t,r);else if(a==m)for(var l in s)s[l]?i(t,l,!0):n(t,l,!0);else e&&"toggle"!=a||(e||t[_]("ifClicked"),s?o[v]!==h&&n(t,r):i(t,r))}function i(e,i,a){var m=e[0],b=e.parent(),_=i==u,w=i==g,C=i==f,M=w?p:_?c:"enabled",D=o(e,M+r(m[v])),S=o(e
s&&(!pa(h)&&Di.almostWhole(h/g,g/1e3)&&(n=h),!pa(u)&&Di.almostWhole(u/g,g/1e3)&&(a=u)),o=(a-n)/g,o=Di.almostEquals(o,Math.round(o),g/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*i)/i,a=Math.round(a*i)/i,r.push(pa(h)?n:h);for(var m=1;m<o;++m)r.push(Math.round((n+m*g)*i)/i);return r.push(pa(u)?a:u),r}function ie(t,e,i){var n=[i.type,void 0===e&&void 0===i.stack?i.index:"",i.stack].join(".");return void 0===t[n]&&(t[n]={pos:[],neg:[]}),t[n]}function ne(t,e,i,n){var a,o,r=t.options,s=r.stacked,l=ie(e,s,i),d=l.pos,h=l.neg,u=n.length;for(a=0;a<u;++a)o=t._parseValue(n[a]),isNaN(o.min)||isNaN(o.max)||i.data[a].hidden||(d[a]=d[a]||0,h[a]=h[a]||0,r.relativePoints?d[a]=100:o.min<0||o.max<0?h[a]+=o.min:d[a]+=o.max)}function ae(t,e,i){var n,a,o=i.length;for(n=0;n<o;++n)a=t._parseValue(i[n]),isNaN(a.min)||isNaN(a.max)||e.data[n].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}function oe(t,e){var i,n,a=[],o=ya(t.min,Math.pow(10,Math.floor(xa(e.min)))),r=Math.floor(xa(e.max)),s=Math.ceil(e.max/Math.pow(10,r));0===o?(i=Math.floor(xa(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),a.push(o),o=n*Math.pow(10,i)):(i=Math.floor(xa(o)),n=Math.floor(o/Math.pow(10,i)));var l=i<0?Math.pow(10,Math.abs(i)):1;do{a.push(o),++n,10===n&&(n=1,++i,l=i>=0?1:l),o=Math.round(n*Math.pow(10,i)*l)/l}while(i<r||i===r&&n<s);var d=ya(t.max,o);return a.push(d),a}function re(t,e){return Di.isFinite(t)&&t>=0?t:e}function se(t){var e=t.ticks;return e.display&&t.display?Ca(e.fontSize,gi.global.defaultFontSize)+2*e.backdropPaddingY:0}function le(t,e,i){return Di.isArray(i)?{w:Di.longestText(t,t.font,i),h:i.length*e}:{w:t.measureText(i).width,h:e}}function de(t,e,i,n,a){return t===n||t===a?{start:e-i/2,end:e+i/2}:t<n||t>a?{start:e-i,end:e}:{start:e,end:e+i}}function he(t){var e,i,n,a=Di.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},r={};t.ctx.font=a.string,t._pointLabelSizes=[];var s=t.chart.data.labels.length;for(e=0;e<s;e++){n=t.getPointPosition(e,t.drawingArea+5),i=le(t.ctx,a.lineHeight,t.pointLabels[e]),t._pointLabelSizes[e]=i;var l=t.getIndexAngle(e),d=Di.toDegrees(l)%360,h=de(d,n.x,i.w,0,180),u=de(d,n.y,i.h,90,270);h.start<o.l&&(o.l=h.start,r.l=l),h.end>o.r&&(o.r=h.end,r.r=l),u.start<o.t&&(o.t=u.start,r.t=l),u.end>o.b&&(o.b=u.end,r.b=l)}t.setReductions(t.drawingArea,o,r)}function ue(t){return 0===t||180===t?"center":t<180?"left":"right"}function ce(t,e,i,n){var a,o,r=i.y+n/2;if(Di.isArray(e))for(a=0,o=e.length;a<o;++a)t.fillText(e[a],i.x,r),r+=n;else t.fillText(e,i.x,r)}function fe(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function pe(t){var e=t.ctx,i=t.options,n=i.pointLabels,a=se(i),o=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),r=Di.options._parseFont(n);e.save(),e.font=r.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,d=t.getPointPosition(s,o+l+5),h=Ma(n.fontColor,s,gi.global.defaultFontColor);e.fillStyle=h;var u=t.getIndexAngle(s),c=Di.toDegrees(u);e.textAlign=ue(c),fe(c,t._pointLabelSizes[s],d),ce(e,t.pointLabels[s],d,r.lineHeight)}e.restore()}function ge(t,e,i,n){var a,o=t.ctx,r=e.circular,s=t.chart.data.labels.length,l=Ma(e.color,n-1),d=Ma(e.lineWidth,n-1);if((r||s)&&l&&d){if(o.save(),o.strokeStyle=l,o.lineWidth=d,o.setLineDash&&(o.setLineDash(e.borderDash||[]),o.lineDashOffset=e.borderDashOffset||0),o.beginPath(),r)o.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{a=t.getPointPosition(0,i),o.moveTo(a.x,a.y);for(var h=1;h<s;h++)a=t.getPointPosition(h,i),o.lineTo(a.x,a.y)}o.closePath(),o.stroke(),o.restore()}}function me(t){return Di.isNumber(t)?t:0}function ve(t,e){return t-e}function be(t){var e,i,n,a={},o=[];for(e=0,i=t.length;e<i;++e)n=t[e],a[n]||(a[n]=!0,o.push(n));return o}function ye(t){return Di.valueOrDefault(t.time.min,t.ticks.min)}function xe(t){return Di.valueOrDefault(t.time.max,t.ticks.max)}function _e(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,o,r,s,l,d=[],h=[e];for(a=0,o=t.length;a<o;++a)(s=t[a])>e&&s<i&&h.push(s);for(h.push(i),a=0,o=h.length;a<o;++a)l=h[
return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return ii.valueOrDefault(ii.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var a,o,r;if(ii.isArray(t))if(o=t.length,n)for(a=o-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<o;a++)e.call(i,t[a],a);else if(ii.isObject(t))for(r=Object.keys(t),o=r.length,a=0;a<o;a++)e.call(i,t[r[a]],r[a])},arrayEquals:function(t,e){var i,n,a,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(a=t[i],o=e[i],a instanceof Array&&o instanceof Array){if(!ii.arrayEquals(a,o))return!1}else if(a!==o)return!1;return!0},clone:function(t){if(ii.isArray(t))return t.map(ii.clone);if(ii.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,a=0;a<n;++a)e[i[a]]=ii.clone(t[i[a]]);return e}return t},_merger:function(t,e,i,n){var a=e[t],o=i[t];ii.isObject(a)&&ii.isObject(o)?ii.merge(a,o,n):e[t]=ii.clone(o)},_mergerIf:function(t,e,i){var n=e[t],a=i[t];ii.isObject(n)&&ii.isObject(a)?ii.mergeIf(n,a):e.hasOwnProperty(t)||(e[t]=ii.clone(a))},merge:function(t,e,i){var n,a,o,r,s,l=ii.isArray(e)?e:[e],d=l.length;if(!ii.isObject(t))return t;for(i=i||{},n=i.merger||ii._merger,a=0;a<d;++a)if(e=l[a],ii.isObject(e))for(o=Object.keys(e),s=0,r=o.length;s<r;++s)n(o[s],t,e,i);return t},mergeIf:function(t,e){return ii.merge(t,e,{merger:ii._mergerIf})},extend:Object.assign||function(t){return ii.merge(t,[].slice.call(arguments,1),{merger:function(t,e,i){e[t]=i[t]}})},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=ii.inherits,t&&ii.extend(i.prototype,t),i.__super__=e.prototype,i},_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')}},ni=ii;ii.callCallback=ii.callback,ii.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},ii.getValueOrDefault=ii.valueOrDefault,ii.getValueAtIndexOrDefault=ii.valueAtIndexOrDefault;var ai={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((
a=p.length;n<a;++n)o.updateElement(p[n],n,t)},updateElement:function(t,e,i){var n=this,a=n.chart,o=a.chartArea,r=a.options,s=r.animation,l=(o.left+o.right)/2,d=(o.top+o.bottom)/2,h=r.rotation,u=r.rotation,c=n.getDataset(),f=i&&s.animateRotate?0:t.hidden?0:n.calculateCircumference(c.data[e])*(r.circumference/un),p=i&&s.animateScale?0:n.innerRadius,g=i&&s.animateScale?0:n.outerRadius,m=t._options||{};Di.extend(t,{_datasetIndex:n.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:d+a.offsetY,startAngle:h,endAngle:u,circumference:f,outerRadius:g,innerRadius:p,label:Di.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;i&&s.animateRotate||(v.startAngle=0===e?r.rotation:n.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),i=this.getMeta(),n=0;return Di.each(i.data,function(i,a){t=e.data[a],isNaN(t)||i.hidden||(n+=Math.abs(t))}),n},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?un*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,i,n,a,o,r,s,l,d=this,h=0,u=d.chart;if(!t)for(e=0,i=u.data.datasets.length;e<i;++e)if(u.isDatasetVisible(e)){n=u.getDatasetMeta(e),t=n.data,e!==d.index&&(o=n.controller);break}if(!t)return 0;for(e=0,i=t.length;e<i;++e)a=t[e],o?(o._configure(),r=o._resolveDataElementOptions(a,e)):r=a._options,"inner"!==r.borderAlign&&(s=r.borderWidth,l=r.hoverBorderWidth,h=s>h?s:h,h=l>h?l:h);return h},setHoverStyle:function(t){var e=t._model,i=t._options,n=Di.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=dn(i.hoverBackgroundColor,n(i.backgroundColor)),e.borderColor=dn(i.hoverBorderColor,n(i.borderColor)),e.borderWidth=dn(i.hoverBorderWidth,i.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e},_getRingWeight:function(t){return Math.max(dn(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});gi._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),gi._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var pn=on.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),gn=Di.valueOrDefault,mn=Di.options.resolve,vn=Di.canvas._isPointInArea;gi._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var bn=zi.extend({datasetElementType:Qi.Line,dataElementType:Qi.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,i,n=this,a=n.getMeta(),o=a.dataset,r=a.data||[],s=n.chart.options,l=n._config,d=n._showLine=gn(l.showLine,s.showLines);for(n._xScale=n.getScaleForId(a.xAxisID),n._yScale=n.getScaleForId(a.yAxisID),d&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),o._scale=n._yScale,o._datasetIndex=n.index,o._children=r,o._model=n._resolveDatasetElementOptions(o),o.pivot()),e=0,i=r.length;e<i;++e)n.updateElement(r[e],e,t);for(d&&0!==o._model.tension&&n.updateBezierControlPoints
r.controller.linkScales();else{var l=Mn[r.type];if(void 0===l)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new l(i,t),n.push(r.controller)}}return n},resetElements:function(){var t=this;Di.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Lt(n),Hn._invalidate(n),!1!==Hn.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();for(e=0,i=n.data.datasets.length;e<i;e++)n.getDatasetMeta(e).controller.buildOrUpdateElements();n.updateLayout(),n.options.animation&&n.options.animation.duration&&Di.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],Hn.notify(n,"afterUpdate"),n._layers.sort(Nt("z","_idx")),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){var t=this;!1!==Hn.notify(t,"beforeLayout")&&(Tn.update(this,this.width,this.height),t._layers=[],Di.each(t.boxes,function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())},t),t._layers.forEach(function(t,e){t._idx=e}),Hn.notify(t,"afterScaleUpdate"),Hn.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==Hn.notify(t,"beforeDatasetsUpdate")){for(var e=0,i=t.data.datasets.length;e<i;++e)t.updateDataset(e);Hn.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,i=e.getDatasetMeta(t),n={meta:i,index:t};!1!==Hn.notify(e,"beforeDatasetUpdate",[n])&&(i.controller._update(),Hn.notify(e,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var i=e.options.animation,n=Qn(t.duration,i&&i.duration),a=t.lazy;if(!1!==Hn.notify(e,"beforeRender")){var o=function(t){Hn.notify(e,"afterRender"),Di.callback(i&&i.onComplete,[t],e)};if(i&&n){var r=new Li({numSteps:n/16.66,easing:t.easing||i.easing,render:function(t,e){var i=Di.easing.effects[e.easing],n=e.currentStep,a=n/e.numSteps;t.draw(i(a),a,n)},onAnimationProgress:i.onProgress,onAnimationComplete:o});Ri.addAnimation(e,r,n,a)}else e.draw(),o(new Li({numSteps:0,chart:e}));return e}},draw:function(t){var e,i,n=this;if(n.clear(),Di.isNullOrUndef(t)&&(t=1),n.transition(t),!(n.width<=0||n.height<=0)&&!1!==Hn.notify(n,"beforeDraw",[t])){for(i=n._layers,e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(n.chartArea);for(n.drawDatasets(t);e<i.length;++e)i[e].draw(n.chartArea);n._drawTooltip(t),Hn.notify(n,"afterDraw",[t])}},transition:function(t){for(var e=this,i=0,n=(e.data.datasets||[]).length;i<n;++i)e.isDatasetVisible(i)&&e.getDatasetMeta(i).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,i,n=this,a=n.data.datasets||[],o=[];for(e=0,i=a.length;e<i;++e)t&&!n.isDatasetVisible(e)||o.push(n.getDatasetMeta(e));return o.sort(Nt("order","index")),o},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,i,n=this;if(!1!==Hn.notify(n,"beforeDatasetsDraw",[t])){for(e=n._getSortedVisibleDatasetMetas(),i=e.length-1;i>=0;--i)n.drawDataset(e[i],t);Hn.notify(n,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this,n={meta:t,index:t.index,easingValue:e};!1!==Hn.notify(i,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Hn.notify(i,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this,i=e.tooltip,n={tooltip:i,easingValue:t};!1!==Hn.notify(e,"beforeTooltipDraw",[n])&&(i.draw(),Hn.notify(e,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return Dn.modes.single(this,t)},getElementsAtEvent:function(t){return Dn.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Dn.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=Dn.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return Dn.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,i=e.data.datasets[t];i._meta||(i._meta={});var n=i._meta
t=n.chart.data.labels.length-1;t>=0;t--)e=n.getDistanceFromCenterForValue(o.ticks.reverse?n.min:n.max),i=n.getPointPosition(t,e),a.beginPath(),a.moveTo(n.xCenter,n.yCenter),a.lineTo(i.x,i.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,i=t.options,n=i.ticks;if(n.display){var a,o,r=t.getIndexAngle(0),s=Di.options._parseFont(n),l=Ca(n.fontColor,gi.global.defaultFontColor);e.save(),e.font=s.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",Di.each(t.ticks,function(i,r){(0!==r||n.reverse)&&(a=t.getDistanceFromCenterForValue(t.ticksAsNumbers[r]),n.showLabelBackdrop&&(o=e.measureText(i).width,e.fillStyle=n.backdropColor,e.fillRect(-o/2-n.backdropPaddingX,-a-s.size/2-n.backdropPaddingY,o+2*n.backdropPaddingX,s.size+2*n.backdropPaddingY)),e.fillStyle=l,e.fillText(i,0,-a))}),e.restore()}},_drawTitle:Di.noop}),Fa=Sa;Ta._defaults=Fa;var Aa=Di._deprecated,Pa=Di.options.resolve,Ia=Di.valueOrDefault,Ea=Number.MIN_SAFE_INTEGER||-9007199254740991,Oa=Number.MAX_SAFE_INTEGER||9007199254740991,La={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ra=Object.keys(La),Va={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},Na=la.extend({initialize:function(){this.mergeTicksOptions(),la.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,i=e.time||(e.time={}),n=t._adapter=new ea._date(e.adapters.date);return Aa("time scale",i.format,"time.format","time.parser"),Aa("time scale",i.min,"time.min","ticks.min"),Aa("time scale",i.max,"time.max","ticks.max"),Di.mergeIf(i.displayFormats,n.formats()),la.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),la.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,a,o,r,s=this,l=s.chart,d=s._adapter,h=s.options,u=h.time.unit||"day",c=Oa,f=Ea,p=[],g=[],m=[],v=s._getLabels();for(t=0,i=v.length;t<i;++t)m.push(Me(s,v[t]));for(t=0,i=(l.data.datasets||[]).length;t<i;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,Di.isObject(a[0]))for(g[t]=[],e=0,n=a.length;e<n;++e)o=Me(s,a[e]),p.push(o),g[t][e]=o;else g[t]=m.slice(0),r||(p=p.concat(m),r=!0);else g[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),p.length&&(p=i>1?be(p).sort(ve):p.sort(ve),c=Math.min(c,p[0]),f=Math.max(f,p[p.length-1])),c=Me(s,ye(h))||c,f=Me(s,xe(h))||f,c=c===Oa?+d.startOf(Date.now(),u):c,f=f===Ea?+d.endOf(Date.now(),u)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:p,datasets:g,labels:m}},buildTicks:function(){var t,e,i,n=this,a=n.min,o=n.max,r=n.options,s=r.ticks,l=r.time,d=n._timestamps,h=[],u=n.getLabelCapacity(a),c=s.source,f=r.distribution;for(d="data"===c||"auto"===c&&"series"===f?d.data:"labels"===c?d.labels:Fe(n,a,o,u),"ticks"===r.bounds&&d.length&&(a=d[0],o=d[d.length-1]),a=Me(n,ye(r))||a,o=Me(n,xe(r))||o,t=0,e=d.length;t<e;++t)(i=d[t])>=a&&i<=o&&h.push(i);return n.min=a,n.max=o,n._unit=l.unit||(s.autoSkip?De(l.minUnit,n.min,n.max,u):Se(n,h.length,l.minUnit,n.min,n.max)),n._majorUnit=s.major.enabled&&"year"!==n._unit?Te(n._unit):void 0,n._table=_e(n._timestamps.data,a,o,f),n._offsets=Ae(n._table,h,a,o,r),s.reverse&&h.reverse(),Ie(n,h,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i._adapter,a=i.chart.data,o=i.options.time,r=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return Di.isObject(s)&&(r=i.getRightValue(s)),o.tooltipFormat?n.format(Ce(i,r),o.tooltipFormat):"string"==typeof r?r:n.format(Ce(i,r),o.displayFormats.datetime)},tickFormatFunction:function(t,e,i,n){var a=this,o=a._adapter,r=a.options,s=r.time.displayFormats,l=s[a._unit],d=a._m
return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),n.loadInstance(t,e,i)},addAsyncValidator:function(e){var i=t.extend({},e),a=i.validatorFunction;i.async=!0,i.validatorFunction=function(t,e,o,r,s,l){return n.loadInstance(this.name,e,s).run(l,function(n){a.apply(i,[n,t,e,o,r,s,l])})},this.addValidator(i)}}),t(e).bind("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),i.find("[data-validation]").each(function(){var e=t(this);e.valAttr("async",!1),t.each(t.split(e.attr("data-validation")),function(i,n){var a=t.formUtils.validators["validate_"+n];a&&a.async&&e.valAttr("async","yes")})})})}(t,window),function(t,e){"use strict";function i(e){e&&"custom"===e.errorMessagePosition&&"function"==typeof e.errorMessageCustom&&(t.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),e.submitErrorMessageCallback=function(t,i){e.errorMessageCustom(t,e.language.errorTitle,i,e)})}function n(e){if(e.errorMessagePosition&&"object"==typeof e.errorMessagePosition){t.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var i=e.errorMessagePosition;e.errorMessagePosition="top",e.submitErrorMessageCallback=function(){return i}}}function a(e){var i=e.find("[data-validation-if-checked]");i.length&&t.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'),i.on("beforeValidation",function(){var i=t(this),n=i.valAttr("if-checked"),a=t('input[name="'+n+'"]',e),o=a.is(":checked"),r=(t.formUtils.getValue(a)||"").toString(),s=i.valAttr("if-checked-value");(!o||s&&s!==r)&&i.valAttr("skipped",!0)})}function o(e){var i={se:"sv",cz:"cs",dk:"da"};if(e.lang in i){var n=i[e.lang];t.formUtils.warn('Deprecated use of lang code "'+e.lang+'" use "'+n+'" instead'),e.lang=n}}t.fn.validateForm=function(e,i){return t.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(e,i,!0)},t(window).on("formValidationPluginInit",function(t,e){o(e),i(e),n(e)}).on("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),a(i)})}(t),function(t){"use strict";var e={resolveErrorMessage:function(t,e,i,n,a){var o=n.validationErrorMsgAttribute+"-"+i.replace("validate_",""),r=t.attr(o);return r||(r=t.attr(n.validationErrorMsgAttribute))||(r="function"!=typeof e.errorMessageKey?a[e.errorMessageKey]:a[e.errorMessageKey(n)])||(r=e.errorMessage),r},getParentContainer:function(e){if(e.valAttr("error-msg-container"))return t(e.valAttr("error-msg-container"));var i=e.parent();return"checkbox"===e.attr("type")&&e.closest(".checkbox").length?i=e.closest(".checkbox").parent():"radio"===e.attr("type")&&e.closest(".radio").length&&(i=e.closest(".radio").parent()),i.closest(".input-group").length&&(i=i.closest(".input-group").parent()),i},applyInputErrorStyling:function(t,e){t.addClass(e.errorElementClass).removeClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnError).removeClass(e.inputParentClassOnSuccess),""!==e.borderColorOnError&&t.css("border-color",e.borderColorOnError)},applyInputSuccessStyling:function(t,e){t.addClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(t,i){t.removeClass(i.successElementClass).removeClass(i.errorElementClass).css("border-color","");var n=e.getParentContainer(t);if(n.removeClass(i.inputParentClassOnError).removeClass(i.inputParentClassOnSuccess),"function"==typeof i.inlineErrorMessageCallback){var a=i.inlineErrorMessageCallback(t,!1,i);a&&a.html("")}else n.find("."+i.errorMessageClass).remove()},removeAllMessagesAndStyling:function(i,n){if("function"==typeof n.submitErrorMessageCallback){var a=n.submitErrorMessageCallback(i,!1,n);a&&a.html("")}else i.find("."+n.errorMessageClass+".alert").remove();i.find("."+n.errorElementClass+",."+n.successElementClass).each(function(){e.removeInputStylingA