ngx-bootstrap-product-tour
Version:
Angular product tour using ngx-bootstrap popover
3 lines • 260 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("rxjs/add/operator/filter"),require("rxjs/add/operator/map"),require("rxjs/BehaviorSubject"),require("rxjs/Observable"),require("rxjs/operator/distinctUntilChanged"),require("rxjs/operator/map"),require("rxjs/operator/observeOn"),require("rxjs/operator/scan"),require("rxjs/Subject"),require("rxjs/add/observable/timer"),require("rxjs/add/observable/from"),require("rxjs/add/operator/debounceTime"),require("rxjs/add/operator/switchMap"),require("rxjs/add/operator/mergeMap"),require("rxjs/add/operator/toArray"),require("rxjs/operator/merge"),require("rxjs/add/operator/first"),require("@angular/router")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common","@angular/forms","rxjs/add/operator/filter","rxjs/add/operator/map","rxjs/BehaviorSubject","rxjs/Observable","rxjs/operator/distinctUntilChanged","rxjs/operator/map","rxjs/operator/observeOn","rxjs/operator/scan","rxjs/Subject","rxjs/add/observable/timer","rxjs/add/observable/from","rxjs/add/operator/debounceTime","rxjs/add/operator/switchMap","rxjs/add/operator/mergeMap","rxjs/add/operator/toArray","rxjs/operator/merge","rxjs/add/operator/first","@angular/router"],t):t(e["ngx-bootstrap-product-tour"]={},e.ng.core,e.ng.common,e.ng.forms,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx,e.Rx,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx,e.Rx.Observable,e.Rx.Observable,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.Rx.Observable.prototype,e.ng.router)}(this,function(e,t,n,i,r,o,s,a,c,u,l,p,h,d,f,m,_,y,g,v,b,w){"use strict";function k(e,t){void 0===t&&(t=Ti);var n=(e||"").trim();if(0===n.length)return[];var i=n.split(/\s+/).map(function(e){return e.split(":")}).map(function(e){var n=t[e[0]]||e;return new Ei(n[0],n[1])}),r=i.filter(function(e){return e.isManual()});if(r.length>1)throw new Error("Triggers parse error: only one manual trigger is allowed");if(1===r.length&&i.length>1)throw new Error("Triggers parse error: manual trigger can't be mixed with other triggers");return i}function S(e,t){var n=k(t.triggers),i=t.target;if(1===n.length&&n[0].isManual())return Function.prototype;var r=[],o=[],s=function(){o.forEach(function(e){return r.push(e())}),o.length=0};return n.forEach(function(n){var a=n.open===n.close,c=a?t.toggle:t.show;a||o.push(function(){return e.listen(i,n.close,t.hide)}),r.push(e.listen(i,n.open,function(){return c(s)}))}),function(){r.forEach(function(e){return e()})}}function D(e,t){return t.outsideClick?e.listen("document","click",function(e){t.target&&t.target.contains(e.target)||t.targets&&t.targets.some(function(t){return t.contains(e.target)})||t.hide()}):Function.prototype}function C(e,t,n,i){var r=Ai.positionElements(e,t,n,i);t.style.top=r.top+"px",t.style.left=r.left+"px"}function O(e){return"string"==typeof e?document.querySelector(e):e instanceof t.ElementRef?e.nativeElement:e}function x(){if("undefined"==typeof document)return null;var e=document.createElement("span");e.innerText="test bs version",document.body.appendChild(e),e.classList.add("d-none");var t=e.getBoundingClientRect();return document.body.removeChild(e),t&&0===t.top?"bs4":"bs3"}function M(){return void 0===Ni||("undefined"==typeof Ni.__theme?Mi?"bs3"===Mi:"bs3"===(Mi=x()):"bs4"!==Ni.__theme)}function I(e,t,n){var i=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(i.getUTCFullYear())&&i.setUTCFullYear(e),i}function P(e,t,n,i,r,o,s){void 0===t&&(t=0),void 0===n&&(n=1),void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=0),void 0===s&&(s=0);var a=new Date(e,t,n,i,r,o,s);return e<100&&e>=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function E(e,t,n){var i=""+Math.abs(e),r=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function T(e,t){return(e%t+t)%t}function R(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function j(e){return"string"==typeof e}function A(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function H(e){return e&&e.getTime&&!isNaN(e.getTime())}function L(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function N(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function F(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function V(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Y(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function z(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}function U(e){return void 0===e}function W(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=R(t)),n}function B(e,t,n,i){e&&(Wi[e]=i),t&&(Wi[t[0]]=function(){return E(i.apply(null,arguments),t[1],t[2])}),n&&(Wi[n]=function(t,n){return n.locale.ordinal(i.apply(null,arguments),e)})}function G(e){for(var t=e.match(Bi),n=t.length,i=new Array(n),r=0;r<n;r++)i[r]=Wi[t[r]]?Wi[t[r]]:$(t[r]);return function(t,r,o,s){void 0===s&&(s=0);for(var a="",c=0;c<n;c++)a+=L(i[c])?i[c].call(null,t,{format:e,locale:r,isUTC:o,offset:s}):i[c];return a}}function $(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Z(e,t){return void 0===t&&(t=!1),t?e.getUTCHours():e.getHours()}function q(e,t){return void 0===t&&(t=!1),t?e.getUTCMinutes():e.getMinutes()}function J(e,t){return void 0===t&&(t=!1),t?e.getUTCSeconds():e.getSeconds()}function K(e,t){return void 0===t&&(t=!1),t?e.getUTCMilliseconds():e.getMilliseconds()}function Q(e){return e.getTime()}function X(e,t){return void 0===t&&(t=!1),t?e.getUTCDay():e.getDay()}function ee(e,t){return void 0===t&&(t=!1),t?e.getUTCDate():e.getDate()}function te(e,t){return void 0===t&&(t=!1),t?e.getUTCMonth():e.getMonth()}function ne(e,t){return void 0===t&&(t=!1),t?e.getUTCFullYear():e.getFullYear()}function ie(e){return Math.floor(e.valueOf()/1e3)}function re(e){return P(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds())}function oe(e,t){return e.getDay()===t}function se(e,t){return!(!e||!t)&&(ae(e,t)&&te(e)===te(t))}function ae(e,t){return!(!e||!t)&&ne(e)===ne(t)}function ce(e,t){return!(!e||!t)&&(ae(e,t)&&se(e,t)&&ee(e)===ee(t))}function ue(e,t,n){L(t)?cr[e]=t:cr[e]=function(e,i){return e&&n?n:t}}function le(e,t){return V(cr,e)?cr[e](!1,t):new RegExp(pe(e))}function pe(e){return he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,r){return t||n||i||r}))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function de(e,t){var n=j(e)?[e]:e,i=t;if(N(t)&&(i=function(e,n,i){return n[t]=W(e),i}),F(n)&&L(i)){var r=void 0;for(r=0;r<n.length;r++)ur[n[r]]=i}}function fe(e,t){de(e,function(e,n,i,r){return i._w=i._w||{},t(e,i._w,i,r)})}function me(e,t,n){return null!=t&&V(ur,e)&&ur[e](t,n._a,n,e),n}function _e(e,t){var n=e.toLowerCase(),i=e;n in br&&(i=br[n]),vr[n]=vr[n+"s"]=vr[t]=i}function ye(e){return j(e)?vr[e]||vr[e.toLowerCase()]:undefined}function ge(e){var t,n,i={};for(n in e)V(e,n)&&(t=ye(n))&&(i[t]=e[n]);return i}function ve(e,t){return ne(e,t.isUTC).toString()}function be(e){return W(e)+(W(e)>68?1900:2e3)}function we(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}function Se(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function De(e){return null==e._pf&&(e._pf=Se()),e._pf}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=T(t,12),i=e+(t-n)/12;return 1===n?ke(i)?29:28:31-n%7%2}function Oe(e,t){var n=Object.assign({},wr,t),i=e.getFullYear()+(n.year||0),r=e.getMonth()+(n.month||0),o=e.getDate()+(n.day||0);return n.month&&!n.day&&(o=Math.min(o,Ce(i,r))),P(i,r,o,e.getHours()+(n.hour||0),e.getMinutes()+(n.minute||0),e.getSeconds()+(n.seconds||0))}function xe(e,t){return P(Me(e.getFullYear(),t.year),Me(e.getMonth(),t.month),Me(e.getDate(),t.day),Me(e.getHours(),t.hour),Me(e.getMinutes(),t.minute),Me(e.getSeconds(),t.seconds),Me(e.getMilliseconds(),t.milliseconds))}function Me(e,t){return N(t)?t:e}function Ie(e,t,n){var i=Math.min(ee(e),Ce(ne(e),t));return n?e.setUTCMonth(t,i):e.setMonth(t,i),e}function Pe(e,t,n){return n?e.setUTCHours(t):e.setHours(t),e}function Ee(e,t,n){return n?e.setUTCMinutes(t):e.setMinutes(t),e}function Te(e,t,n){return n?e.setUTCSeconds(t):e.setSeconds(t),e}function Re(e,t,n){return n?e.setUTCMilliseconds(t):e.setMilliseconds(t),e}function je(e,t,n){return n?e.setUTCDate(t):e.setDate(t),e}function Ae(e,t){return e.setTime(t),e}function He(e){return new Date(e.getTime())}function Le(e){if(Object.keys(e).some(function(t){return t in Sr&&null===e[t]||isNaN(e[t])}))return!1;for(var t=!1,n=0;n<kr.length;++n)if(e[kr[n]]){if(t)return!1;e[kr[n]]!==W(e[kr[n]])&&(t=!0)}return!0}function Ne(e){return e<0?Math.floor(e):Math.ceil(e)}function Fe(e){var t=e._milliseconds,n=e._days,i=e._months,r=e._data;t>=0&&n>=0&&i>=0||t<=0&&n<=0&&i<=0||(t+=864e5*Ne(Ye(i)+n),n=0,i=0),r.milliseconds=t%1e3;var o=R(t/1e3);r.seconds=o%60;var s=R(o/60);r.minutes=s%60;var a=R(s/60);r.hours=a%24;var c=R(Ve(n+=R(a/24)));i+=c,n-=Ne(Ye(c));var u=R(i/12);return i%=12,r.day=n,r.month=i,r.year=u,e}function Ve(e){return 4800*e/146097}function Ye(e){return 146097*e/4800}function ze(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function Ue(e,t,n){var i=Ft(e).abs(),r=Dr(i.as("s")),o=Dr(i.as("m")),s=Dr(i.as("h")),a=Dr(i.as("d")),c=Dr(i.as("M")),u=Dr(i.as("y")),l=r<=Cr.ss&&["s",r]||r<Cr.s&&["ss",r]||o<=1&&["m"]||o<Cr.m&&["mm",o]||s<=1&&["h"]||s<Cr.h&&["hh",s]||a<=1&&["d"]||a<Cr.d&&["dd",a]||c<=1&&["M"]||c<Cr.M&&["MM",c]||u<=1&&["y"]||["yy",u],p=[l[0],l[1],t,+e>0,n];return ze.apply(null,p)}function We(e){return e instanceof Or}function Be(e){if(null==e._isValid){var t=De(e),n=Array.prototype.some.call(t.parsedDateParts,function(e){return null!=e}),i=!isNaN(e._d&&e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&t.bigHour===undefined),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function Ge(e,t){return e._d=new Date(NaN),Object.assign(De(e),t||{userInvalidated:!0}),e}function $e(e){return e._isValid=!1,e}function Ze(e){if(!j(e._i))return e;var t,n,i,r,o=e._i,s=Mr.exec(o)||Ir.exec(o);if(!s)return e._isValid=!1,e;var a,c;for(a=0,c=Er.length;a<c;a++)if(Er[a][1].exec(s[1])){n=Er[a][0],t=!1!==Er[a][2];break}if(null==n)return e._isValid=!1,e;if(s[3]){for(a=0,c=Tr.length;a<c;a++)if(Tr[a][1].exec(s[3])){i=(s[2]||" ")+Tr[a][0];break}if(null==i)return e._isValid=!1,e}if(!t&&null!=i)return e._isValid=!1,e;if(s[4]){if(!Pr.exec(s[4]))return e._isValid=!1,e;r="Z"}return e._f=n+(i||"")+(r||""),xt(e)}function qe(e,t,n,i,r,o){var s=[Je(e),Br.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return o&&s.push(parseInt(o,10)),s}function Je(e){var t=parseInt(e,10);return t<=49?t+2e3:t}function Ke(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}function Qe(e,t,n){return!e||$r.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(De(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Xe(e,t,n){if(e)return jr[e];if(t)return 0;var i=parseInt(n,10),r=i%100;return 60*((i-r)/100)+r}function et(e){if(!j(e._i))return e;var t=Ar.exec(Ke(e._i));if(!t)return $e(e);var n=qe(t[4],t[3],t[2],t[5],t[6],t[7]);return Qe(t[1],n,e)?(e._a=n,e._tzm=Xe(t[8],t[9],t[10]),e._d=I.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),De(e).rfc2822=!0,e):e}function tt(e){if(!j(e._i))return e;var t=Rr.exec(e._i);return null!==t?(e._d=new Date(+t[1]),e):(Ze(e),!1!==e._isValid?e:(delete e._isValid,et(e),!1!==e._isValid?e:(delete e._isValid,Ge(e))))}function nt(e,t){return Z(e,t)%12||12}function it(e,t){return Z(e,t)||24}function rt(e,t){B(e,null,null,function(e,n){return n.locale.meridiem(Z(e,n.isUTC),q(e,n.isUTC),t)})}function ot(e,t){return t._meridiemParse}function st(e,t){B(e,null,null,function(e,n){var i=lt(e,{_isUTC:n.isUTC,_offset:n.offset}),r="+";return i<0&&(i=-i,r="-"),r+E(~~(i/60),2)+t+E(~~i%60,2)})}function at(e,t){var n=(t||"").match(e);if(null===n)return null;var i=n[n.length-1].match(Lr)||["-","0","0"],r=60*parseInt(i[1],10)+W(i[2]),o="+"===i[0]?r:-r;return 0===r?0:o}function ct(e,t,n){if(void 0===n&&(n={}),!n._isUTC)return e;var i=He(t),r=6e4*(n._offset||0),o=e.valueOf()-i.valueOf()+r;return i.setTime(i.valueOf()+o),i}function ut(e){return 15*-Math.round(e.getTimezoneOffset()/15)}function lt(e,t){void 0===t&&(t={});var n=t._offset||0;return t._isUTC?n:ut(e)}function pt(e,t){return void 0===t&&(t=!1),Math.ceil((te(e,t)+1)/3)}function ht(e,t){return void 0===t&&(t=yn()),t.week(e)}function dt(e){return an(e,1,4).week}function ft(e,t){B(null,[e,e.length,!1],null,t)}function mt(e,t){return yt(e,t.locale).toString()}function _t(e){return gt(e).toString()}function yt(e,t){return void 0===t&&(t=yn()),an(e,t.firstDayOfWeek(),t.firstDayOfYear()).year}function gt(e){return an(e,1,4).year}function vt(e,t,n,i,r){void 0===r&&(r=0);var o=yn(n||"en");if(!o)throw new Error('Locale "'+n+'" is not defined, please add it with "defineLocale(...)"');var s=bt(e,t||(i?"YYYY-MM-DDTHH:mm:ss[Z]":"YYYY-MM-DDTHH:mm:ssZ"),o,i,r);return s?o.postformat(s):s}function bt(e,t,n,i,r){if(void 0===r&&(r=0),!H(e))return n.invalidDate;var o=wt(t,n);return Ui[o]=Ui[o]||G(o),Ui[o](e,n,i,r)}function wt(e,t){var n=e,i=5,r=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;for(r.lastIndex=0;i>=0&&r.test(n);)n=n.replace(r,function(e){return t.formatLongDate(e)||e}),r.lastIndex=0,i-=1;return n}function kt(e,t,n){return null!=e?e:null!=t?t:n}function St(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Dt(e){var t,n,i,r,o,s=[];if(e._d)return e;for(i=St(e),e._w&&null==e._a[hr]&&null==e._a[pr]&&Ct(e),null!=e._dayOfYear&&(o=kt(e._a[lr],i[lr]),(e._dayOfYear>we(o)||0===e._dayOfYear)&&(De(e)._overflowDayOfYear=!0),n=new Date(Date.UTC(o,0,e._dayOfYear)),e._a[pr]=n.getUTCMonth(),e._a[hr]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];return 24===e._a[dr]&&0===e._a[fr]&&0===e._a[mr]&&0===e._a[_r]&&(e._nextDay=!0,e._a[dr]=0),e._d=(e._useUTC?I:P).apply(null,s),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[dr]=24),e._w&&"undefined"!=typeof e._w.d&&e._w.d!==r&&(De(e).weekdayMismatch=!0),e}function Ct(e){var t,n,i,r,o,s,a,c;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,s=4,n=kt(t.GG,e._a[lr],an(new Date,1,4).year),i=kt(t.W,1),((r=kt(t.E,1))<1||r>7)&&(c=!0);else{o=e._locale._week.dow,s=e._locale._week.doy;var u=an(new Date,o,s);n=kt(t.gg,e._a[lr],u.year),i=kt(t.w,u.week),null!=t.d?((r=t.d)<0||r>6)&&(c=!0):null!=t.e?(r=t.e+o,(t.e<0||t.e>6)&&(c=!0)):r=o}return i<1||i>cn(n,o,s)?De(e)._overflowWeeks=!0:null!=c?De(e)._overflowWeekday=!0:(a=sn(n,i,r,o,s),e._a[lr]=a.year,e._dayOfYear=a.dayOfYear),e}function Ot(e){var t,n=e._a;return n&&-2===De(e).overflow&&(t=n[pr]<0||n[pr]>11?pr:n[hr]<1||n[hr]>Ce(n[lr],n[pr])?hr:n[dr]<0||n[dr]>24||24===n[dr]&&(0!==n[fr]||0!==n[mr]||0!==n[_r])?dr:n[fr]<0||n[fr]>59?fr:n[mr]<0||n[mr]>59?mr:n[_r]<0||n[_r]>999?_r:-1,De(e)._overflowDayOfYear&&(t<lr||t>hr)&&(t=hr),De(e)._overflowWeeks&&-1===t&&(t=yr),De(e)._overflowWeekday&&-1===t&&(t=gr),De(e).overflow=t),e}function xt(e){if(e._f===Nr)return Ze(e);if(e._f===Fr)return et(e);if(e._a=[],De(e).empty=!0,F(e._f)||!e._i&&0!==e._i)return e;var t,n,i,r,o=e._i.toString(),s=0,a=o.length,c=wt(e._f,e._locale).match(Bi)||[];for(t=0;t<c.length;t++)n=c[t],(i=(o.match(le(n,e._locale))||[])[0])&&((r=o.substr(0,o.indexOf(i))).length>0&&De(e).unusedInput.push(r),o=o.slice(o.indexOf(i)+i.length),s+=i.length),Wi[n]?(i?De(e).empty=!1:De(e).unusedTokens.push(n),me(n,i,e)):e._strict&&!i&&De(e).unusedTokens.push(n);return De(e).charsLeftOver=a-s,o.length>0&&De(e).unusedInput.push(o),e._a[dr]<=12&&!0===De(e).bigHour&&e._a[dr]>0&&(De(e).bigHour=void 0),De(e).parsedDateParts=e._a.slice(0),De(e).meridiem=e._meridiem,e._a[dr]=Mt(e._locale,e._a[dr],e._meridiem),Dt(e),Ot(e)}function Mt(e,t,n){var i=t;if(null==n)return i;if(null!=e.meridiemHour)return e.meridiemHour(i,n);if(null==e.isPM)return i;var r=e.isPM(n);return r&&i<12&&(i+=12),r||12!==i||(i=0),i}function It(e){var t,n,i,r;if(!e._f||0===e._f.length)return De(e).invalidFormat=!0,Ge(e);var o;for(o=0;o<e._f.length;o++)r=0,t=Object.assign({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],xt(t),Be(t)&&(r+=De(t).charsLeftOver,r+=10*De(t).unusedTokens.length,De(t).score=r,(null==i||r<i)&&(i=r,n=t));return Object.assign(e,n||t)}function Pt(e){if(e._d)return e;var t=e._i;if(Y(t)){var n=ge(t);e._a=[n.year,n.month,n.day,n.hours,n.minutes,n.seconds,n.milliseconds].map(function(e){return j(e)?parseInt(e,10):e})}return Dt(e)}function Et(e){var t=Ot(Tt(e));return t._d=new Date(null!=t._d?t._d.getTime():NaN),Be(Object.assign({},t,{_isValid:null}))||(t._d=new Date(NaN)),t}function Tt(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||n===undefined&&""===t?Ge(e,{nullInput:!0}):(j(t)&&(e._i=t=e._locale.preparse(t)),xr(t)?(e._d=He(t),e):(F(n)?It(e):n?xt(e):Rt(e),Be(e)||(e._d=null),e))}function Rt(e){var t=e._i;if(U(t))e._d=new Date;else if(xr(t))e._d=He(t);else if(j(t))tt(e);else if(F(t)&&t.length){var n=t.slice(0);e._a=n.map(function(e){return j(e)?parseInt(e,10):e}),Dt(e)}else if(Y(t))Pt(e);else{if(!N(t))return Ge(e);e._d=new Date(t)}return e}function jt(e,t,n,i,r){var o={},s=e;return(Y(s)&&z(s)||F(s)&&0===s.length)&&(s=undefined),o._useUTC=o._isUTC=r,o._l=n,o._i=s,o._f=t,o._strict=i,Et(o)}function At(e,t,n,i,r){return A(e)?e:jt(e,t,n,i,r)._d}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Lt(e,t,n){return void 0===n&&(n="milliseconds"),!(!e||!t)&&("milliseconds"===n?e.valueOf()>t.valueOf():t.valueOf()<tn(e,n).valueOf())}function Nt(e,t,n){return void 0===n&&(n="milliseconds"),!(!e||!t)&&("milliseconds"===n?e.valueOf()<t.valueOf():nn(e,n).valueOf()<t.valueOf())}function Ft(e,t,n){void 0===n&&(n={});var i=Vt(e,t);return new Or(i,n)}function Vt(e,t){if(null==e)return{};if(We(e))return{milliseconds:e._milliseconds,day:e._days,month:e._months};if(N(e))return t?(o={},o[t]=e,o):{milliseconds:e};if(j(e)){var n=Vr.exec(e);if(n){i="-"===n[1]?-1:1;return{year:0,day:W(n[hr])*i,hours:W(n[dr])*i,minutes:W(n[fr])*i,seconds:W(n[mr])*i,milliseconds:W(Ht(1e3*W(n[_r])))*i}}if(n=Yr.exec(e)){var i="-"===n[1]?-1:(n[1],1);return{year:Yt(n[2],i),month:Yt(n[3],i),week:Yt(n[4],i),day:Yt(n[5],i),hours:Yt(n[6],i),minutes:Yt(n[7],i),seconds:Yt(n[8],i)}}}if(Y(e)&&("from"in e||"to"in e)){var r=Ut(At(e.from),At(e.to));return{milliseconds:r.milliseconds,month:r.months}}return e;var o}function Yt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function zt(e,t){var n={milliseconds:0,months:0};return n.months=te(t)-te(e)+12*(ne(t)-ne(e)),Lt(Wt(He(e),n.months,"month"),t)&&--n.months,n.milliseconds=+t-+Wt(He(e),n.months,"month"),n}function Ut(e,t){if(!H(e)||!H(t))return{milliseconds:0,months:0};var n,i=ct(t,e,{_offset:e.getTimezoneOffset()});return Nt(e,i)?n=zt(e,i):((n=zt(i,e)).milliseconds=-n.milliseconds,n.months=-n.months),n}function Wt(e,t,n,i){return Gt(e,Ft(t,n),1,i)}function Bt(e,t,n,i){return Gt(e,Ft(t,n),-1,i)}function Gt(e,t,n,i){var r=t._milliseconds,o=Ht(t._days),s=Ht(t._months);return s&&Ie(e,te(e,i)+s*n,i),o&&je(e,ee(e,i)+o*n,i),r&&Ae(e,Q(e)+r*n),He(e)}function $t(e,t){if(!j(e))return e;var n=parseInt(e,10);if(!isNaN(n))return n;var i=t.weekdaysParse(e);return N(i)?i:null}function Zt(e,t){return void 0===t&&(t=yn()),j(e)?t.weekdaysParse(e)%7||7:N(e)&&isNaN(e)?null:e}function qt(e,t,n,i){void 0===n&&(n=yn());var r=X(e,i);return Wt(e,$t(t,n)-r,"day")}function Jt(e,t){return X(e,t)}function Kt(e,t,n){return void 0===t&&(t=yn()),(X(e,n)+7-t.firstDayOfWeek())%7}function Qt(e,t,n){return void 0===n&&(n={}),Wt(e,t-Kt(e,n.locale,n.isUTC),"day")}function Xt(e,t){return X(e,t)||7}function en(e,t,n){void 0===n&&(n={});var i=Zt(t,n.locale);return qt(e,Jt(e)%7?i:i-7)}function tn(e,t,n){var i=He(e);switch(t){case"year":Ie(i,0,n);case"quarter":case"month":je(i,1,n);case"week":case"isoWeek":case"day":case"date":Pe(i,0,n);case"hours":Ee(i,0,n);case"minutes":Te(i,0,n);case"seconds":Re(i,0,n)}return"week"===t&&Qt(i,0,{isUTC:n}),"isoWeek"===t&&en(i,1),"quarter"===t&&Ie(i,3*Math.floor(te(i,n)/3),n),i}function nn(e,t,n){var i=t;return"date"===i&&(i="day"),Bt(Wt(tn(e,i,n),1,"isoWeek"===i?"week":i,n),1,"milliseconds",n)}function rn(e){var t=+tn(e,"day")-+tn(e,"year");return Math.round(t/864e5)+1}function on(e,t,n){var i=t-n+7;return-((I(e,0,i).getUTCDay()-t+7)%7)+i-1}function sn(e,t,n,i,r){var o,s,a=1+7*(t-1)+(7+n-i)%7+on(e,i,r);return a<=0?s=we(o=e-1)+a:a>we(e)?(o=e+1,s=a-we(e)):(o=e,s=a),{year:o,dayOfYear:s}}function an(e,t,n){var i,r,o=on(ne(e),t,n),s=Math.floor((rn(e)-o-1)/7)+1;return s<1?i=s+cn(r=ne(e)-1,t,n):s>cn(ne(e),t,n)?(i=s-cn(ne(e),t,n),r=ne(e)+1):(r=ne(e),i=s),{week:i,year:r}}function cn(e,t,n){var i=on(e,t,n),r=on(e+1,t,n);return(we(e)-i+r)/7}function un(e,t){return t.length-e.length}function ln(e,t,n){var i,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(i=0;i<r;i++)(n&&e[i]!==t[i]||!n&&W(e[i])!==W(t[i]))&&s++;return s+o}function pn(e){return e?e.toLowerCase().replace("_","-"):e}function hn(e){for(var t,n,i=0;i<e.length;){var r=pn(e[i]).split("-"),o=r.length;for(t=(t=pn(e[i+1]))?t.split("-"):null;o>0;){if(n=fn(r.slice(0,o).join("-")))return n;if(t&&t.length>=o&&ln(r,t,!0)>=o-1)break;o--}i++}return null}function dn(e,t){var n=Object.assign({},e);for(var i in t)V(t,i)&&(Y(e[i])&&Y(t[i])?(n[i]={},Object.assign(n[i],e[i]),Object.assign(n[i],t[i])):null!=t[i]?n[i]=t[i]:delete n[i]);var r;for(r in e)V(e,r)&&!V(t,r)&&Y(e[r])&&(n[r]=Object.assign({},n[r]));return n}function fn(e){return to[e]||console.error('Khronos locale error: please load locale "'+e+'" before using it'),to[e]}function mn(e,t){var n;return e&&(U(t)?n=yn(e):j(e)&&(n=_n(e,t)),n&&(zr=n)),zr&&zr._abbr}function _n(e,t){if(null===t)return delete to[e],zr=yn("en"),null;if(t){var n=eo;if(t.abbr=e,null!=t.parentLocale){if(null==to[t.parentLocale])return no[t.parentLocale]||(no[t.parentLocale]=[]),no[t.parentLocale].push({name:e,config:t}),null;n=to[t.parentLocale]._config}return to[e]=new Xr(dn(n,t)),no[e]&&no[e].forEach(function(e){_n(e.name,e.config)}),mn(e),to[e]}}function yn(e){return e?hn(F(e)?e:[e]):zr}function gn(e){return function(e,t){var n=" __"+t+"Value";Object.defineProperty(e,t,{get:function(){return this[n]},set:function(e){var i=this[n];this[n]=e,i!==e&&this[t+"Change"]&&this[t+"Change"].emit(e)}})}}function vn(e){!t.isDevMode()||Co||e in Do||(Do[e]=!0,console.warn(e))}function bn(){try{return zo.apply(this,arguments)}catch(e){return Zo.errorObject.e=e,Zo.errorObject}}function wn(e){return e.reduce(function(e,t){return e.concat(t instanceof Ko.UnsubscriptionError?t.errors:t)},[])}function kn(e,t){return oe(e,t.firstDayOfWeek)?e:Oe(e,{day:-Sn(X(e),t.firstDayOfWeek)})}function Sn(e,t){if(0===t)return e;var n=e-t%7;return n<0?n+7:n}function Dn(e,t,n){var i=t&&Nt(nn(e,"month"),t,"day"),r=n&&Lt(tn(e,"month"),n,"day");return i||r}function Cn(e,t,n){var i=t&&Nt(nn(e,"year"),t,"day"),r=n&&Lt(tn(e,"year"),n,"day");return i||r}function On(e,t){for(var n=e.initialDate,i=new Array(e.height),r=0;r<e.height;r++){i[r]=new Array(e.width);for(var o=0;o<e.width;o++)i[r][o]=t(n),n=Oe(n,e.shift)}return i}function xn(e,t){var n=re(e),i=kn(n,t);return{daysMatrix:On({width:t.width,height:t.height,initialDate:i,shift:{day:1}},function(e){return e}),month:n}}function Mn(e,t,n){return{month:e.month,monthTitle:vt(e.month,t.monthTitle,t.locale),yearTitle:vt(e.month,t.yearTitle,t.locale),weekNumbers:In(e.daysMatrix,t.weekNumbers,t.locale),weekdays:Pn(t.locale),weeks:e.daysMatrix.map(function(e,i){return{days:e.map(function(e,r){return{date:e,label:vt(e,t.dayLabel,t.locale),monthIndex:n,weekIndex:i,dayIndex:r}})}})}}function In(e,t,n){return e.map(function(e){return e[0]?vt(e[0],t,n):""})}function Pn(e){var t=yn(e),n=t.weekdaysShort(),i=t.firstDayOfWeek();return n.slice(i).concat(n.slice(0,i))}function En(e,t){return e.weeks.forEach(function(n,i){n.days.forEach(function(i,r){var o=!se(i.date,e.month),s=!o&&ce(i.date,t.hoveredDate),a=!o&&t.selectedRange&&ce(i.date,t.selectedRange[0]),c=!o&&t.selectedRange&&ce(i.date,t.selectedRange[1]),u=!o&&ce(i.date,t.selectedDate)||a||c,l=!o&&t.selectedRange&&Tn(i.date,t.selectedRange,t.hoveredDate),p=t.isDisabled||Nt(i.date,t.minDate,"day")||Lt(i.date,t.maxDate,"day"),h=Object.assign({},i,{isOtherMonth:o,isHovered:s,isSelected:u,isSelectionStart:a,isSelectionEnd:c,isInRange:l,isDisabled:p});i.isOtherMonth===h.isOtherMonth&&i.isHovered===h.isHovered&&i.isSelected===h.isSelected&&i.isSelectionStart===h.isSelectionStart&&i.isSelectionEnd===h.isSelectionEnd&&i.isDisabled===h.isDisabled&&i.isInRange===h.isInRange||(n.days[r]=h)})}),e.hideLeftArrow=t.isDisabled||t.monthIndex>0&&t.monthIndex!==t.displayMonths,e.hideRightArrow=t.isDisabled||t.monthIndex<t.displayMonths&&t.monthIndex+1!==t.displayMonths,e.disableLeftArrow=Dn(Oe(e.month,{month:-1}),t.minDate,t.maxDate),e.disableRightArrow=Dn(Oe(e.month,{month:1}),t.minDate,t.maxDate),e}function Tn(e,t,n){return!(!e||!t[0])&&(t[1]?e>t[0]&&e<=t[1]:!!n&&(e>t[0]&&e<=n))}function Rn(e){return!0}function jn(e,t){var n=tn(e,"year");return{months:On({width:ds,height:hs,initialDate:n,shift:fs},function(e){return{date:e,label:vt(e,t.monthLabel,t.locale)}}),monthTitle:"",yearTitle:vt(e,t.yearTitle,t.locale)}}function An(e,t){return e.months.forEach(function(n,i){n.forEach(function(n,r){var o=se(n.date,t.hoveredMonth),s=t.isDisabled||Dn(n.date,t.minDate,t.maxDate),a=Object.assign(n,{isHovered:o,isDisabled:s});n.isHovered===a.isHovered&&n.isDisabled===a.isDisabled||(e.months[i][r]=a)})}),e.hideLeftArrow=t.monthIndex>0&&t.monthIndex!==t.displayMonths,e.hideRightArrow=t.monthIndex<t.displayMonths&&t.monthIndex+1!==t.displayMonths,e.disableLeftArrow=Cn(Oe(e.months[0][0].date,{year:-1}),t.minDate,t.maxDate),e.disableRightArrow=Cn(Oe(e.months[0][0].date,{year:1}),t.minDate,t.maxDate),e}function Hn(e,t){var n=Oe(e,{year:gs}),i=On({width:_s,height:ms,initialDate:n,shift:vs},function(e){return{date:e,label:vt(e,t.yearLabel,t.locale)}});return{years:i,monthTitle:"",yearTitle:Ln(i,t)}}function Ln(e,t){return vt(e[0][0].date,t.yearTitle,t.locale)+" - "+vt(e[ms-1][_s-1].date,t.yearTitle,t.locale)}function Nn(e,t){e.years.forEach(function(n,i){n.forEach(function(n,r){var o=ae(n.date,t.hoveredYear),s=t.isDisabled||Cn(n.date,t.minDate,t.maxDate),a=Object.assign(n,{isHovered:o,isDisabled:s});n.isHovered===a.isHovered&&n.isDisabled===a.isDisabled||(e.years[i][r]=a)})}),e.hideLeftArrow=t.yearIndex>0&&t.yearIndex!==t.displayMonths,e.hideRightArrow=t.yearIndex<t.displayMonths&&t.yearIndex+1!==t.displayMonths,e.disableLeftArrow=Cn(Oe(e.years[0][0].date,{year:-1}),t.minDate,t.maxDate);var n=e.years.length-1,i=e.years[n].length-1;return e.disableRightArrow=Cn(Oe(e.years[n][i].date,{year:1}),t.minDate,t.maxDate),e}function Fn(e,t){switch(void 0===e&&(e=Ao),t.type){case Mo.CALCULATE:return Vn(e);case Mo.FORMAT:return Yn(e,t);case Mo.FLAG:return zn(e,t);case Mo.NAVIGATE_OFFSET:var n=Oe(tn(e.view.date,"month"),t.payload),i={view:{mode:e.view.mode,date:n}};return Object.assign({},e,i);case Mo.NAVIGATE_TO:var r=t.payload,i={view:{date:n=xe(e.view.date,r.unit),mode:o=r.viewMode}};return Object.assign({},e,i);case Mo.CHANGE_VIEWMODE:if(!Rn(t.payload))return e;i={view:{date:n=e.view.date,mode:o=t.payload}};return Object.assign({},e,i);case Mo.HOVER:return Object.assign({},e,{hoveredDate:t.payload});case Mo.SELECT:var i={selectedDate:t.payload,view:e.view},o=e.view.mode,n=Wn(s=t.payload||e.view.date,e.minDate,e.maxDate);return i.view={mode:o,date:n},Object.assign({},e,i);case Mo.SET_OPTIONS:var i=t.payload,o=e.view.mode,n=Wn(H(i.value)&&i.value||F(i.value)&&H(i.value[0])&&i.value[0]||e.view.date,i.minDate,i.maxDate);return i.view={mode:o,date:n},i.value&&(F(i.value)&&(i.selectedRange=i.value),i.value instanceof Date&&(i.selectedDate=i.value)),Object.assign({},e,i);case Mo.SELECT_RANGE:var i={selectedRange:t.payload,view:e.view},o=e.view.mode,s=t.payload&&t.payload[0]||e.view.date,n=Wn(s,e.minDate,e.maxDate);return i.view={mode:o,date:n},Object.assign({},e,i);case Mo.SET_MIN_DATE:return Object.assign({},e,{minDate:t.payload});case Mo.SET_MAX_DATE:return Object.assign({},e,{maxDate:t.payload});case Mo.SET_IS_DISABLED:return Object.assign({},e,{isDisabled:t.payload});default:return e}}function Vn(e){var t=e.displayMonths,n=e.view.date;if("day"===e.view.mode){e.monthViewOptions.firstDayOfWeek=yn(e.locale).firstDayOfWeek();for(var i=new Array(t),r=0;r<t;r++)i[r]=xn(n,e.monthViewOptions),n=Oe(n,{month:1});return Object.assign({},e,{monthsModel:i})}if("month"===e.view.mode){for(var o=new Array(t),s=0;s<t;s++)o[s]=jn(n,Un(e)),n=Oe(n,{year:1});return Object.assign({},e,{monthsCalendar:o})}if("year"===e.view.mode){for(var a=new Array(t),s=0;s<t;s++)a[s]=Hn(n,Un(e)),n=Oe(n,{year:ys});return Object.assign({},e,{yearsCalendarModel:a})}return e}function Yn(e,t){if("day"===e.view.mode){var n=e.monthsModel.map(function(t,n){return Mn(t,Un(e),n)});return Object.assign({},e,{formattedMonths:n})}var i=e.displayMonths,r=e.view.date;if("month"===e.view.mode){for(var o=new Array(i),s=0;s<i;s++)o[s]=jn(r,Un(e)),r=Oe(r,{year:1});return Object.assign({},e,{monthsCalendar:o})}if("year"===e.view.mode){for(var a=new Array(i),s=0;s<i;s++)a[s]=Hn(r,Un(e)),r=Oe(r,{year:16});return Object.assign({},e,{yearsCalendarModel:a})}return e}function zn(e,t){if("day"===e.view.mode){var n=e.formattedMonths.map(function(t,n){return En(t,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredDate:e.hoveredDate,selectedDate:e.selectedDate,selectedRange:e.selectedRange,displayMonths:e.displayMonths,monthIndex:n})});return Object.assign({},e,{flaggedMonths:n})}if("month"===e.view.mode){var i=e.monthsCalendar.map(function(t,n){return An(t,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredMonth:e.hoveredMonth,displayMonths:e.displayMonths,monthIndex:n})});return Object.assign({},e,{flaggedMonthsCalendar:i})}if("year"===e.view.mode){var r=e.yearsCalendarModel.map(function(t,n){return Nn(t,{isDisabled:e.isDisabled,minDate:e.minDate,maxDate:e.maxDate,hoveredYear:e.hoveredYear,displayMonths:e.displayMonths,yearIndex:n})});return Object.assign({},e,{yearsCalendarFlagged:r})}return e}function Un(e){return{locale:e.locale,monthTitle:e.monthTitle,yearTitle:e.yearTitle,dayLabel:e.dayLabel,monthLabel:e.monthLabel,yearLabel:e.yearLabel,weekNumbers:e.weekNumbers}}function Wn(e,t,n){var i=Array.isArray(e)?e[0]:e;return t&&Lt(t,i,"day")?t:n&&Nt(n,i,"day")?n:i}function Bn(e){return!!e&&(!(e instanceof Date&&isNaN(e.getHours()))&&("string"!=typeof e||Bn(new Date(e))))}function Gn(e,t){return!(e.min&&t<e.min)&&!(e.max&&t>e.max)}function $n(e){return"number"==typeof e?e:parseInt(e,pa)}function Zn(e,t){void 0===t&&(t=!1);var n=$n(e);return isNaN(n)||n<0||n>(t?da:ha)?NaN:n}function qn(e){var t=$n(e);return isNaN(t)||t<0||t>fa?NaN:t}function Jn(e){var t=$n(e);return isNaN(t)||t<0||t>ma?NaN:t}function Kn(e){return"string"==typeof e?new Date(e):e}function Qn(e,t){if(!e)return Qn(ei(new Date,0,0,0),t);var n=e.getHours(),i=e.getMinutes(),r=e.getSeconds();return t.hour&&(n=(n+$n(t.hour))%ha)<0&&(n+=ha),t.minute&&(i+=$n(t.minute)),t.seconds&&(r+=$n(t.seconds)),ei(e,n,i,r)}function Xn(e,t){var n=Zn(t.hour),i=qn(t.minute),r=Jn(t.seconds)||0;return t.isPM&&(n+=da),e?isNaN(n)||isNaN(i)?e:ei(e,n,i,r):isNaN(n)||isNaN(i)?e:ei(new Date,n,i,r)}function ei(e,t,n,i){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),t,n,i,e.getMilliseconds())}function ti(e){var t=e.toString();return t.length>1?t:"0"+t}function ni(e,t){return!isNaN(Zn(e,t))}function ii(e){return!isNaN(qn(e))}function ri(e){return!isNaN(Jn(e))}function oi(e,t,n){var i=Qn(new Date,e);return!(t&&i>t)&&!(n&&i<n)}function si(e,t,n,i){return void 0===t&&(t="0"),void 0===n&&(n="0"),ni(e,i)&&ii(t)&&ri(n)}function ai(e,t){if(e.readonlyInput||e.disabled)return!1;if(t){if("wheel"===t.source&&!e.mousewheel)return!1;if("key"===t.source&&!e.arrowkeys)return!1}return!0}function ci(e,t){return!!e.step&&(!(e.step>0&&!t.canIncrementHours)&&!(e.step<0&&!t.canDecrementHours))}function ui(e,t){return!!e.step&&(!(e.step>0&&!t.canIncrementMinutes)&&!(e.step<0&&!t.canDecrementMinutes))}function li(e,t){return!!e.step&&(!(e.step>0&&!t.canIncrementSeconds)&&!(e.step<0&&!t.canDecrementSeconds))}function pi(e){return{hourStep:e.hourStep,minuteStep:e.minuteStep,secondsStep:e.secondsStep,readonlyInput:e.readonlyInput,disabled:e.disabled,mousewheel:e.mousewheel,arrowkeys:e.arrowkeys,showSpinners:e.showSpinners,showMeridian:e.showMeridian,showSeconds:e.showSeconds,meridians:e.meridians,min:e.min,max:e.max}}function hi(e,t){var n=t.min,i=t.max,r=t.hourStep,o=t.minuteStep,s=t.secondsStep,a=t.showSeconds,c={canIncrementHours:!0,canIncrementMinutes:!0,canIncrementSeconds:!0,canDecrementHours:!0,canDecrementMinutes:!0,canDecrementSeconds:!0,canToggleMeridian:!0};if(!e)return c;if(i){u=Qn(e,{hour:r});if(c.canIncrementHours=i>u,!c.canIncrementHours){l=Qn(e,{minute:o});c.canIncrementMinutes=a?i>l:i>=l}if(!c.canIncrementMinutes){p=Qn(e,{seconds:s});c.canIncrementSeconds=i>=p}e.getHours()<12&&(c.canToggleMeridian=Qn(e,{hour:12})<i)}if(n){var u=Qn(e,{hour:-r});if(c.canDecrementHours=n<u,!c.canDecrementHours){var l=Qn(e,{minute:-o});c.canDecrementMinutes=a?n<l:n<=l}if(!c.canDecrementMinutes){var p=Qn(e,{seconds:-s});c.canDecrementSeconds=n<=p}e.getHours()>=12&&(c.canToggleMeridian=Qn(e,{hour:-12})>n)}return c}function di(e,t){switch(void 0===e&&(e=ya),t.type){case la.WRITE_VALUE:return Object.assign({},e,{value:t.payload});case la.CHANGE_HOURS:if(!ai(e.config,t.payload)||!ci(t.payload,e.controls))return e;n=Qn(e.value,{hour:t.payload.step});return!e.config.max&&!e.config.min||Gn(e.config,n)?Object.assign({},e,{value:n}):e;case la.CHANGE_MINUTES:if(!ai(e.config,t.payload)||!ui(t.payload,e.controls))return e;n=Qn(e.value,{minute:t.payload.step});return!e.config.max&&!e.config.min||Gn(e.config,n)?Object.assign({},e,{value:n}):e;case la.CHANGE_SECONDS:if(!ai(e.config,t.payload)||!li(t.payload,e.controls))return e;n=Qn(e.value,{seconds:t.payload.step});return!e.config.max&&!e.config.min||Gn(e.config,n)?Object.assign({},e,{value:n}):e;case la.SET_TIME_UNIT:if(!ai(e.config))return e;var n=Xn(e.value,t.payload);return Object.assign({},e,{value:n});case la.UPDATE_CONTROLS:var i=hi(e.value,t.payload),r={value:e.value,config:t.payload,controls:i};return e.config.showMeridian!==r.config.showMeridian&&e.value&&(r.value=new Date(e.value)),Object.assign({},e,r);default:return e}}function fi(e){return e?e.replace(/[^A-Za-z0-9\[\] ]/g,function(e){return Oa[e]||e}):""}function mi(e,t,n){void 0===t&&(t=" "),void 0===n&&(n="");for(var i,r="(?:["+n+"])([^"+n+"]+)(?:["+n+"])|([^"+t+"]+)",o=e.split(new RegExp(r,"g")),s=[],a=o.length,c=new RegExp("["+n+"]+","g"),u=0;u<a;u+=1)(i=o[u])&&i.length&&i!==t&&s.push(i.replace(c,""));return s}function _i(e,t){if(!t||"object"!=typeof e)return e.toString();if(t.endsWith("()"))return e[t.slice(0,t.length-2)]().toString();for(var n=0,i=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");n<i.length;n++){var r=i[n];r in e&&(e=e[r])}return e?e.toString():""}function yi(e){return e>1&&e<5&&1!=~~(e/10)}function gi(e,t,n,i){var r=e+" ";switch(n){case"s":return t||i?"pár sekund":"pár sekundami";case"ss":return t||i?r+(yi(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":i?"minutu":"minutou";case"mm":return t||i?r+(yi(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?r+(yi(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||i?"den":"dnem";case"dd":return t||i?r+(yi(e)?"dny":"dní"):r+"dny";case"M":return t||i?"měsíc":"měsícem";case"MM":return t||i?r+(yi(e)?"měsíce":"měsíců"):r+"měsíci";case"y":return t||i?"rok":"rokem";case"yy":return t||i?r+(yi(e)?"roky":"let"):r+"lety"}}function vi(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}function bi(e,t,n,i){var r="";switch(n){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"ss":return i?"sekunnin":"sekuntia";case"m":return i?"minuutin":"minuutti";case"mm":r=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":r=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":r=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":r=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":r=i?"vuoden":"vuotta"}return r=wi(e,i)+" "+r}function wi(e,t){return e<10?t?Za[e]:$a[e]:e}function ki(e,t,n,i){switch(n){case"s":return i||t?"néhány másodperc":"néhány másodperce";case"ss":return e+(i||t?" másodperc":" másodperce");case"m":return"egy"+(i||t?" perc":" perce");case"mm":return e+(i||t?" perc":" perce");case"h":return"egy"+(i||t?" óra":" órája");case"hh":return e+(i||t?" óra":" órája");case"d":return"egy"+(i||t?" nap":" napja");case"dd":return e+(i||t?" nap":" napja");case"M":return"egy"+(i||t?" hónap":" hónapja");case"MM":return e+(i||t?" hónap":" hónapja");case"y":return"egy"+(i||t?" év":" éve");case"yy":return e+(i||t?" év":" éve")}return""}function Si(e,t){return(t?"":"[múlt] ")+"["+Ka[Jt(e)]+"] LT[-kor]"}function Di(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function Ci(e,t,n){var i=e+" ";switch(n){case"ss":return i+(Di(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return i+(Di(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return i+(Di(e)?"godziny":"godzin");case"MM":return i+(Di(e)?"miesiące":"miesięcy");case"yy":return i+(Di(e)?"lata":"lat")}}function Oi(e,t){var n=e.split("_");return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function xi(e,t,n){var i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===n?t?"минута":"минуту":e+" "+Oi(i[n],+e)}var Mi,Ii=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Pi=function(){function e(){this.placement="top",this.triggers="click",this.outsideClick=!1}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),Ei=function(){function e(e,t){this.open=e,this.close=t||e}return e.prototype.isManual=function(){return"manual"===this.open||"manual"===this.close},e}(),Ti={hover:["mouseover","mouseout"],focus:["focusin","focusout"]},Ri=function(){return function(e,t,n){this.nodes=e,this.viewRef=t,this.componentRef=n}}(),ji=function(){function e(e,n,i,r,o,s,a,c){this._viewContainerRef=e,this._renderer=n,this._elementRef=i,this._injector=r,this._componentFactoryResolver=o,this._ngZone=s,this._applicationRef=a,this._posService=c,this.onBeforeShow=new t.EventEmitter,this.onShown=new t.EventEmitter,this.onBeforeHide=new t.EventEmitter,this.onHidden=new t.EventEmitter,this._providers=[],this._isHiding=!1,this._listenOpts={},this._globalListener=Function.prototype}return Object.defineProperty(e.prototype,"isShown",{get:function(){return!this._isHiding&&!!this._componentRef},enumerable:!0,configurable:!0}),e.prototype.attach=function(e){return this._componentFactory=this._componentFactoryResolver.resolveComponentFactory(e),this},e.prototype.to=function(e){return this.container=e||this.container,this},e.prototype.position=function(e){return this.attachment=e.attachment||this.attachment,this._elementRef=e.target||this._elementRef,this},e.prototype.provide=function(e){return this._providers.push(e),this},e.prototype.show=function(e){if(void 0===e&&(e={}),this._subscribePositioning(),this._innerComponent=null,!this._componentRef){this.onBeforeShow.emit(),this._contentRef=this._getContentRef(e.content,e.context,e.initialState);var n=t.ReflectiveInjector.resolveAndCreate(this._providers,this._injector);this._componentRef=this._componentFactory.create(n,this._contentRef.nodes),this._applicationRef.attachView(this._componentRef.hostView),this.instance=this._componentRef.instance,Object.assign(this._componentRef.instance,e),this.container instanceof t.ElementRef&&this.container.nativeElement.appendChild(this._componentRef.location.nativeElement),"body"===this.container&&"undefined"!=typeof document&&document.querySelector(this.container).appendChild(this._componentRef.location.nativeElement),!this.container&&this._elementRef&&this._elementRef.nativeElement.parentElement&&this._elementRef.nativeElement.parentElement.appendChild(this._componentRef.location.nativeElement),this._contentRef.componentRef&&(this._innerComponent=this._contentRef.componentRef.instance,this._contentRef.componentRef.changeDetectorRef.markForCheck(),this._contentRef.componentRef.changeDetectorRef.detectChanges()),this._componentRef.changeDetectorRef.markForCheck(),this._componentRef.changeDetectorRef.detectChanges(),this.onShown.emit(this._componentRef.instance)}return this._registerOutsideClick(),this._componentRef},e.prototype.hide=function(){if(!this._componentRef)return this;this.onBeforeHide.emit(this._componentRef.instance);var e=this._componentRef.location.nativeElement;return e.parentNode.removeChild(e),this._contentRef.componentRef&&this._contentRef.componentRef.destroy(),this._componentRef.destroy(),this._viewContainerRef&&this._contentRef.viewRef&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._contentRef.viewRef)),this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._contentRef=null,this._componentRef=null,this._removeGlobalListener(),this.onHidden.emit(),this},e.prototype.toggle=function(){this.isShown?this.hide():this.show()},e.prototype.dispose=function(){this.isShown&&this.hide(),this._unsubscribePositioning(),this._unregisterListenersFn&&this._unregisterListenersFn()},e.prototype.listen=function(e){var t=this;this.triggers=e.triggers||this.triggers,this._listenOpts.outsideClick=e.outsideClick,e.target=e.target||this._elementRef.nativeElement;var n=this._listenOpts.hide=function(){return e.hide?e.hide():void t.hide()},i=this._listenOpts.show=function(n){e.show?e.show(n):t.show(n),n()};return this._unregisterListenersFn=S(this._renderer,{target:e.target,triggers:e.triggers,show:i,hide:n,toggle:function(e){t.isShown?n():i(e)}}),this},e.prototype._removeGlobalListener=function(){this._globalListener&&(this._globalListener(),this._globalListener=null)},e.prototype.attachInline=function(e,t){return this._inlineViewRef=e.createEmbeddedView(t),this},e.prototype._registerOutsideClick=function(){var e=this;if(this._componentRef&&this._componentRef.location&&this._listenOpts.outsideClick){var t=this._componentRef.location.nativeElement;setTimeout(function(){e._globalListener=D(e._renderer,{targets:[t,e._elementRef.nativeElement],outsideClick:e._listenOpts.outsideClick,hide:function(){return e._listenOpts.hide()}})})}},e.prototype.getInnerComponent=function(){return this._innerComponent},e.prototype._subscribePositioning=function(){var e=this;!this._zoneSubscription&&this.attachment&&(this._zoneSubscription=this._ngZone.onStable.subscribe(function(){e._componentRef&&e._posService.position({element:e._componentRef.location,target:e._elementRef,attachment:e.attachment,appendToBody:"body"===e.container})}))},e.prototype._unsubscribePositioning=function(){this._zoneSubscription&&(this._zoneSubscription.unsubscribe(),this._zoneSubscription=null)},e.prototype._getContentRef=function(e,n,i){if(!e)return new Ri([]);if(e instanceof t.TemplateRef){if(this._viewContainerRef){var r=this._viewContainerRef.createEmbeddedView(e,n);return r.markForCheck(),new Ri([r.rootNodes],r)}var o=e.createEmbeddedView({});return this._applicationRef.attachView(o),new Ri([o.rootNodes],o)}if("function"==typeof e){var s=this._componentFactoryResolver.resolveComponentFactory(e),a=t.ReflectiveInjector.resolveAndCreate(this._providers.slice(),this._injector),c=s.create(a);return Object.assign(c.instance,i),this._applicationRef.attachView(c.hostView),new Ri([[c.location.nativeElement]],c.hostView,c)}return new Ri([[this._renderer.createText(""+e)]])},e}(),Ai=new(function(){function e(){}return e.prototype.position=function(e,t){void 0===t&&(t=!0);var n,i={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(e,"position")){var r=e.getBoundingClientRect();n={width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}else{var o=this.offsetParent(e);n=this.offset(e,!1),o!==document.documentElement&&(i=this.offset(o,!1)),i.top+=o.clientTop,i.left+=o.clientLeft}return n.top-=i.top,n.bottom-=i.top,n.left-=i.left,n.right-=i.left,t&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n},e.prototype.offset=function(e,t){void 0===t&&(t=!0);var n=e.getBoundingClientRect(),i={top:window.pageYOffset-document.documentElement.clientTop,left:window.pageXOffset-document.documentElement.clientLeft},r={height:n.height||e.offsetHeight,width:n.width||e.offsetWidth,top:n.top+i.top,bottom:n.bottom+i.top,left:n.left+i.left,right:n.right+i.left};return t&&(r.height=Math.round(r.height),r.width=Math.round(r.width),r.top=Math.round(r.top),r.bottom=Math.round(r.bottom),r.left=Math.round(r.left),r.right=Math.round(r.right)),r},e.prototype.positionElements=function(e,t,n,i){var r=i?this.offset(e,!1):this.position(e,!1),o=this.getAllStyles(t),s={left:r.left,center:r.left+r.width/2-t.offsetWidth/2,right:r.left+r.width},a={top:r.top,center:r.top+r.height/2-t.offsetHeight/2,bottom:r.top+r.height},c=t.getBoundingClientRect(),u=n.split(" ")[0]||"top",l=n.split(" ")[1]||"center",p={height:c.height||t.offsetHeight,width:c.width||t.offsetWidth,top:0,bottom:c.height||t.offsetHeight,left:0,right:c.width||t.offsetWidth};if("auto"===u){var h=this.autoPosition(p,r,t,l);h||(h=this.autoPosition(p,r,t)),h&&(u=h),t.classList.add(u)}switch(u){case"top":p.top=r.top-(t.offsetHeight+parseFloat(o.marginBottom)),p.bottom+=r.top-t.offsetHeight,p.left=s[l],p.right+=s[l];break;case"bottom":p.top=a[u],p.bottom+=a[u],p.left=s[l],p.right+=s[l];break;case"left":p.top=a[l],p.bottom+=a[l],p.left=r.left-(t.offsetWidth+parseFloat(o.marginRight)),p.right+=r.left-t.offsetWidth;break;case"right":p.top=a[l],p.bottom+=a[l],p.left=s[u],p.right+=s[u]}return p.top=Math.round(p.top),p.bottom=Math.round(p.bottom),p.left=Math.round(p.left),p.right=Math.round(p.right),p},e.prototype.autoPosition=function(e,t,n,i){return(!i||"right"===i)&&e.left+t.left-n.offsetWidth<0?"right":(!i||"top"===i)&&e.bottom+t.bottom+n.offsetHeight>window.innerHeight?"top":(!i||"bottom"===i)&&e.top+t.top-n.offsetHeight<0?"bottom":(!i||"left"===i)&&e.right+t.right+n.offsetWidth>window.innerWidth?"left":null},e.prototype.getAllStyles=function(e){return window.getComputedStyle(e)},e.prototype.getStyle=function(e,t){return this.getAllStyles(e)[t]},e.prototype.isStaticPositioned=function(e){return"static"===(this.getStyle(e,"position")||"static")},e.prototype.offsetParent=function(e){for(var t=e.offsetParent||document.documentElement;t&&t!==document.documentElement&&this.isStaticPositioned(t);)t=t.offsetParent;return t||document.documentElement},e}()),Hi=function(){function e(){}return e.prototype.position=function(e){var t=e.element,n=e.target,i=e.attachment,r=e.appendToBody;C(O(n),O(t),i,r)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),Li=function(){function e(e,t,n,i,r){this._componentFactoryResolver=e,this._ngZone=t,this._injector=n,this._posService=i,this._applicationRef=r}return e.prototype.createLoader=function(e,t,n){return new ji(t,n,e,this._injector,this._componentFactoryResolver,this._ngZone,this._applicationRef,this._posService)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.NgZone},{type:t.Injector},{type:Hi},{type:t.ApplicationRef}]},e}(),Ni="undefined"!=typeof window&&window||{},Fi=Ni.document,Vi=(Ni.location,Ni.gc,Ni.performance&&Ni.performance,Ni.Event,Ni.MouseEvent,Ni.KeyboardEvent,Ni.EventTarget,Ni.History,Ni.Location,Ni.EventListener,function(){function e(e){Object.assign(this,e)}return Object.defineProperty(e.prototype,"isBs3",{get:function(){return M()},enumerable:!0,configurable:!0}),e.decorators=[{type:t.Component,args:[{selector:"popover-container",changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[class]":'"popover in popover-" + placement + " " + "bs-popover-" + placement + " " + placement + " " + containerClass',"[class.show]":"!isBs3",role:"tooltip",style:"display:block;"},styles:["\n :host.bs-popover-top .arrow, :host.bs-popover-bottom .arrow {\n left: 50%;\n margin-left: -8px;\n }\n :host.bs-popover-left .arrow, :host.bs-popover-right .arrow {\n top: 50%;\n margin-top: -8px;\n }\n "],template:'<div class="popover-arrow arrow"></div> <h3 class="popover-title popover-header" *ngIf="title">{{ title }}</h3> <div class="popover-content popover-body"> <ng-content></ng-content> </div> '}]}],e.ctorParameters=function(){return[{type:Pi}]},e.propDecorators={placement:[{type:t.Input}],title:[{type:t.Input}]},e}()),Yi=function(){function e(e,t,n,i,r){this.outsideClick=!1,this.containerClass="",this._isInited=!1,this._popover=r.createLoader(e,n,t).provide({provide:Pi,useValue:i}),Object.assign(this,i),this.onShown=this._popover.onShown,this.onHidden=this._popover.onHidden,"undefined"!=typeof window&&e.nativeElement.addEventListener("click",function(){try{e.nativeElement.focus()}catch(t){return}})}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._popover.isShown},set:function(e){e?this.show():this.hide()},enumerable:!0,configurable:!0}),e.prototype.show=function(){!this._popover.isShown&&this.popover&&(this._popover.attach(Vi).to(this.container).position({attachment:this.placement}).show({content:this.popover,context:this.popoverContext,placement:this.placement,title:this.popoverTitle,containerClass:this.containerClass}),this.isOpen=!0)},e.prototype.hide=function(){this.isOpen&&(this._popover.hide(),this.isOpen=!1)},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.ngOnInit=function(){var e=this;this._isInited||(this._isInited=!0,this._popover.listen({triggers:this.triggers,outsideClick:this.outsideClick,show:function(){return e.show()}}))},e.prototype.ngOnDestroy=function(){this._popover.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"[popover]",exportAs:"bs-popover"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:Pi},{type:Li}]},e.propDecorators={popover:[{type:t.Input}],popoverContext:[{type:t.Input}],popoverTitle:[{type:t.Input}],placement:[{type:t.Input}],outsideClick:[{type:t.Input}],triggers:[{type:t.Input}],container:[{type:t.Input}],containerClass:[{type:t.Input}],isOpen:[{type:t.Input}],onShown:[{type:t.Output}],onHidden:[{type:t.Output}]},e}(),zi=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[Pi,Li,Hi]}},e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],declarations:[Yi,Vi],exports:[Yi],entryComponents:[Vi]}]}],e.ctorParameters=function(){return[]},e}(),Ui={},Wi={},Bi=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Gi=/\d/,$i=/\d\d/,Zi=/\d{3}/,qi=/\d{4}/,Ji=/[+-]?\d{6}/,Ki=/\d\d?/,Qi=/\d\d\d\d?/,Xi=/\d\d\d\d\d\d?/,er=/\d{1,3}/,tr=/\d{1,4}/,nr=/[+-]?\d{1,6}/,ir=/\d+/,rr=/[+-]?\d+/,or=/Z|[+-]\d\d(?::?\d\d)?/gi,sr=/[+-]?\d+(\.\d{1,3})?/,ar=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,cr={},ur={},lr=0,pr=1,hr=2,dr=3,fr=4,mr=5,_r=6,yr=7,gr=8,vr={},br={date:"day",hour:"hours",minute:"minutes",second:"seconds",millisecond:"milliseconds"};B("Y",null,null,function(e,t){var n=ne(e,t.isUTC);return n<=9999?n.toString(10):"+"+n}),B(null,["YY",2,!1],null,function(e,t){return(ne(e,t.isUTC)%100).toString(10)}),B(null,["YYYY",4,!1],null,ve),B(null,["YYYYY",5,!1],null,ve),B(null,["YYYYYY",6,!0],null,ve),_e("year","y"),ue("Y",rr),ue("YY",Ki,$i),ue("YYYY",tr,qi),ue("YYYYY",nr,Ji),ue("YYYYYY",nr,Ji),de(["YYYYY","YYYYYY"],lr),de("YYYY",function(e,t,n){return t[lr]=2===e.length?be(e):W(e),n}),de("YY",function(e,t,n){return t[lr]=be(e),n}),de("Y",function(e,t,n){return t[lr]=parseInt(e,10),n}),B("M",["MM",2,!1],"Mo",function(e,t){return(te(e,t.isUTC)+1).toString(10)}),B("MMM",null,null,function(e,t){return t.locale.monthsShort(e,t.format,t.isUTC)}),B("MMMM",null,null,function(e,t){return t.locale.months(e,t.format,t.isUTC)}),_e("month","M"),ue("M",Ki),ue("MM",Ki,$i),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),de(["M","MM"],function(e,t,n){return t[pr]=W(e)-1,n}),de(["MMM","MMMM"],function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);return null!=r?t[pr]=r:De(n).invalidMonth=!!e,n});var wr={year:0,month:0,day:0,hour:0,minute:0,seconds:0},kr=["year","quarter","month","week","day","hours","minutes","seconds","milliseconds"],Sr=kr.reduce(function(e,t){return e[t]=!0,e},{}),Dr=Math.round,Cr={ss:44,s:45,m:45,h:22,d:26,M:11},Or=function(){function e(e,t){void 0===t&&(t={}),this._data={},this._locale=yn(),this._locale=t&&t._locale||yn();var n=e,i=n.year||0,r=n.quarter||0,o=n.month||0,s=n.week||0,a=n.day||0,c=n.hours||0,u=n.minutes||0,l=n.seconds||0,p=n.milliseconds||0;return this._isValid=Le(n),this._milliseconds=+p+1e3*l+60*u*1e3+1e3*c*60*60,this._days=+a+7*s,this._months=+o+3*r+12*i,Fe(this)}return e.prototype.isValid=function(){return this._isValid},e.prototype.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate;var t=this.localeData(),n=Ue(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},e.prototype.localeData=function(){return this._locale},e.prototype.locale=function(e){return e?(this._locale=yn(e)||this._locale,this):this._locale._abbr},e.prototype.abs=function(){var e=Math.abs,t=this._data;return this._milliseconds=e(this._milliseconds),this._days=e(this._days),this._months=e(this._months),t.milliseconds=e(t.milliseconds),t.seconds=e(t.seconds),t.minutes=e(t.minutes),t.hours=e(t.hours),t.month=e(t.month),t.year=e(t.year),this},e.prototype.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds,r=ye(e);if("month"===r||"year"===r)return t=this._days+i/864e5,n=this._months+Ve(t),"month"===r?n:n/12;switch(t=this._days+Math.round(Ye(this._months)),r){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hours":return 24*t+i/36e5;case"minutes":return 1440*t+i/6e4;case"seconds":return 86400*t+i/1e3;case"milliseconds":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+r)}},e.prototype.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*W(this._months/12):NaN},e}(),xr=function(e){return e instanceof Date&&!isNaN(+e)},Mr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ir=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Pr=/Z|[+-]\d\d(?::?\d\d)?/,Er=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/,!0],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/,!0],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/,!0],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/,!0],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/,!0],["YYYYMMDD",/\d{8}/,!0],["GGGG[W]WWE",/\d{4}W\d{3}/,!0],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/,!0]],Tr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Rr=/^\/?Date\((\-?\d+)/i,jr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480},Ar=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;B("D",["DD",2,!1],"Do",function(e,t){return ee(e,t.isUTC).toString(10)}),_e("date","D"),ue("D",Ki),ue("DD",Ki,$i),ue("Do",function(e,t){return t._dayOfMonthOrdinalParse||t._ordinalParse}),de(["D","DD"],hr),de("Do",function(e,t,n){return t[hr]=W(e.match(Ki)[0]),n}),B("H",["HH",2,!1],null,function(e,t){return Z(e,t.isUTC).toString(10)}),B("h",["hh",2,!1],null,function(e,t){return nt(e,t.isUTC).toString(10)}),B("k",["kk",2,!1],null,function(e,t){return it(e,t.isUTC).toString(10)}),B("hmm",null,null,function(e,t){return""+nt(e,t.isUTC)+E(q(e,t.isUTC),2)}),B("hmmss",null,null,function(e,t){return""+nt(e,t.isUTC)+E(q(e,t.isUTC),2)+E(J(e,t.isUTC),2)}),B("Hmm",null,null,function(e,t){return""+Z(e,t.isUTC)+E(q(e,t.isUTC),2)}),B("Hmmss",null,null,function(e,t){return""+Z(e,t.isUTC)+E(q(e,t.isUTC),2)+E(J(e,t.isUTC),2)}),rt("a",!0),rt("A",!1),_e("hour","h"),ue("a",ot),ue("A",ot),ue("H",Ki),ue("h",Ki),ue("k",Ki),ue("HH",Ki,$i),ue("hh",Ki,$i),ue("kk",Ki,$i),ue("hmm",Qi),ue("hmmss",Xi),ue("Hmm",Qi),ue("Hmmss",Xi),de(["H","HH"],dr),de(["k","kk"],function(e,t,n){var i=W(e);return t[dr]=24===i?0:i,n}),de(["a","A"],function(e,t,n){return n._isPm=n._locale.isPM(e),n._meridiem=e,n}),de(["h","hh"],function(e,t,n){return t[dr]=W(e),De(n).bigHour=!0,n}),de("hmm",function(e,t,n){var i=e.length-2;return t[dr]=W(e.substr(0,i)),t[fr]=W(e.substr(i)),De(n).bigHour=!0,n}),de("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;return t[dr]=W(e.substr(0,i)),t[fr]=W(e.substr(i,2)),t[mr]=W(e.substr(r)),De(n).bigHour=!0,n}),de("Hmm",function(e,t,n){var i=e.length-2;return t[dr]=W(e.substr(0,i)),t[fr]=W(e.substr(i)),n}),de("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;return t[dr]=W(e.substr(0,i)),t[fr]=W(e.substr(i,2)),t[mr]=W(e.substr(r)),n}),B("S",null,null,function(e,t){return(~~(K(e,t.isUTC)/100)).toString(10)}),B(null,["SS",2,!1],null,function(e,t){return(~~(K(e,t.isUTC)/10)).toString(10)}),B(null,["SSS",3,!1],null,function(e,t){return K(e,t.isUTC).toString(10)}),B(null,["SSSS",4,!1],null,function(e,t){return(10*K(e,t.isUTC)).toString(10)}),B(null,["SSSSS",5,!1],null,function(e,t){return(100*K(e,t.isUTC)).toString(10)}),B(null,["SSSSSS",6,!1],null,function(e,t){return(1e3*K(e,t.isUTC)).toString(10)}),B(null,["SSSSSSS",7,!1],null,function(e,t){return(1e4*K(e,t.isUTC)).toString(10)}),B(null,["SSSSSSSS",8,!1],null,function(e,t){return(1e5*K(e,t.isUTC)).toString(10)}),B(null,["SSSSSSSSS",9,!1],null,function(e,t){return(1e6*K(e,t.isUTC)).toString(10)}),_e("millisecond","ms"),ue("S",er,Gi),ue("SS",er,$i),ue("SSS",er,Zi);var Hr;for(Hr="SSSS";Hr.length<=9;Hr+="S")ue(Hr,ir);for(Hr="S";Hr.length<=9;Hr+="S")de(Hr,function(e,t,n){return t[_r]=W(1e3*parseFloat("0."+e)),n});B("m",["mm",2,!1],null,function(e,t){return q(e,t.isUTC).toString(10)}),_e("minute","m"),ue("m",Ki),ue("mm",Ki,$i),de(["m","mm"],fr),st("Z",":"),st("ZZ",""),ue("Z",or),ue("ZZ",or),de(["Z","ZZ"],function(e,t,n){return n._useUTC=!0,n._tzm=at(or,e),n});var Lr=/([\+\-]|\d\d)/gi;B("Q",null,"Qo",function(e,t){return pt(e,t.isUTC).toString(10)}),_e("quarter","Q"),ue("Q",Gi),de("Q",function(e,t,n){return t[pr]=3*(W(e)-1),n}),B("s",["ss",2,!1],null,function(e,t){return J(e,t.isUTC).toString(10)}),_e("second","s"),ue("s",Ki),ue("ss",Ki,$i),de(["s","ss"],mr),B("X",null,null,function(e){return ie(e).toString(10)}),B("x",null,null,function(e){return e.valueOf().toString(10)}),ue("x",rr),ue("X",sr),de("X",function(e,t,n){return n._d=new Date(1e3*parseFloat(e)),n}),de("x",function(e,t,n){return n._d=new Date(W(e)),n}),B("w",["ww",2,!1],"wo",function(e,t){return ht(e,t.locale).toString(10)}),B("W",["WW",2,!1],"Wo",function(e){return dt(e).toString(10)}),_e("week","w"),_e("isoWeek","W"),ue("w",Ki),ue("ww",Ki,$i),ue("W",Ki),ue("WW",Ki,$i),fe(["w","ww","W","WW"],function(e,t,n,i){return t[i.substr(0,1)]=W(e),n}),B(null,["gg",2,!1],null,function(e,t){return(yt(e,t.locale)%100).toString()}),B(null,["GG",2,!1],null,function(e){return(gt(e)%100).toString()}),ft("gggg",mt),ft("ggggg",mt),ft("GGGG",_t),ft("GGGGG",_t),_e("weekYear","gg"),_e("isoWeekYear","GG"),ue("G",rr),ue("g",rr),ue("GG",Ki,$i),ue("gg",Ki,$i),ue("GGGG",tr,qi),ue("gggg",tr,qi),ue("GGGGG",nr,Ji),ue("ggggg",nr,Ji),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){return t[i.substr(0,2)]=W(e),n}),fe(["gg","GG"],function(e,t,n,i){return t[i]=be(e),n});var Nr="ISO_8601",Fr="RFC_2822",Vr=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Yr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;B("d",null,"do",function(e,t){return X(e,t.isUTC).toString(10)}),B("dd",null,null,function(e,t){return t.locale.weekdaysMin(e,t.format,t.isUTC)}),B("ddd",null,null,function(e,t){return t.locale.weekdaysShort(e,t.format,t.isUTC)}),B("dddd",null,null,function(e,t){return t.locale.weekdays(e,t.format,t.isUTC)}),B("e",null,null,function(e,t){return Kt(e,t.locale,t.isUTC).toString(10)}),B("E",null,null,function(e,t){return Xt(e,t.isUTC).toString(10)}),_e("day","d"),_e("weekday","e"),_e("isoWeekday","E"),ue("d",Ki),ue("e",Ki),ue("E",Ki),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);return null!=r?t.d=r:De(n).invalidWeekday=!!e,n}),fe(["d","e","E"],function(e,t,n,i){return t[i]=W(e),n}),B("DDD",["DDDD",3,!1],"DDDo",function(e){return rn(e).toString(10)}),_e("dayOfYear","DDD"),ue("DDD",er),ue("DDDD",Zi),de(["DDD","DDDD"],function(e,t,n){return n._dayOfYear=W(e),n});var zr,Ur=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Wr="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Br="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Gr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$r="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Zr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Jr=/\d{1,2}/,Kr=ar,Qr=ar,Xr=function(){function e(e){e&&this.set(e)}return e.prototype.set=function(e){var t;for(t in e)if(e.hasOwnProperty(t)){var n=e[t];this[L(n)?t:"_"+t]=n}this._config=e},e.prototype.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return L(i)?i.call(null,t,n):i},e.prototype.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},Object.defineProperty(e.prototype,"invalidDate",{get:function(){return this._invalidDate},set:function(e){this._invalidDate=e},enumerable:!0,configurable:!0}),e.prototype.ordinal=function(e,t){return this._ordinal.replace("%d",e.toString(10))},e.prototype.preparse=function(e){return e},e.prototype.postformat=function(e){return e},e.prototype.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return L(r)?r(e,t,n,i):r.replace(/%d/i,e.toString(10))},e.prototype.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return L(n)?n(t):n.replace(/%s/i,t)},e.prototype.months=function(e,t,n){if(void 0===n&&(n=!1),!e)return F(this._months)?this._months:this._months.standalone;if(F(this._months))return this._months[te(e,n)];var i=(this._months.isFormat||Ur).test(t)?"format":"standalone";return this._months[i][te(e,n)]},e.prototype.monthsShort=function(e,t,n){if(void 0===n&&(n=!1),!e)return F(this._monthsShort)?this._monthsShort:this._monthsShort.standalone;if(F(this._monthsShort))return this._monthsShort[te(e,n)];var i=Ur.test(t)?"format":"standalone";return this._monthsShort[i][te(e,n)]},e.prototype.monthsParse=function(e,t,n){var i,r;if(this._monthsParseExact)return this.handleMonthStrictParse(e,t,n);this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);var o;for(o=0;o<12;o++){if(i=new Date(Date.UTC(2e3,o)),n&&!this._longMonthsParse[o]){var s=this.months(i,"").replace(".",""),a=this.monthsShort(i,"").replace(".","");this._longMonthsParse[o]=new RegExp("^"+s+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+a+"$","i")}if(n||this._monthsParse[o]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[o].test(e))return o;if(n&&"MMM"===t&&this._shortMonthsParse[o].test(e))return o;if(!n&&this._monthsParse[o].test(e))return o}},e.prototype.monthsRegex=function(e){return this._monthsParseExact?(V(this,"_monthsRegex")||this.computeMonthsParse(),e?this._monthsStrictRegex:this._monthsRegex):(V(this,"_monthsRegex")||(this._monthsRegex=Qr),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},e.prototype.monthsShortRegex=function(e){return this._monthsParseExact?(V(this,"_monthsRegex")||this.computeMonthsParse(),e?this._monthsShortStrictRegex:this._monthsShortRegex):(V(this,"_monthsShortRegex")||(this._monthsShortRegex=Kr),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},e.prototype.week=function(e){return an(e,this._week.dow,this._week.doy).week},e.prototype.firstDayOfWeek=function(){return this._week.dow},e.prototype.firstDayOfYear=function(){return this._week.doy},e.prototype.weekdays=function(e,t,n){if(!e)return F(this._weekdays)?this._weekdays:this._weekdays.standalone;if(F(this._weekdays))return this._weekdays[X(e,n)];var i=this._weekdays.isFormat.test(t)?"format":"standalone";return this._weekdays[i][X(e,n)]},e.prototype.weekdaysMin=function(e,t,n){return e?this._weekdaysMin[X(e,n)]:this._weekdaysMin},e.prototype.weekdaysShort=function(e,t,n){return e?this._weekdaysShort[X(e,n)]:this._weekdaysShort},e.prototype.weekdaysParse=function(e,t,n){var i,r;if(this._weekdaysParseExact)return this.handleWeekStrictParse(e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){var o=qt(new Date(Date.UTC(2e3,1)),i,null,!0);if(n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o).replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o).replace(".",".?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o)+"|^"+this.weekdaysMin(o),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),!(F(this._fullWeekdaysParse)&&F(this._shortWeekdaysParse)&&F(this._minWeekdaysParse)&&F(this._weekdaysParse)))return;if(n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},e.prototype.weekdaysRegex=function(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||this.computeWeekdaysParse(),e?this._weekdaysStrictRegex:this._weekdaysRegex):(V(this,"_weekdaysRegex")||(this._weekdaysRegex=ar),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},e.prototype.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||this.computeWeekdaysParse(),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(V(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ar),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},e.prototype.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||this.computeWeekdaysParse(),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(V(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ar),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},e.prototype.isPM=function(e){return"p"===e.toLowerCase().charAt(0)},e.prototype.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},e.prototype.formatLongDate=function(e){this._longDateFormat=this._longDateFormat?this._longDateFormat:qr;var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},e.prototype.handleMonthStrictParse=function(e,t,n){var i,r,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=new Date(2e3,i),this._shortMonthsParse[i]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=this._shortMonthsParse.indexOf(s))?r:null:-1!==(r=this._longMonthsParse.indexOf(s))?r:null:"MMM"===t?-1!==(r=this._shortMonthsParse.indexOf(s))?r:-1!==(r=this._longMonthsParse.indexOf(s))?r:null:-1!==(r=this._longMonthsParse.indexOf(s))?r:-1!==(r=this._shortMonthsParse.indexOf(s))?r:null},e.prototype.handleWeekStrictParse=function(e,t,n){var i,r=e.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[];var o=void 0;for(o=0;o<7;++o){var s=qt(new Date(Date.UTC(2e3,1)),o,null,!0);this._minWeekdaysParse[o]=this.weekdaysMin(s).toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s).toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase()}}if(F(this._weekdaysParse)&&F(this._shortWeekdaysParse)&&F(this._minWeekdaysParse))return n?"dddd"===t?-1!==(i=this._weekdaysParse.indexOf(r))?i:null:"ddd"===t?-1!==(i=this._shortWeekdaysParse.indexOf(r))?i:null:-1!==(i=this._minWeekdaysParse.indexOf(r))?i:null:"dddd"===t?-1!==(i=this._weekdaysParse.indexOf(r))?i:-1!==(i=this._shortWeekdaysParse.indexOf(r))?i:-1!==(i=this._minWeekdaysParse.indexOf(r))?i:null:"ddd"===t?-1!==(i=this._shortWeekdaysParse.indexOf(r))?i:-1!==(i=this._weekdaysParse.indexOf(r))?i:-1!==(i=this._minWeekdaysParse.indexOf(r))?i:null:-1!==(i=this._minWeekdaysParse.indexOf(r))?i:-1!==(i=this._weekdaysParse.indexOf(r))?i:-1!==(i=this._shortWeekdaysParse.indexOf(r))?i:null},e.prototype.computeMonthsParse=function(){var e,t,n=[],i=[],r=[];for(t=0;t<12;t++)e=new Date(2e3,t),n.push(this.monthsShort(e,"")),i.push(this.months(e,"")),r.push(this.months(e,"")),r.push(this.monthsShort(e,""));for(n.sort(un),i.sort(un),r.sort(un),t=0;t<12;t++)n[t]=he(n[t]),i[t]=he(i[t]);for(t=0;t<24;t++)r[t]=he(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")},e.prototype.computeWeekdaysParse=function(){var e,t=[],n=[],i=[],r=[];for(e=0;e<7;e++){var o=qt(new Date(Date.UTC(2e3,1)),e,null,!0),s=this.weekdaysMin(o),a=this.weekdaysShort(o),c=this.weekdays(o);t.push(s),n.push(a),i.push(c),r.push(s),r.push(a),r.push(c)}for(t.sort(un),n.sort(un),i.sort(un),r.sort(un),e=0;e<7;e++)n[e]=he(n[e]),i[e]=he(i[e]),r[e]=he(r[e]);this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")},e}(),eo={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:qr,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:Jr,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Wr,monthsShort:Br,week:{dow:0,doy:6},weekdays:Gr,weekdaysMin:Zr,weekdaysShort:$r,meridiemParse:/[ap]\.?m?\.?/i},to={},no={};mn("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===W(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}});var io,ro=function(){function e(){this.closeOthers=!1}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),oo=function(){function e(e){this.groups=[],Object.assign(this,e)}return e.prototype.closeOtherPanels=function(e){this.closeOthers&&this.groups.forEach(function(t){t!==e&&(t.isOpen=!1)})},e.prototype.addGroup=function(e){this.groups.push(e)},e.prototype.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)},e.decorators=[{type:t.Component,args:[{selector:"accordion",template:"<ng-content></ng-content>",host:{"[attr.aria-multiselectable]":"closeOthers",role:"tablist","class":"panel-group",style:"display: block"}}]}],e.ctorParameters=function(){return[{type:ro}]},e.propDecorators={closeOthers:[{type:t.Input}]},e}(),so=(function(){function e(e){this.isOpenChange=new t.EventEmitter,this._isOpen=!1,this.accordion=e}Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},set:function(e){var t=this;e!==this.isOpen&&(e&&this.accordion.closeOtherPanels(this),this._isOpen=e,Promise.resolve(null).then(function(){t.isOpenChange.emit(e)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBs3",{get:function(){return M()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.panelClass=this.panelClass||"panel-default",this.accordion.addGroup(this)},e.prototype.ngOnDestroy=function(){this.accordion.removeGroup(this)},e.prototype.toggleOpen=function(e){this.isDisabled||(this.isOpen=!this.isOpen)},e.decorators=[{type:t.Component,args:[{selector:"accordion-group, accordion-panel",template:'<div class="panel card" [ngClass]="panelClass"> <div class="panel-heading card-header" role="tab" (click)="toggleOpen($event)"> <div class="panel-title"> <div role="button" class="accordion-toggle" [attr.aria-expanded]="isOpen"> <div *ngIf="heading" [ngClass]="{\'text-muted\': isDisabled}"> {{ heading }} </div> <ng-content select="[accordion-heading]"></ng-content> </div> </div> </div> <div class="panel-collapse collapse" role="tabpanel" [collapse]="!isOpen"> <div class="panel-body card-block card-body"> <ng-content></ng-content> </div> </div> </div> ',host:{"class":"panel",style:"display: block"}}]}],e.ctorParameters=function(){return[{type:oo,decorators:[{type:t.Inject,args:[oo]}]}]},e.propDecorators={heading:[{type:t.Input}],panelClass:[{type:t.Input}],isDisabled:[{type:t.Input}],isOpenChange:[{type:t.Output}],isOpen:[{type:t.HostBinding,args:["class.panel-open"]},{type:t.Input}]}}(),function(){function e(e,n){this._el=e,this._renderer=n,this.collapsed=new t.EventEmitter,this.expanded=new t.EventEmitter,this.isExpanded=!0,this.isCollapsed=!1,this.isCollapse=!0,this.isCollapsing=!1}Object.defineProperty(e.prototype,"collapse",{get:function(){return this.isExpanded},set:function(e){this.isExpanded=e,this.toggle()},enumerable:!0,configurable:!0}),e.prototype.toggle=function(){this.isExpanded?this.hide():this.show()},e.prototype.hide=function(){this.isCollapse=!1,this.isCollapsing=!0,this.isExpanded=!1,this.isCollapsed=!0,this.isCollapse=!0,this.isCollapsing=!1,this.display="none",this.collapsed.emit(this)},e.prototype.show=function(){this.isCollapse=!1,this.isCollapsing=!0,this.isExpanded=!0,this.isCollapsed=!1,this.display="block",this.isCollapse=!0,this.isCollapsing=!1,this._renderer.setStyle(this._el.nativeElement,"overflow","visible"),this._renderer.setStyle(this._el.nativeElement,"height","auto"),this.expanded.emit(this)},e.decorators=[{type:t.Directive,args:[{selector:"[collapse]",exportAs:"bs-collapse",host:{"[class.collapse]":"true"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={collapsed:[{type:t.Output}],expanded:[{type:t.Output}],display:[{type:t.HostBinding,args:["style.display"]}],isExpanded:[{type:t.HostBinding,args:["class.in"]},{type:t.HostBinding,args:["class.show"]},{type:t.HostBinding,args:["attr.aria-expanded"]}],isCollapsed:[{type:t.HostBinding,args:["attr.aria-hidden"]}],isCollapse:[{type:t.HostBinding,args:["class.collapse"]}],isCollapsing:[{type:t.HostBinding,args:["class.collapsing"]}],collapse:[{type:t.Input}]}}(),function(){function e(){this.type="warning",this.dismissible=!1,this.dismissOnTimeout=undefined}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}()),ao=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},co=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},uo=(function(){function e(e,n){var i=this;this.changeDetection=n,this.type="warning",this.dismissible=!1,this.isOpen=!0,this.onClose=new t.EventEmitter,this.onClosed=new t.EventEmitter,this.classes="",this.dismissibleChange=new t.EventEmitter,Object.assign(this,e),this.dismissibleChange.subscribe(function(e){i.classes=i.dismissible?"alert-dismissible":"",i.changeDetection.markForCheck()})}e.prototype.ngOnInit=function(){var e=this;this.dismissOnTimeout&&setTimeout(function(){return e.close()},parseInt(this.dismissOnTimeout,10))},e.prototype.close=function(){this.isOpen&&(this.onClose.emit(this),this.isOpen=!1,this.changeDetection.markForCheck(),this.onClosed.emit(this))},e.decorators=[{type:t.Component,args:[{selector:"alert,bs-alert",template:'<ng-template [ngIf]="isOpen"> <div [class]="\'alert alert-\' + type" role="alert" [ngClass]="classes"> <ng-template [ngIf]="dismissible"> <button type="button" class="close" aria-label="Close" (click)="close()"> <span aria-hidden="true">×</span> <span class="sr-only">Close</span> </button> </ng-template> <ng-content></ng-content> </div> </ng-template> ',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:so},{type:t.ChangeDetectorRef}]},e.propDecorators={type:[{type:t.Input}],dismissible:[{type:t.Input}],dismissOnTimeout:[{type:t.Input}],isOpen:[{type:t.Input}],onClose:[{type:t.Output}],onClosed:[{type:t.Output}]},ao([gn(),co("design:type",Object)],e.prototype,"dismissible",void 0)}(),{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return lo}),multi:!0}),lo=function(){function e(){this.btnCheckboxTrue=!0,this.btnCheckboxFalse=!1,this.state=!1,this.onChange=Function.prototype,this.onTouched=Function.prototype}return e.prototype.onClick=function(){this.isDisabled||(this.toggle(!this.state),this.onChange(this.value))},e.prototype.ngOnInit=function(){this.toggle(this.trueValue===this.value)},Object.defineProperty(e.prototype,"trueValue",{get:function(){return"undefined"==typeof this.btnCheckboxTrue||this.btnCheckboxTrue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"falseValue",{get:function(){return"undefined"!=typeof this.btnCheckboxFalse&&this.btnCheckboxFalse},enumerable:!0,configurable:!0}),e.prototype.toggle=function(e){this.state=e,this.value=this.state?this.trueValue:this.falseValue},e.prototype.writeValue=function(e){this.state=this.trueValue===e,this.value=e?this.trueValue:this.falseValue},e.prototype.setDisabledState=function(e){this.isDisabled=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.decorators=[{type:t.Directive,args:[{selector:"[btnCheckbox]",providers:[uo]}]}],e.ctorParameters=function(){return[]},e.propDecorators={btnCheckboxTrue:[{type:t.Input}],btnCheckboxFalse:[{type:t.Input}],state:[{type:t.HostBinding,args:["class.active"]}],onClick:[{type:t.HostListener,args:["click"]}]},e}(),po={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return ho}),multi:!0},ho=function(){function e(e,t){this.el=e,this.cdr=t,this.onChange=Function.prototype,this.onTouched=Function.prototype}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),e.prototype.writeValue=function(e){this._value=e,this.cdr.markForCheck()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.decorators=[{type:t.Directive,args:[{selector:"[btnRadioGroup]",providers:[po]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}(),fo={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return mo}),multi:!0},mo=function(){function e(e,t,n,i){this.el=e,this.cdr=t,this.group=n,this.renderer=i,this.onChange=Function.prototype,this.onTouched=Function.prototype}return Object.defineProperty(e.prototype,"value",{get:function(){return this.group?this.group.value:this._value},set:function(e){this.group?this.group.value=e:this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=e,this.setDisabledState(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isActive",{get:function(){return this.btnRadio===this.value},enumerable:!0,configurable:!0}),e.prototype.onClick=function(){this.el.nativeElement.attributes.disabled||!this.uncheckable&&this.btnRadio===this.value||(this.value=this.uncheckable&&this.btnRadio===this.value?undefined:this.btnRadio,this._onChange(this.value))},e.prototype.ngOnInit=function(){this.uncheckable="undefined"!=typeof this.uncheckable},e.prototype.onBlur=function(){this.onTouched()},e.prototype._onChange=function(e){if(this.group)return this.group.onTouched(),void this.group.onChange(e);this.onTouched(),this.onChange(e)},e.prototype.writeValue=function(e){this.value=e,this.cdr.markForCheck()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){e?this.renderer.setAttribute(this.el.nativeElement,"disabled","disabled"):this.renderer.removeAttribute(this.el.nativeElement,"disabled")},e.decorators=[{type:t.Directive,args:[{selector:"[btnRadio]",providers:[fo]}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ho,decorators:[{type:t.Optional}]},{type:t.Renderer2}]},e.propDecorators={btnRadio:[{type:t.Input}],uncheckable:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],isActive:[{type:t.HostBinding,args:["class.active"]}],onClick:[{type:t.HostListener,args:["click"]}]},e}(),_o=function(){function e(){this.length=0,this.asArray=[]}return e.prototype.get=function(e){if(!(0===this.length||e<0||e>=this.length)){for(var t=this.head,n=0;n<e;n++)t=t.next;return t.value}},e.prototype.add=function(e,t){if(void 0===t&&(t=this.length),t<0||t>this.length)throw new Error("Position is out of the list");var n={value:e,next:undefined,previous:undefined};if(0===this.length)this.head=n,this.tail=n,this.current=n;else if(0===t)n.next=this.head,this.head.previous=n,this.head=n;else if(t===this.length)this.tail.next=n,n.previous=this.tail,this.tail=n;else{var i=this.getNode(t-1),r=i.next;i.next=n,r.previous=n,n.previous=i,n.next=r}this.length++,this.createInternalArrayRepresentation()},e.prototype.remove=function(e){if(void 0===e&&(e=0),0===this.length||e<0||e>=this.length)throw new Error("Position is out of the list");if(0===e)this.head=this.head.next,this.head?this.head.previous=undefined:this.tail=undefined;else if(e===this.length-1)this.tail=this.tail.previous,this.tail.next=undefined;else{var t=this.getNode(e);t.next.previous=t.previous,t.previous.next=t.next}this.length--,this.createInternalArrayRepresentation()},e.prototype.set=function(e,t){if(0===this.length||e<0||e>=this.length)throw new Error("Position is out of the list");this.getNode(e).value=t,this.createInternalArrayRepresentation()},e.prototype.toArray=function(){return this.asArray},e.prototype.findAll=function(e){for(var t=this.head,n=[],i=0;i<this.length;i++)e(t.value,i)&&n.push({index:i,value:t.value}),t=t.next;return n},e.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach(function(t){e.add(t)}),this.length},e.prototype.pop=function(){if(0===this.length)return undefined;var e=this.tail;return this.remove(this.length-1),e.value},e.prototype.unshift=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.reverse(),t.forEach(function(t){e.add(t,0)}),this.length},e.prototype.shift=function(){if(0===this.length)return undefined;var e=this.head.value;return this.remove(),e},e.prototype.forEach=function(e){for(var t=this.head,n=0;n<this.length;n++)e(t.value,n),t=t.next},e.prototype.indexOf=function(e){for(var t=this.head,n=0,i=0;i<this.length;i++){if(t.value===e){n=i;break}t=t.next}return n},e.prototype.some=function(e){for(var t=this.head,n=!1;t&&!n;){if(e(t.value)){n=!0;break}t=t.next}return n},e.prototype.every=function(e){for(var t=this.head,n=!0;t&&n;)e(t.value)||(n=!1),t=t.next;return n},e.prototype.toString=function(){return"[Linked List]"},e.prototype.find=function(e){for(var t,n=this.head,i=0;i<this.length;i++){if(e(n.value,i)){t=n.value;break}n=n.next}return t},e.prototype.findIndex=function(e){for(var t,n=this.head,i=0;i<this.length;i++){if(e(n.value,i)){t=i;break}n=n.next}return t},e.prototype.getNode=function(e){if(0===this.length||e<0||e>=this.length)throw new Error("Position is out of the list");for(var t=this.head,n=0;n<e;n++)t=t.next;return t},e.prototype.createInternalArrayRepresentation=function(){for(var e=[],t=this.head;t;)e.push(t.value),t=t.next;this.asArray=e},e}(),yo=function(){function e(){}return e.reflow=function(e){e.offsetHeight},e.getStyles=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=Ni),t.getComputedStyle(e)},e}(),go=function(){function e(){this.interval=5e3,this.noPause=!1,this.noWrap=!1,this.showIndicators=!0}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}();!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NEXT=1]="NEXT",e[e.PREV=2]="PREV"}(io||(io={}));!function(){function e(e,n){this.ngZone=n,this.activeSlideChange=new t.EventEmitter(!1),this._slides=new _o,this.destroyed=!1,Object.assign(this,e)}Object.defineProperty(e.prototype,"activeSlide",{get:function(){return this._currentActiveSlide},set:function(e){this._slides.length&&e!==this._currentActiveSlide&&this._select(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interval",{get:function(){return this._interval},set:function(e){this._interval=e,this.restartTimer()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"slides",{get:function(){return this._slides.toArray()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBs4",{get:function(){return!M()},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.destroyed=!0},e.prototype.addSlide=function(e){this._slides.add(e),1===this._slides.length&&(this._currentActiveSlide=void 0,this.activeSlide=0,this.play())},e.prototype.removeSlide=function(e){var t=this,n=this._slides.indexOf(e);if(this._currentActiveSlide===n){var i=void 0;this._slides.length>1&&(i=this.isLast(n)?this.noWrap?n-1:0:n),this._slides.remove(n),setTimeout(function(){t._select(i)},0)}else{this._slides.remove(n);var r=this.getCurrentSlideIndex();setTimeout(function(){t._currentActiveSlide=r,t.activeSlideChange.emit(t._currentActiveSlide)},0)}},e.prototype.nextSlide=function(e){void 0===e&&(e=!1),this.activeSlide=this.findNextSlideIndex(io.NEXT,e)},e.prototype.previousSlide=function(e){void 0===e&&(e=!1),this.activeSlide=this.findNextSlideIndex(io.PREV,e)},e.prototype.selectSlide=function(e){this.activeSlide=e},e.prototype.play=function(){this.isPlaying||(this.isPlaying=!0,this.restartTimer())},e.prototype.pause=function(){this.noPause||(this.isPlaying=!1,this.resetTimer())},e.prototype.getCurrentSlideIndex=function(){return this._slides.findIndex(function(e){return e.active})},e.prototype.isLast=function(e){return e+1>=this._slides.length},e.prototype.findNextSlideIndex=function(e,t){var n=0;if(t||!this.isLast(this.activeSlide)||e===io.PREV||!this.noWrap){switch(e){case io.NEXT:n=this.isLast(this._currentActiveSlide)?!t&&this.noWrap?this._currentActiveSlide:0:this._currentActiveSlide+1;break;case io.PREV:n=this._currentActiveSlide>0?this._currentActiveSlide-1:!t&&this.noWrap?this._currentActiveSlide:this._slides.length-1;break;default:throw new Error("Unknown direction")}return n}},e.prototype._select=function(e){if(isNaN(e))this.pause();else{var t=this._slides.get(this._currentActiveSlide);t&&(t.active=!1);var n=this._slides.get(e);n&&(this._currentActiveSlide=e,n.active=!0,this.activeSlide=e,this.activeSlideChange.emit(e))}},e.prototype.restartTimer=function(){var e=this;this.resetTimer();var t=+this.interval;!isNaN(t)&&t>0&&(this.currentInterval=this.ngZone.runOutsideAngular(function(){return setInterval(function(){var t=+e.interval;e.ngZone.run(function(){e.isPlaying&&!isNaN(e.interval)&&t>0&&e.slides.length?e.nextSlide():e.pause()})},t)}))},e.prototype.resetTimer=function(){this.currentInterval&&(clearInterval(this.currentInterval),this.currentInterval=void 0)},e.decorators=[{type:t.Component,args:[{selector:"carousel",template:'<div (mouseenter)="pause()" (mouseleave)="play()" (mouseup)="play()" class="carousel slide"> <ol class="carousel-indicators" *ngIf="showIndicators && slides.length > 1"> <li *ngFor="let slidez of slides; let i = index;" [class.active]="slidez.active === true" (click)="selectSlide(i)"></li> </ol> <div class="carousel-inner"><ng-content></ng-content></div> <a class="left carousel-control carousel-control-prev" [class.disabled]="activeSlide === 0 && noWrap" (click)="previousSlide()" *ngIf="slides.length > 1"> <span class="icon-prev carousel-control-prev-icon" aria-hidden="true"></span> <span *ngIf="isBs4" class="sr-only">Previous</span> </a> <a class="right carousel-control carousel-control-next" (click)="nextSlide()" [class.disabled]="isLast(activeSlide) && noWrap" *ngIf="slides.length > 1"> <span class="icon-next carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div> '}]}],e.ctorParameters=function(){return[{type:go},{type:t.NgZone}]},e.propDecorators={noWrap:[{type:t.Input}],noPause:[{type:t.Input}],showIndicators:[{type:t.Input}],activeSlideChange:[{type:t.Output}],activeSlide:[{type:t.Input}],interval:[{type:t.Input}]}}();var vo=function(){function e(){}return e.prototype.format=function(e,t,n){return vt(e,t,n)},e}(),bo=function(){function e(){this.selectionDone=new t.EventEmitter(undefined),this.update=new t.EventEmitter(!1),this.activeDateChange=new t.EventEmitter(undefined),this.stepDay={},this.stepMonth={},this.stepYear={},this.modes=["day","month","year"],this.dateFormatter=new vo}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate},set:function(e){this._activeDate=e},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.uniqueId="datepicker--"+Math.floor(1e4*Math.random()),this.initDate?(this.activeDate=this.initDate,this.selectedDate=new Date(this.activeDate.valueOf()),this.update.emit(this.activeDate)):this.activeDate===undefined&&(this.activeDate=new Date)},e.prototype.ngOnChanges=function(e){this.refreshView(),this.checkIfActiveDateGotUpdated(e.activeDate)},e.prototype.checkIfActiveDateGotUpdated=function(e){if(e&&!e.firstChange){var t=e.previousValue;t&&t instanceof Date&&t.getTime()!==e.currentValue.getTime()&&this.activeDateChange.emit(this.activeDate)}},e.prototype.setCompareHandler=function(e,t){"day"===t&&(this.compareHandlerDay=e),"month"===t&&(this.compareHandlerMonth=e),"year"===t&&(this.compareHandlerYear=e)},e.prototype.compare=function(e,t){return e===undefined||t===undefined?undefined:"day"===this.datepickerMode&&this.compareHandlerDay?this.compareHandlerDay(e,t):"month"===this.datepickerMode&&this.compareHandlerMonth?this.compareHandlerMonth(e,t):"year"===this.datepickerMode&&this.compareHandlerYear?this.compareHandlerYear(e,t):void 0},e.prototype.setRefreshViewHandler=function(e,t){"day"===t&&(this.refreshViewHandlerDay=e),"month"===t&&(this.refreshViewHandlerMonth=e),"year"===t&&(this.refreshViewHandlerYear=e)},e.prototype.refreshView=function(){"day"===this.datepickerMode&&this.refreshViewHandlerDay&&this.refreshViewHandlerDay(),"month"===this.datepickerMode&&this.refreshViewHandlerMonth&&this.refreshViewHandlerMonth(),"year"===this.datepickerMode&&this.refreshViewHandlerYear&&this.refreshViewHandlerYear()},e.prototype.dateFilter=function(e,t){return this.dateFormatter.format(e,t,this.locale)},e.prototype.isActive=function(e){return 0===this.compare(e.date,this.activeDate)&&(this.activeDateId=e.uid,!0)},e.prototype.createDateObject=function(e,t){var n={};return n.date=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n.date=this.fixTimeZone(n.date),n.label=this.dateFilter(e,t),n.selected=0===this.compare(e,this.selectedDate),n.disabled=this.isDisabled(e),n.current=0===this.compare(e,new Date),n.customClass=this.getCustomClassForDate(n.date),n},e.prototype.split=function(e,t){for(var n=[];e.length>0;)n.push(e.splice(0,t));return n},e.prototype.fixTimeZone=function(e){var t=e.getHours();return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23===t?t+2:0)},e.prototype.select=function(e,t){void 0===t&&(t=!0),this.datepickerMode===this.minMode?(this.activeDate||(this.activeDate=new Date(0,0,0,0,0,0,0)),this.activeDate=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this.activeDate=this.fixTimeZone(this.activeDate),t&&this.selectionDone.emit(this.activeDate)):(this.activeDate=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this.activeDate=this.fixTimeZone(this.activeDate),t&&(this.datepickerMode=this.modes[this.modes.indexOf(this.datepickerMode)-1])),this.selectedDate=new Date(this.activeDate.valueOf()),this.update.emit(this.activeDate),this.refreshView()},e.prototype.move=function(e){var t;if("day"===this.datepickerMode&&(t=this.stepDay),"month"===this.datepickerMode&&(t=this.stepMonth),"year"===this.datepickerMode&&(t=this.stepYear),t){var n=this.activeDate.getFullYear()+e*(t.years||0),i=this.activeDate.getMonth()+e*(t.months||0);this.activeDate=new Date(n,i,1),this.refreshView(),this.activeDateChange.emit(this.activeDate)}},e.prototype.toggleMode=function(e){var t=e||1;this.datepickerMode===this.maxMode&&1===t||this.datepickerMode===this.minMode&&-1===t||(this.datepickerMode=this.modes[this.modes.indexOf(this.datepickerMode)+t],this.refreshView())},e.prototype.getCustomClassForDate=function(e){var t=this;if(!this.customClass)return"";var n=this.customClass.find(function(n){return n.date.valueOf()===e.valueOf()&&n.mode===t.datepickerMode},this);return n===undefined?"":n.clazz},e.prototype.compareDateDisabled=function(e,t){return e===undefined||t===undefined?undefined:"day"===e.mode&&this.compareHandlerDay?this.compareHandlerDay(e.date,t):"month"===e.mode&&this.compareHandlerMonth?this.compareHandlerMonth(e.date,t):"year"===e.mode&&this.compareHandlerYear?this.compareHandlerYear(e.date,t):undefined},e.prototype.isDisabled=function(e){var t=this,n=!1;return this.dateDisabled&&this.dateDisabled.forEach(function(i){0===t.compareDateDisabled(i,e)&&(n=!0)}),this.dayDisabled&&(n=n||this.dayDisabled.indexOf(e.getDay())>-1),n||this.minDate&&this.compare(e,this.minDate)<0||this.maxDate&&this.compare(e,this.maxDate)>0},e.decorators=[{type:t.Component,args:[{selector:"datepicker-inner",template:'\n \x3c!--<!–ng-keydown="keydown($event)"–>--\x3e\n <div *ngIf="datepickerMode" class="well well-sm bg-faded p-a card" role="application" >\n <ng-content></ng-content>\n </div>\n '}]}],e.ctorParameters=function(){return[]},e.propDecorators={locale:[{type:t.Input}],datepickerMode:[{type:t.Input}],startingDay:[{type:t.Input}],yearRange:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],minMode:[{type:t.Input}],maxMode:[{type:t.Input}],showWeeks:[{type:t.Input}],formatDay:[{type:t.Input}],formatMonth:[{type:t.Input}],formatYear:[{type:t.Input}],formatDayHeader:[{type:t.Input}],formatDayTitle:[{type:t.Input}],formatMonthTitle:[{type:t.Input}],onlyCurrentMonth:[{type:t.Input}],shortcutPropagation:[{type:t.Input}],customClass:[{type:t.Input}],monthColLimit:[{type:t.Input}],yearColLimit:[{type:t.Input}],dateDisabled:[{type:t.Input}],dayDisabled:[{type:t.Input}],initDate:[{type:t.Input}],selectionDone:[{type:t.Output}],update:[{type:t.Output}],activeDateChange:[{type:t.Output}],activeDate:[{type:t.Input}]},e}(),wo=function(){function e(){this.locale="en",this.datepickerMode="day",this.startingDay=0,this.yearRange=20,this.minMode="day",this.maxMode="year",this.showWeeks=!0,this.formatDay="DD",this.formatMonth="MMMM",this.formatYear="YYYY",this.formatDayHeader="dd",this.formatDayTitle="MMMM YYYY",this.formatMonthTitle="YYYY",this.onlyCurrentMonth=!1,this.monthColLimit=3,this.yearColLimit=5,this.shortcutPropagation=!1}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),ko={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return So}),multi:!0},So=function(){function e(e){this.datepickerMode="day",this.showWeeks=!0,this.selectionDone=new t.EventEmitter(undefined),this.activeDateChange=new t.EventEmitter(undefined),this.onChange=Function.prototype,this.onTouched=Function.prototype,this._now=new Date,this.config=e,this.configureOptions()}return Object.defineProperty(e.prototype,"activeDate",{get:function(){return this._activeDate||this._now},set:function(e){this._activeDate=e},enumerable:!0,configurable:!0}),e.prototype.configureOptions=function(){Object.assign(this,this.config)},e.prototype.onUpdate=function(e){this.activeDate=e,this.onChange(e)},e.prototype.onSelectionDone=function(e){this.selectionDone.emit(e)},e.prototype.onActiveDateChange=function(e){this.activeDateChange.emit(e)},e.prototype.writeValue=function(e){if(0!==this._datePicker.compare(e,this._activeDate))return e&&e instanceof Date?(this.activeDate=e,void this._datePicker.select(e,!1)):void(this.activeDate=e?new Date(e):void 0)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.decorators=[{type:t.Component,args:[{selector:"datepicker",template:'\n <datepicker-inner [activeDate]="activeDate"\n (update)="onUpdate($event)"\n [locale]="config.locale"\n [datepickerMode]="datepickerMode"\n [initDate]="initDate"\n [minDate]="minDate"\n [maxDate]="maxDate"\n [minMode]="minMode"\n [maxMode]="maxMode"\n [showWeeks]="showWeeks"\n [formatDay]="formatDay"\n [formatMonth]="formatMonth"\n [formatYear]="formatYear"\n [formatDayHeader]="formatDayHeader"\n [formatDayTitle]="formatDayTitle"\n [formatMonthTitle]="formatMonthTitle"\n [startingDay]="startingDay"\n [yearRange]="yearRange"\n [customClass]="customClass"\n [dateDisabled]="dateDisabled"\n [dayDisabled]="dayDisabled"\n [onlyCurrentMonth]="onlyCurrentMonth"\n [shortcutPropagation]="shortcutPropagation"\n [monthColLimit]="monthColLimit"\n [yearColLimit]="yearColLimit"\n (selectionDone)="onSelectionDone($event)"\n (activeDateChange)="onActiveDateChange($event)">\n <daypicker tabindex="0"></daypicker>\n <monthpicker tabindex="0"></monthpicker>\n <yearpicker tabindex="0"></yearpicker>\n </datepicker-inner>\n ',providers:[ko]}]}],e.ctorParameters=function(){return[{type:wo}]},e.propDecorators={datepickerMode:[{type:t.Input}],initDate:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],minMode:[{type:t.Input}],maxMode:[{type:t.Input}],showWeeks:[{type:t.Input}],formatDay:[{type:t.Input}],formatMonth:[{type:t.Input}],formatYear:[{type:t.Input}],formatDayHeader:[{type:t.Input}],formatDayTitle:[{type:t.Input}],formatMonthTitle:[{type:t.Input}],startingDay:[{type:t.Input}],yearRange:[{type:t.Input}],onlyCurrentMonth:[{type:t.Input}],shortcutPropagation:[{type:t.Input}],monthColLimit:[{type:t.Input}],yearColLimit:[{type:t.Input}],customClass:[{type:t.Input}],dateDisabled:[{type:t.Input}],dayDisabled:[{type:t.Input}],activeDate:[{type:t.Input}],selectionDone:[{type:t.Output}],activeDateChange:[{type:t.Output}],_datePicker:[{type:t.ViewChild,args:[bo]}]},e}(),Do=(function(){function e(e){this.labels=[],this.rows=[],this.weekNumbers=[],this.datePicker=e}Object.defineProperty(e.prototype,"isBs4",{get:function(){return!M()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.datePicker.stepDay={months:1},this.datePicker.setRefreshViewHandler(function(){var t=this.activeDate.getFullYear(),n=this.activeDate.getMonth(),i=new Date(t,n,1),r=this.startingDay-i.getDay(),o=r>0?7-r:-r,s=new Date(i.getTime());o>0&&s.setDate(1-o);for(var a=e.getDates(s,42),c=[],u=0;u<42;u++){var l=this.createDateObject(a[u],this.formatDay);l.secondary=a[u].getMonth()!==n,l.uid=this.uniqueId+"-"+u,c[u]=l}e.labels=[];for(var p=0;p<7;p++)e.labels[p]={},e.labels[p].abbr=this.dateFilter(c[p].date,this.formatDayHeader),e.labels[p].full=this.dateFilter(c[p].date,"EEEE");if(e.title=this.dateFilter(this.activeDate,this.formatDayTitle),e.rows=this.split(c,7),this.showWeeks){e.weekNumbers=[];for(var h=(11-this.startingDay)%7,d=e.rows.length,f=0;f<d;f++)e.weekNumbers.push(e.getISO8601WeekNumber(e.rows[f][h].date))}},"day"),this.datePicker.setCompareHandler(function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),i=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.getTime()-i.getTime()},"day"),this.datePicker.refreshView()},e.prototype.getDates=function(e,t){for(var n,i=new Array(t),r=new Date(e.getTime()),o=0;o<t;)n=new Date(r.getTime()),n=this.datePicker.fixTimeZone(n),i[o++]=n,r=new Date(n.getFullYear(),n.getMonth(),n.getDate()+1);return i},e.prototype.getISO8601WeekNumber=function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t.getTime())/864e5)/7)+1},e.decorators=[{type:t.Component,args:[{selector:"daypicker",template:'\n<table *ngIf="datePicker.datepickerMode === \'day\'" role="grid" [attr.aria-labelledby]="datePicker.uniqueId + \'-title\'" aria-activedescendant="activeDateId">\n <thead>\n <tr>\n <th>\n <button *ngIf="!isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-left float-left"\n (click)="datePicker.move(-1)"\n tabindex="-1">‹</button>\n <button *ngIf="isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-left float-left"\n (click)="datePicker.move(-1)"\n tabindex="-1"><</button>\n </th>\n <th [attr.colspan]="5 + (datePicker.showWeeks ? 1 : 0)">\n <button [id]="datePicker.uniqueId + \'-title\'"\n type="button" class="btn btn-default btn-secondary btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === datePicker.maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === datePicker.maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong>\n </button>\n </th>\n <th>\n <button *ngIf="!isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-right float-right"\n (click)="datePicker.move(1)"\n tabindex="-1">›</button>\n <button *ngIf="isBs4"\n type="button"\n class="btn btn-default btn-secondary btn-sm pull-right float-right"\n (click)="datePicker.move(1)"\n tabindex="-1">>\n </button>\n </th>\n </tr>\n <tr>\n <th *ngIf="datePicker.showWeeks"></th>\n <th *ngFor="let labelz of labels" class="text-center">\n <small aria-label="labelz.full"><b>{{ labelz.abbr }}</b></small>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-template ngFor [ngForOf]="rows" let-rowz="$implicit" let-index="index">\n <tr *ngIf="!(datePicker.onlyCurrentMonth && rowz[0].secondary && rowz[6].secondary)">\n <td *ngIf="datePicker.showWeeks" class="h6" class="text-center">\n <em>{{ weekNumbers[index] }}</em>\n </td>\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [id]="dtz.uid">\n <button type="button" style="min-width:100%;" class="btn btn-sm {{dtz.customClass}}"\n *ngIf="!(datePicker.onlyCurrentMonth && dtz.secondary)"\n [ngClass]="{\'btn-secondary\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected, disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz), \'btn-default\': !isBs4}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-muted\': dtz.secondary || dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </ng-template>\n </tbody>\n</table>\n ',styles:["\n :host .btn-secondary {\n color: #292b2c;\n background-color: #fff;\n border-color: #ccc;\n }\n :host .btn-info .text-muted {\n color: #292b2c !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:bo}]}}(),function(){function e(e){this.rows=[],this.datePicker=e}Object.defineProperty(e.prototype,"isBs4",{get:function(){return!M()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.datePicker.stepMonth={years:1},this.datePicker.setRefreshViewHandler(function(){for(var t,n=new Array(12),i=this.activeDate.getFullYear(),r=0;r<12;r++)t=new Date(i,r,1),t=this.fixTimeZone(t),n[r]=this.createDateObject(t,this.formatMonth),n[r].uid=this.uniqueId+"-"+r;e.title=this.dateFilter(this.activeDate,this.formatMonthTitle),e.rows=this.split(n,e.datePicker.monthColLimit)},"month"),this.datePicker.setCompareHandler(function(e,t){var n=new Date(e.getFullYear(),e.getMonth()),i=new Date(t.getFullYear(),t.getMonth());return n.getTime()-i.getTime()},"month"),this.datePicker.refreshView()},e.decorators=[{type:t.Component,args:[{selector:"monthpicker",template:'\n<table *ngIf="datePicker.datepickerMode===\'month\'" role="grid">\n <thead>\n <tr>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-left float-left"\n (click)="datePicker.move(-1)" tabindex="-1">‹</button></th>\n <th [attr.colspan]="((datePicker.monthColLimit - 2) <= 0) ? 1 : datePicker.monthColLimit - 2">\n <button [id]="datePicker.uniqueId + \'-title\'"\n type="button" class="btn btn-default btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong> \n </button>\n </th>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-right float-right"\n (click)="datePicker.move(1)" tabindex="-1">›</button>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let rowz of rows">\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid" [ngClass]="dtz.customClass">\n <button type="button" style="min-width:100%;" class="btn btn-default"\n [ngClass]="{\'btn-link\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-success\': isBs4 && dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:bo}]}}(),function(){function e(e){this.rows=[],this.datePicker=e}Object.defineProperty(e.prototype,"isBs4",{get:function(){return!M()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.datePicker.stepYear={years:this.datePicker.yearRange},this.datePicker.setRefreshViewHandler(function(){for(var t,n=new Array(this.yearRange),i=e.getStartingYear(this.activeDate.getFullYear()),r=0;r<this.yearRange;r++)t=new Date(i+r,0,1),t=this.fixTimeZone(t),n[r]=this.createDateObject(t,this.formatYear),n[r].uid=this.uniqueId+"-"+r;e.title=[n[0].label,n[this.yearRange-1].label].join(" - "),e.rows=this.split(n,e.datePicker.yearColLimit)},"year"),this.datePicker.setCompareHandler(function(e,t){return e.getFullYear()-t.getFullYear()},"year"),this.datePicker.refreshView()},e.prototype.getStartingYear=function(e){return(e-1)/this.datePicker.yearRange*this.datePicker.yearRange+1},e.decorators=[{type:t.Component,args:[{selector:"yearpicker",template:'\n<table *ngIf="datePicker.datepickerMode===\'year\'" role="grid">\n <thead>\n <tr>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-left float-left"\n (click)="datePicker.move(-1)" tabindex="-1">‹</button>\n </th>\n <th [attr.colspan]="((datePicker.yearColLimit - 2) <= 0) ? 1 : datePicker.yearColLimit - 2">\n <button [id]="datePicker.uniqueId + \'-title\'" role="heading"\n type="button" class="btn btn-default btn-sm"\n (click)="datePicker.toggleMode(0)"\n [disabled]="datePicker.datepickerMode === datePicker.maxMode"\n [ngClass]="{disabled: datePicker.datepickerMode === datePicker.maxMode}" tabindex="-1" style="width:100%;">\n <strong>{{ title }}</strong>\n </button>\n </th>\n <th>\n <button type="button" class="btn btn-default btn-sm pull-right float-right"\n (click)="datePicker.move(1)" tabindex="-1">›</button>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let rowz of rows">\n <td *ngFor="let dtz of rowz" class="text-center" role="gridcell" [attr.id]="dtz.uid">\n <button type="button" style="min-width:100%;" class="btn btn-default"\n [ngClass]="{\'btn-link\': isBs4 && !dtz.selected && !datePicker.isActive(dtz), \'btn-info\': dtz.selected || (isBs4 && !dtz.selected && datePicker.isActive(dtz)), disabled: dtz.disabled, active: !isBs4 && datePicker.isActive(dtz)}"\n [disabled]="dtz.disabled"\n (click)="datePicker.select(dtz.date)" tabindex="-1">\n <span [ngClass]="{\'text-success\': isBs4 && dtz.current, \'text-info\': !isBs4 && dtz.current}">{{ dtz.label }}</span>\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n ',styles:["\n :host .btn-info .text-success {\n color: #fff !important;\n }\n "]}]}],e.ctorParameters=function(){return[{type:bo}]}}(),{}),Co="undefined"==typeof console||!("warn"in console),Oo=function(){function e(){this._customRangesFish=[]}return Object.defineProperty(e.prototype,"minDate",{set:function(e){this._effects.setMinDate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDate",{set:function(e){this._effects.setMaxDate(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{set:function(e){this._effects.setDisabled(e)},enumerable:!0,configurable:!0}),e.prototype.setViewMode=function(e){},e.prototype.navigateTo=function(e){},e.prototype.dayHoverHandler=function(e){},e.prototype.monthHoverHandler=function(e){},e.prototype.yearHoverHandler=function(e){},e.prototype.daySelectHandler=function(e){},e.prototype.monthSelectHandler=function(e){},e.prototype.yearSelectHandler=function(e){},e.prototype._stopPropagation=function(e){e.stopPropagation()},e}(),xo=function(){function e(){this.containerClass="theme-green",this.displayMonths=1,this.showWeekNumbers=!0,this.dateInputFormat="L",this.rangeSeparator=" - ",this.rangeInputFormat="L",this.monthTitle="MMMM",this.yearTitle="YYYY",this.dayLabel="D",this.monthLabel="MMMM",this.yearLabel="YYYY",this.weekNumbers="w"}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),Mo=function(){function e(){}return e.prototype.calculate=function(){return{type:e.CALCULATE}},e.prototype.format=function(){return{type:e.FORMAT}},e.prototype.flag=function(){return{type:e.FLAG}},e.prototype.select=function(t){return{type:e.SELECT,payload:t}},e.prototype.changeViewMode=function(t){return{type:e.CHANGE_VIEWMODE,payload:t}},e.prototype.navigateTo=function(t){return{type:e.NAVIGATE_TO,payload:t}},e.prototype.navigateStep=function(t){return{type:e.NAVIGATE_OFFSET,payload:t}},e.prototype.setOptions=function(t){return{type:e.SET_OPTIONS,payload:t}},e.prototype.selectRange=function(t){return{type:e.SELECT_RANGE,payload:t}},e.prototype.hoverDay=function(t){return{type:e.HOVER,payload:t.isHovered?t.cell.date:null}},e.prototype.minDate=function(t){return{type:e.SET_MIN_DATE,payload:t}},e.prototype.maxDate=function(t){return{type:e.SET_MAX_DATE,payload:t}},e.prototype.isDisabled=function(t){return{type:e.SET_IS_DISABLED,payload:t}},e.prototype.setLocale=function(t){return{type:e.SET_LOCALE,payload:t}},e.CALCULATE="[datepicker] calculate dates matrix",e.FORMAT="[datepicker] format datepicker values",e.FLAG="[datepicker] set flags",e.SELECT="[datepicker] select date",e.NAVIGATE_OFFSET="[datepicker] shift view date",e.NAVIGATE_TO="[datepicker] change view date",e.SET_OPTIONS="[datepicker] update render options",e.HOVER="[datepicker] hover date",e.CHANGE_VIEWMODE="[datepicker] switch view mode",e.SET_MIN_DATE="[datepicker] set min date",e.SET_MAX_DATE="[datepicker] set max date",e.SET_IS_DISABLED="[datepicker] set is disabled",e.SET_LOCALE="[datepicker] set datepicker locale",e.SELECT_RANGE="[daterangepicker] select dates range",e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),Io=function(){function e(){this._defaultLocale="en",this._locale=new s.BehaviorSubject(this._defaultLocale),this._localeChange=this._locale.asObservable()}return Object.defineProperty(e.prototype,"locale",{get:function(){return this._locale},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"localeChange",{get:function(){return this._localeChange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentLocale",{get:function(){return this._locale.getValue()},enumerable:!0,configurable:!0}),e.prototype.use=function(e){e!==this.currentLocale&&this._locale.next(e)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),Po=function(){function e(e,t){this._actions=e,this._localeService=t,this._subs=[]}return e.prototype.init=function(e){return this._store=e,this},e.prototype.setValue=function(e){this._store.dispatch(this._actions.select(e))},e.prototype.setRangeValue=function(e){this._store.dispatch(this._actions.selectRange(e))},e.prototype.setMinDate=function(e){return this._store.dispatch(this._actions.minDate(e)),this},e.prototype.setMaxDate=function(e){return this._store.dispatch(this._actions.maxDate(e)),this},e.prototype.setDisabled=function(e){return this._store.dispatch(this._actions.isDisabled(e)),this},e.prototype.setOptions=function(e){var t=Object.assign({locale:this._localeService.currentLocale},e);return this._store.dispatch(this._actions.setOptions(t)),this},e.prototype.setBindings=function(e){return e.daysCalendar=this._store.select(function(e){return e.flaggedMonths}).filter(function(e){return!!e}),e.monthsCalendar=this._store.select(function(e){return e.flaggedMonthsCalendar}).filter(function(e){return!!e}),e.yearsCalendar=this._store.select(function(e){return e.yearsCalendarFlagged}).filter(function(e){return!!e}),e.viewMode=this._store.select(function(e){return e.view.mode}),e.options=this._store.select(function(e){return e.showWeekNumbers}).map(function(e){return{showWeekNumbers:e}}),this},e.prototype.setEventHandlers=function(e){var t=this;return e.setViewMode=function(e){t._store.dispatch(t._actions.changeViewMode(e))},e.navigateTo=function(e){t._store.dispatch(t._actions.navigateStep(e.step))},e.dayHoverHandler=function(e){var n=e.cell;n.isOtherMonth||n.isDisabled||(t._store.dispatch(t._actions.hoverDay(e)),n.isHovered=e.isHovered)},e.monthHoverHandler=function(e){e.cell.isHovered=e.isHovered},e.yearHoverHandler=function(e){e.cell.isHovered=e.isHovered},e.monthSelectHandler=function(e){e.isDisabled||t._store.dispatch(t._actions.navigateTo({unit:{month:te(e.date)},viewMode:"day"}))},e.yearSelectHandler=function(e){e.isDisabled||t._store.dispatch(t._actions.navigateTo({unit:{year:ne(e.date)},viewMode:"month"}))},this},e.prototype.registerDatepickerSideEffects=function(){var e=this;return this._subs.push(this._store.select(function(e){return e.view}).subscribe(function(t){e._store.dispatch(e._actions.calculate())})),this._subs.push(this._store.select(function(e){return e.monthsModel}).filter(function(e){return!!e}).subscribe(function(t){return e._store.dispatch(e._actions.format())})),this._subs.push(this._store.select(function(e){return e.formattedMonths}).filter(function(e){return!!e}).subscribe(function(t){return e._store.dispatch(e._actions.flag())})),this._subs.push(this._store.select(function(e){return e.selectedDate}).filter(function(e){return!!e}).subscribe(function(t){return e._store.dispatch(e._actions.flag())})),this._subs.push(this._store.select(function(e){return e.selectedRange}).filter(function(e){return!!e}).subscribe(function(t){return e._store.dispatch(e._actions.flag())})),this._subs.push(this._store.select(function(e){return e.monthsCalendar}).subscribe(function(){return e._store.dispatch(e._actions.flag())})),this._subs.push(this._store.select(function(e){return e.yearsCalendarModel}).filter(function(e){return!!e}).subscribe(function(){return e._store.dispatch(e._actions.flag())})),this._subs.push(this._store.select(function(e){return e.hoveredDate}).filter(function(e){return!!e}).subscribe(function(t){return e._store.dispatch(e._actions.flag())})),this._subs.push(this._localeService.localeChange.subscribe(function(t){return e._store.dispatch(e._actions.setLocale(t))})),this},e.prototype.destroy=function(){for(var e=0,t=this._subs;e<t.length;e++)t[e].unsubscribe()},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:Mo},{type:Io}]},e}(),Eo=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),To=function(e){function t(t,n,i){var r=e.call(this)||this;return r._dispatcher=t,r._reducer=n,r.source=i,r}return Eo(t,e),t.prototype.select=function(e){var t=u.map.call(this,e);return c.distinctUntilChanged.call(t)},t.prototype.lift=function(e){var n=new t(this._dispatcher,this._reducer,this);return n.operator=e,n},t.prototype.dispatch=function(e){this._dispatcher.next(e)},t.prototype.next=function(e){this._dispatcher.next(e)},t.prototype.error=function(e){this._dispatcher.error(e)},t.prototype.complete=function(){},t}(a.Observable),Ro={width:7,height:6},jo={date:new Date,mode:"day"},Ao=Object.assign(new xo,{locale:"en",view:jo,selectedRange:[],monthViewOptions:Ro}),Ho="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Lo="undefined"!=typeof window&&window,No="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Fo=void 0!==Ho&&Ho,Vo=Lo||Fo||No,Yo=Vo;!function(){if(!Vo)throw new Error("RxJS could not find any global context (window, self, global)")}();var zo,Uo,Wo={root:Yo},Bo={isArray:Array.isArray||function(e){return e&&"number"==typeof e.length}},Go={isObject:function(e){return null!=e&&"object"==typeof e}},$o={isFunction:function(e){return"function"==typeof e}},Zo={errorObject:{e:{}}},qo={tryCatch:function(e){return zo=e,bn}},Jo=Ho&&Ho.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},Ko={UnsubscriptionError:function(e){function t(t){e.call(this),this.errors=t;var n=Error.call(this,t?t.length+" errors occurred during unsubscription:\n "+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"");this.name=n.name="UnsubscriptionError",this.stack=n.stack,this.message=n.message}return Jo(t,e),t}(Error)},Qo={Subscription:function(){function e(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var e,t=!1;if(!this.closed){var n=this,i=n._parent,r=n._parents,o=n._unsubscribe,s=n._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var a=-1,c=r?r.length:0;i;)i.remove(this),i=++a<c&&r[a]||null;if($o.isFunction(o)&&(l=qo.tryCatch(o).call(this))===Zo.errorObject&&(t=!0,e=e||(Zo.errorObject.e instanceof Ko.UnsubscriptionError?wn(Zo.errorObject.e.errors):[Zo.errorObject.e])),Bo.isArray(s))for(a=-1,c=s.length;++a<c;){var u=s[a];if(Go.isObject(u)){var l=qo.tryCatch(u.unsubscribe).call(u);if(l===Zo.errorObject){t=!0,e=e||[];var p=Zo.errorObject.e;p instanceof Ko.UnsubscriptionError?e=e.concat(wn(p.errors)):e.push(p)}}}if(t)throw new Ko.UnsubscriptionError(e)}},e.prototype.add=function(t){if(!t||t===e.EMPTY)return e.EMPTY;if(t===this)return this;var n=t;switch(typeof t){case"function":n=new e(t);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var i=n;(n=new e)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.prototype._addParent=function(e){var t=this,n=t._parent,i=t._parents;n&&n!==e?i?-1===i.indexOf(e)&&i.push(e):this._parents=[e]:this._parent=e},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}()},Xo=Ho&&Ho.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},es={Action:function(e){function t(t,n){e.call(this)}return Xo(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Qo.Subscription)},ts=Ho&&Ho.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},ns={AsyncAction:function(e){function t(t,n){e.call(this,t,n),this.scheduler=t,this.work=n,this.pending=!1}return ts(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e,this.pending=!0;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Wo.root.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){return void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending?t:Wo.root.clearInterval(t)&&undefined||undefined},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,i=undefined;try{this.work(e)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(es.Action)},is=Ho&&Ho.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},rs={QueueAction:function(e){function t(t,n){e.call(this,t,n),this.scheduler=t,this.work=n}return is(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,i){return void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,i):t.flush(this)},t}(ns.AsyncAction)},os={Scheduler:function(){function e(t,n){void 0===n&&(n=e.now),this.SchedulerAction=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(n,t)},e.now=Date.now?Date.now:function(){return+new Date},e}()},ss=Ho&&Ho.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},as={AsyncScheduler:function(e){function t(){e.apply(this,arguments),this.actions=[],this.active=!1,this.scheduled=undefined}return ss(t,e),t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(os.Scheduler)},cs=Ho&&Ho.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},us=new({QueueScheduler:function(e){function t(){e.apply(this,arguments)}return cs(t,e),t}(as.AsyncScheduler)}.QueueScheduler)(rs.QueueAction),ls=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ps=function(e){function t(t,n,i){var r=e.call(this,t)||this,o=l.observeOn.call(n,us);return p.scan.call(o,function(e,t){return t?i(e,t):e},t).subscribe(function(e){return r.next(e)}),r}return ls(t,e),t}(s.BehaviorSubject),hs=4,ds=3,fs={month:1},ms=4,_s=4,ys=ms*_s,gs=-1*(Math.floor(ys/2)-1),vs={year:1},bs=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ws=function(e){function n(){var t=new s.BehaviorSubject({type:"[datepicker] dispatcher init"}),n=new ps(Ao,t,Fn);return e.call(this,t,Fn,n)||this}return bs(n,e),n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[]},n}(To),Ii=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ks=function(e){function n(n,i,r,o){var s=e.call(this)||this;return s._config=n,s._store=i,s._actions=r,s.valueChange=new t.EventEmitter,s._subs=[],s._effects=o,s}return Ii(n,e),Object.defineProperty(n.prototype,"value",{set:function(e){this._effects.setValue(e)},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var e=this;this.containerClass=this._config.containerClass,this._effects.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects(),this._subs.push(this._store.select(function(e){return e.selectedDate}).subscribe(function(t){return e.valueChange.emit(t)}))},n.prototype.daySelectHandler=function(e){e.isOtherMonth||e.isDisabled||this._store.dispatch(this._actions.select(e.date))},n.prototype.ngOnDestroy=function(){for(var e=0,t=this._subs;e<t.length;e++)t[e].unsubscribe();this._effects.destroy()},n.decorators=[{type:t.Component,args:[{selector:"bs-datepicker-container",providers:[ws,Po],template:'\x3c!-- days calendar view mode --\x3e <div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async"> <div class="bs-datepicker-container"> \x3c!--calendars--\x3e <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application"> \x3c!--days calendar--\x3e <div *ngSwitchCase="\'day\'"> <bs-days-calendar-view *ngFor="let calendar of (daysCalendar | async)" [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1" [calendar]="calendar" [options]="options | async" (onNavigate)="navigateTo($event)" (onViewMode)="setViewMode($event)" (onHover)="dayHoverHandler($event)" (onSelect)="daySelectHandler($event)" ></bs-days-calendar-view> </div> \x3c!--months calendar--\x3e <div *ngSwitchCase="\'month\'"> <bs-month-calendar-view *ngFor="let calendar of (monthsCalendar | async)" [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1" [calendar]="calendar" (onNavigate)="navigateTo($event)" (onViewMode)="setViewMode($event)" (onHover)="monthHoverHandler($event)" (onSelect)="monthSelectHandler($event)" ></bs-month-calendar-view> </div> \x3c!--years calendar--\x3e <div *ngSwitchCase="\'year\'"> <bs-years-calendar-view *ngFor="let calendar of (yearsCalendar | async)" [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1" [calendar]="calendar" (onNavigate)="navigateTo($event)" (onViewMode)="setViewMode($event)" (onHover)="yearHoverHandler($event)" (onSelect)="yearSelectHandler($event)" ></bs-years-calendar-view> </div> </div> \x3c!--applycancel buttons--\x3e <div class="bs-datepicker-buttons" *ngIf="false"> <button class="btn btn-success">Apply</button> <button class="btn btn-default">Cancel</button> </div> </div> \x3c!--custom dates or date ranges picker--\x3e <div class="bs-datepicker-custom-range" *ngIf="false"> <bs-custom-date-view [ranges]="_customRangesFish"></bs-custom-date-view> </div> </div> ',host:{"(click)":"_stopPropagation($event)",style:"position: absolute; display: block;",role:"dialog","aria-label":"calendar"}}]}],n.ctorParameters=function(){return[{type:xo},{type:ws},{type:Mo},{type:Po}]},n}(Oo),Ss=function(){function e(e,n,i,r,o){this._config=e,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.bsValueChange=new t.EventEmitter,this._subs=[],Object.assign(this,this._config),this._datepicker=o.createLoader(n,r,i),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){e?this.show():this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue!==e&&(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._datepicker.listen({outsideClick:this.outsideClick,triggers:this.triggers,show:function(){return e.show()}}),this.setConfig()},e.prototype.ngOnChanges=function(e){this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:xo,useValue:this._config}).attach(ks).to(this.container).position({attachment:this.placement}).show({placement:this.placement}),this._subs.push(this.bsValueChange.subscribe(function(t){e._datepickerRef.instance.value=t})),this._subs.push(this._datepickerRef.instance.valueChange.subscribe(function(t){e.bsValue=t,e.hide()})))},e.prototype.hide=function(){this.isOpen&&this._datepicker.hide();for(var e=0,t=this._subs;e<t.length;e++)t[e].unsubscribe()},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.setConfig=function(){this._config=Object.assign({},this._config,this.bsConfig,{value:this._bsValue,isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate})},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"[bsDatepicker]",exportAs:"bsDatepicker"}]}],e.ctorParameters=function(){return[{type:xo},{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:Li}]},e.propDecorators={placement:[{type:t.Input}],triggers:[{type:t.Input}],outsideClick:[{type:t.Input}],container:[{type:t.Input}],isOpen:[{type:t.Input}],onShown:[{type:t.Output}],onHidden:[{type:t.Output}],bsValue:[{type:t.Input}],bsConfig:[{type:t.Input}],isDisabled:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}(),Ds={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Os}),multi:!0},Cs={provide:i.NG_VALIDATORS,useExisting:t.forwardRef(function(){return Os}),multi:!0},Os=function(){function e(e,t,n,i,r){var o=this;this._picker=e,this._localeService=t,this._renderer=n,this._elRef=i,this.changeDetection=r,this._onChange=Function.prototype,this._onTouched=Function.prototype,this._validatorChange=Function.prototype,this._picker.bsValueChange.subscribe(function(e){o._setInputValue(e),o._value!==e&&(o._value=e,o._onChange(e),o._onTouched()),o.changeDetection.markForCheck()}),this._localeService.localeChange.subscribe(function(){o._setInputValue(o._value)})}return e.prototype._setInputValue=function(e){var t=e?vt(e,this._picker._config.dateInputFormat,this._localeService.currentLocale):"";this._renderer.setProperty(this._elRef.nativeElement,"value",t)},e.prototype.onChange=function(e){this.writeValue(e.target.value),this._onChange(this._value),this._onTouched()},e.prototype.validate=function(e){var t=e.value;if(null===t||t===undefined||""===t)return null;if(A(t)){if(!H(t))return{bsDate:{invalid:t}};if(this._picker&&this._picker.minDate&&Nt(t,this._picker.minDate,"date"))return{bsDate:{minDate:this._picker.minDate}};if(this._picker&&this._picker.maxDate&&Lt(t,this._picker.maxDate,"date"))return{bsDate:{maxDate:this._picker.maxDate}}}},e.prototype.registerOnValidatorChange=function(e){this._validatorChange=e},e.prototype.writeValue=function(e){if(e){var t=this._localeService.currentLocale;if(!yn(t))throw new Error('Locale "'+t+'" is not defined, please add it with "defineLocale(...)"');this._value=At(e,this._picker._config.dateInputFormat,this._localeService.currentLocale)}else this._value=null;this._picker.bsValue=this._value},e.prototype.setDisabledState=function(e){this._picker.isDisabled=e,e?this._renderer.setAttribute(this._elRef.nativeElement,"disabled","disabled"):this._renderer.removeAttribute(this._elRef.nativeElement,"disabled")},e.prototype.registerOnChange=function(e){this._onChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.onBlur=function(){this._onTouched()},e.prototype.hide=function(){this._picker.hide()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDatepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(blur)":"onBlur()"},providers:[Ds,Cs]}]}],e.ctorParameters=function(){return[{type:Ss,decorators:[{type:t.Host}]},{type:Io},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}(),xs=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ms=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.displayMonths=2,t}return xs(n,e),n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[]},n}(xo),Is=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ps=function(e){function n(n,i,r,o){var s=e.call(this)||this;return s._config=n,s._store=i,s._actions=r,s.valueChange=new t.EventEmitter,s._rangeStack=[],s._subs=[],s._effects=o,s}return Is(n,e),Object.defineProperty(n.prototype,"value",{set:function(e){this._effects.setRangeValue(e)},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var e=this;this.containerClass=this._config.containerClass,this._effects.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects(),this._subs.push(this._store.select(function(e){return e.selectedRange}).subscribe(function(t){return e.valueChange.emit(t)}))},n.prototype.daySelectHandler=function(e){e.isOtherMonth||e.isDisabled||(1===this._rangeStack.length&&(this._rangeStack=e.date>=this._rangeStack[0]?[this._rangeStack[0],e.date]:[e.date]),0===this._rangeStack.length&&(this._rangeStack=[e.date]),this._store.dispatch(this._actions.selectRange(this._rangeStack)),2===this._rangeStack.length&&(this._rangeStack=[]))},n.prototype.ngOnDestroy=function(){for(var e=0,t=this._subs;e<t.length;e++)t[e].unsubscribe();this._effects.destroy()},n.decorators=[{type:t.Component,args:[{selector:"bs-daterangepicker-container",providers:[ws,Po],template:'\x3c!-- days calendar view mode --\x3e <div class="bs-datepicker" [ngClass]="containerClass" *ngIf="viewMode | async"> <div class="bs-datepicker-container"> \x3c!--calendars--\x3e <div class="bs-calendar-container" [ngSwitch]="viewMode | async" role="application"> \x3c!--days calendar--\x3e <div *ngSwitchCase="\'day\'"> <bs-days-calendar-view *ngFor="let calendar of (daysCalendar | async)" [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1" [calendar]="calendar" [options]="options | async" (onNavigate)="navigateTo($event)" (onViewMode)="setViewMode($event)" (onHover)="dayHoverHandler($event)" (onSelect)="daySelectHandler($event)" ></bs-days-calendar-view> </div> \x3c!--months calendar--\x3e <div *ngSwitchCase="\'month\'"> <bs-month-calendar-view *ngFor="let calendar of (monthsCalendar | async)" [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1" [calendar]="calendar" (onNavigate)="navigateTo($event)" (onViewMode)="setViewMode($event)" (onHover)="monthHoverHandler($event)" (onSelect)="monthSelectHandler($event)" ></bs-month-calendar-view> </div> \x3c!--years calendar--\x3e <div *ngSwitchCase="\'year\'"> <bs-years-calendar-view *ngFor="let calendar of (yearsCalendar | async)" [class.bs-datepicker-multiple]="(daysCalendar | async)?.length > 1" [calendar]="calendar" (onNavigate)="navigateTo($event)" (onViewMode)="setViewMode($event)" (onHover)="yearHoverHandler($event)" (onSelect)="yearSelectHandler($event)" ></bs-years-calendar-view> </div> </div> \x3c!--applycancel buttons--\x3e <div class="bs-datepicker-buttons" *ngIf="false"> <button class="btn btn-success">Apply</button> <button class="btn btn-default">Cancel</button> </div> </div> \x3c!--custom dates or date ranges picker--\x3e <div class="bs-datepicker-custom-range" *ngIf="false"> <bs-custom-date-view [ranges]="_customRangesFish"></bs-custom-date-view> </div> </div> ',host:{"(click)":"_stopPropagation($event)",style:"position: absolute; display: block;",role:"dialog","aria-label":"calendar"}}]}],n.ctorParameters=function(){return[{type:xo},{type:ws},{type:Mo},{type:Po}]},n}(Oo),Es=function(){function e(e,n,i,r,o){this._config=e,this.placement="bottom",this.triggers="click",this.outsideClick=!0,this.container="body",this.bsValueChange=new t.EventEmitter,this._subs=[],this._datepicker=o.createLoader(n,r,i),Object.assign(this,e),this.onShown=this._datepicker.onShown,this.onHidden=this._datepicker.onHidden}return Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._datepicker.isShown},set:function(e){e?this.show():this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bsValue",{set:function(e){this._bsValue!==e&&(this._bsValue=e,this.bsValueChange.emit(e))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._datepicker.listen({outsideClick:this.outsideClick,triggers:this.triggers,show:function(){return e.show()}}),this.setConfig()},e.prototype.ngOnChanges=function(e){this._datepickerRef&&this._datepickerRef.instance&&(e.minDate&&(this._datepickerRef.instance.minDate=this.minDate),e.maxDate&&(this._datepickerRef.instance.maxDate=this.maxDate),e.isDisabled&&(this._datepickerRef.instance.isDisabled=this.isDisabled))},e.prototype.show=function(){var e=this;this._datepicker.isShown||(this.setConfig(),this._datepickerRef=this._datepicker.provide({provide:xo,useValue:this._config}).attach(Ps).to(this.container).position({attachment:this.placement}).show({placement:this.placement}),this._subs.push(this.bsValueChange.subscribe(function(t){e._datepickerRef.instance.value=t})),this._subs.push(this._datepickerRef.instance.valueChange.filter(function(e){return e&&e[0]&&!!e[1]}).subscribe(function(t){e.bsValue=t,e.hide()})))},e.prototype.setConfig=function(){this._config=Object.assign({},this._config,this.bsConfig,{value:this._bsValue,isDisabled:this.isDisabled,minDate:this.minDate||this.bsConfig&&this.bsConfig.minDate,maxDate:this.maxDate||this.bsConfig&&this.bsConfig.maxDate})},e.prototype.hide=function(){this.isOpen&&this._datepicker.hide();for(var e=0,t=this._subs;e<t.length;e++)t[e].unsubscribe()},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.ngOnDestroy=function(){this._datepicker.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"[bsDaterangepicker]",exportAs:"bsDaterangepicker"}]}],e.ctorParameters=function(){return[{type:Ms},{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:Li}]},e.propDecorators={placement:[{type:t.Input}],triggers:[{type:t.Input}],outsideClick:[{type:t.Input}],container:[{type:t.Input}],isOpen:[{type:t.Input}],onShown:[{type:t.Output}],onHidden:[{type:t.Output}],bsValue:[{type:t.Input}],bsConfig:[{type:t.Input}],isDisabled:[{type:t.Input}],minDate:[{type:t.Input}],maxDate:[{type:t.Input}],bsValueChange:[{type:t.Output}]},e}(),Ts={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return js}),multi:!0},Rs={provide:i.NG_VALIDATORS,useExisting:t.forwardRef(function(){return js}),multi:!0},js=function(){function e(e,t,n,i,r){var o=this;this._picker=e,this._localeService=t,this._renderer=n,this._elRef=i,this.changeDetection=r,this._onChange=Function.prototype,this._onTouched=Function.prototype,this._validatorChange=Function.prototype,this._picker.bsValueChange.subscribe(function(e){o._setInputValue(e),o._value!==e&&(o._value=e,o._onChange(e),o._onTouched()),o.changeDetection.markForCheck()}),this._localeService.localeChange.subscribe(function(){o._setInputValue(o._value)})}return e.prototype._setInputValue=function(e){var t="";if(e){var n=e[0]?vt(e[0],this._picker._config.rangeInputFormat,this._localeService.currentLocale):"",i=e[1]?vt(e[1],this._picker._config.rangeInputFormat,this._localeService.currentLocale):"";t=n&&i?n+this._picker._config.rangeSeparator+i:""}this._renderer.setProperty(this._elRef.nativeElement,"value",t)},e.prototype.onChange=function(e){this.writeValue(e.target.value),this._onChange(this._value),this._onTouched()},e.prototype.validate=function(e){var t=e.value;return null!==t&&t!==undefined&&F(t)?H(t[0])&&H(t[0])?this._picker&&this._picker.minDate&&Nt(t[0],this._picker.minDate,"date")?{bsDate:{minDate:this._picker.minDate}}:this._picker&&this._picker.maxDate&&Lt(t[1],this._picker.maxDate,"date")?{bsDate:{maxDate:this._picker.maxDate}}:void 0:{bsDate:{invalid:t}}:null},e.prototype.registerOnValidatorChange=function(e){this._validatorChange=e},e.prototype.writeValue=function(e){var t=this;if(e){var n=this._localeService.currentLocale;if(!yn(n))throw new Error('Locale "'+n+'" is not defined, please add it with "defineLocale(...)"');var i=[];"string"==typeof e&&(i=e.split(this._picker._config.rangeSeparator)),Array.isArray(e)&&(i=e),this._value=i.map(function(e){return At(e,t._picker._config.dateInputFormat,t._localeService.currentLocale)}).map(function(e){return isNaN(e.valueOf())?null:e})}else this._value=null;this._picker.bsValue=this._value},e.prototype.setDisabledState=function(e){this._picker.isDisabled=e,e?this._renderer.setAttribute(this._elRef.nativeElement,"disabled","disabled"):this._renderer.removeAttribute(this._elRef.nativeElement,"disabled")},e.prototype.registerOnChange=function(e){this._onChange=e},e.prototype.registerOnTouched=function(e){this._onTouched=e},e.prototype.onBlur=function(){this._onTouched()},e.prototype.hide=function(){this._picker.hide()},e.decorators=[{type:t.Directive,args:[{selector:"input[bsDaterangepicker]",host:{"(change)":"onChange($event)","(keyup.esc)":"hide()","(blur)":"onBlur()"},providers:[Ts,Rs]}]}],e.ctorParameters=function(){return[{type:Es,decorators:[{type:t.Host}]},{type:Io},{type:t.Renderer2},{type:t.ElementRef},{type:t.ChangeDetectorRef}]},e}(),As=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-calendar-layout",template:'\n \x3c!-- current date, will be added in nearest releases --\x3e\n <bs-current-date title="hey there" *ngIf="false"></bs-current-date>\n\n \x3c!--navigation--\x3e\n <div class="bs-datepicker-head">\n <ng-content select="bs-datepicker-navigation-view"></ng-content>\n </div>\n\n <div class="bs-datepicker-body">\n <ng-content></ng-content>\n </div>\n\n \x3c!--timepicker--\x3e\n <bs-timepicker *ngIf="false"></bs-timepicker>\n '}]}],e.ctorParameters=function(){return[]},e}(),Hs=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-current-date",template:'<div class="current-timedate"><span>{{ title }}</span></div>'}]}],e.ctorParameters=function(){return[]},e.propDecorators={title:[{type:t.Input}]},e}(),Ls=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"bs-custom-date-view",template:'\n <div class="bs-datepicker-predefined-btns">\n <button *ngFor="let range of ranges">{{ range.label }}</button>\n <button *ngIf="isCustomRangeShown">Custom Range</button>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[]},e.propDecorators={isCustomRangeShown:[{type:t.Input}],ranges:[{type:t.Input}]},e}(),Ns=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"[bsDatepickerDayDecorator]",changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[class.disabled]":"day.isDisabled","[class.is-highlighted]":"day.isHovered","[class.is-other-month]":"day.isOtherMonth","[class.in-range]":"day.isInRange","[class.select-start]":"day.isSelectionStart","[class.select-end]":"day.isSelectionEnd","[class.selected]":"day.isSelected"},template:"{{ day.label }}"}]}],e.ctorParameters=function(){return[]},e.propDecorators={day:[{type:t.Input}]},e}();!function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN"}(Uo||(Uo={}));var Fs=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter}return e.prototype.navTo=function(e){this.onNavigate.emit(e?Uo.DOWN:Uo.UP)},e.prototype.view=function(e){this.onViewMode.emit(e)},e.decorators=[{type:t.Component,args:[{selector:"bs-datepicker-navigation-view",changeDetection:t.ChangeDetectionStrategy.OnPush,template:'\n <button class="previous"\n [disabled]="calendar.disableLeftArrow"\n [style.visibility]="calendar.hideLeftArrow ? \'hidden\' : \'visible\'"\n (click)="navTo(true)"><span>‹</span>\n </button>\n\n <button class="current"\n *ngIf="calendar.monthTitle"\n (click)="view(\'month\')"\n ><span>{{ calendar.monthTitle }}</span>\n </button>\n\n <button class="current" (click)="view(\'year\')"\n ><span>{{ calendar.yearTitle }}</span></button>\n\n <button class="next"\n [disabled]="calendar.disableRightArrow"\n [style.visibility]="calendar.hideRightArrow ? \'hidden\' : \'visible\'"\n (click)="navTo(false)"><span>›</span>\n </button>\n '}]}],e.ctorParameters=function(){return[]},e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}]},e}(),Vs=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onHover=new t.EventEmitter}return e.prototype.navigateTo=function(e){var t=Uo.DOWN===e?-1:1;this.onNavigate.emit({step:{month:t}})},e.prototype.changeViewMode=function(e){this.onViewMode.emit(e)},e.prototype.selectDay=function(e){this.onSelect.emit(e)},e.prototype.hoverDay=function(e,t){this.onHover.emit({cell:e,isHovered:t})},e.decorators=[{type:t.Component,args:[{selector:"bs-days-calendar-view",template:'\n <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n \x3c!--days matrix--\x3e\n <table role="grid" class="days weeks">\n <thead>\n <tr>\n \x3c!--if show weeks--\x3e\n <th *ngIf="options.showWeekNumbers"></th>\n <th *ngFor="let weekday of calendar.weekdays; let i = index"\n aria-label="weekday">{{ calendar.weekdays[i] }}\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor="let week of calendar.weeks; let i = index">\n <td class="week" *ngIf="options.showWeekNumbers">\n <span>{{ calendar.weekNumbers[i] }}</span>\n </td>\n <td *ngFor="let day of week.days" role="gridcell">\n <span bsDatepickerDayDecorator\n [day]="day"\n (click)="selectDay(day)"\n (mouseenter)="hoverDay(day, true)"\n (mouseleave)="hoverDay(day, false)">{{ day.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n\n </bs-calendar-layout>\n '}]}],e.ctorParameters=function(){return[]},e.propDecorators={calendar:[{type:t.Input}],options:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}(),Ys=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onHover=new t.EventEmitter}return e.prototype.navigateTo=function(e){var t=Uo.DOWN===e?-1:1;this.onNavigate.emit({step:{year:t}})},e.prototype.viewMonth=function(e){this.onSelect.emit(e)},e.prototype.hoverMonth=function(e,t){this.onHover.emit({cell:e,isHovered:t})},e.prototype.changeViewMode=function(e){this.onViewMode.emit(e)},e.decorators=[{type:t.Component,args:[{selector:"bs-month-calendar-view",template:'\n <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n <table role="grid" class="months">\n <tbody>\n <tr *ngFor="let row of calendar.months">\n <td *ngFor="let month of row" role="gridcell"\n (click)="viewMonth(month)"\n (mouseenter)="hoverMonth(month, true)"\n (mouseleave)="hoverMonth(month, false)"\n [class.disabled]="month.isDisabled"\n [class.is-highlighted]="month.isHovered">\n <span>{{ month.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </bs-calendar-layout>\n '}]}],e.ctorParameters=function(){return[]},e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}(),zs=function(){function e(){this.ampm="ok",this.hours=0,this.minutes=0}return e.decorators=[{type:t.Component,args:[{selector:"bs-timepicker",template:'\n <div class="bs-timepicker-container">\n <div class="bs-timepicker-controls">\n <button class="bs-decrease">-</button>\n <input type="text" [value]="hours" placeholder="00">\n <button class="bs-increase">+</button>\n </div>\n <div class="bs-timepicker-controls">\n <button class="bs-decrease">-</button>\n <input type="text" [value]="minutes" placeholder="00">\n <button class="bs-increase">+</button>\n </div>\n <button class="switch-time-format">{{ ampm }}\n <img\n src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg=="\n alt="">\n </button>\n </div>\n '}]}],e.ctorParameters=function(){return[]},e}(),Us=function(){function e(){this.onNavigate=new t.EventEmitter,this.onViewMode=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onHover=new t.EventEmitter}return e.prototype.navigateTo=function(e){var t=Uo.DOWN===e?-1:1;this.onNavigate.emit({step:{year:t*ys}})},e.prototype.viewYear=function(e){this.onSelect.emit(e)},e.prototype.hoverYear=function(e,t){this.onHover.emit({cell:e,isHovered:t})},e.prototype.changeViewMode=function(e){this.onViewMode.emit(e)},e.decorators=[{type:t.Component,args:[{selector:"bs-years-calendar-view",template:'\n <bs-calendar-layout>\n <bs-datepicker-navigation-view\n [calendar]="calendar"\n (onNavigate)="navigateTo($event)"\n (onViewMode)="changeViewMode($event)"\n ></bs-datepicker-navigation-view>\n\n <table role="grid" class="years">\n <tbody>\n <tr *ngFor="let row of calendar.years">\n <td *ngFor="let year of row" role="gridcell"\n (click)="viewYear(year)"\n (mouseenter)="hoverYear(year, true)"\n (mouseleave)="hoverYear(year, false)"\n [class.disabled]="year.isDisabled"\n [class.is-highlighted]="year.isHovered">\n <span>{{ year.label }}</span>\n </td>\n </tr>\n </tbody>\n </table>\n </bs-calendar-layout>\n '}]}],e.ctorParameters=function(){return[]},e.propDecorators={calendar:[{type:t.Input}],onNavigate:[{type:t.Output}],onViewMode:[{type:t.Output}],onSelect:[{type:t.Output}],onHover:[{type:t.Output}]},e}(),Ws=[ks,Ps,Ss,Os,js,Es],Bs=(function(){function e(){vn("BsDatepickerModule is under development,\n BREAKING CHANGES are possible,\n PLEASE, read changelog")}e.forRoot=function(){return{ngModule:e,providers:[Li,Hi,ws,Mo,xo,Ms,Po,Io]}},e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule],declarations:[Ns,Hs,Fs,zs,As,Vs,Ys,Us,Ls].concat(Ws),entryComponents:[ks,Ps],exports:Ws}]}],e.ctorParameters=function(){return[]}}(),{backdrop:!0,keyboard:!0,focus:!0,show:!1,ignoreBackdropClick:!1,"class":"",animated:!0,initialState:{}}),Gs={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",IN:"in",SHOW:"show"},$s={BACKRDOP:"backdrop-click",ESC:"esc"},Zs=function(){function e(e,t){this._isShown=!1,this.element=e,this.renderer=t}return Object.defineProperty(e.prototype,"isAnimated",{get:function(){return this._isAnimated},set:function(e){this._isAnimated=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isShown",{get:function(){return this._isShown},set:function(e){this._isShown=e,e?this.renderer.addClass(this.element.nativeElement,""+Gs.IN):this.renderer.removeClass(this.element.nativeElement,""+Gs.IN),M()||(e?this.renderer.addClass(this.element.nativeElement,""+Gs.SHOW):this.renderer.removeClass(this.element.nativeElement,""+Gs.SHOW))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.isAnimated&&(this.renderer.addClass(this.element.nativeElement,""+Gs.FADE),yo.reflow(this.element.nativeElement)),this.isShown=!0},e.decorators=[{type:t.Component,args:[{selector:"bs-modal-backdrop",template:" ",host:{"class":Gs.BACKDROP}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e}(),qs=(function(){function e(e,n,i,r){this._element=e,this._renderer=i,this.onShow=new t.EventEmitter,this.onShown=new t.EventEmitter,this.onHide=new t.EventEmitter,this.onHidden=new t.EventEmitter,this._isShown=!1,this.isBodyOverflowing=!1,this.originalBodyPadding=0,this.scrollbarWidth=0,this.timerHideModal=0,this.timerRmBackDrop=0,this.isNested=!1,this._backdrop=r.createLoader(e,n,i)}Object.defineProperty(e.prototype,"config",{get:function(){return this._config},set:function(e){this._config=this.getConfig(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isShown",{get:function(){return this._isShown},enumerable:!0,configurable:!0}),e.prototype.onClick=function(e){this.config.ignoreBackdropClick||"static"===this.config.backdrop||e.target!==this._element.nativeElement||(this.dismissReason=$s.BACKRDOP,this.hide(e))},e.prototype.onEsc=function(e){this._isShown&&(27===e.keyCode&&e.preventDefault(),this.config.keyboard&&(this.dismissReason=$s.ESC,this.hide()))},e.prototype.ngOnDestroy=function(){this.config=void 0,this._isShown&&(this._isShown=!1,this.hideModal(),this._backdrop.dispose())},e.prototype.ngOnInit=function(){var e=this;this._config=this._config||this.getConfig(),setTimeout(function(){e._config.show&&e.show()},0)},e.prototype.toggle=function(){return this._isShown?this.hide():this.show()},e.prototype.show=function(){var e=this;this.dismissReason=null,this.onShow.emit(this),this._isShown||(clearTimeout(this.timerHideModal),clearTimeout(this.timerRmBackDrop),this._isShown=!0,this.checkScrollbar(),this.setScrollbar(),Fi&&Fi.body&&(Fi.body.classList.contains(Gs.OPEN)?this.isNested=!0:this._renderer.addClass(Fi.body,Gs.OPEN)),this.showBackdrop(function(){e.showElement()}))},e.prototype.hide=function(e){var t=this;e&&e.preventDefault(),this.onHide.emit(this),this._isShown&&(clearTimeout(this.timerHideModal),clearTimeout(this.timerRmBackDrop),this._isShown=!1,this._renderer.removeClass(this._element.nativeElement,Gs.IN),M()||this._renderer.removeClass(this._element.nativeElement,Gs.SHOW),this._config.animated?this.timerHideModal=setTimeout(function(){return t.hideModal()},300):this.hideModal())},e.prototype.getConfig=function(e){return Object.assign({},Bs,e)},e.prototype.showElement=function(){var e=this;this._element.nativeElement.parentNode&&this._element.nativeElement.parentNode.nodeType===Node.ELEMENT_NODE||Fi&&Fi.body&&Fi.body.appendChild(this._element.nativeElement),this._renderer.setAttribute(this._element.nativeElement,"aria-hidden","false"),this._renderer.setAttribute(this._element.nativeElement,"aria-modal","true"),this._renderer.setStyle(this._element.nativeElement,"display","block"),this._renderer.setProperty(this._element.nativeElement,"scrollTop",0),this._config.animated&&yo.reflow(this._element.nativeElement),this._renderer.addClass(this._element.nativeElement,Gs.IN),M()||this._renderer.addClass(this._element.nativeElement,Gs.SHOW);var t=function(){e._config.focus&&e._element.nativeElement.focus(),e.onShown.emit(e)};this._config.animated?setTimeout(t,300):t()},e.prototype.hideModal=function(){var e=this;this._renderer.setAttribute(this._element.nativeElement,"aria-hidden","true"),this._renderer.setStyle(this._element.nativeElement,"display","none"),this.showBackdrop(function(){e.isNested||(Fi&&Fi.body&&e._renderer.removeClass(Fi.body,Gs.OPEN),e.resetScrollbar()),e.resetAdjustments(),e.focusOtherModal(),e.onHidden.emit(e)})},e.prototype.showBackdrop=function(e){var t=this;if(!this._isShown||!this.config.backdrop||this.backdrop&&this.backdrop.instance.isShown)if(!this._isShown&&this.backdrop){this.backdrop.instance.isShown=!1;var n=function(){t.removeBackdrop(),e&&e()};this.backdrop.instance.isAnimated?this.timerRmBackDrop=setTimeout(n,150):n()}else e&&e();else{if(this.removeBackdrop(),this._backdrop.attach(Zs).to("body").show({isAnimated:this._config.animated}),this.backdrop=this._backdrop._componentRef,!e)return;if(!this._config.animated)return void e();setTimeout(e,150)}},e.prototype.removeBackdrop=function(){this._backdrop.hide()},e.prototype.focusOtherModal=function(){if(null!=this._element.nativeElement.parentElement){var e=this._element.nativeElement.parentElement.querySelectorAll(".in[bsModal]");e.length&&e[e.length-1].focus()}},e.prototype.resetAdjustments=function(){this._renderer.setStyle(this._element.nativeElement,"paddingLeft",""),this._renderer.setStyle(this._element.nativeElement,"paddingRight","")},e.prototype.checkScrollbar=function(){this.isBodyOverflowing=Fi.body.clientWidth<Ni.innerWidth,this.scrollbarWidth=this.getScrollbarWidth()},e.prototype.setScrollbar=function(){Fi&&(this.originalBodyPadding=parseInt(Ni.getComputedStyle(Fi.body).getPropertyValue("padding-right")||0,10),this.isBodyOverflowing&&(Fi.body.style.paddingRight=this.originalBodyPadding+this.scrollbarWidth+"px"))},e.prototype.resetScrollbar=function(){Fi.body.style.paddingRight=this.originalBodyPadding+"px"},e.prototype.getScrollbarWidth=function(){var e=this._renderer.createElement("div");this._renderer.addClass(e,Gs.SCROLLBAR_MEASURER),this._renderer.appendChild(Fi.body,e);var t=e.offsetWidth-e.clientWidth;return this._renderer.removeChild(Fi.body,e),t},e.decorators=[{type:t.Directive,args:[{selector:"[bsModal]",exportAs:"bs-modal"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ViewContainerRef},{type:t.Renderer2},{type:Li}]},e.propDecorators={config:[{type:t.Input}],onShow:[{type:t.Output}],onShown:[{type:t.Output}],onHide:[{type:t.Output}],onHidden:[{type:t.Output}],onClick:[{type:t.HostListener,args:["click",["$event"]]}],onEsc:[{type:t.HostListener,args:["keydown.esc",["$event"]]}]}}(),function(){function e(){this.autoClose=!0}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}()),Js=function(){function e(){var e=this;this.direction="down",this.isOpenChange=new t.EventEmitter,this.isDisabledChange=new t.EventEmitter,this.toggleClick=new t.EventEmitter,this.dropdownMenu=new Promise(function(t){e.resolveDropdownMenu=t})}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),Ks=function(){function e(e,t,n,i){var r=this;this._state=e,this.cd=t,this._renderer=n,this.isOpen=!1,this._subscription=e.isOpenChange.subscribe(function(e){r.isOpen=e;var t=i.nativeElement.querySelector(".dropdown-menu");t&&!M()&&(r._renderer.addClass(t,"show"),t.classList.contains("dropdown-menu-right")&&(r._renderer.setStyle(t,"left","auto"),r._renderer.setStyle(t,"right","0")),"up"===r.direction&&(r._renderer.setStyle(t,"top","auto"),r._renderer.setStyle(t,"transform","translateY(-101%)"))),r.cd.markForCheck(),r.cd.detectChanges()})}return Object.defineProperty(e.prototype,"direction",{get:function(){return this._state.direction},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.decorators=[{type:t.Component,args:[{selector:"bs-dropdown-container",changeDetection:t.ChangeDetectionStrategy.OnPush,host:{style:"display:block;position: absolute;"},template:'\n <div [class.dropup]="direction === \'up\'"\n [class.dropdown]="direction === \'down\'"\n [class.show]="isOpen"\n [class.open]="isOpen"><ng-content></ng-content></div>\n '}]}],e.ctorParameters=function(){return[{type:Js},{type:t.ChangeDetectorRef},{type:t.Renderer2},{type:t.ElementRef}]},e}(),Qs=(function(){function e(e,t,n,i,r,o){this._elementRef=e,this._renderer=t,this._viewContainerRef=n,this._cis=i,this._config=r,this._state=o,this._isInlineOpen=!1,this._subscriptions=[],this._isInited=!1,this._state.autoClose=this._config.autoClose,this._dropdown=this._cis.createLoader(this._elementRef,this._viewContainerRef,this._renderer).provide({provide:Js,useValue:this._state}),this.onShown=this._dropdown.onShown,this.onHidden=this._dropdown.onHidden,this.isOpenChange=this._state.isOpenChange}Object.defineProperty(e.prototype,"autoClose",{get:function(){return this._state.autoClose},set:function(e){this._state.autoClose=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this._isDisabled},set:function(e){this._isDisabled=e,this._state.isDisabledChange.emit(e),e&&this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._showInline?this._isInlineOpen:this._dropdown.isShown},set:function(e){e?this.show():this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBs4",{get:function(){return!M()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_showInline",{get:function(){return!this.container},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._isInited||(this._isInited=!0,this._dropdown.listen({outsideClick:!1,triggers:this.triggers,show:function(){return e.show()}}),this._subscriptions.push(this._state.toggleClick.subscribe(function(t){return e.toggle(t)})),this._subscriptions.push(this._state.isDisabledChange.filter(function(e){return e}).subscribe(function(t){return e.hide()})))},e.prototype.show=function(){var e=this;if(!this.isOpen&&!this.isDisabled)return this._showInline?(this._inlinedMenu||this._state.dropdownMenu.then(function(t){e._dropdown.attachInline(t.viewContainer,t.templateRef),e._inlinedMenu=e._dropdown._inlineViewRef,e.addBs4Polyfills()})["catch"](),this.addBs4Polyfills(),this._isInlineOpen=!0,this.onShown.emit(!0),void this._state.isOpenChange.emit(!0)):void this._state.dropdownMenu.then(function(t){var n=e.dropup||"undefined"!=typeof e.dropup&&e.dropup;e._state.direction=n?"up":"down";var i=e.placement||(n?"top left":"bottom left");e._dropdown.attach(Ks).to(e.container).position({attachment:i}).show({content:t.templateRef,placement:i}),e._state.isOpenChange.emit(!0)})["catch"]()},e.prototype.hide=function(){this.isOpen&&(this._showInline?(this.removeShowClass(),this.removeDropupStyles(),this._isInlineOpen=!1,this.onHidden.emit(!0)):this._dropdown.hide(),this._state.isOpenChange.emit(!1))},e.prototype.toggle=function(e){return this.isOpen||!e?this.hide():this.show()},e.prototype.ngOnDestroy=function(){for(var e=0,t=this._subscriptions;e<t.length;e++)t[e].unsubscribe();this._dropdown.dispose()},e.prototype.addBs4Polyfills=function(){M()||(this.addShowClass(),this.checkRightAlignment(),this.addDropupStyles())},e.prototype.addShowClass=function(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.addClass(this._inlinedMenu.rootNodes[0],"show")},e.prototype.removeShowClass=function(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&this._renderer.removeClass(this._inlinedMenu.rootNodes[0],"show")},e.prototype.checkRightAlignment=function(){if(this._inlinedMenu&&this._inlinedMenu.rootNodes[0]){var e=this._inlinedMenu.rootNodes[0].classList.contains("dropdown-menu-right");this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"left",e?"auto":"0"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"right",e?"0":"auto")}},e.prototype.addDropupStyles=function(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"top",this.dropup?"auto":"100%"),this._renderer.setStyle(this._inlinedMenu.rootNodes[0],"transform",this.dropup?"translateY(-101%)":"translateY(0)"))},e.prototype.removeDropupStyles=function(){this._inlinedMenu&&this._inlinedMenu.rootNodes[0]&&(this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"top"),this._renderer.removeStyle(this._inlinedMenu.rootNodes[0],"transform"))},e.decorators=[{type:t.Directive,args:[{selector:"[bsDropdown],[dropdown]",exportAs:"bs-dropdown",providers:[Js],host:{"[class.dropup]":"dropup","[class.open]":"isOpen","[class.show]":"isOpen && isBs4"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ViewContainerRef},{type:Li},{type:qs},{type:Js}]},e.propDecorators={placement:[{type:t.Input}],triggers:[{type:t.Input}],container:[{type:t.Input}],dropup:[{type:t.Input}],autoClose:[{type:t.Input}],isDisabled:[{type:t.Input}],isOpen:[{type:t.Input}],isOpenChange:[{type:t.Output}],onShown:[{type:t.Output}],onHidden:[{type:t.Output}]}}(),function(){function e(){this.main={maxSize:void 0,itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",pageBtnClass:"",rotate:!0},this.pager={itemsPerPage:15,previousText:"« Previous",nextText:"Next »",pageBtnClass:"",align:!0}}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}()),Xs={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return ea}),multi:!0},ea=function(){function e(e,n,i,r){this.renderer=e,this.elementRef=n,this.changeDetection=r,this.numPages=new t.EventEmitter,this.pageChanged=new t.EventEmitter,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.inited=!1,this._page=1,this.renderer=e,this.elementRef=n,this.config||this.configureOptions(Object.assign({},i.main,i.pager))}return Object.defineProperty(e.prototype,"itemsPerPage",{get:function(){return this._itemsPerPage},set:function(e){this._itemsPerPage=e,this.totalPages=this.calculateTotalPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalItems",{get:function(){return this._totalItems},set:function(e){this._totalItems=e,this.totalPages=this.calculateTotalPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalPages",{get:function(){return this._totalPages},set:function(e){this._totalPages=e,this.numPages.emit(e),this.inited&&this.selectPage(this.page)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){var t=this._page;this._page=e>this.totalPages?this.totalPages:e||1,this.changeDetection.markForCheck(),t!==this._page&&void 0!==t&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})},enumerable:!0,configurable:!0}),e.prototype.configureOptions=function(e){this.config=Object.assign({},e)},e.prototype.ngOnInit=function(){"undefined"!=typeof window&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),this.maxSize="undefined"!=typeof this.maxSize?this.maxSize:this.config.maxSize,this.rotate="undefined"!=typeof this.rotate?this.rotate:this.config.rotate,this.boundaryLinks="undefined"!=typeof this.boundaryLinks?this.boundaryLinks:this.config.boundaryLinks,this.directionLinks="undefined"!=typeof this.directionLinks?this.directionLinks:this.config.directionLinks,this.pageBtnClass="undefined"!=typeof this.pageBtnClass?this.pageBtnClass:this.config.pageBtnClass,this.itemsPerPage="undefined"!=typeof this.itemsPerPage?this.itemsPerPage:this.config.itemsPerPage,this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0},e.prototype.writeValue=function(e){this.page=e,this.pages=this.getPages(this.page,this.totalPages)},e.prototype.getText=function(e){return this[e+"Text"]||this.config[e+"Text"]},e.prototype.noPrevious=function(){return 1===this.page},e.prototype.noNext=function(){return this.page===this.totalPages},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.selectPage=function(e,t){t&&t.preventDefault(),this.disabled||(t&&t.target&&t.target.blur(),this.writeValue(e),this.onChange(this.page))},e.prototype.makePage=function(e,t,n){return{text:t,number:e,active:n}},e.prototype.getPages=function(e,t){var n=[],i=1,r=t,o="undefined"!=typeof this.maxSize&&this.maxSize<t;o&&(this.rotate?(r=(i=Math.max(e-Math.floor(this.maxSize/2),1))+this.maxSize-1)>t&&(i=(r=t)-this.maxSize+1):(i=(Math.ceil(e/this.maxSize)-1)*this.maxSize+1,r=Math.min(i+this.maxSize-1,t)));for(var s=i;s<=r;s++){var a=this.makePage(s,s.toString(),s===e);n.push(a)}if(o&&!this.rotate){if(i>1){var c=this.makePage(i-1,"...",!1);n.unshift(c)}if(r<t){var u=this.makePage(r+1,"...",!1);n.push(u)}}return n},e.prototype.calculateTotalPages=function(){var e=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(e||0,1)},e.decorators=[{type:t.Component,args:[{selector:"pager",template:'<ul class="pager"> <li [class.disabled]="noPrevious()" [class.previous]="align" [ngClass]="{\'pull-right\': align, \'float-right\': align}" class="{{ pageBtnClass }}"> <a href (click)="selectPage(page - 1, $event)">{{ getText(\'previous\') }}</a> </li> <li [class.disabled]="noNext()" [class.next]="align" [ngClass]="{\'pull-right\': align, \'float-right\': align}" class="{{ pageBtnClass }}"> <a href (click)="selectPage(page + 1, $event)">{{ getText(\'next\') }}</a> </li> </ul> ',providers:[Xs]}]}],e.ctorParameters=function(){return[{type:t.Renderer2},{type:t.ElementRef},{type:Qs},{type:t.ChangeDetectorRef}]},e.propDecorators={align:[{type:t.Input}],maxSize:[{type:t.Input}],boundaryLinks:[{type:t.Input}],directionLinks:[{type:t.Input}],firstText:[{type:t.Input}],previousText:[{type:t.Input}],nextText:[{type:t.Input}],lastText:[{type:t.Input}],rotate:[{type:t.Input}],pageBtnClass:[{type:t.Input}],disabled:[{type:t.Input}],numPages:[{type:t.Output}],pageChanged:[{type:t.Output}],itemsPerPage:[{type:t.Input}],totalItems:[{type:t.Input}]},e}(),ta={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return na}),multi:!0},na=function(){function e(e,n,i,r){this.renderer=e,this.elementRef=n,this.changeDetection=r,this.numPages=new t.EventEmitter,this.pageChanged=new t.EventEmitter,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.inited=!1,this._page=1,this.renderer=e,this.elementRef=n,this.config||this.configureOptions(i.main)}return Object.defineProperty(e.prototype,"itemsPerPage",{get:function(){return this._itemsPerPage},set:function(e){this._itemsPerPage=e,this.totalPages=this.calculateTotalPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalItems",{get:function(){return this._totalItems},set:function(e){this._totalItems=e,this.totalPages=this.calculateTotalPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalPages",{get:function(){return this._totalPages},set:function(e){this._totalPages=e,this.numPages.emit(e),this.inited&&this.selectPage(this.page)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){var t=this._page;this._page=e>this.totalPages?this.totalPages:e||1,this.changeDetection.markForCheck(),t!==this._page&&void 0!==t&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})},enumerable:!0,configurable:!0}),e.prototype.configureOptions=function(e){this.config=Object.assign({},e)},e.prototype.ngOnInit=function(){"undefined"!=typeof window&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),this.maxSize="undefined"!=typeof this.maxSize?this.maxSize:this.config.maxSize,this.rotate="undefined"!=typeof this.rotate?this.rotate:this.config.rotate,this.boundaryLinks="undefined"!=typeof this.boundaryLinks?this.boundaryLinks:this.config.boundaryLinks,this.directionLinks="undefined"!=typeof this.directionLinks?this.directionLinks:this.config.directionLinks,this.pageBtnClass="undefined"!=typeof this.pageBtnClass?this.pageBtnClass:this.config.pageBtnClass,this.itemsPerPage="undefined"!=typeof this.itemsPerPage?this.itemsPerPage:this.config.itemsPerPage,this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0},e.prototype.writeValue=function(e){this.page=e,this.pages=this.getPages(this.page,this.totalPages)},e.prototype.getText=function(e){return this[e+"Text"]||this.config[e+"Text"]},e.prototype.noPrevious=function(){return 1===this.page},e.prototype.noNext=function(){return this.page===this.totalPages},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.selectPage=function(e,t){t&&t.preventDefault(),this.disabled||(t&&t.target&&t.target.blur(),this.writeValue(e),this.onChange(this.page))},e.prototype.makePage=function(e,t,n){return{text:t,number:e,active:n}},e.prototype.getPages=function(e,t){var n=[],i=1,r=t,o="undefined"!=typeof this.maxSize&&this.maxSize<t;o&&(this.rotate?(r=(i=Math.max(e-Math.floor(this.maxSize/2),1))+this.maxSize-1)>t&&(i=(r=t)-this.maxSize+1):(i=(Math.ceil(e/this.maxSize)-1)*this.maxSize+1,r=Math.min(i+this.maxSize-1,t)));for(var s=i;s<=r;s++){var a=this.makePage(s,s.toString(),s===e);n.push(a)}if(o&&!this.rotate){if(i>1){var c=this.makePage(i-1,"...",!1);n.unshift(c)}if(r<t){var u=this.makePage(r+1,"...",!1);n.push(u)}}return n},e.prototype.calculateTotalPages=function(){var e=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(e||0,1)},e.decorators=[{type:t.Component,args:[{selector:"pagination",template:'<ul class="pagination" [ngClass]="classMap"> <li class="pagination-first page-item" *ngIf="boundaryLinks" [class.disabled]="noPrevious()||disabled"> <a class="page-link" href (click)="selectPage(1, $event)" [innerHTML]="getText(\'first\')"></a> </li> <li class="pagination-prev page-item" *ngIf="directionLinks" [class.disabled]="noPrevious()||disabled"> <a class="page-link" href (click)="selectPage(page - 1, $event)" [innerHTML]="getText(\'previous\')"></a> </li> <li *ngFor="let pg of pages" [class.active]="pg.active" [class.disabled]="disabled&&!pg.active" class="pagination-page page-item"> <a class="page-link" href (click)="selectPage(pg.number, $event)" [innerHTML]="pg.text"></a> </li> <li class="pagination-next page-item" *ngIf="directionLinks" [class.disabled]="noNext()||disabled"> <a class="page-link" href (click)="selectPage(page + 1, $event)" [innerHTML]="getText(\'next\')"></a></li> <li class="pagination-last page-item" *ngIf="boundaryLinks" [class.disabled]="noNext()||disabled"> <a class="page-link" href (click)="selectPage(totalPages, $event)" [innerHTML]="getText(\'last\')"></a></li> </ul> ',providers:[ta]}]}],e.ctorParameters=function(){return[{type:t.Renderer2},{type:t.ElementRef},{type:Qs},{type:t.ChangeDetectorRef}]},e.propDecorators={align:[{type:t.Input}],maxSize:[{type:t.Input}],boundaryLinks:[{type:t.Input}],directionLinks:[{type:t.Input}],firstText:[{type:t.Input}],previousText:[{type:t.Input}],nextText:[{type:t.Input}],lastText:[{type:t.Input}],rotate:[{type:t.Input}],pageBtnClass:[{type:t.Input}],disabled:[{type:t.Input}],numPages:[{type:t.Output}],pageChanged:[{type:t.Output}],itemsPerPage:[{type:t.Input}],totalItems:[{type:t.Input}]},e}(),ia=function(){function e(){this.animate=!1,this.max=100}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),ra=function(){function e(e){this.isStacked=!1,this.addClass=!0,this.bars=[],this._max=100,Object.assign(this,e)}return Object.defineProperty(e.prototype,"value",{set:function(e){this.isStacked=Array.isArray(e),this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBs3",{get:function(){return M()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=e,this.bars.forEach(function(e){e.recalculatePercentage()})},enumerable:!0,configurable:!0}),e.prototype.addBar=function(e){e.animate=this.animate,e.striped=this.striped,this.bars.push(e)},e.prototype.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1)},e.decorators=[{type:t.Component,args:[{selector:"progressbar",template:'<bar [type]="type" [value]="_value" *ngIf="!isStacked"> <ng-content></ng-content> </bar> <ng-template [ngIf]="isStacked"> <bar *ngFor="let item of _value" [type]="item.type" [value]="item.value">{{ item.label }}</bar> </ng-template> ',styles:["\n :host {\n width: 100%;\n display: flex;\n }\n "]}]}],e.ctorParameters=function(){return[{type:ia}]},e.propDecorators={animate:[{type:t.Input}],striped:[{type:t.Input}],type:[{type:t.Input}],value:[{type:t.Input}],max:[{type:t.HostBinding,args:["attr.max"]},{type:t.Input}],addClass:[{type:t.HostBinding,args:["class.progress"]}]},e}(),oa=(function(){function e(e){this.percent=0,this.progress=e}Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){(e||0===e)&&(this._value=e,this.recalculatePercentage())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setBarWidth",{get:function(){return this.recalculatePercentage(),this.percent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBs3",{get:function(){return M()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.progress.addBar(this)},e.prototype.ngOnDestroy=function(){this.progress.removeBar(this)},e.prototype.recalculatePercentage=function(){this.percent=+(this.value/this.progress.max*100).toFixed(2);var e=this.progress.bars.reduce(function(e,t){return e+t.percent},0);e>100&&(this.percent-=e-100)},e.decorators=[{type:t.Component,args:[{selector:"bar",template:"<ng-content></ng-content> ",host:{role:"progressbar","aria-valuemin":"0","[class]":'"progress-bar " + (type ? "progress-bar-" + type + " bg-" + type : "")',"[class.progress-bar-animated]":"!isBs3 && animate","[class.progress-bar-striped]":"striped","[class.active]":"isBs3 && animate","[attr.aria-valuenow]":"value","[attr.aria-valuetext]":'percent ? percent.toFixed(0) + "%" : ""',"[attr.aria-valuemax]":"max","[style.height.%]":'"100"'}}]}],e.ctorParameters=function(){return[{type:ra,decorators:[{type:t.Host}]}]},e.propDecorators={type:[{type:t.Input}],value:[{type:t.Input}],setBarWidth:[{type:t.HostBinding,args:["style.width.%"]}]}}(),{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return sa}),multi:!0}),sa=function(){function e(e){this.changeDetection=e,this.max=5,this.onHover=new t.EventEmitter,this.onLeave=new t.EventEmitter,this.onChange=Function.prototype,this.onTouched=Function.prototype}return e.prototype.onKeydown=function(e){if(-1!==[37,38,39,40].indexOf(e.which)){e.preventDefault(),e.stopPropagation();var t=38===e.which||39===e.which?1:-1;this.rate(this.value+t)}},e.prototype.ngOnInit=function(){this.max="undefined"!=typeof this.max?this.max:5,this.titles="undefined"!=typeof this.titles&&this.titles.length>0?this.titles:["one","two","three","four","five"],this.range=this.buildTemplateObjects(this.max)},e.prototype.writeValue=function(e){if(e%1!==e)return this.value=Math.round(e),this.preValue=e,void this.changeDetection.markForCheck();this.preValue=e,this.value=e,this.changeDetection.markForCheck()},e.prototype.enter=function(e){this.readonly||(this.value=e,this.changeDetection.markForCheck(),this.onHover.emit(e))},e.prototype.reset=function(){this.value=this.preValue,this.changeDetection.markForCheck(),this.onLeave.emit(this.value)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.rate=function(e){!this.readonly&&e>=0&&e<=this.range.length&&(this.writeValue(e),this.onChange(e))},e.prototype.buildTemplateObjects=function(e){for(var t=[],n=0;n<e;n++)t.push({index:n,title:this.titles[n]||n+1});return t},e.decorators=[{type:t.Component,args:[{selector:"rating",template:'<span (mouseleave)="reset()" (keydown)="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" [attr.aria-valuemax]="range.length" [attr.aria-valuenow]="value"> <ng-template #star let-value="value" let-index="index">{{index < value ? \'★\' : \'☆\'}}</ng-template> <ng-template ngFor let-r [ngForOf]="range" let-index="index"> <span class="sr-only">({{ index < value ? \'*\' : \' \' }})</span> <span class="bs-rating-star" (mouseenter)="enter(index + 1)" (click)="rate(index + 1)" [title]="r.title" [style.cursor]="readonly ? \'default\' : \'pointer\'" [class.active]="index < value"> <ng-template [ngTemplateOutlet]="customTemplate || star" [ngTemplateOutletContext]="{index: index, value: value}"> </ng-template> </span> </ng-template> </span> ',providers:[oa],changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={max:[{type:t.Input}],readonly:[{type:t.Input}],titles:[{type:t.Input}],customTemplate:[{type:t.Input}],onHover:[{type:t.Output}],onLeave:[{type:t.Output}],onKeydown:[{type:t.HostListener,args:["keydown",["$event"]]}]},e}(),aa=function(){function e(){this.onCapture=new h.Subject}return e.prototype.dragStart=function(e){this.draggableItem=e},e.prototype.getItem=function(){return this.draggableItem},e.prototype.captureItem=function(e,t){return this.draggableItem.overZoneIndex!==e&&(this.draggableItem.lastZoneIndex=this.draggableItem.overZoneIndex,this.draggableItem.overZoneIndex=e,this.onCapture.next(this.draggableItem),this.draggableItem=Object.assign({},this.draggableItem,{overZoneIndex:e,i:t})),this.draggableItem},e.prototype.onCaptureItem=function(){return this.onCapture},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),ca=(function(){function e(n){var i=this;this.wrapperClass="",this.wrapperStyle={},this.itemClass="",this.itemStyle={},this.itemActiveClass="",this.itemActiveStyle={},this.placeholderClass="",this.placeholderStyle={},this.placeholderItem="",this.onChange=new t.EventEmitter,this.showPlaceholder=!1,this.activeItem=-1,this.onTouched=Function.prototype,this.onChanged=Function.prototype,this.transfer=n,this.currentZoneIndex=e.globalZoneIndex++,this.transfer.onCaptureItem().subscribe(function(e){return i.onDrop(e)})}Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(e){this._items=e;var t=this.items.map(function(e){return e.initData});this.onChanged(t),this.onChange.emit(t)},enumerable:!0,configurable:!0}),e.prototype.onItemDragstart=function(e,t,n){this.initDragstartEvent(e),this.onTouched(),this.transfer.dragStart({event:e,item:t,i:n,initialIndex:n,lastZoneIndex:this.currentZoneIndex,overZoneIndex:this.currentZoneIndex})},e.prototype.onItemDragover=function(e,t){if(this.transfer.getItem()){e.preventDefault();var n=this.transfer.captureItem(this.currentZoneIndex,this.items.length),i=[];i=this.items.length?n.i>t?this.items.slice(0,t).concat([n.item],this.items.slice(t,n.i),this.items.slice(n.i+1)):this.items.slice(0,n.i).concat(this.items.slice(n.i+1,t+1),[n.item],this.items.slice(t+1)):[n.item],this.items=i,n.i=t,this.activeItem=t,this.updatePlaceholderState()}},e.prototype.cancelEvent=function(e){this.transfer.getItem()&&e&&e.preventDefault()},e.prototype.onDrop=function(e){e&&e.overZoneIndex!==this.currentZoneIndex&&e.lastZoneIndex===this.currentZoneIndex&&(this.items=this.items.filter(function(t,n){return n!==e.i}),this.updatePlaceholderState()),this.resetActiveItem(undefined)},e.prototype.resetActiveItem=function(e){this.cancelEvent(e),this.activeItem=-1},e.prototype.registerOnChange=function(e){this.onChanged=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.writeValue=function(e){var t=this;this.items=e?e.map(function(e,n){return{id:n,initData:e,value:t.fieldName?e[t.fieldName]:e}}):[],this.updatePlaceholderState()},e.prototype.updatePlaceholderState=function(){this.showPlaceholder=!this._items.length},e.prototype.getItemStyle=function(e){return e?Object.assign({},this.itemStyle,this.itemActiveStyle):this.itemStyle},e.prototype.initDragstartEvent=function(e){e.dataTransfer.setData("Text","placeholder")},e.globalZoneIndex=0,e.decorators=[{type:t.Component,args:[{selector:"bs-sortable",exportAs:"bs-sortable",template:'\n<div\n [ngClass]="wrapperClass"\n [ngStyle]="wrapperStyle"\n [ngStyle]="wrapperStyle"\n (dragover)="cancelEvent($event)"\n (dragenter)="cancelEvent($event)"\n (drop)="resetActiveItem($event)"\n (mouseleave)="resetActiveItem($event)">\n <div\n *ngIf="showPlaceholder"\n [ngClass]="placeholderClass"\n [ngStyle]="placeholderStyle"\n (dragover)="onItemDragover($event, 0)"\n (dragenter)="cancelEvent($event)"\n >{{placeholderItem}}</div>\n <div\n *ngFor="let item of items; let i=index;"\n [ngClass]="[ itemClass, i === activeItem ? itemActiveClass : \'\' ]"\n [ngStyle]="getItemStyle(i === activeItem)"\n draggable="true"\n (dragstart)="onItemDragstart($event, item, i)"\n (dragend)="resetActiveItem($event)"\n (dragover)="onItemDragover($event, i)"\n (dragenter)="cancelEvent($event)"\n ><ng-template [ngTemplateOutlet]="itemTemplate || defItemTemplate"\n [ngTemplateOutletContext]="{item:item, index: i}"></ng-template></div>\n</div>\n\n<ng-template #defItemTemplate let-item="item">{{item.value}}</ng-template> \n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return e}),multi:!0}]}]}],e.ctorParameters=function(){return[{type:aa}]},e.propDecorators={fieldName:[{type:t.Input}],wrapperClass:[{type:t.Input}],wrapperStyle:[{type:t.Input}],itemClass:[{type:t.Input}],itemStyle:[{type:t.Input}],itemActiveClass:[{type:t.Input}],itemActiveStyle:[{type:t.Input}],placeholderClass:[{type:t.Input}],placeholderStyle:[{type:t.Input}],placeholderItem:[{type:t.Input}],itemTemplate:[{type:t.Input}],onChange:[{type:t.Output}]}}(),function(){function e(e){this.viewRef=e}Object.defineProperty(e.prototype,"ngTransclude",{get:function(){return this._ngTransclude},set:function(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)},enumerable:!0,configurable:!0}),e.decorators=[{type:t.Directive,args:[{selector:"[ngTransclude]"}]}],e.ctorParameters=function(){return[{type:t.ViewContainerRef}]},e.propDecorators={ngTransclude:[{type:t.Input}]}}(),function(){function e(){this.type="tabs"}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}()),ua=function(){function e(e,t){this.renderer=t,this.clazz=!0,this.tabs=[],this.classMap={},Object.assign(this,e)}return Object.defineProperty(e.prototype,"vertical",{get:function(){return this._vertical},set:function(e){this._vertical=e,this.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"justified",{get:function(){return this._justified},set:function(e){this._justified=e,this.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e,this.setClassMap()},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.isDestroyed=!0},e.prototype.addTab=function(e){this.tabs.push(e),e.active=1===this.tabs.length&&"undefined"==typeof e.active},e.prototype.removeTab=function(e,t){void 0===t&&(t={reselect:!0,emit:!0});var n=this.tabs.indexOf(e);if(-1!==n&&!this.isDestroyed){if(t.reselect&&e.active&&this.hasAvailableTabs(n)){var i=this.getClosestTabIndex(n);this.tabs[i].active=!0}t.emit&&e.removed.emit(e),this.tabs.splice(n,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}},e.prototype.getClosestTabIndex=function(e){var t=this.tabs.length;if(!t)return-1;for(var n=1;n<=t;n+=1){var i=e-n,r=e+n;if(this.tabs[i]&&!this.tabs[i].disabled)return i;if(this.tabs[r]&&!this.tabs[r].disabled)return r}return-1},e.prototype.hasAvailableTabs=function(e){var t=this.tabs.length;if(!t)return!1;for(var n=0;n<t;n+=1)if(!this.tabs[n].disabled&&n!==e)return!0;return!1},e.prototype.setClassMap=function(){this.classMap=(e={"nav-stacked":this.vertical,"flex-column":this.vertical,"nav-justified":this.justified},e["nav-"+this.type]=!0,e);var e},e.decorators=[{type:t.Component,args:[{selector:"tabset",template:'<ul class="nav" [ngClass]="classMap" (click)="$event.preventDefault()"> <li *ngFor="let tabz of tabs" [ngClass]="[\'nav-item\', tabz.customClass || \'\']" [class.active]="tabz.active" [class.disabled]="tabz.disabled"> <a href="javascript:void(0);" class="nav-link" [attr.id]="tabz.id ? tabz.id + \'-link\' : \'\'" [class.active]="tabz.active" [class.disabled]="tabz.disabled" (click)="tabz.active = true"> <span [ngTransclude]="tabz.headingRef">{{ tabz.heading }}</span> <span *ngIf="tabz.removable" (click)="$event.preventDefault(); removeTab(tabz);" class="bs-remove-tab"> ❌</span> </a> </li> </ul> <div class="tab-content"> <ng-content></ng-content> </div> '}]}],e.ctorParameters=function(){return[{type:ca},{type:t.Renderer2}]},e.propDecorators={vertical:[{type:t.Input}],justified:[{type:t.Input}],type:[{type:t.Input}],clazz:[{type:t.HostBinding,args:["class.tab-container"]}]},e}(),la=(function(){function e(e,n,i){this.elementRef=n,this.renderer=i,this.select=new t.EventEmitter,this.deselect=new t.EventEmitter,this.removed=new t.EventEmitter,this.addClass=!0,this.tabset=e,this.tabset.addTab(this)}Object.defineProperty(e.prototype,"customClass",{get:function(){return this._customClass},set:function(e){var t=this;this.customClass&&this.customClass.split(" ").forEach(function(e){t.renderer.removeClass(t.elementRef.nativeElement,e)}),this._customClass=e?e.trim():null,this.customClass&&this.customClass.split(" ").forEach(function(e){t.renderer.addClass(t.elementRef.nativeElement,e)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active},set:function(e){var t=this;this._active!==e&&(this.disabled&&e||!e?this._active&&!e&&(this.deselect.emit(this),this._active=e):(this._active=e,this.select.emit(this),this.tabset.tabs.forEach(function(e){e!==t&&(e.active=!1)})))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.removable=this.removable},e.prototype.ngOnDestroy=function(){this.tabset.removeTab(this,{reselect:!1,emit:!1})},e.decorators=[{type:t.Directive,args:[{selector:"tab, [tab]"}]}],e.ctorParameters=function(){return[{type:ua},{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={heading:[{type:t.Input}],id:[{type:t.HostBinding,args:["attr.id"]},{type:t.Input}],disabled:[{type:t.Input}],removable:[{type:t.Input}],customClass:[{type:t.Input}],active:[{type:t.HostBinding,args:["class.active"]},{type:t.Input}],select:[{type:t.Output}],deselect:[{type:t.Output}],removed:[{type:t.Output}],addClass:[{type:t.HostBinding,args:["class.tab-pane"]}]}}(),function(){function e(){}return e.prototype.writeValue=function(t){return{type:e.WRITE_VALUE,payload:t}},e.prototype.changeHours=function(t){return{type:e.CHANGE_HOURS,payload:t}},e.prototype.changeMinutes=function(t){return{type:e.CHANGE_MINUTES,payload:t}},e.prototype.changeSeconds=function(t){return{type:e.CHANGE_SECONDS,payload:t}},e.prototype.setTime=function(t){return{type:e.SET_TIME_UNIT,payload:t}},e.prototype.updateControls=function(t){return{type:e.UPDATE_CONTROLS,payload:t}},e.WRITE_VALUE="[timepicker] write value from ng model",e.CHANGE_HOURS="[timepicker] change hours",e.CHANGE_MINUTES="[timepicker] change minutes",e.CHANGE_SECONDS="[timepicker] change seconds",e.SET_TIME_UNIT="[timepicker] set time unit",e.UPDATE_CONTROLS="[timepicker] update controls",e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}()),pa=10,ha=24,da=12,fa=60,ma=60,_a=function(){function e(){this.hourStep=1,this.minuteStep=5,this.secondsStep=10,this.showMeridian=!0,this.meridians=["AM","PM"],this.readonlyInput=!1,this.disabled=!1,this.mousewheel=!0,this.arrowkeys=!0,this.showSpinners=!0,this.showSeconds=!1,this.showMinutes=!0}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),ya={value:null,config:new _a,controls:{canIncrementHours:!0,canIncrementMinutes:!0,canIncrementSeconds:!0,canDecrementHours:!0,canDecrementMinutes:!0,canDecrementSeconds:!0,canToggleMeridian:!0}},ga=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),va=function(e){function n(){var t=new s.BehaviorSubject({type:"[mini-ngrx] dispatcher init"}),n=new ps(ya,t,di);return e.call(this,t,di,n)||this}return ga(n,e),n.decorators=[{type:t.Injectable}],n.ctorParameters=function(){return[]},n}(To),ba={provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return wa}),multi:!0},wa=function(){function e(e,n,i,r){var o=this;this._store=i,this._timepickerActions=r,this.isValid=new t.EventEmitter,this.invalidHours=!1,this.invalidMinutes=!1,this.invalidSeconds=!1,this.onChange=Function.prototype,this.onTouched=Function.prototype,Object.assign(this,e),this.timepickerSub=i.select(function(e){return e.value}).subscribe(function(e){o._renderTime(e),o.onChange(e),o._store.dispatch(o._timepickerActions.updateControls(pi(o)))}),i.select(function(e){return e.controls}).subscribe(function(e){o.isValid.emit(si(o.hours,o.minutes,o.seconds,o.isPM())),Object.assign(o,e),n.markForCheck()})}return Object.defineProperty(e.prototype,"isSpinnersVisible",{get:function(){return this.showSpinners&&!this.readonlyInput},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEditable",{get:function(){return!(this.readonlyInput||this.disabled)},enumerable:!0,configurable:!0}),e.prototype.resetValidation=function(){this.invalidHours=!1,this.invalidMinutes=!1,this.invalidSeconds=!1},e.prototype.isPM=function(){return this.showMeridian&&this.meridian===this.meridians[1]},e.prototype.prevDef=function(e){e.preventDefault()},e.prototype.wheelSign=function(e){return-1*Math.sign(e.deltaY)},e.prototype.ngOnChanges=function(e){this._store.dispatch(this._timepickerActions.updateControls(pi(this)))},e.prototype.changeHours=function(e,t){void 0===t&&(t=""),this.resetValidation(),this._store.dispatch(this._timepickerActions.changeHours({step:e,source:t}))},e.prototype.changeMinutes=function(e,t){void 0===t&&(t=""),this.resetValidation(),this._store.dispatch(this._timepickerActions.changeMinutes({step:e,source:t}))},e.prototype.changeSeconds=function(e,t){void 0===t&&(t=""),this.resetValidation(),this._store.dispatch(this._timepickerActions.changeSeconds({step:e,source:t}))},e.prototype.updateHours=function(e){if(this.resetValidation(),this.hours=e,!(ni(this.hours,this.isPM())&&this.isValidLimit()))return this.invalidHours=!0,this.isValid.emit(!1),void this.onChange(null);this._updateTime()},e.prototype.updateMinutes=function(e){if(this.resetValidation(),this.minutes=e,!(ii(this.minutes)&&this.isValidLimit()))return this.invalidMinutes=!0,this.isValid.emit(!1),void this.onChange(null);this._updateTime()},e.prototype.updateSeconds=function(e){if(this.resetValidation(),this.seconds=e,!(ri(this.seconds)&&this.isValidLimit()))return this.invalidSeconds=!0,this.isValid.emit(!1),void this.onChange(null);this._updateTime()},e.prototype.isValidLimit=function(){return oi({hour:this.hours,minute:this.minutes,seconds:this.seconds,isPM:this.isPM()},this.max,this.min)},e.prototype._updateTime=function(){var e=this.showSeconds?this.seconds:void 0,t=this.showMinutes?this.minutes:void 0;if(!si(this.hours,t,e,this.isPM()))return this.isValid.emit(!1),void this.onChange(null);this._store.dispatch(this._timepickerActions.setTime({hour:this.hours,minute:this.minutes,seconds:this.seconds,isPM:this.isPM()}))},e.prototype.toggleMeridian=function(){if(this.showMeridian&&this.isEditable){this._store.dispatch(this._timepickerActions.changeHours({step:12,source:""}))}},e.prototype.writeValue=function(e){Bn(e)?this._store.dispatch(this._timepickerActions.writeValue(Kn(e))):null==e&&this._store.dispatch(this._timepickerActions.writeValue(null))},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.ngOnDestroy=function(){this.timepickerSub.unsubscribe()},e.prototype._renderTime=function(e){if(!Bn(e))return this.hours="",this.minutes="",this.seconds="",void(this.meridian=this.meridians[0]);var t=Kn(e),n=t.getHours();this.showMeridian&&(this.meridian=this.meridians[n>=12?1:0],0===(n%=12)&&(n=12)),this.hours=ti(n),this.minutes=ti(t.getMinutes()),this.seconds=ti(t.getUTCSeconds())},e.decorators=[{type:t.Component,args:[{selector:"timepicker",changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[ba,va],template:'<table> <tbody> <tr class="text-center" [class.hidden]="!showSpinners"> \x3c!-- increment hours button--\x3e <td> <a class="btn btn-link" [class.disabled]="!canIncrementHours || !isEditable" (click)="changeHours(hourStep)" ><span class="bs-chevron bs-chevron-up"></span></a> </td> \x3c!-- divider --\x3e <td *ngIf="showMinutes"> </td> \x3c!-- increment minutes button --\x3e <td *ngIf="showMinutes"> <a class="btn btn-link" [class.disabled]="!canIncrementMinutes || !isEditable" (click)="changeMinutes(minuteStep)" ><span class="bs-chevron bs-chevron-up"></span></a> </td> \x3c!-- divider --\x3e <td *ngIf="showSeconds"> </td> \x3c!-- increment seconds button --\x3e <td *ngIf="showSeconds"> <a class="btn btn-link" [class.disabled]="!canIncrementSeconds || !isEditable" (click)="changeSeconds(secondsStep)"> <span class="bs-chevron bs-chevron-up"></span> </a> </td> \x3c!-- space between --\x3e <td *ngIf="showMeridian"> </td> \x3c!-- meridian placeholder--\x3e <td *ngIf="showMeridian"></td> </tr> <tr> \x3c!-- hours --\x3e <td class="form-group" [class.has-error]="invalidHours"> <input type="text" [class.is-invalid]="invalidHours" class="form-control text-center bs-timepicker-field" placeholder="HH" maxlength="2" [readonly]="readonlyInput" [disabled]="disabled" [value]="hours" (wheel)="prevDef($event);changeHours(hourStep * wheelSign($event), \'wheel\')" (keydown.ArrowUp)="changeHours(hourStep, \'key\')" (keydown.ArrowDown)="changeHours(-hourStep, \'key\')" (change)="updateHours($event.target.value)"></td> \x3c!-- divider --\x3e <td *ngIf="showMinutes"> : </td> \x3c!-- minutes --\x3e <td class="form-group" *ngIf="showMinutes" [class.has-error]="invalidMinutes"> <input type="text" [class.is-invalid]="invalidMinutes" class="form-control text-center bs-timepicker-field" placeholder="MM" maxlength="2" [readonly]="readonlyInput" [disabled]="disabled" [value]="minutes" (wheel)="prevDef($event);changeMinutes(minuteStep * wheelSign($event), \'wheel\')" (keydown.ArrowUp)="changeMinutes(minuteStep, \'key\')" (keydown.ArrowDown)="changeMinutes(-minuteStep, \'key\')" (change)="updateMinutes($event.target.value)"> </td> \x3c!-- divider --\x3e <td *ngIf="showSeconds"> : </td> \x3c!-- seconds --\x3e <td class="form-group" *ngIf="showSeconds" [class.has-error]="invalidSeconds"> <input type="text" [class.is-invalid]="invalidSeconds" class="form-control text-center bs-timepicker-field" placeholder="SS" maxlength="2" [readonly]="readonlyInput" [disabled]="disabled" [value]="seconds" (wheel)="prevDef($event);changeSeconds(secondsStep * wheelSign($event), \'wheel\')" (keydown.ArrowUp)="changeSeconds(secondsStep, \'key\')" (keydown.ArrowDown)="changeSeconds(-secondsStep, \'key\')" (change)="updateSeconds($event.target.value)"> </td> \x3c!-- space between --\x3e <td *ngIf="showMeridian"> </td> \x3c!-- meridian --\x3e <td *ngIf="showMeridian"> <button type="button" class="btn btn-default text-center" [disabled]="!isEditable || !canToggleMeridian" [class.disabled]="!isEditable || !canToggleMeridian" (click)="toggleMeridian()" >{{ meridian }} </button> </td> </tr> <tr class="text-center" [class.hidden]="!showSpinners"> \x3c!-- decrement hours button--\x3e <td> <a class="btn btn-link" [class.disabled]="!canDecrementHours || !isEditable" (click)="changeHours(-hourStep)"> <span class="bs-chevron bs-chevron-down"></span> </a> </td> \x3c!-- divider --\x3e <td *ngIf="showMinutes"> </td> \x3c!-- decrement minutes button--\x3e <td *ngIf="showMinutes"> <a class="btn btn-link" [class.disabled]="!canDecrementMinutes || !isEditable" (click)="changeMinutes(-minuteStep)"> <span class="bs-chevron bs-chevron-down"></span> </a> </td> \x3c!-- divider --\x3e <td *ngIf="showSeconds"> </td> \x3c!-- decrement seconds button--\x3e <td *ngIf="showSeconds"> <a class="btn btn-link" [class.disabled]="!canDecrementSeconds || !isEditable" (click)="changeSeconds(-secondsStep)"> <span class="bs-chevron bs-chevron-down"></span> </a> </td> \x3c!-- space between --\x3e <td *ngIf="showMeridian"> </td> \x3c!-- meridian placeholder--\x3e <td *ngIf="showMeridian"></td> </tr> </tbody> </table> ',styles:["\n .bs-chevron{\n border-style: solid;\n display: block;\n width: 9px;\n height: 9px;\n position: relative;\n border-width: 3px 0px 0 3px;\n }\n .bs-chevron-up{\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n top: 2px;\n }\n .bs-chevron-down{\n -webkit-transform: rotate(-135deg);\n transform: rotate(-135deg);\n top: -2px;\n }\n .bs-timepicker-field{\n width: 50px;\n }\n "],encapsulation:t.ViewEncapsulation.None}]}],e.ctorParameters=function(){return[{type:_a},{type:t.ChangeDetectorRef},{type:va},{type:la}]},e.propDecorators={hourStep:[{type:t.Input}],minuteStep:[{type:t.Input}],secondsStep:[{type:t.Input}],readonlyInput:[{type:t.Input}],disabled:[{type:t.Input}],mousewheel:[{type:t.Input}],arrowkeys:[{type:t.Input}],showSpinners:[{type:t.Input}],showMeridian:[{type:t.Input}],showMinutes:[{type:t.Input}],showSeconds:[{type:t.Input}],meridians:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],isValid:[{type:t.Output}]},e}(),ka=function(){function e(){this.placement="top",this.triggers="hover focus"}return e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}(),Sa=function(){function e(e){Object.assign(this,e)}return Object.defineProperty(e.prototype,"isBs3",{get:function(){return M()},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.classMap={"in":!1,fade:!1},this.classMap[this.placement]=!0,this.classMap["tooltip-"+this.placement]=!0,this.classMap["in"]=!0,this.animation&&(this.classMap.fade=!0),this.containerClass&&(this.classMap[this.containerClass]=!0)},e.decorators=[{type:t.Component,args:[{selector:"bs-tooltip-container",changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[class]":'"tooltip in tooltip-" + placement + " " + "bs-tooltip-" + placement + " " + placement + " " + containerClass',"[class.show]":"!isBs3",role:"tooltip"},styles:["\n :host.tooltip {\n display: block;\n }\n :host.bs-tooltip-top .arrow, :host.bs-tooltip-bottom .arrow {\n left: 50%;\n margin-left: -6px;\n }\n :host.bs-tooltip-left .arrow, :host.bs-tooltip-right .arrow {\n top: 50%;\n margin-top: -6px;\n }\n "],template:'\n <div class="tooltip-arrow arrow"></div>\n <div class="tooltip-inner"><ng-content></ng-content></div>\n '}]}],e.ctorParameters=function(){return[{type:ka}]},e}(),Da=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},Ca=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Oa=(function(){function e(e,n,i,r,o){this._renderer=n,this._elementRef=i,this.tooltipChange=new t.EventEmitter,this.containerClass="",this._animation=!0,this._fadeDuration=150,this.tooltipStateChanged=new t.EventEmitter,this._tooltip=r.createLoader(this._elementRef,e,this._renderer).provide({provide:ka,useValue:o}),Object.assign(this,o),this.onShown=this._tooltip.onShown,this.onHidden=this._tooltip.onHidden}Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._tooltip.isShown},set:function(e){e?this.show():this.hide()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"htmlContent",{set:function(e){vn("tooltipHtml was deprecated, please use `tooltip` instead"),this.tooltip=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_placement",{set:function(e){vn("tooltipPlacement was deprecated, please use `placement` instead"),this.placement=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isOpen",{get:function(){return vn("tooltipIsOpen was deprecated, please use `isOpen` instead"),this.isOpen},set:function(e){vn("tooltipIsOpen was deprecated, please use `isOpen` instead"),this.isOpen=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_enable",{get:function(){return vn("tooltipEnable was deprecated, please use `isDisabled` instead"),this.isDisabled},set:function(e){vn("tooltipEnable was deprecated, please use `isDisabled` instead"),this.isDisabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_appendToBody",{get:function(){return vn('tooltipAppendToBody was deprecated, please use `container="body"` instead'),"body"===this.container},set:function(e){vn('tooltipAppendToBody was deprecated, please use `container="body"` instead'),this.container=e?"body":this.container},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_popupClass",{set:function(e){vn("tooltipClass deprecated")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_tooltipContext",{set:function(e){vn("tooltipContext deprecated")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_tooltipPopupDelay",{set:function(e){vn("tooltipPopupDelay is deprecated, use `delay` instead"),this.delay=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_tooltipTrigger",{get:function(){return vn("tooltipTrigger was deprecated, please use `triggers` instead"),this.triggers},set:function(e){vn("tooltipTrigger was deprecated, please use `triggers` instead"),this.triggers=(e||"").toString()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this._tooltip.listen({triggers:this.triggers,show:function(){return e.show()}}),this.tooltipChange.subscribe(function(t){t||e._tooltip.hide()})},e.prototype.toggle=function(){if(this.isOpen)return this.hide();this.show()},e.prototype.show=function(){var e=this;if(!(this.isOpen||this.isDisabled||this._delayTimeoutId)&&this.tooltip){var t=function(){e._delayTimeoutId&&(e._delayTimeoutId=undefined),e._tooltip.attach(Sa).to(e.container).position({attachment:e.placement}).show({content:e.tooltip,placement:e.placement,containerClass:e.containerClass})},n=function(){e._tooltipCancelShowFn&&e._tooltipCancelShowFn()};if(this.delay){var i=a.Observable.timer(this.delay).subscribe(function(){t(),n()});if(this.triggers){var r=k(this.triggers);this._tooltipCancelShowFn=this._renderer.listen(this._elementRef.nativeElement,r[0].close,function(){i.unsubscribe(),n()})}}else t()}},e.prototype.hide=function(){var e=this;this._delayTimeoutId&&(clearTimeout(this._delayTimeoutId),this._delayTimeoutId=undefined),this._tooltip.isShown&&(this._tooltip.instance.classMap["in"]=!1,setTimeout(function(){e._tooltip.hide()},this._fadeDuration))},e.prototype.ngOnDestroy=function(){this._tooltip.dispose()},e.decorators=[{type:t.Directive,args:[{selector:"[tooltip], [tooltipHtml]",exportAs:"bs-tooltip"}]}],e.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.Renderer2},{type:t.ElementRef},{type:Li},{type:ka}]},e.propDecorators={tooltip:[{type:t.Input}],tooltipChange:[{type:t.Output}],placement:[{type:t.Input}],triggers:[{type:t.Input}],container:[{type:t.Input}],isOpen:[{type:t.Input}],isDisabled:[{type:t.Input}],containerClass:[{type:t.Input}],delay:[{type:t.Input}],onShown:[{type:t.Output}],onHidden:[{type:t.Output}],htmlContent:[{type:t.Input,args:["tooltipHtml"]}],_placement:[{type:t.Input,args:["tooltipPlacement"]}],_isOpen:[{type:t.Input,args:["tooltipIsOpen"]}],_enable:[{type:t.Input,args:["tooltipEnable"]}],_appendToBody:[{type:t.Input,args:["tooltipAppendToBody"]}],_animation:[{type:t.Input,args:["tooltipAnimation"]}],_popupClass:[{type:t.Input,args:["tooltipClass"]}],_tooltipContext:[{type:t.Input,args:["tooltipContext"]}],_tooltipPopupDelay:[{type:t.Input,args:["tooltipPopupDelay"]}],_fadeDuration:[{type:t.Input,args:["tooltipFadeDuration"]}],_tooltipTrigger:[{type:t.Input,args:["tooltipTrigger"]}],tooltipStateChanged:[{type:t.Output}]},Da([gn(),Ca("design:type",Object)],e.prototype,"tooltip",void 0)}(),{"Á":"A","Ă":"A","Ắ":"A","Ặ":"A","Ằ":"A","Ẳ":"A","Ẵ":"A","Ǎ":"A","Â":"A","Ấ":"A","Ậ":"A","Ầ":"A","Ẩ":"A","Ẫ":"A","Ä":"A","Ǟ":"A","Ȧ":"A","Ǡ":"A","Ạ":"A","Ȁ":"A","À":"A","Ả":"A","Ȃ":"A","Ā":"A","Ą":"A","Å":"A","Ǻ":"A","Ḁ":"A","Ⱥ":"A","Ã":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ḃ":"B","Ḅ":"B","Ɓ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ć":"C","Č":"C","Ç":"C","Ḉ":"C","Ĉ":"C","Ċ":"C","Ƈ":"C","Ȼ":"C","Ď":"D","Ḑ":"D","Ḓ":"D","Ḋ":"D","Ḍ":"D","Ɗ":"D","Ḏ":"D","Dz":"D","Dž":"D","Đ":"D","Ƌ":"D","DZ":"DZ","DŽ":"DZ","É":"E","Ĕ":"E","Ě":"E","Ȩ":"E","Ḝ":"E","Ê":"E","Ế":"E","Ệ":"E","Ề":"E","Ể":"E","Ễ":"E","Ḙ":"E","Ë":"E","Ė":"E","Ẹ":"E","Ȅ":"E","È":"E","Ẻ":"E","Ȇ":"E","Ē":"E","Ḗ":"E","Ḕ":"E","Ę":"E","Ɇ":"E","Ẽ":"E","Ḛ":"E","Ꝫ":"ET","Ḟ":"F","Ƒ":"F","Ǵ":"G","Ğ":"G","Ǧ":"G","Ģ":"G","Ĝ":"G","Ġ":"G","Ɠ":"G","Ḡ":"G","Ǥ":"G","Ḫ":"H","Ȟ":"H","Ḩ":"H","Ĥ":"H","Ⱨ":"H","Ḧ":"H","Ḣ":"H","Ḥ":"H","Ħ":"H","Í":"I","Ĭ":"I","Ǐ":"I","Î":"I","Ï":"I","Ḯ":"I","İ":"I","Ị":"I","Ȉ":"I","Ì":"I","Ỉ":"I","Ȋ":"I","Ī":"I","Į":"I","Ɨ":"I","Ĩ":"I","Ḭ":"I","Ꝺ":"D","Ꝼ":"F","Ᵹ":"G","Ꞃ":"R","Ꞅ":"S","Ꞇ":"T","Ꝭ":"IS","Ĵ":"J","Ɉ":"J","Ḱ":"K","Ǩ":"K","Ķ":"K","Ⱪ":"K","Ꝃ":"K","Ḳ":"K","Ƙ":"K","Ḵ":"K","Ꝁ":"K","Ꝅ":"K","Ĺ":"L","Ƚ":"L","Ľ":"L","Ļ":"L","Ḽ":"L","Ḷ":"L","Ḹ":"L","Ⱡ":"L","Ꝉ":"L","Ḻ":"L","Ŀ":"L","Ɫ":"L","Lj":"L","Ł":"L","LJ":"LJ","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ń":"N","Ň":"N","Ņ":"N","Ṋ":"N","Ṅ":"N","Ṇ":"N","Ǹ":"N","Ɲ":"N","Ṉ":"N","Ƞ":"N","Nj":"N","Ñ":"N","NJ":"NJ","Ó":"O","Ŏ":"O","Ǒ":"O","Ô":"O","Ố":"O","Ộ":"O","Ồ":"O","Ổ":"O","Ỗ":"O","Ö":"O","Ȫ":"O","Ȯ":"O","Ȱ":"O","Ọ":"O","Ő":"O","Ȍ":"O","Ò":"O","Ỏ":"O","Ơ":"O","Ớ":"O","Ợ":"O","Ờ":"O","Ở":"O","Ỡ":"O","Ȏ":"O","Ꝋ":"O","Ꝍ":"O","Ō":"O","Ṓ":"O","Ṑ":"O","Ɵ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Õ":"O","Ṍ":"O","Ṏ":"O","Ȭ":"O","Ƣ":"OI","Ꝏ":"OO","Ɛ":"E","Ɔ":"O","Ȣ":"OU","Ṕ":"P","Ṗ":"P","Ꝓ":"P","Ƥ":"P","Ꝕ":"P","Ᵽ":"P","Ꝑ":"P","Ꝙ":"Q","Ꝗ":"Q","Ŕ":"R","Ř":"R","Ŗ":"R","Ṙ":"R","Ṛ":"R","Ṝ":"R","Ȑ":"R","Ȓ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꜿ":"C","Ǝ":"E","Ś":"S","Ṥ":"S","Š":"S","Ṧ":"S","Ş":"S","Ŝ":"S","Ș":"S","Ṡ":"S","Ṣ":"S","Ṩ":"S","Ť":"T","Ţ":"T","Ṱ":"T","Ț":"T","Ⱦ":"T","Ṫ":"T","Ṭ":"T","Ƭ":"T","Ṯ":"T","Ʈ":"T","Ŧ":"T","Ɐ":"A","Ꞁ":"L","Ɯ":"M","Ʌ":"V","Ꜩ":"TZ","Ú":"U","Ŭ":"U","Ǔ":"U","Û":"U","Ṷ":"U","Ü":"U","Ǘ":"U","Ǚ":"U","Ǜ":"U","Ǖ":"U","Ṳ":"U","Ụ":"U","Ű":"U","Ȕ":"U","Ù":"U","Ủ":"U","Ư":"U","Ứ":"U","Ự":"U","Ừ":"U","Ử":"U","Ữ":"U","Ȗ":"U","Ū":"U","Ṻ":"U","Ų":"U","Ů":"U","Ũ":"U","Ṹ":"U","Ṵ":"U","Ꝟ":"V","Ṿ":"V","Ʋ":"V","Ṽ":"V","Ꝡ":"VY","Ẃ":"W","Ŵ":"W","Ẅ":"W","Ẇ":"W","Ẉ":"W","Ẁ":"W","Ⱳ":"W","Ẍ":"X","Ẋ":"X","Ý":"Y","Ŷ":"Y","Ÿ":"Y","Ẏ":"Y","Ỵ":"Y","Ỳ":"Y","Ƴ":"Y","Ỷ":"Y","Ỿ":"Y","Ȳ":"Y","Ɏ":"Y","Ỹ":"Y","Ź":"Z","Ž":"Z","Ẑ":"Z","Ⱬ":"Z","Ż":"Z","Ẓ":"Z","Ȥ":"Z","Ẕ":"Z","Ƶ":"Z","IJ":"IJ","Œ":"OE","ᴀ":"A","ᴁ":"AE","ʙ":"B","ᴃ":"B","ᴄ":"C","ᴅ":"D","ᴇ":"E","ꜰ":"F","ɢ":"G","ʛ":"G","ʜ":"H","ɪ":"I","ʁ":"R","ᴊ":"J","ᴋ":"K","ʟ":"L","ᴌ":"L","ᴍ":"M","ɴ":"N","ᴏ":"O","ɶ":"OE","ᴐ":"O","ᴕ":"OU","ᴘ":"P","ʀ":"R","ᴎ":"N","ᴙ":"R","ꜱ":"S","ᴛ":"T","ⱻ":"E","ᴚ":"R","ᴜ":"U","ᴠ":"V","ᴡ":"W","ʏ":"Y","ᴢ":"Z","á":"a","ă":"a","ắ":"a","ặ":"a","ằ":"a","ẳ":"a","ẵ":"a","ǎ":"a","â":"a","ấ":"a","ậ":"a","ầ":"a","ẩ":"a","ẫ":"a","ä":"a","ǟ":"a","ȧ":"a","ǡ":"a","ạ":"a","ȁ":"a","à":"a","ả":"a","ȃ":"a","ā":"a","ą":"a","ᶏ":"a","ẚ":"a","å":"a","ǻ":"a","ḁ":"a","ⱥ":"a","ã":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ḃ":"b","ḅ":"b","ɓ":"b","ḇ":"b","ᵬ":"b","ᶀ":"b","ƀ":"b","ƃ":"b","ɵ":"o","ć":"c","č":"c","ç":"c","ḉ":"c","ĉ":"c","ɕ":"c","ċ":"c","ƈ":"c","ȼ":"c","ď":"d","ḑ":"d","ḓ":"d","ȡ":"d","ḋ":"d","ḍ":"d","ɗ":"d","ᶑ":"d","ḏ":"d","ᵭ":"d","ᶁ":"d","đ":"d","ɖ":"d","ƌ":"d","ı":"i","ȷ":"j","ɟ":"j","ʄ":"j","dz":"dz","dž":"dz","é":"e","ĕ":"e","ě":"e","ȩ":"e","ḝ":"e","ê":"e","ế":"e","ệ":"e","ề":"e","ể":"e","ễ":"e","ḙ":"e","ë":"e","ė":"e","ẹ":"e","ȅ":"e","è":"e","ẻ":"e","ȇ":"e","ē":"e","ḗ":"e","ḕ":"e","ⱸ":"e","ę":"e","ᶒ":"e","ɇ":"e","ẽ":"e","ḛ":"e","ꝫ":"et","ḟ":"f","ƒ":"f","ᵮ":"f","ᶂ":"f","ǵ":"g","ğ":"g","ǧ":"g","ģ":"g","ĝ":"g","ġ":"g","ɠ":"g","ḡ":"g","ᶃ":"g","ǥ":"g","ḫ":"h","ȟ":"h","ḩ":"h","ĥ":"h","ⱨ":"h","ḧ":"h","ḣ":"h","ḥ":"h","ɦ":"h","ẖ":"h","ħ":"h","ƕ":"hv","í":"i","ĭ":"i","ǐ":"i","î":"i","ï":"i","ḯ":"i","ị":"i","ȉ":"i","ì":"i","ỉ":"i","ȋ":"i","ī":"i","į":"i","ᶖ":"i","ɨ":"i","ĩ":"i","ḭ":"i","ꝺ":"d","ꝼ":"f","ᵹ":"g","ꞃ":"r","ꞅ":"s","ꞇ":"t","ꝭ":"is","ǰ":"j","ĵ":"j","ʝ":"j","ɉ":"j","ḱ":"k","ǩ":"k","ķ":"k","ⱪ":"k","ꝃ":"k","ḳ":"k","ƙ":"k","ḵ":"k","ᶄ":"k","ꝁ":"k","ꝅ":"k","ĺ":"l","ƚ":"l","ɬ":"l","ľ":"l","ļ":"l","ḽ":"l","ȴ":"l","ḷ":"l","ḹ":"l","ⱡ":"l","ꝉ":"l","ḻ":"l","ŀ":"l","ɫ":"l","ᶅ":"l","ɭ":"l","ł":"l","lj":"lj","ſ":"s","ẜ":"s","ẛ":"s","ẝ":"s","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ᵯ":"m","ᶆ":"m","ń":"n","ň":"n","ņ":"n","ṋ":"n","ȵ":"n","ṅ":"n","ṇ":"n","ǹ":"n","ɲ":"n","ṉ":"n","ƞ":"n","ᵰ":"n","ᶇ":"n","ɳ":"n","ñ":"n","nj":"nj","ó":"o","ŏ":"o","ǒ":"o","ô":"o","ố":"o","ộ":"o","ồ":"o","ổ":"o","ỗ":"o","ö":"o","ȫ":"o","ȯ":"o","ȱ":"o","ọ":"o","ő":"o","ȍ":"o","ò":"o","ỏ":"o","ơ":"o","ớ":"o","ợ":"o","ờ":"o","ở":"o","ỡ":"o","ȏ":"o","ꝋ":"o","ꝍ":"o","ⱺ":"o","ō":"o","ṓ":"o","ṑ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","õ":"o","ṍ":"o","ṏ":"o","ȭ":"o","ƣ":"oi","ꝏ":"oo","ɛ":"e","ᶓ":"e","ɔ":"o","ᶗ":"o","ȣ":"ou","ṕ":"p","ṗ":"p","ꝓ":"p","ƥ":"p","ᵱ":"p","ᶈ":"p","ꝕ":"p","ᵽ":"p","ꝑ":"p","ꝙ":"q","ʠ":"q","ɋ":"q","ꝗ":"q","ŕ":"r","ř":"r","ŗ":"r","ṙ":"r","ṛ":"r","ṝ":"r","ȑ":"r","ɾ":"r","ᵳ":"r","ȓ":"r","ṟ":"r","ɼ":"r","ᵲ":"r","ᶉ":"r","ɍ":"r","ɽ":"r","ↄ":"c","ꜿ":"c","ɘ":"e","ɿ":"r","ś":"s","ṥ":"s","š":"s","ṧ":"s","ş":"s","ŝ":"s","ș":"s","ṡ":"s","ṣ":"s","ṩ":"s","ʂ":"s","ᵴ":"s","ᶊ":"s","ȿ":"s","ɡ":"g","ᴑ":"o","ᴓ":"o","ᴝ":"u","ť":"t","ţ":"t","ṱ":"t","ț":"t","ȶ":"t","ẗ":"t","ⱦ":"t","ṫ":"t","ṭ":"t","ƭ":"t","ṯ":"t","ᵵ":"t","ƫ":"t","ʈ":"t","ŧ":"t","ᵺ":"th","ɐ":"a","ᴂ":"ae","ǝ":"e","ᵷ":"g","ɥ":"h","ʮ":"h","ʯ":"h","ᴉ":"i","ʞ":"k","ꞁ":"l","ɯ":"m","ɰ":"m","ᴔ":"oe","ɹ":"r","ɻ":"r","ɺ":"r","ⱹ":"r","ʇ":"t","ʌ":"v","ʍ":"w","ʎ":"y","ꜩ":"tz","ú":"u","ŭ":"u","ǔ":"u","û":"u","ṷ":"u","ü":"u","ǘ":"u","ǚ":"u","ǜ":"u","ǖ":"u","ṳ":"u","ụ":"u","ű":"u","ȕ":"u","ù":"u","ủ":"u","ư":"u","ứ":"u","ự":"u","ừ":"u","ử":"u","ữ":"u","ȗ":"u","ū":"u","ṻ":"u","ų":"u","ᶙ":"u","ů":"u","ũ":"u","ṹ":"u","ṵ":"u","ᵫ":"ue","ꝸ":"um","ⱴ":"v","ꝟ":"v","ṿ":"v","ʋ":"v","ᶌ":"v","ⱱ":"v","ṽ":"v","ꝡ":"vy","ẃ":"w","ŵ":"w","ẅ":"w","ẇ":"w","ẉ":"w","ẁ":"w","ⱳ":"w","ẘ":"w","ẍ":"x","ẋ":"x","ᶍ":"x","ý":"y","ŷ":"y","ÿ":"y","ẏ":"y","ỵ":"y","ỳ":"y","ƴ":"y","ỷ":"y","ỿ":"y","ȳ":"y","ẙ":"y","ɏ":"y","ỹ":"y","ź":"z","ž":"z","ẑ":"z","ʑ":"z","ⱬ":"z","ż":"z","ẓ":"z","ȥ":"z","ẕ":"z","ᵶ":"z","ᶎ":"z","ʐ":"z","ƶ":"z","ɀ":"z","ff":"ff","ffi":"ffi","ffl":"ffl","fi":"fi","fl":"fl","ij":"ij","œ":"oe","st":"st","ₐ":"a","ₑ":"e","ᵢ":"i","ⱼ":"j","ₒ":"o","ᵣ":"r","ᵤ":"u","ᵥ":"v","ₓ":"x"}),xa=function(){function e(e,t,n){void 0===t&&(t=e),void 0===n&&(n=!1),this.item=e,this.value=t,this.header=n}return e.prototype.isHeader=function(){return this.header},e.prototype.toString=function(){return this.value},e}(),Ma=function(){function e(e,t){this.renderer=t,this.isFocused=!1,this._matches=[],this.isScrolledIntoView=function(e){var t=this.ulElement.nativeElement.scrollTop,n=t+this.ulElement.nativeElement.offsetHeight,i=e.offsetTop;return i+e.offsetHeight<=n&&i>=t},this.element=e}return Object.defineProperty(e.prototype,"isBs4",{get:function(){return!M()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this._active},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matches",{get:function(){return this._matches},set:function(e){var t=this;this._matches=e,this.needScrollbar=this.typeaheadScrollable&&this.typeaheadOptionsInScrollableView<this.matches.length,this.typeaheadScrollable&&setTimeout(function(){t.setScrollableMode()}),this._matches.length>0&&(this._active=this._matches[0],this._active.isHeader()&&this.nextActiveMatch())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optionsListTemplate",{get:function(){return this.parent?this.parent.optionsListTemplate:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadScrollable",{get:function(){return!!this.parent&&this.parent.typeaheadScrollable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadOptionsInScrollableView",{get:function(){return this.parent?this.parent.typeaheadOptionsInScrollableView:5},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"itemTemplate",{get:function(){return this.parent?this.parent.typeaheadItemTemplate:undefined},enumerable:!0,configurable:!0}),e.prototype.selectActiveMatch=function(){this.selectMatch(this._active)},e.prototype.prevActiveMatch=function(){var e=this.matches.indexOf(this._active);this._active=this.matches[e-1<0?this.matches.length-1:e-1],this._active.isHeader()&&this.prevActiveMatch(),this.typeaheadScrollable&&this.scrollPrevious(e)},e.prototype.nextActiveMatch=function(){var e=this.matches.indexOf(this._active);this._active=this.matches[e+1>this.matches.length-1?0:e+1],this._active.isHeader()&&this.nextActiveMatch(),this.typeaheadScrollable&&this.scrollNext(e)},e.prototype.selectActive=function(e){this.isFocused=!0,this._active=e},e.prototype.hightlight=function(e,t){var n,i,r=e.value,o=(this.parent&&this.parent.typeaheadLatinize?fi(r):r).toLowerCase();if("object"==typeof t)for(var s=t.length,a=0;a<s;a+=1)n=o.indexOf(t[a]),i=t[a].length,n>=0&&i>0&&(r=r.substring(0,n)+"<strong>"+r.substring(n,n+i)+"</strong>"+r.substring(n+i),o=o.substring(0,n)+" "+" ".repeat(i)+" "+o.substring(n+i));else t&&(n=o.indexOf(t),i=t.length,n>=0&&i>0&&(r=r.substring(0,n)+"<strong>"+r.substring(n,n+i)+"</strong>"+r.substring(n+i)));return r},e.prototype.focusLost=function(){this.isFocused=!1},e.prototype.isActive=function(e){return this._active===e},e.prototype.selectMatch=function(e,t){var n=this;return void 0===t&&(t=void 0),t&&(t.stopPropagation(),t.preventDefault()),this.parent.changeModel(e),setTimeout(function(){return n.parent.typeaheadOnSelect.emit(e)},0),!1},e.prototype.setScrollableMode=function(){if(this.ulElement||(this.ulElement=this.element),this.liElements.first){var e=yo.getStyles(this.ulElement.nativeElement),t=yo.getStyles(this.liElements.first.nativeElement),n=parseFloat((e["padding-bottom"]?e["padding-bottom"]:"").replace("px","")),i=parseFloat((e["padding-top"]?e["padding-top"]:"0").replace("px","")),r=parseFloat((t.height?t.height:"0").replace("px","")),o=this.typeaheadOptionsInScrollableView*r;this.guiHeight=o+i+n+"px"}this.renderer.setStyle(this.element.nativeElement,"visibility","visible")},e.prototype.scrollPrevious=function(e){if(0!==e){if(this.liElements){var t=this.liElements.toArray()[e-1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop)}}else this.scrollToBottom()},e.prototype.scrollNext=function(e){if(e+1>this.matches.length-1)this.scrollToTop();else if(this.liElements){var t=this.liElements.toArray()[e+1];t&&!this.isScrolledIntoView(t.nativeElement)&&(this.ulElement.nativeElement.scrollTop=t.nativeElement.offsetTop-this.ulElement.nativeElement.offsetHeight+t.nativeElement.offsetHeight)}},e.prototype.scrollToBottom=function(){this.ulElement.nativeElement.scrollTop=this.ulElement.nativeElement.scrollHeight},e.prototype.scrollToTop=function(){this.ulElement.nativeElement.scrollTop=0},e.decorators=[{type:t.Component,args:[{selector:"typeahead-container",template:'\x3c!-- inject options list template --\x3e <ng-template [ngTemplateOutlet]="optionsListTemplate || (isBs4 ? bs4Template : bs3Template)" [ngTemplateOutletContext]="{matches:matches, itemTemplate:itemTemplate, query:query}"></ng-template> \x3c!-- default options item template --\x3e <ng-template #bsItemTemplate let-match="match" let-query="query"><span [innerHtml]="hightlight(match, query)"></span> </ng-template> \x3c!-- Bootstrap 3 options list template --\x3e <ng-template #bs3Template> <ul class="dropdown-menu" #ulElement [style.overflow-y]="needScrollbar ? \'scroll\': \'auto\'" [style.height]="needScrollbar ? guiHeight: \'auto\'"> <ng-template ngFor let-match let-i="index" [ngForOf]="matches"> <li #liElements *ngIf="match.isHeader()" class="dropdown-header">{{ match }}</li> <li #liElements *ngIf="!match.isHeader()" [class.active]="isActive(match)" (mouseenter)="selectActive(match)"> <a href="#" (click)="selectMatch(match, $event)" tabindex="-1"> <ng-template [ngTemplateOutlet]="itemTemplate || bsItemTemplate" [ngTemplateOutletContext]="{item:match.item, index:i, match:match, query:query}"></ng-template> </a> </li> </ng-template> </ul> </ng-template> \x3c!-- Bootstrap 4 options list template --\x3e <ng-template #bs4Template> <ng-template ngFor let-match let-i="index" [ngForOf]="matches"> <h6 *ngIf="match.isHeader()" class="dropdown-header">{{ match }}</h6> <ng-template [ngIf]="!match.isHeader()"> <button #liElements class="dropdown-item" (click)="selectMatch(match, $event)" (mouseenter)="selectActive(match)" [class.active]="isActive(match)"> <ng-template [ngTemplateOutlet]="itemTemplate || bsItemTemplate" [ngTemplateOutletContext]="{item:match.item, index:i, match:match, query:query}"></ng-template> </button> </ng-template> </ng-template> </ng-template> ',host:{"class":"dropdown open","[class.dropdown-menu]":"isBs4","[style.overflow-y]":"isBs4 && needScrollbar ? 'scroll': 'visible'","[style.height]":"isBs4 && needScrollbar ? guiHeight: 'auto'","[style.visibility]":"typeaheadScrollable ? 'hidden' : 'visible'","[class.dropup]":"dropup",style:"position: absolute;display: block;"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={ulElement:[{type:t.ViewChild,args:["ulElement"]}],liElements:[{type:t.ViewChildren,args:["liElements"]}],focusLost:[{type:t.HostListener,args:["mouseleave"]},{type:t.HostListener,args:["blur"]}]},e}(),Ia=(function(){function e(e,n,i,r,o,s){this.ngControl=e,this.element=n,this.renderer=r,this.changeDetection=s,this.typeaheadMinLength=void 0,this.typeaheadAsync=void 0,this.typeaheadLatinize=!0,this.typeaheadSingleWords=!0,this.typeaheadWordDelimiters=" ",this.typeaheadPhraseDelimiters="'\"",this.typeaheadScrollable=!1,this.typeaheadOptionsInScrollableView=5,this.typeaheadLoading=new t.EventEmitter,this.typeaheadNoResults=new t.EventEmitter,this.typeaheadOnSelect=new t.EventEmitter,this.typeaheadOnBlur=new t.EventEmitter,this.dropup=!1,this.isTypeaheadOptionsListActive=!1,this.keyUpEventEmitter=new t.EventEmitter,this.placement="bottom-left",this._subscriptions=[],this._typeahead=o.createLoader(n,i,r)}e.prototype.ngOnInit=function(){this.typeaheadOptionsLimit=this.typeaheadOptionsLimit||20,this.typeaheadMinLength=void 0===this.typeaheadMinLength?1:this.typeaheadMinLength,this.typeaheadWaitMs=this.typeaheadWaitMs||0,this.typeaheadAsync!==undefined||this.typeahead instanceof a.Observable||(this.typeaheadAsync=!1),this.typeahead instanceof a.Observable&&(this.typeaheadAsync=!0),this.typeaheadAsync?this.asyncActions():this.syncActions()},e.prototype.onInput=function(e){var t=e.target.value!==undefined?e.target.value:e.target.textContent!==undefined?e.target.textContent:e.target.innerText;null!=t&&t.trim().length>=this.typeaheadMinLength?(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(e.target.value)):(this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!1),this.hide())},e.prototype.onChange=function(e){if(this._container){if(27===e.keyCode)return void this.hide();if(38===e.keyCode)return void this._container.prevActiveMatch();if(40===e.keyCode)return void this._container.nextActiveMatch();if(13===e.keyCode)return void this._container.selectActiveMatch()}},e.prototype.onFocus=function(){0===this.typeaheadMinLength&&(this.typeaheadLoading.emit(!0),this.keyUpEventEmitter.emit(this.element.nativeElement.value||""))},e.prototype.onBlur=function(){this._container&&!this._container.isFocused&&this.typeaheadOnBlur.emit(this._container.active)},e.prototype.onKeydown=function(e){if(this._container){if(13!==e.keyCode)return 9===e.keyCode?(e.preventDefault(),void this._container.selectActiveMatch()):void 0;e.preventDefault()}},e.prototype.changeModel=function(e){var t=e.value;this.ngControl.viewToModelUpdate(t),this.ngControl.control.setValue(t),this.changeDetection.markForCheck(),this.hide()},Object.defineProperty(e.prototype,"matches",{get:function(){return this._matches},enumerable:!0,configurable:!0}),e.prototype.show=function(){var e=this;this._typeahead.attach(Ma).to(this.container).position({attachment:(this.dropup?"top":"bottom")+" left"}).show({typeaheadRef:this,placement:this.placement,animation:!1,dropup:this.dropup}),this._outsideClickListener=this.renderer.listen("document","click",function(t){0===e.typeaheadMinLength&&e.element.nativeElement.contains(t.target)||e.onOutsideClick()}),this._container=this._typeahead.instance,this._container.parent=this;var t=(this.typeaheadLatinize?fi(this.ngControl.control.value):this.ngControl.control.value).toString().toLowerCase();this._container.query=this.typeaheadSingleWords?mi(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t,this._container.matches=this._matches,this.element.nativeElement.focus()},e.prototype.hide=function(){this._typeahead.isShown&&(this._typeahead.hide(),this._outsideClickListener(),this._container=null)},e.prototype.onOutsideClick=function(){this._container&&!this._container.isFocused&&this.hide()},e.prototype.ngOnDestroy=function(){for(var e=0,t=this._subscriptions;e<t.length;e++)t[e].unsubscribe();this._typeahead.dispose()},e.prototype.asyncActions=function(){var e=this;this._subscriptions.push(this.keyUpEventEmitter.debounceTime(this.typeaheadWaitMs).switchMap(function(){return e.typeahead}).subscribe(function(t){e.finalizeAsyncCall(t)}))},e.prototype.syncActions=function(){var e=this;this._subscriptions.push(this.keyUpEventEmitter.debounceTime(this.typeaheadWaitMs).mergeMap(function(t){var n=e.normalizeQuery(t);return a.Observable.from(e.typeahead).filter(function(t){return t&&e.testMatch(e.normalizeOption(t),n)}).toArray()}).subscribe(function(t){e.finalizeAsyncCall(t)}))},e.prototype.normalizeOption=function(e){var t=_i(e,this.typeaheadOptionField);return(this.typeaheadLatinize?fi(t):t).toLowerCase()},e.prototype.normalizeQuery=function(e){var t=(this.typeaheadLatinize?fi(e):e).toString().toLowerCase();return t=this.typeaheadSingleWords?mi(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t},e.prototype.testMatch=function(e,t){var n;if("object"==typeof t){n=t.length;for(var i=0;i<n;i+=1)if(t[i].length>0&&e.indexOf(t[i])<0)return!1;return!0}return e.indexOf(t)>=0},e.prototype.finalizeAsyncCall=function(e){if(this.prepareMatches(e),this.typeaheadLoading.emit(!1),this.typeaheadNoResults.emit(!this.hasMatches()),this.hasMatches())if(this._container){var t=(this.typeaheadLatinize?fi(this.ngControl.control.value):this.ngControl.control.value).toString().toLowerCase();this._container.query=this.typeaheadSingleWords?mi(t,this.typeaheadWordDelimiters,this.typeaheadPhraseDelimiters):t,this._container.matches=this._matches}else this.show();else this.hide()},e.prototype.prepareMatches=function(e){var t=this,n=e.slice(0,this.typeaheadOptionsLimit);if(this.typeaheadGroupField){var i=[];n.map(function(e){return _i(e,t.typeaheadGroupField)}).filter(function(e,t,n){return n.indexOf(e)===t}).forEach(function(e){i.push(new xa(e,e,!0)),i=i.concat(n.filter(function(n){return _i(n,t.typeaheadGroupField)===e}).map(function(e){return new xa(e,_i(e,t.typeaheadOptionField))}))}),this._matches=i}else this._matches=n.map(function(e){return new xa(e,_i(e,t.typeaheadOptionField))})},e.prototype.hasMatches=function(){return this._matches.length>0},e.decorators=[{type:t.Directive,args:[{selector:"[typeahead]",exportAs:"bs-typeahead"}]}],e.ctorParameters=function(){return[{type:i.NgControl},{type:t.ElementRef},{type:t.ViewContainerRef},{type:t.Renderer2},{type:Li},{type:t.ChangeDetectorRef}]},e.propDecorators={typeahead:[{type:t.Input}],typeaheadMinLength:[{type:t.Input}],typeaheadWaitMs:[{type:t.Input}],typeaheadOptionsLimit:[{type:t.Input}],typeaheadOptionField:[{type:t.Input}],typeaheadGroupField:[{type:t.Input}],typeaheadAsync:[{type:t.Input}],typeaheadLatinize:[{type:t.Input}],typeaheadSingleWords:[{type:t.Input}],typeaheadWordDelimiters:[{type:t.Input}],typeaheadPhraseDelimiters:[{type:t.Input}],typeaheadItemTemplate:[{type:t.Input}],optionsListTemplate:[{type:t.Input}],typeaheadScrollable:[{type:t.Input}],typeaheadOptionsInScrollableView:[{type:t.Input}],typeaheadLoading:[{type:t.Output}],typeaheadNoResults:[{type:t.Output}],typeaheadOnSelect:[{type:t.Output}],typeaheadOnBlur:[{type:t.Output}],container:[{type:t.Input}],dropup:[{type:t.Input}],onInput:[{type:t.HostListener,args:["input",["$event"]]}],onChange:[{type:t.HostListener,args:["keyup",["$event"]]}],onFocus:[{type:t.HostListener,args:["click"]},{type:t.HostListener,args:["focus"]}],onBlur:[{type:t.HostListener,args:["blur"]}],onKeydown:[{type:t.HostListener,args:["keydown",["$event"]]}]}}(),{1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"}),Pa={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},Ea=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},Ta={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},Ra=function(e){return function(t,n){var i=Ea(t),r=Ta[e][Ea(t)];return 2===i&&(r=r[n?0:1]),r.replace(/%d/i,t.toString())}},ja=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],Aa=("الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),"ح_ن_ث_ر_خ_ج_س".split("_"),Ra("s"),Ra("s"),Ra("m"),Ra("m"),Ra("h"),Ra("h"),Ra("d"),Ra("d"),Ra("M"),Ra("M"),Ra("y"),Ra("y"),"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_")),Ha="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),La=(function(e,t){var n,i=[];for(n=0;n<12;n++)i[n]=new RegExp("^"+e[n]+"$|^"+t[n]+"$","i")}(Aa,Ha),function(e){var t,n=[];for(t=0;t<12;t++)n[t]=new RegExp("^"+e[t]+"$","i")}(Ha),function(e){var t,n=[];for(t=0;t<12;t++)n[t]=new RegExp("^"+e[t]+"$","i")}(Aa),"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),"ne_po_út_st_čt_pá_so".split("_"),"ne_po_út_st_čt_pá_so".split("_"),"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),Na="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Fa=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Va=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,Ya=("enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),"dom._lun._mar._mié._jue._vie._sáb.".split("_"),"do_lu_ma_mi_ju_vi_sá".split("_"),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),za="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),Ua=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],Wa=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,Ba=("enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),"dom._lun._mar._mié._jue._vie._sáb.".split("_"),"do_lu_ma_mi_ju_vi_sá".split("_"),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),Ga="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),$a=("enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),"dom._lun._mar._mié._jue._vie._sáb.".split("_"),"do_lu_ma_mi_ju_vi_sá".split("_"),"nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" ")),Za=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",$a[7],$a[8],$a[9]],qa=("tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),"su_ma_ti_ke_to_pe_la".split("_"),"su_ma_ti_ke_to_pe_la".split("_"),"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),"dim._lun._mar._mer._jeu._ven._sam.".split("_"),"di_lu_ma_me_je_ve_sa".split("_"),{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"}),Ja={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},Ka=("जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),"र_सो_मं_बु_गु_शु_श".split("_"),"vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ")),Qa=("január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),"vas_hét_kedd_sze_csüt_pén_szo".split("_"),"v_h_k_sze_cs_p_szo".split("_"),"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),"dom_lun_mar_mer_gio_ven_sab".split("_"),"do_lu_ma_me_gi_ve_sa".split("_"),"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),"日_月_火_水_木_金_土".split("_"),"日_月_火_水_木_金_土".split("_"),"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),"일_월_화_수_목_금_토".split("_"),"일_월_화_수_목_금_토".split("_"),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_")),Xa="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ec=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],tc=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,nc=("januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),"zo._ma._di._wo._do._vr._za.".split("_"),"zo_ma_di_wo_do_vr_za".split("_"),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_")),ic="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),rc=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],oc=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,sc=("januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),"zo._ma._di._wo._do._vr._za.".split("_"),"zo_ma_di_wo_do_vr_za".split("_"),"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_")),ac="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),cc=("sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),"ndz_pon_wt_śr_czw_pt_sob".split("_"),"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),"sön_mån_tis_ons_tor_fre_lör".split("_"),"sö_må_ti_on_to_fr_lö".split("_"),[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i]),uc=("января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),"вс_пн_вт_ср_чт_пт_сб".split("_"),"вс_пн_вт_ср_чт_пт_сб".split("_"),"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),"周日_周一_周二_周三_周四_周五_周六".split("_"),"日_一_二_三_四_五_六".split("_"),{1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"}),lc=("Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),"א_ב_ג_ד_ה_ו_ש".split("_"),"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),{});lc.OFF=0,lc.ON=1,lc.PAUSED=2,lc[lc.OFF]="OFF",lc[lc.ON]="ON",lc[lc.PAUSED]="PAUSED";var pc=function(){function e(e){this.router=e,this.stepShow$=new h.Subject,this.stepHide$=new h.Subject,this.initialize$=new h.Subject,this.start$=new h.Subject,this.end$=new h.Subject,this.pause$=new h.Subject,this.resume$=new h.Subject,this.anchorRegister$=new h.Subject,this.anchorUnregister$=new h.Subject,this.events$=v.mergeStatic(u.map.bind(this.stepShow$)(function(e){return{name:"stepShow",value:e}}),u.map.bind(this.stepHide$)(function(e){return{name:"stepHide",value:e}}),u.map.bind(this.initialize$)(function(e){return{name:"initialize",value:e}}),u.map.bind(this.start$)(function(e){return{name:"start",value:e}}),u.map.bind(this.end$)(function(e){return{name:"end",value:e}}),u.map.bind(this.pause$)(function(e){return{name:"pause",value:e}}),u.map.bind(this.resume$)(function(e){return{name:"resume",value:e}}),u.map.bind(this.anchorRegister$)(function(e){return{name:"anchorRegister",value:e}}),u.map.bind(this.anchorUnregister$)(function(e){return{name:"anchorUnregister",value:e}})),this.steps=[],this.anchors={},this.status=lc.OFF}return e.prototype.initialize=function(e,t){e&&e.length>0&&this.status===lc.OFF&&(this.status=lc.OFF,this.steps=e.map(function(e){return Object.assign({},t,e)}),this.initialize$.next(this.steps))},e.prototype.start=function(){this.startAt(0)},e.prototype.startAt=function(e){var t=this;this.status=lc.ON,this.goToStep(this.loadStep(e)),this.start$.next(),this.router.events.filter(function(e){return e instanceof w.NavigationStart}).first().subscribe(function(){t.currentStep&&t.hideStep(t.currentStep)})},e.prototype.end=function(){this.status=lc.OFF,this.hideStep(this.currentStep),this.currentStep=undefined,this.end$.next()},e.prototype.pause=function(){this.status=lc.PAUSED,this.hideStep(this.currentStep),this.pause$.next()},e.prototype.resume=function(){this.status=lc.ON,this.showStep(this.currentStep),this.resume$.next()},e.prototype.toggle=function(e){e?this.currentStep?this.pause():this.resume():this.currentStep?this.end():this.start()},e.prototype.next=function(){this.hasNext(this.currentStep)&&this.goToStep(this.loadStep(this.currentStep.nextStep||this.steps.indexOf(this.currentStep)+1))},e.prototype.hasNext=function(e){return e?e.nextStep!==undefined||this.steps.indexOf(e)<this.steps.length-1:(console.warn("Can't get next step. No currentStep."),!1)},e.prototype.prev=function(){this.hasPrev(this.currentStep)&&this.goToStep(this.loadStep(this.currentStep.prevStep||this.steps.indexOf(this.currentStep)-1))},e.prototype.hasPrev=function(e){return e?e.prevStep!==undefined||this.steps.indexOf(e)>0:(console.warn("Can't get previous step. No currentStep."),!1)},e.prototype["goto"]=function(e){this.goToStep(this.loadStep(e))},e.prototype.register=function(e,t){if(this.anchors[e])throw new Error("anchorId "+e+" already registered!");this.anchors[e]=t,this.anchorRegister$.next(e)},e.prototype.unregister=function(e){delete this.anchors[e],this.anchorUnregister$.next(e)},e.prototype.getStatus=function(){return this.status},e.prototype.goToStep=function(e){var t=this;if(!e)return console.warn("Can't go to non-existent step"),void this.end();var n=new Promise(function(e){return e(!0)});e.route!==undefined&&"string"==typeof e.route?n=this.router.navigateByUrl(e.route):e.route&&Array.isArray(e.route)&&(n=this.router.navigate(e.route)),n.then(function(n){!1!==n&&setTimeout(function(){return t.setCurrentStep(e)})})},e.prototype.loadStep=function(e){return"number"==typeof e?this.steps[e]:this.steps.find(function(t){return t.stepId===e})},e.prototype.setCurrentStep=function(e){var t=this;this.currentStep&&this.hideStep(this.currentStep),this.currentStep=e,e.promise?e.promise.then(function(){return e.delay?setTimeout(function(){return t.showStep(t.currentStep)},e.delay):t.showStep(t.currentStep)})["catch"](function(){return console.error("Promise for step "+e.anchorId+" has failed!")}):e.delay?setTimeout(function(){return t.showStep(t.currentStep)},e.delay):this.showStep(this.currentStep),this.router.events.filter(function(e){return e instanceof w.NavigationStart}).first().subscribe(function(){t.currentStep&&t.hideStep(t.currentStep)})},e.prototype.showStep=function(e){var t=this.anchors[e&&e.anchorId];t?(t.showTourStep(e),this.stepShow$.next(e)):this.end()},e.prototype.hideStep=function(e){var t=this.anchors[e&&e.anchorId];t&&(t.hideTourStep(),this.stepHide$.next(e))},e.prototype.isStepOpen=function(e){var t=this.anchors[e&&e.anchorId];if(t)return t.isOpen},e}();pc.decorators=[{type:t.Injectable}],pc.ctorParameters=function(){return[{type:w.Router}]};var hc=function(){return function(){}}();hc.decorators=[{type:t.Injectable}],hc.ctorParameters=function(){return[]};var dc=function(e){function t(){var t=e.apply(this,arguments)||this;return t.triggers="",t}return Ii(t,e),t}(Yi);dc.decorators=[{type:t.Directive,args:[{selector:"[tourAnchor]"}]}],dc.ctorParameters=function(){return[]};var fc=function(){function e(e,t,n,i){this.tourService=e,this.tourStepTemplate=t,this.element=n,this.popoverDirective=i,this._elementClass=[]}return e.prototype.ngOnInit=function(){this.tourService.register(this.tourAnchor,this)},e.prototype.ngOnDestroy=function(){this.tourService.unregister(this.tourAnchor)},e.prototype.showTourStep=function(e){this.popoverDirective.popover=this.tourStepTemplate.template,this.popoverDirective.popoverTitle=e.title,this.popoverDirective.containerClass=e.containerClass?e.containerClass:"",this.popoverDirective.placement=e.placement?e.placement:"top",this.popoverDirective.container="body",this.popoverDirective.triggers="",e.orphan&&(this.popoverDirective.containerClass+=" orphan"),e.backdrop&&!e.orphan&&(this.backdropClass=!0),this.popoverDirective.show(),e.preventScrolling||this.element.nativeElement.scrollIntoView({behavior:"instant",block:"center",inline:"nearest"})},e.prototype.hideTourStep=function(){this.backdropClass=!1,this.popoverDirective.hide()},e.prototype.isOpen=function(){return this.popoverDirective.isOpen},e}();fc.decorators=[{type:t.Directive,args:[{selector:"[tourAnchor]"}]}],fc.ctorParameters=function(){return[{type:pc},{type:hc},{type:t.ElementRef},{type:dc,decorators:[{type:t.Host}]}]},fc.propDecorators={tourAnchor:[{type:t.Input}],backdropClass:[{type:t.HostBinding,args:["class.tour-step-backdrop"]}]};var mc=function(){function e(e,t){this.ngxBootstrapProductTourStepService=e,this.tourService=t}return e.prototype.ngAfterContentInit=function(){this.ngxBootstrapProductTourStepService.template=this.stepTemplate||this.defaultTourStepTemplate},e}();mc.decorators=[{type:t.Component,args:[{selector:"ngx-bootstrap-product-tour",template:'\n <div *ngIf="tourService.currentStep?.backdrop && tourService.isStepOpen(tourService.currentStep)" class="tour-backdrop"></div>\n <ng-template #tourStep>\n <p class="tour-step-content">{{tourService.currentStep.content}}</p>\n <div class="tour-step-navigation">\n <button *ngIf="tourService.hasPrev(tourService.currentStep)" class="btn btn-sm btn-default" (click)="tourService.prev()">« Prev</button>\n <button *ngIf="tourService.hasNext(tourService.currentStep)" class="btn btn-sm btn-default" (click)="tourService.next()">Next »</button>\n <button class="btn btn-sm btn-error" (click)="tourService.end()">End</button>\n </div>\n </ng-template>\n ',styles:["\n ::ng-deep .orphan {\n position: fixed;\n top: 50% !important;\n left: 50% !important;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n }\n\n ::ng-deep .orphan>.popover-arrow {\n display: none;\n }\n\n .tour-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "]}]}],mc.ctorParameters=function(){return[{type:hc},{type:pc}]},mc.propDecorators={defaultTourStepTemplate:[{type:t.ViewChild,args:["tourStep",{read:t.TemplateRef}]}],stepTemplate:[{type:t.Input},{type:t.ContentChild,args:[t.TemplateRef]}]};var _c=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[pc,hc]}},e}();_c.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,zi.forRoot()],declarations:[fc,dc,mc],entryComponents:[mc],exports:[fc,dc,mc]}]}],_c.ctorParameters=function(){return[]},e.NgxBootstrapProductTourModule=_c,e.NgxBootstrapProductTourService=pc,e.ɵd=mc,e.ɵc=hc,e.ɵa=dc,e.ɵb=fc,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-bootstrap-product-tour.umd.min.js.map