code-server
Version:
Run VS Code on a remote server.
2 lines (1 loc) • 8.62 kB
JavaScript
import{a as v}from"./chunk-5ZAMBDF5.js";import{b as nt,c as rt}from"./chunk-3RNHDNP5.js";var P=nt((U,J)=>{(function(f,h){typeof U=="object"&&typeof J<"u"?J.exports=h():typeof define=="function"&&define.amd?define(h):(f=typeof globalThis<"u"?globalThis:f||self).dayjs=h()})(U,(function(){"use strict";var f=1e3,h=6e4,V=36e5,j="millisecond",Y="second",T="minute",x="hour",p="day",R="week",b="month",Z="quarter",w="year",A="date",z="Invalid Date",K=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,X=/\[([^\]]+)]|YYYY|YY|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,tt={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var n=["th","st","nd","rd"],t=i%100;return"["+i+(n[(t-20)%10]||n[t]||n[0])+"]"}},F=function(i,n,t){var r=String(i);return!r||r.length>=n?i:""+Array(n+1-r.length).join(t)+i},et={s:F,z:function(i){var n=-i.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+F(r,2,"0")+":"+F(e,2,"0")},m:function i(n,t){if(n.date()<t.date())return-i(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,b),s=t-e<0,o=n.clone().add(r+(s?-1:1),b);return+(-(r+(t-e)/(s?e-o:o-e))||0)},a:function(i){return i<0?Math.ceil(i)||0:Math.floor(i)},p:function(i){return{M:b,y:w,w:R,d:p,D:A,h:x,m:T,s:Y,ms:j,Q:Z}[i]||String(i||"").toLowerCase().replace(/s$/,"")},u:function(i){return i===void 0}},H="en",O={};O[H]=tt;var G="$isDayjsObject",I=function(i){return i instanceof E||!(!i||!i[G])},B=function i(n,t,r){var e;if(!n)return H;if(typeof n=="string"){var s=n.toLowerCase();O[s]&&(e=s),t&&(O[s]=t,e=s);var o=n.split("-");if(!e&&o.length>1)return i(o[0])}else{var u=n.name;O[u]=n,e=u}return!r&&e&&(H=e),e||!r&&H},l=function(i,n){if(I(i))return i.clone();var t=typeof n=="object"?n:{};return t.date=i,t.args=arguments,new E(t)},a=et;a.l=B,a.i=I,a.w=function(i,n){return l(i,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var E=(function(){function i(t){this.$L=B(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[G]=!0}var n=i.prototype;return n.parse=function(t){this.$d=(function(r){var e=r.date,s=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var o=e.match(K);if(o){var u=o[2]-1||0,c=(o[7]||"0").substring(0,3);return s?new Date(Date.UTC(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,c)):new Date(o[1],u,o[3]||1,o[4]||0,o[5]||0,o[6]||0,c)}}return new Date(e)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==z},n.isSame=function(t,r){var e=l(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return l(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<l(t)},n.$g=function(t,r,e){return a.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,s=!!a.u(r)||r,o=a.p(t),u=function(L,g){var S=a.w(e.$u?Date.UTC(e.$y,g,L):new Date(e.$y,g,L),e);return s?S:S.endOf(p)},c=function(L,g){return a.w(e.toDate()[L].apply(e.toDate("s"),(s?[0,0,0,0]:[23,59,59,999]).slice(g)),e)},d=this.$W,$=this.$M,m=this.$D,k="set"+(this.$u?"UTC":"");switch(o){case w:return s?u(1,0):u(31,11);case b:return s?u(1,$):u(0,$+1);case R:var _=this.$locale().weekStart||0,C=(d<_?d+7:d)-_;return u(s?m-C:m+(6-C),$);case p:case A:return c(k+"Hours",0);case x:return c(k+"Minutes",1);case T:return c(k+"Seconds",2);case Y:return c(k+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,s=a.p(t),o="set"+(this.$u?"UTC":""),u=(e={},e[p]=o+"Date",e[A]=o+"Date",e[b]=o+"Month",e[w]=o+"FullYear",e[x]=o+"Hours",e[T]=o+"Minutes",e[Y]=o+"Seconds",e[j]=o+"Milliseconds",e)[s],c=s===p?this.$D+(r-this.$W):r;if(s===b||s===w){var d=this.clone().set(A,1);d.$d[u](c),d.init(),this.$d=d.set(A,Math.min(this.$D,d.daysInMonth())).$d}else u&&this.$d[u](c);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[a.p(t)]()},n.add=function(t,r){var e,s=this;t=Number(t);var o=a.p(r),u=function($){var m=l(s);return a.w(m.date(m.date()+Math.round($*t)),s)};if(o===b)return this.set(b,this.$M+t);if(o===w)return this.set(w,this.$y+t);if(o===p)return u(1);if(o===R)return u(7);var c=(e={},e[T]=h,e[x]=V,e[Y]=f,e)[o]||1,d=this.$d.getTime()+t*c;return a.w(d,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||z;var s=t||"YYYY-MM-DDTHH:mm:ssZ",o=a.z(this),u=this.$H,c=this.$m,d=this.$M,$=e.weekdays,m=e.months,k=e.meridiem,_=function(g,S,W,N){return g&&(g[S]||g(r,s))||W[S].slice(0,N)},C=function(g){return a.s(u%12||12,g,"0")},L=k||function(g,S,W){var N=g<12?"AM":"PM";return W?N.toLowerCase():N};return s.replace(X,(function(g,S){return S||(function(W){switch(W){case"YY":return String(r.$y).slice(-2);case"YYYY":return a.s(r.$y,4,"0");case"M":return d+1;case"MM":return a.s(d+1,2,"0");case"MMM":return _(e.monthsShort,d,m,3);case"MMMM":return _(m,d);case"D":return r.$D;case"DD":return a.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return _(e.weekdaysMin,r.$W,$,2);case"ddd":return _(e.weekdaysShort,r.$W,$,3);case"dddd":return $[r.$W];case"H":return String(u);case"HH":return a.s(u,2,"0");case"h":return C(1);case"hh":return C(2);case"a":return L(u,c,!0);case"A":return L(u,c,!1);case"m":return String(c);case"mm":return a.s(c,2,"0");case"s":return String(r.$s);case"ss":return a.s(r.$s,2,"0");case"SSS":return a.s(r.$ms,3,"0");case"Z":return o}return null})(g)||o.replace(":","")}))},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var s,o=this,u=a.p(r),c=l(t),d=(c.utcOffset()-this.utcOffset())*h,$=this-c,m=function(){return a.m(o,c)};switch(u){case w:s=m()/12;break;case b:s=m();break;case Z:s=m()/3;break;case R:s=($-d)/6048e5;break;case p:s=($-d)/864e5;break;case x:s=$/V;break;case T:s=$/h;break;case Y:s=$/f;break;default:s=$}return e?s:a.a(s)},n.daysInMonth=function(){return this.endOf(b).$D},n.$locale=function(){return O[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),s=B(t,r,!0);return s&&(e.$L=s),e},n.clone=function(){return a.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},i})(),q=E.prototype;return l.prototype=q,[["$ms",j],["$s",Y],["$m",T],["$H",x],["$W",p],["$M",b],["$y",w],["$D",A]].forEach((function(i){q[i[1]]=function(n){return this.$g(n,i[0],i[1])}})),l.extend=function(i,n){return i.$i||(i(n,E,l),i.$i=!0),l},l.locale=B,l.isDayjs=I,l.unix=function(i){return l(1e3*i)},l.en=O[H],l.Ls=O,l.p={},l}))});var Q=rt(P(),1),D={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},y={trace:v((...f)=>{},"trace"),debug:v((...f)=>{},"debug"),info:v((...f)=>{},"info"),warn:v((...f)=>{},"warn"),error:v((...f)=>{},"error"),fatal:v((...f)=>{},"fatal")},st=v(function(f="fatal"){let h=D.fatal;typeof f=="string"?f.toLowerCase()in D&&(h=D[f]):typeof f=="number"&&(h=f),y.trace=()=>{},y.debug=()=>{},y.info=()=>{},y.warn=()=>{},y.error=()=>{},y.fatal=()=>{},h<=D.fatal&&(y.fatal=console.error?console.error.bind(console,M("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",M("FATAL"))),h<=D.error&&(y.error=console.error?console.error.bind(console,M("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",M("ERROR"))),h<=D.warn&&(y.warn=console.warn?console.warn.bind(console,M("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",M("WARN"))),h<=D.info&&(y.info=console.info?console.info.bind(console,M("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",M("INFO"))),h<=D.debug&&(y.debug=console.debug?console.debug.bind(console,M("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",M("DEBUG"))),h<=D.trace&&(y.trace=console.debug?console.debug.bind(console,M("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",M("TRACE")))},"setLogLevel"),M=v(f=>`%c${(0,Q.default)().format("ss.SSS")} : ${f} : `,"format");export{P as a,y as b,st as c};