framework/extensions/package-manager/js/dist/admin.js

2 lines
41 KiB
JavaScript
Raw Normal View History

(()=>{var t={3:function(t){t.exports=function(){"use strict";var t,a,e=1e3,n=6e4,r=36e5,s=864e5,i=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,o=31536e6,l=2592e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:o,months:l,days:s,hours:r,minutes:n,seconds:e,milliseconds:1,weeks:6048e5},m=function(t){return t instanceof v},d=function(t,a,e){return new v(t,e,a.$l)},p=function(t){return a.p(t)+"s"},f=function(t){return t<0},g=function(t){return f(t)?Math.ceil(t):Math.floor(t)},h=function(t){return Math.abs(t)},k=function(t,a){return t?f(t)?{negative:!0,format:""+h(t)+a}:{negative:!1,format:""+t+a}:{negative:!1,format:""}},v=function(){function f(t,a,e){var n=this;if(this.$d={},this.$l=e,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),a)return d(t*u[p(a)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(a){n.$d[p(a)]=t[a]})),this.calMilliseconds(),this;if("string"==typeof t){var r=t.match(c);if(r){var s=r.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=s[0],this.$d.months=s[1],this.$d.weeks=s[2],this.$d.days=s[3],this.$d.hours=s[4],this.$d.minutes=s[5],this.$d.seconds=s[6],this.calMilliseconds(),this}}return this}var h=f.prototype;return h.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(a,e){return a+(t.$d[e]||0)*u[e]}),0)},h.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=g(t/o),t%=o,this.$d.months=g(t/l),t%=l,this.$d.days=g(t/s),t%=s,this.$d.hours=g(t/r),t%=r,this.$d.minutes=g(t/n),t%=n,this.$d.seconds=g(t/e),t%=e,this.$d.milliseconds=t},h.toISOString=function(){var t=k(this.$d.years,"Y"),a=k(this.$d.months,"M"),e=+this.$d.days||0;this.$d.weeks&&(e+=7*this.$d.weeks);var n=k(e,"D"),r=k(this.$d.hours,"H"),s=k(this.$d.minutes,"M"),i=this.$d.seconds||0;this.$d.milliseconds&&(i+=this.$d.milliseconds/1e3);var o=k(i,"S"),l=t.negative||a.negative||n.negative||r.negative||s.negative||o.negative,c=r.format||s.format||o.format?"T":"",u=(l?"-":"")+"P"+t.format+a.format+n.format+c+r.format+s.format+o.format;return"P"===u||"-P"===u?"P0D":u},h.toJSON=function(){return this.toISOString()},h.format=function(t){var e=t||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:a.s(this.$d.years,2,"0"),YYYY:a.s(this.$d.years,4,"0"),M:this.$d.months,MM:a.s(this.$d.months,2,"0"),D:this.$d.days,DD:a.s(this.$d.days,2,"0"),H:this.$d.hours,HH:a.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:a.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:a.s(this.$d.seconds,2,"0"),SSS:a.s(this.$d.milliseconds,3,"0")};return e.replace(i,(function(t,a){return a||String(n[t])}))},h.as=function(t){return this.$ms/u[p(t)]},h.get=function(t){var a=this.$ms,e=p(t);return"milliseconds"===e?a%=1e3:a="weeks"===e?g(a/u[e]):this.$d[e],0===a?0:a},h.add=function(t,a,e){var n;return n=a?t*u[p(a)]:m(t)?t.$ms:d(t,this).$ms,d(this.$ms+n*(e?-1:1),this)},h.subtract=function(t,a){return this.add(t,a,!0)},h.locale=function(t){var a=this.clone();return a.$l=t,a},h.clone=function(){return d(this.$ms,this)},h.humanize=function(a){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!a)},h.milliseconds=function(){return this.get("milliseconds")},h.asMilliseconds=function(){return this.as("milliseconds")},h.seconds=function(){return this.get("seconds")},h.asSeconds=function(){return this.as("seconds")},h.minutes=function(){return this.get("minutes")},h.asMinutes=function(){return this.as("minutes")},h.hours=function(){return this.get("hours")},h.asHours=function(){return this.as("hours")},h.days=function(){return this.get("days")},h.asDays=function(){return this.as("days")},h.weeks=function(){return this.get("weeks")},h.asWeeks=function(){return this.as("weeks")},h.months=function(){return this.get("months")},h.asMonths=function(){return this.as("months")},h.years=function(){return this.get("years")},h.asYears=function(){return this.as("years")},f}();return functio
2021-09-02 00:20:06 +08:00
//# sourceMappingURL=admin.js.map