(function(e){if(typeof define==="function"&&define.amd){define(["jquery","moment"],e)}else if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e(require("jquery"),require("moment"))}else{e(jQuery,moment)}})(function(he,ce){"use strict";he.dateRangePickerLanguages={default:{selected:"Selected:",day:"Day",days:"Days",apply:"Close","week-1":"mo","week-2":"tu","week-3":"we","week-4":"th","week-5":"fr","week-6":"sa","week-7":"su","week-number":"W","month-name":["january","february","march","april","may","june","july","august","september","october","november","december"],shortcuts:"Shortcuts","custom-values":"Custom Values",past:"Past",following:"Following",previous:"Previous","prev-week":"Week","prev-month":"Month","prev-year":"Year",next:"Next","next-week":"Week","next-month":"Month","next-year":"Year","less-than":"Date range should not be more than %d days","more-than":"Date range should not be less than %d days","default-more":"Please select a date range longer than %d days","default-single":"Please select a date","default-less":"Please select a date range less than %d days","default-range":"Please select a date range between %d and %d days","default-default":"Please select a date range",time:"Time",hour:"Hour",minute:"Minute"},id:{selected:"Terpilih:",day:"Hari",days:"Hari",apply:"Tutup","week-1":"sen","week-2":"sel","week-3":"rab","week-4":"kam","week-5":"jum","week-6":"sab","week-7":"min","week-number":"W","month-name":["januari","februari","maret","april","mei","juni","juli","agustus","september","oktober","november","desember"],shortcuts:"Pintas","custom-values":"Nilai yang ditentukan",past:"Yang Lalu",following:"Mengikuti",previous:"Sebelumnya","prev-week":"Minggu","prev-month":"Bulan","prev-year":"Tahun",next:"Selanjutnya","next-week":"Minggu","next-month":"Bulan","next-year":"Tahun","less-than":"Tanggal harus lebih dari %d hari","more-than":"Tanggal harus kurang dari %d hari","default-more":"Jarak tanggal harus lebih lama dari %d hari","default-single":"Silakan pilih tanggal","default-less":"Jarak rentang tanggal tidak boleh lebih lama dari %d hari","default-range":"Rentang tanggal harus antara %d dan %d hari","default-default":"Silakan pilih rentang tanggal",time:"Waktu",hour:"Jam",minute:"Menit"},az:{selected:"Seçildi:",day:" gün",days:" gün",apply:"tətbiq","week-1":"1","week-2":"2","week-3":"3","week-4":"4","week-5":"5","week-6":"6","week-7":"7","month-name":["yanvar","fevral","mart","aprel","may","iyun","iyul","avqust","sentyabr","oktyabr","noyabr","dekabr"],shortcuts:"Qısayollar",past:"Keçmiş",following:"Növbəti",previous:"&nbsp;&nbsp;&nbsp;","prev-week":"Öncəki həftə","prev-month":"Öncəki ay","prev-year":"Öncəki il",next:"&nbsp;&nbsp;&nbsp;","next-week":"Növbəti həftə","next-month":"Növbəti ay","next-year":"Növbəti il","less-than":"Tarix aralığı %d gündən çox olmamalıdır","more-than":"Tarix aralığı %d gündən az olmamalıdır","default-more":"%d gündən çox bir tarix seçin","default-single":"Tarix seçin","default-less":"%d gündən az bir tarix seçin","default-range":"%d və %d gün aralığında tarixlər seçin","default-default":"Tarix aralığı seçin"},bg:{selected:"Избрано:",day:"Ден",days:"Дни",apply:"Затвори","week-1":"пн","week-2":"вт","week-3":"ср","week-4":"чт","week-5":"пт","week-6":"сб","week-7":"нд","week-number":"С","month-name":["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"],shortcuts:"Преки пътища","custom-values":"Персонализирани стойности",past:"Минал",following:"Следващ",previous:"Предишен","prev-week":"Седмица","prev-month":"Месец","prev-year":"Година",next:"Следващ","next-week":"Седмица","next-month":"Месец","next-year":"Година","less-than":"Периодът от време не трябва да е повече от %d дни","more-than":"Периодът от време не трябва да е по-малко от %d дни","default-more":"Моля изберете период по-дълъг от %d дни","default-single":"Моля изберете дата","default-less":"Моля изберете период по-къс от %d дни","default-range":"Моля изберете период между %d и %d дни","default-default":"Моля изберете период",time:"Време",hour:"Час",minute:"Минута"},cn:{selected:"已选择:",day:"天",days:"天",apply:"确定","week-1":"一","week-2":"二","week-3":"三","week-4":"四","week-5":"五","week-6":"六","week-7":"日","week-number":"周","month-name":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortcuts:"快捷选择",past:"过去",following:"将来",previous:"&nbsp;&nbsp;&nbsp;","prev-week":"上周","prev-month":"上个月","prev-year":"去年",next:"&nbsp;&nbsp;&nbsp;","next-week":"下周","next-month":"下个月","next-year":"明年","less-than":"所选日期范围不能大于%d天","more-than":"所选日期范围不能小于%d天","default-more":"请选择大于%d天的日期范围","default-less":"请选择小于%d天的日期范围","default-range":"请选择%d天到%d天的日期范围","default-single":"请选择一个日期","default-default":"请选择一个日期范围",time:"时间",hour:"小时",minute:"分钟"},cz:{selected:"Vybráno:",day:"Den",days:"Dny",apply:"Zavřít","week-1":"po","week-2":"út","week-3":"st","week-4":"čt","week-5":"pá","week-6":"so","week-7":"ne","month-name":["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],shortcuts:"Zkratky",past:"po",following:"následující",previous:"předchozí","prev-week":"týden","prev-month":"měsíc","prev-year":"rok",next:"další","next-week":"týden","next-month":"měsíc","next-year":"rok","less-than":"Rozsah data by neměl být větší než %d dnů","more-than":"Rozsah data by neměl být menší než %d dnů","default-more":"Prosím zvolte rozsah data větší než %d dnů","default-single":"Prosím zvolte datum","default-less":"Prosím zvolte rozsah data menší než %d dnů","default-range":"Prosím zvolte rozsah data mezi %d a %d dny","default-default":"Prosím zvolte rozsah data"},de:{selected:"Auswahl:",day:"Tag",days:"Tage",apply:"Schließen","week-1":"mo","week-2":"di","week-3":"mi","week-4":"do","week-5":"fr","week-6":"sa","week-7":"so","month-name":["januar","februar","märz","april","mai","juni","juli","august","september","oktober","november","dezember"],shortcuts:"Schnellwahl",past:"Vorherige",following:"Folgende",previous:"Vorherige","prev-week":"Woche","prev-month":"Monat","prev-year":"Jahr",next:"Nächste","next-week":"Woche","next-month":"Monat","next-year":"Jahr","less-than":"Datumsbereich darf nicht größer sein als %d Tage","more-than":"Datumsbereich darf nicht kleiner sein als %d Tage","default-more":"Bitte mindestens %d Tage auswählen","default-single":"Bitte ein Datum auswählen","default-less":"Bitte weniger als %d Tage auswählen","default-range":"Bitte einen Datumsbereich zwischen %d und %d Tagen auswählen","default-default":"Bitte ein Start- und Enddatum auswählen",Time:"Zeit",hour:"Stunde",minute:"Minute"},es:{selected:"Seleccionado:",day:"Día",days:"Días",apply:"Cerrar","week-1":"lu","week-2":"ma","week-3":"mi","week-4":"ju","week-5":"vi","week-6":"sa","week-7":"do","month-name":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortcuts:"Accesos directos",past:"Pasado",following:"Siguiente",previous:"Anterior","prev-week":"Semana","prev-month":"Mes","prev-year":"Año",next:"Siguiente","next-week":"Semana","next-month":"Mes","next-year":"Año","less-than":"El rango no debería ser mayor de %d días","more-than":"El rango no debería ser menor de %d días","default-more":"Por favor selecciona un rango mayor a %d días","default-single":"Por favor selecciona un día","default-less":"Por favor selecciona un rango menor a %d días","default-range":"Por favor selecciona un rango entre %d y %d días","default-default":"Por favor selecciona un rango de fechas."},fr:{selected:"Sélection:",day:"Jour",days:"Jours",apply:"Fermer","week-1":"lu","week-2":"ma","week-3":"me","week-4":"je","week-5":"ve","week-6":"sa","week-7":"di","month-name":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortcuts:"Raccourcis",past:"Passé",following:"Suivant",previous:"Précédent","prev-week":"Semaine","prev-month":"Mois","prev-year":"Année",next:"Suivant","next-week":"Semaine","next-month":"Mois","next-year":"Année","less-than":"L'intervalle ne doit pas être supérieure à %d jours","more-than":"L'intervalle ne doit pas être inférieure à %d jours","default-more":"Merci de choisir une intervalle supérieure à %d jours","default-single":"Merci de choisir une date","default-less":"Merci de choisir une intervalle inférieure %d jours","default-range":"Merci de choisir une intervalle comprise entre %d et %d jours","default-default":"Merci de choisir une date"},hu:{selected:"Kiválasztva:",day:"Nap",days:"Nap",apply:"Ok","week-1":"h","week-2":"k","week-3":"sz","week-4":"cs","week-5":"p","week-6":"sz","week-7":"v","month-name":["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],shortcuts:"Gyorsválasztó",past:"Múlt",following:"Következő",previous:"Előző","prev-week":"Hét","prev-month":"Hónap","prev-year":"Év",next:"Következő","next-week":"Hét","next-month":"Hónap","next-year":"Év","less-than":"A kiválasztás nem lehet több %d napnál","more-than":"A kiválasztás nem lehet több %d napnál","default-more":"Válassz ki egy időszakot ami hosszabb mint %d nap","default-single":"Válassz egy napot","default-less":"Válassz ki egy időszakot ami rövidebb mint %d nap","default-range":"Válassz ki egy %d - %d nap hosszú időszakot","default-default":"Válassz ki egy időszakot"},it:{selected:"Selezionati:",day:"Giorno",days:"Giorni",apply:"Chiudi","week-1":"lu","week-2":"ma","week-3":"me","week-4":"gi","week-5":"ve","week-6":"sa","week-7":"do","month-name":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],shortcuts:"Scorciatoie",past:"Scorso",following:"Successivo",previous:"Precedente","prev-week":"Settimana","prev-month":"Mese","prev-year":"Anno",next:"Prossimo","next-week":"Settimana","next-month":"Mese","next-year":"Anno","less-than":"L'intervallo non dev'essere maggiore di %d giorni","more-than":"L'intervallo non dev'essere minore di %d giorni","default-more":"Seleziona un intervallo maggiore di %d giorni","default-single":"Seleziona una data","default-less":"Seleziona un intervallo minore di %d giorni","default-range":"Seleziona un intervallo compreso tra i %d e i %d giorni","default-default":"Seleziona un intervallo di date"},ko:{selected:"기간:",day:"일",days:"일간",apply:"닫기","week-1":"월","week-2":"화","week-3":"수","week-4":"목","week-5":"금","week-6":"토","week-7":"일","week-number":"주","month-name":["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortcuts:"단축키들",past:"지난(오늘기준)",following:"이후(오늘기준)",previous:"이전","prev-week":"1주","prev-month":"1달","prev-year":"1년",next:"다음","next-week":"1주","next-month":"1달","next-year":"1년","less-than":"날짜 범위는 %d 일보다 많을 수 없습니다","more-than":"날짜 범위는 %d 일보다 작을 수 없습니다","default-more":"날짜 범위를 %d 일보다 길게 선택해 주세요","default-single":"날짜를 선택해 주세요","default-less":"%d 일보다 작은 날짜를 선택해 주세요","default-range":"%d와 %d 일 사이의 날짜 범위를 선택해 주세요","default-default":"날짜 범위를 선택해 주세요",time:"시각",hour:"시",minute:"분"},no:{selected:"Valgt:",day:"Dag",days:"Dager",apply:"Lukk","week-1":"ma","week-2":"ti","week-3":"on","week-4":"to","week-5":"fr","week-6":"lø","week-7":"sø","month-name":["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],shortcuts:"Snarveier","custom-values":"Egendefinerte Verdier",past:"Over",following:"Følger",previous:"Forrige","prev-week":"Uke","prev-month":"Måned","prev-year":"År",next:"Neste","next-week":"Uke","next-month":"Måned","next-year":"År","less-than":"Datoperioden skal ikkje være lengre enn %d dager","more-than":"Datoperioden skal ikkje være kortere enn %d dager","default-more":"Vennligst velg ein datoperiode lengre enn %d dager","default-single":"Vennligst velg ein dato","default-less":"Vennligst velg ein datoperiode mindre enn %d dager","default-range":"Vennligst velg ein datoperiode mellom %d og %d dager","default-default":"Vennligst velg ein datoperiode",time:"Tid",hour:"Time",minute:"Minutter"},nl:{selected:"Geselecteerd:",day:"Dag",days:"Dagen",apply:"Ok","week-1":"ma","week-2":"di","week-3":"wo","week-4":"do","week-5":"vr","week-6":"za","week-7":"zo","month-name":["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortcuts:"Snelkoppelingen","custom-values":"Aangepaste waarden",past:"Verleden",following:"Komend",previous:"Vorige","prev-week":"Week","prev-month":"Maand","prev-year":"Jaar",next:"Volgende","next-week":"Week","next-month":"Maand","next-year":"Jaar","less-than":"Interval moet langer dan %d dagen zijn","more-than":"Interval mag niet minder dan %d dagen zijn","default-more":"Selecteer een interval langer dan %dagen","default-single":"Selecteer een datum","default-less":"Selecteer een interval minder dan %d dagen","default-range":"Selecteer een interval tussen %d en %d dagen","default-default":"Selecteer een interval",time:"Tijd",hour:"Uur",minute:"Minuut"},ru:{selected:"Выбрано:",day:"День",days:"Дней",apply:"Применить","week-1":"пн","week-2":"вт","week-3":"ср","week-4":"чт","week-5":"пт","week-6":"сб","week-7":"вс","month-name":["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"],shortcuts:"Быстрый выбор","custom-values":"Пользовательские значения",past:"Прошедшие",following:"Следующие",previous:"&nbsp;&nbsp;&nbsp;","prev-week":"Неделя","prev-month":"Месяц","prev-year":"Год",next:"&nbsp;&nbsp;&nbsp;","next-week":"Неделя","next-month":"Месяц","next-year":"Год","less-than":"Диапазон не может быть больше %d дней","more-than":"Диапазон не может быть меньше %d дней","default-more":"Пожалуйста выберите диапазон больше %d дней","default-single":"Пожалуйста выберите дату","default-less":"Пожалуйста выберите диапазон меньше %d дней","default-range":"Пожалуйста выберите диапазон между %d и %d днями","default-default":"Пожалуйста выберите диапазон",time:"Время",hour:"Часы",minute:"Минуты"},uk:{selected:"Вибрано:",day:"День",days:"Днів",apply:"Застосувати","week-1":"пн","week-2":"вт","week-3":"ср","week-4":"чт","week-5":"пт","week-6":"сб","week-7":"нд","month-name":["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"],shortcuts:"Швидкий вибір","custom-values":"Значення користувача",past:"Минулі",following:"Наступні",previous:"&nbsp;&nbsp;&nbsp;","prev-week":"Тиждень","prev-month":"Місяць","prev-year":"Рік",next:"&nbsp;&nbsp;&nbsp;","next-week":"Тиждень","next-month":"Місяць","next-year":"Рік","less-than":"Діапазон не може бути більш ніж %d днів","more-than":"Діапазон не може бути меньш ніж %d днів","default-more":"Будь ласка виберіть діапазон більше %d днів","default-single":"Будь ласка виберіть дату","default-less":"Будь ласка виберіть діапазон менше %d днів","default-range":"Будь ласка виберіть діапазон між %d та %d днями","default-default":"Будь ласка виберіть діапазон",time:"Час",hour:"Години",minute:"Хвилини"},pl:{selected:"Wybrany:",day:"Dzień",days:"Dni",apply:"Zamknij","week-1":"pon","week-2":"wt","week-3":"śr","week-4":"czw","week-5":"pt","week-6":"so","week-7":"nd","month-name":["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],shortcuts:"Skróty","custom-values":"Niestandardowe wartości",past:"Przeszłe",following:"Następne",previous:"Poprzednie","prev-week":"tydzień","prev-month":"miesiąc","prev-year":"rok",next:"Następny","next-week":"tydzień","next-month":"miesiąc","next-year":"rok","less-than":"Okres nie powinien być dłuższy niż %d dni","more-than":"Okres nie powinien być krótszy niż  %d ni","default-more":"Wybierz okres dłuższy niż %d dni","default-single":"Wybierz datę","default-less":"Wybierz okres krótszy niż %d dni","default-range":"Wybierz okres trwający od %d do %d dni","default-default":"Wybierz okres",time:"Czas",hour:"Godzina",minute:"Minuta"},se:{selected:"Vald:",day:"dag",days:"dagar",apply:"godkänn","week-1":"ma","week-2":"ti","week-3":"on","week-4":"to","week-5":"fr","week-6":"lö","week-7":"sö","month-name":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],shortcuts:"genvägar","custom-values":"Anpassade värden",past:"över",following:"följande",previous:"förra","prev-week":"vecka","prev-month":"månad","prev-year":"år",next:"nästa","next-week":"vecka","next-month":"måned","next-year":"år","less-than":"Datumintervall bör inte vara mindre än %d dagar","more-than":"Datumintervall bör inte vara mer än %d dagar","default-more":"Välj ett datumintervall längre än %d dagar","default-single":"Välj ett datum","default-less":"Välj ett datumintervall mindre än %d dagar","default-range":"Välj ett datumintervall mellan %d och %d dagar","default-default":"Välj ett datumintervall",time:"tid",hour:"timme",minute:"minut"},pt:{selected:"Selecionado:",day:"Dia",days:"Dias",apply:"Fechar","week-1":"seg","week-2":"ter","week-3":"qua","week-4":"qui","week-5":"sex","week-6":"sab","week-7":"dom","week-number":"N","month-name":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],shortcuts:"Atalhos","custom-values":"Valores Personalizados",past:"Passado",following:"Seguinte",previous:"Anterior","prev-week":"Semana","prev-month":"Mês","prev-year":"Ano",next:"Próximo","next-week":"Próxima Semana","next-month":"Próximo Mês","next-year":"Próximo Ano","less-than":"O período selecionado não deve ser maior que %d dias","more-than":"O período selecionado não deve ser menor que %d dias","default-more":"Selecione um período superior a %d dias","default-single":"Selecione uma data","default-less":"Selecione um período inferior a %d dias","default-range":"Selecione um período de %d a %d dias","default-default":"Selecione um período",time:"Tempo",hour:"Hora",minute:"Minuto"},tc:{selected:"已選擇:",day:"天",days:"天",apply:"確定","week-1":"一","week-2":"二","week-3":"三","week-4":"四","week-5":"五","week-6":"六","week-7":"日","week-number":"周","month-name":["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortcuts:"快速選擇",past:"過去",following:"將來",previous:"&nbsp;&nbsp;&nbsp;","prev-week":"上週","prev-month":"上個月","prev-year":"去年",next:"&nbsp;&nbsp;&nbsp;","next-week":"下周","next-month":"下個月","next-year":"明年","less-than":"所選日期範圍不能大於%d天","more-than":"所選日期範圍不能小於%d天","default-more":"請選擇大於%d天的日期範圍","default-less":"請選擇小於%d天的日期範圍","default-range":"請選擇%d天到%d天的日期範圍","default-single":"請選擇一個日期","default-default":"請選擇一個日期範圍",time:"日期",hour:"小時",minute:"分鐘"},ja:{selected:"選択しました:",day:"日",days:"日々",apply:"閉じる","week-1":"月","week-2":"火","week-3":"水","week-4":"木","week-5":"金","week-6":"土","week-7":"日","month-name":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],shortcuts:"クイック選択",past:"過去",following:"将来",previous:"&nbsp;&nbsp;&nbsp;","prev-week":"先週、","prev-month":"先月","prev-year":"昨年",next:"&nbsp;&nbsp;&nbsp;","next-week":"来週","next-month":"来月","next-year":"来年","less-than":"日付の範囲は ％d 日以上にすべきではありません","more-than":"日付の範囲は ％d 日を下回ってはいけません","default-more":"％d 日よりも長い期間を選択してください","default-less":"％d 日未満の期間を選択してください","default-range":"％d と％ d日の間の日付範囲を選択してください","default-single":"日付を選択してください","default-default":"日付範囲を選択してください",time:"時間",hour:"時間",minute:"分"},da:{selected:"Valgt:",day:"Dag",days:"Dage",apply:"Luk","week-1":"ma","week-2":"ti","week-3":"on","week-4":"to","week-5":"fr","week-6":"lö","week-7":"sö","month-name":["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],shortcuts:"genveje","custom-values":"Brugerdefinerede værdier",past:"Forbi",following:"Følgende",previous:"Forrige","prev-week":"uge","prev-month":"månad","prev-year":"år",next:"Næste","next-week":"Næste uge","next-month":"Næste måned","next-year":"Næste år","less-than":"Dato interval bør ikke være med end %d dage","more-than":"Dato interval bør ikke være mindre end %d dage","default-more":"Vælg datointerval længere end %d dage","default-single":"Vælg dato","default-less":"Vælg datointerval mindre end %d dage","default-range":"Vælg datointerval mellem %d og %d dage","default-default":"Vælg datointerval",time:"tid",hour:"time",minute:"minut"},fi:{selected:"Valittu:",day:"Päivä",days:"Päivää",apply:"Sulje","week-1":"ma","week-2":"ti","week-3":"ke","week-4":"to","week-5":"pe","week-6":"la","week-7":"su","week-number":"V","month-name":["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],shortcuts:"Pikavalinnat","custom-values":"Mukautetut Arvot",past:"Menneet",following:"Tulevat",previous:"Edellinen","prev-week":"Viikko","prev-month":"Kuukausi","prev-year":"Vuosi",next:"Seuraava","next-week":"Viikko","next-month":"Kuukausi","next-year":"Vuosi","less-than":"Aikajakson tulisi olla vähemmän kuin %d päivää","more-than":"Aikajakson ei tulisi olla vähempää kuin %d päivää","default-more":"Valitse pidempi aikajakso kuin %d päivää","default-single":"Valitse päivä","default-less":"Valitse lyhyempi aikajakso kuin %d päivää","default-range":"Valitse aikajakso %d ja %d päivän väliltä","default-default":"Valitse aikajakso",time:"Aika",hour:"Tunti",minute:"Minuutti"},cat:{selected:"Seleccionats:",day:"Dia",days:"Dies",apply:"Tanca","week-1":"Dl","week-2":"Dm","week-3":"Dc","week-4":"Dj","week-5":"Dv","week-6":"Ds","week-7":"Dg","week-number":"S","month-name":["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],shortcuts:"Dreçeres","custom-values":"Valors personalitzats",past:"Passat",following:"Futur",previous:"Anterior","prev-week":"Setmana","prev-month":"Mes","prev-year":"Any",next:"Següent","next-week":"Setmana","next-month":"Mes","next-year":"Any","less-than":"El període no hauria de ser de més de %d dies","more-than":"El període no hauria de ser de menys de %d dies","default-more":"Perfavor selecciona un període més gran de %d dies","default-single":"Perfavor selecciona una data","default-less":"Perfavor selecciona un període de menys de %d dies","default-range":"Perfavor selecciona un període d'entre %d i %d dies","default-default":"Perfavor selecciona un període",time:"Temps",hour:"Hora",minute:"Minut"}};he.fn.dateRangePicker=function(v){if(!v)v={};v=he.extend(true,{autoClose:false,format:"YYYY-MM-DD",separator:" to ",language:"auto",startOfWeek:"sunday",getValue:function(){return he(this).val()},setValue:function(e){if(!he(this).attr("readonly")&&!he(this).is(":disabled")&&e!=he(this).val()){he(this).val(e)}},startDate:false,endDate:false,time:{enabled:false},minDays:0,maxDays:0,showShortcuts:false,shortcuts:{},customShortcuts:[],inline:false,container:"body",alwaysOpen:false,singleDate:false,lookBehind:false,batchMode:false,duration:200,stickyMonths:false,dayDivAttrs:[],dayTdAttrs:[],selectForward:false,selectBackward:false,applyBtnClass:"",singleMonth:"auto",hoveringTooltip:function(e,t,a){return e>1?e+" "+de("days"):""},showTopbar:true,swapTime:false,showWeekNumbers:false,getWeekNumber:function(e){return ce(e).format("w")},customOpenAnimation:null,customCloseAnimation:null,customArrowPrevSymbol:null,customArrowNextSymbol:null,monthSelect:false,yearSelect:false},v);v.start=false;v.end=false;v.startWeek=false;v.isTouchDevice="ontouchstart"in window||navigator.msMaxTouchPoints;if(v.isTouchDevice)v.hoveringTooltip=false;if(v.singleMonth=="auto")v.singleMonth=he(window).width()<480;if(v.singleMonth)v.stickyMonths=false;if(!v.showTopbar)v.autoClose=true;if(v.startDate&&typeof v.startDate=="string")v.startDate=ce(v.startDate,v.format).toDate();if(v.endDate&&typeof v.endDate=="string")v.endDate=ce(v.endDate,v.format).toDate();if(v.yearSelect&&typeof v.yearSelect==="boolean"){v.yearSelect=function(e){return[e-5,e+5]}}var r=le();var f;var l=false;var n=this;var d=he(n).get(0);var e;he(this).off(".datepicker").on("click.datepicker",function(e){var t=f.is(":visible");if(!t)i(v.duration)}).on("change.datepicker",function(e){o()}).on("keyup.datepicker",function(){try{clearTimeout(e)}catch(e){}e=setTimeout(function(){o()},2e3)});a.call(this);if(v.alwaysOpen){i(0)}he(this).data("dateRangePicker",{setStart:function(e){if(typeof e=="string"){e=ce(e,v.format).toDate()}v.end=false;W(e);return this},setEnd:function(e,t){var a=new Date;a.setTime(v.start);if(typeof e=="string"){e=ce(e,v.format).toDate()}Y(a,e,t);return this},setDateRange:function(e,t,a){if(typeof e=="string"&&typeof t=="string"){e=ce(e,v.format).toDate();t=ce(t,v.format).toDate()}Y(e,t,a)},clear:w,close:J,open:i,redraw:K,getDatePicker:s,resetMonthsView:fe,destroy:function(){he(n).off(".datepicker");he(n).data("dateRangePicker","");he(n).data("date-picker-opened",null);f.remove();he(window).off("resize.datepicker",u);he(document).off("click.datepicker",me)}});he(window).on("resize.datepicker",u);return this;function t(e,t){return t.contains(e.target)||e.target==t||t.childNodes!=undefined&&he.inArray(e.target,t.childNodes)>=0}function a(){var t=this;if(he(this).data("date-picker-opened")){J();return}he(this).data("date-picker-opened",true);f=X().hide();f.append('<div class="date-range-length-tip"></div>');he(v.container).append(f);if(!v.inline){u()}else{f.addClass("inline-wrapper")}if(v.alwaysOpen){f.find(".apply-btn").hide()}var e=ue();fe(e);if(v.time.enabled){if(v.startDate&&v.endDate||v.start&&v.end){R(ce(v.start||v.startDate).toDate(),"time1");R(ce(v.end||v.endDate).toDate(),"time2")}else{var a=v.defaultEndTime?v.defaultEndTime:e;R(e,"time1");R(a,"time2")}}var n="";if(v.singleDate)n=de("default-single");else if(v.minDays&&v.maxDays)n=de("default-range").replace(/\%d/,v.minDays).replace(/\%d/,v.maxDays);else if(v.minDays)n=de("default-more").replace(/\%d/,v.minDays);else if(v.maxDays)n=de("default-less").replace(/\%d/,v.maxDays);else n=de("default-default");f.find(".default-top").html(n);if(v.singleMonth){f.addClass("single-month")}else{f.addClass("two-months")}setTimeout(function(){h();l=true},0);f.click(function(e){e.stopPropagation()});he(document).on("click.datepicker",me);f.find(".next").click(function(){if(!v.stickyMonths)r(this);else s(this)});function r(e){var t=he(e).parents("table").hasClass("month2");var a=t?v.month2:v.month1;a=U(a);if(!v.singleMonth&&!v.singleDate&&!t&&_(a,v.month2)>=0||ae(a))return;I(a,t?"month2":"month1");$()}function s(e){var t=U(v.month1);var a=U(v.month2);if(ae(a))return;if(!v.singleDate&&_(t,a)>=0)return;I(t,"month1");I(a,"month2");A()}f.find(".prev").click(function(){if(!v.stickyMonths)i(this);else o(this)});function i(e){var t=he(e).parents("table").hasClass("month2");var a=t?v.month2:v.month1;a=Z(a);if(t&&_(a,v.month1)<=0||ae(a))return;I(a,t?"month2":"month1");$()}function o(e){var t=Z(v.month1);var a=Z(v.month2);if(ae(t))return;if(!v.singleDate&&_(a,t)<=0)return;I(a,"month2");I(t,"month1");A()}f.attr("unselectable","on").css("user-select","none").on("selectstart",function(e){e.preventDefault();return false});f.find(".apply-btn").click(function(){J();var e=q(new Date(v.start))+v.separator+q(new Date(v.end));he(t).trigger("datepicker-apply",{value:e,date1:new Date(v.start),date2:new Date(v.end)})});f.find("[custom]").click(function(){var e=he(this).attr("custom");v.start=false;v.end=false;f.find(".day.checked").removeClass("checked");v.setValue.call(d,e);z();V(true);A();if(v.autoClose)J()});f.find("[shortcut]").click(function(){var e=he(this).attr("shortcut");var t=new Date,a=false;var n;if(e.indexOf("day")!=-1){var r=parseInt(e.split(",",2)[1],10);a=new Date((new Date).getTime()+864e5*r);t=new Date(t.getTime()+864e5*(r>0?1:-1))}else if(e.indexOf("week")!=-1){n=e.indexOf("prev,")!=-1?-1:1;var s;if(n==1)s=v.startOfWeek=="monday"?1:0;else s=v.startOfWeek=="monday"?0:6;t=new Date(t.getTime()-864e5);while(t.getDay()!=s)t=new Date(t.getTime()+n*864e5);a=new Date(t.getTime()+n*864e5*6)}else if(e.indexOf("month")!=-1){n=e.indexOf("prev,")!=-1?-1:1;if(n==1)a=U(t);else a=Z(t);a.setDate(1);t=U(a);t.setDate(1);t=new Date(t.getTime()-864e5)}else if(e.indexOf("year")!=-1){n=e.indexOf("prev,")!=-1?-1:1;a=new Date;a.setFullYear(t.getFullYear()+n);a.setMonth(0);a.setDate(1);t.setFullYear(t.getFullYear()+n);t.setMonth(11);t.setDate(31)}else if(e=="custom"){var i=he(this).html();if(v.customShortcuts&&v.customShortcuts.length>0){for(var o=0;o<v.customShortcuts.length;o++){var l=v.customShortcuts[o];if(l.name==i){var d=[];d=l["dates"].call();if(d&&d.length==2){a=d[0];t=d[1]}if(d&&d.length==1){var u=d[0];I(u,"month1");I(U(u),"month2");$()}break}}}}if(a&&t){Y(a,t);z()}});f.find(".time1 input[type=range]").on("change touchmove",function(e){var t=e.target,a=t.name=="hour"?he(t).val().replace(/^(\d{1})$/,"0$1"):undefined,n=t.name=="minute"?he(t).val().replace(/^(\d{1})$/,"0$1"):undefined;k("time1",a,n)});f.find(".time2 input[type=range]").on("change touchmove",function(e){var t=e.target,a=t.name=="hour"?he(t).val().replace(/^(\d{1})$/,"0$1"):undefined,n=t.name=="minute"?he(t).val().replace(/^(\d{1})$/,"0$1"):undefined;k("time2",a,n)})}function u(){if(!v.inline){var e=he(n).offset();if(he(v.container).css("position")=="relative"){var t=he(v.container).offset();var a=Math.max(0,e.left+f.outerWidth()-he("body").width()+16);f.css({top:e.top-t.top+he(n).outerHeight()+4,left:e.left-t.left-a})}else{if(e.left<460){f.css({top:e.top+he(n).outerHeight()+parseInt(he("body").css("border-top")||0,10),left:e.left})}else{f.css({top:e.top+he(n).outerHeight()+parseInt(he("body").css("border-top")||0,10),left:e.left+he(n).width()-f.width()-16})}}}}function s(){return f}function i(e){K();o();if(v.customOpenAnimation){v.customOpenAnimation.call(f.get(0),function(){he(n).trigger("datepicker-opened",{relatedTarget:f})})}else{f.slideDown(e,function(){he(n).trigger("datepicker-opened",{relatedTarget:f})})}he(n).trigger("datepicker-open",{relatedTarget:f});$();h();u()}function o(){var e=v.getValue.call(d);var t=e?e.split(v.separator):"";if(t&&(t.length==1&&v.singleDate||t.length>=2)){var a=v.format;if(a.match(/Do/)){a=a.replace(/Do/,"D");t[0]=t[0].replace(/(\d+)(th|nd|st)/,"$1");if(t.length>=2){t[1]=t[1].replace(/(\d+)(th|nd|st)/,"$1")}}l=false;if(t.length>=2){Y(m(t[0],a,ce.locale(v.language)),m(t[1],a,ce.locale(v.language)))}else if(t.length==1&&v.singleDate){W(m(t[0],a,ce.locale(v.language)))}l=true}}function m(e,t,a){if(ce(e,t,a).isValid()){return ce(e,t,a).toDate()}else{return ce().toDate()}}function h(){var e=f.find(".gap").css("margin-left");if(e)e=parseInt(e);var t=f.find(".month1").outerWidth();var a=f.find(".gap").outerWidth()+(e?e*2:0);var n=f.find(".month2").outerWidth();f.find(".month-wrapper").css('min-width',t+a+n)}function c(e,t){f.find("."+e+" input[type=range].hour-range").val(ce(t).hours());f.find("."+e+" input[type=range].minute-range").val(ce(t).minutes());k(e,ce(t).format("HH"),ce(t).format("mm"))}function p(e,t){v[e]=parseInt(ce(parseInt(t)).startOf("day").add(ce(v[e+"Time"]).format("HH"),"h").add(ce(v[e+"Time"]).format("mm"),"m").valueOf())}function g(){c("time1",v.start);c("time2",v.end)}function k(e,r,s){r&&f.find("."+e+" .hour-val").text(r);s&&f.find("."+e+" .minute-val").text(s);switch(e){case"time1":if(v.start){t("start",ce(v.start))}t("startTime",ce(v.startTime||ce().valueOf()));break;case"time2":if(v.end){t("end",ce(v.end))}t("endTime",ce(v.endTime||ce().valueOf()));break}function t(e,t){var a=t.format("HH"),n=t.format("mm");v[e]=t.startOf("day").add(r||a,"h").add(s||n,"m").valueOf()}z();V();A()}function w(){v.start=false;v.end=false;f.find(".day.checked").removeClass("checked");f.find(".day.last-date-selected").removeClass("last-date-selected");f.find(".day.first-date-selected").removeClass("first-date-selected");v.setValue.call(d,"");z();V();A()}function y(e){var t=e;if(v.batchMode==="week-range"){if(v.startOfWeek==="monday"){t=ce(parseInt(e)).startOf("isoweek").valueOf()}else{t=ce(parseInt(e)).startOf("week").valueOf()}}else if(v.batchMode==="month-range"){t=ce(parseInt(e)).startOf("month").valueOf()}return t}function b(e){var t=e;if(v.batchMode==="week-range"){if(v.startOfWeek==="monday"){t=ce(parseInt(e)).endOf("isoweek").valueOf()}else{t=ce(parseInt(e)).endOf("week").valueOf()}}else if(v.batchMode==="month-range"){t=ce(parseInt(e)).endOf("month").valueOf()}return t}function D(e){if(e.hasClass("invalid"))return;var t=e.attr("time");e.addClass("checked");if(v.singleDate){v.start=t;v.end=false}else if(v.batchMode==="week"){if(v.startOfWeek==="monday"){v.start=ce(parseInt(t)).startOf("isoweek").valueOf();v.end=ce(parseInt(t)).endOf("isoweek").valueOf()}else{v.end=ce(parseInt(t)).endOf("week").valueOf();v.start=ce(parseInt(t)).startOf("week").valueOf()}}else if(v.batchMode==="workweek"){v.start=ce(parseInt(t)).day(1).valueOf();v.end=ce(parseInt(t)).day(5).valueOf()}else if(v.batchMode==="weekend"){v.start=ce(parseInt(t)).day(6).valueOf();v.end=ce(parseInt(t)).day(7).valueOf()}else if(v.batchMode==="month"){v.start=ce(parseInt(t)).startOf("month").valueOf();v.end=ce(parseInt(t)).endOf("month").valueOf()}else if(v.start&&v.end||!v.start&&!v.end){v.start=y(t);v.end=false}else if(v.start){v.end=b(t);if(v.time.enabled){p("end",v.end)}}if(v.time.enabled){if(v.start){p("start",v.start)}if(v.end){p("end",v.end)}}if(!v.singleDate&&v.start&&v.end&&v.start>v.end){var a=v.end;v.end=b(v.start);v.start=y(a);if(v.time.enabled&&v.swapTime){g()}}v.start=parseInt(v.start);v.end=parseInt(v.end);T();if(v.start&&!v.end){he(n).trigger("datepicker-first-date-selected",{date1:new Date(v.start)});O(e)}S(t);z();V();A();j()}function x(e){var t=parseInt(e.attr("data-start-time"),10);var a,n;if(!v.startWeek){v.startWeek=t;e.addClass("week-number-selected");a=new Date(t);v.start=ce(a).day(v.startOfWeek=="monday"?1:0).valueOf();v.end=ce(a).day(v.startOfWeek=="monday"?7:6).valueOf()}else{f.find(".week-number-selected").removeClass("week-number-selected");a=new Date(t<v.startWeek?t:v.startWeek);n=new Date(t<v.startWeek?v.startWeek:t);v.startWeek=false;v.start=ce(a).day(v.startOfWeek=="monday"?1:0).valueOf();v.end=ce(n).day(v.startOfWeek=="monday"?7:6).valueOf()}S();z();V();A();j()}function M(e){e=parseInt(e,10);if(v.startDate&&G(e,v.startDate)<0)return false;if(v.endDate&&G(e,v.endDate)>0)return false;if(v.start&&!v.end&&!v.singleDate){if(v.maxDays>0&&P(e,v.start)>v.maxDays)return false;if(v.minDays>0&&P(e,v.start)<v.minDays)return false;if(v.selectForward&&e<v.start)return false;if(v.selectBackward&&e>v.start)return false;if(v.beforeShowDay&&typeof v.beforeShowDay=="function"){var t=true;var a=e;while(P(a,v.start)>1){var n=v.beforeShowDay(new Date(a));if(!n[0]){t=false;break}if(Math.abs(a-v.start)<864e5)break;if(a>v.start)a-=864e5;if(a<v.start)a+=864e5}if(!t)return false}}return true}function S(){f.find(".day.invalid.tmp").removeClass("tmp invalid").addClass("valid");if(v.start&&!v.end){f.find(".day.toMonth.valid").each(function(){var e=parseInt(he(this).attr("time"),10);if(!M(e))he(this).addClass("invalid tmp").removeClass("valid");else he(this).addClass("valid tmp").removeClass("invalid")})}return true}function O(e){var n=parseInt(e.attr("time"));var t="";if(e.hasClass("has-tooltip")&&e.attr("data-tooltip")){t='<span class="tooltip-content">'+e.attr("data-tooltip")+"</span>"}else if(!e.hasClass("invalid")){if(v.singleDate){f.find(".day.hovering").removeClass("hovering");e.addClass("hovering")}else{f.find(".day").each(function(){var e=parseInt(he(this).attr("time")),t=v.start,a=v.end;if(e==n){he(this).addClass("hovering")}else{he(this).removeClass("hovering")}if(v.start&&!v.end&&(v.start<e&&n>=e||v.start>e&&n<=e)){he(this).addClass("hovering")}else{he(this).removeClass("hovering")}});if(v.start&&!v.end){var a=P(n,v.start);if(v.hoveringTooltip){if(typeof v.hoveringTooltip=="function"){t=v.hoveringTooltip(a,v.start,n)}else if(v.hoveringTooltip===true&&a>1){t=a+" "+de("days")}}}}}if(t){var r=e.offset();var s=f.offset();var i=r.left-s.left;var o=r.top-s.top;i+=e.width()/2;var l=f.find(".date-range-length-tip");var d=l.css({visibility:"hidden",display:"none"}).html(t).width();var u=l.height();i-=d/2;o-=u;setTimeout(function(){l.css({left:i,top:o,display:"block",visibility:"visible"})},10)}else{f.find(".date-range-length-tip").hide()}}function T(){f.find(".day.hovering").removeClass("hovering");f.find(".date-range-length-tip").hide()}function C(e){var t=e.val();var a=e.attr("name");var n=e.parents("table").hasClass("month1")?"month1":"month2";var r=n==="month1"?"month2":"month1";var s=v.startDate?ce(v.startDate):false;var i=v.endDate?ce(v.endDate):false;var o=ce(v[n])[a](t);if(s&&o.isSameOrBefore(s)){o=s.add(n==="month2"?1:0,"month")}if(i&&o.isSameOrAfter(i)){o=i.add(!v.singleMonth&&n==="month1"?-1:0,"month")}I(o,n);if(n==="month1"){if(v.stickyMonths||ce(o).isSameOrAfter(v[r],"month")){I(ce(o).add(1,"month"),r)}}else{if(v.stickyMonths||ce(o).isSameOrBefore(v[r],"month")){I(ce(o).add(-1,"month"),r)}}$()}function j(){if(v.singleDate===true){if(l&&v.start){if(v.autoClose)J()}}else{if(l&&v.start&&v.end){if(v.autoClose)J()}}}function z(){var e=Math.ceil((v.end-v.start)/864e5)+1;if(v.singleDate){if(v.start&&!v.end)f.find(".drp_top-bar").removeClass("error").addClass("normal");else f.find(".drp_top-bar").removeClass("error").removeClass("normal")}else if(v.maxDays&&e>v.maxDays){v.start=false;v.end=false;f.find(".day").removeClass("checked");f.find(".drp_top-bar").removeClass("normal").addClass("error").find(".error-top").html(de("less-than").replace("%d",v.maxDays))}else if(v.minDays&&e<v.minDays){v.start=false;v.end=false;f.find(".day").removeClass("checked");f.find(".drp_top-bar").removeClass("normal").addClass("error").find(".error-top").html(de("more-than").replace("%d",v.minDays))}else{if(v.start||v.end)f.find(".drp_top-bar").removeClass("error").addClass("normal");else f.find(".drp_top-bar").removeClass("error").removeClass("normal")}if(v.singleDate&&v.start&&!v.end||!v.singleDate&&v.start&&v.end){f.find(".apply-btn").removeClass("disabled")}else{f.find(".apply-btn").addClass("disabled")}if(v.batchMode){if(v.start&&v.startDate&&G(v.start,v.startDate)<0||v.end&&v.endDate&&G(v.end,v.endDate)>0){v.start=false;v.end=false;f.find(".day").removeClass("checked")}}}function V(e,t){f.find(".start-day").html("...");f.find(".end-day").html("...");f.find(".selected-days").hide();if(v.start){f.find(".start-day").html(q(new Date(parseInt(v.start))))}if(v.end){f.find(".end-day").html(q(new Date(parseInt(v.end))))}var a;if(v.start&&v.singleDate){f.find(".apply-btn").removeClass("disabled");a=q(new Date(v.start));v.setValue.call(d,a,q(new Date(v.start)),q(new Date(v.end)));if(l&&!t){he(n).trigger("datepicker-change",{value:a,date1:new Date(v.start)})}}else if(v.start&&v.end){f.find(".selected-days").show().find(".selected-days-num").html(P(v.end,v.start));f.find(".apply-btn").removeClass("disabled");a=q(new Date(v.start))+v.separator+q(new Date(v.end));v.setValue.call(d,a,q(new Date(v.start)),q(new Date(v.end)));if(l&&!t){he(n).trigger("datepicker-change",{value:a,date1:new Date(v.start),date2:new Date(v.end)})}}else if(e){f.find(".apply-btn").removeClass("disabled")}else{f.find(".apply-btn").addClass("disabled")}}function P(e,t){return Math.abs(ce(e).diff(ce(t),"d"))+1}function Y(e,t,a){if(e.getTime()>t.getTime()){var n=t;t=e;e=n;n=null}var r=true;if(v.startDate&&G(e,v.startDate)<0)r=false;if(v.endDate&&G(t,v.endDate)>0)r=false;if(!r){I(v.startDate,"month1");I(U(v.startDate),"month2");$();return}v.start=e.getTime();v.end=t.getTime();if(v.time.enabled){c("time1",e);c("time2",t)}if(v.stickyMonths||G(e,t)>0&&_(e,t)===0){if(v.lookBehind){e=Z(t)}else{t=U(e)}}if(v.stickyMonths&&v.endDate!==false&&_(t,v.endDate)>0){e=Z(e);t=Z(t)}if(!v.stickyMonths){if(_(e,t)===0){if(v.lookBehind){e=Z(t)}else{t=U(e)}}}I(e,"month1");I(t,"month2");$();z();V(false,a);j()}function W(e){var t=true;if(v.startDate&&G(e,v.startDate)<0)t=false;if(v.endDate&&G(e,v.endDate)>0)t=false;if(!t){I(v.startDate,"month1");return}v.start=e.getTime();if(v.time.enabled){c("time1",e)}I(e,"month1");if(v.singleMonth!==true){var a=U(e);I(a,"month2")}$();V();j()}function A(){if(!v.start&&!v.end)return;f.find(".day").each(function(){var e=parseInt(he(this).attr("time")),t=v.start,a=v.end;if(v.time.enabled){e=ce(e).startOf("day").valueOf();t=ce(t||ce().valueOf()).startOf("day").valueOf();a=ce(a||ce().valueOf()).startOf("day").valueOf()}if(v.start&&v.end&&a>=e&&t<=e||v.start&&!v.end&&ce(t).format("YYYY-MM-DD")==ce(e).format("YYYY-MM-DD")){he(this).addClass("checked")}else{he(this).removeClass("checked")}if(v.start&&ce(t).format("YYYY-MM-DD")==ce(e).format("YYYY-MM-DD")){he(this).addClass("first-date-selected")}else{he(this).removeClass("first-date-selected")}if(v.end&&ce(a).format("YYYY-MM-DD")==ce(e).format("YYYY-MM-DD")){he(this).addClass("last-date-selected")}else{he(this).removeClass("last-date-selected")}});f.find(".week-number").each(function(){if(he(this).attr("data-start-time")==v.startWeek){he(this).addClass("week-number-selected")}})}function I(e,t){e=ce(e).toDate();var a=N(e,t);var n=B(e,t);f.find("."+t+" .month-name").html(a+" "+n);f.find("."+t+" tbody").html(ie(e));v[t]=e;S();H()}function N(e,t){e=ce(e);var a=e.get("month");var n=E(a);var r='<div class="month-element">'+n+"</div>";if(!v.monthSelect){return r}var s=v.startDate?ce(v.startDate).add(!v.singleMonth&&t==="month2"?1:0,"month"):false;var i=v.endDate?ce(v.endDate).add(!v.singleMonth&&t==="month1"?-1:0,"month"):false;var o=s&&e.isSame(s,"year")?s.get("month"):0;var l=i&&e.isSame(i,"year")?i.get("month"):11;var d=Math.min(o,a);var u=Math.max(l,a);if(d===u){return r}var f=L({minSelectable:o,maxSelectable:l,minVisible:d,maxVisible:u},a,function(e){return E(e)});return F("month",f)}function B(e,t){e=ce(e);var a=e.get("year");var n='<div class="month-element">'+a+"</div>";if(!v.yearSelect){return n}var r=v.yearSelect&&typeof v.yearSelect==="function";var s=v.startDate?ce(v.startDate).add(!v.singleMonth&&t==="month2"?1:0,"month"):false;var i=v.endDate?ce(v.endDate).add(!v.singleMonth&&t==="month1"?-1:0,"month"):false;var o=r?v.yearSelect(a):v.yearSelect.slice();var l=s?Math.max(o[0],s.get("year")):Math.min(o[0],a);var d=i?Math.min(o[1],i.get("year")):Math.max(o[1],a);var u=Math.min(l,a);var f=Math.max(d,a);if(u===f){return n}var m=L({minSelectable:l,maxSelectable:d,minVisible:u,maxVisible:f},a);return F("year",m)}function L(e,t,a){var n=[];a=a||function(e){return e};for(var r=e.minVisible;r<=e.maxVisible;r++){n.push({value:r,text:a(r),selected:r===t,disabled:r<e.minSelectable||r>e.maxSelectable})}return n}function F(e,t){var a='<div class="select-wrapper"><select class="'+e+'" name="'+e+'">';var n;for(var r=0,s=t.length;r<s;r++){var i=t[r];a+='<option value="'+i.value+'"'+(i.selected?" selected":"")+(i.disabled?" disabled":"")+">"+i.text+"</option>";if(i.selected){n=i.text}}a+="</select>"+n+"</div>";return a}function H(){f.find(".day").off("click").click(function(e){D(he(this))});f.find(".day").off("mouseenter").mouseenter(function(e){O(he(this))});f.find(".day").off("mouseleave").mouseleave(function(e){f.find(".date-range-length-tip").hide();if(v.singleDate){T()}});f.find(".week-number").off("click").click(function(e){x(he(this))});f.find(".month").off("change").change(function(e){C(he(this))});f.find(".year").off("change").change(function(e){C(he(this))})}function R(e,t){f.find("."+t).append(Q());c(t,e)}function E(e){return de("month-name")[e]}function q(e){return ce(e).format(v.format)}function $(){A();var e=parseInt(ce(v.month1).format("YYYYMM"));var t=parseInt(ce(v.month2).format("YYYYMM"));var a=Math.abs(e-t);var n=a>1&&a!=89;if(n){f.addClass("has-gap").removeClass("no-gap").find(".gap").css("visibility","visible")}else{f.removeClass("has-gap").addClass("no-gap").find(".gap").css("visibility","hidden")}var r=f.find("table.month1").height();var s=f.find("table.month2").height();f.find(".gap").height(Math.max(r,s)+10)}function J(){if(v.alwaysOpen)return;var e=function(){he(n).data("date-picker-opened",false);he(n).trigger("datepicker-closed",{relatedTarget:f})};if(v.customCloseAnimation){v.customCloseAnimation.call(f.get(0),e)}else{he(f).slideUp(v.duration,e)}he(n).trigger("datepicker-close",{relatedTarget:f})}function K(){I(v.month1,"month1");I(v.month2,"month2")}function _(e,t){var a=parseInt(ce(e).format("YYYYMM"))-parseInt(ce(t).format("YYYYMM"));if(a>0)return 1;if(a===0)return 0;return-1}function G(e,t){var a=parseInt(ce(e).format("YYYYMMDD"))-parseInt(ce(t).format("YYYYMMDD"));if(a>0)return 1;if(a===0)return 0;return-1}function U(e){return ce(e).add(1,"months").toDate()}function Z(e){return ce(e).add(-1,"months").toDate()}function Q(){return"<div>"+"<span>"+de("Time")+': <span class="hour-val">00</span>:<span class="minute-val">00</span></span>'+"</div>"+'<div class="hour">'+"<label>"+de("Hour")+': <input type="range" class="hour-range" name="hour" min="0" max="23"></label>'+"</div>"+'<div class="minute">'+"<label>"+de("Minute")+': <input type="range" class="minute-range" name="minute" min="0" max="59"></label>'+"</div>"}function X(){var e='<div class="date-picker-wrapper';if(v.extraClass)e+=" "+v.extraClass+" ";if(v.singleDate)e+=" single-date ";if(!v.showShortcuts)e+=" no-shortcuts ";if(!v.showTopbar)e+=" no-topbar ";if(v.customTopBar)e+=" custom-topbar ";e+='">';if(v.showTopbar){e+='<div class="drp_top-bar">';if(v.customTopBar){if(typeof v.customTopBar=="function")v.customTopBar=v.customTopBar();e+='<div class="custom-top">'+v.customTopBar+"</div>"}else{e+='<div class="normal-top">'+'<span class="selection-top">'+de("selected")+' </span> <b class="start-day">...</b>';if(!v.singleDate){e+=' <span class="separator-day">'+v.separator+'</span> <b class="end-day">...</b> <i class="selected-days">(<span class="selected-days-num">3</span> '+de("days")+")</i>"}e+="</div>";e+='<div class="error-top">error</div>'+'<div class="default-top">default</div>'}e+='<input type="button" class="apply-btn disabled'+ee()+'" value="'+de("apply")+'" />';e+="</div>"}var t=v.showWeekNumbers?6:5;var a="&lt;";if(v.customArrowPrevSymbol)a=v.customArrowPrevSymbol;var n="&gt;";if(v.customArrowNextSymbol)n=v.customArrowNextSymbol;e+='<div class="month-wrapper">'+'   <table class="month1" cellspacing="0" border="0" cellpadding="0">'+"       <thead>"+'           <tr class="caption">'+"               <th>"+'                   <span class="prev">'+a+"                   </span>"+"               </th>"+'               <th colspan="'+t+'" class="month-name">'+"               </th>"+"               <th>"+(v.singleDate||!v.stickyMonths?'<span class="next">'+n+"</span>":"")+"               </th>"+"           </tr>"+'           <tr class="week-name">'+te()+"       </thead>"+"       <tbody></tbody>"+"   </table>";if(re()){e+='<div class="gap">'+ne()+"</div>"+'<table class="month2" cellspacing="0" border="0" cellpadding="0">'+"   <thead>"+'   <tr class="caption">'+"       <th>"+(!v.stickyMonths?'<span class="prev">'+a+"</span>":"")+"       </th>"+'       <th colspan="'+t+'" class="month-name">'+"       </th>"+"       <th>"+'           <span class="next">'+n+"</span>"+"       </th>"+"   </tr>"+'   <tr class="week-name">'+te()+"   </thead>"+"   <tbody></tbody>"+"</table>"}e+='<div class="dp-clearfix"></div>'+'<div class="time">'+'<div class="time1"></div>';if(!v.singleDate){e+='<div class="time2"></div>'}e+="</div>"+'<div class="dp-clearfix"></div>'+"</div>";e+='<div class="footer">';if(v.showShortcuts){e+='<div class="shortcuts"><b>'+de("shortcuts")+"</b>";var r=v.shortcuts;if(r){var s;if(r["prev-days"]&&r["prev-days"].length>0){e+='&nbsp;<span class="prev-days">'+de("past");for(var i=0;i<r["prev-days"].length;i++){s=r["prev-days"][i];s+=r["prev-days"][i]>1?de("days"):de("day");e+=' <a href="javascript:;" shortcut="day,-'+r["prev-days"][i]+'">'+s+"</a>"}e+="</span>"}if(r["next-days"]&&r["next-days"].length>0){e+='&nbsp;<span class="next-days">'+de("following");for(var i=0;i<r["next-days"].length;i++){s=r["next-days"][i];s+=r["next-days"][i]>1?de("days"):de("day");e+=' <a href="javascript:;" shortcut="day,'+r["next-days"][i]+'">'+s+"</a>"}e+="</span>"}if(r.prev&&r.prev.length>0){e+='&nbsp;<span class="prev-buttons">'+de("previous");for(var i=0;i<r.prev.length;i++){s=de("prev-"+r.prev[i]);e+=' <a href="javascript:;" shortcut="prev,'+r.prev[i]+'">'+s+"</a>"}e+="</span>"}if(r.next&&r.next.length>0){e+='&nbsp;<span class="next-buttons">'+de("next");for(var i=0;i<r.next.length;i++){s=de("next-"+r.next[i]);e+=' <a href="javascript:;" shortcut="next,'+r.next[i]+'">'+s+"</a>"}e+="</span>"}}if(v.customShortcuts){for(var i=0;i<v.customShortcuts.length;i++){var o=v.customShortcuts[i];e+='&nbsp;<span class="custom-shortcut"><a href="javascript:;" shortcut="custom">'+o.name+"</a></span>"}}e+="</div>"}if(v.showCustomValues){e+='<div class="customValues"><b>'+(v.customValueLabel||de("custom-values"))+"</b>";if(v.customValues){for(var i=0;i<v.customValues.length;i++){var l=v.customValues[i];e+='&nbsp;<span class="custom-value"><a href="javascript:;" custom="'+l.value+'">'+l.name+"</a></span>"}}}e+="</div></div>";return he(e)}function ee(){var e="";if(v.autoClose===true){e+=" hide"}if(v.applyBtnClass!==""){e+=" "+v.applyBtnClass}return e}function te(){var e=v.showWeekNumbers?"<th>"+de("week-number")+"</th>":"";if(v.startOfWeek=="monday"){return e+"<th>"+de("week-1")+"</th>"+"<th>"+de("week-2")+"</th>"+"<th>"+de("week-3")+"</th>"+"<th>"+de("week-4")+"</th>"+"<th>"+de("week-5")+"</th>"+"<th>"+de("week-6")+"</th>"+"<th>"+de("week-7")+"</th>"}else{return e+"<th>"+de("week-7")+"</th>"+"<th>"+de("week-1")+"</th>"+"<th>"+de("week-2")+"</th>"+"<th>"+de("week-3")+"</th>"+"<th>"+de("week-4")+"</th>"+"<th>"+de("week-5")+"</th>"+"<th>"+de("week-6")+"</th>"}}function ae(e){e=ce(e);if(v.startDate&&e.endOf("month").isBefore(v.startDate)){return true}if(v.endDate&&e.startOf("month").isAfter(v.endDate)){return true}return false}function ne(){var e=['<div class="gap-top-mask"></div><div class="gap-bottom-mask"></div><div class="gap-lines">'];for(var t=0;t<20;t++){e.push('<div class="gap-line">'+'<div class="gap-1"></div>'+'<div class="gap-2"></div>'+'<div class="gap-3"></div>'+"</div>")}e.push("</div>");return e.join("")}function re(){return!v.singleMonth}function se(e,t,r){var s=he.extend(true,{},e);he.each(t,function(e,t){var a=t(r);for(var n in a){if(s.hasOwnProperty(n)){s[n]+=a[n]}else{s[n]=a[n]}}});var a="";for(var n in s){if(s.hasOwnProperty(n)){a+=n+'="'+s[n]+'" '}}return a}function ie(e){var t=[];e.setDate(1);var a=new Date(e.getTime()-864e5);var n=new Date;var r=e.getDay();if(r===0&&v.startOfWeek==="monday"){r=7}var s,i;if(r>0){for(var o=r;o>0;o--){var l=new Date(e.getTime()-864e5*o);i=M(l.getTime());if(v.startDate&&G(l,v.startDate)<0)i=false;if(v.endDate&&G(l,v.endDate)>0)i=false;t.push({date:l,type:"lastMonth",day:l.getDate(),time:l.getTime(),valid:i})}}var d=e.getMonth();for(var o=0;o<40;o++){s=ce(e).add(o,"days").toDate();i=M(s.getTime());if(v.startDate&&G(s,v.startDate)<0)i=false;if(v.endDate&&G(s,v.endDate)>0)i=false;t.push({date:s,type:s.getMonth()==d?"toMonth":"nextMonth",day:s.getDate(),time:s.getTime(),valid:i})}var u=[];for(var f=0;f<6;f++){if(t[f*7].type=="nextMonth")break;u.push("<tr>");for(var l=0;l<7;l++){var m=v.startOfWeek=="monday"?l+1:l;s=t[f*7+m];var h=ce(s.time).format("L")==ce(n).format("L");s.extraClass="";s.tooltip="";if(s.valid&&v.beforeShowDay&&typeof v.beforeShowDay=="function"){var c=v.beforeShowDay(ce(s.time).toDate());s.valid=c[0];s.extraClass=c[1]||"";s.tooltip=c[2]||"";if(s.tooltip!=="")s.extraClass+=" has-tooltip "}var p={time:s.time,"data-tooltip":s.tooltip,class:"day "+s.type+" "+s.extraClass+" "+(s.valid?"valid":"invalid")+" "+(h?"real-today":"")};if(l===0&&v.showWeekNumbers){u.push('<td><div class="week-number" data-start-time="'+s.time+'">'+v.getWeekNumber(s.date)+"</div></td>")}u.push("<td "+se({},v.dayTdAttrs,s)+"><div "+se(p,v.dayDivAttrs,s)+">"+oe(s.time,s.day)+"</div></td>")}u.push("</tr>")}return u.join("")}function oe(e,t){if(v.showDateFilter&&typeof v.showDateFilter=="function")return v.showDateFilter(e,t);return t}function le(){if(v.language=="auto"){var e=navigator.language?navigator.language:navigator.browserLanguage;if(!e){return he.dateRangePickerLanguages["default"]}e=e.toLowerCase();if(e in he.dateRangePickerLanguages){return he.dateRangePickerLanguages[e]}return he.dateRangePickerLanguages["default"]}else if(v.language&&v.language in he.dateRangePickerLanguages){return he.dateRangePickerLanguages[v.language]}else{return he.dateRangePickerLanguages["default"]}}function de(e){var t=e.toLowerCase();var a=e in r?r[e]:t in r?r[t]:null;var n=he.dateRangePickerLanguages["default"];if(a==null)a=e in n?n[e]:t in n?n[t]:"";return a}function ue(){var e=v.defaultTime?v.defaultTime:new Date;if(v.lookBehind){if(v.startDate&&_(e,v.startDate)<0)e=U(ce(v.startDate).toDate());if(v.endDate&&_(e,v.endDate)>0)e=ce(v.endDate).toDate()}else{if(v.startDate&&_(e,v.startDate)<0)e=ce(v.startDate).toDate();if(v.endDate&&_(U(e),v.endDate)>0)e=Z(ce(v.endDate).toDate())}if(v.singleDate){if(v.startDate&&_(e,v.startDate)<0)e=ce(v.startDate).toDate();if(v.endDate&&_(e,v.endDate)>0)e=ce(v.endDate).toDate()}return e}function fe(e){if(!e){e=ue()}if(v.lookBehind){I(Z(e),"month1");I(e,"month2")}else{I(e,"month1");I(U(e),"month2")}if(v.singleDate){I(e,"month1")}A();$()}function me(e){if(!t(e,n[0])){if(f.is(":visible"))J()}}}});