76c912083e
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
1 line
No EOL
22 KiB
JavaScript
1 line
No EOL
22 KiB
JavaScript
!function(){var r=Object.assign||function(n){for(var t,u=1;u<arguments.length;u++)for(var r in t=arguments[u])m(t,r)&&(n[r]=t[r]);return n},f=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)},n=t(function(n){return 1===n?"χρόνος":"χρόνια"},function(n){return 1===n?"μήνας":"μήνες"},function(n){return 1===n?"εβδομάδα":"εβδομάδες"},function(n){return 1===n?"μέρα":"μέρες"},function(n){return 1===n?"ώρα":"ώρες"},function(n){return 1===n?"λεπτό":"λεπτά"},function(n){return 1===n?"δευτερόλεπτο":"δευτερόλεπτα"},function(n){return(1===n?"χιλιοστό":"χιλιοστά")+" του δευτερολέπτου"},","),a={af:t("jaar",function(n){return"maand"+(1===n?"":"e")},function(n){return 1===n?"week":"weke"},function(n){return 1===n?"dag":"dae"},function(n){return 1===n?"uur":"ure"},function(n){return 1===n?"minuut":"minute"},function(n){return"sekonde"+(1===n?"":"s")},function(n){return"millisekonde"+(1===n?"":"s")},","),am:t("ዓመት","ወር","ሳምንት","ቀን","ሰዓት","ደቂቃ","ሰከንድ","ሚሊሰከንድ"),ar:r(t(function(n){return["سنة","سنتان","سنوات"][u(n)]},function(n){return["شهر","شهران","أشهر"][u(n)]},function(n){return["أسبوع","أسبوعين","أسابيع"][u(n)]},function(n){return["يوم","يومين","أيام"][u(n)]},function(n){return["ساعة","ساعتين","ساعات"][u(n)]},function(n){return["دقيقة","دقيقتان","دقائق"][u(n)]},function(n){return["ثانية","ثانيتان","ثواني"][u(n)]},function(n){return["جزء من الثانية","جزآن من الثانية","أجزاء من الثانية"][u(n)]},","),{delimiter:" ﻭ ",_digitReplacements:["۰","١","٢","٣","٤","٥","٦","٧","٨","٩"]}),bg:t(function(n){return["години","година","години"][i(n)]},function(n){return["месеца","месец","месеца"][i(n)]},function(n){return["седмици","седмица","седмици"][i(n)]},function(n){return["дни","ден","дни"][i(n)]},function(n){return["часа","час","часа"][i(n)]},function(n){return["минути","минута","минути"][i(n)]},function(n){return["секунди","секунда","секунди"][i(n)]},function(n){return["милисекунди","милисекунда","милисекунди"][i(n)]},","),bn:t("বছর","মাস","সপ্তাহ","দিন","ঘন্টা","মিনিট","সেকেন্ড","মিলিসেকেন্ড"),ca:t(function(n){return"any"+(1===n?"":"s")},function(n){return"mes"+(1===n?"":"os")},function(n){return"setman"+(1===n?"a":"es")},function(n){return"di"+(1===n?"a":"es")},function(n){return"hor"+(1===n?"a":"es")},function(n){return"minut"+(1===n?"":"s")},function(n){return"segon"+(1===n?"":"s")},function(n){return"milisegon"+(1===n?"":"s")},","),ckb:t("ساڵ","مانگ","هەفتە","ڕۆژ","کاژێر","خولەک","چرکە","میلی چرکە","."),cs:t(function(n){return["rok","roku","roky","let"][o(n)]},function(n){return["měsíc","měsíce","měsíce","měsíců"][o(n)]},function(n){return["týden","týdne","týdny","týdnů"][o(n)]},function(n){return["den","dne","dny","dní"][o(n)]},function(n){return["hodina","hodiny","hodiny","hodin"][o(n)]},function(n){return["minuta","minuty","minuty","minut"][o(n)]},function(n){return["sekunda","sekundy","sekundy","sekund"][o(n)]},function(n){return["milisekunda","milisekundy","milisekundy","milisekund"][o(n)]},","),cy:t("flwyddyn","mis","wythnos","diwrnod","awr","munud","eiliad","milieiliad"),da:t("år",function(n){return"måned"+(1===n?"":"er")},function(n){return"uge"+(1===n?"":"r")},function(n){return"dag"+(1===n?"":"e")},function(n){return"time"+(1===n?"":"r")},function(n){return"minut"+(1===n?"":"ter")},function(n){return"sekund"+(1===n?"":"er")},function(n){return"millisekund"+(1===n?"":"er")},","),de:t(function(n){return"Jahr"+(1===n?"":"e")},function(n){return"Monat"+(1===n?"":"e")},function(n){return"Woche"+(1===n?"":"n")},function(n){return"Tag"+(1===n?"":"e")},function(n){return"Stunde"+(1===n?"":"n")},function(n){return"Minute"+(1===n?"":"n")},function(n){return"Sekunde"+(1===n?"":"n")},function(n){return"Millisekunde"+(1===n?"":"n")},","),el:n,en:t(function(n){return"year"+(1===n?"":"s")},function(n){return"month"+(1===n?"":"s")},function(n){return"week"+(1===n?"":"s")},function(n){return"day"+(1===n?"":"s")},function(n){return"hour"+(1===n?"":"s")},function(n){return"minute"+(1===n?"":"s")},function(n){return"second"+(1===n?"":"s")},function(n){return"millisecond"+(1===n?"":"s")}),eo:t(function(n){return"jaro"+(1===n?"":"j")},function(n){return"monato"+(1===n?"":"j")},function(n){return"semajno"+(1===n?"":"j")},function(n){return"tago"+(1===n?"":"j")},function(n){return"horo"+(1===n?"":"j")},function(n){return"minuto"+(1===n?"":"j")},function(n){return"sekundo"+(1===n?"":"j")},function(n){return"milisekundo"+(1===n?"":"j")},","),es:t(function(n){return"año"+(1===n?"":"s")},function(n){return"mes"+(1===n?"":"es")},function(n){return"semana"+(1===n?"":"s")},function(n){return"día"+(1===n?"":"s")},function(n){return"hora"+(1===n?"":"s")},function(n){return"minuto"+(1===n?"":"s")},function(n){return"segundo"+(1===n?"":"s")},function(n){return"milisegundo"+(1===n?"":"s")},","),et:t(function(n){return"aasta"+(1===n?"":"t")},function(n){return"kuu"+(1===n?"":"d")},function(n){return"nädal"+(1===n?"":"at")},function(n){return"päev"+(1===n?"":"a")},function(n){return"tund"+(1===n?"":"i")},function(n){return"minut"+(1===n?"":"it")},function(n){return"sekund"+(1===n?"":"it")},function(n){return"millisekund"+(1===n?"":"it")},","),eu:t("urte","hilabete","aste","egun","ordu","minutu","segundo","milisegundo",","),fa:t("سال","ماه","هفته","روز","ساعت","دقیقه","ثانیه","میلی ثانیه"),fi:t(function(n){return 1===n?"vuosi":"vuotta"},function(n){return 1===n?"kuukausi":"kuukautta"},function(n){return"viikko"+(1===n?"":"a")},function(n){return"päivä"+(1===n?"":"ä")},function(n){return"tunti"+(1===n?"":"a")},function(n){return"minuutti"+(1===n?"":"a")},function(n){return"sekunti"+(1===n?"":"a")},function(n){return"millisekunti"+(1===n?"":"a")},","),fo:t("ár",function(n){return 1===n?"mánaður":"mánaðir"},function(n){return 1===n?"vika":"vikur"},function(n){return 1===n?"dagur":"dagar"},function(n){return 1===n?"tími":"tímar"},function(n){return 1===n?"minuttur":"minuttir"},"sekund","millisekund",","),fr:t(function(n){return"an"+(2<=n?"s":"")},"mois",function(n){return"semaine"+(2<=n?"s":"")},function(n){return"jour"+(2<=n?"s":"")},function(n){return"heure"+(2<=n?"s":"")},function(n){return"minute"+(2<=n?"s":"")},function(n){return"seconde"+(2<=n?"s":"")},function(n){return"milliseconde"+(2<=n?"s":"")},","),gr:n,he:t(function(n){return 1===n?"שנה":"שנים"},function(n){return 1===n?"חודש":"חודשים"},function(n){return 1===n?"שבוע":"שבועות"},function(n){return 1===n?"יום":"ימים"},function(n){return 1===n?"שעה":"שעות"},function(n){return 1===n?"דקה":"דקות"},function(n){return 1===n?"שניה":"שניות"},function(n){return 1===n?"מילישנייה":"מילישניות"}),hr:t(function(n){return n%10==2||n%10==3||n%10==4?"godine":"godina"},function(n){return 1===n?"mjesec":2===n||3===n||4===n?"mjeseca":"mjeseci"},function(n){return n%10==1&&11!==n?"tjedan":"tjedna"},function(n){return 1===n?"dan":"dana"},function(n){return 1===n?"sat":2===n||3===n||4===n?"sata":"sati"},function(n){var t=n%10;return 2!=t&&3!=t&&4!=t||!(n<10||14<n)?"minuta":"minute"},function(n){var t=n%10;return 5==t||Math.floor(n)===n&&10<=n&&n<=19?"sekundi":1==t?"sekunda":2==t||3==t||4==t?"sekunde":"sekundi"},function(n){return 1===n?"milisekunda":n%10==2||n%10==3||n%10==4?"milisekunde":"milisekundi"},","),hi:t("साल",function(n){return 1===n?"महीना":"महीने"},function(n){return 1===n?"हफ़्ता":"हफ्ते"},"दिन",function(n){return 1===n?"घंटा":"घंटे"},"मिनट","सेकंड","मिलीसेकंड"),hu:t("év","hónap","hét","nap","óra","perc","másodperc","ezredmásodperc",","),id:t("tahun","bulan","minggu","hari","jam","menit","detik","milidetik"),is:t("ár",function(n){return"mánuð"+(1===n?"ur":"ir")},function(n){return"vik"+(1===n?"a":"ur")},function(n){return"dag"+(1===n?"ur":"ar")},function(n){return"klukkutím"+(1===n?"i":"ar")},function(n){return"mínút"+(1===n?"a":"ur")},function(n){return"sekúnd"+(1===n?"a":"ur")},function(n){return"millisekúnd"+(1===n?"a":"ur")}),it:t(function(n){return"ann"+(1===n?"o":"i")},function(n){return"mes"+(1===n?"e":"i")},function(n){return"settiman"+(1===n?"a":"e")},function(n){return"giorn"+(1===n?"o":"i")},function(n){return"or"+(1===n?"a":"e")},function(n){return"minut"+(1===n?"o":"i")},function(n){return"second"+(1===n?"o":"i")},function(n){return"millisecond"+(1===n?"o":"i")},","),ja:t("年","ヶ月","週","日","時間","分","秒","ミリ秒"),km:t("ឆ្នាំ","ខែ","សប្តាហ៍","ថ្ងៃ","ម៉ោង","នាទី","វិនាទី","មិល្លីវិនាទី"),kn:t(function(n){return 1===n?"ವರ್ಷ":"ವರ್ಷಗಳು"},function(n){return 1===n?"ತಿಂಗಳು":"ತಿಂಗಳುಗಳು"},function(n){return 1===n?"ವಾರ":"ವಾರಗಳು"},function(n){return 1===n?"ದಿನ":"ದಿನಗಳು"},function(n){return 1===n?"ಗಂಟೆ":"ಗಂಟೆಗಳು"},function(n){return 1===n?"ನಿಮಿಷ":"ನಿಮಿಷಗಳು"},function(n){return 1===n?"ಸೆಕೆಂಡ್":"ಸೆಕೆಂಡುಗಳು"},function(n){return 1===n?"ಮಿಲಿಸೆಕೆಂಡ್":"ಮಿಲಿಸೆಕೆಂಡುಗಳು"}),ko:t("년","개월","주일","일","시간","분","초","밀리 초"),ku:t("sal","meh","hefte","roj","seet","deqe","saniye","mîlîçirk",","),lo:t("ປີ","ເດືອນ","ອາທິດ","ມື້","ຊົ່ວໂມງ","ນາທີ","ວິນາທີ","ມິນລິວິນາທີ",","),lt:t(function(n){return n%10==0||10<=n%100&&n%100<=20?"metų":"metai"},function(n){return["mėnuo","mėnesiai","mėnesių"][c(n)]},function(n){return["savaitė","savaitės","savaičių"][c(n)]},function(n){return["diena","dienos","dienų"][c(n)]},function(n){return["valanda","valandos","valandų"][c(n)]},function(n){return["minutė","minutės","minučių"][c(n)]},function(n){return["sekundė","sekundės","sekundžių"][c(n)]},function(n){return["milisekundė","milisekundės","milisekundžių"][c(n)]},","),lv:t(function(n){return s(n)?"gads":"gadi"},function(n){return s(n)?"mēnesis":"mēneši"},function(n){return s(n)?"nedēļa":"nedēļas"},function(n){return s(n)?"diena":"dienas"},function(n){return s(n)?"stunda":"stundas"},function(n){return s(n)?"minūte":"minūtes"},function(n){return s(n)?"sekunde":"sekundes"},function(n){return s(n)?"milisekunde":"milisekundes"},","),mk:t(function(n){return 1===n?"година":"години"},function(n){return 1===n?"месец":"месеци"},function(n){return 1===n?"недела":"недели"},function(n){return 1===n?"ден":"дена"},function(n){return 1===n?"час":"часа"},function(n){return 1===n?"минута":"минути"},function(n){return 1===n?"секунда":"секунди"},function(n){return 1===n?"милисекунда":"милисекунди"},","),mn:t("жил","сар","долоо хоног","өдөр","цаг","минут","секунд","миллисекунд"),mr:t(function(n){return 1===n?"वर्ष":"वर्षे"},function(n){return 1===n?"महिना":"महिने"},function(n){return 1===n?"आठवडा":"आठवडे"},"दिवस","तास",function(n){return 1===n?"मिनिट":"मिनिटे"},"सेकंद","मिलिसेकंद"),ms:t("tahun","bulan","minggu","hari","jam","minit","saat","milisaat"),nl:t("jaar",function(n){return 1===n?"maand":"maanden"},function(n){return 1===n?"week":"weken"},function(n){return 1===n?"dag":"dagen"},"uur",function(n){return 1===n?"minuut":"minuten"},function(n){return 1===n?"seconde":"seconden"},function(n){return 1===n?"milliseconde":"milliseconden"},","),no:t("år",function(n){return"måned"+(1===n?"":"er")},function(n){return"uke"+(1===n?"":"r")},function(n){return"dag"+(1===n?"":"er")},function(n){return"time"+(1===n?"":"r")},function(n){return"minutt"+(1===n?"":"er")},function(n){return"sekund"+(1===n?"":"er")},function(n){return"millisekund"+(1===n?"":"er")},","),pl:t(function(n){return["rok","roku","lata","lat"][e(n)]},function(n){return["miesiąc","miesiąca","miesiące","miesięcy"][e(n)]},function(n){return["tydzień","tygodnia","tygodnie","tygodni"][e(n)]},function(n){return["dzień","dnia","dni","dni"][e(n)]},function(n){return["godzina","godziny","godziny","godzin"][e(n)]},function(n){return["minuta","minuty","minuty","minut"][e(n)]},function(n){return["sekunda","sekundy","sekundy","sekund"][e(n)]},function(n){return["milisekunda","milisekundy","milisekundy","milisekund"][e(n)]},","),pt:t(function(n){return"ano"+(1===n?"":"s")},function(n){return 1===n?"mês":"meses"},function(n){return"semana"+(1===n?"":"s")},function(n){return"dia"+(1===n?"":"s")},function(n){return"hora"+(1===n?"":"s")},function(n){return"minuto"+(1===n?"":"s")},function(n){return"segundo"+(1===n?"":"s")},function(n){return"milissegundo"+(1===n?"":"s")},","),ro:t(function(n){return 1===n?"an":"ani"},function(n){return 1===n?"lună":"luni"},function(n){return 1===n?"săptămână":"săptămâni"},function(n){return 1===n?"zi":"zile"},function(n){return 1===n?"oră":"ore"},function(n){return 1===n?"minut":"minute"},function(n){return 1===n?"secundă":"secunde"},function(n){return 1===n?"milisecundă":"milisecunde"},","),ru:t(function(n){return["лет","год","года"][i(n)]},function(n){return["месяцев","месяц","месяца"][i(n)]},function(n){return["недель","неделя","недели"][i(n)]},function(n){return["дней","день","дня"][i(n)]},function(n){return["часов","час","часа"][i(n)]},function(n){return["минут","минута","минуты"][i(n)]},function(n){return["секунд","секунда","секунды"][i(n)]},function(n){return["миллисекунд","миллисекунда","миллисекунды"][i(n)]},","),sq:t(function(n){return 1===n?"vit":"vjet"},"muaj","javë","ditë","orë",function(n){return"minut"+(1===n?"ë":"a")},function(n){return"sekond"+(1===n?"ë":"a")},function(n){return"milisekond"+(1===n?"ë":"a")},","),sr:t(function(n){return["години","година","године"][i(n)]},function(n){return["месеци","месец","месеца"][i(n)]},function(n){return["недељи","недеља","недеље"][i(n)]},function(n){return["дани","дан","дана"][i(n)]},function(n){return["сати","сат","сата"][i(n)]},function(n){return["минута","минут","минута"][i(n)]},function(n){return["секунди","секунда","секунде"][i(n)]},function(n){return["милисекунди","милисекунда","милисекунде"][i(n)]},","),ta:t(function(n){return 1===n?"வருடம்":"ஆண்டுகள்"},function(n){return 1===n?"மாதம்":"மாதங்கள்"},function(n){return 1===n?"வாரம்":"வாரங்கள்"},function(n){return 1===n?"நாள்":"நாட்கள்"},function(n){return 1===n?"மணி":"மணிநேரம்"},function(n){return"நிமிட"+(1===n?"ம்":"ங்கள்")},function(n){return"வினாடி"+(1===n?"":"கள்")},function(n){return"மில்லி விநாடி"+(1===n?"":"கள்")}),te:t(function(n){return"సంవత్స"+(1===n?"రం":"రాల")},function(n){return"నెల"+(1===n?"":"ల")},function(n){return 1===n?"వారం":"వారాలు"},function(n){return"రోజు"+(1===n?"":"లు")},function(n){return"గంట"+(1===n?"":"లు")},function(n){return 1===n?"నిమిషం":"నిమిషాలు"},function(n){return 1===n?"సెకను":"సెకన్లు"},function(n){return 1===n?"మిల్లీసెకన్":"మిల్లీసెకన్లు"}),uk:t(function(n){return["років","рік","роки"][i(n)]},function(n){return["місяців","місяць","місяці"][i(n)]},function(n){return["тижнів","тиждень","тижні"][i(n)]},function(n){return["днів","день","дні"][i(n)]},function(n){return["годин","година","години"][i(n)]},function(n){return["хвилин","хвилина","хвилини"][i(n)]},function(n){return["секунд","секунда","секунди"][i(n)]},function(n){return["мілісекунд","мілісекунда","мілісекунди"][i(n)]},","),ur:t("سال",function(n){return 1===n?"مہینہ":"مہینے"},function(n){return 1===n?"ہفتہ":"ہفتے"},"دن",function(n){return 1===n?"گھنٹہ":"گھنٹے"},"منٹ","سیکنڈ","ملی سیکنڈ"),sk:t(function(n){return["rok","roky","roky","rokov"][o(n)]},function(n){return["mesiac","mesiace","mesiace","mesiacov"][o(n)]},function(n){return["týždeň","týždne","týždne","týždňov"][o(n)]},function(n){return["deň","dni","dni","dní"][o(n)]},function(n){return["hodina","hodiny","hodiny","hodín"][o(n)]},function(n){return["minúta","minúty","minúty","minút"][o(n)]},function(n){return["sekunda","sekundy","sekundy","sekúnd"][o(n)]},function(n){return["milisekunda","milisekundy","milisekundy","milisekúnd"][o(n)]},","),sl:t(function(n){return n%10==1?"leto":n%100==2?"leti":n%100==3||n%100==4||Math.floor(n)!==n&&n%100<=5?"leta":"let"},function(n){return n%10==1?"mesec":n%100==2||Math.floor(n)!==n&&n%100<=5?"meseca":n%10==3||n%10==4?"mesece":"mesecev"},function(n){return n%10==1?"teden":n%10==2||Math.floor(n)!==n&&n%100<=4?"tedna":n%10==3||n%10==4?"tedne":"tednov"},function(n){return n%100==1?"dan":"dni"},function(n){return n%10==1?"ura":n%100==2?"uri":n%10==3||n%10==4||Math.floor(n)!==n?"ure":"ur"},function(n){return n%10==1?"minuta":n%10==2?"minuti":n%10==3||n%10==4||Math.floor(n)!==n&&n%100<=4?"minute":"minut"},function(n){return n%10==1?"sekunda":n%100==2?"sekundi":n%100==3||n%100==4||Math.floor(n)!==n?"sekunde":"sekund"},function(n){return n%10==1?"milisekunda":n%100==2?"milisekundi":n%100==3||n%100==4||Math.floor(n)!==n?"milisekunde":"milisekund"},","),sv:t("år",function(n){return"månad"+(1===n?"":"er")},function(n){return"veck"+(1===n?"a":"or")},function(n){return"dag"+(1===n?"":"ar")},function(n){return"timm"+(1===n?"e":"ar")},function(n){return"minut"+(1===n?"":"er")},function(n){return"sekund"+(1===n?"":"er")},function(n){return"millisekund"+(1===n?"":"er")},","),sw:r(t(function(n){return 1===n?"mwaka":"miaka"},function(n){return 1===n?"mwezi":"miezi"},"wiki",function(n){return 1===n?"siku":"masiku"},function(n){return 1===n?"saa":"masaa"},"dakika","sekunde","milisekunde"),{_numberFirst:!0}),tr:t("yıl","ay","hafta","gün","saat","dakika","saniye","milisaniye",","),th:t("ปี","เดือน","สัปดาห์","วัน","ชั่วโมง","นาที","วินาที","มิลลิวินาที"),uz:t("yil","oy","hafta","kun","soat","minut","sekund","millisekund"),uz_CYR:t("йил","ой","ҳафта","кун","соат","минут","секунд","миллисекунд"),vi:t("năm","tháng","tuần","ngày","giờ","phút","giây","mili giây",","),zh_CN:t("年","个月","周","天","小时","分钟","秒","毫秒"),zh_TW:t("年","個月","周","天","小時","分鐘","秒","毫秒")};function t(n,t,u,r,e,i,o,c,f){n={y:n,mo:t,w:u,d:r,h:e,m:i,s:o,ms:c};return void 0!==f&&(n.decimal=f),n}function u(n){return 2===n?1:2<n&&n<11?2:0}function e(n){return 1===n?0:Math.floor(n)!==n?1:2<=n%10&&n%10<=4&&!(10<n%100&&n%100<20)?2:3}function i(n){return Math.floor(n)!==n?2:5<=n%100&&n%100<=20||5<=n%10&&n%10<=9||n%10==0?0:n%10==1?1:1<n?2:0}function o(n){return 1===n?0:Math.floor(n)!==n?1:2<=n%10&&n%10<=4&&n%100<10?2:3}function c(n){return 1===n||n%10==1&&20<n%100?0:Math.floor(n)!==n||2<=n%10&&20<n%100||2<=n%10&&n%100<10?1:2}function s(n){return n%10==1&&n%100!=11}function m(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function d(n,t,u){var r,e=n.unitName,n=n.unitCount,i=u.spacer,o=u.maxDecimalPoints,c=m(u,"decimal")?u.decimal:m(t,"decimal")?t.decimal:".";"digitReplacements"in u?r=u.digitReplacements:"_digitReplacements"in t&&(r=t._digitReplacements);var f=(void 0===o?n:Math.floor(n*Math.pow(10,o))/Math.pow(10,o)).toString();if(r)for(var a="",s=0;s<f.length;s++){var d=f[s];a+="."===d?c:r[d]}else a=f.replace(".",c);u=t[e],o="function"==typeof u?u(n):u;return t._numberFirst?o+i+a:a+i+o}function l(n,t){var u=function(n){var t=[n.language];if(m(n,"fallbacks")){if(!f(n.fallbacks)||!n.fallbacks.length)throw new Error("fallbacks must be an array with at least one element");t=t.concat(n.fallbacks)}for(var u=0;u<t.length;u++){var r=t[u];if(m(n.languages,r))return n.languages[r];if(m(a,r))return a[r]}throw new Error("No language found.")}(t);if(!n.length)return d({unitName:(r=t.units)[r.length-1],unitCount:0},u,t);for(var r=t.conjunction,e=t.serialComma,i=m(t,"delimiter")?t.delimiter:m(u,"delimiter")?u.delimiter:", ",o=[],c=0;c<n.length;c++)o.push(d(n[c],u,t));return r&&1!==n.length?2===n.length?o.join(r):o.slice(0,-1).join(i)+(e?",":"")+r+o.slice(-1):o.join(i)}function k(n){function u(n,t){return n=Math.abs(n),t=r({},u,t||{}),l(function(n,t){var u=t.units,r=t.unitMeasures,e="largest"in t?t.largest:1/0;if(!u.length)return[];var i={},o=n;for(d=0;d<u.length;d++){var c,f=r[c=u[d]],a=d===u.length-1?o/f:Math.floor(o/f);o-=(i[c]=a)*f}if(t.round){for(var s=e,d=0;d<u.length;d++)if(0!==(a=i[c=u[d]])&&0===--s){for(var m=d+1;m<u.length;m++){var l=u[m],k=i[l];i[c]+=k*r[l]/r[c],i[l]=0}break}for(d=u.length-1;0<=d;d--)if(0!==(a=i[c=u[d]])){var g=Math.round(a);if(i[c]=g,0===d)break;var h=u[d-1],y=r[h],g=Math.floor(g*r[c]/y);if(!g)break;i[h]+=g,i[c]=0}}var v=[];for(d=0;d<u.length&&v.length<e;d++)(a=i[c=u[d]])&&v.push({unitName:c,unitCount:a});return v}(n,t),t)}return r(u,{language:"en",spacer:" ",conjunction:"",serialComma:!0,units:["y","mo","w","d","h","m","s"],languages:{},round:!1,unitMeasures:{y:315576e5,mo:26298e5,w:6048e5,d:864e5,h:36e5,m:6e4,s:1e3,ms:1}},n)}var g=r(k({}),{getSupportedLanguages:function(){var n,t=[];for(n in a)m(a,n)&&"gr"!==n&&t.push(n);return t},humanizer:k});"function"==typeof define&&define.amd?define(function(){return g}):"undefined"!=typeof module&&module.exports?module.exports=g:this.humanizeDuration=g}(); |