").append(e)))));return m.inline&&c.removeClass("dropdown-menu"),O&&c.addClass("usetwentyfour"),g("s")&&!O&&c.addClass("wider"),m.sideBySide&&y()&&v()?(c.addClass("timepicker-sbs"),"top"===m.toolbarPlacement&&c.append(f),c.append(Z("").addClass("row").append(d.addClass("col-md-6")).append(h.addClass("col-md-6"))),"bottom"===m.toolbarPlacement&&c.append(f),c):("top"===m.toolbarPlacement&&p.append(f),y()&&p.append(Z("
").addClass(m.collapse&&v()?"collapse in":"").append(d)),"default"===m.toolbarPlacement&&p.append(f),v()&&p.append(Z("").addClass(m.collapse&&y()?"collapse":"").append(h)),"bottom"===m.toolbarPlacement&&p.append(f),c.append(p))}function i(){var e,t=(N||o).position(),n=(N||o).offset(),i=m.widgetPositioning.vertical,r=m.widgetPositioning.horizontal;if(m.widgetParent)e=m.widgetParent.append(U);else if(o.is("input"))e=o.after(U).parent();else{if(m.inline)return void(e=o.append(U));(e=o).children().first().after(U)}if("auto"===i&&(i=n.top+1.5*U.height()>=Z(window).height()+Z(window).scrollTop()&&U.height()+o.outerHeight()Z(window).width()?"right":"left"),"top"===i?U.addClass("top").removeClass("bottom"):U.addClass("bottom").removeClass("top"),"right"===r?U.addClass("pull-right"):U.removeClass("pull-right"),"static"===e.css("position")&&(e=e.parents().filter(function(){return"static"!==Z(this).css("position")}).first()),0===e.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");U.css({top:"top"===i?"auto":t.top+o.outerHeight(),bottom:"top"===i?e.outerHeight()-(e===o?0:t.top):"auto",left:"left"===r?e===o?0:t.left:"auto",right:"left"===r?"auto":e.outerWidth()-o.outerWidth()-(e===o?0:t.left)})}function d(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||o.trigger(e)}function r(e){"y"===e&&(e="YYYY"),d({type:"dp.update",change:e,viewDate:E.clone()})}function a(e){U&&(e&&(R=Math.max(H,Math.min(3,R+e))),U.find(".datepicker > div").hide().filter(".datepicker-"+B[R].clsName).show())}function h(e,t){var n,i,r,o;if(e.isValid()&&!(m.disabledDates&&"d"===t&&(n=e,!0===m.disabledDates[n.format("YYYY-MM-DD")])||m.enabledDates&&"d"===t&&(i=e,!0!==m.enabledDates[i.format("YYYY-MM-DD")])||m.minDate&&e.isBefore(m.minDate,t)||m.maxDate&&e.isAfter(m.maxDate,t)||m.daysOfWeekDisabled&&"d"===t&&-1!==m.daysOfWeekDisabled.indexOf(e.day())||m.disabledHours&&("h"===t||"m"===t||"s"===t)&&(r=e,!0===m.disabledHours[r.format("H")])||m.enabledHours&&("h"===t||"m"===t||"s"===t)&&(o=e,!0!==m.enabledHours[o.format("H")]))){if(m.disabledTimeIntervals&&("h"===t||"m"===t||"s"===t)){var a=!1;if(Z.each(m.disabledTimeIntervals,function(){if(e.isBetween(this[0],this[1]))return!(a=!0)}),a)return}return 1}}function s(){var e,t,n,i=U.find(".datepicker-days"),r=i.find("th"),o=[],a=[];if(y()){for(r.eq(0).find("span").attr("title",m.tooltips.prevMonth),r.eq(1).attr("title",m.tooltips.selectMonth),r.eq(2).find("span").attr("title",m.tooltips.nextMonth),i.find(".disabled").removeClass("disabled"),r.eq(1).text(E.format(m.dayViewHeaderFormat)),h(E.clone().subtract(1,"M"),"M")||r.eq(0).addClass("disabled"),h(E.clone().add(1,"M"),"M")||r.eq(2).addClass("disabled"),e=E.clone().startOf("M").startOf("w").startOf("d"),n=0;n<42;n++)0===e.weekday()&&(t=Z(""),m.calendarWeeks&&t.append(''+e.week()+" | "),o.push(t)),a=["day"],e.isBefore(E,"M")&&a.push("old"),e.isAfter(E,"M")&&a.push("new"),e.isSame(T,"d")&&!L&&a.push("active"),h(e,"d")||a.push("disabled"),e.isSame(c(),"d")&&a.push("today"),0!==e.day()&&6!==e.day()||a.push("weekend"),d({type:"dp.classify",date:e,classNames:a}),t.append(''+e.date()+" | "),e.add(1,"d");var s,l,u;i.find("tbody").empty().append(o),l=(s=U.find(".datepicker-months")).find("th"),u=s.find("tbody").find("span"),l.eq(0).find("span").attr("title",m.tooltips.prevYear),l.eq(1).attr("title",m.tooltips.selectYear),l.eq(2).find("span").attr("title",m.tooltips.nextYear),s.find(".disabled").removeClass("disabled"),h(E.clone().subtract(1,"y"),"y")||l.eq(0).addClass("disabled"),l.eq(1).text(E.year()),h(E.clone().add(1,"y"),"y")||l.eq(2).addClass("disabled"),u.removeClass("active"),T.isSame(E,"y")&&!L&&u.eq(T.month()).addClass("active"),u.each(function(e){h(E.clone().month(e),"M")||Z(this).addClass("disabled")}),function(){var e=U.find(".datepicker-years"),t=e.find("th"),n=E.clone().subtract(5,"y"),i=E.clone().add(6,"y"),r="";for(t.eq(0).find("span").attr("title",m.tooltips.prevDecade),t.eq(1).attr("title",m.tooltips.selectDecade),t.eq(2).find("span").attr("title",m.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),m.minDate&&m.minDate.isAfter(n,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(n.year()+"-"+i.year()),m.maxDate&&m.maxDate.isBefore(i,"y")&&t.eq(2).addClass("disabled");!n.isAfter(i,"y");)r+=''+n.year()+"",n.add(1,"y");e.find("td").html(r)}(),function(){var e,t=U.find(".datepicker-decades"),n=t.find("th"),i=Q({y:E.year()-E.year()%100-1}),r=i.clone().add(100,"y"),o=i.clone(),a=!1,s=!1,l="";for(n.eq(0).find("span").attr("title",m.tooltips.prevCentury),n.eq(2).find("span").attr("title",m.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(i.isSame(Q({y:1900}))||m.minDate&&m.minDate.isAfter(i,"y"))&&n.eq(0).addClass("disabled"),n.eq(1).text(i.year()+"-"+r.year()),(i.isSame(Q({y:2e3}))||m.maxDate&&m.maxDate.isBefore(r,"y"))&&n.eq(2).addClass("disabled");!i.isAfter(r,"y");)e=i.year()+12,a=m.minDate&&m.minDate.isAfter(i,"y")&&m.minDate.year()<=e,s=m.maxDate&&m.maxDate.isAfter(i,"y")&&m.maxDate.year()<=e,l+=''+(i.year()+1)+" - "+(i.year()+12)+"",i.add(12,"y");l+="",t.find("td").html(l),n.eq(1).text(o.year()+1+"-"+i.year())}()}}function l(){var e,t,n;U&&(s(),n=U.find(".timepicker span[data-time-component]"),O||(e=U.find(".timepicker [data-action=togglePeriod]"),t=T.clone().add(12<=T.hours()?-12:12,"h"),e.text(T.format("A")),h(t,"h")?e.removeClass("disabled"):e.addClass("disabled")),n.filter("[data-time-component=hours]").text(T.format(O?"HH":"hh")),n.filter("[data-time-component=minutes]").text(T.format("mm")),n.filter("[data-time-component=seconds]").text(T.format("ss")),function(){var e=U.find(".timepicker-hours table"),t=E.clone().startOf("d"),n=[],i=Z("
");for(11"),n.push(i)),i.append(''+t.format(O?"HH":"hh")+" | "),t.add(1,"h");e.empty().append(n)}(),function(){for(var e=U.find(".timepicker-minutes table"),t=E.clone().startOf("h"),n=[],i=Z(""),r=1===m.stepping?5:m.stepping;E.isSame(t,"h");)t.minute()%(4*r)==0&&(i=Z("
"),n.push(i)),i.append(''+t.format("mm")+" | "),t.add(r,"m");e.empty().append(n)}(),function(){for(var e=U.find(".timepicker-seconds table"),t=E.clone().startOf("m"),n=[],i=Z("
");E.isSame(t,"m");)t.second()%20==0&&(i=Z("
"),n.push(i)),i.append(''+t.format("ss")+" | "),t.add(5,"s");e.empty().append(n)}())}function u(e){var t=L?null:T;if(!e)return L=!0,M.val(""),o.data("date",""),d({type:"dp.change",date:!1,oldDate:t}),void l();if(e=e.clone().locale(m.locale),n()&&e.tz(m.timeZone),1!==m.stepping)for(e.minutes(Math.round(e.minutes()/m.stepping)*m.stepping).seconds(0);m.minDate&&e.isBefore(m.minDate);)e.add(m.stepping,"minutes");h(e)?(E=(T=e).clone(),M.val(T.format(P)),o.data("date",T.format(P)),L=!1,l(),d({type:"dp.change",date:T.clone(),oldDate:t})):(m.keepInvalid?d({type:"dp.change",date:e,oldDate:t}):M.val(L?"":T.format(P)),d({type:"dp.error",date:e,oldDate:t}))}function p(){var t=!1;return U&&(U.find(".collapse").each(function(){var e=Z(this).data("collapse");return!e||!e.transitioning||!(t=!0)}),t||(N&&N.hasClass("btn")&&N.toggleClass("active"),U.hide(),Z(window).off("resize",i),U.off("click","[data-action]"),U.off("mousedown",!1),U.remove(),U=!1,d({type:"dp.hide",date:T.clone()}),M.blur(),E=T.clone())),I}function e(){u(null)}function f(e){return void 0===m.parseInputDate?(!Q.isMoment(e)||e instanceof Date)&&(e=c(e)):e=m.parseInputDate(e),e}function w(e){return Z(e.currentTarget).is(".disabled")||X[Z(e.currentTarget).data("action")].apply(I,arguments),!1}function b(){var e;return M.prop("disabled")||!m.ignoreReadonly&&M.prop("readonly")||U||(void 0!==M.val()&&0!==M.val().trim().length?u(f(M.val().trim())):L&&m.useCurrent&&(m.inline||M.is("input")&&0===M.val().trim().length)&&(e=c(),"string"==typeof m.useCurrent&&(e={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[m.useCurrent](e)),u(e)),U=t(),function(){var e=Z("
"),t=E.clone().startOf("w").startOf("d");for(!0===m.calendarWeeks&&e.append(Z("").addClass("cw").text("#"));t.isBefore(E.clone().endOf("w"));)e.append(Z(" | ").addClass("dow").text(t.format("dd"))),t.add(1,"d");U.find(".datepicker-days thead").append(e)}(),function(){for(var e=[],t=E.clone().startOf("y").startOf("d");t.isSame(E,"y");)e.push(Z("").attr("data-action","selectMonth").addClass("month").text(t.format("MMM"))),t.add(1,"M");U.find(".datepicker-months td").empty().append(e)}(),U.find(".timepicker-hours").hide(),U.find(".timepicker-minutes").hide(),U.find(".timepicker-seconds").hide(),l(),a(),Z(window).on("resize",i),U.on("click","[data-action]",w),U.on("mousedown",!1),N&&N.hasClass("btn")&&N.toggleClass("active"),i(),U.show(),m.focusOnShow&&!M.is(":focus")&&M.focus(),d({type:"dp.show"})),I}function _(){return(U?p:b)()}function k(e){var t,n,i,r,o=null,a=[],s={},l=e.which;for(t in G[l]="p",G)G.hasOwnProperty(t)&&"p"===G[t]&&(a.push(t),parseInt(t,10)!==l&&(s[t]=!0));for(t in m.keyBinds)if(m.keyBinds.hasOwnProperty(t)&&"function"==typeof m.keyBinds[t]&&(i=t.split(" ")).length===a.length&&q[l]===i[i.length-1]){for(r=!0,n=i.length-2;0<=n;n--)if(!(q[i[n]]in s)){r=!1;break}if(r){o=m.keyBinds[t];break}}o&&(o.call(I,U),e.stopPropagation(),e.preventDefault())}function x(e){G[e.which]="r",e.stopPropagation(),e.preventDefault()}function C(e){var t=Z(e.target).val().trim();return u(t?f(t):null),e.stopImmediatePropagation(),!1}function D(e){var t={};return Z.each(e,function(){var e=f(this);e.isValid()&&(t[e.format("YYYY-MM-DD")]=!0)}),!!Object.keys(t).length&&t}function S(e){var t={};return Z.each(e,function(){t[this]=!0}),!!Object.keys(t).length&&t}function $(){var e=m.format||"L LT";P=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return(T.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(e){return T.localeData().longDateFormat(e)||e})}),(A=m.extraFormats?m.extraFormats.slice():[]).indexOf(e)<0&&A.indexOf(P)<0&&A.push(P),O=P.toLowerCase().indexOf("a")<1&&P.replace(/\[.*?\]/g,"").indexOf("h")<1,g("y")&&(H=2),g("M")&&(H=1),g("d")&&(H=0),R=Math.max(H,R),L||u(T)}var T,E,M,O,P,A,R,j,F,I={},L=!0,N=!1,U=!1,H=0,B=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],V=["days","months","years","decades"],Y=["top","bottom","auto"],z=["left","right","auto"],W=["default","top","bottom"],q={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},G={},X={next:function(){var e=B[R].navFnc;E.add(B[R].navStep,e),s(),r(e)},previous:function(){var e=B[R].navFnc;E.subtract(B[R].navStep,e),s(),r(e)},pickerSwitch:function(){a(1)},selectMonth:function(e){var t=Z(e.target).closest("tbody").find("span").index(Z(e.target));E.month(t),R===H?(u(T.clone().year(E.year()).month(E.month())),m.inline||p()):(a(-1),s()),r("M")},selectYear:function(e){var t=parseInt(Z(e.target).text(),10)||0;E.year(t),R===H?(u(T.clone().year(E.year())),m.inline||p()):(a(-1),s()),r("YYYY")},selectDecade:function(e){var t=parseInt(Z(e.target).data("selection"),10)||0;E.year(t),R===H?(u(T.clone().year(E.year())),m.inline||p()):(a(-1),s()),r("YYYY")},selectDay:function(e){var t=E.clone();Z(e.target).is(".old")&&t.subtract(1,"M"),Z(e.target).is(".new")&&t.add(1,"M"),u(t.date(parseInt(Z(e.target).text(),10))),v()||m.keepOpen||m.inline||p()},incrementHours:function(){var e=T.clone().add(1,"h");h(e,"h")&&u(e)},incrementMinutes:function(){var e=T.clone().add(m.stepping,"m");h(e,"m")&&u(e)},incrementSeconds:function(){var e=T.clone().add(1,"s");h(e,"s")&&u(e)},decrementHours:function(){var e=T.clone().subtract(1,"h");h(e,"h")&&u(e)},decrementMinutes:function(){var e=T.clone().subtract(m.stepping,"m");h(e,"m")&&u(e)},decrementSeconds:function(){var e=T.clone().subtract(1,"s");h(e,"s")&&u(e)},togglePeriod:function(){u(T.clone().add(12<=T.hours()?-12:12,"h"))},togglePicker:function(e){var t,n=Z(e.target),i=n.closest("ul"),r=i.find(".in"),o=i.find(".collapse:not(.in)");if(r&&r.length){if((t=r.data("collapse"))&&t.transitioning)return;r.collapse?(r.collapse("hide"),o.collapse("show")):(r.removeClass("in"),o.addClass("in")),n.is("span")?n.toggleClass(m.icons.time+" "+m.icons.date):n.find("span").toggleClass(m.icons.time+" "+m.icons.date)}},showPicker:function(){U.find(".timepicker > div:not(.timepicker-picker)").hide(),U.find(".timepicker .timepicker-picker").show()},showHours:function(){U.find(".timepicker .timepicker-picker").hide(),U.find(".timepicker .timepicker-hours").show()},showMinutes:function(){U.find(".timepicker .timepicker-picker").hide(),U.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){U.find(".timepicker .timepicker-picker").hide(),U.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var t=parseInt(Z(e.target).text(),10);O||(12<=T.hours()?12!==t&&(t+=12):12===t&&(t=0)),u(T.clone().hours(t)),X.showPicker.call(I)},selectMinute:function(e){u(T.clone().minutes(parseInt(Z(e.target).text(),10))),X.showPicker.call(I)},selectSecond:function(e){u(T.clone().seconds(parseInt(Z(e.target).text(),10))),X.showPicker.call(I)},clear:e,today:function(){var e=c();h(e,"d")&&u(e)},close:p};if(I.destroy=function(){p(),M.off({change:C,blur:blur,keydown:k,keyup:x,focus:m.allowInputToggle?p:""}),o.is("input")?M.off({focus:b}):N&&(N.off("click",_),N.off("mousedown",!1)),o.removeData("DateTimePicker"),o.removeData("date")},I.toggle=_,I.show=b,I.hide=p,I.disable=function(){return p(),N&&N.hasClass("btn")&&N.addClass("disabled"),M.prop("disabled",!0),I},I.enable=function(){return N&&N.hasClass("btn")&&N.removeClass("disabled"),M.prop("disabled",!1),I},I.ignoreReadonly=function(e){if(0===arguments.length)return m.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return m.ignoreReadonly=e,I},I.options=function(e){if(0===arguments.length)return Z.extend(!0,{},m);if(!(e instanceof Object))throw new TypeError("options() options parameter should be an object");return Z.extend(!0,m,e),Z.each(m,function(e,t){if(void 0===I[e])throw new TypeError("option "+e+" is not recognized!");I[e](t)}),I},I.date=function(e){if(0===arguments.length)return L?null:T.clone();if(!(null===e||"string"==typeof e||Q.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return u(null===e?null:f(e)),I},I.format=function(e){if(0===arguments.length)return m.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return m.format=e,P&&$(),I},I.timeZone=function(e){if(0===arguments.length)return m.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return m.timeZone=e,I},I.dayViewHeaderFormat=function(e){if(0===arguments.length)return m.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return m.dayViewHeaderFormat=e,I},I.extraFormats=function(e){if(0===arguments.length)return m.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return m.extraFormats=e,A&&$(),I},I.disabledDates=function(e){if(0===arguments.length)return m.disabledDates?Z.extend({},m.disabledDates):m.disabledDates;if(!e)return m.disabledDates=!1,l(),I;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return m.disabledDates=D(e),m.enabledDates=!1,l(),I},I.enabledDates=function(e){if(0===arguments.length)return m.enabledDates?Z.extend({},m.enabledDates):m.enabledDates;if(!e)return m.enabledDates=!1,l(),I;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return m.enabledDates=D(e),m.disabledDates=!1,l(),I},I.daysOfWeekDisabled=function(e){if(0===arguments.length)return m.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return m.daysOfWeekDisabled=!1,l(),I;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(m.daysOfWeekDisabled=e.reduce(function(e,t){return 6<(t=parseInt(t,10))||t<0||isNaN(t)||-1===e.indexOf(t)&&e.push(t),e},[]).sort(),m.useCurrent&&!m.keepInvalid){for(var t=0;!h(T,"d");){if(T.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}u(T)}return l(),I},I.maxDate=function(e){if(0===arguments.length)return m.maxDate?m.maxDate.clone():m.maxDate;if("boolean"==typeof e&&!1===e)return m.maxDate=!1,l(),I;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=c()));var t=f(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(m.minDate&&t.isBefore(m.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(P));return m.maxDate=t,m.useCurrent&&!m.keepInvalid&&T.isAfter(e)&&u(m.maxDate),E.isAfter(t)&&(E=t.clone().subtract(m.stepping,"m")),l(),I},I.minDate=function(e){if(0===arguments.length)return m.minDate?m.minDate.clone():m.minDate;if("boolean"==typeof e&&!1===e)return m.minDate=!1,l(),I;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=c()));var t=f(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(m.maxDate&&t.isAfter(m.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(P));return m.minDate=t,m.useCurrent&&!m.keepInvalid&&T.isBefore(e)&&u(m.minDate),E.isBefore(t)&&(E=t.clone().add(m.stepping,"m")),l(),I},I.defaultDate=function(e){if(0===arguments.length)return m.defaultDate?m.defaultDate.clone():m.defaultDate;if(!e)return m.defaultDate=!1,I;"string"==typeof e&&(e="now"===e||"moment"===e?c():c(e));var t=f(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!h(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return m.defaultDate=t,(m.defaultDate&&m.inline||""===M.val().trim())&&u(m.defaultDate),I},I.locale=function(e){if(0===arguments.length)return m.locale;if(!Q.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return m.locale=e,T.locale(m.locale),E.locale(m.locale),P&&$(),U&&(p(),b()),I},I.stepping=function(e){return 0===arguments.length?m.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),m.stepping=e,I)},I.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return m.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return m.useCurrent=e,I},I.collapse=function(e){if(0===arguments.length)return m.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return m.collapse===e||(m.collapse=e,U&&(p(),b())),I},I.icons=function(e){if(0===arguments.length)return Z.extend({},m.icons);if(!(e instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return Z.extend(m.icons,e),U&&(p(),b()),I},I.tooltips=function(e){if(0===arguments.length)return Z.extend({},m.tooltips);if(!(e instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return Z.extend(m.tooltips,e),U&&(p(),b()),I},I.useStrict=function(e){if(0===arguments.length)return m.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return m.useStrict=e,I},I.sideBySide=function(e){if(0===arguments.length)return m.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return m.sideBySide=e,U&&(p(),b()),I},I.viewMode=function(e){if(0===arguments.length)return m.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===V.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+V.join(", ")+") value");return m.viewMode=e,R=Math.max(V.indexOf(e),H),a(),I},I.toolbarPlacement=function(e){if(0===arguments.length)return m.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===W.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+W.join(", ")+") value");return m.toolbarPlacement=e,U&&(p(),b()),I},I.widgetPositioning=function(e){if(0===arguments.length)return Z.extend({},m.widgetPositioning);if("[object Object]"!=={}.toString.call(e))throw new TypeError("widgetPositioning() expects an object variable");if(e.horizontal){if("string"!=typeof e.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(e.horizontal=e.horizontal.toLowerCase(),-1===z.indexOf(e.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+z.join(", ")+")");m.widgetPositioning.horizontal=e.horizontal}if(e.vertical){if("string"!=typeof e.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(e.vertical=e.vertical.toLowerCase(),-1===Y.indexOf(e.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+Y.join(", ")+")");m.widgetPositioning.vertical=e.vertical}return l(),I},I.calendarWeeks=function(e){if(0===arguments.length)return m.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return m.calendarWeeks=e,l(),I},I.showTodayButton=function(e){if(0===arguments.length)return m.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return m.showTodayButton=e,U&&(p(),b()),I},I.showClear=function(e){if(0===arguments.length)return m.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return m.showClear=e,U&&(p(),b()),I},I.widgetParent=function(e){if(0===arguments.length)return m.widgetParent;if("string"==typeof e&&(e=Z(e)),null!==e&&"string"!=typeof e&&!(e instanceof Z))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return m.widgetParent=e,U&&(p(),b()),I},I.keepOpen=function(e){if(0===arguments.length)return m.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return m.keepOpen=e,I},I.focusOnShow=function(e){if(0===arguments.length)return m.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return m.focusOnShow=e,I},I.inline=function(e){if(0===arguments.length)return m.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return m.inline=e,I},I.clear=function(){return e(),I},I.keyBinds=function(e){return 0===arguments.length?m.keyBinds:(m.keyBinds=e,I)},I.getMoment=function(e){return c(e)},I.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return m.debug=e,I},I.allowInputToggle=function(e){if(0===arguments.length)return m.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return m.allowInputToggle=e,I},I.showClose=function(e){if(0===arguments.length)return m.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return m.showClose=e,I},I.keepInvalid=function(e){if(0===arguments.length)return m.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return m.keepInvalid=e,I},I.datepickerInput=function(e){if(0===arguments.length)return m.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return m.datepickerInput=e,I},I.parseInputDate=function(e){if(0===arguments.length)return m.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return m.parseInputDate=e,I},I.disabledTimeIntervals=function(e){if(0===arguments.length)return m.disabledTimeIntervals?Z.extend({},m.disabledTimeIntervals):m.disabledTimeIntervals;if(!e)return m.disabledTimeIntervals=!1,l(),I;if(!(e instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return m.disabledTimeIntervals=e,l(),I},I.disabledHours=function(e){if(0===arguments.length)return m.disabledHours?Z.extend({},m.disabledHours):m.disabledHours;if(!e)return m.disabledHours=!1,l(),I;if(!(e instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(m.disabledHours=S(e),m.enabledHours=!1,m.useCurrent&&!m.keepInvalid){for(var t=0;!h(T,"h");){if(T.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}u(T)}return l(),I},I.enabledHours=function(e){if(0===arguments.length)return m.enabledHours?Z.extend({},m.enabledHours):m.enabledHours;if(!e)return m.enabledHours=!1,l(),I;if(!(e instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(m.enabledHours=S(e),m.disabledHours=!1,m.useCurrent&&!m.keepInvalid){for(var t=0;!h(T,"h");){if(T.add(1,"h"),24===t)throw"Tried 24 times to find a valid date";t++}u(T)}return l(),I},I.viewDate=function(e){if(0===arguments.length)return E.clone();if(!e)return E=T.clone(),I;if(!("string"==typeof e||Q.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return E=f(e),r(),I},o.is("input"))M=o;else if(0===(M=o.find(m.datepickerInput)).length)M=o.find("input");else if(!M.is("input"))throw new Error('CSS class "'+m.datepickerInput+'" cannot be applied to non input element');if(o.hasClass("input-group")&&(N=0===o.find(".datepickerbutton").length?o.find(".input-group-addon"):o.find(".datepickerbutton")),!m.inline&&!M.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return T=c(),E=T.clone(),Z.extend(!0,m,(F={},(j=o.is("input")||m.inline?o.data():o.find("input").data()).dateOptions&&j.dateOptions instanceof Object&&(F=Z.extend(!0,F,j.dateOptions)),Z.each(m,function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==j[t]&&(F[e]=j[t])}),F)),I.options(m),$(),M.on({change:C,blur:m.debug?"":p,keydown:k,keyup:x,focus:m.allowInputToggle?b:""}),o.is("input")?M.on({focus:b}):N&&(N.on("click",_),N.on("mousedown",!1)),M.prop("disabled")&&I.disable(),M.is("input")&&0!==M.val().trim().length?u(f(M.val().trim())):m.defaultDate&&void 0===M.attr("placeholder")&&u(m.defaultDate),m.inline&&b(),I}return Z.fn.datetimepicker=function(n){n=n||{};var t,i=Array.prototype.slice.call(arguments,1),r=!0;if("object"==typeof n)return this.each(function(){var e,t=Z(this);t.data("DateTimePicker")||(e=Z.extend(!0,{},Z.fn.datetimepicker.defaults,n),t.data("DateTimePicker",o(t,e)))});if("string"==typeof n)return this.each(function(){var e=Z(this).data("DateTimePicker");if(!e)throw new Error('bootstrap-datetimepicker("'+n+'") method was called on an element that is not using DateTimePicker');t=e[n].apply(e,i),r=t===e}),r||-1<\/script>'}]}},r=[];return angular.forEach(n,function(e){r.push(t.createInstance(e))}),r}]),angular.module("videosharing-embed").filter("whitelist",function(){"use strict";return function(e,n){var i={};return angular.forEach(e,function(e,t){-1!=n.indexOf(t)&&(i[t]=e)}),i}}),angular.module("videosharing-embed").filter("videoSettings",function(){"use strict";return function(e){var n=[];return angular.forEach(e,function(e,t){n.push([t,e].join("="))}),0',scope:{allowfullscreen:"@",height:"@",width:"@",onChange:"&"},link:function(u,e,c){var t=e.find("iframe"),d=void 0,h=angular.isString(c.forceProtocol)?c.forceProtocol+"://":void 0;u.allowfullscreen=void 0===u.allowfullscreen||"true"===u.allowfullscreen,u.allowfullscreen?t.attr("allowfullscreen",""):t.removeAttr("allowfullscreen"),c.$observe("width",function(e){u.width=e}),c.$observe("height",function(e){u.height=e}),c.$observe("iframeId",function(e){return e?void t.attr("id",e):void t.removeAttr("id")}),c.$observe("href",function(t){if(void 0!==t&&t!==d){d=t;var i=null;if(angular.forEach(f,function(e){e.isPlayerFromURL(t)&&(i=e)}),null===i)return void u.onChange();var e=t.match(i.playerRegExp);h=h||e[1];var n=e[2],r=t.match(i.timeRegExp);if(i.config,angular.forEach(p("whitelist")(c,i.whitelist),function(e,t){var n=null!=i.transformAttrMap[t]?i.transformAttrMap[t]:t;i.settings[n]=e}),i.settings.start=0,r)switch(i.type){case"youtube":i.settings.start+=60*parseInt(r[2]||"0")*60,i.settings.start+=60*parseInt(r[4]||"0"),i.settings.start+=parseInt(r[6]||"0");break;case"dailymotion":i.settings.start+=parseInt(r[1]||"0")}if(i.isAdditionaResRequired())for(var o=angular.element(g.document.querySelector("body")),a=0;a |