Be(a,u,c)?h(r)._overflowWeeks=!0:null!=d?h(r)._overflowWeekday=!0:(p=Ue(a,s,l,u,c),r._a[ye]=p.year,r._dayOfYear=p.dayOfYear)),null!=e._dayOfYear&&(o=bt(e._a[ye],i[ye]),(e._dayOfYear>Ie(o)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),d=Le(o,0,e._dayOfYear),e._a[we]=d.getUTCMonth(),e._a[be]=d.getUTCDate()),n=0;n<3&&null==e._a[n];++n)e._a[n]=f[n]=i[n];for(;n<7;n++)e._a[n]=f[n]=null==e._a[n]?2===n?1:0:e._a[n];24===e._a[_e]&&0===e._a[xe]&&0===e._a[ke]&&0===e._a[Ce]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?Le:function(e,t,n,i,r,o,a){var s;return e<100&&0<=e?(s=new Date(e+400,t,n,i,r,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,r,o,a),s}).apply(null,f),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(h(e).weekdayMismatch=!0)}}function xt(e){if(e._f===t.ISO_8601)yt(e);else if(e._f===t.RFC_2822)wt(e);else{e._a=[],h(e).empty=!0;for(var n,i,o,a,s,l=""+e._i,u=l.length,c=0,d=I(e._f,e._locale).match(M)||[],p=d.length,f=0;fe.valueOf():e.valueOf()"}),Z.toJSON=function(){return this.isValid()?this.toISOString():null},Z.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Z.unix=function(){return Math.floor(this.valueOf()/1e3)},Z.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Z.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Z.eraName=function(){for(var e,t=this.localeData().eras(),n=0,i=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Z.isLocal=function(){return!!this.isValid()&&!this._isUTC},Z.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Z.isUtc=It,Z.isUTC=It,Z.zoneAbbr=function(){return this._isUTC?"UTC":""},Z.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Z.dates=x("dates accessor is deprecated. Use date instead.",re),Z.months=x("months accessor is deprecated. Use month instead",Re),Z.years=x("years accessor is deprecated. Use year instead",Fe),Z.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),Z.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e,t={};return y(t,this),(t=kt(t))._a?(e=(t._isUTC?d:Dt)(t._a),this._isDSTShifted=this.isValid()&&0=e.end:this.start<=e&&e<=this.end},t.prototype._by_string=function(t,n){var i,r;for(i=e(this.start),r=[];this.contains(i);)n.call(this,i.clone()),r.push(i.add(t,1));return r},t.prototype._by_range=function(t,n){var i,r,o,a;if((r=Math.round(this/t))===1/0)return this;for(a=[],i=o=0;0<=r?o<=r:o>=r;i=0<=r?++o:--o)a.push(n.call(this,e(this.start.valueOf()+t.valueOf()*i)));return a},t.prototype.overlaps=function(e){return null!==this.intersect(e)},t.prototype.intersect=function(e){var n,i,r,o,a,s,l,u;return this.start<=(i=e.start)&&i<(n=this.end)&&n= 2.6.0. You are using Moment.js "+e.version+". See momentjs.com");function c(e){return e>96?e-87:e>64?e-29:e-48}function d(e){var t=0,n=e.split("."),i=n[0],r=n[1]||"",o=1,a=0,s=1;for(45===e.charCodeAt(0)&&(t=1,s=-1);ti&&E.moveInvalidForward&&(t=i),o3){var t=o[k(e)];if(t)return t;$("Moment Timezone found "+e+" from the Intl api, but did not have that data loaded.")}}catch(e){}var n,i,r,s=function(){var e,t,n,i=(new Date).getFullYear()-2,r=new v(new Date(i,0,1)),o=[r];for(n=1;n<48;n++)(t=new v(new Date(i,n,1))).offset!==r.offset&&(e=w(r,t),o.push(e),o.push(new v(new Date(e.at+6e4)))),r=t;for(n=0;n<4;n++)o.push(new v(new Date(i+n,0,1))),o.push(new v(new Date(i+n,6,1)));return o}(),l=s.length,u=function(e){var t,n,i,r=e.length,s={},l=[];for(t=0;t0?c[0].zone.name:void 0}function k(e){return(e||"").toLowerCase().replace(/\//g,"_")}function C(e){var t,i,r,a;for("string"==typeof e&&(e=[e]),t=0;t0&&(this._z=null),A.apply(this,arguments)});var A;e.tz.setDefault=function(t){return(l<2||2===l&&u<9)&&$("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+e.version+"."),e.defaultZone=t?D(t):null,e};var R=e.momentProperties;return"[object Array]"===Object.prototype.toString.call(R)?(R.push("_z"),R.push("_a")):R&&(R._z=null),e}),function(){"use strict";function e(e){return angular.isUndefined(e)||null===e}function t(t,n){if(void 0===n){if("function"!=typeof require)throw new Error("Moment cannot be found by angular-moment! Please reference to: https://github.com/urish/angular-moment");n=function(){try{return require("moment")}catch(e){throw new Error("Please install moment via npm. Please reference to: https://github.com/urish/angular-moment")}}()}return t.module("angularMoment",[]).constant("angularMomentConfig",{preprocess:null,timezone:null,format:null,statefulFilters:!0}).constant("moment",n).constant("amTimeAgoConfig",{withoutSuffix:!1,serverTime:null,titleFormat:null,fullDateThreshold:null,fullDateFormat:null,fullDateThresholdUnit:"day"}).directive("amTimeAgo",["$window","moment","amMoment","amTimeAgoConfig",function(n,i,r,o){return function(a,s,l){function u(){var e;if(f)e=f;else if(o.serverTime){var t=(new Date).getTime()-_+o.serverTime;e=i(t)}else e=i();return e}function c(){m&&(n.clearTimeout(m),m=null)}function d(e){k&&s.attr("datetime",e)}function h(){if(c(),p){var e=r.preprocessDate(p);(function e(t){var i=u().diff(t,b),r=y&&i>=y;if(r?s.text(t.format(w)):s.text(t.from(u(),g)),v&&C&&s.attr("title",t.format(v)),!r){var o=Math.abs(u().diff(t,"minute")),a=3600;o<1?a=1:o<60?a=30:o<180&&(a=300),m=n.setTimeout(function(){e(t)},1e3*a)}})(e),d(e.toISOString())}}var p,f,m=null,g=o.withoutSuffix,v=o.titleFormat,y=o.fullDateThreshold,w=o.fullDateFormat,b=o.fullDateThresholdUnit,_=(new Date).getTime(),x=l.amTimeAgo,k="TIME"===s[0].nodeName.toUpperCase(),C=!s.attr("title");a.$watch(x,function(t){return e(t)||""===t?(c(),void(p&&(s.text(""),d(""),p=null))):(p=t,void h())}),t.isDefined(l.amFrom)&&a.$watch(l.amFrom,function(t){f=e(t)||""===t?null:i(t),h()}),t.isDefined(l.amWithoutSuffix)&&a.$watch(l.amWithoutSuffix,function(e){"boolean"==typeof e?(g=e,h()):g=o.withoutSuffix}),l.$observe("amFullDateThreshold",function(e){y=e,h()}),l.$observe("amFullDateFormat",function(e){w=e,h()}),l.$observe("amFullDateThresholdUnit",function(e){b=e,h()}),a.$on("$destroy",function(){c()}),a.$on("amMoment:localeChanged",function(){h()})}}]).service("amMoment",["moment","$rootScope","$log","angularMomentConfig",function(e,n,i,r){var o=null;this.changeLocale=function(i,r){var o=e.locale(i,r);return t.isDefined(i)&&n.$broadcast("amMoment:localeChanged"),o},this.changeTimezone=function(t){e.tz&&e.tz.setDefault?(e.tz.setDefault(t),n.$broadcast("amMoment:timezoneChanged")):i.warn("angular-moment: changeTimezone() works only with moment-timezone.js v0.3.0 or greater."),r.timezone=t,o=t},this.preprocessDate=function(t){return o!==r.timezone&&this.changeTimezone(r.timezone),r.preprocess?r.preprocess(t):e(!isNaN(parseFloat(t))&&isFinite(t)?parseInt(t,10):t)}}]).filter("amParse",["moment",function(e){return function(t,n){return e(t,n)}}]).filter("amFromUnix",["moment",function(e){return function(t){return e.unix(t)}}]).filter("amUtc",["moment",function(e){return function(t){return e.utc(t)}}]).filter("amUtcOffset",["amMoment",function(e){return function(t,n){return e.preprocessDate(t).utcOffset(n)}}]).filter("amLocal",["moment",function(e){return function(t){return e.isMoment(t)?t.local():null}}]).filter("amTimezone",["amMoment","angularMomentConfig","$log",function(e,t,n){return function(t,i){var r=e.preprocessDate(t);return i?r.tz?r.tz(i):(n.warn("angular-moment: named timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js ?"),r):r}}]).filter("amCalendar",["moment","amMoment","angularMomentConfig",function(t,n,i){function r(t,i,r){if(e(t))return"";var o=n.preprocessDate(t);return o.isValid()?o.calendar(i,r):""}return r.$stateful=i.statefulFilters,r}]).filter("amDifference",["moment","amMoment","angularMomentConfig",function(t,n,i){function r(i,r,o,a){if(e(i))return"";var s=n.preprocessDate(i),l=e(r)?t():n.preprocessDate(r);return s.isValid()&&l.isValid()?s.diff(l,o,a):""}return r.$stateful=i.statefulFilters,r}]).filter("amDateFormat",["moment","amMoment","angularMomentConfig",function(t,n,i){function r(t,i){if(e(t))return"";var r=n.preprocessDate(t);return r.isValid()?r.format(i):""}return r.$stateful=i.statefulFilters,r}]).filter("amDurationFormat",["moment","angularMomentConfig",function(t,n){function i(n,i,r){return e(n)?"":t.duration(n,i).humanize(r)}return i.$stateful=n.statefulFilters,i}]).filter("amTimeAgo",["moment","amMoment","angularMomentConfig",function(t,n,i){function r(i,r,o){var a,s;return e(i)?"":(i=n.preprocessDate(i),(a=t(i)).isValid()?(s=t(o),!e(o)&&s.isValid()?a.from(s,r):a.fromNow(r)):"")}return r.$stateful=i.statefulFilters,r}]).filter("amSubtract",["moment","angularMomentConfig",function(t,n){function i(n,i,r){return e(n)?"":t(n).subtract(parseInt(i,10),r)}return i.$stateful=n.statefulFilters,i}]).filter("amAdd",["moment","angularMomentConfig",function(t,n){function i(n,i,r){return e(n)?"":t(n).add(parseInt(i,10),r)}return i.$stateful=n.statefulFilters,i}]).filter("amStartOf",["moment","angularMomentConfig",function(t,n){function i(n,i){return e(n)?"":t(n).startOf(i)}return i.$stateful=n.statefulFilters,i}]).filter("amEndOf",["moment","angularMomentConfig",function(t,n){function i(n,i){return e(n)?"":t(n).endOf(i)}return i.$stateful=n.statefulFilters,i}]),"angularMoment"}var n=window&&window.process&&window.process.type;"function"==typeof define&&define.amd?define(["angular","moment"],t):"undefined"!=typeof module&&module&&module.exports&&"function"==typeof require&&!n?module.exports=t(require("angular"),require("moment")):t(angular,("undefined"!=typeof global&&void 0!==global.moment?global:window).moment)}(),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var a=t||window.event,s=l.call(arguments,1),u=0,d=0,h=0,p=0,f=0,m=0;if((t=e.event.fix(a)).type="mousewheel","detail"in a&&(h=-1*a.detail),"wheelDelta"in a&&(h=a.wheelDelta),"wheelDeltaY"in a&&(h=a.wheelDeltaY),"wheelDeltaX"in a&&(d=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(d=-1*h,h=0),u=0===h?d:h,"deltaY"in a&&(h=-1*a.deltaY,u=h),"deltaX"in a&&(d=a.deltaX,0===h&&(u=-1*d)),0!==h||0!==d){if(1===a.deltaMode){var g=e.data(this,"mousewheel-line-height");u*=g,h*=g,d*=g}else if(2===a.deltaMode){var v=e.data(this,"mousewheel-page-height");u*=v,h*=v,d*=v}if(p=Math.max(Math.abs(h),Math.abs(d)),(!o||o>p)&&(o=p,i(a,p)&&(o/=40)),i(a,p)&&(u/=40,d/=40,h/=40),u=Math[u>=1?"floor":"ceil"](u/o),d=Math[d>=1?"floor":"ceil"](d/o),h=Math[h>=1?"floor":"ceil"](h/o),c.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,m=t.clientY-y.top}return t.deltaX=d,t.deltaY=h,t.deltaFactor=o,t.offsetX=f,t.offsetY=m,t.deltaMode=0,s.unshift(t,u,d,h),r&&clearTimeout(r),r=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function n(){o=null}function i(e,t){return c.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var r,o,a=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var u=a.length;u;)e.event.fixHooks[a[--u]]=e.event.mouseHooks;var c=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=s.length;n;)this.addEventListener(s[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",c.getLineHeight(this)),e.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=s.length;n;)this.removeEventListener(s[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var a=t||window.event,s=l.call(arguments,1),u=0,d=0,h=0,p=0,f=0,m=0;if((t=e.event.fix(a)).type="mousewheel","detail"in a&&(h=-1*a.detail),"wheelDelta"in a&&(h=a.wheelDelta),"wheelDeltaY"in a&&(h=a.wheelDeltaY),"wheelDeltaX"in a&&(d=-1*a.wheelDeltaX),"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(d=-1*h,h=0),u=0===h?d:h,"deltaY"in a&&(h=-1*a.deltaY,u=h),"deltaX"in a&&(d=a.deltaX,0===h&&(u=-1*d)),0!==h||0!==d){if(1===a.deltaMode){var g=e.data(this,"mousewheel-line-height");u*=g,h*=g,d*=g}else if(2===a.deltaMode){var v=e.data(this,"mousewheel-page-height");u*=v,h*=v,d*=v}if(p=Math.max(Math.abs(h),Math.abs(d)),(!o||o>p)&&(o=p,i(a,p)&&(o/=40)),i(a,p)&&(u/=40,d/=40,h/=40),u=Math[u>=1?"floor":"ceil"](u/o),d=Math[d>=1?"floor":"ceil"](d/o),h=Math[h>=1?"floor":"ceil"](h/o),c.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,m=t.clientY-y.top}return t.deltaX=d,t.deltaY=h,t.deltaFactor=o,t.offsetX=f,t.offsetY=m,t.deltaMode=0,s.unshift(t,u,d,h),r&&clearTimeout(r),r=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,s)}}function n(){o=null}function i(e,t){return c.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var r,o,a=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var u=a.length;u;)e.event.fixHooks[a[--u]]=e.event.mouseHooks;var c=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=s.length;n;)this.addEventListener(s[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",c.getLineHeight(this)),e.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=s.length;n;)this.removeEventListener(s[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var n="function"==typeof define&&define.amd,i="undefined"!=typeof module&&module.exports,r="https:"==document.location.protocol?"https:":"http:";n||(i?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+r+"//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js%3E%3C/script%3E"))),function(){var t,n="mCustomScrollbar",i=".mCustomScrollbar",r={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},o=0,a={},s=window.attachEvent&&!window.addEventListener?1:0,l=!1,u=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],c={init:function(t){var t=e.extend(!0,{},r,t),n=d.call(this);if(t.live){var s=t.liveSelector||this.selector||i,l=e(s);if("off"===t.live)return void p(s);a[s]=setTimeout(function(){l.mCustomScrollbar(t),"once"===t.live&&l.length&&p(s)},500)}else p(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":f(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=m(t.scrollButtons.scrollType),h(t),e(n).each(function(){var n=e(this);if(!n.data("mCS")){n.data("mCS",{idx:++o,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:n.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var i=n.data("mCS"),r=i.opt,a=n.data("mcs-axis"),s=n.data("mcs-scrollbar-position"),l=n.data("mcs-theme");a&&(r.axis=a),s&&(r.scrollbarPosition=s),l&&(r.theme=l,h(r)),g.call(this),i&&r.callbacks.onCreate&&"function"==typeof r.callbacks.onCreate&&r.callbacks.onCreate.call(this),e("#mCSB_"+i.idx+"_container img:not(."+u[2]+")").addClass(u[2]),c.update.call(null,n)}})},update:function(t,n){var i=t||d.call(this);return e(i).each(function(){var t=e(this);if(t.data("mCS")){var i=t.data("mCS"),r=i.opt,o=e("#mCSB_"+i.idx+"_container"),a=e("#mCSB_"+i.idx),s=[e("#mCSB_"+i.idx+"_dragger_vertical"),e("#mCSB_"+i.idx+"_dragger_horizontal")];if(!o.length)return;i.tweenRunning&&W(t),n&&i&&r.callbacks.onBeforeUpdate&&"function"==typeof r.callbacks.onBeforeUpdate&&r.callbacks.onBeforeUpdate.call(this),t.hasClass(u[3])&&t.removeClass(u[3]),t.hasClass(u[4])&&t.removeClass(u[4]),a.css("max-height","none"),a.height()!==t.height()&&a.css("max-height",t.height()),y.call(this),"y"===r.axis||r.advanced.autoExpandHorizontalScroll||o.css("width",v(o)),i.overflowed=k.call(this),T.call(this),r.autoDraggerLength&&b.call(this),_.call(this),D.call(this);var l=[Math.abs(o[0].offsetTop),Math.abs(o[0].offsetLeft)];"x"!==r.axis&&(i.overflowed[0]?s[0].height()>s[0].parent().height()?C.call(this):(q(t,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}),i.contentReset.y=null):(C.call(this),"y"===r.axis?S.call(this):"yx"===r.axis&&i.overflowed[1]&&q(t,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==r.axis&&(i.overflowed[1]?s[1].width()>s[1].parent().width()?C.call(this):(q(t,l[1].toString(),{dir:"x",dur:0,overwrite:"none"}),i.contentReset.x=null):(C.call(this),"x"===r.axis?S.call(this):"yx"===r.axis&&i.overflowed[0]&&q(t,l[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),n&&i&&(2===n&&r.callbacks.onImageLoad&&"function"==typeof r.callbacks.onImageLoad?r.callbacks.onImageLoad.call(this):3===n&&r.callbacks.onSelectorChange&&"function"==typeof r.callbacks.onSelectorChange?r.callbacks.onSelectorChange.call(this):r.callbacks.onUpdate&&"function"==typeof r.callbacks.onUpdate&&r.callbacks.onUpdate.call(this)),z.call(this)}})},scrollTo:function(t,n){if(void 0!==t&&null!=t){var i=d.call(this);return e(i).each(function(){var i=e(this);if(i.data("mCS")){var r=i.data("mCS"),o=r.opt,a={trigger:"external",scrollInertia:o.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},a,n),l=V.call(this,t),u=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;l[0]=Y.call(this,l[0],"y"),l[1]=Y.call(this,l[1],"x"),s.moveDragger&&(l[0]*=r.scrollRatio.y,l[1]*=r.scrollRatio.x),s.dur=ne()?0:u,setTimeout(function(){null!==l[0]&&void 0!==l[0]&&"x"!==o.axis&&r.overflowed[0]&&(s.dir="y",s.overwrite="all",q(i,l[0].toString(),s)),null!==l[1]&&void 0!==l[1]&&"y"!==o.axis&&r.overflowed[1]&&(s.dir="x",s.overwrite="none",q(i,l[1].toString(),s))},s.timeout)}})}},stop:function(){var t=d.call(this);return e(t).each(function(){var t=e(this);t.data("mCS")&&W(t)})},disable:function(t){var n=d.call(this);return e(n).each(function(){var n=e(this);n.data("mCS")&&(n.data("mCS"),z.call(this,"remove"),S.call(this),t&&C.call(this),T.call(this,!0),n.addClass(u[3]))})},destroy:function(){var t=d.call(this);return e(t).each(function(){var i=e(this);if(i.data("mCS")){var r=i.data("mCS"),o=r.opt,a=e("#mCSB_"+r.idx),s=e("#mCSB_"+r.idx+"_container"),l=e(".mCSB_"+r.idx+"_scrollbar");o.live&&p(o.liveSelector||e(t).selector),z.call(this,"remove"),S.call(this),C.call(this),i.removeData("mCS"),Q(this,"mcs"),l.remove(),s.find("img."+u[2]).removeClass(u[2]),a.replaceWith(s.contents()),i.removeClass(n+" _mCS_"+r.idx+" "+u[6]+" "+u[7]+" "+u[5]+" "+u[3]).addClass(u[4])}})}},d=function(){return"object"!=typeof e(this)||e(this).length<1?i:this},h=function(t){t.autoDraggerLength=!(e.inArray(t.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"])>-1)&&t.autoDraggerLength,t.autoExpandScrollbar=!(e.inArray(t.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"])>-1)&&t.autoExpandScrollbar,t.scrollButtons.enable=!(e.inArray(t.theme,["minimal","minimal-dark"])>-1)&&t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,["minimal","minimal-dark"])>-1||t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,["minimal","minimal-dark"])>-1?"outside":t.scrollbarPosition},p=function(e){a[e]&&(clearTimeout(a[e]),Q(a,e))},f=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},m=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},g=function(){var t=e(this),i=t.data("mCS"),r=i.opt,o=r.autoExpandScrollbar?" "+u[1]+"_expand":"",a=["",""],s="yx"===r.axis?"mCSB_vertical_horizontal":"x"===r.axis?"mCSB_horizontal":"mCSB_vertical",l="yx"===r.axis?a[0]+a[1]:"x"===r.axis?a[1]:a[0],c="yx"===r.axis?"":"",d=r.autoHideScrollbar?" "+u[6]:"",h="x"!==r.axis&&"rtl"===i.langDir?" "+u[7]:"";r.setWidth&&t.css("width",r.setWidth),r.setHeight&&t.css("height",r.setHeight),r.setLeft="y"!==r.axis&&"rtl"===i.langDir?"989999px":r.setLeft,t.addClass(n+" _mCS_"+i.idx+d+h).wrapInner("");var p=e("#mCSB_"+i.idx),f=e("#mCSB_"+i.idx+"_container");"y"===r.axis||r.advanced.autoExpandHorizontalScroll||f.css("width",v(f)),"outside"===r.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),p.addClass("mCSB_outside").after(l)):(p.addClass("mCSB_inside").append(l),f.wrap(c)),w.call(this);var m=[e("#mCSB_"+i.idx+"_dragger_vertical"),e("#mCSB_"+i.idx+"_dragger_horizontal")];m[0].css("min-height",m[0].height()),m[1].css("min-width",m[1].width())},v=function(t){var n=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],i=t.parent().width();return n[0]>i?n[0]:n[1]>i?n[1]:"100%"},y=function(){var t=e(this),n=t.data("mCS"),i=n.opt,r=e("#mCSB_"+n.idx+"_container");if(i.advanced.autoExpandHorizontalScroll&&"y"!==i.axis){r.css({width:"auto","min-width":0,"overflow-x":"scroll"});var o=Math.ceil(r[0].scrollWidth);3===i.advanced.autoExpandHorizontalScroll||2!==i.advanced.autoExpandHorizontalScroll&&o>r.parent().width()?r.css({width:o,"min-width":"100%","overflow-x":"inherit"}):r.css({"overflow-x":"inherit",position:"absolute"}).wrap("").css({width:Math.ceil(r[0].getBoundingClientRect().right+.4)-Math.floor(r[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),n=t.data("mCS"),i=n.opt,r=e(".mCSB_"+n.idx+"_scrollbar:first"),o=ee(i.scrollButtons.tabindex)?"tabindex='"+i.scrollButtons.tabindex+"'":"",a=["","","",""],s=["x"===i.axis?a[2]:a[0],"x"===i.axis?a[3]:a[1],a[2],a[3]];i.scrollButtons.enable&&r.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},b=function(){var t=e(this),n=t.data("mCS"),i=e("#mCSB_"+n.idx),r=e("#mCSB_"+n.idx+"_container"),o=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],a=[i.height()/r.outerHeight(!1),i.width()/r.outerWidth(!1)],l=[parseInt(o[0].css("min-height")),Math.round(a[0]*o[0].parent().height()),parseInt(o[1].css("min-width")),Math.round(a[1]*o[1].parent().width())],u=s&&l[1]o&&(o=s),l>a&&(a=l),[o>i.height(),a>i.width()]},C=function(){var t=e(this),n=t.data("mCS"),i=n.opt,r=e("#mCSB_"+n.idx),o=e("#mCSB_"+n.idx+"_container"),a=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(W(t),("x"!==i.axis&&!n.overflowed[0]||"y"===i.axis&&n.overflowed[0])&&(a[0].add(o).css("top",0),q(t,"_resetY")),"y"!==i.axis&&!n.overflowed[1]||"x"===i.axis&&n.overflowed[1]){var s=dx=0;"rtl"===n.langDir&&(s=r.width()-o.outerWidth(!1),dx=Math.abs(s/n.scrollRatio.x)),o.css("left",s),a[1].css("left",dx),q(t,"_resetX")}},D=function(){var t=e(this),n=t.data("mCS"),i=n.opt;if(!n.bindEvents){if(E.call(this),i.contentTouchScroll&&M.call(this),O.call(this),i.mouseWheel.enable){var r;!function n(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),P.call(t[0])):n()},100)}()}F.call(this),N.call(this),i.advanced.autoScrollOnFocus&&L.call(this),i.scrollButtons.enable&&U.call(this),i.keyboard.enable&&H.call(this),n.bindEvents=!0}},S=function(){var t=e(this),n=t.data("mCS"),i=n.opt,r="mCS_"+n.idx,o=".mCSB_"+n.idx+"_scrollbar",a=e("#mCSB_"+n.idx+",#mCSB_"+n.idx+"_container,#mCSB_"+n.idx+"_container_wrapper,"+o+" ."+u[12]+",#mCSB_"+n.idx+"_dragger_vertical,#mCSB_"+n.idx+"_dragger_horizontal,"+o+">a"),s=e("#mCSB_"+n.idx+"_container");i.advanced.releaseDraggableSelectors&&a.add(e(i.advanced.releaseDraggableSelectors)),i.advanced.extraDraggableSelectors&&a.add(e(i.advanced.extraDraggableSelectors)),n.bindEvents&&(e(document).add(e(!R()||top.document)).unbind("."+r),a.each(function(){e(this).unbind("."+r)}),clearTimeout(t[0]._focusTimeout),Q(t[0],"_focusTimeout"),clearTimeout(n.sequential.step),Q(n.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),Q(s[0],"onCompleteTimeout"),n.bindEvents=!1)},T=function(t){var n=e(this),i=n.data("mCS"),r=i.opt,o=e("#mCSB_"+i.idx+"_container_wrapper"),a=o.length?o:e("#mCSB_"+i.idx+"_container"),s=[e("#mCSB_"+i.idx+"_scrollbar_vertical"),e("#mCSB_"+i.idx+"_scrollbar_horizontal")],l=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==r.axis&&(i.overflowed[0]&&!t?(s[0].add(l[0]).add(s[0].children("a")).css("display","block"),a.removeClass(u[8]+" "+u[10])):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&l[0].css("display","none"),a.removeClass(u[10])):(s[0].css("display","none"),a.addClass(u[10])),a.addClass(u[8]))),"y"!==r.axis&&(i.overflowed[1]&&!t?(s[1].add(l[1]).add(s[1].children("a")).css("display","block"),a.removeClass(u[9]+" "+u[11])):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&l[1].css("display","none"),a.removeClass(u[11])):(s[1].css("display","none"),a.addClass(u[11])),a.addClass(u[9]))),i.overflowed[0]||i.overflowed[1]?n.removeClass(u[5]):n.addClass(u[5])},$=function(t){var n=t.type,i=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,r=R()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(n){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return i?[t.originalEvent.pageY-i[0]+r[0],t.originalEvent.pageX-i[1]+r[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var o=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],a=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[o.screenY,o.screenX,a>1]:[o.pageY,o.pageX,a>1];default:return i?[t.pageY-i[0]+r[0],t.pageX-i[1]+r[1],!1]:[t.pageY,t.pageX,!1]}},E=function(){function t(e,t,i,r){if(h[0].idleTimer=u.scrollInertia<233?250:0,n.attr("id")===d[1])var s="x",l=(n[0].offsetLeft-t+r)*a.scrollRatio.x;else var s="y",l=(n[0].offsetTop-e+i)*a.scrollRatio.y;q(o,l.toString(),{dir:s,drag:!0})}var n,i,r,o=e(this),a=o.data("mCS"),u=a.opt,c="mCS_"+a.idx,d=["mCSB_"+a.idx+"_dragger_vertical","mCSB_"+a.idx+"_dragger_horizontal"],h=e("#mCSB_"+a.idx+"_container"),p=e("#"+d[0]+",#"+d[1]),f=u.advanced.releaseDraggableSelectors?p.add(e(u.advanced.releaseDraggableSelectors)):p,m=u.advanced.extraDraggableSelectors?e(!R()||top.document).add(e(u.advanced.extraDraggableSelectors)):e(!R()||top.document);p.bind("contextmenu."+c,function(e){e.preventDefault()}).bind("mousedown."+c+" touchstart."+c+" pointerdown."+c+" MSPointerDown."+c,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),K(t)){l=!0,s&&(document.onselectstart=function(){return!1}),j.call(h,!1),W(o);var a=(n=e(this)).offset(),c=$(t)[0]-a.top,d=$(t)[1]-a.left,p=n.height()+a.top,f=n.width()+a.left;p>c&&c>0&&f>d&&d>0&&(i=c,r=d),x(n,"active",u.autoExpandScrollbar)}}).bind("touchmove."+c,function(e){e.stopImmediatePropagation(),e.preventDefault();var o=n.offset(),a=$(e)[0]-o.top,s=$(e)[1]-o.left;t(i,r,a,s)}),e(document).add(m).bind("mousemove."+c+" pointermove."+c+" MSPointerMove."+c,function(e){if(n){var o=n.offset(),a=$(e)[0]-o.top,s=$(e)[1]-o.left;if(i===a&&r===s)return;t(i,r,a,s)}}).add(f).bind("mouseup."+c+" touchend."+c+" pointerup."+c+" MSPointerUp."+c,function(){n&&(x(n,"active",u.autoExpandScrollbar),n=null),l=!1,s&&(document.onselectstart=null),j.call(h,!0)})},M=function(){function n(e){if(!J(e)||l||$(e)[2])t=0;else{t=1,_=0,x=0,u=1,k.removeClass("mCS_touch_action");var n=E.offset();c=$(e)[0]-n.top,d=$(e)[1]-n.left,I=[$(e)[0],$(e)[1]]}}function i(e){if(J(e)&&!l&&!$(e)[2]&&(D.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!x||_)&&u)){m=Z();var t=T.offset(),n=$(e)[0]-t.top,i=$(e)[1]-t.left;if(O.push(n),P.push(i),I[2]=Math.abs($(e)[0]-I[0]),I[3]=Math.abs($(e)[1]-I[1]),C.overflowed[0])var r=M[0].parent().height()-M[0].height(),o=c-n>0&&n-c>-r*C.scrollRatio.y&&(2*I[3]0&&i-d>-a*C.scrollRatio.x&&(2*I[2]30)){var r=2.5>(y=1e3/(g-f)),o=r?[O[O.length-2],P[P.length-2]]:[0,0];v=r?[n-o[0],i-o[1]]:[n-h,i-p];var c=[Math.abs(v[0]),Math.abs(v[1])];y=r?[Math.abs(v[0]/4),Math.abs(v[1]/4)]:[y,y];var d=[Math.abs(E[0].offsetTop)-v[0]*a(c[0]/y[0],y[0]),Math.abs(E[0].offsetLeft)-v[1]*a(c[1]/y[1],y[1])];w="yx"===D.axis?[d[0],d[1]]:"x"===D.axis?[null,d[1]]:[d[0],null],b=[4*c[0]+D.scrollInertia,4*c[1]+D.scrollInertia];var k=parseInt(D.contentTouchScroll)||0;w[0]=c[0]>k?w[0]:0,w[1]=c[1]>k?w[1]:0,C.overflowed[0]&&s(w[0],b[0],"mcsEaseOut","y",j,!1),C.overflowed[1]&&s(w[1],b[1],"mcsEaseOut","x",j,!1)}}}function a(e,t){var n=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?n[0]:n[3]:e>60?t>3?n[3]:n[2]:e>30?t>8?n[1]:t>6?n[0]:t>4?t:n[2]:t>8?t:n[3]}function s(e,t,n,i,r,o){e&&q(k,e.toString(),{dur:t,scrollEasing:n,dir:i,overwrite:r,drag:o})}var u,c,d,h,p,f,m,g,v,y,w,b,_,x,k=e(this),C=k.data("mCS"),D=C.opt,S="mCS_"+C.idx,T=e("#mCSB_"+C.idx),E=e("#mCSB_"+C.idx+"_container"),M=[e("#mCSB_"+C.idx+"_dragger_vertical"),e("#mCSB_"+C.idx+"_dragger_horizontal")],O=[],P=[],A=0,j="yx"===D.axis?"none":"all",I=[],F=E.find("iframe"),L=["touchstart."+S+" pointerdown."+S+" MSPointerDown."+S,"touchmove."+S+" pointermove."+S+" MSPointerMove."+S,"touchend."+S+" pointerup."+S+" MSPointerUp."+S],N=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;E.bind(L[0],function(e){n(e)}).bind(L[1],function(e){i(e)}),T.bind(L[0],function(e){r(e)}).bind(L[2],function(e){o(e)}),F.length&&F.each(function(){e(this).bind("load",function(){R(this)&&e(this.contentDocument||this.contentWindow.document).bind(L[0],function(e){n(e),r(e)}).bind(L[1],function(e){i(e)}).bind(L[2],function(e){o(e)})})})},O=function(){function n(e,t,n){s.type=n&&i?"stepped":"stepless",s.scrollAmount=10,B(r,e,t,"mcsLinearOut",n?60:null)}var i,r=e(this),o=r.data("mCS"),a=o.opt,s=o.sequential,u="mCS_"+o.idx,c=e("#mCSB_"+o.idx+"_container"),d=c.parent();c.bind("mousedown."+u,function(){t||i||(i=1,l=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&(window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type&&document.selection.createRange().text)){var r=c.offset(),l=$(e)[0]-r.top+c[0].offsetTop,u=$(e)[1]-r.left+c[0].offsetLeft;l>0&&l0&&ul?n("on",38):l>d.height()&&n("on",40)),"y"!==a.axis&&o.overflowed[1]&&(0>u?n("on",37):u>d.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),l=!1)})},P=function(){function t(t,o){if(W(n),!I(n,t.target)){var u="auto"!==r.mouseWheel.deltaFactor?parseInt(r.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,c=r.scrollInertia;if("x"===r.axis||"x"===r.mouseWheel.axis)var d="x",h=[Math.round(u*i.scrollRatio.x),parseInt(r.mouseWheel.scrollAmount)],p="auto"!==r.mouseWheel.scrollAmount?h[1]:h[0]>=a.width()?.9*a.width():h[0],f=Math.abs(e("#mCSB_"+i.idx+"_container")[0].offsetLeft),m=l[1][0].offsetLeft,g=l[1].parent().width()-l[1].width(),v="y"===r.mouseWheel.axis?t.deltaY||o:t.deltaX;else var d="y",h=[Math.round(u*i.scrollRatio.y),parseInt(r.mouseWheel.scrollAmount)],p="auto"!==r.mouseWheel.scrollAmount?h[1]:h[0]>=a.height()?.9*a.height():h[0],f=Math.abs(e("#mCSB_"+i.idx+"_container")[0].offsetTop),m=l[0][0].offsetTop,g=l[0].parent().height()-l[0].height(),v=t.deltaY||o;"y"===d&&!i.overflowed[0]||"x"===d&&!i.overflowed[1]||((r.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),r.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==m||0>v&&m!==g||r.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!r.mouseWheel.normalizeDelta&&(p=t.deltaFactor,c=17),q(n,(f-v*p).toString(),{dir:d,dur:c}))}}if(e(this).data("mCS")){var n=e(this),i=n.data("mCS"),r=i.opt,o="mCS_"+i.idx,a=e("#mCSB_"+i.idx),l=[e("#mCSB_"+i.idx+"_dragger_vertical"),e("#mCSB_"+i.idx+"_dragger_horizontal")],u=e("#mCSB_"+i.idx+"_container").find("iframe");u.length&&u.each(function(){e(this).bind("load",function(){R(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+o,function(e,n){t(e,n)})})}),a.bind("mousewheel."+o,function(e,n){t(e,n)})}},A=new Object,R=function(t){var n=!1,i=!1,r=null;if(void 0===t?i="#empty":void 0!==e(t).attr("id")&&(i=e(t).attr("id")),!1!==i&&void 0!==A[i])return A[i];if(t){try{var o=t.contentDocument||t.contentWindow.document;r=o.body.innerHTML}catch(e){}n=null!==r}else{try{var o=top.document;r=o.body.innerHTML}catch(e){}n=null!==r}return!1!==i&&(A[i]=n),n},j=function(e){var t=this.find("iframe");if(t.length){var n=e?"auto":"none";t.css("pointer-events",n)}},I=function(t,n){var i=n.nodeName.toLowerCase(),r=t.data("mCS").opt.mouseWheel.disableOver;return e.inArray(i,r)>-1&&!(e.inArray(i,["select","textarea"])>-1&&!e(n).is(":focus"))},F=function(){var t,n=e(this),i=n.data("mCS"),r="mCS_"+i.idx,o=e("#mCSB_"+i.idx+"_container"),a=o.parent(),s=e(".mCSB_"+i.idx+"_scrollbar ."+u[12]);s.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(n){l=!0,e(n.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(){l=!1}).bind("click."+r,function(r){if(t&&(t=0,e(r.target).hasClass(u[12])||e(r.target).hasClass("mCSB_draggerRail"))){W(n);var s=e(this),l=s.find(".mCSB_dragger");if(s.parent(".mCSB_scrollTools_horizontal").length>0){if(!i.overflowed[1])return;var c="x",d=r.pageX>l.offset().left?-1:1,h=Math.abs(o[0].offsetLeft)-d*(.9*a.width())}else{if(!i.overflowed[0])return;var c="y",d=r.pageY>l.offset().top?-1:1,h=Math.abs(o[0].offsetTop)-d*(.9*a.height())}q(n,h.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},L=function(){var t=e(this),n=t.data("mCS"),i=n.opt,r="mCS_"+n.idx,o=e("#mCSB_"+n.idx+"_container"),a=o.parent();o.bind("focusin."+r,function(){var n=e(document.activeElement),r=o.find(".mCustomScrollBox").length;n.is(i.advanced.autoScrollOnFocus)&&(W(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=r?17*r:0,t[0]._focusTimeout=setTimeout(function(){var e=[te(n)[0],te(n)[1]],r=[o[0].offsetTop,o[0].offsetLeft],s=[r[0]+e[0]>=0&&r[0]+e[0]=0&&r[0]+e[1]a");s.bind("contextmenu."+o,function(e){e.preventDefault()}).bind("mousedown."+o+" touchstart."+o+" pointerdown."+o+" MSPointerDown."+o+" mouseup."+o+" touchend."+o+" pointerup."+o+" MSPointerUp."+o+" mouseout."+o+" pointerout."+o+" MSPointerOut."+o+" click."+o,function(o){function a(e,n){r.scrollAmount=i.scrollButtons.scrollAmount,B(t,e,n)}if(o.preventDefault(),K(o)){var s=e(this).attr("class");switch(r.type=i.scrollButtons.scrollType,o.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===r.type)return;l=!0,n.tweenRunning=!1,a("on",s);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===r.type)return;l=!1,r.dir&&a("off",s);break;case"click":if("stepped"!==r.type||n.tweenRunning)return;a("on",s)}}})},H=function(){function t(t){function a(e,t){o.type=r.keyboard.scrollType,o.scrollAmount=r.keyboard.scrollAmount,"stepped"===o.type&&i.tweenRunning||B(n,e,t)}switch(t.type){case"blur":i.tweenRunning&&o.dir&&a("off",null);break;case"keydown":case"keyup":var s=t.keyCode?t.keyCode:t.which,d="on";if("x"!==r.axis&&(38===s||40===s)||"y"!==r.axis&&(37===s||39===s)){if((38===s||40===s)&&!i.overflowed[0]||(37===s||39===s)&&!i.overflowed[1])return;"keyup"===t.type&&(d="off"),e(document.activeElement).is(c)||(t.preventDefault(),t.stopImmediatePropagation(),a(d,s))}else if(33===s||34===s){if((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){W(n);var h=34===s?-1:1;if("x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0])var p="x",f=Math.abs(l[0].offsetLeft)-h*(.9*u.width());else var p="y",f=Math.abs(l[0].offsetTop)-h*(.9*u.height());q(n,f.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}else if((35===s||36===s)&&!e(document.activeElement).is(c)&&((i.overflowed[0]||i.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===r.axis||"yx"===r.axis&&i.overflowed[1]&&!i.overflowed[0])var p="x",f=35===s?Math.abs(u.width()-l.outerWidth(!1)):0;else var p="y",f=35===s?Math.abs(u.height()-l.outerHeight(!1)):0;q(n,f.toString(),{dir:p,scrollEasing:"mcsEaseInOut"})}}}var n=e(this),i=n.data("mCS"),r=i.opt,o=i.sequential,a="mCS_"+i.idx,s=e("#mCSB_"+i.idx),l=e("#mCSB_"+i.idx+"_container"),u=l.parent(),c="input,textarea,select,datalist,keygen,[contenteditable='true']",d=l.find("iframe"),h=["blur."+a+" keydown."+a+" keyup."+a];d.length&&d.each(function(){e(this).bind("load",function(){R(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},B=function(t,n,i,r,o){function a(e){l.snapAmount&&(c.scrollAmount=l.snapAmount instanceof Array?"x"===c.dir[0]?l.snapAmount[1]:l.snapAmount[0]:l.snapAmount);var n="stepped"!==c.type,i=o||(e?n?p/1.5:f:1e3/60),u=e?n?7.5:40:2.5,h=[Math.abs(d[0].offsetTop),Math.abs(d[0].offsetLeft)],m=[s.scrollRatio.y>10?10:s.scrollRatio.y,s.scrollRatio.x>10?10:s.scrollRatio.x],g="x"===c.dir[0]?h[1]+c.dir[1]*(m[1]*u):h[0]+c.dir[1]*(m[0]*u),v="x"===c.dir[0]?h[1]+c.dir[1]*parseInt(c.scrollAmount):h[0]+c.dir[1]*parseInt(c.scrollAmount),y="auto"!==c.scrollAmount?v:g,w=r||(e?n?"mcsLinearOut":"mcsEaseInOut":"mcsLinear"),b=!!e;return e&&17>i&&(y="x"===c.dir[0]?h[1]:h[0]),q(t,y.toString(),{dir:c.dir[0],scrollEasing:w,dur:i,onComplete:b}),e?void(c.dir=!1):(clearTimeout(c.step),void(c.step=setTimeout(function(){a()},i)))}var s=t.data("mCS"),l=s.opt,c=s.sequential,d=e("#mCSB_"+s.idx+"_container"),h="stepped"===c.type,p=l.scrollInertia<26?26:l.scrollInertia,f=l.scrollInertia<1?17:l.scrollInertia;switch(n){case"on":if(c.dir=[i===u[16]||i===u[15]||39===i||37===i?"x":"y",i===u[13]||i===u[15]||38===i||37===i?-1:1],W(t),ee(i)&&"stepped"===c.type)return;a(h);break;case"off":clearTimeout(c.step),Q(c,"step"),W(t),(h||s.tweenRunning&&c.dir)&&a(!0)}},V=function(t){var n=e(this).data("mCS").opt,i=[];return"function"==typeof t&&(t=t()),t instanceof Array?i=t.length>1?[t[0],t[1]]:"x"===n.axis?[null,t[0]]:[t[0],null]:(i[0]=t.y?t.y:t.x||"x"===n.axis?null:t,i[1]=t.x?t.x:t.y||"y"===n.axis?null:t),"function"==typeof i[0]&&(i[0]=i[0]()),"function"==typeof i[1]&&(i[1]=i[1]()),i},Y=function(t,n){if(null!=t&&void 0!==t){var i=e(this),r=i.data("mCS"),o=r.opt,a=e("#mCSB_"+r.idx+"_container"),s=a.parent(),l=typeof t;n||(n="x"===o.axis?"x":"y");var u="x"===n?a.outerWidth(!1)-s.width():a.outerHeight(!1)-s.height(),d="x"===n?a[0].offsetLeft:a[0].offsetTop,h="x"===n?"left":"top";switch(l){case"function":return t();case"object":var p=t.jquery?t:e(t);if(!p.length)return;return"x"===n?te(p)[1]:te(p)[0];case"string":case"number":if(ee(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(u*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(d-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var f=d+parseInt(t.split("+=")[1]);return f>=0?0:Math.abs(f)}if(-1!==t.indexOf("px")&&ee(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-a.outerHeight(!1));if("right"===t)return Math.abs(s.width()-a.outerWidth(!1));if("first"===t||"last"===t){var p=a.find(":"+t);return"x"===n?te(p)[1]:te(p)[0]}return e(t).length?"x"===n?te(e(t))[1]:te(e(t))[0]:(a.css(h,t),void c.update.call(null,i[0]))}}},z=function(t){function n(e){clearTimeout(a[0].autoUpdate),c.update.call(null,i[0],e)}var i=e(this),r=i.data("mCS"),o=r.opt,a=e("#mCSB_"+r.idx+"_container");return t?(clearTimeout(a[0].autoUpdate),void Q(a[0],"autoUpdate")):void function t(){return clearTimeout(a[0].autoUpdate),0===i.parents("html").length?void(i=null):void(a[0].autoUpdate=setTimeout(function(){return o.advanced.updateOnSelectorChange&&(r.poll.change.n=function(){!0===o.advanced.updateOnSelectorChange&&(o.advanced.updateOnSelectorChange="*");var e=0,t=a.find(o.advanced.updateOnSelectorChange);return o.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}(),r.poll.change.n!==r.poll.change.o)?(r.poll.change.o=r.poll.change.n,void n(3)):o.advanced.updateOnContentResize&&(r.poll.size.n=i[0].scrollHeight+i[0].scrollWidth+a[0].offsetHeight+i[0].offsetHeight+i[0].offsetWidth,r.poll.size.n!==r.poll.size.o)?(r.poll.size.o=r.poll.size.n,void n(1)):!o.advanced.updateOnImageLoad||"auto"===o.advanced.updateOnImageLoad&&"y"===o.axis||(r.poll.img.n=a.find("img").length,r.poll.img.n===r.poll.img.o)?void((o.advanced.updateOnSelectorChange||o.advanced.updateOnContentResize||o.advanced.updateOnImageLoad)&&t()):(r.poll.img.o=r.poll.img.n,void a.find("img").each(function(){!function(t){if(e(t).hasClass(u[2]))return void n();var i=new Image;i.onload=function(e,t){return function(){return t.apply(e,arguments)}}(i,function(){this.onload=null,e(t).addClass(u[2]),n(2)}),i.src=t.src}(this)}))},o.advanced.autoUpdateTimeout))}()},W=function(t){var n=t.data("mCS"),i=e("#mCSB_"+n.idx+"_container,#mCSB_"+n.idx+"_container_wrapper,#mCSB_"+n.idx+"_dragger_vertical,#mCSB_"+n.idx+"_dragger_horizontal");i.each(function(){X.call(this)})},q=function(t,n,i){function r(e){return a&&s.callbacks[e]&&"function"==typeof s.callbacks[e]}function o(){var e=[d[0].offsetTop,d[0].offsetLeft],n=[g[0].offsetTop,g[0].offsetLeft],r=[d.outerHeight(!1),d.outerWidth(!1)],o=[c.height(),c.width()];t[0].mcs={content:d,top:e[0],left:e[1],draggerTop:n[0],draggerLeft:n[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(r[0])-o[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(r[1])-o[1])),direction:i.dir}}var a=t.data("mCS"),s=a.opt,l={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:s.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=e.extend(l,i),u=[i.dur,i.drag?0:i.dur],c=e("#mCSB_"+a.idx),d=e("#mCSB_"+a.idx+"_container"),h=d.parent(),p=s.callbacks.onTotalScrollOffset?V.call(t,s.callbacks.onTotalScrollOffset):[0,0],f=s.callbacks.onTotalScrollBackOffset?V.call(t,s.callbacks.onTotalScrollBackOffset):[0,0];if(a.trigger=i.trigger,0===h.scrollTop()&&0===h.scrollLeft()||(e(".mCSB_"+a.idx+"_scrollbar").css("visibility","visible"),h.scrollTop(0).scrollLeft(0)),"_resetY"!==n||a.contentReset.y||(r("onOverflowYNone")&&s.callbacks.onOverflowYNone.call(t[0]),a.contentReset.y=1),"_resetX"!==n||a.contentReset.x||(r("onOverflowXNone")&&s.callbacks.onOverflowXNone.call(t[0]),a.contentReset.x=1),"_resetY"!==n&&"_resetX"!==n){if(!a.contentReset.y&&t[0].mcs||!a.overflowed[0]||(r("onOverflowY")&&s.callbacks.onOverflowY.call(t[0]),a.contentReset.x=null),!a.contentReset.x&&t[0].mcs||!a.overflowed[1]||(r("onOverflowX")&&s.callbacks.onOverflowX.call(t[0]),a.contentReset.x=null),s.snapAmount){var m=s.snapAmount instanceof Array?"x"===i.dir?s.snapAmount[1]:s.snapAmount[0]:s.snapAmount;S=n,T=m,$=s.snapOffset,n=Math.round(S/T)*T-$}switch(i.dir){case"x":var g=e("#mCSB_"+a.idx+"_dragger_horizontal"),v="left",y=d[0].offsetLeft,w=[c.width()-d.outerWidth(!1),g.parent().width()-g.width()],b=[n,0===n?0:n/a.scrollRatio.x],_=p[1],k=f[1],C=_>0?_/a.scrollRatio.x:0,D=k>0?k/a.scrollRatio.x:0;break;case"y":var g=e("#mCSB_"+a.idx+"_dragger_vertical"),v="top",y=d[0].offsetTop,w=[c.height()-d.outerHeight(!1),g.parent().height()-g.height()],b=[n,0===n?0:n/a.scrollRatio.y],_=p[0],k=f[0],C=_>0?_/a.scrollRatio.y:0,D=k>0?k/a.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=w[1]?b=[w[0],w[1]]:b[0]=-b[0],t[0].mcs||(o(),r("onInit")&&s.callbacks.onInit.call(t[0])),clearTimeout(d[0].onCompleteTimeout),G(g[0],v,Math.round(b[1]),u[1],i.scrollEasing),!a.tweenRunning&&(0===y&&b[0]>=0||y===w[0]&&b[0]<=w[0])||G(d[0],v,Math.round(b[0]),u[0],i.scrollEasing,i.overwrite,{onStart:function(){i.callbacks&&i.onStart&&!a.tweenRunning&&(r("onScrollStart")&&(o(),s.callbacks.onScrollStart.call(t[0])),a.tweenRunning=!0,x(g),a.cbOffsets=[s.callbacks.alwaysTriggerOffsets||y>=w[0]+_,s.callbacks.alwaysTriggerOffsets||-k>=y])},onUpdate:function(){i.callbacks&&i.onUpdate&&r("whileScrolling")&&(o(),s.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(i.callbacks&&i.onComplete){"yx"===s.axis&&clearTimeout(d[0].onCompleteTimeout);var e=d[0].idleTimer||0;d[0].onCompleteTimeout=setTimeout(function(){r("onScroll")&&(o(),s.callbacks.onScroll.call(t[0])),r("onTotalScroll")&&b[1]>=w[1]-C&&a.cbOffsets[0]&&(o(),s.callbacks.onTotalScroll.call(t[0])),r("onTotalScrollBack")&&b[1]<=D&&a.cbOffsets[1]&&(o(),s.callbacks.onTotalScrollBack.call(t[0])),a.tweenRunning=!1,d[0].idleTimer=0,x(g,"hide")},e)}}})}var S,T,$},G=function(e,t,n,i,r,o,a){function s(){y.stop||(m||d.call(),m=Z()-f,l(),m>=y.time&&(y.time=m>y.time?m+u-(m-y.time):m+u-1,y.time0?(y.currVal=function(e,t,n,i,r){switch(r){case"linear":case"mcsLinear":return n*e/i+t;case"mcsLinearOut":return e/=i,e--,n*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return 1>(e/=i/2)?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return 1>(e/=i/2)?n/2*Math.pow(2,10*(e-1))+t:(e--,n/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return 1>(e/=i/2)?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=i,-n*(--e*e*e*e-1)+t;case"easeOutStrong":return n*(1-Math.pow(2,-10*e/i))+t;case"easeOut":case"mcsEaseOut":default:var o=(e/=i)*e,a=o*e;return t+n*(.499999999999997*a*o+-2.5*o*o+5.5*a+-6.5*o+4*e)}}(y.time,g,w,i,r),v[t]=Math.round(y.currVal)+"px"):v[t]=n+"px",h.call()}e._mTween||(e._mTween={top:{},left:{}});var u,c,a=a||{},d=a.onStart||function(){},h=a.onUpdate||function(){},p=a.onComplete||function(){},f=Z(),m=0,g=e.offsetTop,v=e.style,y=e._mTween[t];"left"===t&&(g=e.offsetLeft);var w=n-g;y.stop=0,"none"!==o&&null!=y.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(y.id):clearTimeout(y.id),y.id=null),u=1e3/60,y.time=m+u,c=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return l(),setTimeout(e,.01)},y.id=c(s)},Z=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},X=function(){this._mTween||(this._mTween={top:{},left:{}});for(var e=["top","left"],t=0;t=0&&i[0]+te(r)[0]=0&&i[1]+te(r)[1]=0&&a[1]-o[1]*s[1][0]<0&&a[1]+r[1]-o[1]*s[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var n=e(t).data("mCS");if(n)return n.overflowed[0]||n.overflowed[1]}})})}()}()}),function(){"use strict";n.$inject=["a"];function e(){this.defaults={scrollButtons:{enable:!0},axis:"yx"},$.mCustomScrollbar.defaults.scrollButtons=this.defaults.scrollButtons,$.mCustomScrollbar.defaults.axis=this.defaults.axis,this.$get=function(){return{defaults:this.defaults}}}function t(e,t,n,i){n.mCustomScrollbar("destroy");var r={};i.ngScrollbarsConfig&&(r=i.ngScrollbarsConfig);for(var o in e)if(e.hasOwnProperty(o))switch(o){case"scrollButtons":r.hasOwnProperty(o)||(t.scrollButtons=e[o]);break;case"axis":r.hasOwnProperty(o)||(t.axis=e[o]);break;default:r.hasOwnProperty(o)||(r[o]=e[o])}n.mCustomScrollbar(r)}function n(e){return{scope:{ngScrollbarsConfig:"=?",ngScrollbarsUpdate:"=?",element:"=?"},link:function(n,i,r){n.elem=i;var o=e.defaults,a=$.mCustomScrollbar.defaults;n.ngScrollbarsUpdate=function(){i.mCustomScrollbar.apply(i,arguments)},n.$watch("ngScrollbarsConfig",function(e,r){void 0!==e&&t(o,a,i,n)}),t(o,a,i,n)}}}angular.module("ngScrollbars",[]).provider("ScrollBars",e).directive("ngScrollbars",n),e.$inject=[],n.$inject=["ScrollBars"]}(),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.Promise=e()}}(function(){return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return r(n||e)},c,c.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;)o(e)}function o(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var n=e.shift(),i=e.shift();t.call(n,i)}}var a;try{throw new Error}catch(e){a=e}var s=e("./schedule"),l=e("./queue");i.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},i.prototype.hasCustomScheduler=function(){return this._customScheduler},i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},i.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},i.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout(function(){e(t)},0);else try{this._schedule(function(){e(t)})}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},i.prototype.invokeLater=function(e,t,n){this._lateQueue.push(e,t,n),this._queueTick()},i.prototype.invoke=function(e,t,n){this._normalQueue.push(e,t,n),this._queueTick()},i.prototype.settlePromises=function(e){this._normalQueue._pushOne(e),this._queueTick()},i.prototype._drainQueues=function(){r(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,r(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},t.exports=i,t.exports.firstLineError=a},{"./queue":26,"./schedule":29}],3:[function(e,t,n){"use strict";t.exports=function(e,t,n,i){var r=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){r||(r=!0,e.prototype._propagateFrom=i.propagateFromFunction(),e.prototype._boundValue=i.boundValueFunction());var u=n(o),c=new e(t);c._propagateFrom(this,1);var d=this._target();if(c._setBoundTo(u),u instanceof e){var h={promiseRejectionQueued:!1,promise:c,target:d,bindingPromise:u};d._then(t,a,void 0,c,h),u._then(s,l,void 0,c,h),c._setOnCancel(u)}else c._resolveCallback(d);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,n){"use strict";var i;"undefined"!=typeof Promise&&(i=Promise);var r=e("./promise")();r.noConflict=function(){try{Promise===r&&(Promise=i)}catch(e){}return r},t.exports=r},{"./promise":22}],5:[function(e,t,n){"use strict";var i=Object.create;if(i){var r=i(null),o=i(null);r[" size"]=o[" size"]=0}t.exports=function(t){function n(e){return function(e,n){var i;if(null!=e&&(i=e[n]),"function"!=typeof i){var r="Object "+o.classString(e)+" has no method '"+o.toString(n)+"'";throw new t.TypeError(r)}return i}(e,this.pop()).apply(e,this)}function i(e){return e[this]}function r(e){var t=+this;return 0>t&&(t=Math.max(0,t+e.length)),e[t]}var o=e("./util"),a=o.canEvaluate;o.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(n,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=r;else if(a){var n=(void 0)(e);t=null!==n?n:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,n){"use strict";t.exports=function(t,n,i,r){var o=e("./util"),a=o.tryCatch,s=o.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!r.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n=0?r[e]:void 0}var i=!1,r=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=function(){return i?new t:void 0},t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var r=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,l=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=l,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=n,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(e,t,n){"use strict";t.exports=function(t,n,i,r){function o(e,t){return{promise:t}}function a(){return!1}function s(e,t,n){var i=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+P.toString(e));i._attachCancellationCallback(e)})}catch(e){return e}}function l(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?P.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function u(){return this._onCancelField}function c(e){this._onCancelField=e}function d(){this._cancellationParent=void 0,this._onCancelField=void 0}function h(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function p(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function f(){this._trace=new D(this._peekContext())}function m(e,t){if(R(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var i=w(e);P.notEnumerableProp(e,"stack",i.message+"\n"+i.stack.join("\n")),P.notEnumerableProp(e,"__stackCleaned__",!0)}}}function g(){this._trace=void 0}function v(e,n,i){if(te.warnings){var r,o=new O(e);if(n)i._attachExtraTrace(o);else if(te.longStackTraces&&(r=t._peekContext()))r.attachExtraTrace(o);else{var a=w(o);o.stack=a.message+"\n"+a.stack.join("\n")}X("warning",o)||b(o,"",!0)}}function y(e){for(var t=[],n=0;n0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),n=0;n0&&"SyntaxError"!=e.name&&(t=t.slice(n)),t}(e):[" (No stack trace)"],{message:n,stack:"SyntaxError"==e.name?t:y(t)}}function b(e,t,n){if("undefined"!=typeof console){var i;if(P.isObject(e)){var r=e.stack;i=t+N(r,e)}else i=t+String(e);"function"==typeof $?$(i,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(i)}}function _(e,t,n,i){var r=!1;try{"function"==typeof t&&(r=!0,"rejectionHandled"===e?t(i):t(n,i))}catch(e){M.throwLater(e)}"unhandledRejection"===e?X(e,n,i)||r||b(n,"Unhandled rejection "):X(e,i)}function x(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():P.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+(n=t,n.length<41?n:n.substr(0,38)+"...")+">, no stack trace)";var n}function k(){return"function"==typeof ee}function C(e){var t=e.match(J);return t?{fileName:t[1],line:parseInt(t[2],10)}:void 0}function D(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ee(this,D),t>32&&this.uncycle()}var S,T,$,E,M=t._async,O=e("./errors").Warning,P=e("./util"),A=e("./es5"),R=P.canAttachTrace,j=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,I=/\((?:timers\.js):\d+:\d+\)/,F=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,L=null,N=null,U=!1,H=!(0==P.env("BLUEBIRD_DEBUG")||!P.env("BLUEBIRD_DEBUG")&&"development"!==P.env("NODE_ENV")),B=!(0==P.env("BLUEBIRD_WARNINGS")||!H&&!P.env("BLUEBIRD_WARNINGS")),V=!(0==P.env("BLUEBIRD_LONG_STACK_TRACES")||!H&&!P.env("BLUEBIRD_LONG_STACK_TRACES")),Y=0!=P.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(B||!!P.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){function e(){for(var e=0;e0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,n){return v(e,t,n||this)},t.onPossiblyUnhandledRejection=function(e){var n=t._getContext();T=P.contextBind(n,e)},t.onUnhandledRejectionHandled=function(e){var n=t._getContext();S=P.contextBind(n,e)};var z=function(){};t.longStackTraces=function(){if(M.haveItemsQueued()&&!te.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!te.longStackTraces&&k()){var e=t.prototype._captureStackTrace,i=t.prototype._attachExtraTrace,r=t.prototype._dereferenceTrace;te.longStackTraces=!0,z=function(){if(M.haveItemsQueued()&&!te.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=i,t.prototype._dereferenceTrace=r,n.deactivateLongStackTraces(),te.longStackTraces=!1},t.prototype._captureStackTrace=f,t.prototype._attachExtraTrace=m,t.prototype._dereferenceTrace=g,n.activateLongStackTraces()}},t.hasLongStackTraces=function(){return te.longStackTraces&&k()};var W={unhandledrejection:{before:function(){var e=P.global.onunhandledrejection;return P.global.onunhandledrejection=null,e},after:function(e){P.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=P.global.onrejectionhandled;return P.global.onrejectionhandled=null,e},after:function(e){P.global.onrejectionhandled=e}}},q=function(){var e=function(e,t){if(!e)return!P.global.dispatchEvent(t);var n;try{return n=e.before(),!P.global.dispatchEvent(t)}finally{e.after(n)}};try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return P.global.dispatchEvent(t),function(t,n){t=t.toLowerCase();var i=new CustomEvent(t,{detail:n,cancelable:!0});return A.defineProperty(i,"promise",{value:n.promise}),A.defineProperty(i,"reason",{value:n.reason}),e(W[t],i)}}if("function"==typeof Event){t=new Event("CustomEvent");return P.global.dispatchEvent(t),function(t,n){t=t.toLowerCase();var i=new Event(t,{cancelable:!0});return i.detail=n,A.defineProperty(i,"promise",{value:n.promise}),A.defineProperty(i,"reason",{value:n.reason}),e(W[t],i)}}return(t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),P.global.dispatchEvent(t),function(t,n){t=t.toLowerCase();var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,!1,!0,n),e(W[t],i)}}catch(e){}return function(){return!1}}(),G=P.isNode?function(){return process.emit.apply(process,arguments)}:P.global?function(e){var t="on"+e.toLowerCase(),n=P.global[t];return!!n&&(n.apply(P.global,[].slice.call(arguments,1)),!0)}:function(){return!1},Z={promiseCreated:o,promiseFulfilled:o,promiseRejected:o,promiseResolved:o,promiseCancelled:o,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:o},X=function(e){var t=!1;try{t=G.apply(null,arguments)}catch(e){M.throwLater(e),t=!0}var n=!1;try{n=q(e,Z[e].apply(null,arguments))}catch(e){M.throwLater(e),n=!0}return n||t};t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&z()),"warnings"in e){var n=e.warnings;te.warnings=!!n,Y=te.warnings,P.isObject(n)&&"wForgottenReturn"in n&&(Y=!!n.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!te.cancellation){if(M.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=d,t.prototype._propagateFrom=h,t.prototype._onCancel=u,t.prototype._setOnCancel=c,t.prototype._attachCancellationCallback=l,t.prototype._execute=s,Q=h,te.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!te.monitoring?(te.monitoring=!0,t.prototype._fireEvent=X):!e.monitoring&&te.monitoring&&(te.monitoring=!1,t.prototype._fireEvent=a)),"asyncHooks"in e&&P.nodeSupportsAsyncResource){var o=te.asyncHooks,p=!!e.asyncHooks;o!==p&&(te.asyncHooks=p,p?i():r())}return t},t.prototype._fireEvent=a,t.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var Q=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)},K=function(){return!1},J=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;P.inherits(D,Error),n.CapturedTrace=D,D.prototype.uncycle=function(){var e=this._length;if(!(2>e)){for(var t=[],n={},i=0,r=this;void 0!==r;++i)t.push(r),r=r._parent;for(i=(e=this._length=i)-1;i>=0;--i){var o=t[i].stack;void 0===n[o]&&(n[o]=i)}for(i=0;e>i;++i){var a=n[t[i].stack];if(void 0!==a&&a!==i){a>0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[i]._parent=void 0,t[i]._length=1;var s=i>0?t[i-1]:this;e-1>a?(s._parent=t[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var l=s._length+1,u=i-2;u>=0;--u)t[u]._length=l,l++;return}}}},D.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=w(e),n=t.message,i=[t.stack],r=this;void 0!==r;)i.push(y(r.stack.split("\n"))),r=r._parent;(function(e){for(var t=e[0],n=1;n=0;--s)if(i[s]===o){a=s;break}for(s=a;s>=0;--s){var l=i[s];if(t[r]!==l)break;t.pop(),r--}t=i}})(i),function(e){for(var t=0;t=0)return L=/@/,N=t,U=!0,function(e){e.stack=(new Error).stack};var r;try{throw new Error}catch(e){r="stack"in e}return"stack"in i||!r||"number"!=typeof Error.stackTraceLimit?(N=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?x(t):t.toString()},null):(L=e,N=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&($=function(e){console.warn(e)},P.isNode&&process.stderr.isTTY?$=function(e,t){var n=t?"[33m":"[31m";console.warn(n+e+"[0m\n")}:P.isNode||"string"!=typeof(new Error).stack||($=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var te={warnings:B,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return V&&t.longStackTraces(),{asyncHooks:function(){return te.asyncHooks},longStackTraces:function(){return te.longStackTraces},warnings:function(){return te.warnings},cancellation:function(){return te.cancellation},monitoring:function(){return te.monitoring},propagateFromFunction:function(){return Q},boundValueFunction:function(){return p},checkForgottenReturns:function(e,t,n,i,r){if(void 0===e&&null!==t&&Y){if(void 0!==r&&r._returnedNonUndefined())return;if(0==(65535&i._bitField))return;n&&(n+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),l=y(s),u=l.length-1;u>=0;--u){var c=l[u];if(!I.test(c)){var d=c.match(F);d&&(o="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(l.length>0){var h=l[0];for(u=0;u0&&(a="\n"+s[u-1]);break}}}var p="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;i._warn(p,!0,t)}},setBounds:function(e,t){if(k()){for(var n,i,r=(e.stack||"").split("\n"),o=(t.stack||"").split("\n"),a=-1,s=-1,l=0;la||0>s||!n||!i||n!==i||a>=s||(K=function(e){if(j.test(e))return!0;var t=C(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}},warn:v,deprecated:function(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),v(n)},CapturedTrace:D,fireDomEvent:q,fireGlobalEvent:G}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,n){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1];return this.caught(e,function(){throw t})},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var i=arguments[1];i instanceof e&&i.suppressUnhandledRejections();return this.caught(n,function(){return i})}}},{}],11:[function(e,t,n){"use strict";t.exports=function(e,t){function n(){return r(this)}var i=e.reduce,r=e.all;e.prototype.each=function(e){return i(this,e,t,0)._then(n,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return i(this,e,t,t)},e.each=function(e,r){return i(e,r,t,0)._then(n,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return i(e,n,t,t)}}},{}],12:[function(e,t,n){"use strict";function i(e,t){function n(i){return this instanceof n?(d(this,"message","string"==typeof i?i:t),d(this,"name",e),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(i)}return c(n,Error),n}function r(e){return this instanceof r?(d(this,"name","OperationalError"),d(this,"message",e),this.cause=e,this.isOperational=!0,void(e instanceof Error?(d(this,"message",e.message),d(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new r(e)}var o,a,s=e("./es5"),l=s.freeze,u=e("./util"),c=u.inherits,d=u.notEnumerableProp,h=i("Warning","warning"),p=i("CancellationError","cancellation error"),f=i("TimeoutError","timeout error"),m=i("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(e){o=i("TypeError","type error"),a=i("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),v=0;v1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return u.call(this,this.promise._target()._settledValue())}function l(e){return a(this,e)?void 0:(h.e=e,h)}function u(e){var r=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(r._boundValue()):u.call(r._boundValue(),e);if(c===i)return c;if(void 0!==c){r._setReturnedNonUndefined();var p=n(c,r);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var f=new d("late cancellation observer");return r._attachExtraTrace(f),h.e=f,h}p.isPending()&&p._attachCancellationCallback(new o(this))}return p._then(s,l,void 0,this,void 0)}}}return r.isRejected()?(a(this),h.e=e,h):(a(this),e)}var c=e("./util"),d=t.CancellationError,h=c.errorObj,p=e("./catch_filter")(i);return r.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,i){return"function"!=typeof e?this.then():this._then(n,i,void 0,new r(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,u,u)},t.prototype.tap=function(e){return this._passThrough(e,1,u)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,u);var i,r=new Array(n-1),o=0;for(i=0;n-1>i;++i){var a=arguments[i];if(!c.isObject(a))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+c.classString(a)));r[o++]=a}r.length=o;var s=arguments[i];return this._passThrough(p(r,s,this),1,void 0,u)},r}},{"./catch_filter":7,"./util":36}],16:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,a){function s(e,n,r,o){if(a.cancellation()){var s=new t(i),l=this._finallyPromise=new t(i);this._promise=s.lastly(function(){return l}),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new t(i))._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof r?[r].concat(h):h,this._yieldedPromise=null,this._cancellationPhase=!1}var l=e("./errors").TypeError,u=e("./util"),c=u.errorObj,d=u.tryCatch,h=[];u.inherits(s,o),s.prototype._isResolved=function(){return null===this._promise},s.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},s.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=d(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),e=d(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},s.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=d(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},s.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=d(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},s.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},s.prototype.promise=function(){return this._promise},s.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},s.prototype._continue=function(e){var n=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(e.e,!1);var i=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(i);var o=r(i,this._promise);if(o instanceof t||(o=function(e,n,i){for(var o=0;o0&&"function"==typeof arguments[t]){e=arguments[t]}var i=[].slice.call(arguments);e&&i.pop();var r=new n(i).promise();return void 0!==e?r.spread(e):r}}},{"./util":36}],18:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,a){function s(e,n,i,r){this.constructor$(e),this._promise._captureStackTrace();var a=t._getContext();if(this._callback=u.contextBind(a,n),this._preservedValues=r===o?new Array(this.length()):null,this._limit=i,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0),u.isArray(e))for(var s=0;s=1?a:0,o).promise()}var u=e("./util"),c=u.tryCatch,d=u.errorObj,h=t._async;u.inherits(s,n),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var i=this._values,o=this.length(),s=this._preservedValues,l=this._limit;if(0>n){if(i[n=-1*n-1]=e,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return i[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var u=this._promise,h=this._callback,p=u._boundValue();u._pushContext();var f=c(h).call(p,e,n,o),m=u._popContext();if(a.checkForgottenReturns(f,m,null!==s?"Promise.filter":"Promise.map",u),f===d)return this._reject(f.e),!0;var g=r(f,this._promise);if(g instanceof t){var v=(g=g._target())._bitField;if(0==(50397184&v))return l>=1&&this._inFlight++,i[n]=g,g._proxy(this,-1*(n+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(g._reason()),!0):(this._cancel(),!0);f=g._value()}i[n]=f}return++this._totalResolved>=o&&(null!==s?this._filter(i,s):this._resolve(i),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlighto;++o)e[o]&&(i[r++]=t[o]);i.length=r,this._resolve(i)},s.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return l(this,e,t,null)},t.map=function(e,t,n,i){return l(e,t,n,i)}}},{"./util":36}],19:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o){var a=e("./util"),s=a.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+a.classString(e));return function(){var i=new t(n);i._captureStackTrace(),i._pushContext();var r=s(e).apply(this,arguments),a=i._popContext();return o.checkForgottenReturns(r,a,"Promise.method",i),i._resolveFromSyncValue(r),i}},t.attempt=t.try=function(e){if("function"!=typeof e)return r("expecting a function but got "+a.classString(e));var i=new t(n);i._captureStackTrace(),i._pushContext();var l;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];l=a.isArray(u)?s(e).apply(c,u):s(e).call(c,u)}else l=s(e)();var d=i._popContext();return o.checkForgottenReturns(l,d,"Promise.try",i),i._resolveFromSyncValue(l),i},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,n){"use strict";function i(e){var t;if((u=e)instanceof Error&&s.getPrototypeOf(u)===Error.prototype){(t=new a(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var n=s.keys(e),i=0;i1){var n,i=new Array(t-1),r=0;for(n=0;t-1>n;++n){var o=arguments[n];if(!d.isObject(o))return u("Catch statement predicate: expecting an object but got "+d.classString(o));i[r++]=o}if(i.length=r,"function"!=typeof(e=arguments[n]))throw new _("The last argument to .catch() must be a function, got "+d.toString(e));return this.then(void 0,P(i,e,this))}return this.then(void 0,e)},i.prototype.reflect=function(){return this._then(l,l,void 0,this,void 0)},i.prototype.then=function(e,t){if(M.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+d.classString(e);arguments.length>1&&(n+=", "+d.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},i.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},i.prototype.spread=function(e){return"function"!=typeof e?u("expecting a function but got "+d.classString(e)):this.all()._then(e,void 0,void 0,C,void 0)},i.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new T(this).promise()},i.prototype.error=function(e){return this.caught(d.originatesFromRejection,e)},i.getNewLibraryCopy=t.exports,i.is=function(e){return e instanceof i},i.fromNode=i.fromCallback=function(e){var t=new i(k);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=j(e)(A(t,n));return r===R&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},i.all=function(e){return new T(e).promise()},i.cast=function(e){var t=S(e);return t instanceof i||(t=new i(k),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(e){var t=new i(k);return t._captureStackTrace(),t._rejectCallback(e,!0),t},i.setScheduler=function(e){if("function"!=typeof e)throw new _("expecting a function but got "+d.classString(e));return w.setScheduler(e)},i.prototype._then=function(e,t,n,r,o){var a=void 0!==o,s=a?o:new i(k),l=this._target(),u=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var c=g();if(0!=(50397184&u)){var h,p,f=l._settlePromiseCtx;0!=(33554432&u)?(p=l._rejectionHandler0,h=e):0!=(16777216&u)?(p=l._fulfillmentHandler0,h=t,l._unsetRejectionIsUnhandled()):(f=l._settlePromiseLateCancellationObserver,p=new x("late cancellation observer"),l._attachExtraTrace(p),h=t),w.invoke(f,l,{handler:d.contextBind(c,h),promise:s,receiver:r,value:p})}else l._addCallbacks(e,t,s,r,c);return s},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},i.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){if(!w.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},i.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},i.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];return t===c?void 0:void 0===t&&this._isBound()?this._boundValue():t},i.prototype._promiseAt=function(e){return this[4*e-4+2]},i.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},i.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),n=e._rejectionHandler0,i=e._promise0,r=e._receiverAt(0);void 0===r&&(r=c),this._addCallbacks(t,n,i,r,null)},i.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),i=e._rejectionHandlerAt(t),r=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=c),this._addCallbacks(n,i,r,o,null)},i.prototype._addCallbacks=function(e,t,n,i,r){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=i,"function"==typeof e&&(this._fulfillmentHandler0=d.contextBind(r,e)),"function"==typeof t&&(this._rejectionHandler0=d.contextBind(r,t));else{var a=4*o-4;this[a+2]=n,this[a+3]=i,"function"==typeof e&&(this[a+0]=d.contextBind(r,e)),"function"==typeof t&&(this[a+1]=d.contextBind(r,t))}return this._setLength(o+1),o},i.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},i.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(s(),!1);var n=S(e,this);if(!(n instanceof i))return this._fulfill(e);t&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(s());var o=r._bitField;if(0==(50397184&o)){var a=this._length();a>0&&r._migrateCallback0(this);for(var l=1;a>l;++l)r._migrateCallbackAt(this,l);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!=(33554432&o))this._fulfill(r._value());else if(0!=(16777216&o))this._reject(r._reason());else{var u=new x("late cancellation observer");r._attachExtraTrace(u),this._reject(u)}}},i.prototype._rejectCallback=function(e,t,n){var i=d.ensureErrorObject(e),r=i===e;if(!r&&!n&&M.warnings()){var o="a promise was rejected with a non-error: "+d.classString(e);this._warn(o,!0)}this._attachExtraTrace(i,!!t&&r),this._reject(e)},i.prototype._resolveFromExecutor=function(e){if(e!==k){var t=this;this._captureStackTrace(),this._pushContext();var n=!0,i=this._execute(e,function(e){t._resolveCallback(e)},function(e){t._rejectCallback(e,n)});n=!1,this._popContext(),void 0!==i&&t._rejectCallback(i,!0)}},i.prototype._settlePromiseFromHandler=function(e,t,n,i){var r=i._bitField;if(0==(65536&r)){i._pushContext();var o;t===C?n&&"number"==typeof n.length?o=j(e).apply(this._boundValue(),n):(o=R).e=new _("cannot .spread() a non-array: "+d.classString(n)):o=j(e).call(t,n);var a=i._popContext();0==(65536&(r=i._bitField))&&(o===D?i._reject(n):o===R?i._rejectCallback(o.e,!1):(M.checkForgottenReturns(o,a,"",i,this),i._resolveCallback(o)))}},i.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(e){this._rejectionHandler0=e},i.prototype._settlePromise=function(e,t,r,o){var a=e instanceof i,s=this._bitField,u=0!=(134217728&s);0!=(65536&s)?(a&&e._invokeInternalOnCancel(),r instanceof O&&r.isFinallyHandler()?(r.cancelPromise=e,j(t).call(r,o)===R&&e._reject(R.e)):t===l?e._fulfill(l.call(r)):r instanceof n?r._promiseCancelled(e):a||e instanceof T?e._cancel():r.cancel()):"function"==typeof t?a?(u&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,o,e)):t.call(r,o,e):r instanceof n?r._isResolved()||(0!=(33554432&s)?r._promiseFulfilled(o,e):r._promiseRejected(o,e)):a&&(u&&e._setAsyncGuaranteed(),0!=(33554432&s)?e._fulfill(o):e._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,n=e.promise,r=e.receiver,o=e.value;"function"==typeof t?n instanceof i?this._settlePromiseFromHandler(t,r,o,n):t.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},i.prototype._settlePromise0=function(e,t,n){var i=this._promise0,r=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(i,e,r,t)},i.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},i.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=s();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():w.settlePromises(this),this._dereferenceTrace())}},i.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16))return this._setRejected(),this._fulfillmentHandler0=e,this._isFinal()?w.fatalError(e,d.isNode):void((65535&t)>0?w.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(e,t){for(var n=1;e>n;n++){var i=this._fulfillmentHandlerAt(n),r=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(r,i,o,t)}},i.prototype._rejectPromises=function(e,t){for(var n=1;e>n;n++){var i=this._rejectionHandlerAt(n),r=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(r,i,o,t)}},i.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var i=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,i,e),this._fulfillPromises(t,i)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&v.defineProperty(i.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),i.defer=i.pending=function(){M.deprecated("Promise.defer","new Promise");return{promise:new i(k),resolve:r,reject:o}},d.notEnumerableProp(i,"_makeSelfResolutionError",s),e("./method")(i,k,S,u,M),e("./bind")(i,k,S,M),e("./cancel")(i,T,u,M),e("./direct_resolve")(i),e("./synchronous_inspection")(i),e("./join")(i,T,S,k,w),i.Promise=i,i.version="3.7.2",e("./call_get.js")(i),e("./generators.js")(i,u,k,S,n,M),e("./map.js")(i,T,u,S,k,M),e("./nodeify.js")(i),e("./promisify.js")(i,k),e("./props.js")(i,T,S,u),e("./race.js")(i,k,S,u),e("./reduce.js")(i,T,u,S,k,M),e("./settle.js")(i,T,M),e("./some.js")(i,T,u),e("./timers.js")(i,k,M),e("./using.js")(i,u,S,E,k,M),e("./any.js")(i),e("./each.js")(i,k),e("./filter.js")(i,k),d.toFastProperties(i),d.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(k)),M.setBounds(y.firstLineError,d.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o){function a(e){var i=this._promise=new t(n);e instanceof t&&(i._propagateFrom(e,3),e.suppressUnhandledRejections()),i._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var s=e("./util");return s.isArray,s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function e(n,o){var a=i(this._values,this._promise);if(a instanceof t){var l=(a=a._target())._bitField;if(this._values=a,0==(50397184&l))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0==(33554432&l))return 0!=(16777216&l)?this._reject(a._reason()):this._cancel();a=a._value()}{if(null!==(a=s.asArray(a)))return 0===a.length?void(-5===o?this._resolveEmptyArray():this._resolve(function(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}(o))):void this._iterate(a);var u=r("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(u,!1)}},a.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var r=this._promise,o=!1,a=null,s=0;n>s;++s){var l=i(e[s],r);l instanceof t?a=(l=l._target())._bitField:a=null,o?null!==a&&l.suppressUnhandledRejections():null!==a?0==(50397184&a)?(l._proxy(this,s),this._values[s]=l):o=0!=(33554432&a)?this._promiseFulfilled(l._value(),s):0!=(16777216&a)?this._promiseRejected(l._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(l,s)}o||r._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},a.prototype._promiseFulfilled=function(e,t){this._values[t]=e;return++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;nc;c+=2){var h=s[c],p=s[c+1],f=h+t;if(i===w)e[f]=w(h,l,h,p,t,r);else{var m=i(p,function(){return w(h,l,h,p,t,r)});u.notEnumerableProp(m,"__isPromisified__",!0),e[f]=m}}return u.toFastProperties(e),e}var l={},u=e("./util"),c=e("./nodeback"),d=u.withAppended,h=u.maybeWrapAsError,p=u.canEvaluate,f=e("./errors").TypeError,m={__isPromisified__:!0},g=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),v=function(e){return u.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e},y=function(e){return e.replace(/([$])/,"\\$")},w=p?void 0:function(e,i,r,o,a,s){function p(){var r=i;i===l&&(r=this);var o=new t(n);o._captureStackTrace();var a="string"==typeof m&&this!==f?this[m]:e,u=c(o,s);try{a.apply(r,d(arguments,u))}catch(e){o._rejectCallback(h(e),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var f=function(){return this}(),m=e;return"string"==typeof m&&(e=o),u.notEnumerableProp(p,"__isPromisified__",!0),p};t.promisify=function(e,t){if("function"!=typeof e)throw new f("expecting a function but got "+u.classString(e));if(r(e))return e;var n,o,a,s=void 0===(t=Object(t)).context?l:t.context,c=!!t.multiArgs,d=(n=e,o=s,a=c,w(n,o,void 0,n,null,a));return u.copyDescriptors(e,d,i),d},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new f("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var n=!!(t=Object(t)).multiArgs,i=t.suffix;"string"!=typeof i&&(i="Async");var r=t.filter;"function"!=typeof r&&(r=v);var o=t.promisifier;if("function"!=typeof o&&(o=w),!u.isIdentifier(i))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=u.inheritedDataKeys(e),l=0;lo;++o){var a=i[o];t[o]=e[a],t[o+r]=a}}this.constructor$(t),this._isMap=n,this._init$(void 0,n?-6:-3)}function a(e){var n,a=i(e);return u(a)?(n=a instanceof t?a._then(t.props,void 0,void 0,void 0,void 0):new o(a).promise(),a instanceof t&&n._propagateFrom(a,2),n):r("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,l=e("./util"),u=l.isObject,c=e("./es5");"function"==typeof Map&&(s=Map);var d=function(){function e(e,i){this[t]=e,this[t+n]=i,t++}var t=0,n=0;return function(i){n=i.size,t=0;var r=new Array(2*i.size);return i.forEach(e,r),r}}();l.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(e,t){this._values[t]=e;if(++this._totalResolved>=this._length){var n;if(this._isMap)n=function(e){for(var t=new s,n=e.length/2|0,i=0;n>i;++i){var r=e[n+i],o=e[i];t.set(r,o)}return t}(this._values);else{n={};for(var i=this.length(),r=0,o=this.length();o>r;++r)n[this._values[r+i]]=this._values[r]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,n){"use strict";function i(e){this._capacity=e,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(e){return this._capacityo;++o)n[o+i]=e[o+t],e[o+t]=void 0}(this,0,this,t,this._front+this._length&t-1)},t.exports=i},{}],27:[function(e,t,n){"use strict";t.exports=function(t,n,i,r){function o(e,o){var l=i(e);if(l instanceof t)return s(l);if(null===(e=a.asArray(e)))return r("expecting an array or an iterable object but got "+a.classString(e));var u=new t(n);void 0!==o&&u._propagateFrom(o,3);for(var c=u._fulfill,d=u._reject,h=0,p=e.length;p>h;++h){var f=e[h];(void 0!==f||h in e)&&t.cast(f)._then(c,d,void 0,u,null)}return u}var a=e("./util"),s=function(e){return e.then(function(t){return o(t,e)})};t.race=function(e){return o(e,void 0)},t.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,a){function s(e,n,i,r){this.constructor$(e);var a=t._getContext();this._fn=h.contextBind(a,n),void 0!==i&&(i=t.resolve(i),i._attachCancellationCallback(this)),this._initialValue=i,this._currentCancellable=null,this._eachValues=r===o?Array(this._length):0===r?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function l(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function u(e,t,n,r){if("function"!=typeof t)return i("expecting a function but got "+h.classString(t));return new s(e,t,n,r).promise()}function c(e){this.accum=e,this.array._gotAccum(e);var n=r(this.value,this.array._promise);return n instanceof t?(this.array._currentCancellable=n,n._then(d,void 0,void 0,this,void 0)):d.call(this,n)}function d(e){var n=this.array,i=n._promise,r=p(n._fn);i._pushContext();var o;(o=void 0!==n._eachValues?r.call(i._boundValue(),e,this.index,this.length):r.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=o);var s=i._popContext();return a.checkForgottenReturns(o,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),o}var h=e("./util"),p=h.tryCatch;h.inherits(s,n),s.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},s.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},s.prototype.shouldCopyValues=function(){return!1},s.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},s.prototype._resultCancelled=function(e){return e===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel()))},s.prototype._iterate=function(e){this._values=e;var n,i,r=e.length;void 0!==this._initialValue?(n=this._initialValue,i=0):(n=t.resolve(e[0]),i=1),this._currentCancellable=n;for(var o=i;r>o;++o){var a=e[o];a instanceof t&&a.suppressUnhandledRejections()}if(!n.isRejected())for(;r>i;++i){var s={accum:null,value:e[i],index:i,length:r,array:this};n=n._then(c,void 0,void 0,s,void 0),0==(127&i)&&n._setNoAsyncGuarantee()}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(l,l,void 0,n,this)},t.prototype.reduce=function(e,t){return u(this,e,t,null)},t.reduce=function(e,t,n,i){return u(e,t,n,i)}}},{"./util":36}],29:[function(e,t,n){"use strict";var i,r=e("./util"),o=r.getNativePromise();if(r.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,s=process.nextTick;i=r.isRecentNode?function(e){a.call(global,e)}:function(e){s.call(process,e)}}else if("function"==typeof o&&"function"==typeof o.resolve){var l=o.resolve();i=function(e){l.then(e)}}else i="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var e=document.createElement("div"),t={attributes:!0},n=!1,i=document.createElement("div");new MutationObserver(function(){e.classList.toggle("foo"),n=!1}).observe(i,t);return function(r){var o=new MutationObserver(function(){o.disconnect(),r()});o.observe(e,t),n||(n=!0,i.classList.toggle("foo"))}}():"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};t.exports=i},{"./util":36}],30:[function(e,t,n){"use strict";t.exports=function(t,n,i){function r(e){this.constructor$(e)}var o=t.PromiseInspection;e("./util").inherits(r,n),r.prototype._promiseResolved=function(e,t){this._values[e]=t;return++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},r.prototype._promiseFulfilled=function(e,t){var n=new o;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},r.prototype._promiseRejected=function(e,t){var n=new o;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return i.deprecated(".settle()",".reflect()"),new r(e).promise()},t.allSettled=function(e){return new r(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,n){"use strict";t.exports=function(t,n,i){function r(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(e,t){if((0|t)!==t||0>t)return i("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new r(e),o=n.promise();return n.setHowMany(t),n.init(),o}var a=e("./util"),s=e("./errors").RangeError,l=e("./errors").AggregateError,u=a.isArray,c={};a.inherits(r,n),r.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},r.prototype.init=function(){this._initialized=!0,this._init()},r.prototype.setUnwrap=function(){this._unwrap=!0},r.prototype.howMany=function(){return this._howMany},r.prototype.setHowMany=function(e){this._howMany=e},r.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},r.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},r.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},r.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new l,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},r.prototype._fulfilled=function(){return this._totalResolved},r.prototype._rejected=function(){return this._values.length-this.length()},r.prototype._addRejected=function(e){this._values.push(e)},r.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},r.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},r.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},r.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return o(e,t)},t.prototype.some=function(e){return o(this,e)},t._SomePromiseArray=r}},{"./errors":12,"./util":36}],32:[function(e,t,n){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return r.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),i.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,n){"use strict";t.exports=function(t,n){var i=e("./util"),r=i.errorObj,o=i.isObject,a={}.hasOwnProperty;return function(e,s){if(o(e)){if(e instanceof t)return e;var l=function(e){try{return e.then}catch(e){return r.e=e,r}}(e);if(l===r){s&&s._pushContext();var u=t.reject(l.e);return s&&s._popContext(),u}if("function"==typeof l)return function(e){try{return a.call(e,"_promise0")}catch(e){return!1}}(e)?(u=new t(n),e._then(u._fulfill,u._reject,void 0,u,null),u):function(e,o,a){var s=new t(n),l=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var u=!0,c=i.tryCatch(o).call(e,function(e){s&&(s._resolveCallback(e),s=null)},function(e){s&&(s._rejectCallback(e,u,!0),s=null)});return u=!1,s&&c===r&&(s._rejectCallback(c.e,!0,!0),s=null),l}(e,l,s)}return e}}},{"./util":36}],34:[function(e,t,n){"use strict";t.exports=function(t,n,i){function r(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),l=t.TimeoutError;r.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return c(+this).thenReturn(e)},c=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(u,null,null,e,void 0),i.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(n),s=setTimeout(function(){a._fulfill()},+e),i.cancellation()&&a._setOnCancel(new r(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return c(e,this)};t.prototype.timeout=function(e,t){e=+e;var n,u,c=new r(setTimeout(function(){n.isPending()&&function(e,t,n){var i;i="string"!=typeof t?t instanceof Error?t:new l("operation timed out"):new l(t),s.markAsOriginatingFromRejection(i),e._attachExtraTrace(i),e._reject(i),null!=n&&n.cancel()}(n,t,u)},e));return i.cancellation()?(u=this.then(),(n=u._then(o,a,void 0,c,void 0))._setOnCancel(c)):n=this._then(o,a,void 0,c,void 0),n}}},{"./util":36}],35:[function(e,t,n){"use strict";t.exports=function(t,n,i,r,o,a){function s(e){setTimeout(function(){throw e},0)}function l(e,n){var r=0,a=e.length,l=new t(o);return function o(){if(r>=a)return l._fulfill();var u=function(e){var t=i(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}(e[r++]);if(u instanceof t&&u._isDisposable()){try{u=i(u._getDisposer().tryDispose(n),e.promise)}catch(e){return s(e)}if(u instanceof t)return u._then(o,s,null,null,null)}o()}(),l}function u(e,t,n){this._data=e,this._promise=t,this._context=n}function c(e,t,n){this.constructor$(e,t,n)}function d(e){return u.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function h(e){this.length=e,this.promise=null,this[e-1]=null}var p=e("./util"),f=e("./errors").TypeError,m=e("./util").inherits,g=p.errorObj,v=p.tryCatch,y={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():y},u.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var i=t!==y?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,i},u.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},m(c,u),c.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},h.prototype._resultCancelled=function(){for(var e=this.length,n=0;e>n;++n){var i=this[n];i instanceof t&&i.cancel()}},t.using=function(){var e=arguments.length;if(2>e)return n("you must pass at least 2 arguments to Promise.using");var r=arguments[e-1];if("function"!=typeof r)return n("expecting a function but got "+p.classString(r));var o,s=!0;2===e&&Array.isArray(arguments[0])?(e=(o=arguments[0]).length,s=!1):(o=arguments,e--);for(var c=new h(e),f=0;e>f;++f){var m=o[f];if(u.isDisposer(m)){var y=m;(m=m.promise())._setDisposable(y)}else{var w=i(m);w instanceof t&&(m=w._then(d,null,null,{resources:c,index:f},void 0))}c[f]=m}var b=new Array(c.length);for(f=0;f0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new c(e,this,r());throw new f}}},{"./errors":12,"./util":36}],36:[function(e,t,n){"use strict";function i(){try{var e=c;return c=null,e.apply(this,arguments)}catch(e){return p.e=e,p}}function r(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function o(e,t,n){if(r(e))return e;var i={value:n,configurable:!0,enumerable:!1,writable:!0};return d.defineProperty(e,t,i),e}function a(e){try{return e+""}catch(e){return"[no string representation]"}}function s(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function l(e){return s(e)&&d.propertyIsWritable(e,"stack")}function u(e){return{}.toString.call(e)}var c,d=e("./es5"),h="undefined"==typeof navigator,p={e:{}},f="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,m=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var n=0;n1,i=t.length>0&&!(1===t.length&&"constructor"===t[0]),r=g.test(e+"")&&d.names(e).length>0;if(n||i||r)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return v.test(e)},inheritedDataKeys:m,getDataPropertyOrDefault:function(e,t,n){if(!d.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var i=Object.getOwnPropertyDescriptor(e,t);return null!=i?null==i.get&&null==i.set?i.value:n:void 0},thrower:function(e){throw e},isArray:d.isArray,asArray:w,notEnumerableProp:o,isPrimitive:r,isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},isError:s,canEvaluate:h,errorObj:p,tryCatch:function(e){return c=e,i},inherits:function(e,t){function n(){this.constructor=e,this.constructor$=t;for(var n in t.prototype)i.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}var i={}.hasOwnProperty;return n.prototype=t.prototype,e.prototype=new n,e.prototype},withAppended:function(e,t){var n,i=e.length,r=new Array(i+1);for(n=0;i>n;++n)r[n]=e[n];return r[n]=t,r},maybeWrapAsError:function(e){return r(e)?new Error(a(e)):e},toFastProperties:function(e){function t(){}function n(){return typeof i.foo}t.prototype=e;var i=new t;return n(),n(),e},filledRange:function(e,t,n){for(var i=new Array(e),r=0;e>r;++r)i[r]=t+r+n;return i},toString:a,canAttachTrace:l,ensureErrorObject:y,originatesFromRejection:function(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)},markAsOriginatingFromRejection:function(e){try{o(e,"isOperational",!0)}catch(e){}},classString:u,copyDescriptors:function(e,t,n){for(var i=d.names(e),r=0;r10||e[0]>0}(),C.nodeSupportsAsyncResource=C.isNode&&function(){var t=!1;try{var n=e("async_hooks").AsyncResource;t="function"==typeof n.prototype.runInAsyncScope}catch(e){t=!1}return t}(),C.isNode&&C.toFastProperties(process);try{throw new Error}catch(e){C.lastLineError=e}t.exports=C},{"./es5":13,async_hooks:void 0}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Sweetalert2=t()}(this,function(){"use strict";var e={title:"",titleText:"",text:"",html:"",type:null,customClass:"",target:"body",animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,focusCancel:!1,showCloseButton:!1,showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,progressSteps:[],currentProgressStep:null,progressStepsDistance:"40px",onOpen:null,onClose:null,useRejections:!0},t=function(e){var t={};for(var n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","iosfix","modal","overlay","fade","show","hide","noanimation","close","title","content","buttonswrapper","confirm","cancel","icon","image","input","file","range","select","radio","checkbox","textarea","inputerror","validationerror","progresssteps","activeprogressstep","progresscircle","progressline","loading","styled"]),i=t(["success","warning","info","question","error"]),r=function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var n="#",i=0;i<3;i++){var r=parseInt(e.substr(2*i,2),16);n+=("00"+(r=Math.round(Math.min(Math.max(0,r+r*t),255)).toString(16))).substr(r.length)}return n},o={previousWindowKeyDown:null,previousActiveElement:null,previousBodyPadding:null},a=('\n \n
\n
\n \n
\n
?
\n
!
\n
i
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n').replace(/(^|\n)\s*/g,""),s=function(){return document.body.querySelector("."+n.container)},l=function(){return s()?s().querySelector("."+n.modal):null},u=function(e){return s()?s().querySelector("."+e):null},c=function(){return u(n.title)},d=function(){return u(n.content)},h=function(){return u(n.image)},p=function(){return u(n.buttonswrapper)},f=function(){return u(n.progresssteps)},m=function(){return u(n.validationerror)},g=function(){return u(n.confirm)},v=function(){return u(n.cancel)},y=function(){return u(n.close)},w=function(e){var t=[g(),v()];e&&t.reverse();return function(e){var t=[];for(var n in e)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(t.concat(Array.prototype.slice.call(l().querySelectorAll('button, input:not([type=hidden]), textarea, select, a, *[tabindex]:not([tabindex="-1"])'))))},b=function(e,t){return!!e.classList&&e.classList.contains(t)},_=function(e){if(e.focus(),"file"!==e.type){var t=e.value;e.value="",e.value=t}},x=function(e,t){e&&t&&t.split(/\s+/).filter(Boolean).forEach(function(t){e.classList.add(t)})},k=function(e,t){e&&t&&t.split(/\s+/).filter(Boolean).forEach(function(t){e.classList.remove(t)})},C=function(e,t){for(var n=0;n"),t.text||t.html){if("object"===E(t.html))if(w.innerHTML="",0 in t.html)for(var M=0;M in t.html;M++)w.appendChild(t.html[M].cloneNode(!0));else w.appendChild(t.html.cloneNode(!0));else t.html?w.innerHTML=t.html:t.text&&(w.textContent=t.text);D(w)}else S(w);t.showCloseButton?D($):S($),r.className=n.modal,t.customClass&&x(r,t.customClass);var O=f(),P=parseInt(null===t.currentProgressStep?F.getQueueStep():t.currentProgressStep,10);t.progressSteps.length?(D(O),function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}(O),P>=t.progressSteps.length&&console.warn("SweetAlert2: Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(function(e,i){var r=document.createElement("li");if(x(r,n.progresscircle),r.innerHTML=e,i===P&&x(r,n.activeprogressstep),O.appendChild(r),i!==t.progressSteps.length-1){var o=document.createElement("li");x(o,n.progressline),o.style.width=t.progressStepsDistance,O.appendChild(o)}})):S(O);for(var A=l().querySelectorAll("."+n.icon),R=0;Rwindow.innerHeight&&(o.previousBodyPadding=document.body.style.paddingRight,document.body.style.paddingRight=function(){if("ontouchstart"in window||navigator.msMaxTouchPoints)return 0;var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}()+"px")},I=function(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream&&!b(document.body,n.iosfix)){var e=document.body.scrollTop;document.body.style.top=-1*e+"px",x(document.body,n.iosfix)}},F=function e(){for(var t=arguments.length,i=Array(t),a=0;a]/g)||[]).length<=0||e(n).length>0)}catch(e){return!1}},_process_options:function(t){this._o=e.extend({},this._o,t);var r=this.o=e.extend({},this._o),o=r.language;p[o]||(o=o.split("-")[0],p[o]||(o=d.language)),r.language=o,r.startView=this._resolveViewName(r.startView),r.minViewMode=this._resolveViewName(r.minViewMode),r.maxViewMode=this._resolveViewName(r.maxViewMode),r.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,r.startView)),!0!==r.multidate&&(r.multidate=Number(r.multidate)||!1,!1!==r.multidate&&(r.multidate=Math.max(0,r.multidate))),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var a=f.parseFormat(r.format);r.startDate!==-1/0&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=f.parseDate(r.startDate,a,r.language,r.assumeNearbyYear):r.startDate=-1/0),r.endDate!==1/0&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=f.parseDate(r.endDate,a,r.language,r.assumeNearbyYear):r.endDate=1/0),r.daysOfWeekDisabled=this._resolveDaysOfWeek(r.daysOfWeekDisabled||[]),r.daysOfWeekHighlighted=this._resolveDaysOfWeek(r.daysOfWeekHighlighted||[]),r.datesDisabled=r.datesDisabled||[],Array.isArray(r.datesDisabled)||(r.datesDisabled=r.datesDisabled.split(",")),r.datesDisabled=e.map(r.datesDisabled,function(e){return f.parseDate(e,a,r.language,r.assumeNearbyYear)});var s=String(r.orientation).toLowerCase().split(/\s+/g),l=r.orientation.toLowerCase();if(s=e.grep(s,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===s.length)switch(s[0]){case"top":case"bottom":r.orientation.y=s[0];break;case"left":case"right":r.orientation.x=s[0]}else l=e.grep(s,function(e){return/^left|right$/.test(e)}),r.orientation.x=l[0]||"auto",l=e.grep(s,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=l[0]||"auto";if(r.defaultViewDate instanceof Date||"string"==typeof r.defaultViewDate)r.defaultViewDate=f.parseDate(r.defaultViewDate,a,r.language,r.assumeNearbyYear);else if(r.defaultViewDate){var u=r.defaultViewDate.year||(new Date).getFullYear(),c=r.defaultViewDate.month||0,h=r.defaultViewDate.day||1;r.defaultViewDate=n(u,c,h)}else r.defaultViewDate=i()},_applyEvents:function(e){for(var n,i,r,o=0;or?(this.picker.addClass("datepicker-orient-right"),h+=d-t):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var f,m=this.o.orientation.y;if("auto"===m&&(f=-o+p-n,m=f<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+m),"top"===m?p-=n+parseInt(this.picker.css("padding-top")):p+=c,this.o.rtl){var g=r-(h+d);this.picker.css({top:p,right:g,zIndex:l})}else this.picker.css({top:p,left:h,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),n=[],i=!1;return arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),i=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return f.parseDate(e,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),n=e.grep(n,e.proxy(function(e){return!this.dateWithinRange(e)||!e},this),!0),this.dates.replace(n),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),i?(this.setValue(),this.element.change()):this.dates.length&&String(t)!==String(this.dates)&&i&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&t.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var t=this.o.weekStart,n="";for(this.o.calendarWeeks&&(n+=' | ');t'+p[this.o.language].daysMin[t++%7]+"";n+="
",this.picker.find(".datepicker-days thead").append(n)}},fillMonths:function(){for(var e,t=this._utc_to_local(this.viewDate),n="",i=0;i<12;i++)e=t&&t.getMonth()===i?" focused":"",n+=''+p[this.o.language].monthsShort[i]+"";this.picker.find(".datepicker-months td").html(n)},setRange:function(t){t&&t.length?this.range=e.map(t,function(e){return e.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var n=[],o=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),s=i();return t.getUTCFullYear()o||t.getUTCFullYear()===o&&t.getUTCMonth()>a)&&n.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&r(t,s)&&n.push("today"),-1!==this.dates.contains(t)&&n.push("active"),this.dateWithinRange(t)||n.push("disabled"),this.dateIsDisabled(t)&&n.push("disabled","disabled-date"),-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&n.push("highlighted"),this.range&&(t>this.range[0]&&ts)&&u.push("disabled"),w===v&&u.push("focused"),l!==e.noop&&(d=l(new Date(w,0,1)),d===t?d={}:"boolean"==typeof d?d={enabled:d}:"string"==typeof d&&(d={classes:d}),!1===d.enabled&&u.push("disabled"),d.classes&&(u=u.concat(d.classes.split(/\s+/))),d.tooltip&&(c=d.tooltip)),h+='"+w+"";f.find(".datepicker-switch").text(m+"-"+g),f.find("td").html(h)},fill:function(){var r,o,a=new Date(this.viewDate),s=a.getUTCFullYear(),l=a.getUTCMonth(),u=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,c=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,m=p[this.o.language].today||p.en.today||"",g=p[this.o.language].clear||p.en.clear||"",v=p[this.o.language].titleFormat||p.en.titleFormat,y=i(),w=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&y>=this.o.startDate&&y<=this.o.endDate&&!this.weekOfDateIsDisabled(y);if(!isNaN(s)&&!isNaN(l)){this.picker.find(".datepicker-days .datepicker-switch").text(f.formatDate(a,v,this.o.language)),this.picker.find("tfoot .today").text(m).css("display",w?"table-cell":"none"),this.picker.find("tfoot .clear").text(g).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var b=n(s,l,0),_=b.getUTCDate();b.setUTCDate(_-(b.getUTCDay()-this.o.weekStart+7)%7);var x=new Date(b);b.getUTCFullYear()<100&&x.setUTCFullYear(b.getUTCFullYear()),x.setUTCDate(x.getUTCDate()+42),x=x.valueOf();for(var k,C,D=[];b.valueOf()"),this.o.calendarWeeks)){var S=new Date(+b+(this.o.weekStart-k-7)%7*864e5),T=new Date(Number(S)+(11-S.getUTCDay())%7*864e5),$=new Date(Number($=n(T.getUTCFullYear(),0,1))+(11-$.getUTCDay())%7*864e5),E=(T-$)/864e5/7+1;D.push(''+E+" | ")}(C=this.getClassNames(b)).push("day");var M=b.getUTCDate();this.o.beforeShowDay!==e.noop&&(o=this.o.beforeShowDay(this._utc_to_local(b)),o===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&C.push("disabled"),o.classes&&(C=C.concat(o.classes.split(/\s+/))),o.tooltip&&(r=o.tooltip),o.content&&(M=o.content)),C="function"==typeof e.uniqueSort?e.uniqueSort(C):e.unique(C),D.push(''+M+" | "),r=null,k===this.o.weekEnd&&D.push(""),b.setUTCDate(b.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(D.join(""));var O=p[this.o.language].monthsTitle||p.en.monthsTitle||"Months",P=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?O:s).end().find("tbody span").removeClass("active");if(e.each(this.dates,function(e,t){t.getUTCFullYear()===s&&P.eq(t.getUTCMonth()).addClass("active")}),(sd)&&P.addClass("disabled"),s===u&&P.slice(0,c).addClass("disabled"),s===d&&P.slice(h+1).addClass("disabled"),this.o.beforeShowMonth!==e.noop){var A=this;e.each(P,function(n,i){var r=new Date(s,n,1),o=A.o.beforeShowMonth(r);o===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1!==o.enabled||e(i).hasClass("disabled")||e(i).addClass("disabled"),o.classes&&e(i).addClass(o.classes),o.tooltip&&e(i).prop("title",o.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,s,u,d,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,s,u,d,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,s,u,d,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var e,t,n=new Date(this.viewDate),i=n.getUTCFullYear(),r=n.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,a=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,s=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,u=1;switch(this.viewMode){case 4:u*=10;case 3:u*=10;case 2:u*=10;case 1:e=Math.floor(i/u)*u<=o,t=Math.floor(i/u)*u+u>s;break;case 0:e=i<=o&&r<=a,t=i>=s&&r>=l}this.picker.find(".prev").toggleClass("disabled",e),this.picker.find(".next").toggleClass("disabled",t)}},click:function(t){t.preventDefault(),t.stopPropagation();var r,o,a,s;(r=e(t.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),r.hasClass("clear")&&this.clearDates(),r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),o=1,1===this.viewMode?(s=r.parent().find("span").index(r),a=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s)):(s=0,a=Number(r.text()),this.viewDate.setUTCFullYear(a)),this._trigger(f.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(n(a,s,o)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(t){var n=e(t.currentTarget).data("date"),i=new Date(n);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(i)},navArrowsClick:function(t){var n=e(t.currentTarget).hasClass("prev")?-1:1;0!==this.viewMode&&(n*=12*f.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,n),this._trigger(f.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(e){var t=this.dates.contains(e);if(e||this.dates.clear(),-1!==t?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):!1===this.o.multidate?(this.dates.clear(),this.dates.push(e)):this.dates.push(e),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(e,t){t&&"date"!==t||this._toggle_multidate(e&&new Date(e)),(!t&&this.o.updateViewDate||"view"===t)&&(this.viewDate=e&&new Date(e)),this.fill(),this.setValue(),t&&"view"===t||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(e,t){var n=new Date(e);return n.setUTCDate(e.getUTCDate()+t),n},moveWeek:function(e,t){return this.moveDay(e,7*t)},moveMonth:function(e,t){if(!(n=e)||isNaN(n.getTime()))return this.o.defaultViewDate;var n;if(!t)return e;var i,r,o=new Date(e.valueOf()),a=o.getUTCDate(),s=o.getUTCMonth(),l=Math.abs(t);if(t=t>0?1:-1,1===l)r=-1===t?function(){return o.getUTCMonth()===s}:function(){return o.getUTCMonth()!==i},i=s+t,o.setUTCMonth(i),i=(i+12)%12;else{for(var u=0;u0},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":visible")){var t,n,i=!1,r=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault(),e.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;t=37===e.keyCode||38===e.keyCode?-1:1,0===this.viewMode?e.ctrlKey?(n=this.moveAvailableDate(r,t,"moveYear"))&&this._trigger("changeYear",this.viewDate):e.shiftKey?(n=this.moveAvailableDate(r,t,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===e.keyCode||39===e.keyCode?n=this.moveAvailableDate(r,t,"moveDay"):this.weekOfDateIsDisabled(r)||(n=this.moveAvailableDate(r,t,"moveWeek")):1===this.viewMode?(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveMonth")):2===this.viewMode&&(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),e.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),e.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==e.keyCode&&27!==e.keyCode||(this.show(),e.stopPropagation())},setViewMode:function(e){this.viewMode=e,this.picker.children("div").hide().filter(".datepicker-"+f.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var l=function(t,n){e.data(t,"datepicker",this),this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,this.keepEmptyValues=n.keepEmptyValues,delete n.keepEmptyValues,c.call(e(this.inputs),n).on("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e.data(t,"datepicker")}),this.updateDates()};l.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},clearDates:function(){e.each(this.pickers,function(e,t){t.clearDates()})},dateUpdated:function(n){if(!this.updating){this.updating=!0;var i=e.data(n.target,"datepicker");if(i!==t){var r=i.getUTCDate(),o=this.keepEmptyValues,a=e.inArray(n.target,this.inputs),s=a-1,l=a+1,u=this.inputs.length;if(-1!==a){if(e.each(this.pickers,function(e,t){t.getUTCDate()||t!==i&&o||t.setUTCDate(r)}),r=0&&r0;)this.pickers[s--].setUTCDate(r);else if(r>this.dates[l])for(;lthis.dates[l]&&(this.pickers[l].element.val()||"").length>0;)this.pickers[l++].setUTCDate(r);this.updateDates(),delete this.updating}}}},destroy:function(){e.map(this.pickers,function(e){e.destroy()}),e(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var u=e.fn.datepicker,c=function(n){var i=Array.apply(null,arguments);i.shift();var r;if(this.each(function(){var t=e(this),o=t.data("datepicker"),a="object"==typeof n&&n;if(!o){var u=function(t,n){function i(e,t){return t.toLowerCase()}var r,o=e(t).data(),a={},s=new RegExp("^"+n.toLowerCase()+"([A-Z])");n=new RegExp("^"+n.toLowerCase());for(var l in o)n.test(l)&&(r=l.replace(s,i),a[r]=o[l]);return a}(this,"date"),c=function(t){var n={};if(p[t]||(t=t.split("-")[0],p[t])){var i=p[t];return e.each(h,function(e,t){t in i&&(n[t]=i[t])}),n}}(e.extend({},d,u,a).language),f=e.extend({},d,c,u,a);t.hasClass("input-daterange")||f.inputs?(e.extend(f,{inputs:f.inputs||t.find("input").toArray()}),o=new l(this,f)):o=new s(this,f),t.data("datepicker",o)}"string"==typeof n&&"function"==typeof o[n]&&(r=o[n].apply(o,i))}),r===t||r instanceof s||r instanceof l)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+n+" function)");return r};e.fn.datepicker=c;var d=e.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:e.noop,beforeShowMonth:e.noop,beforeShowYear:e.noop,beforeShowDecade:e.noop,beforeShowCentury:e.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",isInline:null,keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},h=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=s;var p=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},f={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(e){if("function"==typeof e.toValue&&"function"==typeof e.toDisplay)return e;var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(n,r,o,a){function l(){var e=this.slice(0,u[h].length),t=u[h].slice(0,e.length);return e.toLowerCase()===t.toLowerCase()}if(!n)return t;if(n instanceof Date)return n;if("string"==typeof r&&(r=f.parseFormat(r)),r.toValue)return r.toValue(n,r,o);var u,c,d,h,m,g={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},v={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(n in v&&(n=v[n]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(n)){for(u=n.match(/([\-+]\d+)([dmwy])/gi),n=new Date,h=0;h(new Date).getFullYear()+i&&(n-=100),n):t);var n,i},m:function(e,t){if(isNaN(e))return e;for(t-=1;t<0;)t+=12;for(t%=12,e.setUTCMonth(t);e.getUTCMonth()!==t;)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}};x.yy=x.yyyy,x.M=x.MM=x.mm=x.m,x.dd=x.d,n=i();var k=r.parts.slice();if(u.length!==k.length&&(k=e(k).filter(function(t,n){return-1!==e.inArray(n,_)}).toArray()),u.length===k.length){var C;for(h=0,C=k.length;h |
---|
'+d.templates.leftArrow+' | | '+d.templates.rightArrow+" |
",contTemplate:' |
',footTemplate:' |
---|
|
'};f.template=''+f.headTemplate+""+f.footTemplate+'
'+f.headTemplate+f.contTemplate+f.footTemplate+'
'+f.headTemplate+f.contTemplate+f.footTemplate+'
'+f.headTemplate+f.contTemplate+f.footTemplate+'
'+f.headTemplate+f.contTemplate+f.footTemplate+"
",e.fn.datepicker.DPGlobal=f,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=u,this},e.fn.datepicker.version="1.10.0",e.fn.datepicker.deprecated=function(e){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+e)},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);n.data("datepicker")||(t.preventDefault(),c.call(n,"show"))}),e(function(){c.call(e('[data-provide="datepicker-inline"]'))})}),function(e){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],e);else if("object"==typeof exports)module.exports=e(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";e(jQuery,moment)}}(function(e,t){"use strict";if(!t)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");function n(n,i){function r(){return void 0!==t.tz&&void 0!==i.timeZone&&null!==i.timeZone&&""!==i.timeZone}function o(e){var n;return n=null==e?t():t.isDate(e)||t.isMoment(e)?t(e):r()?t.tz(e,j,i.useStrict,i.timeZone):t(e,j,i.useStrict),r()&&n.tz(i.timeZone),n}function a(e){if("string"!=typeof e||1").addClass("bootstrap-datetimepicker-widget dropdown-menu"),u=e("").addClass("datepicker").append((n=e("
").append(e("").append(e("").addClass("prev").attr("data-action","previous").append(e("").addClass(i.icons.previous))).append(e(" | ").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",i.calendarWeeks?"6":"5")).append(e(" | ").addClass("next").attr("data-action","next").append(e("").addClass(i.icons.next)))),r=e("").append(e("").append(e("").attr("colspan",i.calendarWeeks?"8":"7"))),[e("").addClass("datepicker-days").append(e(" ").addClass("table-condensed").append(n).append(e(""))),e("").addClass("datepicker-months").append(e(" ").addClass("table-condensed").append(n.clone()).append(r.clone())),e("").addClass("datepicker-years").append(e(" ").addClass("table-condensed").append(n.clone()).append(r.clone())),e("").addClass("datepicker-decades").append(e(" ").addClass("table-condensed").append(n.clone()).append(r.clone()))])),c=e("").addClass("timepicker").append(function(){var t,n,r,o=e(" ").addClass("timepicker-hours").append(e(" ").addClass("table-condensed")),s=e("").addClass("timepicker-minutes").append(e(" ").addClass("table-condensed")),l=e("").addClass("timepicker-seconds").append(e(" ").addClass("table-condensed")),u=[(t=e(""),n=e(" "),r=e(" "),a("h")&&(t.append(e("").append(e("").attr({href:"#",tabindex:"-1",title:i.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(e("").addClass(i.icons.up)))),n.append(e(" | ").append(e("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:i.tooltips.pickHour}).attr("data-action","showHours"))),r.append(e(" | ").append(e("").attr({href:"#",tabindex:"-1",title:i.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(e("").addClass(i.icons.down))))),a("m")&&(a("h")&&(t.append(e(" | ").addClass("separator")),n.append(e(" | ").addClass("separator").html(":")),r.append(e(" | ").addClass("separator"))),t.append(e(" | ").append(e("").attr({href:"#",tabindex:"-1",title:i.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(e("").addClass(i.icons.up)))),n.append(e(" | ").append(e("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:i.tooltips.pickMinute}).attr("data-action","showMinutes"))),r.append(e(" | ").append(e("").attr({href:"#",tabindex:"-1",title:i.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(e("").addClass(i.icons.down))))),a("s")&&(a("m")&&(t.append(e(" | ").addClass("separator")),n.append(e(" | ").addClass("separator").html(":")),r.append(e(" | ").addClass("separator"))),t.append(e(" | ").append(e("").attr({href:"#",tabindex:"-1",title:i.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(e("").addClass(i.icons.up)))),n.append(e(" | ").append(e("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:i.tooltips.pickSecond}).attr("data-action","showSeconds"))),r.append(e(" | ").append(e("").attr({href:"#",tabindex:"-1",title:i.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(e("").addClass(i.icons.down))))),A||(t.append(e(" | ").addClass("separator")),n.append(e(" | ").append(e(" | | |