diff --git a/README.md b/README.md
index d86bf373..c87d9e31 100644
--- a/README.md
+++ b/README.md
@@ -155,7 +155,7 @@ Certimate 是一个免费且开源的项目,采用 [MIT 开源协议](LICENSE.
## 八、加入社区
* [Telegram-a new era of messaging](https://t.me/+ZXphsppxUg41YmVl)
-* 微信群聊(需要邀请入群,可先加作者好友)
+* 微信群聊(超200人需邀请入群,可先加作者好友)
diff --git a/ui/dist/assets/index-B6ZTaWIO.js b/ui/dist/assets/index-47M77bCI.js
similarity index 99%
rename from ui/dist/assets/index-B6ZTaWIO.js
rename to ui/dist/assets/index-47M77bCI.js
index a0e7e403..34b3d21a 100644
--- a/ui/dist/assets/index-B6ZTaWIO.js
+++ b/ui/dist/assets/index-47M77bCI.js
@@ -304,7 +304,7 @@ var SC;function be(){return SC.apply(null,arguments)}function g4(e){SC=e}functio
[`+i+"] ";for(o in arguments[0])dt(arguments[0],o)&&(s+=o+": "+arguments[0][o]+", ");s=s.slice(0,-2)}else s=arguments[i];r.push(s)}CC(e+`
Arguments: `+Array.prototype.slice.call(r).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var Bw={};function jC(e,t){be.deprecationHandler!=null&&be.deprecationHandler(e,t),Bw[e]||(CC(t),Bw[e]=!0)}be.suppressDeprecationWarnings=!1;be.deprecationHandler=null;function ts(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function v4(e){var t,n;for(n in e)dt(e,n)&&(t=e[n],ts(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Xm(e,t){var n=li({},e),r;for(r in t)dt(t,r)&&(to(e[r])&&to(t[r])?(n[r]={},li(n[r],e[r]),li(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)dt(e,r)&&!dt(t,r)&&to(e[r])&&(n[r]=li({},n[r]));return n}function yv(e){e!=null&&this.set(e)}var Qm;Object.keys?Qm=Object.keys:Qm=function(e){var t,n=[];for(t in e)dt(e,t)&&n.push(t);return n};var x4={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function w4(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return ts(r)?r.call(t,n):r}function Xr(e,t,n){var r=""+Math.abs(e),s=t-r.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+r}var vv=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,$u=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Pp={},ma={};function Me(e,t,n,r){var s=r;typeof r=="string"&&(s=function(){return this[r]()}),e&&(ma[e]=s),t&&(ma[t[0]]=function(){return Xr(s.apply(this,arguments),t[1],t[2])}),n&&(ma[n]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function b4(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function _4(e){var t=e.match(vv),n,r;for(n=0,r=t.length;n=0&&$u.test(e);)e=e.replace($u,r),$u.lastIndex=0,n-=1;return e}var S4={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"};function k4(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(vv).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var C4="Invalid date";function j4(){return this._invalidDate}var E4="%d",N4=/\d{1,2}/;function T4(e){return this._ordinal.replace("%d",e)}var R4={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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function P4(e,t,n,r){var s=this._relativeTime[n];return ts(s)?s(e,t,n,r):s.replace(/%d/i,e)}function A4(e,t){var n=this._relativeTime[e>0?"future":"past"];return ts(n)?n(t):n.replace(/%s/i,t)}var Ww={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function dr(e){return typeof e=="string"?Ww[e]||Ww[e.toLowerCase()]:void 0}function xv(e){var t={},n,r;for(r in e)dt(e,r)&&(n=dr(r),n&&(t[n]=e[r]));return t}var O4={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function D4(e){var t=[],n;for(n in e)dt(e,n)&&t.push({unit:n,priority:O4[n]});return t.sort(function(r,s){return r.priority-s.priority}),t}var NC=/\d/,Qn=/\d\d/,TC=/\d{3}/,wv=/\d{4}/,sh=/[+-]?\d{6}/,jt=/\d\d?/,RC=/\d\d\d\d?/,PC=/\d\d\d\d\d\d?/,ih=/\d{1,3}/,bv=/\d{1,4}/,oh=/[+-]?\d{1,6}/,Ha=/\d+/,ah=/[+-]?\d+/,I4=/Z|[+-]\d\d:?\d\d/gi,lh=/Z|[+-]\d\d(?::?\d\d)?/gi,M4=/[+-]?\d+(\.\d{1,3})?/,qc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ya=/^[1-9]\d?/,_v=/^([1-9]\d|\d)/,qd;qd={};function je(e,t,n){qd[e]=ts(t)?t:function(r,s){return r&&n?n:t}}function L4(e,t){return dt(qd,e)?qd[e](t._strict,t._locale):new RegExp(F4(e))}function F4(e){return bs(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,s,i){return n||r||s||i}))}function bs(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function nt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=rr(t)),n}var Jm={};function vt(e,t){var n,r=t,s;for(typeof e=="string"&&(e=[e]),Ps(t)&&(r=function(i,o){o[t]=nt(i)}),s=e.length,n=0;n68?1900:2e3)};var AC=Ka("FullYear",!0);function V4(){return ch(this.year())}function Ka(e,t){return function(n){return n!=null?(OC(this,e,n),be.updateOffset(this,t),this):pc(this,e)}}function pc(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function OC(e,t,n){var r,s,i,o,a;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(s?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(s?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(s?r.setUTCHours(n):r.setHours(n));case"Date":return void(s?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}i=n,o=e.month(),a=e.date(),a=a===29&&o===1&&!ch(i)?28:a,s?r.setUTCFullYear(i,o,a):r.setFullYear(i,o,a)}}function B4(e){return e=dr(e),ts(this[e])?this[e]():this}function W4(e,t){if(typeof e=="object"){e=xv(e);var n=D4(e),r,s=n.length;for(r=0;r=0?(a=new Date(e+400,t,n,r,s,i,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,s,i,o),a}function mc(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xd(e,t,n){var r=7+t-n,s=(7+mc(e,0,r).getUTCDay()-t)%7;return-s+r-1}function zC(e,t,n,r,s){var i=(7+n-r)%7,o=Xd(e,r,s),a=1+7*(t-1)+i+o,c,u;return a<=0?(c=e-1,u=zl(c)+a):a>zl(e)?(c=e+1,u=a-zl(e)):(c=e,u=a),{year:c,dayOfYear:u}}function gc(e,t,n){var r=Xd(e.year(),t,n),s=Math.floor((e.dayOfYear()-r-1)/7)+1,i,o;return s<1?(o=e.year()-1,i=s+_s(o,t,n)):s>_s(e.year(),t,n)?(i=s-_s(e.year(),t,n),o=e.year()+1):(o=e.year(),i=s),{week:i,year:o}}function _s(e,t,n){var r=Xd(e,t,n),s=Xd(e+1,t,n);return(zl(e)-r+s)/7}Me("w",["ww",2],"wo","week");Me("W",["WW",2],"Wo","isoWeek");je("w",jt,Ya);je("ww",jt,Qn);je("W",jt,Ya);je("WW",jt,Qn);Xc(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=nt(e)});function r3(e){return gc(e,this._week.dow,this._week.doy).week}var s3={dow:0,doy:6};function i3(){return this._week.dow}function o3(){return this._week.doy}function a3(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function l3(e){var t=gc(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Me("d",0,"do","day");Me("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Me("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Me("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Me("e",0,0,"weekday");Me("E",0,0,"isoWeekday");je("d",jt);je("e",jt);je("E",jt);je("dd",function(e,t){return t.weekdaysMinRegex(e)});je("ddd",function(e,t){return t.weekdaysShortRegex(e)});je("dddd",function(e,t){return t.weekdaysRegex(e)});Xc(["dd","ddd","dddd"],function(e,t,n,r){var s=n._locale.weekdaysParse(e,r,n._strict);s!=null?t.d=s:Xe(n).invalidWeekday=e});Xc(["d","e","E"],function(e,t,n,r){t[r]=nt(e)});function c3(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function u3(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function kv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var d3="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$C="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),f3="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),h3=qc,p3=qc,m3=qc;function g3(e,t){var n=Tr(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?kv(n,this._week.dow):e?n[e.day()]:n}function y3(e){return e===!0?kv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function v3(e){return e===!0?kv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function x3(e,t,n){var r,s,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=es([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?t==="dddd"?(s=Ut.call(this._weekdaysParse,o),s!==-1?s:null):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,o),s!==-1?s:null):(s=Ut.call(this._minWeekdaysParse,o),s!==-1?s:null):t==="dddd"?(s=Ut.call(this._weekdaysParse,o),s!==-1||(s=Ut.call(this._shortWeekdaysParse,o),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,o),s!==-1?s:null)):t==="ddd"?(s=Ut.call(this._shortWeekdaysParse,o),s!==-1||(s=Ut.call(this._weekdaysParse,o),s!==-1)?s:(s=Ut.call(this._minWeekdaysParse,o),s!==-1?s:null)):(s=Ut.call(this._minWeekdaysParse,o),s!==-1||(s=Ut.call(this._weekdaysParse,o),s!==-1)?s:(s=Ut.call(this._shortWeekdaysParse,o),s!==-1?s:null))}function w3(e,t,n){var r,s,i;if(this._weekdaysParseExact)return x3.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(s=es([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function b3(e){if(!this.isValid())return e!=null?this:NaN;var t=pc(this,"Day");return e!=null?(e=c3(e,this.localeData()),this.add(e-t,"d")):t}function _3(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function S3(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=u3(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function k3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||Cv.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(dt(this,"_weekdaysRegex")||(this._weekdaysRegex=h3),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function C3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||Cv.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(dt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=p3),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function j3(e){return this._weekdaysParseExact?(dt(this,"_weekdaysRegex")||Cv.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(dt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=m3),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Cv(){function e(d,f){return f.length-d.length}var t=[],n=[],r=[],s=[],i,o,a,c,u;for(i=0;i<7;i++)o=es([2e3,1]).day(i),a=bs(this.weekdaysMin(o,"")),c=bs(this.weekdaysShort(o,"")),u=bs(this.weekdays(o,"")),t.push(a),n.push(c),r.push(u),s.push(a),s.push(c),s.push(u);t.sort(e),n.sort(e),r.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function jv(){return this.hours()%12||12}function E3(){return this.hours()||24}Me("H",["HH",2],0,"hour");Me("h",["hh",2],0,jv);Me("k",["kk",2],0,E3);Me("hmm",0,0,function(){return""+jv.apply(this)+Xr(this.minutes(),2)});Me("hmmss",0,0,function(){return""+jv.apply(this)+Xr(this.minutes(),2)+Xr(this.seconds(),2)});Me("Hmm",0,0,function(){return""+this.hours()+Xr(this.minutes(),2)});Me("Hmmss",0,0,function(){return""+this.hours()+Xr(this.minutes(),2)+Xr(this.seconds(),2)});function UC(e,t){Me(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}UC("a",!0);UC("A",!1);function VC(e,t){return t._meridiemParse}je("a",VC);je("A",VC);je("H",jt,_v);je("h",jt,Ya);je("k",jt,Ya);je("HH",jt,Qn);je("hh",jt,Qn);je("kk",jt,Qn);je("hmm",RC);je("hmmss",PC);je("Hmm",RC);je("Hmmss",PC);vt(["H","HH"],qt);vt(["k","kk"],function(e,t,n){var r=nt(e);t[qt]=r===24?0:r});vt(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});vt(["h","hh"],function(e,t,n){t[qt]=nt(e),Xe(n).bigHour=!0});vt("hmm",function(e,t,n){var r=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r)),Xe(n).bigHour=!0});vt("hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r,2)),t[vs]=nt(e.substr(s)),Xe(n).bigHour=!0});vt("Hmm",function(e,t,n){var r=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r))});vt("Hmmss",function(e,t,n){var r=e.length-4,s=e.length-2;t[qt]=nt(e.substr(0,r)),t[br]=nt(e.substr(r,2)),t[vs]=nt(e.substr(s))});function N3(e){return(e+"").toLowerCase().charAt(0)==="p"}var T3=/[ap]\.?m?\.?/i,R3=Ka("Hours",!0);function P3(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var BC={calendar:x4,longDateFormat:S4,invalidDate:C4,ordinal:E4,dayOfMonthOrdinalParse:N4,relativeTime:R4,months:Y4,monthsShort:DC,week:s3,weekdays:d3,weekdaysMin:f3,weekdaysShort:$C,meridiemParse:T3},Tt={},ul={},yc;function A3(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(s=uh(i.slice(0,n).join("-")),s)return s;if(r&&r.length>=n&&A3(i,r)>=n-1)break;n--}t++}return yc}function D3(e){return!!(e&&e.match("^[^/\\\\]*$"))}function uh(e){var t=null,n;if(Tt[e]===void 0&&typeof md<"u"&&md&&md.exports&&D3(e))try{t=yc._abbr,n=require,n("./locale/"+e),xi(t)}catch{Tt[e]=null}return Tt[e]}function xi(e,t){var n;return e&&(En(t)?n=zs(e):n=Ev(e,t),n?yc=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),yc._abbr}function Ev(e,t){if(t!==null){var n,r=BC;if(t.abbr=e,Tt[e]!=null)jC("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Tt[e]._config;else if(t.parentLocale!=null)if(Tt[t.parentLocale]!=null)r=Tt[t.parentLocale]._config;else if(n=uh(t.parentLocale),n!=null)r=n._config;else return ul[t.parentLocale]||(ul[t.parentLocale]=[]),ul[t.parentLocale].push({name:e,config:t}),null;return Tt[e]=new yv(Xm(r,t)),ul[e]&&ul[e].forEach(function(s){Ev(s.name,s.config)}),xi(e),Tt[e]}else return delete Tt[e],null}function I3(e,t){if(t!=null){var n,r,s=BC;Tt[e]!=null&&Tt[e].parentLocale!=null?Tt[e].set(Xm(Tt[e]._config,t)):(r=uh(e),r!=null&&(s=r._config),t=Xm(s,t),r==null&&(t.abbr=e),n=new yv(t),n.parentLocale=Tt[e],Tt[e]=n),xi(e)}else Tt[e]!=null&&(Tt[e].parentLocale!=null?(Tt[e]=Tt[e].parentLocale,e===xi()&&xi(e)):Tt[e]!=null&&delete Tt[e]);return Tt[e]}function zs(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return yc;if(!Tr(e)){if(t=uh(e),t)return t;e=[e]}return O3(e)}function M3(){return Qm(Tt)}function Nv(e){var t,n=e._a;return n&&Xe(e).overflow===-2&&(t=n[ys]<0||n[ys]>11?ys:n[Vr]<1||n[Vr]>Sv(n[dn],n[ys])?Vr:n[qt]<0||n[qt]>24||n[qt]===24&&(n[br]!==0||n[vs]!==0||n[Zi]!==0)?qt:n[br]<0||n[br]>59?br:n[vs]<0||n[vs]>59?vs:n[Zi]<0||n[Zi]>999?Zi:-1,Xe(e)._overflowDayOfYear&&(tVr)&&(t=Vr),Xe(e)._overflowWeeks&&t===-1&&(t=$4),Xe(e)._overflowWeekday&&t===-1&&(t=U4),Xe(e).overflow=t),e}var L3=/^\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)?)?$/,F3=/^\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)?)?$/,z3=/Z|[+-]\d\d(?::?\d\d)?/,Uu=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ap=[["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/]],$3=/^\/?Date\((-?\d+)/i,U3=/^(?:(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}))$/,V3={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function WC(e){var t,n,r=e._i,s=L3.exec(r)||F3.exec(r),i,o,a,c,u=Uu.length,d=Ap.length;if(s){for(Xe(e).iso=!0,t=0,n=u;tzl(o)||e._dayOfYear===0)&&(Xe(e)._overflowDayOfYear=!0),n=mc(o,0,e._dayOfYear),e._a[ys]=n.getUTCMonth(),e._a[Vr]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=s[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[qt]===24&&e._a[br]===0&&e._a[vs]===0&&e._a[Zi]===0&&(e._nextDay=!0,e._a[qt]=0),e._d=(e._useUTC?mc:n3).apply(null,r),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qt]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(Xe(e).weekdayMismatch=!0)}}function q3(e){var t,n,r,s,i,o,a,c,u;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,n=Fo(t.GG,e._a[dn],gc(Ct(),1,4).year),r=Fo(t.W,1),s=Fo(t.E,1),(s<1||s>7)&&(c=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,u=gc(Ct(),i,o),n=Fo(t.gg,e._a[dn],u.year),r=Fo(t.w,u.week),t.d!=null?(s=t.d,(s<0||s>6)&&(c=!0)):t.e!=null?(s=t.e+i,(t.e<0||t.e>6)&&(c=!0)):s=i),r<1||r>_s(n,i,o)?Xe(e)._overflowWeeks=!0:c!=null?Xe(e)._overflowWeekday=!0:(a=zC(n,r,s,i,o),e._a[dn]=a.year,e._dayOfYear=a.dayOfYear)}be.ISO_8601=function(){};be.RFC_2822=function(){};function Rv(e){if(e._f===be.ISO_8601){WC(e);return}if(e._f===be.RFC_2822){HC(e);return}e._a=[],Xe(e).empty=!0;var t=""+e._i,n,r,s,i,o,a=t.length,c=0,u,d;for(s=EC(e._f,e._locale).match(vv)||[],d=s.length,n=0;n0&&Xe(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),c+=r.length),ma[i]?(r?Xe(e).empty=!1:Xe(e).unusedTokens.push(i),z4(i,r,e)):e._strict&&!r&&Xe(e).unusedTokens.push(i);Xe(e).charsLeftOver=a-c,t.length>0&&Xe(e).unusedInput.push(t),e._a[qt]<=12&&Xe(e).bigHour===!0&&e._a[qt]>0&&(Xe(e).bigHour=void 0),Xe(e).parsedDateParts=e._a.slice(0),Xe(e).meridiem=e._meridiem,e._a[qt]=X3(e._locale,e._a[qt],e._meridiem),u=Xe(e).era,u!==null&&(e._a[dn]=e._locale.erasConvertYear(u,e._a[dn])),Tv(e),Nv(e)}function X3(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function Q3(e){var t,n,r,s,i,o,a=!1,c=e._f.length;if(c===0){Xe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;sthis?this:e:rh()});function GC(e,t){var n,r;if(t.length===1&&Tr(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function x5(){if(!En(this._isDSTShifted))return this._isDSTShifted;var e={},t;return gv(e,this),e=YC(e),e._a?(t=e._isUTC?es(e._a):Ct(e._a),this._isDSTShifted=this.isValid()&&u5(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function w5(){return this.isValid()?!this._isUTC:!1}function b5(){return this.isValid()?this._isUTC:!1}function qC(){return this.isValid()?this._isUTC&&this._offset===0:!1}var _5=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,S5=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Dr(e,t){var n=e,r=null,s,i,o;return ud(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Ps(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=_5.exec(e))?(s=r[1]==="-"?-1:1,n={y:0,d:nt(r[Vr])*s,h:nt(r[qt])*s,m:nt(r[br])*s,s:nt(r[vs])*s,ms:nt(eg(r[Zi]*1e3))*s}):(r=S5.exec(e))?(s=r[1]==="-"?-1:1,n={y:Li(r[2],s),M:Li(r[3],s),w:Li(r[4],s),d:Li(r[5],s),h:Li(r[6],s),m:Li(r[7],s),s:Li(r[8],s)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=k5(Ct(n.from),Ct(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),i=new dh(n),ud(e)&&dt(e,"_locale")&&(i._locale=e._locale),ud(e)&&dt(e,"_isValid")&&(i._isValid=e._isValid),i}Dr.fn=dh.prototype;Dr.invalid=c5;function Li(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Yw(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function k5(e,t){var n;return e.isValid()&&t.isValid()?(t=Av(t,e),e.isBefore(t)?n=Yw(e,t):(n=Yw(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function XC(e,t){return function(n,r){var s,i;return r!==null&&!isNaN(+r)&&(jC(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),s=Dr(n,r),QC(this,s,e),this}}function QC(e,t,n,r){var s=t._milliseconds,i=eg(t._days),o=eg(t._months);e.isValid()&&(r=r??!0,o&&MC(e,pc(e,"Month")+o*n),i&&OC(e,"Date",pc(e,"Date")+i*n),s&&e._d.setTime(e._d.valueOf()+s*n),r&&be.updateOffset(e,i||o))}var C5=XC(1,"add"),j5=XC(-1,"subtract");function JC(e){return typeof e=="string"||e instanceof String}function E5(e){return Rr(e)||Gc(e)||JC(e)||Ps(e)||T5(e)||N5(e)||e===null||e===void 0}function N5(e){var t=to(e)&&!pv(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,i,o=r.length;for(s=0;sn.valueOf():n.valueOf()9999?cd(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ts(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",cd(n,"Z")):cd(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function B5(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,s,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(n+r+s+i)}function W5(e){e||(e=this.isUtc()?be.defaultFormatUtc:be.defaultFormat);var t=cd(this,e);return this.localeData().postformat(t)}function H5(e,t){return this.isValid()&&(Rr(e)&&e.isValid()||Ct(e).isValid())?Dr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Y5(e){return this.from(Ct(),e)}function K5(e,t){return this.isValid()&&(Rr(e)&&e.isValid()||Ct(e).isValid())?Dr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function G5(e){return this.to(Ct(),e)}function ej(e){var t;return e===void 0?this._locale._abbr:(t=zs(e),t!=null&&(this._locale=t),this)}var tj=ur("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function nj(){return this._locale}var Qd=1e3,ga=60*Qd,Jd=60*ga,rj=(365*400+97)*24*Jd;function ya(e,t){return(e%t+t)%t}function sj(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-rj:new Date(e,t,n).valueOf()}function ij(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-rj:Date.UTC(e,t,n)}function Z5(e){var t,n;if(e=dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ij:sj,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ya(t+(this._isUTC?0:this.utcOffset()*ga),Jd);break;case"minute":t=this._d.valueOf(),t-=ya(t,ga);break;case"second":t=this._d.valueOf(),t-=ya(t,Qd);break}return this._d.setTime(t),be.updateOffset(this,!0),this}function q5(e){var t,n;if(e=dr(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?ij:sj,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Jd-ya(t+(this._isUTC?0:this.utcOffset()*ga),Jd)-1;break;case"minute":t=this._d.valueOf(),t+=ga-ya(t,ga)-1;break;case"second":t=this._d.valueOf(),t+=Qd-ya(t,Qd)-1;break}return this._d.setTime(t),be.updateOffset(this,!0),this}function X5(){return this._d.valueOf()-(this._offset||0)*6e4}function Q5(){return Math.floor(this.valueOf()/1e3)}function J5(){return new Date(this.valueOf())}function ez(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function tz(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function nz(){return this.isValid()?this.toISOString():null}function rz(){return mv(this)}function sz(){return li({},Xe(this))}function iz(){return Xe(this).overflow}function oz(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Me("N",0,0,"eraAbbr");Me("NN",0,0,"eraAbbr");Me("NNN",0,0,"eraAbbr");Me("NNNN",0,0,"eraName");Me("NNNNN",0,0,"eraNarrow");Me("y",["y",1],"yo","eraYear");Me("y",["yy",2],0,"eraYear");Me("y",["yyy",3],0,"eraYear");Me("y",["yyyy",4],0,"eraYear");je("N",Ov);je("NN",Ov);je("NNN",Ov);je("NNNN",yz);je("NNNNN",vz);vt(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var s=n._locale.erasParse(e,r,n._strict);s?Xe(n).era=s:Xe(n).invalidEra=e});je("y",Ha);je("yy",Ha);je("yyy",Ha);je("yyyy",Ha);je("yo",xz);vt(["y","yy","yyy","yyyy"],dn);vt(["yo"],function(e,t,n,r){var s;n._locale._eraYearOrdinalRegex&&(s=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[dn]=n._locale.eraYearOrdinalParse(e,s):t[dn]=parseInt(e,10)});function az(e,t){var n,r,s,i=this._eras||zs("en")._eras;for(n=0,r=i.length;n=0)return i[r]}function cz(e,t){var n=e.since<=e.until?1:-1;return t===void 0?be(e.since).year():be(e.since).year()+(t-e.offset)*n}function uz(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ei&&(t=i),jz.call(this,e,t,n,r,s))}function jz(e,t,n,r,s){var i=zC(e,t,n,r,s),o=mc(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Me("Q",0,"Qo","quarter");je("Q",NC);vt("Q",function(e,t){t[ys]=(nt(e)-1)*3});function Ez(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Me("D",["DD",2],"Do","date");je("D",jt,Ya);je("DD",jt,Qn);je("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});vt(["D","DD"],Vr);vt("Do",function(e,t){t[Vr]=nt(e.match(jt)[0])});var aj=Ka("Date",!0);Me("DDD",["DDDD",3],"DDDo","dayOfYear");je("DDD",ih);je("DDDD",TC);vt(["DDD","DDDD"],function(e,t,n){n._dayOfYear=nt(e)});function Nz(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Me("m",["mm",2],0,"minute");je("m",jt,_v);je("mm",jt,Qn);vt(["m","mm"],br);var Tz=Ka("Minutes",!1);Me("s",["ss",2],0,"second");je("s",jt,_v);je("ss",jt,Qn);vt(["s","ss"],vs);var Rz=Ka("Seconds",!1);Me("S",0,0,function(){return~~(this.millisecond()/100)});Me(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Me(0,["SSS",3],0,"millisecond");Me(0,["SSSS",4],0,function(){return this.millisecond()*10});Me(0,["SSSSS",5],0,function(){return this.millisecond()*100});Me(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Me(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Me(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Me(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});je("S",ih,NC);je("SS",ih,Qn);je("SSS",ih,TC);var ci,lj;for(ci="SSSS";ci.length<=9;ci+="S")je(ci,Ha);function Pz(e,t){t[Zi]=nt(("0."+e)*1e3)}for(ci="S";ci.length<=9;ci+="S")vt(ci,Pz);lj=Ka("Milliseconds",!1);Me("z",0,0,"zoneAbbr");Me("zz",0,0,"zoneName");function Az(){return this._isUTC?"UTC":""}function Oz(){return this._isUTC?"Coordinated Universal Time":""}var le=Zc.prototype;le.add=C5;le.calendar=A5;le.clone=O5;le.diff=$5;le.endOf=q5;le.format=W5;le.from=H5;le.fromNow=Y5;le.to=K5;le.toNow=G5;le.get=B4;le.invalidAt=iz;le.isAfter=D5;le.isBefore=I5;le.isBetween=M5;le.isSame=L5;le.isSameOrAfter=F5;le.isSameOrBefore=z5;le.isValid=rz;le.lang=tj;le.locale=ej;le.localeData=nj;le.max=r5;le.min=n5;le.parsingFlags=sz;le.set=W4;le.startOf=Z5;le.subtract=j5;le.toArray=ez;le.toObject=tz;le.toDate=J5;le.toISOString=V5;le.inspect=B5;typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});le.toJSON=nz;le.toString=U5;le.unix=Q5;le.valueOf=X5;le.creationData=oz;le.eraName=uz;le.eraNarrow=dz;le.eraAbbr=fz;le.eraYear=hz;le.year=AC;le.isLeapYear=V4;le.weekYear=wz;le.isoWeekYear=bz;le.quarter=le.quarters=Ez;le.month=LC;le.daysInMonth=J4;le.week=le.weeks=a3;le.isoWeek=le.isoWeeks=l3;le.weeksInYear=kz;le.weeksInWeekYear=Cz;le.isoWeeksInYear=_z;le.isoWeeksInISOWeekYear=Sz;le.date=aj;le.day=le.days=b3;le.weekday=_3;le.isoWeekday=S3;le.dayOfYear=Nz;le.hour=le.hours=R3;le.minute=le.minutes=Tz;le.second=le.seconds=Rz;le.millisecond=le.milliseconds=lj;le.utcOffset=f5;le.utc=p5;le.local=m5;le.parseZone=g5;le.hasAlignedHourOffset=y5;le.isDST=v5;le.isLocal=w5;le.isUtcOffset=b5;le.isUtc=qC;le.isUTC=qC;le.zoneAbbr=Az;le.zoneName=Oz;le.dates=ur("dates accessor is deprecated. Use date instead.",aj);le.months=ur("months accessor is deprecated. Use month instead",LC);le.years=ur("years accessor is deprecated. Use year instead",AC);le.zone=ur("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",h5);le.isDSTShifted=ur("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",x5);function Dz(e){return Ct(e*1e3)}function Iz(){return Ct.apply(null,arguments).parseZone()}function cj(e){return e}var ft=yv.prototype;ft.calendar=w4;ft.longDateFormat=k4;ft.invalidDate=j4;ft.ordinal=T4;ft.preparse=cj;ft.postformat=cj;ft.relativeTime=P4;ft.pastFuture=A4;ft.set=v4;ft.eras=az;ft.erasParse=lz;ft.erasConvertYear=cz;ft.erasAbbrRegex=mz;ft.erasNameRegex=pz;ft.erasNarrowRegex=gz;ft.months=Z4;ft.monthsShort=q4;ft.monthsParse=Q4;ft.monthsRegex=t3;ft.monthsShortRegex=e3;ft.week=r3;ft.firstDayOfYear=o3;ft.firstDayOfWeek=i3;ft.weekdays=g3;ft.weekdaysMin=v3;ft.weekdaysShort=y3;ft.weekdaysParse=w3;ft.weekdaysRegex=k3;ft.weekdaysShortRegex=C3;ft.weekdaysMinRegex=j3;ft.isPM=N3;ft.meridiem=P3;function ef(e,t,n,r){var s=zs(),i=es().set(r,t);return s[n](i,e)}function uj(e,t,n){if(Ps(e)&&(t=e,e=void 0),e=e||"",t!=null)return ef(e,t,n,"month");var r,s=[];for(r=0;r<12;r++)s[r]=ef(e,r,n,"month");return s}function Iv(e,t,n,r){typeof e=="boolean"?(Ps(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Ps(t)&&(n=t,t=void 0),t=t||"");var s=zs(),i=e?s._week.dow:0,o,a=[];if(n!=null)return ef(t,(n+i)%7,r,"day");for(o=0;o<7;o++)a[o]=ef(t,(o+i)%7,r,"day");return a}function Mz(e,t){return uj(e,t,"months")}function Lz(e,t){return uj(e,t,"monthsShort")}function Fz(e,t,n){return Iv(e,t,n,"weekdays")}function zz(e,t,n){return Iv(e,t,n,"weekdaysShort")}function $z(e,t,n){return Iv(e,t,n,"weekdaysMin")}xi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=nt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});be.lang=ur("moment.lang is deprecated. Use moment.locale instead.",xi);be.langData=ur("moment.langData is deprecated. Use moment.localeData instead.",zs);var ls=Math.abs;function Uz(){var e=this._data;return this._milliseconds=ls(this._milliseconds),this._days=ls(this._days),this._months=ls(this._months),e.milliseconds=ls(e.milliseconds),e.seconds=ls(e.seconds),e.minutes=ls(e.minutes),e.hours=ls(e.hours),e.months=ls(e.months),e.years=ls(e.years),this}function dj(e,t,n,r){var s=Dr(t,n);return e._milliseconds+=r*s._milliseconds,e._days+=r*s._days,e._months+=r*s._months,e._bubble()}function Vz(e,t){return dj(this,e,t,1)}function Bz(e,t){return dj(this,e,t,-1)}function Kw(e){return e<0?Math.floor(e):Math.ceil(e)}function Wz(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,s,i,o,a,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Kw(ng(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,s=rr(e/1e3),r.seconds=s%60,i=rr(s/60),r.minutes=i%60,o=rr(i/60),r.hours=o%24,t+=rr(o/24),c=rr(fj(t)),n+=c,t-=Kw(ng(c)),a=rr(n/12),n%=12,r.days=t,r.months=n,r.years=a,this}function fj(e){return e*4800/146097}function ng(e){return e*146097/4800}function Hz(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=dr(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+fj(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ng(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function $s(e){return function(){return this.as(e)}}var hj=$s("ms"),Yz=$s("s"),Kz=$s("m"),Gz=$s("h"),Zz=$s("d"),qz=$s("w"),Xz=$s("M"),Qz=$s("Q"),Jz=$s("y"),e6=hj;function t6(){return Dr(this)}function n6(e){return e=dr(e),this.isValid()?this[e+"s"]():NaN}function So(e){return function(){return this.isValid()?this._data[e]:NaN}}var r6=So("milliseconds"),s6=So("seconds"),i6=So("minutes"),o6=So("hours"),a6=So("days"),l6=So("months"),c6=So("years");function u6(){return rr(this.days()/7)}var fs=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function d6(e,t,n,r,s){return s.relativeTime(t||1,!!n,e,r)}function f6(e,t,n,r){var s=Dr(e).abs(),i=fs(s.as("s")),o=fs(s.as("m")),a=fs(s.as("h")),c=fs(s.as("d")),u=fs(s.as("M")),d=fs(s.as("w")),f=fs(s.as("y")),h=i<=n.ss&&["s",i]||i0,h[4]=r,d6.apply(null,h)}function h6(e){return e===void 0?fs:typeof e=="function"?(fs=e,!0):!1}function p6(e,t){return ta[e]===void 0?!1:t===void 0?ta[e]:(ta[e]=t,e==="s"&&(ta.ss=t-1),!0)}function m6(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ta,s,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},ta,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),s=this.localeData(),i=f6(this,!n,r,s),n&&(i=s.pastFuture(+this,i)),s.postformat(i)}var Op=Math.abs;function Do(e){return(e>0)-(e<0)||+e}function hh(){if(!this.isValid())return this.localeData().invalidDate();var e=Op(this._milliseconds)/1e3,t=Op(this._days),n=Op(this._months),r,s,i,o,a=this.asSeconds(),c,u,d,f;return a?(r=rr(e/60),s=rr(r/60),e%=60,r%=60,i=rr(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",c=a<0?"-":"",u=Do(this._months)!==Do(a)?"-":"",d=Do(this._days)!==Do(a)?"-":"",f=Do(this._milliseconds)!==Do(a)?"-":"",c+"P"+(i?u+i+"Y":"")+(n?u+n+"M":"")+(t?d+t+"D":"")+(s||r||e?"T":"")+(s?f+s+"H":"")+(r?f+r+"M":"")+(e?f+o+"S":"")):"P0D"}var at=dh.prototype;at.isValid=l5;at.abs=Uz;at.add=Vz;at.subtract=Bz;at.as=Hz;at.asMilliseconds=hj;at.asSeconds=Yz;at.asMinutes=Kz;at.asHours=Gz;at.asDays=Zz;at.asWeeks=qz;at.asMonths=Xz;at.asQuarters=Qz;at.asYears=Jz;at.valueOf=e6;at._bubble=Wz;at.clone=t6;at.get=n6;at.milliseconds=r6;at.seconds=s6;at.minutes=i6;at.hours=o6;at.days=a6;at.weeks=u6;at.months=l6;at.years=c6;at.humanize=m6;at.toISOString=hh;at.toString=hh;at.toJSON=hh;at.locale=ej;at.localeData=nj;at.toIsoString=ur("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",hh);at.lang=tj;Me("X",0,0,"unix");Me("x",0,0,"valueOf");je("x",ah);je("X",M4);vt("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});vt("x",function(e,t,n){n._d=new Date(nt(e))});//! moment.js
-be.version="2.30.1";g4(Ct);be.fn=le;be.min=s5;be.max=i5;be.now=o5;be.utc=es;be.unix=Dz;be.months=Mz;be.isDate=Gc;be.locale=xi;be.invalid=rh;be.duration=Dr;be.isMoment=Rr;be.weekdays=Fz;be.parseZone=Iz;be.localeData=zs;be.isDuration=ud;be.monthsShort=Lz;be.weekdaysMin=$z;be.defineLocale=Ev;be.updateLocale=I3;be.locales=M3;be.weekdaysShort=zz;be.normalizeUnits=dr;be.relativeTimeRounding=h6;be.relativeTimeThreshold=p6;be.calendarFormat=P5;be.prototype=le;be.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const g6=async()=>await st().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Us=async e=>e.id?await st().collection("access").update(e.id,e):await st().collection("access").create(e),y6=async e=>(e.deleted=be.utc().format("YYYY-MM-DD HH:mm:ss"),await st().collection("access").update(e.id,e)),Gw=async()=>await st().collection("access_groups").getFullList({sort:"-created",expand:"access"}),v6=async e=>{const t=st();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},x6=async e=>{const t=st();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Zw=async e=>await st().collection("access_groups").update(e.id,e),w6=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},b6=async()=>{try{return await st().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},Mv=async e=>{try{return await st().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Ga=async e=>{const t=st();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},pj=v.createContext({}),In=()=>v.useContext(pj),_6=({children:e})=>{const[t,n]=v.useReducer(w6,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});v.useEffect(()=>{(async()=>{const d=await g6();n({type:"SET_ACCESSES",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await b6();n({type:"SET_EMAILS",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await Gw();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=v.useCallback(async()=>{const u=await Gw();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=v.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),i=v.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),o=v.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=v.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=v.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(pj.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})},S6={theme:"system",setTheme:()=>null},mj=v.createContext(S6);function k6({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,i]=v.useState(()=>localStorage.getItem(n)||t);v.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return l.jsx(mj.Provider,{...r,value:o,children:e})}const C6=()=>{const e=v.useContext(mj);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function j6(){const{setTheme:e}=C6(),{t}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(YO,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(VO,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(eh,{align:"end",children:[l.jsx(eo,{onClick:()=>e("light"),children:t("theme.light")}),l.jsx(eo,{onClick:()=>e("dark"),children:t("theme.dark")}),l.jsx(eo,{onClick:()=>e("system"),children:t("theme.system")})]})]})}function E6(){const{i18n:e}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(FO,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(eh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(eo,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}var N6="Separator",qw="horizontal",T6=["horizontal","vertical"],gj=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=qw,...s}=e,i=R6(r)?r:qw,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return l.jsx(Re.div,{"data-orientation":i,...a,...s,ref:t})});gj.displayName=N6;function R6(e){return T6.includes(e)}var yj=gj;const xr=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(yj,{ref:s,decorative:n,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xr.displayName=yj.displayName;const P6="Certimate v0.1.15",vj=()=>{const{t:e}=it();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(TO,{size:16}),l.jsx("div",{className:"ml-1",children:e("document")})]}),l.jsx(xr,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:P6})]})]})};function A6(){const e=Dn(),t=Ar(),{t:n}=it();if(!st().authStore.isValid||!st().authStore.isAdmin)return l.jsx(iS,{to:"/login"});const r=t.pathname,s=a=>(console.log(r),a==r?"bg-muted text-primary":"text-muted-foreground"),i=()=>{st().authStore.clear(),e("/login")},o=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(_6,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(xn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(xn,{to:"/",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(aw,{className:"h-4 w-4"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx($m,{className:"h-4 w-4"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(lw,{className:"h-4 w-4"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(ow,{className:"h-4 w-4"}),n("deployment.log.name")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[l.jsxs(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(UO,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(nh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(xn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(xn,{to:"/",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(aw,{className:"h-5 w-5"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx($m,{className:"h-5 w-5"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(lw,{className:"h-5 w-5"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(ow,{className:"h-5 w-5"}),n("deployment.log.name")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(j6,{}),l.jsx(E6,{}),l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(DO,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(eh,{align:"end",children:[l.jsx(Jk,{children:n("account")}),l.jsx(eC,{}),l.jsx(eo,{onClick:o,children:n("setting")}),l.jsx(eo,{onClick:i,children:n("logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(_y,{}),l.jsx(vj,{})]})]})]})})})}const Lv=({phase:e,phaseSuccess:t})=>{const{t:n}=it();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:se("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("deploy.progress.check")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:se("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("deploy.progress.apply")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:se("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("deploy.progress.deploy")})]})};var O6="VisuallyHidden",Qc=v.forwardRef((e,t)=>l.jsx(Re.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Qc.displayName=O6;var D6=Qc,[ph,OH]=on("Tooltip",[Ba]),mh=Ba(),xj="TooltipProvider",I6=700,rg="tooltip.open",[M6,Fv]=ph(xj),zv=e=>{const{__scopeTooltip:t,delayDuration:n=I6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=v.useState(!0),c=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(M6,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:i})};zv.displayName=xj;var gh="Tooltip",[L6,yh]=ph(gh),wj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,c=Fv(gh,e.__scopeTooltip),u=mh(t),[d,f]=v.useState(null),h=Wn(),y=v.useRef(0),x=o??c.disableHoverableContent,g=a??c.delayDuration,w=v.useRef(!1),[m=!1,p]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(rg))):c.onClose(),i==null||i(T)}}),b=v.useMemo(()=>m?w.current?"delayed-open":"instant-open":"closed",[m]),_=v.useCallback(()=>{window.clearTimeout(y.current),w.current=!1,p(!0)},[p]),C=v.useCallback(()=>{window.clearTimeout(y.current),p(!1)},[p]),j=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{w.current=!0,p(!0)},g)},[g,p]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),l.jsx(zy,{...u,children:l.jsx(L6,{scope:t,contentId:h,open:m,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:v.useCallback(()=>{x?C():window.clearTimeout(y.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};wj.displayName=gh;var sg="TooltipTrigger",bj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=yh(sg,n),i=Fv(sg,n),o=mh(n),a=v.useRef(null),c=Ke(t,a,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx($y,{asChild:!0,...o,children:l.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});bj.displayName=sg;var F6="TooltipPortal",[DH,z6]=ph(F6,{forceMount:void 0}),Na="TooltipContent",$v=v.forwardRef((e,t)=>{const n=z6(Na,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=yh(Na,e.__scopeTooltip);return l.jsx(an,{present:r||o.open,children:o.disableHoverableContent?l.jsx(_j,{side:s,...i,ref:t}):l.jsx($6,{side:s,...i,ref:t})})}),$6=v.forwardRef((e,t)=>{const n=yh(Na,e.__scopeTooltip),r=Fv(Na,e.__scopeTooltip),s=v.useRef(null),i=Ke(t,s),[o,a]=v.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=v.useCallback(()=>{a(null),f(!1)},[f]),y=v.useCallback((x,g)=>{const w=x.currentTarget,m={x:x.clientX,y:x.clientY},p=W6(m,w.getBoundingClientRect()),b=H6(m,p),_=Y6(g.getBoundingClientRect()),C=G6([...b,..._]);a(C),f(!0)},[f]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(c&&d){const x=w=>y(w,d),g=w=>y(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[c,d,y,h]),v.useEffect(()=>{if(o){const x=g=>{const w=g.target,m={x:g.clientX,y:g.clientY},p=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!K6(m,o);p?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,o,u,h]),l.jsx(_j,{...e,ref:i})}),[U6,V6]=ph(gh,{isInside:!1}),_j=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,c=yh(Na,n),u=mh(n),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(rg,d),()=>document.removeEventListener(rg,d)),[d]),v.useEffect(()=>{if(c.trigger){const f=h=>{const y=h.target;y!=null&&y.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Uy,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(jy,{children:r}),l.jsx(U6,{scope:n,isInside:!0,children:l.jsx(D6,{id:c.contentId,role:"tooltip",children:s||r})})]})})});$v.displayName=Na;var Sj="TooltipArrow",B6=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=mh(n);return V6(Sj,n).isInside?null:l.jsx(Vy,{...s,...r,ref:t})});B6.displayName=Sj;function W6(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function H6(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Y6(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function K6(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;ir!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function G6(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),Z6(t)}function Z6(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var q6=zv,X6=wj,Q6=bj,kj=$v;const J6=q6,Cj=X6,jj=Q6,Ej=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(kj,{ref:r,sideOffset:t,className:se("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Ej.displayName=kj.displayName;const Uv=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(OO,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(J6,{children:l.jsxs(Cj,{children:[l.jsx(jj,{asChild:!0,className:"cursor-pointer",children:l.jsx(sw,{size:16,className:"text-red-700"})}),l.jsx(Ej,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(sw,{size:16,className:"text-red-700"})})})},Nj=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:se("mx-auto flex w-full justify-center",e),...t});Nj.displayName="Pagination";const Tj=v.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:se("flex flex-row items-center gap-1",e),...t}));Tj.displayName="PaginationContent";const ig=v.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:se("",e),...t}));ig.displayName="PaginationItem";const Rj=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:se(Hf({variant:t?"outline":"ghost",size:n}),e),...r});Rj.displayName="PaginationLink";const Pj=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:se("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(IO,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});Pj.displayName="PaginationEllipsis";const Aj=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=i(d,f),t>3&&u.unshift("..."),t{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},o=s();return l.jsx(l.Fragment,{children:l.jsx(Nj,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(Tj,{children:o.map((a,c)=>a==="..."?l.jsx(ig,{children:l.jsx(Pj,{})},c):l.jsx(ig,{children:l.jsx(Rj,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})},Ss=({when:e,children:t,fallback:n})=>e?t:n;var Oj="AlertDialog",[e$,IH]=on(Oj,[nC]),Vs=nC(),Dj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(ov,{...r,...n,modal:!0})};Dj.displayName=Oj;var t$="AlertDialogTrigger",Ij=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(av,{...s,...r,ref:t})});Ij.displayName=t$;var n$="AlertDialogPortal",Mj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(lv,{...r,...n})};Mj.displayName=n$;var r$="AlertDialogOverlay",Lj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Wc,{...s,...r,ref:t})});Lj.displayName=r$;var va="AlertDialogContent",[s$,i$]=e$(va),Fj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Vs(n),o=v.useRef(null),a=Ke(t,o),c=v.useRef(null);return l.jsx(YF,{contentName:va,titleName:zj,docsSlug:"alert-dialog",children:l.jsx(s$,{scope:n,cancelRef:c,children:l.jsxs(Hc,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(jy,{children:r}),l.jsx(a$,{contentRef:o})]})})})});Fj.displayName=va;var zj="AlertDialogTitle",$j=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Yc,{...s,...r,ref:t})});$j.displayName=zj;var Uj="AlertDialogDescription",Vj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Kc,{...s,...r,ref:t})});Vj.displayName=Uj;var o$="AlertDialogAction",Bj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(th,{...s,...r,ref:t})});Bj.displayName=o$;var Wj="AlertDialogCancel",Hj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=i$(Wj,n),i=Vs(n),o=Ke(t,s);return l.jsx(th,{...i,...r,ref:o})});Hj.displayName=Wj;var a$=({contentRef:e})=>{const t=`\`${va}\` requires a description for the component to be accessible for screen reader users.
+be.version="2.30.1";g4(Ct);be.fn=le;be.min=s5;be.max=i5;be.now=o5;be.utc=es;be.unix=Dz;be.months=Mz;be.isDate=Gc;be.locale=xi;be.invalid=rh;be.duration=Dr;be.isMoment=Rr;be.weekdays=Fz;be.parseZone=Iz;be.localeData=zs;be.isDuration=ud;be.monthsShort=Lz;be.weekdaysMin=$z;be.defineLocale=Ev;be.updateLocale=I3;be.locales=M3;be.weekdaysShort=zz;be.normalizeUnits=dr;be.relativeTimeRounding=h6;be.relativeTimeThreshold=p6;be.calendarFormat=P5;be.prototype=le;be.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const g6=async()=>await st().collection("access").getFullList({sort:"-created",filter:"deleted = null"}),Us=async e=>e.id?await st().collection("access").update(e.id,e):await st().collection("access").create(e),y6=async e=>(e.deleted=be.utc().format("YYYY-MM-DD HH:mm:ss"),await st().collection("access").update(e.id,e)),Gw=async()=>await st().collection("access_groups").getFullList({sort:"-created",expand:"access"}),v6=async e=>{const t=st();if((await t.collection("access").getList(1,1,{filter:`group='${e}' && deleted=null`})).items.length>0)throw new Error("该分组下有授权配置,无法删除");await t.collection("access_groups").delete(e)},x6=async e=>{const t=st();return e.id?await t.collection("access_groups").update(e.id,e):await t.collection("access_groups").create(e)},Zw=async e=>await st().collection("access_groups").update(e.id,e),w6=(e,t)=>{switch(t.type){case"SET_ACCESSES":return{...e,accesses:t.payload};case"ADD_ACCESS":return{...e,accesses:[t.payload,...e.accesses]};case"DELETE_ACCESS":return{...e,accesses:e.accesses.filter(n=>n.id!==t.payload)};case"UPDATE_ACCESS":return{...e,accesses:e.accesses.map(n=>n.id===t.payload.id?t.payload:n)};case"SET_EMAILS":return{...e,emails:t.payload};case"ADD_EMAIL":return{...e,emails:{...e.emails,content:{emails:[...e.emails.content.emails,t.payload]}}};case"SET_ACCESS_GROUPS":return{...e,accessGroups:t.payload};default:return e}},b6=async()=>{try{return await st().collection("settings").getFirstListItem("name='emails'")}catch{return{content:{emails:[]}}}},Mv=async e=>{try{return await st().collection("settings").getFirstListItem(`name='${e}'`)}catch{return{name:e}}},Ga=async e=>{const t=st();let n;return e.id?n=await t.collection("settings").update(e.id,e):n=await t.collection("settings").create(e),n},pj=v.createContext({}),In=()=>v.useContext(pj),_6=({children:e})=>{const[t,n]=v.useReducer(w6,{accesses:[],emails:{content:{emails:[]}},accessGroups:[]});v.useEffect(()=>{(async()=>{const d=await g6();n({type:"SET_ACCESSES",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await b6();n({type:"SET_EMAILS",payload:d})})()},[]),v.useEffect(()=>{(async()=>{const d=await Gw();n({type:"SET_ACCESS_GROUPS",payload:d})})()},[]);const r=v.useCallback(async()=>{const u=await Gw();n({type:"SET_ACCESS_GROUPS",payload:u})},[]),s=v.useCallback(u=>{n({type:"SET_EMAILS",payload:u})},[]),i=v.useCallback(u=>{n({type:"DELETE_ACCESS",payload:u})},[]),o=v.useCallback(u=>{n({type:"ADD_ACCESS",payload:u})},[]),a=v.useCallback(u=>{n({type:"UPDATE_ACCESS",payload:u})},[]),c=v.useCallback(u=>{n({type:"SET_ACCESS_GROUPS",payload:u})},[]);return l.jsx(pj.Provider,{value:{config:{accesses:t.accesses,emails:t.emails,accessGroups:t.accessGroups},deleteAccess:i,addAccess:o,setEmails:s,updateAccess:a,setAccessGroups:c,reloadAccessGroups:r},children:e&&e})},S6={theme:"system",setTheme:()=>null},mj=v.createContext(S6);function k6({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[s,i]=v.useState(()=>localStorage.getItem(n)||t);v.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),s==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(c);return}a.classList.add(s)},[s]);const o={theme:s,setTheme:a=>{localStorage.setItem(n,a),i(a)}};return l.jsx(mj.Provider,{...r,value:o,children:e})}const C6=()=>{const e=v.useContext(mj);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function j6(){const{setTheme:e}=C6(),{t}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(YO,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),l.jsx(VO,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsxs(eh,{align:"end",children:[l.jsx(eo,{onClick:()=>e("light"),children:t("theme.light")}),l.jsx(eo,{onClick:()=>e("dark"),children:t("theme.dark")}),l.jsx(eo,{onClick:()=>e("system"),children:t("theme.system")})]})]})}function E6(){const{i18n:e}=it();return l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",children:[l.jsx(FO,{className:"h-[1.2rem] w-[1.2rem] dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),l.jsx(eh,{align:"end",children:Object.keys(e.store.data).map(t=>l.jsx(eo,{onClick:()=>e.changeLanguage(t),children:e.store.data[t].name}))})]})}var N6="Separator",qw="horizontal",T6=["horizontal","vertical"],gj=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=qw,...s}=e,i=R6(r)?r:qw,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return l.jsx(Re.div,{"data-orientation":i,...a,...s,ref:t})});gj.displayName=N6;function R6(e){return T6.includes(e)}var yj=gj;const xr=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>l.jsx(yj,{ref:s,decorative:n,orientation:t,className:se("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));xr.displayName=yj.displayName;const P6="Certimate v0.1.16",vj=()=>{const{t:e}=it();return l.jsxs("div",{className:"fixed right-0 bottom-0 w-full flex justify-between p-5",children:[l.jsx("div",{className:""}),l.jsxs("div",{className:"text-muted-foreground text-sm hover:text-stone-900 dark:hover:text-stone-200 flex",children:[l.jsxs("a",{href:"https://docs.certimate.me",target:"_blank",className:"flex items-center",children:[l.jsx(TO,{size:16}),l.jsx("div",{className:"ml-1",children:e("document")})]}),l.jsx(xr,{orientation:"vertical",className:"mx-2"}),l.jsx("a",{href:"https://github.com/usual2970/certimate/releases",target:"_blank",children:P6})]})]})};function A6(){const e=Dn(),t=Ar(),{t:n}=it();if(!st().authStore.isValid||!st().authStore.isAdmin)return l.jsx(iS,{to:"/login"});const r=t.pathname,s=a=>(console.log(r),a==r?"bg-muted text-primary":"text-muted-foreground"),i=()=>{st().authStore.clear(),e("/login")},o=()=>{e("/setting/account")};return l.jsx(l.Fragment,{children:l.jsx(_6,{children:l.jsxs("div",{className:"grid min-h-screen w-full md:grid-cols-[180px_1fr] lg:grid-cols-[200px_1fr] 2xl:md:grid-cols-[280px_1fr] ",children:[l.jsx("div",{className:"hidden border-r dark:border-stone-500 bg-muted/40 md:block",children:l.jsxs("div",{className:"flex h-full max-h-screen flex-col gap-2",children:[l.jsx("div",{className:"flex h-14 items-center border-b dark:border-stone-500 px-4 lg:h-[60px] lg:px-6",children:l.jsxs(xn,{to:"/",className:"flex items-center gap-2 font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"})]})}),l.jsx("div",{className:"flex-1",children:l.jsxs("nav",{className:"grid items-start px-2 text-sm font-medium lg:px-4",children:[l.jsxs(xn,{to:"/",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/")),children:[l.jsx(aw,{className:"h-4 w-4"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/domains")),children:[l.jsx($m,{className:"h-4 w-4"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/access")),children:[l.jsx(lw,{className:"h-4 w-4"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("flex items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary",s("/history")),children:[l.jsx(ow,{className:"h-4 w-4"}),n("deployment.log.name")]})]})})]})}),l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("header",{className:"flex h-14 items-center gap-4 border-b dark:border-stone-500 bg-muted/40 px-4 lg:h-[60px] lg:px-6",children:[l.jsxs(cv,{children:[l.jsx(uv,{asChild:!0,children:l.jsxs(Ue,{variant:"outline",size:"icon",className:"shrink-0 md:hidden",children:[l.jsx(UO,{className:"h-5 w-5 dark:text-white"}),l.jsx("span",{className:"sr-only",children:"Toggle navigation menu"})]})}),l.jsx(nh,{side:"left",className:"flex flex-col",children:l.jsxs("nav",{className:"grid gap-2 text-lg font-medium",children:[l.jsxs(xn,{to:"/",className:"flex items-center gap-2 text-lg font-semibold",children:[l.jsx("img",{src:"/vite.svg",className:"w-[36px] h-[36px]"}),l.jsx("span",{className:"dark:text-white",children:"Certimate"}),l.jsx("span",{className:"sr-only",children:"Certimate"})]}),l.jsxs(xn,{to:"/",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/")),children:[l.jsx(aw,{className:"h-5 w-5"}),n("dashboard")]}),l.jsxs(xn,{to:"/domains",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/domains")),children:[l.jsx($m,{className:"h-5 w-5"}),n("domain.management.name")]}),l.jsxs(xn,{to:"/access",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/access")),children:[l.jsx(lw,{className:"h-5 w-5"}),n("menu.auth.management")]}),l.jsxs(xn,{to:"/history",className:se("mx-[-0.65rem] flex items-center gap-4 rounded-xl px-3 py-2 hover:text-foreground",s("/history")),children:[l.jsx(ow,{className:"h-5 w-5"}),n("deployment.log.name")]})]})})]}),l.jsx("div",{className:"w-full flex-1"}),l.jsx(j6,{}),l.jsx(E6,{}),l.jsxs(ev,{children:[l.jsx(tv,{asChild:!0,children:l.jsxs(Ue,{variant:"secondary",size:"icon",className:"rounded-full",children:[l.jsx(DO,{className:"h-5 w-5"}),l.jsx("span",{className:"sr-only",children:"Toggle user menu"})]})}),l.jsxs(eh,{align:"end",children:[l.jsx(Jk,{children:n("account")}),l.jsx(eC,{}),l.jsx(eo,{onClick:o,children:n("setting")}),l.jsx(eo,{onClick:i,children:n("logout")})]})]})]}),l.jsxs("main",{className:"flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6 relative",children:[l.jsx(_y,{}),l.jsx(vj,{})]})]})]})})})}const Lv=({phase:e,phaseSuccess:t})=>{const{t:n}=it();let r=0;return e==="check"?r=1:e==="apply"?r=2:e==="deploy"&&(r=3),l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:se("text-xs text-nowrap",r===1?t?"text-green-600":"text-red-600":"",r>1?"text-green-600":""),children:n("deploy.progress.check")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>1?"bg-green-600":"")}),l.jsx("div",{className:se("text-xs text-nowrap",r<2?"text-muted-foreground":"",r===2?t?"text-green-600":"text-red-600":"",r>2?"text-green-600":""),children:n("deploy.progress.apply")}),l.jsx(xr,{className:se("h-1 grow max-w-[60px]",r>2?"bg-green-600":"")}),l.jsx("div",{className:se("text-xs text-nowrap",r<3?"text-muted-foreground":"",r===3?t?"text-green-600":"text-red-600":"",r>3?"text-green-600":""),children:n("deploy.progress.deploy")})]})};var O6="VisuallyHidden",Qc=v.forwardRef((e,t)=>l.jsx(Re.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Qc.displayName=O6;var D6=Qc,[ph,OH]=on("Tooltip",[Ba]),mh=Ba(),xj="TooltipProvider",I6=700,rg="tooltip.open",[M6,Fv]=ph(xj),zv=e=>{const{__scopeTooltip:t,delayDuration:n=I6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=v.useState(!0),c=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),l.jsx(M6,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback(d=>{c.current=d},[]),disableHoverableContent:s,children:i})};zv.displayName=xj;var gh="Tooltip",[L6,yh]=ph(gh),wj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,c=Fv(gh,e.__scopeTooltip),u=mh(t),[d,f]=v.useState(null),h=Wn(),y=v.useRef(0),x=o??c.disableHoverableContent,g=a??c.delayDuration,w=v.useRef(!1),[m=!1,p]=Zn({prop:r,defaultProp:s,onChange:T=>{T?(c.onOpen(),document.dispatchEvent(new CustomEvent(rg))):c.onClose(),i==null||i(T)}}),b=v.useMemo(()=>m?w.current?"delayed-open":"instant-open":"closed",[m]),_=v.useCallback(()=>{window.clearTimeout(y.current),w.current=!1,p(!0)},[p]),C=v.useCallback(()=>{window.clearTimeout(y.current),p(!1)},[p]),j=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{w.current=!0,p(!0)},g)},[g,p]);return v.useEffect(()=>()=>window.clearTimeout(y.current),[]),l.jsx(zy,{...u,children:l.jsx(L6,{scope:t,contentId:h,open:m,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:v.useCallback(()=>{c.isOpenDelayed?j():_()},[c.isOpenDelayed,j,_]),onTriggerLeave:v.useCallback(()=>{x?C():window.clearTimeout(y.current)},[C,x]),onOpen:_,onClose:C,disableHoverableContent:x,children:n})})};wj.displayName=gh;var sg="TooltipTrigger",bj=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=yh(sg,n),i=Fv(sg,n),o=mh(n),a=v.useRef(null),c=Ke(t,a,s.onTriggerChange),u=v.useRef(!1),d=v.useRef(!1),f=v.useCallback(()=>u.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),l.jsx($y,{asChild:!0,...o,children:l.jsx(Re.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:ue(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ue(e.onBlur,s.onClose),onClick:ue(e.onClick,s.onClose)})})});bj.displayName=sg;var F6="TooltipPortal",[DH,z6]=ph(F6,{forceMount:void 0}),Na="TooltipContent",$v=v.forwardRef((e,t)=>{const n=z6(Na,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=yh(Na,e.__scopeTooltip);return l.jsx(an,{present:r||o.open,children:o.disableHoverableContent?l.jsx(_j,{side:s,...i,ref:t}):l.jsx($6,{side:s,...i,ref:t})})}),$6=v.forwardRef((e,t)=>{const n=yh(Na,e.__scopeTooltip),r=Fv(Na,e.__scopeTooltip),s=v.useRef(null),i=Ke(t,s),[o,a]=v.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:f}=r,h=v.useCallback(()=>{a(null),f(!1)},[f]),y=v.useCallback((x,g)=>{const w=x.currentTarget,m={x:x.clientX,y:x.clientY},p=W6(m,w.getBoundingClientRect()),b=H6(m,p),_=Y6(g.getBoundingClientRect()),C=G6([...b,..._]);a(C),f(!0)},[f]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(c&&d){const x=w=>y(w,d),g=w=>y(w,c);return c.addEventListener("pointerleave",x),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",g)}}},[c,d,y,h]),v.useEffect(()=>{if(o){const x=g=>{const w=g.target,m={x:g.clientX,y:g.clientY},p=(c==null?void 0:c.contains(w))||(d==null?void 0:d.contains(w)),b=!K6(m,o);p?h():b&&(h(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,d,o,u,h]),l.jsx(_j,{...e,ref:i})}),[U6,V6]=ph(gh,{isInside:!1}),_j=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,c=yh(Na,n),u=mh(n),{onClose:d}=c;return v.useEffect(()=>(document.addEventListener(rg,d),()=>document.removeEventListener(rg,d)),[d]),v.useEffect(()=>{if(c.trigger){const f=h=>{const y=h.target;y!=null&&y.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),l.jsx($a,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:l.jsxs(Uy,{"data-state":c.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(jy,{children:r}),l.jsx(U6,{scope:n,isInside:!0,children:l.jsx(D6,{id:c.contentId,role:"tooltip",children:s||r})})]})})});$v.displayName=Na;var Sj="TooltipArrow",B6=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=mh(n);return V6(Sj,n).isInside?null:l.jsx(Vy,{...s,...r,ref:t})});B6.displayName=Sj;function W6(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function H6(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Y6(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function K6(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;ir!=d>r&&n<(u-a)*(r-c)/(d-c)+a&&(s=!s)}return s}function G6(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),Z6(t)}function Z6(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var q6=zv,X6=wj,Q6=bj,kj=$v;const J6=q6,Cj=X6,jj=Q6,Ej=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(kj,{ref:r,sideOffset:t,className:se("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Ej.displayName=kj.displayName;const Uv=({deployment:e})=>{const t=n=>e.log[n]?e.log[n][e.log[n].length-1].error:"";return l.jsx(l.Fragment,{children:e.phase==="deploy"&&e.phaseSuccess||e.wholeSuccess?l.jsx(OO,{size:16,className:"text-green-700"}):l.jsx(l.Fragment,{children:t(e.phase).length?l.jsx(J6,{children:l.jsxs(Cj,{children:[l.jsx(jj,{asChild:!0,className:"cursor-pointer",children:l.jsx(sw,{size:16,className:"text-red-700"})}),l.jsx(Ej,{className:"max-w-[35em]",children:t(e.phase)})]})}):l.jsx(sw,{size:16,className:"text-red-700"})})})},Nj=({className:e,...t})=>l.jsx("nav",{role:"navigation","aria-label":"pagination",className:se("mx-auto flex w-full justify-center",e),...t});Nj.displayName="Pagination";const Tj=v.forwardRef(({className:e,...t},n)=>l.jsx("ul",{ref:n,className:se("flex flex-row items-center gap-1",e),...t}));Tj.displayName="PaginationContent";const ig=v.forwardRef(({className:e,...t},n)=>l.jsx("li",{ref:n,className:se("",e),...t}));ig.displayName="PaginationItem";const Rj=({className:e,isActive:t,size:n="icon",...r})=>l.jsx("a",{"aria-current":t?"page":void 0,className:se(Hf({variant:t?"outline":"ghost",size:n}),e),...r});Rj.displayName="PaginationLink";const Pj=({className:e,...t})=>l.jsxs("span",{"aria-hidden":!0,className:se("flex h-9 w-9 items-center justify-center",e),...t,children:[l.jsx(IO,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"More pages"})]});Pj.displayName="PaginationEllipsis";const Aj=({totalPages:e,currentPage:t,onPageChange:n})=>{const s=()=>{if(e>7){let u=[];const d=Math.max(2,t-1),f=Math.min(e-1,t+1),h=e-1;return u=i(d,f),t>3&&u.unshift("..."),t{let d=a;const f=[];for(;d<=c;)f.push(d),d+=u;return f},o=s();return l.jsx(l.Fragment,{children:l.jsx(Nj,{className:"dark:text-stone-200 justify-end mt-3",children:l.jsx(Tj,{children:o.map((a,c)=>a==="..."?l.jsx(ig,{children:l.jsx(Pj,{})},c):l.jsx(ig,{children:l.jsx(Rj,{href:"#",isActive:t==a,onClick:u=>{u.preventDefault(),n(a)},children:a})},c))})})})},Ss=({when:e,children:t,fallback:n})=>e?t:n;var Oj="AlertDialog",[e$,IH]=on(Oj,[nC]),Vs=nC(),Dj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(ov,{...r,...n,modal:!0})};Dj.displayName=Oj;var t$="AlertDialogTrigger",Ij=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(av,{...s,...r,ref:t})});Ij.displayName=t$;var n$="AlertDialogPortal",Mj=e=>{const{__scopeAlertDialog:t,...n}=e,r=Vs(t);return l.jsx(lv,{...r,...n})};Mj.displayName=n$;var r$="AlertDialogOverlay",Lj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Wc,{...s,...r,ref:t})});Lj.displayName=r$;var va="AlertDialogContent",[s$,i$]=e$(va),Fj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Vs(n),o=v.useRef(null),a=Ke(t,o),c=v.useRef(null);return l.jsx(YF,{contentName:va,titleName:zj,docsSlug:"alert-dialog",children:l.jsx(s$,{scope:n,cancelRef:c,children:l.jsxs(Hc,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:ue(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(jy,{children:r}),l.jsx(a$,{contentRef:o})]})})})});Fj.displayName=va;var zj="AlertDialogTitle",$j=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Yc,{...s,...r,ref:t})});$j.displayName=zj;var Uj="AlertDialogDescription",Vj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(Kc,{...s,...r,ref:t})});Vj.displayName=Uj;var o$="AlertDialogAction",Bj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Vs(n);return l.jsx(th,{...s,...r,ref:t})});Bj.displayName=o$;var Wj="AlertDialogCancel",Hj=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=i$(Wj,n),i=Vs(n),o=Ke(t,s);return l.jsx(th,{...i,...r,ref:o})});Hj.displayName=Wj;var a$=({contentRef:e})=>{const t=`\`${va}\` requires a description for the component to be accessible for screen reader users.
You can add a description to the \`${va}\` by passing a \`${Uj}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
diff --git a/ui/dist/index.html b/ui/dist/index.html
index f032bfed..5ae1ca1e 100644
--- a/ui/dist/index.html
+++ b/ui/dist/index.html
@@ -5,7 +5,7 @@
Certimate - Your Trusted SSL Automation Partner
-
+
diff --git a/ui/src/domain/version.ts b/ui/src/domain/version.ts
index 7b9dabcf..4d4e9012 100644
--- a/ui/src/domain/version.ts
+++ b/ui/src/domain/version.ts
@@ -1 +1 @@
-export const version = "Certimate v0.1.15";
+export const version = "Certimate v0.1.16";