diff --git a/assets/Manage-28bb5d8f.js b/assets/Manage-28bb5d8f.js new file mode 100644 index 0000000..ce21bf6 --- /dev/null +++ b/assets/Manage-28bb5d8f.js @@ -0,0 +1,508 @@ +import{g as wt,u as G,a as vt,j as r,b as fe,c as xt,C as Ie,d as se,e as I,A as Tt,L as Ot,f as Lt,q as At,h as Ne,i as st,k as me,l as $t,m as Ut,s as St,n as _t,T as It,o as Nt,p as Et}from"./index-9959d30d.js";import{r as b,A as be,_ as ye,f as ue,k as Te,I as Ee,d as C,M as Ve,S as z,l as Oe,B as M,n as Vt,o as zt,h as Bt,j as Ft,T as Mt,p as Rt,q as Dt,E as Pt,s as Ht,P as Jt,D as Wt,u as qt,v as Gt,w as Qt,x as ie,y as H,z as Xt,C as U,L as ke,R as je,G as Zt,H as Yt,J as Kt,K as we}from"./antd-af73db0d.js";var Ct={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};const en=Ct;var tn=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:en}))},nn=b.forwardRef(tn);const lt=nn;var sn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};const ln=sn;var rn=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:ln}))},on=b.forwardRef(rn);const an=on;var cn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const un=cn;var dn=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:un}))},fn=b.forwardRef(dn);const mn=fn;var pn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};const hn=pn;var gn=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:hn}))},bn=b.forwardRef(gn);const yn=bn;function rt(e,n=!1){const s=e.length;let t=0,l="",o=0,u=16,a=0,i=0,d=0,c=0,m=0;function y(h,v){let f=0,g=0;for(;f=48&&p<=57)g=g*16+p-48;else if(p>=65&&p<=70)g=g*16+p-65+10;else if(p>=97&&p<=102)g=g*16+p-97+10;else break;t++,f++}return f=s){h+=e.substring(v,t),m=2;break}const f=e.charCodeAt(t);if(f===34){h+=e.substring(v,t),t++;break}if(f===92){if(h+=e.substring(v,t),t++,t>=s){m=2;break}switch(e.charCodeAt(t++)){case 34:h+='"';break;case 92:h+="\\";break;case 47:h+="/";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+=` +`;break;case 114:h+="\r";break;case 116:h+=" ";break;case 117:const p=y(4,!0);p>=0?h+=String.fromCharCode(p):m=4;break;default:m=5}v=t;continue}if(f>=0&&f<=31)if(oe(f)){h+=e.substring(v,t),m=2;break}else m=6;t++}return h}function T(){if(l="",m=0,o=t,i=a,c=d,t>=s)return o=s,u=17;let h=e.charCodeAt(t);if(ve(h)){do t++,l+=String.fromCharCode(h),h=e.charCodeAt(t);while(ve(h));return u=15}if(oe(h))return t++,l+=String.fromCharCode(h),h===13&&e.charCodeAt(t)===10&&(t++,l+=` +`),a++,d=t,u=14;switch(h){case 123:return t++,u=1;case 125:return t++,u=2;case 91:return t++,u=3;case 93:return t++,u=4;case 58:return t++,u=6;case 44:return t++,u=5;case 34:return t++,l=x(),u=10;case 47:const v=t-1;if(e.charCodeAt(t+1)===47){for(t+=2;t=12&&h<=15);return h}return{setPosition:w,getPosition:()=>t,scan:n?L:T,getToken:()=>u,getTokenValue:()=>l,getTokenOffset:()=>o,getTokenLength:()=>t-o,getTokenStartLine:()=>i,getTokenStartCharacter:()=>o-c,getTokenError:()=>m}}function ve(e){return e===32||e===9}function oe(e){return e===10||e===13}function ee(e){return e>=48&&e<=57}var Fe;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Fe||(Fe={}));const F=new Array(20).fill(0).map((e,n)=>" ".repeat(n)),te=200,Me={" ":{"\n":new Array(te).fill(0).map((e,n)=>` +`+" ".repeat(n)),"\r":new Array(te).fill(0).map((e,n)=>"\r"+" ".repeat(n)),"\r\n":new Array(te).fill(0).map((e,n)=>`\r +`+" ".repeat(n))}," ":{"\n":new Array(te).fill(0).map((e,n)=>` +`+" ".repeat(n)),"\r":new Array(te).fill(0).map((e,n)=>"\r"+" ".repeat(n)),"\r\n":new Array(te).fill(0).map((e,n)=>`\r +`+" ".repeat(n))}},kn=[` +`,"\r",`\r +`];function ot(e,n,s){let t,l,o,u,a;if(n){for(u=n.offset,a=u+n.length,o=u;o>0&&!ge(e,o-1);)o--;let f=a;for(;f1)return ne(i,c)+ne(y,t+m);const f=y.length*(t+m);return!d||f>Me[w][i].length?i+ne(y,t+m):f<=0?i:Me[w][i][f]}function A(){let f=k.scan();for(c=0;f===15||f===14;)f===14&&s.keepLines?c+=1:f===14&&(c=1),f=k.scan();return x=f===16||k.getTokenError()!==0,f}const L=[];function h(f,g,p){!x&&(!n||gu)&&e.substring(g,p)!==f&&L.push({offset:g,length:p-g,content:f})}let v=A();if(s.keepLines&&c>0&&h(ne(i,c),0,0),v!==17){let f=k.getTokenOffset()+o,g=y.length*t<20&&s.insertSpaces?F[y.length*t]:ne(y,t);h(g,o,f)}for(;v!==17;){let f=k.getTokenOffset()+k.getTokenLength()+o,g=A(),p="",$=!1;for(;c===0&&(g===12||g===13);){let Q=k.getTokenOffset()+o;h(F[1],f,Q),f=k.getTokenOffset()+k.getTokenLength()+o,$=g===12,p=$?T():"",g=A()}if(g===2)v!==1&&m--,s.keepLines&&c>0||!s.keepLines&&v!==1?p=T():s.keepLines&&(p=F[1]);else if(g===4)v!==3&&m--,s.keepLines&&c>0||!s.keepLines&&v!==3?p=T():s.keepLines&&(p=F[1]);else{switch(v){case 3:case 1:m++,s.keepLines&&c>0||!s.keepLines?p=T():p=F[1];break;case 5:s.keepLines&&c>0||!s.keepLines?p=T():p=F[1];break;case 12:p=T();break;case 13:c>0?p=T():$||(p=F[1]);break;case 6:s.keepLines&&c>0?p=T():$||(p=F[1]);break;case 10:s.keepLines&&c>0?p=T():g===6&&!$&&(p="");break;case 7:case 8:case 9:case 11:case 2:case 4:s.keepLines&&c>0?p=T():(g===12||g===13)&&!$?p=F[1]:g!==5&&g!==17&&(x=!0);break;case 16:x=!0;break}c>0&&(g===12||g===13)&&(p=T())}g===17&&(s.keepLines&&c>0?p=T():p=s.insertFinalNewline?i:"");const _=k.getTokenOffset()+o;h(p,f,_),v=g}return L}function ne(e,n){let s="";for(let t=0;t{const i={};u(i),o.push(l),l=i,t=null},onObjectProperty:i=>{t=i},onObjectEnd:()=>{l=o.pop()},onArrayBegin:()=>{const i=[];u(i),o.push(l),l=i,t=null},onArrayEnd:()=>{l=o.pop()},onLiteralValue:u,onError:(i,d,c)=>{n.push({error:i,offset:d,length:c})}},s),l[0]}function it(e,n=[],s=de.DEFAULT){let t={type:"array",offset:-1,length:-1,children:[],parent:void 0};function l(i){t.type==="property"&&(t.length=i-t.offset,t=t.parent)}function o(i){return t.children.push(i),i}at(e,{onObjectBegin:i=>{t=o({type:"object",offset:i,length:-1,parent:t,children:[]})},onObjectProperty:(i,d,c)=>{t=o({type:"property",offset:d,length:-1,parent:t,children:[]}),t.children.push({type:"string",value:i,offset:d,length:c,parent:t})},onObjectEnd:(i,d)=>{l(i+d),t.length=i+d-t.offset,t=t.parent,l(i+d)},onArrayBegin:(i,d)=>{t=o({type:"array",offset:i,length:-1,parent:t,children:[]})},onArrayEnd:(i,d)=>{t.length=i+d-t.offset,t=t.parent,l(i+d)},onLiteralValue:(i,d,c)=>{o({type:xn(i),offset:d,length:c,parent:t,value:i}),l(d+c)},onSeparator:(i,d,c)=>{t.type==="property"&&(i===":"?t.colonOffset=d:i===","&&l(d))},onError:(i,d,c)=>{n.push({error:i,offset:d,length:c})}},s);const a=t.children[0];return a&&delete a.parent,a}function Le(e,n){if(!e)return;let s=e;for(let t of n)if(typeof t=="string"){if(s.type!=="object"||!Array.isArray(s.children))return;let l=!1;for(const o of s.children)if(Array.isArray(o.children)&&o.children[0].value===t&&o.children.length===2){s=o.children[1],l=!0;break}if(!l)return}else{const l=t;if(s.type!=="array"||l<0||!Array.isArray(s.children)||l>=s.children.length)return;s=s.children[l]}return s}function at(e,n,s=de.DEFAULT){const t=rt(e,!1),l=[];function o(j){return j?()=>j(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function u(j){return j?()=>j(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>l.slice()):()=>!0}function a(j){return j?O=>j(O,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function i(j){return j?O=>j(O,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>l.slice()):()=>!0}const d=u(n.onObjectBegin),c=i(n.onObjectProperty),m=o(n.onObjectEnd),y=u(n.onArrayBegin),w=o(n.onArrayEnd),k=i(n.onLiteralValue),x=a(n.onSeparator),T=o(n.onComment),A=a(n.onError),L=s&&s.disallowComments,h=s&&s.allowTrailingComma;function v(){for(;;){const j=t.scan();switch(t.getTokenError()){case 4:f(14);break;case 5:f(15);break;case 3:f(13);break;case 1:L||f(11);break;case 2:f(12);break;case 6:f(16);break}switch(j){case 12:case 13:L?f(10):T();break;case 16:f(1);break;case 15:case 14:break;default:return j}}}function f(j,O=[],W=[]){if(A(j),O.length+W.length>0){let B=t.getToken();for(;B!==17;){if(O.indexOf(B)!==-1){v();break}else if(W.indexOf(B)!==-1)break;B=v()}}}function g(j){const O=t.getTokenValue();return j?k(O):(c(O),l.push(O)),v(),!0}function p(){switch(t.getToken()){case 11:const j=t.getTokenValue();let O=Number(j);isNaN(O)&&(f(2),O=0),k(O);break;case 7:k(null);break;case 8:k(!0);break;case 9:k(!1);break;default:return!1}return v(),!0}function $(){return t.getToken()!==10?(f(3,[],[2,5]),!1):(g(!1),t.getToken()===6?(x(":"),v(),S()||f(4,[],[2,5])):f(5,[],[2,5]),l.pop(),!0)}function _(){d(),v();let j=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(j||f(4,[],[]),x(","),v(),t.getToken()===2&&h)break}else j&&f(6,[],[]);$()||f(4,[],[2,5]),j=!0}return m(),t.getToken()!==2?f(7,[2],[]):v(),!0}function Q(){y(),v();let j=!0,O=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(O||f(4,[],[]),x(","),v(),t.getToken()===4&&h)break}else O&&f(6,[],[]);j?(l.push(0),j=!1):l[l.length-1]++,S()||f(4,[],[4,5]),O=!0}return w(),j||l.pop(),t.getToken()!==4?f(8,[4],[]):v(),!0}function S(){switch(t.getToken()){case 3:return Q();case 1:return _();case 10:return g(!0);default:return p()}}return v(),t.getToken()===17?s.allowEmptyContent?!0:(f(4,[],[]),!1):S()?(t.getToken()!==17&&f(9,[],[]),!0):(f(4,[],[]),!1)}function xn(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function Tn(e,n,s,t){const l=n.slice(),u=it(e,[]);let a,i;for(;l.length>0&&(i=l.pop(),a=Le(u,l),a===void 0&&s!==void 0);)typeof i=="string"?s={[i]:s}:s=[s];if(a)if(a.type==="object"&&typeof i=="string"&&Array.isArray(a.children)){const d=Le(a,[i]);if(d!==void 0)if(s===void 0){if(!d.parent)throw new Error("Malformed AST");const c=a.children.indexOf(d.parent);let m,y=d.parent.offset+d.parent.length;if(c>0){let w=a.children[c-1];m=w.offset+w.length}else m=a.offset+1,a.children.length>1&&(y=a.children[1].offset);return K(e,{offset:m,length:y-m,content:""},t)}else return K(e,{offset:d.offset,length:d.length,content:JSON.stringify(s)},t);else{if(s===void 0)return[];const c=`${JSON.stringify(i)}: ${JSON.stringify(s)}`,m=t.getInsertionIndex?t.getInsertionIndex(a.children.map(w=>w.children[0].value)):a.children.length;let y;if(m>0){let w=a.children[m-1];y={offset:w.offset+w.length,length:0,content:","+c}}else a.children.length===0?y={offset:a.offset+1,length:0,content:c}:y={offset:a.offset+1,length:0,content:c+","};return K(e,y,t)}}else if(a.type==="array"&&typeof i=="number"&&Array.isArray(a.children)){const d=i;if(d===-1){const c=`${JSON.stringify(s)}`;let m;if(a.children.length===0)m={offset:a.offset+1,length:0,content:c};else{const y=a.children[a.children.length-1];m={offset:y.offset+y.length,length:0,content:","+c}}return K(e,m,t)}else if(s===void 0&&a.children.length>=0){const c=i,m=a.children[c];let y;if(a.children.length===1)y={offset:a.offset+1,length:a.length-2,content:""};else if(a.children.length-1===c){let w=a.children[c-1],k=w.offset+w.length,x=a.offset+a.length;y={offset:k,length:x-2-k,content:""}}else y={offset:m.offset,length:a.children[c+1].offset-m.offset,content:""};return K(e,y,t)}else if(s!==void 0){let c;const m=`${JSON.stringify(s)}`;if(!t.isArrayInsertion&&a.children.length>i){const y=a.children[i];c={offset:y.offset,length:y.length,content:m}}else if(a.children.length===0||i===0)c={offset:a.offset+1,length:0,content:a.children.length===0?m:m+","};else{const y=i>a.children.length?a.children.length:i,w=a.children[y-1];c={offset:w.offset+w.length,length:0,content:","+m}}return K(e,c,t)}else throw new Error(`Can not ${s===void 0?"remove":t.isArrayInsertion?"insert":"modify"} Array index ${d} as length is not sufficient`)}else throw new Error(`Can not add ${typeof i!="number"?"index":"property"} to parent of type ${a.type}`);else{if(s===void 0)throw new Error("Can not delete in empty document");return K(e,{offset:u?u.offset:0,length:u?u.length:0,content:JSON.stringify(s)},t)}}function K(e,n,s){if(!s.formattingOptions)return[n];let t=Ae(e,n),l=n.offset,o=n.offset+n.content.length;if(n.length===0||n.content.length===0){for(;l>0&&!ge(t,l-1);)l--;for(;o=0;i--){const d=u[i];t=Ae(t,d),l=Math.min(l,d.offset),o=Math.max(o,d.offset+d.length),o+=d.content.length-d.length}const a=e.length-(t.length-o)-l;return[{offset:l,length:a,content:t.substring(l,o)}]}function Ae(e,n){return e.substring(0,n.offset)+n.content+e.substring(n.offset+n.length)}var Re;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Re||(Re={}));var De;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(De||(De={}));const On=vn,Ln=it,An=Le;var Pe;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(Pe||(Pe={}));function $n(e,n,s){return ot(e,n,s)}function pe(e,n,s,t){return Tn(e,n,s,t)}function ze(e,n){let s=n.slice(0).sort((l,o)=>{const u=l.offset-o.offset;return u===0?l.length-o.length:u}),t=e.length;for(let l=s.length-1;l>=0;l--){let o=s[l];if(o.offset+o.length<=t)e=Ae(e,o);else throw new Error("Overlapping edit");t=o.offset}return e}const Un=["_id_","_key_","_type_"],$e=e=>JSON.stringify(e,null,4),ae=e=>{const n={...e};for(const s of Un)delete n[s];return $e(n)},Sn=e=>ze(e,$n(e,void 0,{tabSize:4,insertSpaces:!0})),Z=e=>{const n=[],s=On(e,n,{allowTrailingComma:!0});if(n.length)throw console.error(n),n[0];return s},_n=(e,n)=>{const s=[],t=pe.bind(null,e);return n.forEach(({path:l,value:o,options:u},a)=>{l=Array.isArray(l)?l:l.split("."),s.push(...t(l,o,u||{}))}),ze(e,s)},In=(e,n)=>{const s=URL.createObjectURL(new Blob([e])),t=document.createElement("a");t.download=n,t.href=s,t.click(),URL.revokeObjectURL(s)};function Ue(e,n,s){const t=e!==void 0,l=n!==void 0,[o,u]=b.useState(t?e:l?n:s),a=b.useRef({value:o,setValue:d=>{let c;typeof d=="function"?c=d(a.current.value):c=d,a.current.value=c,u(c)}});return[b.useMemo(()=>{const c=e!==void 0?e:o;return a.current.value=c,c},[e,o]),a.current.setValue]}(function(){const e=window.require;if(e){const n=wt();e.config({"vs/nls":{availableLanguages:{"*":n.resolvedLanguage==="zh"?"zh-cn":"en"}}})}window.monacoIsReady=new Promise((n,s)=>{if(!e)return s("Not loaded monaco loader.js");e(["vs/editor/editor.main"],function(){n(monaco)})})})();monacoIsReady.then(()=>{monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!0,trailingCommas:"warning",validate:!0})});const Nn={minimap:{enabled:!1},automaticLayout:!0},En=(e,n)=>{const{onChange:s,options:t,height:l,className:o,theme:u,style:a}=e,{t:i}=G(),[d,c]=Ue(e.language,"javascript"),[m,y]=Ue(e.value,e.defaultValue,""),[w,k]=b.useState(!1),x=b.useRef(null),T=b.useRef(null),A=b.useRef({}),L=vt(),h=b.useMemo(()=>u||(L?"vs-dark":"vs"),[u,L]);return ue.useImperativeHandle(n,()=>T.current),ue.useImperativeHandle(A,()=>({onChange:s}),[s]),b.useEffect(()=>{monacoIsReady.then(()=>{k(!0)})},[]),b.useEffect(()=>{if(w&&x.current){const v=x.current;let f;return monacoIsReady.then(()=>{f=T.current=monaco.editor.create(v,{value:m,language:d,theme:h,...Nn,...t}),f.onDidChangeModelContent(function(g){var $,_;const p=f.getValue();y(p),(_=($=A.current)==null?void 0:$.onChange)==null||_.call($,p)}),f.addCommand(monaco.KeyMod.Alt|monaco.KeyCode.KeyX,g=>{var p;(p=f.getAction("my-autoWrap-toggle"))==null||p.run()}),f.addAction({id:"my-autoWrap-toggle",label:i("msg.wordWrap"),keybindings:[monaco.KeyMod.Alt|monaco.KeyCode.KeyZ],run:function(g,p){const $=g.getOption(monaco.editor.EditorOption.wordWrap);g.updateOptions({wordWrap:$==="on"?"off":"on"})}})}),()=>{var g;(g=f==null?void 0:f.dispose)==null||g.call(f)}}},[w]),b.useEffect(()=>{T.current&&m!=T.current.getValue()&&T.current.setValue(m)},[m]),w?r.jsx("div",{className:Te(o),style:{height:l||"100%",minHeight:0,minWidth:0,boxSizing:"border-box",...a},ref:x}):r.jsx(Ee.TextArea,{style:{height:l||"100%"},className:Te(o),value:m,onChange:v=>{var g,p;const f=v.target.value;y(f),(p=(g=A.current)==null?void 0:g.onChange)==null||p.call(g,f)}})},ct=ue.forwardRef(En),Vn=e=>{const{onFinish:n,trigger:s,open:t,onOpenChange:l,modalProps:o,title:u,width:a,formRef:i,children:d,...c}=e,[m,y]=Ue(t,!1),[w]=C.useForm(),k=b.useCallback(()=>{var L;y(!1),l==null||l(!1),(L=o==null?void 0:o.onCancel)==null||L.call(o,{})},[l]),x=b.useCallback(()=>{var L;w.resetFields(),(L=o==null?void 0:o.afterClose)==null||L.call(o)},[w,o]),T=b.useMemo(()=>async function(L){await(n==null?void 0:n.apply(null,[L]))===!0&&k()},[n,k]),A=b.useMemo(()=>({...o,onCancel:k,onOk:()=>{w.submit()},afterClose:x,open:m,title:u,width:a}),[x,w,o,k,m,u,a]);return b.useEffect(()=>{if(!i)return;switch(typeof i){case"function":i(w);break;case"object":i.current=w;break}},[w,i]),r.jsxs(r.Fragment,{children:[r.jsx(Ve,{...A,children:r.jsx(C,{form:w,onFinish:T,...c,children:d})}),s&&ue.cloneElement(s,{onClick:()=>{y(!0)}})]})},ut=e=>{const{templates:n,...s}=e,{t}=G(),l=b.useRef(),o=i=>{var c,m,y;let d=i;if((c=e.initialValues)!=null&&c.value){const w=Z(e.initialValues.value);d=w.name?_n(i,[{path:"name",value:w.name}]):i}d=Sn(d),(m=l.current)==null||m.setFieldValue("value",d),(y=l.current)==null||y.validateFields()},u=i=>{const{children:d,...c}=i,{json:m,cli:y}=i;if(d)return{...c,children:d.map(u)};if(m){const{label:w}=c;return{...c,label:fe(w),title:y,onClick:()=>o(m)}}},a=n==null?void 0:n.length;return r.jsx(r.Fragment,{children:r.jsxs(Vn,{...s,formRef:l,modalProps:{destroyOnClose:!0,maskClosable:!1},children:[a?r.jsxs(z,{size:"small",style:{marginBottom:5,width:"100%",overflow:"auto"},children:[r.jsxs("span",{children:[t("terms.template"),":"]}),n.map((i,d)=>{var c;if((c=i.children)!=null&&c.length){const m={items:i.children.map(u)};return i.json?r.jsx(Oe.Button,{size:"small",onClick:()=>o(i.json),menu:m,children:fe(i.label)},d):r.jsx(Oe,{menu:m,children:r.jsx(M,{size:"small",children:r.jsxs(z,{children:[fe(i.label),r.jsx(Vt,{})]})})},d)}else return i.json?r.jsx(M,{size:"small",title:i.cli,onClick:()=>o(i.json),children:r.jsx(z,{children:fe(i.label)})},d):null})]}):null,r.jsx(C.Item,{name:"value",rules:[{required:!0,message:t("msg.require")},{validator:(i,d)=>new Promise((c,m)=>{d&&Z(d),c(null)}).catch(c=>{throw console.error(c),new Error(t("msg.formatError",{name:"JSON"}))})}],children:r.jsx(ct,{className:"g-boder",height:300,language:"json",options:{minimap:{enabled:!1}}})})]})})},ce=e=>{const{onOpenChange:n,open:s,...t}=e;let l;const o=document.createDocumentFragment(),u=xt.createRoot(o);function a({...d}){clearTimeout(l);const c=zt();l=setTimeout(()=>{document.body.append(o),u.render(r.jsx(Bt,{theme:c.getTheme(),children:r.jsx(ut,{...d})}))},100)}function i(){u.unmount(),document.body.removeChild(o)}a({...t,open:!0,onOpenChange:d=>{!d&&i()}})},dt=`{ + "services": [ + { + "name": "service-0", + "addr": ":8080", + // "interface": "eth0", + // "admission": "admission-0", + // "bypass": "bypass-0", + // "resolver": "resolver-0", + // "hosts": "hosts-0", + "handler": { + "type": "auto", + // "auth": { + // "username": "gost", + // "password": "gost" + // }, + // "auther": "auther-0", + // "retries": 1, + // "chain": "chain-0", + // "metadata": { + // "bar": "baz", + // "foo": "bar" + // } + }, + "listener": { + "type": "tcp", + // "auth": { + // "username": "user", + // "password": "pass" + // }, + // "auther": "auther-0", + // "chain": "chain-0", + // "tls": { + // "certFile": "cert.pem", + // "keyFile": "key.pem", + // "caFile": "ca.pem" + // }, + // "metadata": { + // "abc": "xyz", + // "def": 456 + // } + }, + // "forwarder": { + // "nodes": [ + // { + // "name": "target-0", + // "addr": "192.168.1.1:1234" + // }, + // { + // "name": "target-1", + // "addr": "192.168.1.2:2345" + // } + // ], + // "selector": { + // "strategy": "round", + // "maxFails": 1, + // "failTimeout": 30 + // } + // } + } + ], + "chains": [ + { + "name": "chain-0", + // "selector": { + // "strategy": "round", + // "maxFails": 1, + // "failTimeout": 30 + // }, + "hops": [ + { + "name": "hop-0", + // "interface": "192.168.1.2", + // "selector": { + // "strategy": "rand", + // "maxFails": 3, + // "failTimeout": 60 + // }, + // "bypass": "bypass-0", + "nodes": [ + { + "name": "node-0", + "addr": ":1080", + // "interface": "eth1", + // "bypass": "bypass-0", + "connector": { + "type": "socks5", + "auth": { + "username": "user", + "password": "pass" + }, + // "metadata": { + // "foo": "bar" + // } + }, + "dialer": { + "type": "tcp", + // "auth": { + // "username": "user", + // "password": "pass" + // }, + // "tls": { + // "caFile": "ca.pem", + // "secure": true, + // "serverName": "example.com" + // }, + // "metadata": { + // "bar": "baz" + // } + } + } + ] + } + ] + } + ], + "authers": [ + { + "name": "auther-0", + "auths": [ + { + "username": "user1", + "password": "pass1" + }, + { + "username": "user2", + "password": "pass2" + } + ] + } + ], + "admissions": [ + { + "name": "admission-0", + "whitelist": false, + "matchers": [ + "127.0.0.1", + "192.168.0.0/16" + ] + } + ], + "bypasses": [ + { + "name": "bypass-0", + "whitelist": false, + "matchers": [ + "*.example.com", + ".example.org", + "0.0.0.0/8" + ] + } + ], + "resolvers": [ + { + "name": "resolver-0", + "nameservers": [ + { + "addr": "udp://8.8.8.8:53", + "chain": "chain-0", + "prefer": "ipv4", + "clientIP": "1.2.3.4", + "ttl": 60, + "timeout": 30 + }, + { + "addr": "tcp://1.1.1.1:53" + }, + { + "addr": "tls://1.1.1.1:853" + }, + { + "addr": "https://1.0.0.1/dns-query", + "hostname": "cloudflare-dns.com" + } + ] + } + ], + "hosts": [ + { + "name": "hosts-0", + "mappings": [ + { + "ip": "127.0.0.1", + "hostname": "localhost" + }, + { + "ip": "192.168.1.10", + "hostname": "foo.mydomain.org", + "aliases": [ + "foo" + ] + }, + { + "ip": "192.168.1.13", + "hostname": "bar.mydomain.org", + "aliases": [ + "bar", + "baz" + ] + } + ] + } + ], + "tls": { + "certFile": "cert.pem", + "keyFile": "key.pem", + "caFile": "ca.pem" + }, + "log": { + "output": "stderr", + "level": "debug", + "format": "json", + "rotation": { + "maxSize": 100, + "maxAge": 10, + "maxBackups": 3, + "localTime": false, + "compress": false + } + }, + "profiling": { + "addr": ":6060", + "enabled": true + }, + "api": { + "addr": ":18080", + "pathPrefix": "/api", + "accesslog": true, + "auth": { + "username": "user", + "password": "password" + }, + "auther": "auther-0" + }, + "metrics": { + "addr": ":9000", + "path": "/metrics" + } +}`,zn={en:"Default",zh:"默认"},Bn={admissions:"https://gost.run/concepts/admission/",authers:"https://gost.run/concepts/auth/",bypasses:"https://gost.run/concepts/bypass/",chains:"https://gost.run/concepts/chain/",hops:"https://gost.run/concepts/hop/",hosts:"https://gost.run/concepts/hosts/",ingresses:"https://gost.run/concepts/ingress/",observers:"https://gost.run/concepts/observer/",resolvers:"https://gost.run/concepts/resolver/",limiters:"https://gost.run/concepts/limiter/",rlimiter:"https://gost.run/concepts/limiter/",climiter:"https://gost.run/concepts/limiter/",routers:"https://gost.run/concepts/router/",sds:"https://gost.run/concepts/sd/",services:"https://gost.run/concepts/service/"},Fn=[],He=Ln(dt,Fn,{allowTrailingComma:!0}),Mn=e=>{if(!He)return;const n=An(He,[e,0]);if(n){const{offset:s,length:t}=n;return dt.substring(s,s+t)}},N=(e,n=zn)=>{const s=Mn(e),t=Bn[e],l="// "+t+` +`;let o;return s&&(o={label:n,json:l+s}),{def:o,docUrl:t,_docUrl:l}},Rn=e=>`{ + "name": "${e}-0", + "file": { + "path": "/path/to/file" + } + }`,Dn=(e,n)=>`{ + "name": "${e}-0", + "redis": { + "addr": "127.0.0.1:6379", + "db": "1", + "password": "123456", + ${n?`"type": "${n}",`:""} + "key": "gost:${e}-0" + } + }`,Pn=e=>`{ + "name": "${e}-0", + "http": { + "url": "http://127.0.0.1:8000", + "timeout": "10s" + } + }`,ft=e=>`{ + "name": "${e}-0", + "plugin": { + "type": "grpc", + // "type": "http", + "addr": "127.0.0.1:8000", + "token": "gost", + // "tls": {} + } + }`,J=(e,n="",s)=>{const t=n?`// ${n} +`:"";return[{label:"File",json:t+Rn(e)},{label:"Redis",json:t+Dn(e,s==null?void 0:s.redisType)},{label:"HTTP",json:t+Pn(e)},{label:"Plugin",json:t+ft(e)}]},{def:Je,docUrl:Hn,_docUrl:Jn}=N("admissions"),Wn=[Je||{label:{zh:"内联",en:"Inline"},json:Jn+` + { + "name": "admission-0", + "matchers": [ + "127.0.0.1", + "192.168.0.0/16", + "example.com" + ] + }`},...J("admission",Hn)],{def:qn,docUrl:Gn}=N("authers"),Qn=[qn,...J("auther",Gn)],{def:Xn,docUrl:qs,_docUrl:Zn}=N("chains"),Yn=[Xn,{label:{zh:"典型转发链",en:"Typical"},cli:"",json:Zn+` +{ + "name": "chain-0", + "hops": [ + { + "name": "hop-0", + "nodes": [ + { + "name": "node-0", + "addr": "proxy.xxx.com:1080", + "connector": { + "type": "socks5", + "auth": { + "username": "username", + "password": "password" + } + }, + "dialer": { + "type": "tcp", + "tls": { + "serverName": "proxy.xxx.com" + } + } + } + ] + } + ] +} + `}],{def:We,docUrl:Kn,_docUrl:Cn}=N("bypasses"),es=[We||{label:{zh:"内联",en:"Inline"},json:Cn+` + { + "name": "bypass-0", + "matchers": [ + "127.0.0.1", + "172.10.0.0/16", + "localhost", + "*.example.com", + ".example.org" + ] + }`},...J("bypass",Kn)],{def:qe,docUrl:ts,_docUrl:ns}=N("hops"),ss=[qe||{label:{zh:"内联",en:"Inline"},json:ns+` + { + "name": "hop-0", + "nodes": [ + { + "name": "node-0", + "addr": ":8888", + "connector": { + "type": "http" + }, + "dialer": { + "type": "tcp" + } + }, + { + "name": "node-1", + "addr": ":9999", + "connector": { + "type": "socks5" + }, + "dialer": { + "type": "tcp" + } + } + ] + }`},...J("hop",ts)],{def:Ge,docUrl:ls,_docUrl:rs}=N("hosts"),os=[Ge||{label:{zh:"内联",en:"Inline"},json:rs+` +{ + "name": "hosts-0", + "mappings": [ + { + "ip": "127.0.0.1", + "hostname": "example.com" + }, + { + "ip": "2001:db8::1", + "hostname": "example.com" + } + ] +}`},...J("hosts",ls)],{def:Qe,docUrl:is,_docUrl:as}=N("ingresses"),cs=[Qe||{label:{zh:"内联",en:"Inline"},json:as+`{ + "name": "ingress-0", + "rules": [ + { + "hostname": "example.com", + "endpoint": "4d21094e-b74c-4916-86c1-d9fa36ea677b" + }, + { + "hostname": "example.org", + "endpoint": "ac74d9dd-3125-442a-a7c1-f9e49e05faca" + } + ] + }`},...J("ingress",is,{redisType:"hash"})],{def:Xe,docUrl:us,_docUrl:ds}=N("routers"),fs=[Xe||{label:{zh:"内联",en:"Inline"},json:ds+` + { + "name": "router-0", + "routes": [ + { + "net": "192.168.1.0/24", + "gateway": "192.168.123.2" + }, + { + "net": "172.10.0.0/16", + "gateway": "192.168.123.3" + } + ] + }`},...J("router",us)],{def:ms,docUrl:Gs,_docUrl:he}=N("services"),D=(e,n,s)=>{let t=he+` + { + "name": "service-0", + "addr": ":1080", + "handler": { + "type": "${e}", + // "auth": { + // "username": "user", + // "password": "password" + // } + }, + "listener": { + "type": "${n}" + } + }`;if(s){const l=pe(t,["metadata"],s,{});l.push(...pe(t,["handler","metadata"],s,{})),l.push(...pe(t,["listener","metadata"],s,{})),t=ze(t,l)}return t},ps=[ms,{label:{zh:"端口转发",en:"Port Forwarding"},cli:"-L tcp://:80/:8080",json:he+` + { + "name": "service-0", + "addr": ":80", + "handler": { + "type": "tcp" + }, + "listener": { + "type": "tcp" + }, + "forwarder": { + "nodes": [ + { + "name": "target-0", + "addr": ":8080" + } + ] + } + }`},{label:{zh:"反向代理",en:"Reverse Proxy"},cli:"",json:he+` + { + "name": "service-0", + "addr": ":80", + "handler": { + "type": "tcp", + "metadata": { + "sniffing": "true" + } + }, + "listener": { + "type": "tcp" + }, + "forwarder": { + "nodes": [ + { + "name": "target-1", + "addr": "www.baidu.com:80", + // "host": "myhost.com", + // "path": "/" + "http": { + "host": "www.baidu.com" + } + } + ] + } + }`},{label:{zh:"代理服务",en:"Proxy Service"},children:[{label:"http",children:[{label:"http",json:D("http","tcp")},{label:"https(http+tsl)",json:D("http","tls")},{label:"http+wss",json:D("http","wss")},{label:"http2",json:D("http2","http2")}]},{label:"relay",children:[{label:"relay+tcp",json:D("relay","tcp")},{label:"relay+tls",json:D("relay","tls")},{label:"relay+wss",json:D("relay","tls")}]},{label:"socks",children:[{label:"socks4",json:D("socks","tcp")},{label:"socks5",json:D("socks5","tcp")},{label:"socks5(udp)",json:D("socks5","tcp",{udp:"true"})},{label:"socks5+tls",json:D("socks5","tls",{notls:"true"})}]}]},{label:{zh:"代理转发",en:"Porxy Forwarding"},cli:"-L socks5://:1080 -F socks5://xxx.com:1080",json:he+` + { + "name": "service-0", + "addr": ":1080", + "handler": { + "type": "socks5", + "chain": "chain-0" + }, + "listener": { + "type": "tcp" + } + }`}],{def:Ze,docUrl:hs,_docUrl:gs}=N("climiter"),bs=[Ze||{label:{zh:"内联",en:"Inline"},json:gs+` + { + "name": "climiter-0", + "limits": [ + "$ 1000", + "$$ 100", + "192.168.1.1 10" + ] + }`},...J("climiter",hs,{redisType:"set"})],{def:Ye,docUrl:ys,_docUrl:ks}=N("limiters"),js=[Ye||{label:{zh:"内联",en:"Inline"},json:ks+` + { + "name": "limiter-0", + "limits": [ + "$ 100MB 100MB", + "$$ 10MB", + "192.168.1.1 512KB 1MB", + "192.168.0.0/16 1MB 5MB" + ] + }`},...J("limiters",ys,{redisType:"set"})],{def:Ke,docUrl:ws,_docUrl:vs}=N("rlimiter"),xs=[Ke||{label:{zh:"内联",en:"Inline"},json:vs+` + { + "name": "rlimiter-0", + "limits": [ + "$ 100", + "$$ 10", + "192.168.1.1 50", + "192.168.0.0/16 5" + ] + }`},...J("rlimiter",ws,{redisType:"set"})],{def:Ts,docUrl:Qs,_docUrl:Os}=N("resolvers"),Ls=[Ts,{label:"Plugin",json:Os+ft("resolver")}],{def:Ce,docUrl:Xs,_docUrl:As}=N("sds"),$s=[Ce||{label:"HTTP Plugin",json:As+` + // https://gost.run/concepts/sd/ + { + "name": "sd-0", + "plugin": { + "type": "http", + "addr": "http://127.0.0.1:8000/sd", + // "token": "gost", + // "tls": {} + } + }`}],{def:et,docUrl:Zs,_docUrl:Us}=N("observers"),Ss=[et||{label:"Plugin",json:Us+` + { + "name": "observer-0", + "plugin": { + "type": "grpc", + // "type": "http", + "addr": "127.0.0.1:8000", + "token": "gost", + // "tls": {} + } + }`}],_s={admissions:Wn,authers:Qn,bypasses:es,chains:Yn,climiters:bs,limiters:js,rlimiters:xs,hops:ss,hosts:os,ingresses:cs,resolvers:Ls,routers:fs,sds:$s,observers:Ss,services:ps},mt=e=>{const{name:n}=e;return b.useMemo(()=>_s[n],[n])},pt=e=>{const{name:n,localApi:s,gostConfig:t,localConfig:l}=e,o=b.useMemo(()=>(t==null?void 0:t[n])||[],[t,n]),u=b.useMemo(()=>s?(l==null?void 0:l[n])||[]:[],[l,n,s]),a=b.useMemo(()=>[...o,...u],[o,u]);return{dataList:o,dataSource:a}},le=ue.createContext({}),tt=(e,n,s)=>JSON.stringify(n),Is=(e,n)=>{var s,t;return((t=(s=e==null?void 0:e.name)==null?void 0:s.toLowerCase())==null?void 0:t.indexOf(n))!==-1},Ns=e=>{const{name:n,title:s,api:t,localApi:l,keyName:o,rowKey:u="name",keyword:a,renderConfig:i=tt,filter:d=Is}=e,{t:c}=G(),{localList:m,comm:y}=b.useContext(Ie),{gostConfig:w,localConfig:k}=b.useContext(se),{dataList:x,dataSource:T}=pt({localApi:l,name:o,gostConfig:w,localConfig:k}),A=mt({name:o});Ft.useApp();const{deleteValue:L,updateValue:h,disable:v,enable:f,updateLocal:g,deleteLocal:p,addValue:$}=y,_=b.useRef({dataList:x,dataSource:T});b.useImperativeHandle(_,()=>({dataList:x,dataSource:T}),[x,T]);const Q=b.useMemo(()=>a?T.filter(S=>d(S,a)):T,[T,d,a]);return b.useEffect(()=>{function S({path:j,record:O}){const{dataList:W,dataSource:B}=_.current,q=W.includes(O),R=O.name,X=j.split(","),yt=X.reduce((Y,re)=>Y==null?void 0:Y[re],O),kt=Y=>{let re=O;X.forEach((Be,jt)=>{jt===X.length-1?re[Be]=Y:re=re[Be]})};ce({title:c("base.cmd.edit"),initialValues:{value:ae(yt)},onFinish:async Y=>(kt(Z(Y.value)),q?await h(R,O):await g(R,O),!0)})}return I.on(`edit:${n}`,S),()=>{I.off(`edit:${n}`,S)}},[]),r.jsx("div",{style:{height:348,overflow:"auto"},children:r.jsx(Mt,{rowKey:S=>S._id_||S.name,scroll:{y:290},size:"small",dataSource:Q,columns:[{title:c("base.form.name"),dataIndex:u,ellipsis:!0,width:100},{title:c("base.form.details"),ellipsis:!0,render:(S,j,O)=>{const B=x.includes(j)?R=>h(j.name,R||j):R=>g(j.name,R||j);let q;try{q=i(S,j,O)}catch{q=tt(S,j)}return r.jsx(le.Provider,{value:{update:B},children:q})}},{title:c("base.cmd.controls"),width:l?120:90,align:"right",dataIndex:u,render:(S,j,O)=>{const W=x.includes(j),B={...j};return delete B.status,r.jsxs(z,{size:2,children:[l?W?r.jsx(M,{title:c("base.cmd.disable"),icon:r.jsx(lt,{style:{color:Rt.primary}}),type:"link",size:"small",onClick:async()=>{await v(j)}}):r.jsx(M,{title:c("base.cmd.enabled"),type:"link",icon:r.jsx(yn,{style:{color:Dt.primary}}),size:"small",onClick:async()=>{await f(j)}}):null,r.jsx(M,{title:c("base.cmd.edit"),icon:r.jsx(Pt,{}),type:"link",size:"small",onClick:()=>{ce({title:c("title.edit",{name:S||""}),templates:A,initialValues:{value:ae(B)},onFinish:async q=>{const{value:R}=q,X=Z(R);return W?await h(j.name,X):await g(j.name,{...B,...X}),!0}})}}),r.jsx(M,{title:c("base.cmd.copy"),icon:r.jsx(Ht,{}),type:"link",size:"small",onClick:()=>{ce({title:c("title.copied",{name:S||""}),templates:A,initialValues:{value:ae(B)},onFinish:async q=>{const{value:R}=q,X=Z(R);return await y.addValue(X),!0}})}}),r.jsx(Jt,{title:c("text.warn"),description:c("text.deleteing"),onConfirm:()=>{W?L(j):p(j)},children:r.jsx(M,{title:c("base.cmd.del"),icon:r.jsx(Wt,{}),type:"link",size:"small"})})]})}}],pagination:!1})})},Es=e=>{const{t:n}=G(),{keyName:s,title:t}=e,{comm:l}=b.useContext(Ie),o=mt({name:s});return r.jsx(ut,{title:n("title.add",{name:t}),templates:o,trigger:r.jsx(M,{icon:r.jsx(qt,{}),size:"small"}),onFinish:async u=>{const{value:a}=u,i=Z(a);return await l.addValue(i),!0}})},E=e=>({keyName:e,api:Tt[e],localApi:Ot[e],rowKey:"name"}),Vs=[{name:"admission",title:"准入控制器(Admission)",subTitle:"准入控制器",...E("admissions")},{name:"auther",title:"认证器(Auther)",subTitle:"认证器",...E("authers")},{name:"bypass",title:"分流器(Bypass)",subTitle:"分流器",...E("bypasses")},{name:"chain",title:"转发链(Chain)",subTitle:"转发链",...E("chains")},{name:"climiter",title:"并发连接数限制",subTitle:"",...E("climiters")},{name:"limiter",title:"流量速率限制",subTitle:"",...E("limiters")},{name:"rlimiter",title:"请求速率限制",subTitle:"",...E("rlimiters")},{name:"hop",title:"跳跃点(Hop)",subTitle:"跳跃点",...E("hops")},{name:"host",title:"主机映射器(Hosts)",subTitle:"主机映射器",...E("hosts")},{name:"ingress",title:"Ingress",subTitle:"Ingress",...E("ingresses")},{name:"resolver",title:"域名解析器(Resolver)",subTitle:"域名解析器",...E("resolvers")},{name:"service",title:"服务(Service)",subTitle:"服务",...E("services")},{name:"sd",title:"服务发现(SD)",subTitle:"服务发现",...E("sds")},{name:"observer",title:"观测器(Observer)",subTitle:"观测器",...E("observers")}],zs=e=>Vs.find(n=>n.name===e),Se=e=>{const{boxShadow:n,className:s,...t}=e,l=Te(s,{"antd-cord-boxShadow":n});return r.jsx(Gt,{className:l,...t})},V=e=>{const{t:n}=G(),{title:s,subTitle:t,name:l,keyName:o,api:u,boxShadow:a=!0,bordered:i=!1,rowKey:d="name",renderConfig:c,localApi:m,filter:y}=b.useMemo(()=>({...zs(e.module||""),title:n(`modules.${e.module}.title`),subTitle:n(`modules.${e.module}.subTitle`),...e}),[e]),[w,k]=b.useState(""),x={title:t||"",keyword:w,name:l,api:u,keyName:o,rowKey:d,localApi:m,renderConfig:c,filter:y},{gostConfig:T,localConfig:A}=b.useContext(se),{dataSource:L}=pt({localApi:m,name:o,gostConfig:T,localConfig:A}),h=b.useMemo(()=>{const v=async f=>{await u.post(f)};return{updateValue:async(f,g,p=!0)=>{await u.put(f,g),p&&I.emit("apiUpdate",!0)},deleteValue:async(f,g=!0)=>{await u.delete(f.name),g&&I.emit("apiUpdate",!0)},addValue:async(f,g=!0)=>{let p=f.name||`${l}-0`;const $=()=>L==null?void 0:L.find(_=>_.name===p);if($()&&!await new Promise((Q,S)=>{Ve.confirm({title:n("msg.invalidName"),content:n("msg.autofixName"),zIndex:2e3,onOk:()=>Q(!0),onCancel:()=>Q(!1)})}))throw!1;for(;$();)p=p.replace(/\d*$/,_=>String(_==""?"-0":Number(_)+1));await v({...f,name:p}),f.name!==p&&Qt.info({description:n("msg.fixName",{name:p}),message:n("msg.autofix")}),g&&I.emit("apiUpdate",!0)},disable:async f=>{m&&(await u.delete(f.name),await m.add(f),I.emit("update",!0))},enable:async f=>{m&&(await u.post(f),await m.delete(f.name),I.emit("update",!0))},updateLocal:async(f,g)=>{m&&(await m.put(f,{...g,name:f}),I.emit("localUpdate"))},deleteLocal:async f=>{m&&(await m.delete(f.name),I.emit("localUpdate"))}}},[u,L,m,l]);return b.useEffect(()=>Lt(l,h),[h,l]),r.jsx(Ie.Provider,{value:{name:l,comm:h},children:r.jsx(Se,{boxShadow:a,bordered:i,title:s,extra:r.jsxs(z,{children:[r.jsx(Ee.Search,{allowClear:!0,onChange:v=>{const f=v.target.value;k(f)},size:"small"}),r.jsx(Es,{...x})]}),children:r.jsx(Ns,{...x})})})},Bs=e=>{const{name:n,addr:s,connector:{type:t,metadata:l}={},dialer:{type:o}={}}=e,u=l?At.stringify(l):"";return r.jsxs(z,{children:[(t||o)&&r.jsx(H,{color:"#87d068",children:`${t}${o?"+"+o:""}`}),r.jsx(H,{color:"green",children:s}),u&&r.jsx(H,{color:"purple",title:"_metadata",children:"metadata"})]})},_e=({node:e,upjson:n,isLink:s=!1})=>{const{t}=G(),{name:l}=e,{update:o}=b.useContext(le);return r.jsx(ie,{color:"#ddffbf",title:r.jsx(Bs,{...e}),children:r.jsx(H,{bordered:!1,color:"green",className:"editor-json",title:t("text.doubleClickEdit"),onDoubleClick:()=>{n&&ce({title:t("base.cmd.edit"),initialValues:{value:ae(e)},onFinish:async u=>(n(Z(u.value)),o(),!0)})},children:l})})},ht=e=>{var u;let n=e,s=!1;const{gostConfig:t,localConfig:l}=b.useContext(se);if(!n.nodes){const a=[...(t==null?void 0:t.hops)||[],...(l==null?void 0:l.hops)||[]].find(i=>i.name===n.name);a&&(s=!0,n=a)}const{nodes:o}=n;if(!o||(o==null?void 0:o.length)<=0)return`[${e.name}(noNodes)]`;if(s){const a=(u=t==null?void 0:t.hops)==null?void 0:u.includes(n),i=n.name;return r.jsx(le.Provider,{value:{update:async d=>{const c=await Ne("hop");return(a?y=>c.updateValue(i,y||n):y=>c.updateLocal(i,y||n))(d)}},children:r.jsx(z,{size:5,children:o.map((d,c)=>r.jsx(_e,{node:d,isLink:!0,upjson:m=>o[c]=m},c))})})}return r.jsx(z,{size:5,children:o.map((a,i)=>r.jsx(_e,{node:a,upjson:d=>o[i]=d},a.name+i))})};function Fs(e){const{update:n}=b.useContext(le),{t:s}=G();return r.jsx(z,{size:5,children:e.hops.map((t,l)=>{const o=r.jsx(ht,{...t});return r.jsx(ie,{title:o,color:"#c7e7ff",arrow:!1,children:r.jsx(H,{bordered:!1,color:"blue",className:"editor-json",title:s("text.doubleClickEdit"),onDoubleClick:()=>{ce({title:s("base.cmd.edit"),initialValues:{value:ae(t)},onFinish:async u=>(e.hops[l]=Z(u.value),n(),!0)})},children:t.name})},t.name+l)}).reduce((t,l,o)=>(t.length>0&&t.push(r.jsx(Xt,{style:{color:"blue",fontSize:12}},"_sp_"+o)),t.push(l),t),[])})}function gt(e){const{hops:n}=e;return r.jsx(Fs,{hops:n,root:e})}const Ms=e=>{b.useContext(se);const n={module:"chain",renderConfig:(s,t,l)=>r.jsx(gt,{...t})};return r.jsx(V,{...n})},bt=(e,n)=>{const{gostConfig:s,localConfig:t}=b.useContext(se),l=b.useMemo(()=>{var a;return(a=s==null?void 0:s[n])==null?void 0:a.find(i=>i.name===e)},[s,e,n]),o=b.useMemo(()=>{var a;return(a=t==null?void 0:t[n])==null?void 0:a.find(i=>i.name===e)},[t,e,n]);return[l??o,!!l]},Rs=e=>{const[n,s]=bt(e.name,"hops");let t=e,l=!1;t.nodes||(t=n,l=!!n);const{nodes:o}=t;if(!o||(o==null?void 0:o.length)<=0)return`[${e.name}(noNodes)]`;const u=r.jsx(z,{size:5,children:o.map((a,i)=>r.jsx(_e,{node:a,upjson:d=>o[i]=d},a.name+i))});if(l){const a=t.name;return r.jsx(le.Provider,{value:{update:async i=>{const d=await Ne("hop");return(s?m=>d.updateValue(a,m||t):m=>d.updateLocal(a,m||t))(i)}},children:u})}return u},nt=e=>{const[n,s]=bt(e.chainName,"chains");if(!n)return"[no chain]";const t=e.chainName;return r.jsx(le.Provider,{value:{update:async l=>{const o=await Ne("chain");return(s?a=>o.updateValue(t,a||n):a=>o.updateLocal(t,a||n))(l)}},children:r.jsx(gt,{...n})})},Ds=e=>{const{name:n,addr:s,handler:t,listener:l,forwarder:o}=e,{t:u}=G(),a=b.useMemo(()=>{const i=t==null?void 0:t.type,d=l==null?void 0:l.type;return i===d?i:`${i}+${d}`},[t,l]);return r.jsxs(z,{children:[r.jsx(H,{color:"#87d068",children:a}),r.jsx(H,{color:"green",children:s}),t.chain&&r.jsx(ie,{title:r.jsx(nt,{chainName:t.chain}),color:"#c7e7ff",arrow:!1,children:r.jsx(H,{children:u("modules.chain.subTitle")})}),l.chain&&r.jsx(ie,{title:r.jsx(nt,{chainName:l.chain}),color:"#fff0d7",arrow:!1,children:r.jsx(H,{color:"orange",children:u("terms.key0")})}),o&&r.jsx(ie,{title:r.jsx(Rs,{...o}),color:"#c7e7ff",arrow:!1,children:r.jsx(H,{children:u("terms.forwarder")})})]})},Ps=e=>{const{colSpan:n}=e;st();const s={module:"service",renderConfig:(t,l,o)=>r.jsx(Ds,{...l}),filter:(t,l)=>{const{name:o,addr:u,handler:a,listener:i}=t;function d(c){const m=c==null?void 0:c.toLowerCase();return m?m.indexOf(l)!==-1:!1}return d(o)||d(u)||d(a==null?void 0:a.type)||d(i==null?void 0:i.type)}};return r.jsx(U,{...n,xxl:16,children:r.jsx(V,{...s})})},Hs=e=>r.jsx(V,{module:"hop",renderConfig:(n,s,t)=>r.jsx(ht,{...s})}),P={xs:24,sm:24,md:12,lg:12,xl:12,xxl:8},xe={sm:24,xxl:8},Ys=()=>{const{isLoading:e}=b.useContext(se),n=me(),{t:s}=G(),t=st(),[l,o]=b.useState(!1),[u,a]=b.useState(!1),[i,d]=b.useState(!0),[c,m]=b.useState([]),y=b.useRef({});b.useEffect(()=>{$t().then(k=>k.sort((x,T)=>{const A=x.time||0;return(T.time||0)-A})).then(k=>m(k.map(x=>({key:x.addr,label:r.jsx("a",{href:`./?use=${x.addr}`,children:x.addr})}))))},[n.addr]),b.useEffect(()=>{Ut().then(T=>{T&&I.emit("update",!1)});const k=y.current.onSave=async()=>{try{a(!0);const{saveFormat:T,savePath:A}=me.get()||{};await St(T,A),d(!0)}finally{a(!1)}},x=(T=!1)=>{var A;if(T&&d(!1),!(!((A=me.get())!=null&&A.autoSave)||!T))return k()};return I.on("update",x),I.on("apiUpdate",x),()=>{I.off("update",x),I.off("apiUpdate",x)}},[]);const w=b.useMemo(()=>{const k=[];return c.length&&(k.push({key:"2",label:s("manage.cmd.switch"),children:c}),k.push({type:"divider"})),k.push({key:"new",label:s("manage.cmd.new"),onClick:()=>{window.open(location.href,void 0,"noopener")}}),k},[c,s]);return r.jsxs(ke,{style:{height:"100vh",overflow:"hidden"},children:[r.jsxs(ke.Header,{style:{color:"#FFF",paddingInline:20},children:[r.jsxs(je,{align:"middle",justify:"space-between",wrap:!1,children:[r.jsx(U,{color:"",children:r.jsx(M,{type:"link",loading:e,icon:r.jsx(Zt,{}),onClick:async()=>{I.emit("update")},children:s("manage.cmd.reload")})}),r.jsx(U,{children:n.addr}),r.jsx(U,{children:r.jsxs(z,{children:[r.jsxs(z.Compact,{children:[r.jsx(M,{icon:i?r.jsx(lt,{}):r.jsx(an,{}),loading:u,onClick:()=>{var k,x;return(x=(k=y.current)==null?void 0:k.onSave)==null?void 0:x.call(k)},children:s("manage.cmd.save")}),r.jsx(M,{icon:r.jsx(mn,{}),onClick:()=>o(!0)})]}),r.jsx(M,{icon:r.jsx(Yt,{}),onClick:()=>{In($e(t),"gost.json")},children:s("manage.cmd.download")}),r.jsx(Oe.Button,{menu:{activeKey:n.addr,items:w},onClick:_t,children:s("manage.cmd.logout")}),r.jsx(It,{}),r.jsx(Nt,{})]})})]}),r.jsx(Ve,{destroyOnClose:!0,open:l,onCancel:()=>o(!1),footer:!1,children:r.jsxs(C,{initialValues:n,layout:"horizontal",labelCol:{span:4},onValuesChange:(k,x)=>{Object.assign(n,k),me.set(n),n.isLocal&&Et(n.addr,n)},children:[r.jsx(C.Item,{name:"autoSave",label:s("manage.label.autoSave"),valuePropName:"checked",children:r.jsx(Kt,{})}),r.jsx(C.Item,{name:"saveFormat",label:s("manage.label.format"),initialValue:"json",children:r.jsxs(we.Group,{optionType:"button",buttonStyle:"solid",children:[r.jsx(we,{value:"json",children:"json"}),r.jsx(we,{value:"yaml",children:"yaml"})]})}),r.jsx(C.Item,{name:"savePath",label:s("manage.label.path"),trigger:"onChange",children:r.jsx(Ee,{placeholder:s("placeholder.savePath")})})]})})]}),r.jsx(ke.Content,{style:{height:"100%",padding:16,boxSizing:"border-box",overflow:"auto"},children:r.jsxs(je,{gutter:[16,16],style:{overflow:"hidden"},children:[r.jsx(Ps,{colSpan:P}),r.jsx(U,{...P,children:r.jsx(Ms,{})}),r.jsx(U,{...P,children:r.jsx(Hs,{})}),r.jsx(U,{...P,children:r.jsx(V,{module:"auther"})}),r.jsx(U,{...P,children:r.jsx(V,{module:"admission"})}),r.jsx(U,{...P,children:r.jsx(V,{module:"bypass"})}),r.jsx(U,{...P,children:r.jsx(V,{module:"host"})}),r.jsx(U,{...P,children:r.jsx(V,{module:"ingress"})}),r.jsx(U,{...P,children:r.jsx(V,{module:"resolver"})}),r.jsx(U,{...P,children:r.jsx(V,{module:"sd"})}),r.jsx(U,{...P,children:r.jsx(V,{module:"observer"})}),r.jsx(U,{span:24,children:r.jsx(Se,{boxShadow:!0,title:s("manage.label.limit"),children:r.jsxs(je,{gutter:[16,16],children:[r.jsx(U,{...xe,children:r.jsx(V,{module:"limiter",bordered:!0,boxShadow:!1})}),r.jsx(U,{...xe,children:r.jsx(V,{module:"rlimiter",bordered:!0,boxShadow:!1})}),r.jsx(U,{...xe,children:r.jsx(V,{module:"climiter",bordered:!0,boxShadow:!1})})]})})}),r.jsx(U,{span:24,children:r.jsx(Se,{boxShadow:!0,title:s("manage.label.allConfig"),styles:{body:{padding:20}},children:r.jsx(ct,{className:"g-boder",value:$e(t),height:500,language:"json",options:{minimap:{enabled:!1},readOnly:!0}})})})]})})]})};export{Ys as default}; diff --git a/assets/Manage-d63824ea.js b/assets/Manage-d63824ea.js deleted file mode 100644 index 2d63539..0000000 --- a/assets/Manage-d63824ea.js +++ /dev/null @@ -1,508 +0,0 @@ -import{g as wt,u as G,a as vt,j as r,b as me,c as xt,C as Ne,d as fe,e as V,A as Tt,L as Ot,f as Lt,q as At,h as Ee,i as Te,k as re,l as $t,m as Ut,s as St,n as _t,o as It,T as Nt,p as Et,r as Vt,t as zt}from"./index-9222c400.js";import{r as b,A as be,_ as ye,f as ue,j as Oe,I as Ve,d as C,M as ze,S as z,k as Le,B as M,l as Bt,n as Ft,h as Mt,i as Rt,T as Dt,o as Pt,p as Ht,E as Jt,q as Wt,P as qt,D as Gt,s as Qt,u as Xt,v as Zt,w as ie,x as H,y as Yt,C as U,L as ke,R as je,z as Kt,G as Ct,H as en,J as we}from"./antd-15fa66a0.js";var tn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};const nn=tn;var sn=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:nn}))},ln=b.forwardRef(sn);const lt=ln;var rn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"};const on=rn;var an=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:on}))},cn=b.forwardRef(an);const un=cn;var dn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const fn=dn;var mn=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:fn}))},pn=b.forwardRef(mn);const hn=pn;var gn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};const bn=gn;var yn=function(n,s){return b.createElement(be,ye({},n,{ref:s,icon:bn}))},kn=b.forwardRef(yn);const jn=kn;function rt(e,n=!1){const s=e.length;let t=0,l="",o=0,u=16,a=0,i=0,d=0,c=0,m=0;function y(h,v){let f=0,g=0;for(;f=48&&p<=57)g=g*16+p-48;else if(p>=65&&p<=70)g=g*16+p-65+10;else if(p>=97&&p<=102)g=g*16+p-97+10;else break;t++,f++}return f=s){h+=e.substring(v,t),m=2;break}const f=e.charCodeAt(t);if(f===34){h+=e.substring(v,t),t++;break}if(f===92){if(h+=e.substring(v,t),t++,t>=s){m=2;break}switch(e.charCodeAt(t++)){case 34:h+='"';break;case 92:h+="\\";break;case 47:h+="/";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+=` -`;break;case 114:h+="\r";break;case 116:h+=" ";break;case 117:const p=y(4,!0);p>=0?h+=String.fromCharCode(p):m=4;break;default:m=5}v=t;continue}if(f>=0&&f<=31)if(oe(f)){h+=e.substring(v,t),m=2;break}else m=6;t++}return h}function T(){if(l="",m=0,o=t,i=a,c=d,t>=s)return o=s,u=17;let h=e.charCodeAt(t);if(ve(h)){do t++,l+=String.fromCharCode(h),h=e.charCodeAt(t);while(ve(h));return u=15}if(oe(h))return t++,l+=String.fromCharCode(h),h===13&&e.charCodeAt(t)===10&&(t++,l+=` -`),a++,d=t,u=14;switch(h){case 123:return t++,u=1;case 125:return t++,u=2;case 91:return t++,u=3;case 93:return t++,u=4;case 58:return t++,u=6;case 44:return t++,u=5;case 34:return t++,l=x(),u=10;case 47:const v=t-1;if(e.charCodeAt(t+1)===47){for(t+=2;t=12&&h<=15);return h}return{setPosition:w,getPosition:()=>t,scan:n?O:T,getToken:()=>u,getTokenValue:()=>l,getTokenOffset:()=>o,getTokenLength:()=>t-o,getTokenStartLine:()=>i,getTokenStartCharacter:()=>o-c,getTokenError:()=>m}}function ve(e){return e===32||e===9}function oe(e){return e===10||e===13}function ee(e){return e>=48&&e<=57}var Me;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Me||(Me={}));const F=new Array(20).fill(0).map((e,n)=>" ".repeat(n)),te=200,Re={" ":{"\n":new Array(te).fill(0).map((e,n)=>` -`+" ".repeat(n)),"\r":new Array(te).fill(0).map((e,n)=>"\r"+" ".repeat(n)),"\r\n":new Array(te).fill(0).map((e,n)=>`\r -`+" ".repeat(n))}," ":{"\n":new Array(te).fill(0).map((e,n)=>` -`+" ".repeat(n)),"\r":new Array(te).fill(0).map((e,n)=>"\r"+" ".repeat(n)),"\r\n":new Array(te).fill(0).map((e,n)=>`\r -`+" ".repeat(n))}},wn=[` -`,"\r",`\r -`];function ot(e,n,s){let t,l,o,u,a;if(n){for(u=n.offset,a=u+n.length,o=u;o>0&&!ge(e,o-1);)o--;let f=a;for(;f1)return ne(i,c)+ne(y,t+m);const f=y.length*(t+m);return!d||f>Re[w][i].length?i+ne(y,t+m):f<=0?i:Re[w][i][f]}function L(){let f=k.scan();for(c=0;f===15||f===14;)f===14&&s.keepLines?c+=1:f===14&&(c=1),f=k.scan();return x=f===16||k.getTokenError()!==0,f}const O=[];function h(f,g,p){!x&&(!n||gu)&&e.substring(g,p)!==f&&O.push({offset:g,length:p-g,content:f})}let v=L();if(s.keepLines&&c>0&&h(ne(i,c),0,0),v!==17){let f=k.getTokenOffset()+o,g=y.length*t<20&&s.insertSpaces?F[y.length*t]:ne(y,t);h(g,o,f)}for(;v!==17;){let f=k.getTokenOffset()+k.getTokenLength()+o,g=L(),p="",$=!1;for(;c===0&&(g===12||g===13);){let Q=k.getTokenOffset()+o;h(F[1],f,Q),f=k.getTokenOffset()+k.getTokenLength()+o,$=g===12,p=$?T():"",g=L()}if(g===2)v!==1&&m--,s.keepLines&&c>0||!s.keepLines&&v!==1?p=T():s.keepLines&&(p=F[1]);else if(g===4)v!==3&&m--,s.keepLines&&c>0||!s.keepLines&&v!==3?p=T():s.keepLines&&(p=F[1]);else{switch(v){case 3:case 1:m++,s.keepLines&&c>0||!s.keepLines?p=T():p=F[1];break;case 5:s.keepLines&&c>0||!s.keepLines?p=T():p=F[1];break;case 12:p=T();break;case 13:c>0?p=T():$||(p=F[1]);break;case 6:s.keepLines&&c>0?p=T():$||(p=F[1]);break;case 10:s.keepLines&&c>0?p=T():g===6&&!$&&(p="");break;case 7:case 8:case 9:case 11:case 2:case 4:s.keepLines&&c>0?p=T():(g===12||g===13)&&!$?p=F[1]:g!==5&&g!==17&&(x=!0);break;case 16:x=!0;break}c>0&&(g===12||g===13)&&(p=T())}g===17&&(s.keepLines&&c>0?p=T():p=s.insertFinalNewline?i:"");const _=k.getTokenOffset()+o;h(p,f,_),v=g}return O}function ne(e,n){let s="";for(let t=0;t{const i={};u(i),o.push(l),l=i,t=null},onObjectProperty:i=>{t=i},onObjectEnd:()=>{l=o.pop()},onArrayBegin:()=>{const i=[];u(i),o.push(l),l=i,t=null},onArrayEnd:()=>{l=o.pop()},onLiteralValue:u,onError:(i,d,c)=>{n.push({error:i,offset:d,length:c})}},s),l[0]}function it(e,n=[],s=de.DEFAULT){let t={type:"array",offset:-1,length:-1,children:[],parent:void 0};function l(i){t.type==="property"&&(t.length=i-t.offset,t=t.parent)}function o(i){return t.children.push(i),i}at(e,{onObjectBegin:i=>{t=o({type:"object",offset:i,length:-1,parent:t,children:[]})},onObjectProperty:(i,d,c)=>{t=o({type:"property",offset:d,length:-1,parent:t,children:[]}),t.children.push({type:"string",value:i,offset:d,length:c,parent:t})},onObjectEnd:(i,d)=>{l(i+d),t.length=i+d-t.offset,t=t.parent,l(i+d)},onArrayBegin:(i,d)=>{t=o({type:"array",offset:i,length:-1,parent:t,children:[]})},onArrayEnd:(i,d)=>{t.length=i+d-t.offset,t=t.parent,l(i+d)},onLiteralValue:(i,d,c)=>{o({type:On(i),offset:d,length:c,parent:t,value:i}),l(d+c)},onSeparator:(i,d,c)=>{t.type==="property"&&(i===":"?t.colonOffset=d:i===","&&l(d))},onError:(i,d,c)=>{n.push({error:i,offset:d,length:c})}},s);const a=t.children[0];return a&&delete a.parent,a}function Ae(e,n){if(!e)return;let s=e;for(let t of n)if(typeof t=="string"){if(s.type!=="object"||!Array.isArray(s.children))return;let l=!1;for(const o of s.children)if(Array.isArray(o.children)&&o.children[0].value===t&&o.children.length===2){s=o.children[1],l=!0;break}if(!l)return}else{const l=t;if(s.type!=="array"||l<0||!Array.isArray(s.children)||l>=s.children.length)return;s=s.children[l]}return s}function at(e,n,s=de.DEFAULT){const t=rt(e,!1),l=[];function o(j){return j?()=>j(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function u(j){return j?()=>j(t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>l.slice()):()=>!0}function a(j){return j?A=>j(A,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter()):()=>!0}function i(j){return j?A=>j(A,t.getTokenOffset(),t.getTokenLength(),t.getTokenStartLine(),t.getTokenStartCharacter(),()=>l.slice()):()=>!0}const d=u(n.onObjectBegin),c=i(n.onObjectProperty),m=o(n.onObjectEnd),y=u(n.onArrayBegin),w=o(n.onArrayEnd),k=i(n.onLiteralValue),x=a(n.onSeparator),T=o(n.onComment),L=a(n.onError),O=s&&s.disallowComments,h=s&&s.allowTrailingComma;function v(){for(;;){const j=t.scan();switch(t.getTokenError()){case 4:f(14);break;case 5:f(15);break;case 3:f(13);break;case 1:O||f(11);break;case 2:f(12);break;case 6:f(16);break}switch(j){case 12:case 13:O?f(10):T();break;case 16:f(1);break;case 15:case 14:break;default:return j}}}function f(j,A=[],W=[]){if(L(j),A.length+W.length>0){let B=t.getToken();for(;B!==17;){if(A.indexOf(B)!==-1){v();break}else if(W.indexOf(B)!==-1)break;B=v()}}}function g(j){const A=t.getTokenValue();return j?k(A):(c(A),l.push(A)),v(),!0}function p(){switch(t.getToken()){case 11:const j=t.getTokenValue();let A=Number(j);isNaN(A)&&(f(2),A=0),k(A);break;case 7:k(null);break;case 8:k(!0);break;case 9:k(!1);break;default:return!1}return v(),!0}function $(){return t.getToken()!==10?(f(3,[],[2,5]),!1):(g(!1),t.getToken()===6?(x(":"),v(),S()||f(4,[],[2,5])):f(5,[],[2,5]),l.pop(),!0)}function _(){d(),v();let j=!1;for(;t.getToken()!==2&&t.getToken()!==17;){if(t.getToken()===5){if(j||f(4,[],[]),x(","),v(),t.getToken()===2&&h)break}else j&&f(6,[],[]);$()||f(4,[],[2,5]),j=!0}return m(),t.getToken()!==2?f(7,[2],[]):v(),!0}function Q(){y(),v();let j=!0,A=!1;for(;t.getToken()!==4&&t.getToken()!==17;){if(t.getToken()===5){if(A||f(4,[],[]),x(","),v(),t.getToken()===4&&h)break}else A&&f(6,[],[]);j?(l.push(0),j=!1):l[l.length-1]++,S()||f(4,[],[4,5]),A=!0}return w(),j||l.pop(),t.getToken()!==4?f(8,[4],[]):v(),!0}function S(){switch(t.getToken()){case 3:return Q();case 1:return _();case 10:return g(!0);default:return p()}}return v(),t.getToken()===17?s.allowEmptyContent?!0:(f(4,[],[]),!1):S()?(t.getToken()!==17&&f(9,[],[]),!0):(f(4,[],[]),!1)}function On(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}function Ln(e,n,s,t){const l=n.slice(),u=it(e,[]);let a,i;for(;l.length>0&&(i=l.pop(),a=Ae(u,l),a===void 0&&s!==void 0);)typeof i=="string"?s={[i]:s}:s=[s];if(a)if(a.type==="object"&&typeof i=="string"&&Array.isArray(a.children)){const d=Ae(a,[i]);if(d!==void 0)if(s===void 0){if(!d.parent)throw new Error("Malformed AST");const c=a.children.indexOf(d.parent);let m,y=d.parent.offset+d.parent.length;if(c>0){let w=a.children[c-1];m=w.offset+w.length}else m=a.offset+1,a.children.length>1&&(y=a.children[1].offset);return K(e,{offset:m,length:y-m,content:""},t)}else return K(e,{offset:d.offset,length:d.length,content:JSON.stringify(s)},t);else{if(s===void 0)return[];const c=`${JSON.stringify(i)}: ${JSON.stringify(s)}`,m=t.getInsertionIndex?t.getInsertionIndex(a.children.map(w=>w.children[0].value)):a.children.length;let y;if(m>0){let w=a.children[m-1];y={offset:w.offset+w.length,length:0,content:","+c}}else a.children.length===0?y={offset:a.offset+1,length:0,content:c}:y={offset:a.offset+1,length:0,content:c+","};return K(e,y,t)}}else if(a.type==="array"&&typeof i=="number"&&Array.isArray(a.children)){const d=i;if(d===-1){const c=`${JSON.stringify(s)}`;let m;if(a.children.length===0)m={offset:a.offset+1,length:0,content:c};else{const y=a.children[a.children.length-1];m={offset:y.offset+y.length,length:0,content:","+c}}return K(e,m,t)}else if(s===void 0&&a.children.length>=0){const c=i,m=a.children[c];let y;if(a.children.length===1)y={offset:a.offset+1,length:a.length-2,content:""};else if(a.children.length-1===c){let w=a.children[c-1],k=w.offset+w.length,x=a.offset+a.length;y={offset:k,length:x-2-k,content:""}}else y={offset:m.offset,length:a.children[c+1].offset-m.offset,content:""};return K(e,y,t)}else if(s!==void 0){let c;const m=`${JSON.stringify(s)}`;if(!t.isArrayInsertion&&a.children.length>i){const y=a.children[i];c={offset:y.offset,length:y.length,content:m}}else if(a.children.length===0||i===0)c={offset:a.offset+1,length:0,content:a.children.length===0?m:m+","};else{const y=i>a.children.length?a.children.length:i,w=a.children[y-1];c={offset:w.offset+w.length,length:0,content:","+m}}return K(e,c,t)}else throw new Error(`Can not ${s===void 0?"remove":t.isArrayInsertion?"insert":"modify"} Array index ${d} as length is not sufficient`)}else throw new Error(`Can not add ${typeof i!="number"?"index":"property"} to parent of type ${a.type}`);else{if(s===void 0)throw new Error("Can not delete in empty document");return K(e,{offset:u?u.offset:0,length:u?u.length:0,content:JSON.stringify(s)},t)}}function K(e,n,s){if(!s.formattingOptions)return[n];let t=$e(e,n),l=n.offset,o=n.offset+n.content.length;if(n.length===0||n.content.length===0){for(;l>0&&!ge(t,l-1);)l--;for(;o=0;i--){const d=u[i];t=$e(t,d),l=Math.min(l,d.offset),o=Math.max(o,d.offset+d.length),o+=d.content.length-d.length}const a=e.length-(t.length-o)-l;return[{offset:l,length:a,content:t.substring(l,o)}]}function $e(e,n){return e.substring(0,n.offset)+n.content+e.substring(n.offset+n.length)}var De;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(De||(De={}));var Pe;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Pe||(Pe={}));const An=Tn,$n=it,Un=Ae;var He;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(He||(He={}));function Sn(e,n,s){return ot(e,n,s)}function pe(e,n,s,t){return Ln(e,n,s,t)}function Be(e,n){let s=n.slice(0).sort((l,o)=>{const u=l.offset-o.offset;return u===0?l.length-o.length:u}),t=e.length;for(let l=s.length-1;l>=0;l--){let o=s[l];if(o.offset+o.length<=t)e=$e(e,o);else throw new Error("Overlapping edit");t=o.offset}return e}const _n=["_id_","_key_","_type_"],Ue=e=>JSON.stringify(e,null,4),ae=e=>{const n={...e};for(const s of _n)delete n[s];return Ue(n)},In=e=>Be(e,Sn(e,void 0,{tabSize:4,insertSpaces:!0})),Z=e=>{const n=[],s=An(e,n,{allowTrailingComma:!0});if(n.length)throw console.error(n),n[0];return s},Nn=(e,n)=>{const s=[],t=pe.bind(null,e);return n.forEach(({path:l,value:o,options:u},a)=>{l=Array.isArray(l)?l:l.split("."),s.push(...t(l,o,u||{}))}),Be(e,s)},En=(e,n)=>{const s=URL.createObjectURL(new Blob([e])),t=document.createElement("a");t.download=n,t.href=s,t.click(),URL.revokeObjectURL(s)};function Se(e,n,s){const t=e!==void 0,l=n!==void 0,[o,u]=b.useState(t?e:l?n:s),a=b.useRef({value:o,setValue:d=>{let c;typeof d=="function"?c=d(a.current.value):c=d,a.current.value=c,u(c)}});return[b.useMemo(()=>{const c=e!==void 0?e:o;return a.current.value=c,c},[e,o]),a.current.setValue]}(function(){const e=window.require;if(e){const n=wt();n.on("languageChanged",s=>{console.log("languageChanged",s)}),e.config({"vs/nls":{availableLanguages:{"*":n.resolvedLanguage==="zh"?"zh-cn":"en"}}})}window.monacoIsReady=new Promise((n,s)=>{if(!e)return s("Not loaded monaco loader.js");e(["vs/editor/editor.main"],function(){n(monaco)})})})();monacoIsReady.then(()=>{monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!0,trailingCommas:"warning",validate:!0})});const Vn={minimap:{enabled:!1},automaticLayout:!0},zn=(e,n)=>{const{onChange:s,options:t,height:l,className:o,theme:u,style:a}=e,{t:i}=G(),[d,c]=Se(e.language,"javascript"),[m,y]=Se(e.value,e.defaultValue,""),[w,k]=b.useState(!1),x=b.useRef(null),T=b.useRef(null),L=b.useRef({}),O=vt(),h=b.useMemo(()=>u||(O?"vs-dark":"vs"),[u,O]);return ue.useImperativeHandle(n,()=>T.current),ue.useImperativeHandle(L,()=>({onChange:s}),[s]),b.useEffect(()=>{monacoIsReady.then(()=>{k(!0)})},[]),b.useEffect(()=>{if(w&&x.current){const v=x.current;let f;return monacoIsReady.then(()=>{f=T.current=monaco.editor.create(v,{value:m,language:d,theme:h,...Vn,...t}),f.onDidChangeModelContent(function(g){var $,_;const p=f.getValue();y(p),(_=($=L.current)==null?void 0:$.onChange)==null||_.call($,p)}),f.addCommand(monaco.KeyMod.Alt|monaco.KeyCode.KeyX,g=>{var p;(p=f.getAction("my-autoWrap-toggle"))==null||p.run()}),f.addAction({id:"my-autoWrap-toggle",label:i("msg.wordWrap"),keybindings:[monaco.KeyMod.Alt|monaco.KeyCode.KeyZ],run:function(g,p){const $=g.getOption(monaco.editor.EditorOption.wordWrap);g.updateOptions({wordWrap:$==="on"?"off":"on"})}})}),()=>{var g;(g=f==null?void 0:f.dispose)==null||g.call(f)}}},[w]),b.useEffect(()=>{T.current&&m!=T.current.getValue()&&T.current.setValue(m)},[m]),w?r.jsx("div",{className:Oe(o),style:{height:l||"100%",minHeight:0,minWidth:0,boxSizing:"border-box",...a},ref:x}):r.jsx(Ve.TextArea,{style:{height:l||"100%"},className:Oe(o),value:m,onChange:v=>{var g,p;const f=v.target.value;y(f),(p=(g=L.current)==null?void 0:g.onChange)==null||p.call(g,f)}})},ct=ue.forwardRef(zn),Bn=e=>{const{onFinish:n,trigger:s,open:t,onOpenChange:l,modalProps:o,title:u,width:a,formRef:i,children:d,...c}=e,[m,y]=Se(t,!1),[w]=C.useForm(),k=b.useCallback(()=>{var O;y(!1),l==null||l(!1),(O=o==null?void 0:o.onCancel)==null||O.call(o,{})},[l]),x=b.useCallback(()=>{var O;w.resetFields(),(O=o==null?void 0:o.afterClose)==null||O.call(o)},[w,o]),T=b.useMemo(()=>async function(O){await(n==null?void 0:n.apply(null,[O]))===!0&&k()},[n,k]),L=b.useMemo(()=>({...o,onCancel:k,onOk:()=>{w.submit()},afterClose:x,open:m,title:u,width:a}),[x,w,o,k,m,u,a]);return b.useEffect(()=>{if(!i)return;switch(typeof i){case"function":i(w);break;case"object":i.current=w;break}},[w,i]),r.jsxs(r.Fragment,{children:[r.jsx(ze,{...L,children:r.jsx(C,{form:w,onFinish:T,...c,children:d})}),s&&ue.cloneElement(s,{onClick:()=>{y(!0)}})]})},ut=e=>{const{templates:n,...s}=e,{t}=G(),l=b.useRef(),o=i=>{var c,m,y;let d=i;if((c=e.initialValues)!=null&&c.value){const w=Z(e.initialValues.value);d=w.name?Nn(i,[{path:"name",value:w.name}]):i}d=In(d),(m=l.current)==null||m.setFieldValue("value",d),(y=l.current)==null||y.validateFields()},u=i=>{const{children:d,...c}=i,{json:m,cli:y}=i;if(d)return{...c,children:d.map(u)};if(m){const{label:w}=c;return{...c,label:me(w),title:y,onClick:()=>o(m)}}},a=n==null?void 0:n.length;return r.jsx(r.Fragment,{children:r.jsxs(Bn,{...s,formRef:l,modalProps:{destroyOnClose:!0,maskClosable:!1},children:[a?r.jsxs(z,{size:"small",style:{marginBottom:5,width:"100%",overflow:"auto"},children:[r.jsxs("span",{children:[t("terms.template"),":"]}),n.map((i,d)=>{var c;if((c=i.children)!=null&&c.length){const m={items:i.children.map(u)};return i.json?r.jsx(Le.Button,{size:"small",onClick:()=>o(i.json),menu:m,children:me(i.label)},d):r.jsx(Le,{menu:m,children:r.jsx(M,{size:"small",children:r.jsxs(z,{children:[me(i.label),r.jsx(Bt,{})]})})},d)}else return i.json?r.jsx(M,{size:"small",title:i.cli,onClick:()=>o(i.json),children:r.jsx(z,{children:me(i.label)})},d):null})]}):null,r.jsx(C.Item,{name:"value",rules:[{required:!0,message:t("msg.require")},{validator:(i,d)=>new Promise((c,m)=>{d&&Z(d),c(null)}).catch(c=>{throw console.error(c),new Error(t("msg.formatError",{name:"JSON"}))})}],children:r.jsx(ct,{className:"g-boder",height:300,language:"json",options:{minimap:{enabled:!1}}})})]})})},ce=e=>{const{onOpenChange:n,open:s,...t}=e;let l;const o=document.createDocumentFragment(),u=xt.createRoot(o);function a({...d}){clearTimeout(l);const c=Ft();l=setTimeout(()=>{document.body.append(o),u.render(r.jsx(Mt,{theme:c.getTheme(),children:r.jsx(ut,{...d})}))},100)}function i(){u.unmount(),document.body.removeChild(o)}a({...t,open:!0,onOpenChange:d=>{!d&&i()}})},dt=`{ - "services": [ - { - "name": "service-0", - "addr": ":8080", - // "interface": "eth0", - // "admission": "admission-0", - // "bypass": "bypass-0", - // "resolver": "resolver-0", - // "hosts": "hosts-0", - "handler": { - "type": "auto", - // "auth": { - // "username": "gost", - // "password": "gost" - // }, - // "auther": "auther-0", - // "retries": 1, - // "chain": "chain-0", - // "metadata": { - // "bar": "baz", - // "foo": "bar" - // } - }, - "listener": { - "type": "tcp", - // "auth": { - // "username": "user", - // "password": "pass" - // }, - // "auther": "auther-0", - // "chain": "chain-0", - // "tls": { - // "certFile": "cert.pem", - // "keyFile": "key.pem", - // "caFile": "ca.pem" - // }, - // "metadata": { - // "abc": "xyz", - // "def": 456 - // } - }, - // "forwarder": { - // "nodes": [ - // { - // "name": "target-0", - // "addr": "192.168.1.1:1234" - // }, - // { - // "name": "target-1", - // "addr": "192.168.1.2:2345" - // } - // ], - // "selector": { - // "strategy": "round", - // "maxFails": 1, - // "failTimeout": 30 - // } - // } - } - ], - "chains": [ - { - "name": "chain-0", - // "selector": { - // "strategy": "round", - // "maxFails": 1, - // "failTimeout": 30 - // }, - "hops": [ - { - "name": "hop-0", - // "interface": "192.168.1.2", - // "selector": { - // "strategy": "rand", - // "maxFails": 3, - // "failTimeout": 60 - // }, - // "bypass": "bypass-0", - "nodes": [ - { - "name": "node-0", - "addr": ":1080", - // "interface": "eth1", - // "bypass": "bypass-0", - "connector": { - "type": "socks5", - "auth": { - "username": "user", - "password": "pass" - }, - // "metadata": { - // "foo": "bar" - // } - }, - "dialer": { - "type": "tcp", - // "auth": { - // "username": "user", - // "password": "pass" - // }, - // "tls": { - // "caFile": "ca.pem", - // "secure": true, - // "serverName": "example.com" - // }, - // "metadata": { - // "bar": "baz" - // } - } - } - ] - } - ] - } - ], - "authers": [ - { - "name": "auther-0", - "auths": [ - { - "username": "user1", - "password": "pass1" - }, - { - "username": "user2", - "password": "pass2" - } - ] - } - ], - "admissions": [ - { - "name": "admission-0", - "whitelist": false, - "matchers": [ - "127.0.0.1", - "192.168.0.0/16" - ] - } - ], - "bypasses": [ - { - "name": "bypass-0", - "whitelist": false, - "matchers": [ - "*.example.com", - ".example.org", - "0.0.0.0/8" - ] - } - ], - "resolvers": [ - { - "name": "resolver-0", - "nameservers": [ - { - "addr": "udp://8.8.8.8:53", - "chain": "chain-0", - "prefer": "ipv4", - "clientIP": "1.2.3.4", - "ttl": 60, - "timeout": 30 - }, - { - "addr": "tcp://1.1.1.1:53" - }, - { - "addr": "tls://1.1.1.1:853" - }, - { - "addr": "https://1.0.0.1/dns-query", - "hostname": "cloudflare-dns.com" - } - ] - } - ], - "hosts": [ - { - "name": "hosts-0", - "mappings": [ - { - "ip": "127.0.0.1", - "hostname": "localhost" - }, - { - "ip": "192.168.1.10", - "hostname": "foo.mydomain.org", - "aliases": [ - "foo" - ] - }, - { - "ip": "192.168.1.13", - "hostname": "bar.mydomain.org", - "aliases": [ - "bar", - "baz" - ] - } - ] - } - ], - "tls": { - "certFile": "cert.pem", - "keyFile": "key.pem", - "caFile": "ca.pem" - }, - "log": { - "output": "stderr", - "level": "debug", - "format": "json", - "rotation": { - "maxSize": 100, - "maxAge": 10, - "maxBackups": 3, - "localTime": false, - "compress": false - } - }, - "profiling": { - "addr": ":6060", - "enabled": true - }, - "api": { - "addr": ":18080", - "pathPrefix": "/api", - "accesslog": true, - "auth": { - "username": "user", - "password": "password" - }, - "auther": "auther-0" - }, - "metrics": { - "addr": ":9000", - "path": "/metrics" - } -}`,Fn={en:"Default",zh:"默认"},Mn={admissions:"https://gost.run/concepts/admission/",authers:"https://gost.run/concepts/auth/",bypasses:"https://gost.run/concepts/bypass/",chains:"https://gost.run/concepts/chain/",hops:"https://gost.run/concepts/hop/",hosts:"https://gost.run/concepts/hosts/",ingresses:"https://gost.run/concepts/ingress/",observers:"https://gost.run/concepts/observer/",resolvers:"https://gost.run/concepts/resolver/",limiters:"https://gost.run/concepts/limiter/",rlimiter:"https://gost.run/concepts/limiter/",climiter:"https://gost.run/concepts/limiter/",routers:"https://gost.run/concepts/router/",sds:"https://gost.run/concepts/sd/",services:"https://gost.run/concepts/service/"},Rn=[],Je=$n(dt,Rn,{allowTrailingComma:!0}),Dn=e=>{if(!Je)return;const n=Un(Je,[e,0]);if(n){const{offset:s,length:t}=n;return dt.substring(s,s+t)}},I=(e,n=Fn)=>{const s=Dn(e),t=Mn[e],l="// "+t+` -`;let o;return s&&(o={label:n,json:l+s}),{def:o,docUrl:t,_docUrl:l}},Pn=e=>`{ - "name": "${e}-0", - "file": { - "path": "/path/to/file" - } - }`,Hn=(e,n)=>`{ - "name": "${e}-0", - "redis": { - "addr": "127.0.0.1:6379", - "db": "1", - "password": "123456", - ${n?`"type": "${n}",`:""} - "key": "gost:${e}-0" - } - }`,Jn=e=>`{ - "name": "${e}-0", - "http": { - "url": "http://127.0.0.1:8000", - "timeout": "10s" - } - }`,ft=e=>`{ - "name": "${e}-0", - "plugin": { - "type": "grpc", - // "type": "http", - "addr": "127.0.0.1:8000", - "token": "gost", - // "tls": {} - } - }`,J=(e,n="",s)=>{const t=n?`// ${n} -`:"";return[{label:"File",json:t+Pn(e)},{label:"Redis",json:t+Hn(e,s==null?void 0:s.redisType)},{label:"HTTP",json:t+Jn(e)},{label:"Plugin",json:t+ft(e)}]},{def:We,docUrl:Wn,_docUrl:qn}=I("admissions"),Gn=[We||{label:{zh:"内联",en:"Inline"},json:qn+` - { - "name": "admission-0", - "matchers": [ - "127.0.0.1", - "192.168.0.0/16", - "example.com" - ] - }`},...J("admission",Wn)],{def:Qn,docUrl:Xn}=I("authers"),Zn=[Qn,...J("auther",Xn)],{def:Yn,docUrl:Qs,_docUrl:Kn}=I("chains"),Cn=[Yn,{label:{zh:"典型转发链",en:"Typical"},cli:"",json:Kn+` -{ - "name": "chain-0", - "hops": [ - { - "name": "hop-0", - "nodes": [ - { - "name": "node-0", - "addr": "proxy.xxx.com:1080", - "connector": { - "type": "socks5", - "auth": { - "username": "username", - "password": "password" - } - }, - "dialer": { - "type": "tcp", - "tls": { - "serverName": "proxy.xxx.com" - } - } - } - ] - } - ] -} - `}],{def:qe,docUrl:es,_docUrl:ts}=I("bypasses"),ns=[qe||{label:{zh:"内联",en:"Inline"},json:ts+` - { - "name": "bypass-0", - "matchers": [ - "127.0.0.1", - "172.10.0.0/16", - "localhost", - "*.example.com", - ".example.org" - ] - }`},...J("bypass",es)],{def:Ge,docUrl:ss,_docUrl:ls}=I("hops"),rs=[Ge||{label:{zh:"内联",en:"Inline"},json:ls+` - { - "name": "hop-0", - "nodes": [ - { - "name": "node-0", - "addr": ":8888", - "connector": { - "type": "http" - }, - "dialer": { - "type": "tcp" - } - }, - { - "name": "node-1", - "addr": ":9999", - "connector": { - "type": "socks5" - }, - "dialer": { - "type": "tcp" - } - } - ] - }`},...J("hop",ss)],{def:Qe,docUrl:os,_docUrl:is}=I("hosts"),as=[Qe||{label:{zh:"内联",en:"Inline"},json:is+` -{ - "name": "hosts-0", - "mappings": [ - { - "ip": "127.0.0.1", - "hostname": "example.com" - }, - { - "ip": "2001:db8::1", - "hostname": "example.com" - } - ] -}`},...J("hosts",os)],{def:Xe,docUrl:cs,_docUrl:us}=I("ingresses"),ds=[Xe||{label:{zh:"内联",en:"Inline"},json:us+`{ - "name": "ingress-0", - "rules": [ - { - "hostname": "example.com", - "endpoint": "4d21094e-b74c-4916-86c1-d9fa36ea677b" - }, - { - "hostname": "example.org", - "endpoint": "ac74d9dd-3125-442a-a7c1-f9e49e05faca" - } - ] - }`},...J("ingress",cs,{redisType:"hash"})],{def:Ze,docUrl:fs,_docUrl:ms}=I("routers"),ps=[Ze||{label:{zh:"内联",en:"Inline"},json:ms+` - { - "name": "router-0", - "routes": [ - { - "net": "192.168.1.0/24", - "gateway": "192.168.123.2" - }, - { - "net": "172.10.0.0/16", - "gateway": "192.168.123.3" - } - ] - }`},...J("router",fs)],{def:hs,docUrl:Xs,_docUrl:he}=I("services"),D=(e,n,s)=>{let t=he+` - { - "name": "service-0", - "addr": ":1080", - "handler": { - "type": "${e}", - // "auth": { - // "username": "user", - // "password": "password" - // } - }, - "listener": { - "type": "${n}" - } - }`;if(s){const l=pe(t,["metadata"],s,{});l.push(...pe(t,["handler","metadata"],s,{})),l.push(...pe(t,["listener","metadata"],s,{})),t=Be(t,l)}return t},gs=[hs,{label:{zh:"端口转发",en:"Port Forwarding"},cli:"-L tcp://:80/:8080",json:he+` - { - "name": "service-0", - "addr": ":80", - "handler": { - "type": "tcp" - }, - "listener": { - "type": "tcp" - }, - "forwarder": { - "nodes": [ - { - "name": "target-0", - "addr": ":8080" - } - ] - } - }`},{label:{zh:"反向代理",en:"Reverse Proxy"},cli:"",json:he+` - { - "name": "service-0", - "addr": ":80", - "handler": { - "type": "tcp", - "metadata": { - "sniffing": "true" - } - }, - "listener": { - "type": "tcp" - }, - "forwarder": { - "nodes": [ - { - "name": "target-1", - "addr": "www.baidu.com:80", - // "host": "myhost.com", - // "path": "/" - "http": { - "host": "www.baidu.com" - } - } - ] - } - }`},{label:{zh:"代理服务",en:"Proxy Service"},children:[{label:"http",children:[{label:"http",json:D("http","tcp")},{label:"https(http+tsl)",json:D("http","tls")},{label:"http+wss",json:D("http","wss")},{label:"http2",json:D("http2","http2")}]},{label:"relay",children:[{label:"relay+tcp",json:D("relay","tcp")},{label:"relay+tls",json:D("relay","tls")},{label:"relay+wss",json:D("relay","tls")}]},{label:"socks",children:[{label:"socks4",json:D("socks","tcp")},{label:"socks5",json:D("socks5","tcp")},{label:"socks5(udp)",json:D("socks5","tcp",{udp:"true"})},{label:"socks5+tls",json:D("socks5","tls",{notls:"true"})}]}]},{label:{zh:"代理转发",en:"Porxy Forwarding"},cli:"-L socks5://:1080 -F socks5://xxx.com:1080",json:he+` - { - "name": "service-0", - "addr": ":1080", - "handler": { - "type": "socks5", - "chain": "chain-0" - }, - "listener": { - "type": "tcp" - } - }`}],{def:Ye,docUrl:bs,_docUrl:ys}=I("climiter"),ks=[Ye||{label:{zh:"内联",en:"Inline"},json:ys+` - { - "name": "climiter-0", - "limits": [ - "$ 1000", - "$$ 100", - "192.168.1.1 10" - ] - }`},...J("climiter",bs,{redisType:"set"})],{def:Ke,docUrl:js,_docUrl:ws}=I("limiters"),vs=[Ke||{label:{zh:"内联",en:"Inline"},json:ws+` - { - "name": "limiter-0", - "limits": [ - "$ 100MB 100MB", - "$$ 10MB", - "192.168.1.1 512KB 1MB", - "192.168.0.0/16 1MB 5MB" - ] - }`},...J("limiters",js,{redisType:"set"})],{def:Ce,docUrl:xs,_docUrl:Ts}=I("rlimiter"),Os=[Ce||{label:{zh:"内联",en:"Inline"},json:Ts+` - { - "name": "rlimiter-0", - "limits": [ - "$ 100", - "$$ 10", - "192.168.1.1 50", - "192.168.0.0/16 5" - ] - }`},...J("rlimiter",xs,{redisType:"set"})],{def:Ls,docUrl:Zs,_docUrl:As}=I("resolvers"),$s=[Ls,{label:"Plugin",json:As+ft("resolver")}],{def:et,docUrl:Ys,_docUrl:Us}=I("sds"),Ss=[et||{label:"HTTP Plugin",json:Us+` - // https://gost.run/concepts/sd/ - { - "name": "sd-0", - "plugin": { - "type": "http", - "addr": "http://127.0.0.1:8000/sd", - // "token": "gost", - // "tls": {} - } - }`}],{def:tt,docUrl:Ks,_docUrl:_s}=I("observers"),Is=[tt||{label:"Plugin",json:_s+` - { - "name": "observer-0", - "plugin": { - "type": "grpc", - // "type": "http", - "addr": "127.0.0.1:8000", - "token": "gost", - // "tls": {} - } - }`}],Ns={admissions:Gn,authers:Zn,bypasses:ns,chains:Cn,climiters:ks,limiters:vs,rlimiters:Os,hops:rs,hosts:as,ingresses:ds,resolvers:$s,routers:ps,sds:Ss,observers:Is,services:gs},mt=e=>{const{name:n}=e;return b.useMemo(()=>Ns[n],[n])},pt=e=>{const{name:n,localApi:s,gostConfig:t,localConfig:l}=e,o=b.useMemo(()=>(t==null?void 0:t[n])||[],[t,n]),u=b.useMemo(()=>s?(l==null?void 0:l[n])||[]:[],[l,n,s]),a=b.useMemo(()=>[...o,...u],[o,u]);return{dataList:o,dataSource:a}},se=ue.createContext({}),nt=(e,n,s)=>JSON.stringify(n),Es=(e,n)=>{var s,t;return((t=(s=e==null?void 0:e.name)==null?void 0:s.toLowerCase())==null?void 0:t.indexOf(n))!==-1},Vs=e=>{const{name:n,title:s,api:t,localApi:l,keyName:o,rowKey:u="name",keyword:a,renderConfig:i=nt,filter:d=Es}=e,{t:c}=G(),{localList:m,comm:y}=b.useContext(Ne),{gostConfig:w,localConfig:k}=b.useContext(fe),{dataList:x,dataSource:T}=pt({localApi:l,name:o,gostConfig:w,localConfig:k}),L=mt({name:o});Rt.useApp();const{deleteValue:O,updateValue:h,dispatch:v,enable:f,updateLocal:g,deleteLocal:p,addValue:$}=y,_=b.useRef({dataList:x,dataSource:T});b.useImperativeHandle(_,()=>({dataList:x,dataSource:T}),[x,T]);const Q=b.useMemo(()=>a?T.filter(S=>d(S,a)):T,[T,d,a]);return b.useEffect(()=>{function S({path:j,record:A}){const{dataList:W,dataSource:B}=_.current,q=W.includes(A),R=A.name,X=j.split(","),yt=X.reduce((Y,le)=>Y==null?void 0:Y[le],A),kt=Y=>{let le=A;X.forEach((Fe,jt)=>{jt===X.length-1?le[Fe]=Y:le=le[Fe]})};ce({title:c("base.cmd.edit"),initialValues:{value:ae(yt)},onFinish:async Y=>(kt(Z(Y.value)),q?await h(R,A):await g(R,A),!0)})}return V.on(`edit:${n}`,S),()=>{V.off(`edit:${n}`,S)}},[]),r.jsx("div",{style:{height:348,overflow:"auto"},children:r.jsx(Dt,{rowKey:S=>S._id_||S.name,scroll:{y:290},size:"small",dataSource:Q,columns:[{title:c("base.form.name"),dataIndex:u,ellipsis:!0,width:100},{title:c("base.form.details"),ellipsis:!0,render:(S,j,A)=>{const B=x.includes(j)?R=>h(j.name,R||j):R=>g(j.name,R||j);let q;try{q=i(S,j,A)}catch{q=nt(S,j)}return r.jsx(se.Provider,{value:{update:B},children:q})}},{title:c("base.cmd.controls"),width:l?120:90,align:"right",dataIndex:u,render:(S,j,A)=>{const W=x.includes(j),B={...j};return delete B.status,r.jsxs(z,{size:2,children:[l?W?r.jsx(M,{title:c("base.cmd.disable"),icon:r.jsx(lt,{style:{color:Pt.primary}}),type:"link",size:"small",onClick:async()=>{await v(j)}}):r.jsx(M,{title:c("base.cmd.enabled"),type:"link",icon:r.jsx(jn,{style:{color:Ht.primary}}),size:"small",onClick:async()=>{await f(j)}}):null,r.jsx(M,{title:c("base.cmd.edit"),icon:r.jsx(Jt,{}),type:"link",size:"small",onClick:()=>{ce({title:c("title.edit",{name:S||""}),templates:L,initialValues:{value:ae(B)},onFinish:async q=>{const{value:R}=q,X=Z(R);return W?await h(j.name,X):await g(j.name,{...B,...X}),!0}})}}),r.jsx(M,{title:c("base.cmd.copy"),icon:r.jsx(Wt,{}),type:"link",size:"small",onClick:()=>{ce({title:c("title.copied",{name:S||""}),templates:L,initialValues:{value:ae(B)},onFinish:async q=>{const{value:R}=q,X=Z(R);return await y.addValue(X),!0}})}}),r.jsx(qt,{title:c("text.warn"),description:c("text.deleteing"),onConfirm:()=>{W?O(j):p(j)},children:r.jsx(M,{title:c("base.cmd.del"),icon:r.jsx(Gt,{}),type:"link",size:"small"})})]})}}],pagination:!1})})},zs=e=>{const{t:n}=G(),{keyName:s,title:t}=e,{comm:l}=b.useContext(Ne),o=mt({name:s});return r.jsx(ut,{title:n("title.add",{name:t}),templates:o,trigger:r.jsx(M,{icon:r.jsx(Qt,{}),size:"small"}),onFinish:async u=>{const{value:a}=u,i=Z(a);return await l.addValue(i),!0}})},N=e=>({keyName:e,api:Tt[e],localApi:Ot[e],rowKey:"name"}),Bs=[{name:"admission",title:"准入控制器(Admission)",subTitle:"准入控制器",...N("admissions")},{name:"auther",title:"认证器(Auther)",subTitle:"认证器",...N("authers")},{name:"bypass",title:"分流器(Bypass)",subTitle:"分流器",...N("bypasses")},{name:"chain",title:"转发链(Chain)",subTitle:"转发链",...N("chains")},{name:"climiter",title:"并发连接数限制",subTitle:"",...N("climiters")},{name:"limiter",title:"流量速率限制",subTitle:"",...N("limiters")},{name:"rlimiter",title:"请求速率限制",subTitle:"",...N("rlimiters")},{name:"hop",title:"跳跃点(Hop)",subTitle:"跳跃点",...N("hops")},{name:"host",title:"主机映射器(Hosts)",subTitle:"主机映射器",...N("hosts")},{name:"ingress",title:"Ingress",subTitle:"Ingress",...N("ingresses")},{name:"resolver",title:"域名解析器(Resolver)",subTitle:"域名解析器",...N("resolvers")},{name:"service",title:"服务(Service)",subTitle:"服务",...N("services")},{name:"sd",title:"服务发现(SD)",subTitle:"服务发现",...N("sds")},{name:"observer",title:"观测器(Observer)",subTitle:"观测器",...N("observers")}],Fs=e=>Bs.find(n=>n.name===e),_e=e=>{const{boxShadow:n,className:s,...t}=e,l=Oe(s,{"antd-cord-boxShadow":n});return r.jsx(Xt,{className:l,...t})},E=e=>{const{t:n}=G(),{title:s,subTitle:t,name:l,keyName:o,api:u,boxShadow:a=!0,bordered:i=!1,rowKey:d="name",renderConfig:c,localApi:m,filter:y}=b.useMemo(()=>({...Fs(e.module||""),title:n(`modules.${e.module}.title`),subTitle:n(`modules.${e.module}.subTitle`),...e}),[e]),[w,k]=b.useState(""),x={title:t||"",keyword:w,name:l,api:u,keyName:o,rowKey:d,localApi:m,renderConfig:c,filter:y},{gostConfig:T,localConfig:L}=b.useContext(fe),{dataSource:O}=pt({localApi:m,name:o,gostConfig:T,localConfig:L}),h=b.useMemo(()=>{const v=async f=>{await u.post(f)};return{updateValue:async(f,g,p=!0)=>{await u.put(f,g),p&&V.emit("apiUpdate",{})},deleteValue:async(f,g=!0)=>{await u.delete(f.name),g&&V.emit("apiUpdate",{})},addValue:async(f,g=!0)=>{let p=f.name||`${l}-0`;const $=()=>O==null?void 0:O.find(_=>_.name===p);if($()&&!await new Promise((Q,S)=>{ze.confirm({title:n("msg.invalidName"),content:n("msg.autofixName"),zIndex:2e3,onOk:()=>Q(!0),onCancel:()=>Q(!1)})}))throw!1;for(;$();)p=p.replace(/\d*$/,_=>String(_==""?"-0":Number(_)+1));await v({...f,name:p}),f.name!==p&&Zt.info({description:n("msg.fixName",{name:p}),message:n("msg.autofix")}),g&&V.emit("apiUpdate",{})},dispatch:async f=>{m&&(await u.delete(f.name),await m.add(f),V.emit("update"))},enable:async f=>{m&&(await u.post(f),await m.delete(f.name),V.emit("update"))},updateLocal:async(f,g)=>{m&&(await m.put(f,{...g,name:f}),V.emit("localUpdate"))},deleteLocal:async f=>{m&&(await m.delete(f.name),V.emit("localUpdate"))}}},[u,O,m,l]);return b.useEffect(()=>Lt(l,h),[h,l]),r.jsx(Ne.Provider,{value:{name:l,comm:h},children:r.jsx(_e,{boxShadow:a,bordered:i,title:s,extra:r.jsxs(z,{children:[r.jsx(Ve.Search,{allowClear:!0,onChange:v=>{const f=v.target.value;k(f)},size:"small"}),r.jsx(zs,{...x})]}),children:r.jsx(Vs,{...x})})})},Ms=e=>{const{name:n,addr:s,connector:{type:t,metadata:l}={},dialer:{type:o}={}}=e,u=l?At.stringify(l):"";return r.jsxs(z,{children:[(t||o)&&r.jsx(H,{color:"#87d068",children:`${t}${o?"+"+o:""}`}),r.jsx(H,{color:"green",children:s}),u&&r.jsx(H,{color:"purple",title:"_metadata",children:"metadata"})]})},Ie=({node:e,upjson:n,isLink:s=!1})=>{const{t}=G(),{name:l}=e,{update:o}=b.useContext(se);return r.jsx(ie,{color:"#ddffbf",title:r.jsx(Ms,{...e}),children:r.jsx(H,{bordered:!1,color:"green",className:"editor-json",title:t("text.doubleClickEdit"),onDoubleClick:()=>{n&&ce({title:t("base.cmd.edit"),initialValues:{value:ae(e)},onFinish:async u=>(n(Z(u.value)),o(),!0)})},children:l})})},ht=e=>{var u;let n=e,s=!1;const{gostConfig:t,localConfig:l}=b.useContext(fe);if(!n.nodes){const a=[...(t==null?void 0:t.hops)||[],...(l==null?void 0:l.hops)||[]].find(i=>i.name===n.name);a&&(s=!0,n=a)}const{nodes:o}=n;if(!o||(o==null?void 0:o.length)<=0)return`[${e.name}(noNodes)]`;if(s){const a=(u=t==null?void 0:t.hops)==null?void 0:u.includes(n),i=n.name;return r.jsx(se.Provider,{value:{update:async d=>{const c=await Ee("hop");return(a?y=>c.updateValue(i,y||n):y=>c.updateLocal(i,y||n))(d)}},children:r.jsx(z,{size:5,children:o.map((d,c)=>r.jsx(Ie,{node:d,isLink:!0,upjson:m=>o[c]=m},c))})})}return r.jsx(z,{size:5,children:o.map((a,i)=>r.jsx(Ie,{node:a,upjson:d=>o[i]=d},a.name+i))})};function Rs(e){const{update:n}=b.useContext(se),{t:s}=G();return r.jsx(z,{size:5,children:e.hops.map((t,l)=>{const o=r.jsx(ht,{...t});return r.jsx(ie,{title:o,color:"#c7e7ff",arrow:!1,children:r.jsx(H,{bordered:!1,color:"blue",className:"editor-json",title:s("text.doubleClickEdit"),onDoubleClick:()=>{ce({title:s("base.cmd.edit"),initialValues:{value:ae(t)},onFinish:async u=>(e.hops[l]=Z(u.value),n(),!0)})},children:t.name})},t.name+l)}).reduce((t,l,o)=>(t.length>0&&t.push(r.jsx(Yt,{style:{color:"blue",fontSize:12}},"_sp_"+o)),t.push(l),t),[])})}function gt(e){const{hops:n}=e;return r.jsx(Rs,{hops:n,root:e})}const Ds=e=>{b.useContext(fe);const n={module:"chain",renderConfig:(s,t,l)=>r.jsx(gt,{...t})};return r.jsx(E,{...n})},bt=(e,n)=>{const{gostConfig:s,localConfig:t}=b.useContext(fe),l=b.useMemo(()=>{var a;return(a=s==null?void 0:s[n])==null?void 0:a.find(i=>i.name===e)},[s,e,n]),o=b.useMemo(()=>{var a;return(a=t==null?void 0:t[n])==null?void 0:a.find(i=>i.name===e)},[t,e,n]);return[l??o,!!l]},Ps=e=>{const[n,s]=bt(e.name,"hops");let t=e,l=!1;t.nodes||(t=n,l=!!n);const{nodes:o}=t;if(!o||(o==null?void 0:o.length)<=0)return`[${e.name}(noNodes)]`;const u=r.jsx(z,{size:5,children:o.map((a,i)=>r.jsx(Ie,{node:a,upjson:d=>o[i]=d},a.name+i))});if(l){const a=t.name;return r.jsx(se.Provider,{value:{update:async i=>{const d=await Ee("hop");return(s?m=>d.updateValue(a,m||t):m=>d.updateLocal(a,m||t))(i)}},children:u})}return u},st=e=>{const[n,s]=bt(e.chainName,"chains");if(!n)return"[no chain]";const t=e.chainName;return r.jsx(se.Provider,{value:{update:async l=>{const o=await Ee("chain");return(s?a=>o.updateValue(t,a||n):a=>o.updateLocal(t,a||n))(l)}},children:r.jsx(gt,{...n})})},Hs=e=>{const{name:n,addr:s,handler:t,listener:l,forwarder:o}=e,{t:u}=G(),a=b.useMemo(()=>{const i=t==null?void 0:t.type,d=l==null?void 0:l.type;return i===d?i:`${i}+${d}`},[t,l]);return r.jsxs(z,{children:[r.jsx(H,{color:"#87d068",children:a}),r.jsx(H,{color:"green",children:s}),t.chain&&r.jsx(ie,{title:r.jsx(st,{chainName:t.chain}),color:"#c7e7ff",arrow:!1,children:r.jsx(H,{children:u("modules.chain.subTitle")})}),l.chain&&r.jsx(ie,{title:r.jsx(st,{chainName:l.chain}),color:"#fff0d7",arrow:!1,children:r.jsx(H,{color:"orange",children:u("terms.key0")})}),o&&r.jsx(ie,{title:r.jsx(Ps,{...o}),color:"#c7e7ff",arrow:!1,children:r.jsx(H,{children:u("terms.forwarder")})})]})},Js=e=>{const{colSpan:n}=e;Te();const s={module:"service",renderConfig:(t,l,o)=>r.jsx(Hs,{...l}),filter:(t,l)=>{const{name:o,addr:u,handler:a,listener:i}=t;function d(c){const m=c==null?void 0:c.toLowerCase();return m?m.indexOf(l)!==-1:!1}return d(o)||d(u)||d(a==null?void 0:a.type)||d(i==null?void 0:i.type)}};return r.jsx(U,{...n,xxl:16,children:r.jsx(E,{...s})})},Ws=e=>r.jsx(E,{module:"hop",renderConfig:(n,s,t)=>r.jsx(ht,{...s})}),P={xs:24,sm:24,md:12,lg:12,xl:12,xxl:8},xe={sm:24,xxl:8},Cs=()=>{const e=re(),{t:n}=G(),s=Te(),[t,l]=b.useState(!1),[o,u]=b.useState(!1),[a,i]=b.useState(!0),[d,c]=b.useState([]),m=b.useRef({}),y=b.useCallback(async()=>$t().then(k=>k.sort((x,T)=>{const L=x.time||0;return(T.time||0)-L})).then(k=>c(k.filter(x=>x.addr!==e.addr).map(x=>({key:x.addr,label:r.jsx("a",{href:`./?use=${x.addr}`,children:x.addr})})))),[]);b.useEffect(()=>{Ut().then(L=>{L&&V.emit("update")});const k=m.current.onSave=async()=>{try{u(!0);const{saveFormat:L,savePath:O}=re.get()||{};await St(L,O),i(!0)}finally{u(!1)}},x=()=>{var L;if(i(!1),!!((L=re.get())!=null&&L.autoSave))return k()},T=async L=>{var O;if(i(!1),!!((O=re.get())!=null&&O.autoSave)&&(L==null?void 0:L.url)!==zt.config)return k()};return y(),V.on("update",x),V.on("apiUpdate",T),()=>{V.off("update",x),V.off("apiUpdate",T)}},[]);const w=b.useMemo(()=>{const k=[];return d.length&&(k.push({key:"2",label:n("manage.cmd.switch"),children:d}),k.push({type:"divider"})),k.push({key:"new",label:n("manage.cmd.new"),onClick:()=>{window.open(location.href,void 0,"noopener")}}),k},[d,n]);return r.jsxs(ke,{style:{height:"100vh",overflow:"hidden"},children:[r.jsxs(ke.Header,{style:{color:"#FFF",paddingInline:20},children:[r.jsxs(je,{align:"middle",justify:"space-between",wrap:!1,children:[r.jsx(U,{color:"",children:r.jsx(M,{type:"link",icon:r.jsx(Kt,{}),onClick:async()=>{Te.set(await _t())},children:n("manage.cmd.reload")})}),r.jsx(U,{children:e.addr}),r.jsx(U,{children:r.jsxs(z,{children:[r.jsxs(z.Compact,{children:[r.jsx(M,{icon:a?r.jsx(lt,{}):r.jsx(un,{}),loading:o,onClick:()=>{var k,x;return(x=(k=m.current)==null?void 0:k.onSave)==null?void 0:x.call(k)},children:n("manage.cmd.save")}),r.jsx(M,{icon:r.jsx(hn,{}),onClick:()=>l(!0)})]}),r.jsx(M,{icon:r.jsx(Ct,{}),onClick:()=>{En(Ue(s),"gost.json")},children:n("manage.cmd.download")}),r.jsx(Le.Button,{menu:{items:w},onClick:It,children:n("manage.cmd.logout")}),r.jsx(Nt,{}),r.jsx(Et,{})]})})]}),r.jsx(ze,{destroyOnClose:!0,open:t,onCancel:()=>l(!1),footer:!1,children:r.jsxs(C,{initialValues:e,layout:"horizontal",labelCol:{span:4},onValuesChange:(k,x)=>{Object.assign(e,k),re.set(e),e.isLocal&&Vt(e.addr,e)},children:[r.jsx(C.Item,{name:"autoSave",label:n("manage.label.autoSave"),valuePropName:"checked",children:r.jsx(en,{})}),r.jsx(C.Item,{name:"saveFormat",label:n("manage.label.format"),initialValue:"json",children:r.jsxs(we.Group,{optionType:"button",buttonStyle:"solid",children:[r.jsx(we,{value:"json",children:"json"}),r.jsx(we,{value:"yaml",children:"yaml"})]})}),r.jsx(C.Item,{name:"savePath",label:n("manage.label.path"),trigger:"onChange",children:r.jsx(Ve,{placeholder:n("placeholder.savePath")})})]})})]}),r.jsx(ke.Content,{style:{height:"100%",padding:16,boxSizing:"border-box",overflow:"auto"},children:r.jsxs(je,{gutter:[16,16],style:{overflow:"hidden"},children:[r.jsx(Js,{colSpan:P}),r.jsx(U,{...P,children:r.jsx(Ds,{})}),r.jsx(U,{...P,children:r.jsx(Ws,{})}),r.jsx(U,{...P,children:r.jsx(E,{module:"auther"})}),r.jsx(U,{...P,children:r.jsx(E,{module:"admission"})}),r.jsx(U,{...P,children:r.jsx(E,{module:"bypass"})}),r.jsx(U,{...P,children:r.jsx(E,{module:"host"})}),r.jsx(U,{...P,children:r.jsx(E,{module:"ingress"})}),r.jsx(U,{...P,children:r.jsx(E,{module:"resolver"})}),r.jsx(U,{...P,children:r.jsx(E,{module:"sd"})}),r.jsx(U,{...P,children:r.jsx(E,{module:"observer"})}),r.jsx(U,{span:24,children:r.jsx(_e,{boxShadow:!0,title:n("manage.label.limit"),children:r.jsxs(je,{gutter:[16,16],children:[r.jsx(U,{...xe,children:r.jsx(E,{module:"limiter",bordered:!0,boxShadow:!1})}),r.jsx(U,{...xe,children:r.jsx(E,{module:"rlimiter",bordered:!0,boxShadow:!1})}),r.jsx(U,{...xe,children:r.jsx(E,{module:"climiter",bordered:!0,boxShadow:!1})})]})})}),r.jsx(U,{span:24,children:r.jsx(_e,{boxShadow:!0,title:n("manage.label.allConfig"),styles:{body:{padding:20}},children:r.jsx(ct,{className:"g-boder",value:Ue(s),height:500,language:"json",options:{minimap:{enabled:!1},readOnly:!0}})})})]})})]})};export{Cs as default}; diff --git a/assets/antd-15fa66a0.js b/assets/antd-af73db0d.js similarity index 99% rename from assets/antd-15fa66a0.js rename to assets/antd-af73db0d.js index d2cd716..d966faf 100644 --- a/assets/antd-15fa66a0.js +++ b/assets/antd-af73db0d.js @@ -387,4 +387,4 @@ html body { > ${t}-wrapper:only-child, > ${t}-expanded-row-fixed > ${t}-wrapper:only-child `]:{[t]:{marginBlock:H(v(r).mul(-1).equal()),marginInline:`${H(v(a).sub(o).equal())} - ${H(v(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:m,fontWeight:n,textAlign:"start",background:y,borderBottom:b,transition:`background ${g} ease`}}},[`${t}-footer`]:{padding:`${H(r)} ${H(o)}`,color:C,background:p}})}},DG=e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:i,controlItemBgActiveHover:l,padding:c,paddingSM:u,paddingXS:d,colorBorderSecondary:f,borderRadiusLG:m,controlHeight:g,colorTextPlaceholder:y,fontSize:h,fontSizeSM:C,lineHeight:p,lineWidth:v,colorIcon:b,colorIconHover:S,opacityLoading:$,controlInteractiveSize:x}=e,w=new Dt(o).onBackground(n).toHexShortString(),O=new Dt(a).onBackground(n).toHexShortString(),E=new Dt(t).onBackground(n).toHexShortString(),I=new Dt(b),T=new Dt(S),_=x/2-v,R=_*2+v*3;return{headerBg:E,headerColor:r,headerSortActiveBg:w,headerSortHoverBg:O,bodySortBg:E,rowHoverBg:E,rowSelectedBg:i,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:u,cellPaddingInlineMD:d,cellPaddingBlockSM:d,cellPaddingInlineSM:d,borderColor:f,headerBorderRadius:m,footerBg:E,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:f,fixedHeaderSortActiveBg:w,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:g,stickyScrollBarBg:y,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*p-v*3)/2-Math.ceil((C*1.4-v*3)/2),headerIconColor:I.clone().setAlpha(I.getAlpha()*$).toRgbString(),headerIconHoverColor:T.clone().setAlpha(T.getAlpha()*$).toRgbString(),expandIconHalfInner:_,expandIconSize:R,expandIconScale:x/R}},BG=_t("Table",e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:o,headerBg:a,headerColor:i,headerSortActiveBg:l,headerSortHoverBg:c,bodySortBg:u,rowHoverBg:d,rowSelectedBg:f,rowSelectedHoverBg:m,rowExpandedBg:g,cellPaddingBlock:y,cellPaddingInline:h,cellPaddingBlockMD:C,cellPaddingInlineMD:p,cellPaddingBlockSM:v,cellPaddingInlineSM:b,borderColor:S,footerBg:$,footerColor:x,headerBorderRadius:w,cellFontSize:O,cellFontSizeMD:E,cellFontSizeSM:I,headerSplitColor:T,fixedHeaderSortActiveBg:_,headerFilterHoverBg:R,filterDropdownBg:M,expandIconBg:L,selectionColumnWidth:z,stickyScrollBarBg:P,calc:N}=e,k=2,j=bt(e,{tableFontSize:O,tableBg:r,tableRadius:w,tablePaddingVertical:y,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:C,tablePaddingHorizontalMiddle:p,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:b,tableBorderColor:S,tableHeaderTextColor:i,tableHeaderBg:a,tableFooterTextColor:x,tableFooterBg:$,tableHeaderCellSplitColor:T,tableHeaderSortBg:l,tableHeaderSortHoverBg:c,tableBodySortBg:u,tableFixedHeaderSortActiveBg:_,tableHeaderFilterActiveBg:R,tableFilterDropdownBg:M,tableRowHoverBg:d,tableSelectedRowBg:f,tableSelectedRowHoverBg:m,zIndexTableFixed:k,zIndexTableSticky:k+1,tableFontSizeMiddle:E,tableFontSizeSmall:I,tableSelectionColumnWidth:z,tableExpandIconBg:L,tableExpandColumnWidth:N(o).add(N(e.padding).mul(2)).equal(),tableExpandedRowBg:g,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:P,tableScrollThumbBgHover:t,tableScrollBg:n});return[kG(j),SG(j),KS(j),TG(j),hG(j),cG(j),$G(j),pG(j),KS(j),mG(j),IG(j),bG(j),_G(j),dG(j),RG(j),EG(j),LG(j)]},DG,{unitless:{expandIconScale:!0}}),FG=[],AG=(e,t)=>{var n,r;const{prefixCls:o,className:a,rootClassName:i,style:l,size:c,bordered:u,dropdownPrefixCls:d,dataSource:f,pagination:m,rowSelection:g,rowKey:y="key",rowClassName:h,columns:C,children:p,childrenColumnName:v,onChange:b,getPopupContainer:S,loading:$,expandIcon:x,expandable:w,expandedRowRender:O,expandIconColumnIndex:E,indentSize:I,scroll:T,sortDirections:_,locale:R,showSorterTooltip:M={target:"full-header"},virtual:L}=e;Fo();const z=s.useMemo(()=>C||v0(p),[C,p]),P=s.useMemo(()=>z.some(Be=>Be.responsive),[z]),N=cO(P),k=s.useMemo(()=>{const Be=new Set(Object.keys(N).filter(Ee=>N[Ee]));return z.filter(Ee=>!Ee.responsive||Ee.responsive.some(be=>Be.has(be)))},[z,N]),j=Kt(e,["className","style","columns"]),{locale:B=go,direction:F,table:K,renderEmpty:X,getPrefixCls:U,getPopupContainer:re}=s.useContext(je),Z=sr(c),ne=Object.assign(Object.assign({},B.Table),R),le=f||FG,ee=U("table",o),q=U("dropdown",d),[,te]=mn(),J=gn(ee),[W,Y,de]=BG(ee,J),oe=Object.assign(Object.assign({childrenColumnName:v,expandIconColumnIndex:E},w),{expandIcon:(n=w==null?void 0:w.expandIcon)!==null&&n!==void 0?n:(r=K==null?void 0:K.expandable)===null||r===void 0?void 0:r.expandIcon}),{childrenColumnName:se="children"}=oe,ae=s.useMemo(()=>le.some(Be=>Be==null?void 0:Be[se])?"nest":O||w&&w.expandedRowRender?"row":null,[le]),ie={body:s.useRef()},pe=SK(ee),me=s.useRef(null),ge=s.useRef(null);bK(t,()=>Object.assign(Object.assign({},ge.current),{nativeElement:me.current}));const ve=s.useMemo(()=>typeof y=="function"?y:Be=>Be==null?void 0:Be[y],[y]),[$e]=VW(le,se,ve),we={},We=function(Be,Ee){let be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Ue,Ne,Te;const Fe=Object.assign(Object.assign({},we),Be);be&&((Ue=we.resetPagination)===null||Ue===void 0||Ue.call(we),!((Ne=Fe.pagination)===null||Ne===void 0)&&Ne.current&&(Fe.pagination.current=1),m&&m.onChange&&m.onChange(1,(Te=Fe.pagination)===null||Te===void 0?void 0:Te.pageSize)),T&&T.scrollToFirstRowOnChange!==!1&&ie.body.current&&cz(0,{getContainer:()=>ie.body.current}),b==null||b(Fe.pagination,Fe.filters,Fe.sorter,{currentDataSource:Zp(ev(le,Fe.sorterStates,se),Fe.filterStates,se),action:Ee})},_e=(Be,Ee)=>{We({sorter:Be,sorterStates:Ee},"sort",!1)},[Se,Ce,Oe,ke]=oG({prefixCls:ee,mergedColumns:k,onSorterChange:_e,sortDirections:_||["ascend","descend"],tableLocale:ne,showSorterTooltip:M}),Ze=s.useMemo(()=>ev(le,Ce,se),[le,Ce]);we.sorter=ke(),we.sorterStates=Ce;const He=(Be,Ee)=>{We({filters:Be,filterStates:Ee},"filter",!0)},[Ve,it,Je]=HW({prefixCls:ee,locale:ne,dropdownPrefixCls:q,mergedColumns:k,onFilterChange:He,getPopupContainer:S||re,rootClassName:V(i,J)}),Ae=Zp(Ze,it,se);we.filters=Je,we.filterStates=it;const lt=s.useMemo(()=>{const Be={};return Object.keys(Je).forEach(Ee=>{Je[Ee]!==null&&(Be[Ee]=Je[Ee])}),Object.assign(Object.assign({},Oe),{filters:Be})},[Oe,Je]),[ut]=aG(lt),St=(Be,Ee)=>{We({pagination:Object.assign(Object.assign({},we.pagination),{current:Be,pageSize:Ee})},"paginate")},[st,vt]=GW(Ae.length,St,m);we.pagination=m===!1?{}:WW(st,m),we.resetPagination=vt;const nt=s.useMemo(()=>{if(m===!1||!st.pageSize)return Ae;const{current:Be=1,total:Ee,pageSize:be=h2}=st;return Ae.lengthbe?Ae.slice((Be-1)*be,Be*be):Ae:Ae.slice((Be-1)*be,Be*be)},[!!m,Ae,st&&st.current,st&&st.pageSize,st&&st.total]),[Me,Xe]=hK({prefixCls:ee,data:Ae,pageData:nt,getRowKey:ve,getRecordByKey:$e,expandType:ae,childrenColumnName:se,locale:ne,getPopupContainer:S||re},g),De=(Be,Ee,be)=>{let Ue;return typeof h=="function"?Ue=V(h(Be,Ee,be)):Ue=V(h),V({[`${ee}-row-selected`]:Xe.has(ve(Be,Ee))},Ue)};oe.__PARENT_RENDER_ICON__=oe.expandIcon,oe.expandIcon=oe.expandIcon||x||CK(ne),ae==="nest"&&oe.expandIconColumnIndex===void 0?oe.expandIconColumnIndex=g?1:0:oe.expandIconColumnIndex>0&&g&&(oe.expandIconColumnIndex-=1),typeof oe.indentSize!="number"&&(oe.indentSize=typeof I=="number"?I:15);const xe=s.useCallback(Be=>ut(Me(Ve(Se(Be)))),[Se,Ve,Me]);let ze,rt;if(m!==!1&&(st!=null&&st.total)){let Be;st.size?Be=st.size:Be=Z==="small"||Z==="middle"?"small":void 0;const Ee=Ne=>s.createElement(i9,Object.assign({},st,{className:V(`${ee}-pagination ${ee}-pagination-${Ne}`,st.className),size:Be})),be=F==="rtl"?"left":"right",{position:Ue}=st;if(Ue!==null&&Array.isArray(Ue)){const Ne=Ue.find(ct=>ct.includes("top")),Te=Ue.find(ct=>ct.includes("bottom")),Fe=Ue.every(ct=>`${ct}`=="none");!Ne&&!Te&&!Fe&&(rt=Ee(be)),Ne&&(ze=Ee(Ne.toLowerCase().replace("top",""))),Te&&(rt=Ee(Te.toLowerCase().replace("bottom","")))}else rt=Ee(be)}let ye;typeof $=="boolean"?ye={spinning:$}:typeof $=="object"&&(ye=Object.assign({spinning:!0},$));const Re=V(de,J,`${ee}-wrapper`,K==null?void 0:K.className,{[`${ee}-wrapper-rtl`]:F==="rtl"},a,i,Y),Pe=Object.assign(Object.assign({},K==null?void 0:K.style),l),Ge=R&&R.emptyText||(X==null?void 0:X("Table"))||s.createElement(nO,{componentName:"Table"}),ot=L?lG:iG,et={},Et=s.useMemo(()=>{const{fontSize:Be,lineHeight:Ee,padding:be,paddingXS:Ue,paddingSM:Ne}=te,Te=Math.floor(Be*Ee);switch(Z){case"large":return be*2+Te;case"small":return Ue*2+Te;default:return Ne*2+Te}},[te,Z]);return L&&(et.listItemHeight=Et),W(s.createElement("div",{ref:me,className:Re,style:Pe},s.createElement(p9,Object.assign({spinning:!1},ye),ze,s.createElement(ot,Object.assign({},et,j,{ref:ge,columns:k,direction:F,expandable:oe,prefixCls:ee,className:V({[`${ee}-middle`]:Z==="middle",[`${ee}-small`]:Z==="small",[`${ee}-bordered`]:u,[`${ee}-empty`]:le.length===0},de,J,Y),data:nt,rowKey:ve,rowClassName:De,emptyText:Ge,internalHooks:pc,internalRefs:ie,transformColumns:xe,getContainerWidth:pe})),rt)))},HG=s.forwardRef(AG),VG=(e,t)=>{const n=s.useRef(0);return n.current+=1,s.createElement(HG,Object.assign({},e,{ref:t,_renderTimes:n.current}))},Vo=s.forwardRef(VG);Vo.SELECTION_COLUMN=Go;Vo.EXPAND_COLUMN=Xo;Vo.SELECTION_ALL=Up;Vo.SELECTION_INVERT=qp;Vo.SELECTION_NONE=Xp;Vo.Column=iK;Vo.ColumnGroup=lK;Vo.Summary=UI;const AU=Vo,KG=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o,calc:a}=e,i=a(r).sub(n).equal(),l=a(t).sub(n).equal();return{[o]:Object.assign(Object.assign({},zt(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${H(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},$0=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,o=e.fontSizeSM;return bt(e,{tagFontSize:o,tagLineHeight:H(r(e.lineHeightSM).mul(o).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},w0=e=>({defaultBg:new Dt(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),C2=_t("Tag",e=>{const t=$0(e);return KG(t)},w0);var WG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,style:r,className:o,checked:a,onChange:i,onClick:l}=e,c=WG(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:u,tag:d}=s.useContext(je),f=p=>{i==null||i(!a),l==null||l(p)},m=u("tag",n),[g,y,h]=C2(m),C=V(m,`${m}-checkable`,{[`${m}-checkable-checked`]:a},d==null?void 0:d.className,o,y,h);return g(s.createElement("span",Object.assign({},c,{ref:t,style:Object.assign(Object.assign({},r),d==null?void 0:d.style),className:C,onClick:f})))}),UG=GG,qG=e=>dw(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),XG=ti(["Tag","preset"],e=>{const t=$0(e);return qG(t)},w0);function YG(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Jc=(e,t,n)=>{const r=YG(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},QG=ti(["Tag","status"],e=>{const t=$0(e);return[Jc(t,"success","Success"),Jc(t,"processing","Info"),Jc(t,"error","Error"),Jc(t,"warning","Warning")]},w0);var ZG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,className:r,rootClassName:o,style:a,children:i,icon:l,color:c,onClose:u,bordered:d=!0,visible:f}=e,m=ZG(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:g,direction:y,tag:h}=s.useContext(je),[C,p]=s.useState(!0),v=Kt(m,["closeIcon","closable"]);s.useEffect(()=>{f!==void 0&&p(f)},[f]);const b=mO(c),S=gB(c),$=b||S,x=Object.assign(Object.assign({backgroundColor:c&&!$?c:void 0},h==null?void 0:h.style),a),w=g("tag",n),[O,E,I]=C2(w),T=V(w,h==null?void 0:h.className,{[`${w}-${c}`]:$,[`${w}-has-color`]:c&&!$,[`${w}-hidden`]:!C,[`${w}-rtl`]:y==="rtl",[`${w}-borderless`]:!d},r,o,E,I),_=N=>{N.stopPropagation(),u==null||u(N),!N.defaultPrevented&&p(!1)},[,R]=rE(sd(e),sd(h),{closable:!1,closeIconRender:N=>{const k=s.createElement("span",{className:`${w}-close-icon`,onClick:_},N);return Tw(N,k,j=>({onClick:B=>{var F;(F=j==null?void 0:j.onClick)===null||F===void 0||F.call(j,B),_(B)},className:V(j==null?void 0:j.className,`${w}-close-icon`)}))}}),M=typeof m.onClick=="function"||i&&i.type==="a",L=l||null,z=L?s.createElement(s.Fragment,null,L,i&&s.createElement("span",null,i)):i,P=s.createElement("span",Object.assign({},v,{ref:t,className:T,style:x}),z,R,b&&s.createElement(XG,{key:"preset",prefixCls:w}),S&&s.createElement(QG,{key:"status",prefixCls:w}));return O(M?s.createElement(ac,{component:"Tag"},P):P)}),S2=JG;S2.CheckableTag=UG;const HU=S2,eU=e=>{const t=e!=null&&e.algorithm?Ns(e.algorithm):Ns(Zs),n=Object.assign(Object.assign({},ol),e==null?void 0:e.token);return I$(n,{override:e==null?void 0:e.token},t,dh)},tU=eU;function nU(e){const{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}const rU=(e,t)=>{const n=t??Zs(e),r=n.fontSizeSM,o=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),nU(t??e)),Z$(r)),{controlHeight:o}),Q$(Object.assign(Object.assign({},n),{controlHeight:o})))},oU=rU,yo=(e,t)=>new Dt(e).setAlpha(t).toRgbString(),yi=(e,t)=>new Dt(e).lighten(t).toHexString(),aU=e=>{const t=Mo(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},iU=(e,t)=>{const n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:yo(r,.85),colorTextSecondary:yo(r,.65),colorTextTertiary:yo(r,.45),colorTextQuaternary:yo(r,.25),colorFill:yo(r,.18),colorFillSecondary:yo(r,.12),colorFillTertiary:yo(r,.08),colorFillQuaternary:yo(r,.04),colorBgElevated:yi(n,12),colorBgContainer:yi(n,8),colorBgLayout:yi(n,0),colorBgSpotlight:yi(n,26),colorBgBlur:yo(r,.04),colorBorder:yi(n,26),colorBorderSecondary:yi(n,19)}},lU=(e,t)=>{const n=Object.keys(sh).map(o=>{const a=Mo(e[o],{theme:"dark"});return new Array(10).fill(1).reduce((i,l,c)=>(i[`${o}-${c+1}`]=a[c],i[`${o}${c+1}`]=a[c],i),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=t??Zs(e);return Object.assign(Object.assign(Object.assign({},r),n),Y$(e,{generateColorPalettes:aU,generateNeutralColorPalettes:iU}))},sU=lU;function cU(){const[e,t,n]=mn();return{theme:e,token:t,hashId:n}}const VU={defaultConfig:_s,defaultSeed:_s.token,useToken:cU,defaultAlgorithm:Zs,darkAlgorithm:sU,compactAlgorithm:oU,getDesignToken:tU};var uU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const dU=uU;var fU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:dU}))},mU=s.forwardRef(fU);const KU=mU;var gU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};const pU=gU;var vU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:pU}))},hU=s.forwardRef(vU);const WU=hU;var yU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const bU=yU;var CU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:bU}))},SU=s.forwardRef(CU);const GU=SU;var xU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const $U=xU;var wU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:$U}))},EU=s.forwardRef(wU);const UU=EU;export{Pt as A,Lo as B,lI as C,KU as D,WU as E,MU as F,UU as G,FU as H,sH as I,VO as J,zU as L,LU as M,DU as P,d8 as R,gH as S,AU as T,ce as _,To as a,tv as b,OU as c,_U as d,bd as e,G as f,IU as g,tc as h,NU as i,V as j,vI as k,aO as l,jU as m,ec as n,RU as o,PU as p,GU as q,s as r,TA as s,VU as t,TU as u,kU as v,As as w,HU as x,Hs as y,BU as z}; + ${H(v(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:m,fontWeight:n,textAlign:"start",background:y,borderBottom:b,transition:`background ${g} ease`}}},[`${t}-footer`]:{padding:`${H(r)} ${H(o)}`,color:C,background:p}})}},DG=e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:i,controlItemBgActiveHover:l,padding:c,paddingSM:u,paddingXS:d,colorBorderSecondary:f,borderRadiusLG:m,controlHeight:g,colorTextPlaceholder:y,fontSize:h,fontSizeSM:C,lineHeight:p,lineWidth:v,colorIcon:b,colorIconHover:S,opacityLoading:$,controlInteractiveSize:x}=e,w=new Dt(o).onBackground(n).toHexShortString(),O=new Dt(a).onBackground(n).toHexShortString(),E=new Dt(t).onBackground(n).toHexShortString(),I=new Dt(b),T=new Dt(S),_=x/2-v,R=_*2+v*3;return{headerBg:E,headerColor:r,headerSortActiveBg:w,headerSortHoverBg:O,bodySortBg:E,rowHoverBg:E,rowSelectedBg:i,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:c,cellPaddingInline:c,cellPaddingBlockMD:u,cellPaddingInlineMD:d,cellPaddingBlockSM:d,cellPaddingInlineSM:d,borderColor:f,headerBorderRadius:m,footerBg:E,footerColor:r,cellFontSize:h,cellFontSizeMD:h,cellFontSizeSM:h,headerSplitColor:f,fixedHeaderSortActiveBg:w,headerFilterHoverBg:a,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:g,stickyScrollBarBg:y,stickyScrollBarBorderRadius:100,expandIconMarginTop:(h*p-v*3)/2-Math.ceil((C*1.4-v*3)/2),headerIconColor:I.clone().setAlpha(I.getAlpha()*$).toRgbString(),headerIconHoverColor:T.clone().setAlpha(T.getAlpha()*$).toRgbString(),expandIconHalfInner:_,expandIconSize:R,expandIconScale:x/R}},BG=_t("Table",e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:o,headerBg:a,headerColor:i,headerSortActiveBg:l,headerSortHoverBg:c,bodySortBg:u,rowHoverBg:d,rowSelectedBg:f,rowSelectedHoverBg:m,rowExpandedBg:g,cellPaddingBlock:y,cellPaddingInline:h,cellPaddingBlockMD:C,cellPaddingInlineMD:p,cellPaddingBlockSM:v,cellPaddingInlineSM:b,borderColor:S,footerBg:$,footerColor:x,headerBorderRadius:w,cellFontSize:O,cellFontSizeMD:E,cellFontSizeSM:I,headerSplitColor:T,fixedHeaderSortActiveBg:_,headerFilterHoverBg:R,filterDropdownBg:M,expandIconBg:L,selectionColumnWidth:z,stickyScrollBarBg:P,calc:N}=e,k=2,j=bt(e,{tableFontSize:O,tableBg:r,tableRadius:w,tablePaddingVertical:y,tablePaddingHorizontal:h,tablePaddingVerticalMiddle:C,tablePaddingHorizontalMiddle:p,tablePaddingVerticalSmall:v,tablePaddingHorizontalSmall:b,tableBorderColor:S,tableHeaderTextColor:i,tableHeaderBg:a,tableFooterTextColor:x,tableFooterBg:$,tableHeaderCellSplitColor:T,tableHeaderSortBg:l,tableHeaderSortHoverBg:c,tableBodySortBg:u,tableFixedHeaderSortActiveBg:_,tableHeaderFilterActiveBg:R,tableFilterDropdownBg:M,tableRowHoverBg:d,tableSelectedRowBg:f,tableSelectedRowHoverBg:m,zIndexTableFixed:k,zIndexTableSticky:k+1,tableFontSizeMiddle:E,tableFontSizeSmall:I,tableSelectionColumnWidth:z,tableExpandIconBg:L,tableExpandColumnWidth:N(o).add(N(e.padding).mul(2)).equal(),tableExpandedRowBg:g,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:P,tableScrollThumbBgHover:t,tableScrollBg:n});return[kG(j),SG(j),KS(j),TG(j),hG(j),cG(j),$G(j),pG(j),KS(j),mG(j),IG(j),bG(j),_G(j),dG(j),RG(j),EG(j),LG(j)]},DG,{unitless:{expandIconScale:!0}}),FG=[],AG=(e,t)=>{var n,r;const{prefixCls:o,className:a,rootClassName:i,style:l,size:c,bordered:u,dropdownPrefixCls:d,dataSource:f,pagination:m,rowSelection:g,rowKey:y="key",rowClassName:h,columns:C,children:p,childrenColumnName:v,onChange:b,getPopupContainer:S,loading:$,expandIcon:x,expandable:w,expandedRowRender:O,expandIconColumnIndex:E,indentSize:I,scroll:T,sortDirections:_,locale:R,showSorterTooltip:M={target:"full-header"},virtual:L}=e;Fo();const z=s.useMemo(()=>C||v0(p),[C,p]),P=s.useMemo(()=>z.some(Be=>Be.responsive),[z]),N=cO(P),k=s.useMemo(()=>{const Be=new Set(Object.keys(N).filter(Ee=>N[Ee]));return z.filter(Ee=>!Ee.responsive||Ee.responsive.some(be=>Be.has(be)))},[z,N]),j=Kt(e,["className","style","columns"]),{locale:B=go,direction:F,table:K,renderEmpty:X,getPrefixCls:U,getPopupContainer:re}=s.useContext(je),Z=sr(c),ne=Object.assign(Object.assign({},B.Table),R),le=f||FG,ee=U("table",o),q=U("dropdown",d),[,te]=mn(),J=gn(ee),[W,Y,de]=BG(ee,J),oe=Object.assign(Object.assign({childrenColumnName:v,expandIconColumnIndex:E},w),{expandIcon:(n=w==null?void 0:w.expandIcon)!==null&&n!==void 0?n:(r=K==null?void 0:K.expandable)===null||r===void 0?void 0:r.expandIcon}),{childrenColumnName:se="children"}=oe,ae=s.useMemo(()=>le.some(Be=>Be==null?void 0:Be[se])?"nest":O||w&&w.expandedRowRender?"row":null,[le]),ie={body:s.useRef()},pe=SK(ee),me=s.useRef(null),ge=s.useRef(null);bK(t,()=>Object.assign(Object.assign({},ge.current),{nativeElement:me.current}));const ve=s.useMemo(()=>typeof y=="function"?y:Be=>Be==null?void 0:Be[y],[y]),[$e]=VW(le,se,ve),we={},We=function(Be,Ee){let be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Ue,Ne,Te;const Fe=Object.assign(Object.assign({},we),Be);be&&((Ue=we.resetPagination)===null||Ue===void 0||Ue.call(we),!((Ne=Fe.pagination)===null||Ne===void 0)&&Ne.current&&(Fe.pagination.current=1),m&&m.onChange&&m.onChange(1,(Te=Fe.pagination)===null||Te===void 0?void 0:Te.pageSize)),T&&T.scrollToFirstRowOnChange!==!1&&ie.body.current&&cz(0,{getContainer:()=>ie.body.current}),b==null||b(Fe.pagination,Fe.filters,Fe.sorter,{currentDataSource:Zp(ev(le,Fe.sorterStates,se),Fe.filterStates,se),action:Ee})},_e=(Be,Ee)=>{We({sorter:Be,sorterStates:Ee},"sort",!1)},[Se,Ce,Oe,ke]=oG({prefixCls:ee,mergedColumns:k,onSorterChange:_e,sortDirections:_||["ascend","descend"],tableLocale:ne,showSorterTooltip:M}),Ze=s.useMemo(()=>ev(le,Ce,se),[le,Ce]);we.sorter=ke(),we.sorterStates=Ce;const He=(Be,Ee)=>{We({filters:Be,filterStates:Ee},"filter",!0)},[Ve,it,Je]=HW({prefixCls:ee,locale:ne,dropdownPrefixCls:q,mergedColumns:k,onFilterChange:He,getPopupContainer:S||re,rootClassName:V(i,J)}),Ae=Zp(Ze,it,se);we.filters=Je,we.filterStates=it;const lt=s.useMemo(()=>{const Be={};return Object.keys(Je).forEach(Ee=>{Je[Ee]!==null&&(Be[Ee]=Je[Ee])}),Object.assign(Object.assign({},Oe),{filters:Be})},[Oe,Je]),[ut]=aG(lt),St=(Be,Ee)=>{We({pagination:Object.assign(Object.assign({},we.pagination),{current:Be,pageSize:Ee})},"paginate")},[st,vt]=GW(Ae.length,St,m);we.pagination=m===!1?{}:WW(st,m),we.resetPagination=vt;const nt=s.useMemo(()=>{if(m===!1||!st.pageSize)return Ae;const{current:Be=1,total:Ee,pageSize:be=h2}=st;return Ae.lengthbe?Ae.slice((Be-1)*be,Be*be):Ae:Ae.slice((Be-1)*be,Be*be)},[!!m,Ae,st&&st.current,st&&st.pageSize,st&&st.total]),[Me,Xe]=hK({prefixCls:ee,data:Ae,pageData:nt,getRowKey:ve,getRecordByKey:$e,expandType:ae,childrenColumnName:se,locale:ne,getPopupContainer:S||re},g),De=(Be,Ee,be)=>{let Ue;return typeof h=="function"?Ue=V(h(Be,Ee,be)):Ue=V(h),V({[`${ee}-row-selected`]:Xe.has(ve(Be,Ee))},Ue)};oe.__PARENT_RENDER_ICON__=oe.expandIcon,oe.expandIcon=oe.expandIcon||x||CK(ne),ae==="nest"&&oe.expandIconColumnIndex===void 0?oe.expandIconColumnIndex=g?1:0:oe.expandIconColumnIndex>0&&g&&(oe.expandIconColumnIndex-=1),typeof oe.indentSize!="number"&&(oe.indentSize=typeof I=="number"?I:15);const xe=s.useCallback(Be=>ut(Me(Ve(Se(Be)))),[Se,Ve,Me]);let ze,rt;if(m!==!1&&(st!=null&&st.total)){let Be;st.size?Be=st.size:Be=Z==="small"||Z==="middle"?"small":void 0;const Ee=Ne=>s.createElement(i9,Object.assign({},st,{className:V(`${ee}-pagination ${ee}-pagination-${Ne}`,st.className),size:Be})),be=F==="rtl"?"left":"right",{position:Ue}=st;if(Ue!==null&&Array.isArray(Ue)){const Ne=Ue.find(ct=>ct.includes("top")),Te=Ue.find(ct=>ct.includes("bottom")),Fe=Ue.every(ct=>`${ct}`=="none");!Ne&&!Te&&!Fe&&(rt=Ee(be)),Ne&&(ze=Ee(Ne.toLowerCase().replace("top",""))),Te&&(rt=Ee(Te.toLowerCase().replace("bottom","")))}else rt=Ee(be)}let ye;typeof $=="boolean"?ye={spinning:$}:typeof $=="object"&&(ye=Object.assign({spinning:!0},$));const Re=V(de,J,`${ee}-wrapper`,K==null?void 0:K.className,{[`${ee}-wrapper-rtl`]:F==="rtl"},a,i,Y),Pe=Object.assign(Object.assign({},K==null?void 0:K.style),l),Ge=R&&R.emptyText||(X==null?void 0:X("Table"))||s.createElement(nO,{componentName:"Table"}),ot=L?lG:iG,et={},Et=s.useMemo(()=>{const{fontSize:Be,lineHeight:Ee,padding:be,paddingXS:Ue,paddingSM:Ne}=te,Te=Math.floor(Be*Ee);switch(Z){case"large":return be*2+Te;case"small":return Ue*2+Te;default:return Ne*2+Te}},[te,Z]);return L&&(et.listItemHeight=Et),W(s.createElement("div",{ref:me,className:Re,style:Pe},s.createElement(p9,Object.assign({spinning:!1},ye),ze,s.createElement(ot,Object.assign({},et,j,{ref:ge,columns:k,direction:F,expandable:oe,prefixCls:ee,className:V({[`${ee}-middle`]:Z==="middle",[`${ee}-small`]:Z==="small",[`${ee}-bordered`]:u,[`${ee}-empty`]:le.length===0},de,J,Y),data:nt,rowKey:ve,rowClassName:De,emptyText:Ge,internalHooks:pc,internalRefs:ie,transformColumns:xe,getContainerWidth:pe})),rt)))},HG=s.forwardRef(AG),VG=(e,t)=>{const n=s.useRef(0);return n.current+=1,s.createElement(HG,Object.assign({},e,{ref:t,_renderTimes:n.current}))},Vo=s.forwardRef(VG);Vo.SELECTION_COLUMN=Go;Vo.EXPAND_COLUMN=Xo;Vo.SELECTION_ALL=Up;Vo.SELECTION_INVERT=qp;Vo.SELECTION_NONE=Xp;Vo.Column=iK;Vo.ColumnGroup=lK;Vo.Summary=UI;const AU=Vo,KG=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o,calc:a}=e,i=a(r).sub(n).equal(),l=a(t).sub(n).equal();return{[o]:Object.assign(Object.assign({},zt(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${H(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:l,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},$0=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,o=e.fontSizeSM;return bt(e,{tagFontSize:o,tagLineHeight:H(r(e.lineHeightSM).mul(o).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},w0=e=>({defaultBg:new Dt(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),C2=_t("Tag",e=>{const t=$0(e);return KG(t)},w0);var WG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,style:r,className:o,checked:a,onChange:i,onClick:l}=e,c=WG(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:u,tag:d}=s.useContext(je),f=p=>{i==null||i(!a),l==null||l(p)},m=u("tag",n),[g,y,h]=C2(m),C=V(m,`${m}-checkable`,{[`${m}-checkable-checked`]:a},d==null?void 0:d.className,o,y,h);return g(s.createElement("span",Object.assign({},c,{ref:t,style:Object.assign(Object.assign({},r),d==null?void 0:d.style),className:C,onClick:f})))}),UG=GG,qG=e=>dw(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),XG=ti(["Tag","preset"],e=>{const t=$0(e);return qG(t)},w0);function YG(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Jc=(e,t,n)=>{const r=YG(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},QG=ti(["Tag","status"],e=>{const t=$0(e);return[Jc(t,"success","Success"),Jc(t,"processing","Info"),Jc(t,"error","Error"),Jc(t,"warning","Warning")]},w0);var ZG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o{const{prefixCls:n,className:r,rootClassName:o,style:a,children:i,icon:l,color:c,onClose:u,bordered:d=!0,visible:f}=e,m=ZG(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:g,direction:y,tag:h}=s.useContext(je),[C,p]=s.useState(!0),v=Kt(m,["closeIcon","closable"]);s.useEffect(()=>{f!==void 0&&p(f)},[f]);const b=mO(c),S=gB(c),$=b||S,x=Object.assign(Object.assign({backgroundColor:c&&!$?c:void 0},h==null?void 0:h.style),a),w=g("tag",n),[O,E,I]=C2(w),T=V(w,h==null?void 0:h.className,{[`${w}-${c}`]:$,[`${w}-has-color`]:c&&!$,[`${w}-hidden`]:!C,[`${w}-rtl`]:y==="rtl",[`${w}-borderless`]:!d},r,o,E,I),_=N=>{N.stopPropagation(),u==null||u(N),!N.defaultPrevented&&p(!1)},[,R]=rE(sd(e),sd(h),{closable:!1,closeIconRender:N=>{const k=s.createElement("span",{className:`${w}-close-icon`,onClick:_},N);return Tw(N,k,j=>({onClick:B=>{var F;(F=j==null?void 0:j.onClick)===null||F===void 0||F.call(j,B),_(B)},className:V(j==null?void 0:j.className,`${w}-close-icon`)}))}}),M=typeof m.onClick=="function"||i&&i.type==="a",L=l||null,z=L?s.createElement(s.Fragment,null,L,i&&s.createElement("span",null,i)):i,P=s.createElement("span",Object.assign({},v,{ref:t,className:T,style:x}),z,R,b&&s.createElement(XG,{key:"preset",prefixCls:w}),S&&s.createElement(QG,{key:"status",prefixCls:w}));return O(M?s.createElement(ac,{component:"Tag"},P):P)}),S2=JG;S2.CheckableTag=UG;const HU=S2,eU=e=>{const t=e!=null&&e.algorithm?Ns(e.algorithm):Ns(Zs),n=Object.assign(Object.assign({},ol),e==null?void 0:e.token);return I$(n,{override:e==null?void 0:e.token},t,dh)},tU=eU;function nU(e){const{sizeUnit:t,sizeStep:n}=e,r=n-2;return{sizeXXL:t*(r+10),sizeXL:t*(r+6),sizeLG:t*(r+2),sizeMD:t*(r+2),sizeMS:t*(r+1),size:t*r,sizeSM:t*r,sizeXS:t*(r-1),sizeXXS:t*(r-1)}}const rU=(e,t)=>{const n=t??Zs(e),r=n.fontSizeSM,o=n.controlHeight-4;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),nU(t??e)),Z$(r)),{controlHeight:o}),Q$(Object.assign(Object.assign({},n),{controlHeight:o})))},oU=rU,yo=(e,t)=>new Dt(e).setAlpha(t).toRgbString(),yi=(e,t)=>new Dt(e).lighten(t).toHexString(),aU=e=>{const t=Mo(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},iU=(e,t)=>{const n=e||"#000",r=t||"#fff";return{colorBgBase:n,colorTextBase:r,colorText:yo(r,.85),colorTextSecondary:yo(r,.65),colorTextTertiary:yo(r,.45),colorTextQuaternary:yo(r,.25),colorFill:yo(r,.18),colorFillSecondary:yo(r,.12),colorFillTertiary:yo(r,.08),colorFillQuaternary:yo(r,.04),colorBgElevated:yi(n,12),colorBgContainer:yi(n,8),colorBgLayout:yi(n,0),colorBgSpotlight:yi(n,26),colorBgBlur:yo(r,.04),colorBorder:yi(n,26),colorBorderSecondary:yi(n,19)}},lU=(e,t)=>{const n=Object.keys(sh).map(o=>{const a=Mo(e[o],{theme:"dark"});return new Array(10).fill(1).reduce((i,l,c)=>(i[`${o}-${c+1}`]=a[c],i[`${o}${c+1}`]=a[c],i),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),r=t??Zs(e);return Object.assign(Object.assign(Object.assign({},r),n),Y$(e,{generateColorPalettes:aU,generateNeutralColorPalettes:iU}))},sU=lU;function cU(){const[e,t,n]=mn();return{theme:e,token:t,hashId:n}}const VU={defaultConfig:_s,defaultSeed:_s.token,useToken:cU,defaultAlgorithm:Zs,darkAlgorithm:sU,compactAlgorithm:oU,getDesignToken:tU};var uU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const dU=uU;var fU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:dU}))},mU=s.forwardRef(fU);const KU=mU;var gU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};const pU=gU;var vU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:pU}))},hU=s.forwardRef(vU);const WU=hU;var yU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const bU=yU;var CU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:bU}))},SU=s.forwardRef(CU);const GU=SU;var xU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const $U=xU;var wU=function(t,n){return s.createElement(Pt,ce({},t,{ref:n,icon:$U}))},EU=s.forwardRef(wU);const UU=EU;export{Pt as A,Lo as B,lI as C,KU as D,WU as E,MU as F,BU as G,UU as H,sH as I,FU as J,VO as K,zU as L,LU as M,DU as P,d8 as R,gH as S,AU as T,ce as _,To as a,tv as b,OU as c,_U as d,bd as e,G as f,IU as g,tc as h,p9 as i,NU as j,V as k,vI as l,jU as m,aO as n,ec as o,RU as p,PU as q,s as r,GU as s,VU as t,TA as u,TU as v,kU as w,As as x,HU as y,Hs as z}; diff --git a/assets/index-9222c400.js b/assets/index-9222c400.js deleted file mode 100644 index b8354d6..0000000 --- a/assets/index-9222c400.js +++ /dev/null @@ -1,17 +0,0 @@ -var Bi=Object.defineProperty;var Ui=(t,e,r)=>e in t?Bi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>(Ui(t,typeof e!="symbol"?e+"":e,r),r);import{r as O,a as zi,g as Vi,c as Ki,b as qr,m as wr,A as Qe,_ as Xe,S as vo,R as Hi,C as qi,F as Wi,D as Gi,B as Wr,d as xe,I as Xt,e as Ji,f as Nt,h as ht,t as Yi,i as Qi}from"./antd-15fa66a0.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var bo={exports:{}},_t={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Xi=O,Zi=Symbol.for("react.element"),es=Symbol.for("react.fragment"),ts=Object.prototype.hasOwnProperty,rs=Xi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ns={key:!0,ref:!0,__self:!0,__source:!0};function wo(t,e,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)ts.call(e,n)&&!ns.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:Zi,type:t,key:i,ref:s,props:o,_owner:rs.current}}_t.Fragment=es;_t.jsx=wo;_t.jsxs=wo;bo.exports=_t;var x=bo.exports,Sr={},dn=zi;Sr.createRoot=dn.createRoot,Sr.hydrateRoot=dn.hydrateRoot;const os="modulepreload",is=function(t,e){return new URL(t,e).href},pn={},gt=function(e,r,n){if(!r||r.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=is(i,n),i in pn)return;pn[i]=!0;const s=i.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!n)for(let c=o.length-1;c>=0;c--){const d=o[c];if(d.href===i&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":os,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};var Gr={exports:{}},Le=typeof Reflect=="object"?Reflect:null,hn=Le&&typeof Le.apply=="function"?Le.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},mt;Le&&typeof Le.ownKeys=="function"?mt=Le.ownKeys:Object.getOwnPropertySymbols?mt=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:mt=function(e){return Object.getOwnPropertyNames(e)};function ss(t){console&&console.warn&&console.warn(t)}var So=Number.isNaN||function(e){return e!==e};function R(){R.init.call(this)}Gr.exports=R;Gr.exports.once=cs;R.EventEmitter=R;R.prototype._events=void 0;R.prototype._eventsCount=0;R.prototype._maxListeners=void 0;var gn=10;function It(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(R,"defaultMaxListeners",{enumerable:!0,get:function(){return gn},set:function(t){if(typeof t!="number"||t<0||So(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");gn=t}});R.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};R.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||So(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function xo(t){return t._maxListeners===void 0?R.defaultMaxListeners:t._maxListeners}R.prototype.getMaxListeners=function(){return xo(this)};R.prototype.emit=function(e){for(var r=[],n=1;n0&&(s=r[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(l===void 0)return!1;if(typeof l=="function")hn(l,this,r);else for(var u=l.length,c=Ao(l,u),n=0;n0&&s.length>o&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,ss(a)}return t}R.prototype.addListener=function(e,r){return Oo(this,e,r,!1)};R.prototype.on=R.prototype.addListener;R.prototype.prependListener=function(e,r){return Oo(this,e,r,!0)};function as(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Eo(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=as.bind(n);return o.listener=r,n.wrapFn=o,o}R.prototype.once=function(e,r){return It(r),this.on(e,Eo(this,e,r)),this};R.prototype.prependOnceListener=function(e,r){return It(r),this.prependListener(e,Eo(this,e,r)),this};R.prototype.removeListener=function(e,r){var n,o,i,s,a;if(It(r),o=this._events,o===void 0)return this;if(n=o[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){a=n[s].listener,i=s;break}if(i<0)return this;i===0?n.shift():ls(n,i),n.length===1&&(o[e]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",e,a||r)}return this};R.prototype.off=R.prototype.removeListener;R.prototype.removeAllListeners=function(e){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),s;for(o=0;o=0;o--)this.removeListener(e,r[o]);return this};function Po(t,e,r){var n=t._events;if(n===void 0)return[];var o=n[e];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?us(o):Ao(o,o.length)}R.prototype.listeners=function(e){return Po(this,e,!0)};R.prototype.rawListeners=function(e){return Po(this,e,!1)};R.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):$o.call(t,e)};R.prototype.listenerCount=$o;function $o(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}R.prototype.eventNames=function(){return this._eventsCount>0?mt(this._events):[]};function Ao(t,e){for(var r=new Array(e),n=0;ni,e=s=>{i=s}}const n=new Ro.EventEmitter;n.on("setValue",function(i){e(i),n.emit("upValue",i)}),r&&e(r);const o=i=>{const[s,a]=O.useState(t?t():void 0);return O.useEffect(()=>(i&&n.emit("setValue",i),n.on("upValue",a),()=>{n.off("upValue",a)}),[]),s};return o.set=i=>{n.emit("setValue",i)},o.get=()=>t==null?void 0:t(),o}function Co(t,e){return function(){return t.apply(e,arguments)}}const{toString:ds}=Object.prototype,{getPrototypeOf:Jr}=Object,kt=(t=>e=>{const r=ds.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),oe=t=>(t=t.toLowerCase(),e=>kt(e)===t),Dt=t=>e=>typeof e===t,{isArray:Te}=Array,Je=Dt("undefined");function ps(t){return t!==null&&!Je(t)&&t.constructor!==null&&!Je(t.constructor)&&J(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const No=oe("ArrayBuffer");function hs(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&No(t.buffer),e}const gs=Dt("string"),J=Dt("function"),_o=Dt("number"),Ft=t=>t!==null&&typeof t=="object",ms=t=>t===!0||t===!1,yt=t=>{if(kt(t)!=="object")return!1;const e=Jr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},ys=oe("Date"),vs=oe("File"),bs=oe("Blob"),ws=oe("FileList"),Ss=t=>Ft(t)&&J(t.pipe),xs=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||J(t.append)&&((e=kt(t))==="formdata"||e==="object"&&J(t.toString)&&t.toString()==="[object FormData]"))},Os=oe("URLSearchParams"),Es=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ze(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),Te(t))for(n=0,o=t.length;n0;)if(o=r[n],e===o.toLowerCase())return o;return null}const To=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ko=t=>!Je(t)&&t!==To;function xr(){const{caseless:t}=ko(this)&&this||{},e={},r=(n,o)=>{const i=t&&Io(e,o)||o;yt(e[i])&&yt(n)?e[i]=xr(e[i],n):yt(n)?e[i]=xr({},n):Te(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n(Ze(e,(o,i)=>{r&&J(o)?t[i]=Co(o,r):t[i]=o},{allOwnKeys:n}),t),$s=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),As=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Ls=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Jr(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Rs=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Cs=t=>{if(!t)return null;if(Te(t))return t;let e=t.length;if(!_o(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Ns=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Jr(Uint8Array)),_s=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},Is=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Ts=oe("HTMLFormElement"),ks=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),mn=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Ds=oe("RegExp"),Do=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Ze(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},Fs=t=>{Do(t,(e,r)=>{if(J(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(J(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},js=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Te(t)?n(t):n(String(t).split(e)),r},Ms=()=>{},Bs=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Zt="abcdefghijklmnopqrstuvwxyz",yn="0123456789",Fo={DIGIT:yn,ALPHA:Zt,ALPHA_DIGIT:Zt+Zt.toUpperCase()+yn},Us=(t=16,e=Fo.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function zs(t){return!!(t&&J(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Vs=t=>{const e=new Array(10),r=(n,o)=>{if(Ft(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const i=Te(n)?[]:{};return Ze(n,(s,a)=>{const l=r(s,o+1);!Je(l)&&(i[a]=l)}),e[o]=void 0,i}}return n};return r(t,0)},Ks=oe("AsyncFunction"),Hs=t=>t&&(Ft(t)||J(t))&&J(t.then)&&J(t.catch),g={isArray:Te,isArrayBuffer:No,isBuffer:ps,isFormData:xs,isArrayBufferView:hs,isString:gs,isNumber:_o,isBoolean:ms,isObject:Ft,isPlainObject:yt,isUndefined:Je,isDate:ys,isFile:vs,isBlob:bs,isRegExp:Ds,isFunction:J,isStream:Ss,isURLSearchParams:Os,isTypedArray:Ns,isFileList:ws,forEach:Ze,merge:xr,extend:Ps,trim:Es,stripBOM:$s,inherits:As,toFlatObject:Ls,kindOf:kt,kindOfTest:oe,endsWith:Rs,toArray:Cs,forEachEntry:_s,matchAll:Is,isHTMLForm:Ts,hasOwnProperty:mn,hasOwnProp:mn,reduceDescriptors:Do,freezeMethods:Fs,toObjectSet:js,toCamelCase:ks,noop:Ms,toFiniteNumber:Bs,findKey:Io,global:To,isContextDefined:ko,ALPHABET:Fo,generateString:Us,isSpecCompliantForm:zs,toJSONObject:Vs,isAsyncFn:Ks,isThenable:Hs};function L(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}g.inherits(L,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:g.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const jo=L.prototype,Mo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Mo[t]={value:t}});Object.defineProperties(L,Mo);Object.defineProperty(jo,"isAxiosError",{value:!0});L.from=(t,e,r,n,o,i)=>{const s=Object.create(jo);return g.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),L.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const qs=null;function Or(t){return g.isPlainObject(t)||g.isArray(t)}function Bo(t){return g.endsWith(t,"[]")?t.slice(0,-2):t}function vn(t,e,r){return t?t.concat(e).map(function(o,i){return o=Bo(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function Ws(t){return g.isArray(t)&&!t.some(Or)}const Gs=g.toFlatObject(g,{},null,function(e){return/^is[A-Z]/.test(e)});function jt(t,e,r){if(!g.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=g.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!g.isUndefined(y[h])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&g.isSpecCompliantForm(e);if(!g.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(g.isDate(p))return p.toISOString();if(!l&&g.isBlob(p))throw new L("Blob is not supported. Use a Buffer instead.");return g.isArrayBuffer(p)||g.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,y){let v=p;if(p&&!y&&typeof p=="object"){if(g.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(g.isArray(p)&&Ws(p)||(g.isFileList(p)||g.endsWith(h,"[]"))&&(v=g.toArray(p)))return h=Bo(h),v.forEach(function(w,S){!(g.isUndefined(w)||w===null)&&e.append(s===!0?vn([h],S,i):s===null?h:h+"[]",u(w))}),!1}return Or(p)?!0:(e.append(vn(y,h,i),u(p)),!1)}const d=[],f=Object.assign(Gs,{defaultVisitor:c,convertValue:u,isVisitable:Or});function m(p,h){if(!g.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(p),g.forEach(p,function(v,b){(!(g.isUndefined(v)||v===null)&&o.call(e,v,g.isString(b)?b.trim():b,h,f))===!0&&m(v,h?h.concat(b):[b])}),d.pop()}}if(!g.isObject(t))throw new TypeError("data must be an object");return m(t),e}function bn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Yr(t,e){this._pairs=[],t&&jt(t,this,e)}const Uo=Yr.prototype;Uo.append=function(e,r){this._pairs.push([e,r])};Uo.toString=function(e){const r=e?function(n){return e.call(this,n,bn)}:bn;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Js(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function zo(t,e,r){if(!e)return t;const n=r&&r.encode||Js,o=r&&r.serialize;let i;if(o?i=o(e,r):i=g.isURLSearchParams(e)?e.toString():new Yr(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Ys{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){g.forEach(this.handlers,function(n){n!==null&&e(n)})}}const wn=Ys,Vo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qs=typeof URLSearchParams<"u"?URLSearchParams:Yr,Xs=typeof FormData<"u"?FormData:null,Zs=typeof Blob<"u"?Blob:null,ea={isBrowser:!0,classes:{URLSearchParams:Qs,FormData:Xs,Blob:Zs},protocols:["http","https","file","blob","url","data"]},Ko=typeof window<"u"&&typeof document<"u",ta=(t=>Ko&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),ra=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),na=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ko,hasStandardBrowserEnv:ta,hasStandardBrowserWebWorkerEnv:ra},Symbol.toStringTag,{value:"Module"})),re={...na,...ea};function oa(t,e){return jt(t,new re.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return re.isNode&&g.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function ia(t){return g.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function sa(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n=r.length;return s=!s&&g.isArray(o)?o.length:s,l?(g.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!g.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&g.isArray(o[s])&&(o[s]=sa(o[s])),!a)}if(g.isFormData(t)&&g.isFunction(t.entries)){const r={};return g.forEachEntry(t,(n,o)=>{e(ia(n),o,r,0)}),r}return null}function aa(t,e,r){if(g.isString(t))try{return(e||JSON.parse)(t),g.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Qr={transitional:Vo,adapter:["xhr","http"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=g.isObject(e);if(i&&g.isHTMLForm(e)&&(e=new FormData(e)),g.isFormData(e))return o?JSON.stringify(Ho(e)):e;if(g.isArrayBuffer(e)||g.isBuffer(e)||g.isStream(e)||g.isFile(e)||g.isBlob(e))return e;if(g.isArrayBufferView(e))return e.buffer;if(g.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return oa(e,this.formSerializer).toString();if((a=g.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return jt(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),aa(e)):e}],transformResponse:[function(e){const r=this.transitional||Qr.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(e&&g.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?L.from(a,L.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:re.classes.FormData,Blob:re.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};g.forEach(["delete","get","head","post","put","patch"],t=>{Qr.headers[t]={}});const Xr=Qr,la=g.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ua=t=>{const e={};let r,n,o;return t&&t.split(` -`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&la[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Sn=Symbol("internals");function Me(t){return t&&String(t).trim().toLowerCase()}function vt(t){return t===!1||t==null?t:g.isArray(t)?t.map(vt):String(t)}function ca(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const fa=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function er(t,e,r,n,o){if(g.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!g.isString(e)){if(g.isString(n))return e.indexOf(n)!==-1;if(g.isRegExp(n))return n.test(e)}}function da(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function pa(t,e){const r=g.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}class Mt{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function i(a,l,u){const c=Me(l);if(!c)throw new Error("header name must be a non-empty string");const d=g.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=vt(a))}const s=(a,l)=>g.forEach(a,(u,c)=>i(u,c,l));return g.isPlainObject(e)||e instanceof this.constructor?s(e,r):g.isString(e)&&(e=e.trim())&&!fa(e)?s(ua(e),r):e!=null&&i(r,e,n),this}get(e,r){if(e=Me(e),e){const n=g.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return ca(o);if(g.isFunction(r))return r.call(this,o,n);if(g.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Me(e),e){const n=g.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||er(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function i(s){if(s=Me(s),s){const a=g.findKey(n,s);a&&(!r||er(n,n[a],a,r))&&(delete n[a],o=!0)}}return g.isArray(e)?e.forEach(i):i(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!e||er(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const r=this,n={};return g.forEach(this,(o,i)=>{const s=g.findKey(n,i);if(s){r[s]=vt(o),delete r[i];return}const a=e?da(i):String(i).trim();a!==i&&delete r[i],r[a]=vt(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return g.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&g.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[Sn]=this[Sn]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Me(s);n[a]||(pa(o,s),n[a]=!0)}return g.isArray(e)?e.forEach(i):i(e),this}}Mt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);g.reduceDescriptors(Mt.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});g.freezeMethods(Mt);const ae=Mt;function tr(t,e){const r=this||Xr,n=e||r,o=ae.from(n.headers);let i=n.data;return g.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function qo(t){return!!(t&&t.__CANCEL__)}function et(t,e,r){L.call(this,t??"canceled",L.ERR_CANCELED,e,r),this.name="CanceledError"}g.inherits(et,L,{__CANCEL__:!0});function ha(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new L("Request failed with status code "+r.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const ga=re.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const s=[t+"="+encodeURIComponent(e)];g.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),g.isString(n)&&s.push("path="+n),g.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ma(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ya(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Wo(t,e){return t&&!ma(e)?ya(t,e):e}const va=re.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let s=i;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(s){const a=g.isString(s)?o(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function ba(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function wa(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let d=i,f=0;for(;d!==o;)f+=r[d++],d=d%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,l=n(a),u=i<=s;r=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-i)/l:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const Sa=typeof XMLHttpRequest<"u",xa=Sa&&function(t){return new Promise(function(r,n){let o=t.data;const i=ae.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,l;function u(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let c;if(g.isFormData(o)){if(re.hasStandardBrowserEnv||re.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[h,...y]=c?c.split(";").map(v=>v.trim()).filter(Boolean):[];i.setContentType([h||"multipart/form-data",...y].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const h=t.auth.username||"",y=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+y))}const f=Wo(t.baseURL,t.url);d.open(t.method.toUpperCase(),zo(f,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function m(){if(!d)return;const h=ae.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),v={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:t,request:d};ha(function(w){r(w),u()},function(w){n(w),u()},v),d=null}if("onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(n(new L("Request aborted",L.ECONNABORTED,t,d)),d=null)},d.onerror=function(){n(new L("Network Error",L.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let y=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const v=t.transitional||Vo;t.timeoutErrorMessage&&(y=t.timeoutErrorMessage),n(new L(y,v.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,t,d)),d=null},re.hasStandardBrowserEnv&&(a&&g.isFunction(a)&&(a=a(t)),a||a!==!1&&va(f))){const h=t.xsrfHeaderName&&t.xsrfCookieName&&ga.read(t.xsrfCookieName);h&&i.set(t.xsrfHeaderName,h)}o===void 0&&i.setContentType(null),"setRequestHeader"in d&&g.forEach(i.toJSON(),function(y,v){d.setRequestHeader(v,y)}),g.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",xn(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",xn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=h=>{d&&(n(!h||h.type?new et(null,t,d):h),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=ba(f);if(p&&re.protocols.indexOf(p)===-1){n(new L("Unsupported protocol "+p+":",L.ERR_BAD_REQUEST,t));return}d.send(o||null)})},Er={http:qs,xhr:xa};g.forEach(Er,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const On=t=>`- ${t}`,Oa=t=>g.isFunction(t)||t===null||t===!1,Go={getAdapter:t=>{t=g.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since : -`+i.map(On).join(` -`):" "+On(i[0]):"as no adapter specified";throw new L("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Er};function rr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new et(null,t)}function En(t){return rr(t),t.headers=ae.from(t.headers),t.data=tr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Go.getAdapter(t.adapter||Xr.adapter)(t).then(function(n){return rr(t),n.data=tr.call(t,t.transformResponse,n),n.headers=ae.from(n.headers),n},function(n){return qo(n)||(rr(t),n&&n.response&&(n.response.data=tr.call(t,t.transformResponse,n.response),n.response.headers=ae.from(n.response.headers))),Promise.reject(n)})}const Pn=t=>t instanceof ae?{...t}:t;function Ce(t,e){e=e||{};const r={};function n(u,c,d){return g.isPlainObject(u)&&g.isPlainObject(c)?g.merge.call({caseless:d},u,c):g.isPlainObject(c)?g.merge({},c):g.isArray(c)?c.slice():c}function o(u,c,d){if(g.isUndefined(c)){if(!g.isUndefined(u))return n(void 0,u,d)}else return n(u,c,d)}function i(u,c){if(!g.isUndefined(c))return n(void 0,c)}function s(u,c){if(g.isUndefined(c)){if(!g.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,d){if(d in e)return n(u,c);if(d in t)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>o(Pn(u),Pn(c),!0)};return g.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||o,f=d(t[c],e[c],c);g.isUndefined(f)&&d!==a||(r[c]=f)}),r}const Jo="1.6.8",Zr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Zr[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const $n={};Zr.transitional=function(e,r,n){function o(i,s){return"[Axios v"+Jo+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(e===!1)throw new L(o(s," has been removed"+(r?" in "+r:"")),L.ERR_DEPRECATED);return r&&!$n[s]&&($n[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,a):!0}};function Ea(t,e,r){if(typeof t!="object")throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const a=t[i],l=a===void 0||s(a,i,t);if(l!==!0)throw new L("option "+i+" must be "+l,L.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new L("Unknown option "+i,L.ERR_BAD_OPTION)}}const Pr={assertOptions:Ea,validators:Zr},ue=Pr.validators;class xt{constructor(e){this.defaults=e,this.interceptors={request:new wn,response:new wn}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` -`+i):n.stack=i}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Ce(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Pr.assertOptions(n,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),o!=null&&(g.isFunction(o)?r.paramsSerializer={serialize:o}:Pr.assertOptions(o,{encode:ue.function,serialize:ue.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&g.merge(i.common,i[r.method]);i&&g.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=ae.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(l=l&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let c,d=0,f;if(!l){const p=[En.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),f=p.length,c=Promise.resolve(r);d{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new et(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new en(function(o){e=o}),cancel:e}}}const Pa=en;function $a(t){return function(r){return t.apply(null,r)}}function Aa(t){return g.isObject(t)&&t.isAxiosError===!0}const $r={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($r).forEach(([t,e])=>{$r[e]=t});const La=$r;function Yo(t){const e=new bt(t),r=Co(bt.prototype.request,e);return g.extend(r,bt.prototype,e,{allOwnKeys:!0}),g.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Yo(Ce(t,o))},r}const N=Yo(Xr);N.Axios=bt;N.CanceledError=et;N.CancelToken=Pa;N.isCancel=qo;N.VERSION=Jo;N.toFormData=jt;N.AxiosError=L;N.Cancel=N.CanceledError;N.all=function(e){return Promise.all(e)};N.spread=$a;N.isAxiosError=Aa;N.mergeConfig=Ce;N.AxiosHeaders=ae;N.formToJSON=t=>Ho(g.isHTMLForm(t)?new FormData(t):t);N.getAdapter=Go.getAdapter;N.HttpStatusCode=La;N.default=N;const Qo=N;var Ra=Error,Ca=EvalError,Na=RangeError,_a=ReferenceError,Xo=SyntaxError,tt=TypeError,Ia=URIError,Ta=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==o||s.enumerable!==!0)return!1}return!0},An=typeof Symbol<"u"&&Symbol,ka=Ta,Da=function(){return typeof An!="function"||typeof Symbol!="function"||typeof An("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ka()},nr={__proto__:null,foo:{}},Fa=Object,ja=function(){return{__proto__:nr}.foo===nr.foo&&!(nr instanceof Fa)},Ma="Function.prototype.bind called on incompatible ",Ba=Object.prototype.toString,Ua=Math.max,za="[object Function]",Ln=function(e,r){for(var n=[],o=0;o"u"||!I?$:I(Uint8Array),ye={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?$:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?$:ArrayBuffer,"%ArrayIteratorPrototype%":Oe&&I?I([][Symbol.iterator]()):$,"%AsyncFromSyncIteratorPrototype%":$,"%AsyncFunction%":Ae,"%AsyncGenerator%":Ae,"%AsyncGeneratorFunction%":Ae,"%AsyncIteratorPrototype%":Ae,"%Atomics%":typeof Atomics>"u"?$:Atomics,"%BigInt%":typeof BigInt>"u"?$:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?$:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?$:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?$:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Qa,"%eval%":eval,"%EvalError%":Xa,"%Float32Array%":typeof Float32Array>"u"?$:Float32Array,"%Float64Array%":typeof Float64Array>"u"?$:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?$:FinalizationRegistry,"%Function%":Zo,"%GeneratorFunction%":Ae,"%Int8Array%":typeof Int8Array>"u"?$:Int8Array,"%Int16Array%":typeof Int16Array>"u"?$:Int16Array,"%Int32Array%":typeof Int32Array>"u"?$:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oe&&I?I(I([][Symbol.iterator]())):$,"%JSON%":typeof JSON=="object"?JSON:$,"%Map%":typeof Map>"u"?$:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Oe||!I?$:I(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?$:Promise,"%Proxy%":typeof Proxy>"u"?$:Proxy,"%RangeError%":Za,"%ReferenceError%":el,"%Reflect%":typeof Reflect>"u"?$:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?$:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Oe||!I?$:I(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?$:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oe&&I?I(""[Symbol.iterator]()):$,"%Symbol%":Oe?Symbol:$,"%SyntaxError%":Ne,"%ThrowTypeError%":rl,"%TypedArray%":ol,"%TypeError%":Re,"%Uint8Array%":typeof Uint8Array>"u"?$:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?$:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?$:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?$:Uint32Array,"%URIError%":tl,"%WeakMap%":typeof WeakMap>"u"?$:WeakMap,"%WeakRef%":typeof WeakRef>"u"?$:WeakRef,"%WeakSet%":typeof WeakSet>"u"?$:WeakSet};if(I)try{null.error}catch(t){var il=I(I(t));ye["%Error.prototype%"]=il}var sl=function t(e){var r;if(e==="%AsyncFunction%")r=or("async function () {}");else if(e==="%GeneratorFunction%")r=or("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=or("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&I&&(r=I(o.prototype))}return ye[e]=r,r},Rn={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},rt=tn,Ot=Ya,al=rt.call(Function.call,Array.prototype.concat),ll=rt.call(Function.apply,Array.prototype.splice),Cn=rt.call(Function.call,String.prototype.replace),Et=rt.call(Function.call,String.prototype.slice),ul=rt.call(Function.call,RegExp.prototype.exec),cl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fl=/\\(\\)?/g,dl=function(e){var r=Et(e,0,1),n=Et(e,-1);if(r==="%"&&n!=="%")throw new Ne("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ne("invalid intrinsic syntax, expected opening `%`");var o=[];return Cn(e,cl,function(i,s,a,l){o[o.length]=a?Cn(l,fl,"$1"):s||i}),o},pl=function(e,r){var n=e,o;if(Ot(Rn,n)&&(o=Rn[n],n="%"+o[0]+"%"),Ot(ye,n)){var i=ye[n];if(i===Ae&&(i=sl(n)),typeof i>"u"&&!r)throw new Re("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ne("intrinsic "+e+" does not exist!")},ke=function(e,r){if(typeof e!="string"||e.length===0)throw new Re("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Re('"allowMissing" argument must be a boolean');if(ul(/^%?[^%]*%?$/,e)===null)throw new Ne("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=dl(e),o=n.length>0?n[0]:"",i=pl("%"+o+"%",r),s=i.name,a=i.value,l=!1,u=i.alias;u&&(o=u[0],ll(n,al([0,1],u)));for(var c=1,d=!0;c=n.length){var h=me(a,f);d=!!h,d&&"get"in h&&!("originalValue"in h.get)?a=h.get:a=a[f]}else d=Ot(a,f),a=a[f];d&&!l&&(ye[s]=a)}}return a},ei={exports:{}},sr,Nn;function rn(){if(Nn)return sr;Nn=1;var t=ke,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return sr=e,sr}var hl=ke,wt=hl("%Object.getOwnPropertyDescriptor%",!0);if(wt)try{wt([],"length")}catch{wt=null}var ti=wt,_n=rn(),gl=Xo,Ee=tt,In=ti,ml=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ee("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Ee("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ee("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ee("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ee("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ee("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!In&&In(e,r);if(_n)_n(e,r,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:n,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)e[r]=n;else throw new gl("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ar=rn(),ri=function(){return!!Ar};ri.hasArrayLengthDefineBug=function(){if(!Ar)return null;try{return Ar([],"length",{value:1}).length!==1}catch{return!0}};var yl=ri,vl=ke,Tn=ml,bl=yl(),kn=ti,Dn=tt,wl=vl("%Math.floor%"),Sl=function(e,r){if(typeof e!="function")throw new Dn("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||wl(r)!==r)throw new Dn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&kn){var s=kn(e,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!n)&&(bl?Tn(e,"length",r,!0,!0):Tn(e,"length",r)),e};(function(t){var e=tn,r=ke,n=Sl,o=tt,i=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(s,i),l=rn(),u=r("%Math.max%");t.exports=function(f){if(typeof f!="function")throw new o("a function is required");var m=a(e,s,arguments);return n(m,1+u(0,f.length-(arguments.length-1)),!0)};var c=function(){return a(e,i,arguments)};l?l(t.exports,"apply",{value:c}):t.exports.apply=c})(ei);var xl=ei.exports,ni=ke,oi=xl,Ol=oi(ni("String.prototype.indexOf")),El=function(e,r){var n=ni(e,!!r);return typeof n=="function"&&Ol(e,".prototype.")>-1?oi(n):n};const Pl={},$l=Object.freeze(Object.defineProperty({__proto__:null,default:Pl},Symbol.toStringTag,{value:"Module"})),Al=Vi($l);var nn=typeof Map=="function"&&Map.prototype,ar=Object.getOwnPropertyDescriptor&&nn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pt=nn&&ar&&typeof ar.get=="function"?ar.get:null,Fn=nn&&Map.prototype.forEach,on=typeof Set=="function"&&Set.prototype,lr=Object.getOwnPropertyDescriptor&&on?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,$t=on&&lr&&typeof lr.get=="function"?lr.get:null,jn=on&&Set.prototype.forEach,Ll=typeof WeakMap=="function"&&WeakMap.prototype,He=Ll?WeakMap.prototype.has:null,Rl=typeof WeakSet=="function"&&WeakSet.prototype,qe=Rl?WeakSet.prototype.has:null,Cl=typeof WeakRef=="function"&&WeakRef.prototype,Mn=Cl?WeakRef.prototype.deref:null,Nl=Boolean.prototype.valueOf,_l=Object.prototype.toString,Il=Function.prototype.toString,Tl=String.prototype.match,sn=String.prototype.slice,de=String.prototype.replace,kl=String.prototype.toUpperCase,Bn=String.prototype.toLowerCase,ii=RegExp.prototype.test,Un=Array.prototype.concat,te=Array.prototype.join,Dl=Array.prototype.slice,zn=Math.floor,Lr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ur=Object.getOwnPropertySymbols,Rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,_e=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_e||"symbol")?Symbol.toStringTag:null,si=Object.prototype.propertyIsEnumerable,Vn=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Kn(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||ii.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-zn(-t):zn(t);if(n!==t){var o=String(n),i=sn.call(e,o.length+1);return de.call(o,r,"$&_")+"."+de.call(de.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return de.call(e,r,"$&_")}var Cr=Al,Hn=Cr.custom,qn=li(Hn)?Hn:null,Fl=function t(e,r,n,o){var i=r||{};if(ce(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ce(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ce(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ce(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ce(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return ci(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?Kn(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return a?Kn(e,u):u}var c=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof e=="object")return Nr(e)?"[Array]":"[Object]";var d=tu(i,n);if(typeof o>"u")o=[];else if(ui(o,e)>=0)return"[Circular]";function f(H,V,K){if(V&&(o=Dl.call(o),o.push(V)),K){var Y={depth:i.depth};return ce(i,"quoteStyle")&&(Y.quoteStyle=i.quoteStyle),t(H,Y,n+1,o)}return t(H,i,n+1,o)}if(typeof e=="function"&&!Wn(e)){var m=ql(e),p=at(e,f);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(p.length>0?" { "+te.call(p,", ")+" }":"")}if(li(e)){var h=_e?de.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Rr.call(e);return typeof e=="object"&&!_e?Be(h):h}if(Xl(e)){for(var y="<"+Bn.call(String(e.nodeName)),v=e.attributes||[],b=0;b",y}if(Nr(e)){if(e.length===0)return"[]";var w=at(e,f);return d&&!eu(w)?"["+_r(w,d)+"]":"[ "+te.call(w,", ")+" ]"}if(Bl(e)){var S=at(e,f);return!("cause"in Error.prototype)&&"cause"in e&&!si.call(e,"cause")?"{ ["+String(e)+"] "+te.call(Un.call("[cause]: "+f(e.cause),S),", ")+" }":S.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+te.call(S,", ")+" }"}if(typeof e=="object"&&s){if(qn&&typeof e[qn]=="function"&&Cr)return Cr(e,{depth:c-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Wl(e)){var A=[];return Fn&&Fn.call(e,function(H,V){A.push(f(V,e,!0)+" => "+f(H,e))}),Gn("Map",Pt.call(e),A,d)}if(Yl(e)){var P=[];return jn&&jn.call(e,function(H){P.push(f(H,e))}),Gn("Set",$t.call(e),P,d)}if(Gl(e))return cr("WeakMap");if(Ql(e))return cr("WeakSet");if(Jl(e))return cr("WeakRef");if(zl(e))return Be(f(Number(e)));if(Kl(e))return Be(f(Lr.call(e)));if(Vl(e))return Be(Nl.call(e));if(Ul(e))return Be(f(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===Ki)return"{ [object globalThis] }";if(!Ml(e)&&!Wn(e)){var E=at(e,f),M=Vn?Vn(e)===Object.prototype:e instanceof Object||e.constructor===Object,B=e instanceof Object?"":"null prototype",U=!M&&D&&Object(e)===e&&D in e?sn.call(pe(e),8,-1):B?"Object":"",z=M||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",he=z+(U||B?"["+te.call(Un.call([],U||[],B||[]),": ")+"] ":"");return E.length===0?he+"{}":d?he+"{"+_r(E,d)+"}":he+"{ "+te.call(E,", ")+" }"}return String(e)};function ai(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function jl(t){return de.call(String(t),/"/g,""")}function Nr(t){return pe(t)==="[object Array]"&&(!D||!(typeof t=="object"&&D in t))}function Ml(t){return pe(t)==="[object Date]"&&(!D||!(typeof t=="object"&&D in t))}function Wn(t){return pe(t)==="[object RegExp]"&&(!D||!(typeof t=="object"&&D in t))}function Bl(t){return pe(t)==="[object Error]"&&(!D||!(typeof t=="object"&&D in t))}function Ul(t){return pe(t)==="[object String]"&&(!D||!(typeof t=="object"&&D in t))}function zl(t){return pe(t)==="[object Number]"&&(!D||!(typeof t=="object"&&D in t))}function Vl(t){return pe(t)==="[object Boolean]"&&(!D||!(typeof t=="object"&&D in t))}function li(t){if(_e)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Rr)return!1;try{return Rr.call(t),!0}catch{}return!1}function Kl(t){if(!t||typeof t!="object"||!Lr)return!1;try{return Lr.call(t),!0}catch{}return!1}var Hl=Object.prototype.hasOwnProperty||function(t){return t in this};function ce(t,e){return Hl.call(t,e)}function pe(t){return _l.call(t)}function ql(t){if(t.name)return t.name;var e=Tl.call(Il.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ui(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ci(sn.call(t,0,e.maxStringLength),e)+n}var o=de.call(de.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Zl);return ai(o,"single",e)}function Zl(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+kl.call(e.toString(16))}function Be(t){return"Object("+t+")"}function cr(t){return t+" { ? }"}function Gn(t,e,r,n){var o=n?_r(r,n):te.call(r,", ");return t+" ("+e+") {"+o+"}"}function eu(t){for(var e=0;e=0)return!1;return!0}function tu(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=te.call(Array(t.indent+1)," ");else return null;return{base:r,prev:te.call(Array(e+1),r)}}function _r(t,e){if(t.length===0)return"";var r=` -`+e.prev+e.base;return r+te.call(t,","+r)+` -`+e.prev}function at(t,e){var r=Nr(t),n=[];if(r){n.length=t.length;for(var o=0;o1;){var r=e.pop(),n=r.obj[r.prop];if(ge(n)){for(var o=[],i=0;i=pr?s.slice(l,l+pr):s,c=[],d=0;d=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===mu.RFC1738&&(f===40||f===41)){c[c.length]=u.charAt(d);continue}if(f<128){c[c.length]=Z[f];continue}if(f<2048){c[c.length]=Z[192|f>>6]+Z[128|f&63];continue}if(f<55296||f>=57344){c[c.length]=Z[224|f>>12]+Z[128|f>>6&63]+Z[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|u.charCodeAt(d)&1023),c[c.length]=Z[240|f>>18]+Z[128|f>>12&63]+Z[128|f>>6&63]+Z[128|f&63]}a+=c.join("")}return a},xu=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],o=0;o"u"&&(A=0)}if(typeof c=="function"?w=c(r,w):w instanceof Date?w=m(w):n==="comma"&&ee(w)&&(w=St.maybeMap(w,function(ie){return ie instanceof Date?m(ie):ie})),w===null){if(s)return u&&!y?u(r,_.encoder,v,"key",p):r;w=""}if(Cu(w)||St.isBuffer(w)){if(u){var M=y?r:u(r,_.encoder,v,"key",p);return[h(M)+"="+h(u(w,_.encoder,v,"value",p))]}return[h(r)+"="+h(String(w))]}var B=[];if(typeof w>"u")return B;var U;if(n==="comma"&&ee(w))y&&u&&(w=St.maybeMap(w,u)),U=[{value:w.length>0?w.join(",")||null:void 0}];else if(ee(c))U=c;else{var z=Object.keys(w);U=d?z.sort(d):z}var he=l?r.replace(/\./g,"%2E"):r,H=o&&ee(w)&&w.length===1?he+"[]":he;if(i&&ee(w)&&w.length===0)return H+"[]";for(var V=0;V"u"?e.encodeDotInKeys===!0?!0:_.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:_.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:_.allowEmptyArrays,arrayFormat:s,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:_.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?_.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:_.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:_.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:_.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:_.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:_.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:_.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:_.strictNullHandling}},Iu=function(t,e){var r=t,n=_u(e),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):ee(n.filter)&&(i=n.filter,o=i);var s=[];if(typeof r!="object"||r===null)return"";var a=gi[n.arrayFormat],l=a==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var u=hi(),c=0;c0?m+f:""},Ie=pi,Ir=Object.prototype.hasOwnProperty,Tu=Array.isArray,C={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ie.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ku=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},yi=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},Du="utf8=%26%2310003%3B",Fu="utf8=%E2%9C%93",ju=function(e,r){var n={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=r.parameterLimit===1/0?void 0:r.parameterLimit,s=o.split(r.delimiter,i),a=-1,l,u=r.charset;if(r.charsetSentinel)for(l=0;l-1&&(p=Tu(p)?[p]:p);var h=Ir.call(n,m);h&&r.duplicates==="combine"?n[m]=Ie.combine(n[m],p):(!h||r.duplicates==="last")&&(n[m]=p)}return n},Mu=function(t,e,r,n){for(var o=n?e:yi(e,r),i=t.length-1;i>=0;--i){var s,a=t[i];if(a==="[]"&&r.parseArrays)s=r.allowEmptyArrays&&o===""?[]:[].concat(o);else{s=r.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=r.decodeDotInKeys?l.replace(/%2E/g,"."):l,c=parseInt(u,10);!r.parseArrays&&u===""?s={0:o}:!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(s=[],s[c]=o):u!=="__proto__"&&(s[u]=o)}o=s}return o},Bu=function(e,r,n,o){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=n.depth>0&&s.exec(i),u=l?i.slice(0,l.index):i,c=[];if(u){if(!n.plainObjects&&Ir.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var d=0;n.depth>0&&(l=a.exec(i))!==null&&d"u"?C.charset:e.charset,n=typeof e.duplicates>"u"?C.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:C.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:C.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:C.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:C.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:C.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:C.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:C.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:C.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:C.decoder,delimiter:typeof e.delimiter=="string"||Ie.isRegExp(e.delimiter)?e.delimiter:C.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:C.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:C.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:C.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:C.strictNullHandling}},zu=function(t,e){var r=Uu(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?ju(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||Gu,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n{this.observers[n]||(this.observers[n]=new Map);const o=this.observers[n].get(r)||0;this.observers[n].set(r,o+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o{let[a,l]=s;for(let u=0;u{let[a,l]=s;for(let u=0;u{t=n,e=o});return r.resolve=t,r.reject=e,r}function Yn(t){return t==null?"":""+t}function Ju(t,e,r){t.forEach(n=>{e[n]&&(r[n]=e[n])})}const Yu=/###/g;function Ge(t,e,r){function n(a){return a&&a.indexOf("###")>-1?a.replace(Yu,"."):a}function o(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function ec(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>Zu[e]):t}class tc{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const rc=[" ",",","?","!",";"],nc=new tc(20);function oc(t,e,r){e=e||"",r=r||"";const n=rc.filter(s=>e.indexOf(s)<0&&r.indexOf(s)<0);if(n.length===0)return!0;const o=nc.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(t);if(!i){const s=t.indexOf(r);s>0&&!o.test(t.substring(0,s))&&(i=!0)}return i}function Tr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let o=t;for(let i=0;i-1&&l0?t.replace("_","-"):t}class Xn extends Bt{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,r],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&i?a.push(...n.split(i)):a.push(n)));const l=Lt(this.data,a);return!l&&!r&&!n&&e.indexOf(".")>-1&&(e=a[0],r=a[1],n=a.slice(2).join(".")),l||!s||typeof n!="string"?l:Tr(this.data&&this.data[e]&&this.data[e][r],n,i)}addResource(e,r,n,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,r];n&&(a=a.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(a=e.split("."),o=r,r=a[1]),this.addNamespaces(r),Qn(this.data,a,o),i.silent||this.emit("added",e,r,n,o)}addResources(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in n)(typeof n[i]=="string"||Array.isArray(n[i]))&&this.addResource(e,r,i,n[i],{silent:!0});o.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,r];e.indexOf(".")>-1&&(a=e.split("."),o=n,n=r,r=a[1]),this.addNamespaces(r);let l=Lt(this.data,a)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?vi(l,n,i):l={...l,...n},Qn(this.data,a,l),s.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var bi={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,o){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,r,n,o))}),e}};const Zn={};class Ct extends Bt{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ju(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ne.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let i=r.ns||this.options.defaultNS||[];const s=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!oc(e,n,o);if(s&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:i};const u=e.split(n);(n!==o||n===o&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(o)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],r),l=a[a.length-1],u=r.lng||this.language,c=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const S=r.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${S}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${S}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:s}const d=this.resolve(e,r);let f=d&&d.res;const m=d&&d.usedKey||s,p=d&&d.exactUsedKey||s,h=Object.prototype.toString.apply(f),y=["[object Number]","[object Function]","[object RegExp]"],v=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&y.indexOf(h)<0&&!(typeof v=="string"&&Array.isArray(f))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,f,{...r,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(d.res=S,d.usedParams=this.getUsedParamsDetails(r),d):S}if(i){const S=Array.isArray(f),A=S?[]:{},P=S?p:m;for(const E in f)if(Object.prototype.hasOwnProperty.call(f,E)){const M=`${P}${i}${E}`;A[E]=this.translate(M,{...r,joinArrays:!1,ns:a}),A[E]===M&&(A[E]=f[E])}f=A}}else if(b&&typeof v=="string"&&Array.isArray(f))f=f.join(v),f&&(f=this.extendTranslation(f,e,r,n));else{let S=!1,A=!1;const P=r.count!==void 0&&typeof r.count!="string",E=Ct.hasDefaultValue(r),M=P?this.pluralResolver.getSuffix(u,r.count,r):"",B=r.ordinal&&P?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",U=P&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),z=U&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${M}`]||r[`defaultValue${B}`]||r.defaultValue;!this.isValidLookup(f)&&E&&(S=!0,f=z),this.isValidLookup(f)||(A=!0,f=s);const H=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:f,V=E&&z!==f&&this.options.updateMissing;if(A||S||V){if(this.logger.log(V?"updateKey":"missingKey",u,l,s,V?z:f),i){const F=this.resolve(s,{...r,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let K=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let F=0;F{const fn=E&&ie!==f?ie:H;this.options.missingKeyHandler?this.options.missingKeyHandler(F,l,Q,fn,V,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(F,l,Q,fn,V,r),this.emit("missingKey",F,l,Q,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?K.forEach(F=>{const Q=this.pluralResolver.getSuffixes(F,r);U&&r[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(ie=>{Se([F],s+ie,r[`defaultValue${ie}`]||z)})}):Se(K,s,z))}f=this.extendTranslation(f,e,r,d,n),A&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(A||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,S?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(e,r,n,o,i){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language,n),u){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},n,o,i,s,a;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),c=u.key;o=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=r.count!==void 0&&typeof r.count!="string",m=f&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",h=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(y=>{this.isValidLookup(n)||(a=y,!Zn[`${h[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Zn[`${h[0]}-${y}`]=!0,this.logger.warn(`key "${o}" for languages "${h.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(v=>{if(this.isValidLookup(n))return;s=v;const b=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,c,v,y,r);else{let S;f&&(S=this.pluralResolver.getSuffix(v,r.count,r));const A=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(b.push(c+S),r.ordinal&&S.indexOf(P)===0&&b.push(c+S.replace(P,this.options.pluralSeparator)),m&&b.push(c+A)),p){const E=`${c}${this.options.contextSeparator}${r.context}`;b.push(E),f&&(b.push(E+S),r.ordinal&&S.indexOf(P)===0&&b.push(E+S.replace(P,this.options.pluralSeparator)),m&&b.push(E+A))}}let w;for(;w=b.pop();)this.isValidLookup(n)||(i=w,n=this.getResource(v,y,w,r))}))})}),{res:n,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,o):this.resourceStore.getResource(e,r,n,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string";let o=n?e.replace:e;if(n&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!n){o={...o};for(const i of r)delete o[i]}return o}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}function gr(t){return t.charAt(0).toUpperCase()+t.slice(1)}class eo{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ne.create("languageUtils")}getScriptPartFromCode(e){if(e=Rt(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Rt(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(o=>o.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=gr(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=gr(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=gr(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const o=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const o=this.getLanguagePartFromCode(n);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),n.forEach(s=>{o.indexOf(s)<0&&i(this.formatLanguageCode(s))}),o}}let ic=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],sc={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const ac=["v1","v2","v3"],lc=["v4"],to={zero:0,one:1,two:2,few:3,many:4,other:5};function uc(){const t={};return ic.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:sc[e.fc]}})}),t}class cc{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=ne.create("pluralResolver"),(!this.options.compatibilityJSON||lc.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=uc()}addRule(e,r){this.rules[e]=r}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Rt(e==="dev"?"en":e),{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(o=>`${r}${o}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((o,i)=>to[o]-to[i]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):n.numbers.map(o=>this.getSuffix(e,o,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,n);return o?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:this.getSuffixRetroCompatible(o,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let o=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!ac.includes(this.options.compatibilityJSON)}}function ro(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=Xu(t,e,r);return!i&&o&&typeof r=="string"&&(i=Tr(t,r,n),i===void 0&&(i=Tr(e,r,n))),i}class fc{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ne.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:b}=e.interpolation;this.escape=r!==void 0?r:ec,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Pe(i):s||"{{",this.suffix=a?Pe(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?Pe(f):m||Pe("$t("),this.nestingSuffix=p?Pe(p):h||Pe(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,o){let i,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const b=ro(r,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...o,...r,interpolationkey:p}):b}const h=p.split(this.formatSeparator),y=h.shift().trim(),v=h.join(this.formatSeparator).trim();return this.format(ro(r,l,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,n,{...o,...r,interpolationkey:y})};this.resetRegExp();const d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(a=0;i=p.regex.exec(e);){const h=i[1].trim();if(s=c(h),s===void 0)if(typeof d=="function"){const v=d(e,i,o);s=typeof v=="string"?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,h))s="";else if(f){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Yn(s));const y=p.safeValue(s);if(e=e.replace(i[0],y),f?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s;function a(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const m=f.match(/'/g),p=f.match(/"/g);(m&&m.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,h),`${l}${c}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;o=this.nestingRegexp.exec(e);){let l=[];s={...n},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const c=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=c.shift(),l=c,u=!0}if(i=r(a.call(this,o[1].trim(),s),s),i&&o[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=Yn(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),i=""),u&&(i=l.reduce((c,d)=>this.format(c,d,n.lng,{...n,interpolationkey:o[1].trim()}),i.trim())),e=e.replace(o[0],i),this.regexp.lastIndex=0}return e}}function dc(t){let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);e==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();r[c]||(r[c]=u),u==="false"&&(r[c]=!1),u==="true"&&(r[c]=!0),isNaN(u)||(r[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:r}}function $e(t){const e={};return function(n,o,i){const s=o+JSON.stringify(i);let a=e[s];return a||(a=t(Rt(o),i),e[s]=a),a(n)}}class pc{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ne.create("formatter"),this.options=e,this.formats={number:$e((r,n)=>{const o=new Intl.NumberFormat(r,{...n});return i=>o.format(i)}),currency:$e((r,n)=>{const o=new Intl.NumberFormat(r,{...n,style:"currency"});return i=>o.format(i)}),datetime:$e((r,n)=>{const o=new Intl.DateTimeFormat(r,{...n});return i=>o.format(i)}),relativetime:$e((r,n)=>{const o=new Intl.RelativeTimeFormat(r,{...n});return i=>o.format(i,n.range||"day")}),list:$e((r,n)=>{const o=new Intl.ListFormat(r,{...n});return i=>o.format(i)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=$e(r)}format(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return r.split(this.formatSeparator).reduce((a,l)=>{const{formatName:u,formatOptions:c}=dc(l);if(this.formats[u]){let d=a;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},m=f.locale||f.lng||o.locale||o.lng||n;d=this.formats[u](a,m,{...c,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}function hc(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class gc extends Bt{constructor(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=ne.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,o.backend,o)}queueLoad(e,r,n,o){const i={},s={},a={},l={};return e.forEach(u=>{let c=!0;r.forEach(d=>{const f=`${u}|${d}`;!n.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,r,n){const o=e.split("|"),i=o[0],s=o[1];r&&this.emit("failedLoading",i,s,r),n&&this.store.addResourceBundle(i,s,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2;const a={};this.queue.forEach(l=>{Qu(l.loaded,[i],s),hc(l,e),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&o{this.read.call(this,e,r,n,o+1,i*2,s)},i);return}s(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(e,r);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,r,a)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof r=="string"&&(r=[r]);const i=this.queueLoad(e,r,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${r}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${r}loaded namespace ${i} for language ${o}`,a),this.loaded(e,s,a)})}saveMissing(e,r,n,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,r,n,o,l):c=u(e,r,n,o),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else u(e,r,n,o,a,l)}!e||!e[0]||this.store.addResource(e[0],r,n,o)}}}function no(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let r={};if(typeof e[1]=="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(o=>{r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function oo(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function ct(){}function mc(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}class Ye extends Bt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=oo(e),this.services={},this.logger=ne,this.modules={external:[]},mc(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const o=no();this.options={...o,...this.options,...oo(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);function i(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?ne.init(i(this.modules.logger),this.options):ne.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=pc);const d=new eo(this.options);this.store=new Xn(this.options.resources,this.options);const f=this.services;f.logger=ne,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new cc(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new fc(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new gc(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var p=arguments.length,h=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ct),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=Ue(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ct;const o=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,r,n){const o=Ue();return e||(e=this.languages),r||(r=this.options.ns),n||(n=ct),this.services.backendConnector.reload(e,r,i=>{o.resolve(),n(i)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&bi.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const o=Ue();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),o}getFixedT(e,r,n){var o=this;const i=function(s,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${p}`):m=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,o.t(m,l)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=r,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};if(r.precheck){const a=r.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!o||s(i,e)))}loadNamespaces(e,r){const n=Ue();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=Ue();typeof e=="string"&&(e=[e]);const o=this.options.preload||[],i=e.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new eo(no());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new Ye(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ct;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},i=new Ye(o);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new Xn(this.store.data,o),i.services.resourceStore=i.store),i.translator=new Ct(i.services,o),i.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;ct.split(",").map((e,r)=>{e=e.trim();const n=e.replace(/([&*]|\+\+)/g,""),o=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Fr(n,o,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Array.isArray(o),r===0)});function bc(t,e,r,n){const o=t.db.createObjectStore(e,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(i=>Dr(o,i)),o}function Dr(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function Fr(t,e,r,n,o,i,s){return{name:t,keyPath:e,unique:r,multi:n,auto:o,compound:i,src:(r&&!s?"&":"")+(n?"*":"")+(o?"++":"")+wi(e)}}function Si(t,e,r){return{name:t,primKey:e,indexes:r,mappedClass:null,idxByName:wc(r,n=>[n.name,n])}}function xi(t,e){const r={};return[...t.objectStoreNames].forEach(o=>{const i=e.objectStore(o);let s=i.keyPath;const a=Fr(wi(s),s||"",!1,!1,!!i.autoIncrement,s&&typeof s!="string",!0),l=[];for(let c=0;c0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}}return n}function wc(t,e){return t.reduce((r,n,o)=>{var i=e(n,o);return i&&(r[i[0]]=i[1]),r},{})}function io(t,e,r,n){const o=xi(e,r),i={};return Object.keys(t).forEach(a=>{const[l,...u]=vc(t[a]);i[a]=Si(a,l,u)}),Oi(o,i,n)}function Sc(t,e,r){t.add.forEach(n=>{bc(r,n[0],n[1].primKey,n[1].indexes)}),t.change.forEach(n=>{if(n.recreate)throw"Not yet support for changing primary key";{const o=r.objectStore(n.name);n.add.forEach(i=>Dr(o,i)),n.change.forEach(i=>{o.deleteIndex(i.name),Dr(o,i)}),n.del.forEach(i=>o.deleteIndex(i))}}),t.del.forEach(n=>{e.deleteObjectStore(n)})}function xc(t){const e=new Map;return{idbOpen:async(o,{store:i,incrementalUpdate:s}={})=>{if(!o||typeof o!="string")return Promise.reject(new TypeError("dbName must be a string"));let a=e.get(o);if(a)try{return await c(await a)}catch(f){if(e.delete(o),!(f instanceof Error&&Object.prototype.toString.call(f)==="[object DOMException]"&&f.message.indexOf("The database connection is closing.")!==-1))return Promise.reject(f)}let l=d();return e.set(o,l),l.catch(()=>{l===e.get(o)&&e.delete(o)}),l;function u(f,m){const p=function(h){var v,b,w;const y=io(h,f,m,s);return!((v=y.add)!=null&&v.length||(b=y.change)!=null&&b.length||(w=y.del)!=null&&w.length)};switch(typeof i){case"string":{const[h,y]=i.split("|");return p({[h]:y||"++"})}case"function":try{return typeof i.call(this,f,m)!="function"}catch(h){throw h}case"object":if(i)return p(i);default:return!0}}function c(f){if(u(f,f.objectStoreNames.length?f.transaction([...f.objectStoreNames],"readonly"):void 0))return Promise.resolve(f);{let m=f.version+1;return d(m)}}function d(f){return new Promise((m,p)=>{let h=t.indexedDB.open(o,f);h.onerror=function(y){p(this.error)},h.onupgradeneeded=function(y){var w,S,A;const v=this.result,b=this.transaction;try{switch(typeof i){case"function":{const P=()=>i.call(this,v,b),E=()=>xi(v,b);let M,B=E();for(;typeof(M=P())=="function";){M.call(this,v,b,y);const U=E(),z=Oi(B,U,!1);if(B=U,!((w=z.add)!=null&&w.length||(S=z.change)!=null&&S.length||(A=z.del)!=null&&A.length))throw new Error('Parameter "store" contradicts "upgradeneeded"')}break}case"string":case"object":{let P;if(typeof i=="string"){const[M,B]=i.split("|");P={[M]:B||"++"}}else P=i;const E=io(P,v,b,s);Sc(E,v,b);break}default:if(!u.call(this,v,b))throw new TypeError('Missing or wrong type of "upgradeneeded" parameter')}}catch(P){console.error(P),b.abort(),v.close(),p(P)}},h.onsuccess=function(y){const v=this.result;v.onversionchange=function(){v.close(),e.delete(o)},v.onclose=function(){e.delete(o)},e.set(o,v);try{m(c(v))}catch(b){p(b)}},h.onblocked=function(y){var b;let v=e.get(o);v&&((b=v==null?void 0:v.close)==null||b.call(v))}})}},idbDelete:o=>new Promise((i,s)=>{let a=t.indexedDB.deleteDatabase(o);a.onerror=function(l){s(this.error)},a.onsuccess=function(l){i(null)}})}}const Oc=xc(window),{idbOpen:Ei,idbDelete:np}=Oc,Ec=(t,e)=>e.some(r=>t instanceof r);let so,ao;function Pc(){return so||(so=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function $c(){return ao||(ao=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Pi=new WeakMap,jr=new WeakMap,$i=new WeakMap,mr=new WeakMap,un=new WeakMap;function Ac(t){const e=new Promise((r,n)=>{const o=()=>{t.removeEventListener("success",i),t.removeEventListener("error",s)},i=()=>{r(le(t.result)),o()},s=()=>{n(t.error),o()};t.addEventListener("success",i),t.addEventListener("error",s)});return e.then(r=>{r instanceof IDBCursor&&Pi.set(r,t)}).catch(()=>{}),un.set(e,t),e}function Lc(t){if(jr.has(t))return;const e=new Promise((r,n)=>{const o=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",s),t.removeEventListener("abort",s)},i=()=>{r(),o()},s=()=>{n(t.error||new DOMException("AbortError","AbortError")),o()};t.addEventListener("complete",i),t.addEventListener("error",s),t.addEventListener("abort",s)});jr.set(t,e)}let Mr={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return jr.get(t);if(e==="objectStoreNames")return t.objectStoreNames||$i.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return le(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Rc(t){Mr=t(Mr)}function Cc(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(yr(this),e,...r);return $i.set(n,e.sort?e.sort():[e]),le(n)}:$c().includes(t)?function(...e){return t.apply(yr(this),e),le(Pi.get(this))}:function(...e){return le(t.apply(yr(this),e))}}function Nc(t){return typeof t=="function"?Cc(t):(t instanceof IDBTransaction&&Lc(t),Ec(t,Pc())?new Proxy(t,Mr):t)}function le(t){if(t instanceof IDBRequest)return Ac(t);if(mr.has(t))return mr.get(t);const e=Nc(t);return e!==t&&(mr.set(t,e),un.set(e,t)),e}const yr=t=>un.get(t);function _c(t,e,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const s=indexedDB.open(t,e),a=le(s);return n&&s.addEventListener("upgradeneeded",l=>{n(le(s.result),l.oldVersion,l.newVersion,le(s.transaction),l)}),r&&s.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const Ic=["get","getKey","getAll","getAllKeys","count"],Tc=["put","add","delete","clear"],vr=new Map;function lo(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(vr.get(e))return vr.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,o=Tc.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Ic.includes(r)))return;const i=async function(s,...a){const l=this.transaction(s,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(a.shift())),(await Promise.all([u[r](...a),o&&l.done]))[0]};return vr.set(e,i),i}Rc(t=>({...t,get:(e,r,n)=>lo(e,r)||t.get(e,r,n),has:(e,r)=>!!lo(e,r)||t.has(e,r)}));const Br="GOST-UI",cn=async t=>le(await Ei(Br,{store:t})),kc=async t=>{const e=await Ei(Br),r=e.version+1;e.close(),_c(Br,r,{upgrade:(n,o,i,s,a)=>{t(s)}})},fe="localCache",ze="savedServer";class G{constructor(e){X(this,"dsName",fe);X(this,"type");X(this,"_getIdb",()=>cn(`${this.dsName}|++_id_,_key_,_type_,[_type_+_key_],[name+_type_+_key_]`));X(this,"_getTransaction",async()=>{const r=(await this._getIdb()).transaction(this.dsName,"readwrite"),n=r.objectStore(this.dsName);return{transaction:r,store:n}});X(this,"getList",async()=>(await this._getIdb()).getAllFromIndex(this.dsName,"[_type_+_key_]",IDBKeyRange.only([this.type,this.key])));X(this,"get",async e=>(await this._getIdb()).getFromIndex(this.dsName,"[name+_type_+_key_]",IDBKeyRange.only([e,this.type,this.key])));X(this,"add",async e=>{await(await this._getIdb()).add(this.dsName,{...e,_key_:this.key,_type_:this.type})});X(this,"put",async(e,r)=>{if(r._id_)await(await this._getIdb()).put(this.dsName,r);else{const{transaction:n,store:o}=await this._getTransaction(),i=await o.index("[name+_type_+_key_]").get(IDBKeyRange.only([e,this.type,this.key]));return r._id_=i._id_,await o.put({...i,...r,_id_:i._id_}),n.done}});X(this,"delete",async e=>{const{transaction:r,store:n}=await this._getTransaction(),o=await n.index("[name+_type_+_key_]").get(IDBKeyRange.only([e,this.type,this.key]));return await n.delete(o._id_),r.done});this.type=e}get key(){var e;return(e=Ai())==null?void 0:e.addr}}const Dc=new G("admissions"),Fc=new G("authers"),jc=new G("bypasses"),Mc=new G("chains"),Bc=new G("climiters"),Uc=new G("limiters"),zc=new G("rlimiters"),Vc=new G("hops"),Kc=new G("hosts"),Hc=new G("ingresses"),qc=new G("resolvers"),Wc=new G("services");class Fe{static _getIdb(){return cn({[ze]:"addr",[fe]:"++_id_,_key_"})}static async getAllServer(){return(await this._getIdb()).getAll(ze)}static async getServer(e){return(await this._getIdb()).get(ze,e)}static async setServer(e){await(await this._getIdb()).put(ze,e)}static async deleteServer(e,r=!1){await(await this._getIdb()).delete(ze,e),r&&await this.deleteCacheConfig(e)}static async deleteCacheConfig(e){const o=await(await this._getIdb()).transaction([fe],"readwrite").objectStore(fe),i=await o.index("_key_").getAllKeys(IDBKeyRange.only(e));await o.delete(i)}static async getAllCacheConfig(e){const r=await this._getIdb();return e?r.getAllFromIndex(fe,"_key_",IDBKeyRange.only(e)):r.getAll(fe)}}const Gc=async()=>{const t=await cn(`${fe}|++_id_`),e=t.objectStoreNames,r=/^services-/,n="services",o=[...e].filter(s=>r.test(s)),i=t.transaction(e,"readwrite");for(const s of o){const a=await i.objectStore(s).getAll();let l=decodeURIComponent(s.replace(/^services-/,""));/^(https?:)?\/\//.test(l)?/^\/\//.test(l)&&(l=`${location.protocol}`+l):l=`${location.protocol}//`+l,a.length>0&&await a.map(u=>i.objectStore(fe).add({...u,_type_:n,_key_:l})),await i.objectStore(s).clear()}return await i.done,o.length&&kc(s=>{const a=[...s.objectStoreNames],l=/^services-/;[...a.filter(c=>l.test(c)),"services","localConfigStore"].forEach(c=>{a.includes(c)&&s.db.deleteObjectStore(c)})}),o.length>0},op=Object.freeze(Object.defineProperty({__proto__:null,GostCommit:G,ServerComm:Fe,admissions:Dc,authers:Fc,bypasses:jc,chains:Mc,climiters:Bc,fixOldCacheConfig:Gc,hops:Vc,hosts:Kc,ingresses:Hc,limiters:Uc,resolvers:qc,rlimiters:zc,services:Wc},Symbol.toStringTag,{value:"Module"})),ve="__GOST_SERVER__",ft="__USE_SERVER__",br="__SETTINGS__",be=Tt();Object.defineProperty(window,ve,{get:be.get,set:be.set});const dt=Tt(),pt=Tt(),Ur=Tt(()=>{const t=localStorage.getItem(br)||"{}";try{return JSON.parse(t)}catch(e){return console.error(e),{}}},t=>{t==null&&localStorage.removeItem(br),localStorage.setItem(br,JSON.stringify(t))}),Ai=()=>be.get(),Jc=async()=>{if(window[ve])return!0;const t=Wu.parse(location.search,{ignoreQueryPrefix:!0});t.use&&(window[ft]=t.use,window.history.replaceState(null,"",location.pathname),Li());const e=sessionStorage.getItem(ve);if(e){const r=JSON.parse(e);return await zr(r),!0}if(window[ft]){const r=await Qc(window[ft]);r&&(r.isLocal=!0,await zr(r),r&&(r.time=Date.now(),Ri(window[ft],r)))}},Yc=async t=>{const e=t.addr.replace(/\/+$/,"");return Qo.get(e+"/config",{auth:t.auth}).catch(r=>{throw"verify error"})},zr=async(t,e)=>{try{await Yc(t),window[ve]=t,window.sessionStorage.setItem(ve,JSON.stringify(t)),e&&(t.isLocal=!0,window[ve]=t,await Ri(t.addr,t))}catch(r){throw r==="verify error"&&(Li(),wr.error((r==null?void 0:r.message)||kr("msg.connectionFailed"))),r}},Li=async()=>{be.set(null),window.sessionStorage.removeItem(ve)},Ri=async(t,e)=>Fe.setServer({...e,isLocal:!0,time:Date.now()}),Qc=async t=>Fe.getServer(t),Xc=async t=>Fe.deleteServer(t),Zc=async()=>Fe.getAllServer(),we=Qo.create();we.interceptors.request.use(t=>{const e=Ai();return t.baseURL=e==null?void 0:e.addr,t.auth=e==null?void 0:e.auth,t});we.interceptors.response.use(t=>{var e;return t.config.method!=="get"&&!((e=t.config)!=null&&e.noMsg)&&wr.success(kr("msg.success")),t.data?t.data:t},t=>{var n,o;const{response:e}=t||{};let r=t.message||kr("msg.unknown");throw(n=e==null?void 0:e.data)!=null&&n.msg&&(r=(o=e==null?void 0:e.data)==null?void 0:o.msg),wr.error(r),t});const T={config:"/config",admissions:"/config/admissions",authers:"/config/authers",bypasses:"/config/bypasses",chains:"/config/chains",climiters:"/config/climiters",limiters:"/config/limiters",rlimiters:"/config/rlimiters",hops:"/config/hops",hosts:"/config/hosts",ingresses:"/config/ingresses",observers:"/config/observers",resolvers:"/config/resolvers",sds:"/config/sds",services:"/config/services"},j=t=>({post:e=>we.post(t,e),put:(e,r)=>we.put(`${t}/${e}`,r),delete:e=>we.delete(`${t}/${e}`)}),ef=j(T.admissions),tf=j(T.authers),rf=j(T.bypasses),nf=j(T.chains),of=j(T.climiters),sf=j(T.limiters),af=j(T.rlimiters),lf=j(T.hops),uf=j(T.hosts),cf=j(T.ingresses),ff=j(T.resolvers),df=j(T.services),pf=j(T.sds),hf=j(T.observers),Vr=t=>we.get(T.config),gf=(t="json",e)=>we.post(T.config,null,{params:{format:t,path:e},noMsg:!0}),ip=Object.freeze(Object.defineProperty({__proto__:null,admissions:ef,apis:T,authers:tf,bypasses:rf,chains:nf,climiters:of,getConfig:Vr,getRESTfulApi:j,hops:lf,hosts:uf,ingresses:cf,limiters:sf,observers:hf,resolvers:ff,rlimiters:af,saveCofnig:gf,sds:pf,services:df},Symbol.toStringTag,{value:"Module"}));var mf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};const yf=mf;var vf=function(e,r){return O.createElement(Qe,Xe({},e,{ref:r,icon:yf}))},bf=O.forwardRef(vf);const wf=bf;var Sf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};const xf=Sf;var Of=function(e,r){return O.createElement(Qe,Xe({},e,{ref:r,icon:xf}))},Ef=O.forwardRef(Of);const Pf=Ef;var $f={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"};const Af=$f;var Lf=function(e,r){return O.createElement(Qe,Xe({},e,{ref:r,icon:Af}))},Rf=O.forwardRef(Lf);const Cf=Rf;var Nf={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"};const _f=Nf;var If=function(e,r){return O.createElement(Qe,Xe({},e,{ref:r,icon:_f}))},Tf=O.forwardRef(If);const kf=Tf;var Df={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};const Ff=Df;var jf=function(e,r){return O.createElement(Qe,Xe({},e,{ref:r,icon:Ff}))},Mf=O.forwardRef(jf);const Bf=Mf;function Uf(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),r=0;r()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}};function co(t,e,r){t.loadNamespaces(e,Ci(t,r))}function fo(t,e,r,n){typeof r=="string"&&(r=[r]),r.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(e,Ci(t,n))}function zf(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.languages[0],o=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=e.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(n,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(n,t)&&(!o||s(i,t)))}function Vf(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Kr("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:r.lng,precheck:(o,i)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,t))return!1}}):zf(t,e,r)}const Kf=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Hf={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},qf=t=>Hf[t],Wf=t=>t.replace(Kf,qf);let Hr={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Wf};function Gf(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Hr={...Hr,...t}}function Jf(){return Hr}let Ni;function Yf(t){Ni=t}function Qf(){return Ni}const Xf={type:"3rdParty",init(t){Gf(t.options.react),Yf(t)}},Zf=O.createContext();class ed{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const td=(t,e)=>{const r=O.useRef();return O.useEffect(()=>{r.current=e?r.current:t},[t,e]),r.current};function _i(t,e,r,n){return t.getFixedT(e,r,n)}function rd(t,e,r,n){return O.useCallback(_i(t,e,r,n),[t,e,r,n])}function Ut(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:r}=e,{i18n:n,defaultNS:o}=O.useContext(Zf)||{},i=r||n||Qf();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new ed),!i){Kr("You will need to pass in an i18next instance by using initReactI18next");const S=(P,E)=>typeof E=="string"?E:E&&typeof E=="object"&&typeof E.defaultValue=="string"?E.defaultValue:Array.isArray(P)?P[P.length-1]:P,A=[S,{},!1];return A.t=S,A.i18n={},A.ready=!1,A}i.options.react&&i.options.react.wait!==void 0&&Kr("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Jf(),...i.options.react,...e},{useSuspense:a,keyPrefix:l}=s;let u=t||o||i.options&&i.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(u);const c=(i.isInitialized||i.initializedStoreOnce)&&u.every(S=>Vf(S,i,s)),d=rd(i,e.lng||null,s.nsMode==="fallback"?u:u[0],l),f=()=>d,m=()=>_i(i,e.lng||null,s.nsMode==="fallback"?u:u[0],l),[p,h]=O.useState(f);let y=u.join();e.lng&&(y=`${e.lng}${y}`);const v=td(y),b=O.useRef(!0);O.useEffect(()=>{const{bindI18n:S,bindI18nStore:A}=s;b.current=!0,!c&&!a&&(e.lng?fo(i,e.lng,u,()=>{b.current&&h(m)}):co(i,u,()=>{b.current&&h(m)})),c&&v&&v!==y&&b.current&&h(m);function P(){b.current&&h(m)}return S&&i&&i.on(S,P),A&&i&&i.store.on(A,P),()=>{b.current=!1,S&&i&&S.split(" ").forEach(E=>i.off(E,P)),A&&i&&A.split(" ").forEach(E=>i.store.off(E,P))}},[i,y]),O.useEffect(()=>{b.current&&c&&h(f)},[i,l,c]);const w=[p,i,c];if(w.t=p,w.i18n=i,w.ready=c,c||!c&&!a)return w;throw new Promise(S=>{e.lng?fo(i,e.lng,u,()=>S()):co(i,u,()=>S())})}const nd=()=>{const{t}=Ut(),[e,r]=O.useState(),n=O.useCallback(async()=>Zc().then(o=>o.sort((i,s)=>{const a=i.time||0;return(s.time||0)-a})).then(o=>r(o)),[]);return O.useEffect(()=>{n()},[]),x.jsx(x.Fragment,{children:e&&(e==null?void 0:e.length)>0?x.jsxs(vo,{direction:"vertical",style:{display:"flex"},children:[x.jsx("div",{children:t("home.quickConnect")}),x.jsx(Hi,{gutter:10,children:e.map(o=>x.jsx(qi,{span:12,title:o.addr,style:{overflow:"hidden",textOverflow:"ellipsis"},children:x.jsxs(Wi,{gap:5,style:{overflow:"hidden"},children:[x.jsx("a",{style:{overflow:"hidden",textOverflow:"ellipsis",flex:"auto"},href:`?use=${o.addr}`,children:o.addr}),x.jsx(Gi,{style:{color:"red"},onClick:async()=>{await Xc(o.addr),n()}})]})},o.addr))})]}):null})},od=()=>{const[t,e]=O.useState(window.matchMedia("(prefers-color-scheme: dark)").matches);return O.useEffect(()=>{const r=window.matchMedia("(prefers-color-scheme: dark)"),n=o=>{e(o.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[]),t},Ii=()=>{const t=od(),{theme:e}=Ur();return O.useMemo(()=>!e||e==="system"?t:e==="dark",[e,t])},id=t=>{const e=Ur(),r=Ii(),n=r?x.jsx(Cf,{}):x.jsx(kf,{});return x.jsx(Wr,{shape:"circle",icon:n,...t,onClick:()=>{const o={...e};o.theme=r?"light":"dark",Ur.set(o)}})},sd=t=>{const{i18n:e}=Ut(),[r,n]=O.useState(!1);return window.i18n=e,x.jsx(Wr,{loading:r,shape:"circle",...t,onClick:()=>{n(!0),e.changeLanguage(e.resolvedLanguage==="en"?"zh-cn":"en").finally(()=>n(!1))},children:r?"":e.resolvedLanguage==="en"?"中":"En"})},ad=()=>{const{t,i18n:e}=Ut();return x.jsxs(x.Fragment,{children:[x.jsxs(xe,{className:"home-form",size:"large",layout:"horizontal",initialValues:{baseURL:"http://",save:!0},onFinish:r=>{let n=r.baseURL;return/^(https?:)?\/\//.test(n)?/^\/\//.test(n)&&(n=`${location.protocol}`+n):n=`${location.protocol}//`+n,zr({addr:n,auth:{username:r.username,password:r.password}},r.save)},children:[x.jsx("h1",{children:t("base.title")}),x.jsx("h2",{children:t("base.description")}),x.jsx(xe.Item,{name:"baseURL",rules:[{required:!0,message:t("msg.baseURL.required")},{validator(r,n,o){n==="http://"&&o(t("msg.baseURL.required")),o()}}],children:x.jsx(Xt,{placeholder:t("placeholder.baseURL"),prefix:x.jsx(wf,{className:"prefixIcon"})})}),x.jsx(xe.Item,{name:"username",children:x.jsx(Xt,{placeholder:"username",prefix:x.jsx(Bf,{className:"prefixIcon"})})}),x.jsx(xe.Item,{name:"password",children:x.jsx(Xt.Password,{placeholder:"password",prefix:x.jsx(Pf,{className:"prefixIcon"})})}),x.jsx(xe.Item,{name:"save",valuePropName:"checked",children:x.jsx(Ji,{children:t("base.form.local")})}),x.jsx(xe.Item,{noStyle:!0,style:{marginBottom:"1em"},children:x.jsx(Wr,{block:!0,type:"primary",htmlType:"submit",children:t("base.cmd.connect")})}),x.jsx(nd,{})]}),x.jsx("div",{style:{position:"absolute",top:"1em",right:"1em"},children:x.jsxs(vo,{children:[x.jsx(id,{}),x.jsx(sd,{})]})})]})};const se=new Ro.EventEmitter;var zt={},Ti={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Ti);var je=Ti.exports,Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.default=void 0;var ld={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};Vt.default=ld;var Kt={},nt={},Ht={};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.default=void 0;var ud={locale:"zh_CN",yearFormat:"YYYY年",cellDateFormat:"D",cellMeridiemFormat:"A",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};Ht.default=ud;var ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.default=void 0;const cd={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};ot.default=cd;var ki=je.default;Object.defineProperty(nt,"__esModule",{value:!0});nt.default=void 0;var fd=ki(Ht),dd=ki(ot);const Di={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},fd.default),timePickerLocale:Object.assign({},dd.default)};Di.lang.ok="确定";nt.default=Di;var pd=je.default;Object.defineProperty(Kt,"__esModule",{value:!0});Kt.default=void 0;var hd=pd(nt);Kt.default=hd.default;var qt=je.default;Object.defineProperty(zt,"__esModule",{value:!0});zt.default=void 0;var gd=qt(Vt),md=qt(Kt),yd=qt(nt),vd=qt(ot);const q="${label}不是一个有效的${type}",bd={locale:"zh-cn",Pagination:gd.default,DatePicker:yd.default,TimePicker:vd.default,Calendar:md.default,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:q,method:q,array:q,object:q,number:q,date:q,boolean:q,integer:q,float:q,regexp:q,email:q,url:q,hex:q},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码过期",refresh:"点击刷新",scanned:"已扫描"},ColorPicker:{presetEmpty:"暂无"}};zt.default=bd;var wd=zt;const po=qr(wd);var Wt={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.default=void 0;var Sd={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};Gt.default=Sd;var Jt={},it={},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.default=void 0;var xd={locale:"en_GB",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"Select time",dateSelect:"Select date",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"D/M/YYYY",dayFormat:"D",dateTimeFormat:"D/M/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};Yt.default=xd;var st={};Object.defineProperty(st,"__esModule",{value:!0});st.default=void 0;const Od={placeholder:"Select time"};st.default=Od;var Fi=je.default;Object.defineProperty(it,"__esModule",{value:!0});it.default=void 0;var Ed=Fi(Yt),Pd=Fi(st);const $d={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Ed.default),timePickerLocale:Object.assign({},Pd.default)};it.default=$d;var Ad=je.default;Object.defineProperty(Jt,"__esModule",{value:!0});Jt.default=void 0;var Ld=Ad(it);Jt.default=Ld.default;var Qt=je.default;Object.defineProperty(Wt,"__esModule",{value:!0});Wt.default=void 0;var Rd=Qt(Gt),Cd=Qt(Jt),Nd=Qt(it),_d=Qt(st);const W="${label} is not a valid ${type}",Id={locale:"en-gb",Pagination:Rd.default,DatePicker:Nd.default,TimePicker:_d.default,Calendar:Cd.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:W,method:W,array:W,object:W,number:W,date:W,boolean:W,integer:W,float:W,regexp:W,email:W,url:W,hex:W},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};Wt.default=Id;var Td=Wt;const kd=qr(Td),Dd=Nt.createContext({}),sp=Nt.createContext({localList:[],name:""}),ap=(t,e)=>{const r=`${t}:getComm`,n=o=>{o(e)};return se.on(r,n),()=>{se.off(r,n)}},lp=t=>new Promise((e,r)=>{const n=`${t}:getComm`;se.emit(n,e)}),Fd=(t,e)=>{const r=t[e];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((n,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e)))})},{slice:jd,forEach:Md}=[];function Bd(t){return Md.call(jd.call(arguments,1),e=>{if(e)for(const r in e)t[r]===void 0&&(t[r]=e[r])}),t}const ho=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ud=(t,e,r)=>{const n=r||{};n.path=n.path||"/";const o=encodeURIComponent(e);let i=`${t}=${o}`;if(n.maxAge>0){const s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(n.domain){if(!ho.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!ho.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},go={create(t,e,r,n){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),n&&(o.domain=n),document.cookie=Ud(t,encodeURIComponent(e),o)},read(t){const e=`${t}=`,r=document.cookie.split(";");for(let n=0;n-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const s=o.substring(1).split("&");for(let a=0;a0&&s[a].substring(0,l)===e&&(r=s[a].substring(l+1))}}return r}};let Ve=null;const mo=()=>{if(Ve!==null)return Ve;try{Ve=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Ve=!1}return Ve};var Kd={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&mo())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:r}=e;r&&mo()&&window.localStorage.setItem(r,t)}};let Ke=null;const yo=()=>{if(Ke!==null)return Ke;try{Ke=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ke=!1}return Ke};var Hd={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&yo())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:r}=e;r&&yo()&&window.sessionStorage.setItem(r,t)}},qd={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:o}=navigator;if(r)for(let i=0;i0?e:void 0}},Wd={name:"htmlTag",lookup(t){let{htmlTag:e}=t,r;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},Gd={name:"path",lookup(t){var o;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(o=r[typeof e=="number"?e:0])==null?void 0:o.replace("/",""):void 0}},Jd={name:"subdomain",lookup(t){var o,i;let{lookupFromSubdomainIndex:e}=t;const r=typeof e=="number"?e+1:1,n=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function Yd(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class ji{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=Bd(r,this.options||{},Yd()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(zd),this.addDetector(Vd),this.addDetector(Kd),this.addDetector(Hd),this.addDetector(qd),this.addDetector(Wd),this.addDetector(Gd),this.addDetector(Jd)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let r=[];return e.forEach(n=>{if(this.detectors[n]){let o=this.detectors[n].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(e,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}ji.type="languageDetector";var Qd=function(e){return{type:"backend",init:function(n,o,i){},read:function(n,o,i){if(typeof e=="function"){if(e.length<3){try{var s=e(n,o);s&&typeof s.then=="function"?s.then(function(a){return i(null,a&&a.default||a)}).catch(i):i(null,s)}catch(a){i(a)}return}e(n,o,i);return}i(null,e&&e[n]&&e[n][o])}}};const Mi="en";k.use(ji).use(Xf).use(Qd((t,e)=>Fd(Object.assign({"../i18n/en.json":()=>gt(()=>import("./en-e998d6f7.js"),[],import.meta.url),"../i18n/languages.json":()=>gt(()=>import("./languages-a578aa29.js"),[],import.meta.url),"../i18n/zh.json":()=>gt(()=>import("./zh-c566da85.js"),[],import.meta.url)}),`../i18n/${t}.json`))).init({debug:!1,fallbackLng:Mi,interpolation:{escapeValue:!1}});function up(t){if(typeof t=="string"||O.isValidElement(t))return t;const e=k.resolvedLanguage;return t[e]||t[Mi]||""}const Xd=Nt.lazy(()=>gt(()=>import("./Manage-d63824ea.js"),["./Manage-d63824ea.js","./antd-15fa66a0.js"],import.meta.url)),Zd=t=>{const{locale:e,theme:r}=O.useContext(ht.ConfigContext);return O.useLayoutEffect(()=>{ht.config({theme:r,holderRender:n=>x.jsx(ht,{theme:r,children:n})})},[e,r]),x.jsx(Qi,{children:t.children})};function ep(){const t=be(),{t:e,i18n:r}=Ut(),n=dt(),o=pt(),i=Ii(),[s,a]=O.useState(!1),[l,u]=O.useState(!1),[c,d]=O.useState(po),f=O.useMemo(()=>s||l,[s,l]),m=O.useRef({update:async()=>{var p;try{a(!0),u(!0);const[h,y]=await Promise.all([Vr(),m.current.updateLocalConfig((p=be.get())==null?void 0:p.addr)]);return dt.set(h),pt.set(y),[h,y]}finally{a(!1),u(!1)}},updateLocalConfig:async p=>{try{p||pt.set(null),u(!0);const h=await Fe.getAllCacheConfig(p),y={};return h.forEach(v=>{const{_type_:b}=v;(y[b]?y[b]:y[b]=[]).push(v)}),y}finally{u(!1)}},defaultTitle:document.title});return O.useEffect(()=>{Jc();const p=async v=>{if((v==null?void 0:v.url)!==T.config)return dt.set(await Vr())},h=async()=>{var v;return pt.set(await m.current.updateLocalConfig((v=be.get())==null?void 0:v.addr))},y=m.current.update;return se.on("apiUpdate",p),se.on("localUpdate",h),se.on("update",y),()=>{se.off("apiUpdate",p),se.off("localUpdate",h),se.off("update",y)}},[]),O.useEffect(()=>{t?m.current.update().then(([p])=>{dt.set(p),document.title=t.addr.replace(/^(https?:)?\/\//,"")}):document.title=m.current.defaultTitle},[t]),O.useEffect(()=>{var p,h;i?(document.documentElement.classList.add("theme-dark"),(p=window==null?void 0:window.monaco)==null||p.editor.setTheme("vs-dark")):(document.documentElement.classList.remove("theme-dark"),(h=window==null?void 0:window.monaco)==null||h.editor.setTheme("vs"))},[i]),O.useEffect(()=>{const p=r.resolvedLanguage;d(p==="zh"?po:kd)},[r.resolvedLanguage]),x.jsx(Dd.Provider,{value:{gostConfig:n,localConfig:o,isLoading:f},children:x.jsx(ht,{theme:{algorithm:i?Yi.darkAlgorithm:void 0},locale:c,children:x.jsx(Zd,{children:x.jsx(Nt.Suspense,{fallback:"loading...",children:t?x.jsx(Xd,{}):x.jsx(ad,{})})})})})}Sr.createRoot(document.getElementById("root")).render(x.jsx(ep,{}));export{ip as A,sp as C,op as L,id as T,Ii as a,up as b,Sr as c,Dd as d,se as e,ap as f,Qf as g,lp as h,dt as i,x as j,be as k,Zc as l,Gc as m,Vr as n,Li as o,sd as p,Wu as q,Ri as r,gf as s,T as t,Ut as u}; diff --git a/assets/index-9959d30d.js b/assets/index-9959d30d.js new file mode 100644 index 0000000..452ae0a --- /dev/null +++ b/assets/index-9959d30d.js @@ -0,0 +1,17 @@ +var qi=Object.defineProperty;var Wi=(t,e,r)=>e in t?qi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>(Wi(t,typeof e!="symbol"?e+"":e,r),r);import{r as O,a as Ji,g as Gi,c as Yi,b as Vr,m as vr,A as Ye,_ as Qe,S as So,R as Qi,C as Xi,F as Zi,D as es,B as Kr,d as we,I as Qt,e as ts,f as Ct,h as dt,t as rs,i as fn,j as ns}from"./antd-af73db0d.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=r(o);fetch(o.href,i)}})();var wo={exports:{}},Nt={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var os=O,is=Symbol.for("react.element"),ss=Symbol.for("react.fragment"),as=Object.prototype.hasOwnProperty,ls=os.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,us={key:!0,ref:!0,__self:!0,__source:!0};function xo(t,e,r){var n,o={},i=null,s=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(s=e.ref);for(n in e)as.call(e,n)&&!us.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:is,type:t,key:i,ref:s,props:o,_owner:ls.current}}Nt.Fragment=ss;Nt.jsx=xo;Nt.jsxs=xo;wo.exports=Nt;var x=wo.exports,br={},dn=Ji;br.createRoot=dn.createRoot,br.hydrateRoot=dn.hydrateRoot;const cs="modulepreload",fs=function(t,e){return new URL(t,e).href},pn={},pt=function(e,r,n){if(!r||r.length===0)return e();const o=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=fs(i,n),i in pn)return;pn[i]=!0;const s=i.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!n)for(let c=o.length-1;c>=0;c--){const d=o[c];if(d.href===i&&(!s||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const u=document.createElement("link");if(u.rel=s?"stylesheet":cs,s||(u.as="script",u.crossOrigin=""),u.href=i,document.head.appendChild(u),s)return new Promise((c,d)=>{u.addEventListener("load",c),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e()).catch(i=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i})};var Hr={exports:{}},Le=typeof Reflect=="object"?Reflect:null,hn=Le&&typeof Le.apply=="function"?Le.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},ht;Le&&typeof Le.ownKeys=="function"?ht=Le.ownKeys:Object.getOwnPropertySymbols?ht=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:ht=function(e){return Object.getOwnPropertyNames(e)};function ds(t){console&&console.warn&&console.warn(t)}var Oo=Number.isNaN||function(e){return e!==e};function R(){R.init.call(this)}Hr.exports=R;Hr.exports.once=ms;R.EventEmitter=R;R.prototype._events=void 0;R.prototype._eventsCount=0;R.prototype._maxListeners=void 0;var gn=10;function _t(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(R,"defaultMaxListeners",{enumerable:!0,get:function(){return gn},set:function(t){if(typeof t!="number"||t<0||Oo(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");gn=t}});R.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};R.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Oo(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Eo(t){return t._maxListeners===void 0?R.defaultMaxListeners:t._maxListeners}R.prototype.getMaxListeners=function(){return Eo(this)};R.prototype.emit=function(e){for(var r=[],n=1;n0&&(s=r[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=i[e];if(l===void 0)return!1;if(typeof l=="function")hn(l,this,r);else for(var u=l.length,c=Ro(l,u),n=0;n0&&s.length>o&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,ds(a)}return t}R.prototype.addListener=function(e,r){return Po(this,e,r,!1)};R.prototype.on=R.prototype.addListener;R.prototype.prependListener=function(e,r){return Po(this,e,r,!0)};function ps(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ao(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=ps.bind(n);return o.listener=r,n.wrapFn=o,o}R.prototype.once=function(e,r){return _t(r),this.on(e,Ao(this,e,r)),this};R.prototype.prependOnceListener=function(e,r){return _t(r),this.prependListener(e,Ao(this,e,r)),this};R.prototype.removeListener=function(e,r){var n,o,i,s,a;if(_t(r),o=this._events,o===void 0)return this;if(n=o[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){a=n[s].listener,i=s;break}if(i<0)return this;i===0?n.shift():hs(n,i),n.length===1&&(o[e]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",e,a||r)}return this};R.prototype.off=R.prototype.removeListener;R.prototype.removeAllListeners=function(e){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),s;for(o=0;o=0;o--)this.removeListener(e,r[o]);return this};function Lo(t,e,r){var n=t._events;if(n===void 0)return[];var o=n[e];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?gs(o):Ro(o,o.length)}R.prototype.listeners=function(e){return Lo(this,e,!0)};R.prototype.rawListeners=function(e){return Lo(this,e,!1)};R.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):$o.call(t,e)};R.prototype.listenerCount=$o;function $o(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}R.prototype.eventNames=function(){return this._eventsCount>0?ht(this._events):[]};function Ro(t,e){for(var r=new Array(e),n=0;ni,e=s=>{i=s}}const n=new No.EventEmitter;n.on("setValue",function(i){e(i),n.emit("upValue",i)}),r&&e(r);const o=i=>{const[s,a]=O.useState(t?t():void 0);return O.useEffect(()=>(i&&n.emit("setValue",i),n.on("upValue",a),()=>{n.off("upValue",a)}),[]),s};return o.set=i=>{n.emit("setValue",i)},o.get=()=>t==null?void 0:t(),o}function _o(t,e){return function(){return t.apply(e,arguments)}}const{toString:vs}=Object.prototype,{getPrototypeOf:qr}=Object,Tt=(t=>e=>{const r=vs.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),oe=t=>(t=t.toLowerCase(),e=>Tt(e)===t),kt=t=>e=>typeof e===t,{isArray:Ie}=Array,Je=kt("undefined");function bs(t){return t!==null&&!Je(t)&&t.constructor!==null&&!Je(t.constructor)&&G(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Io=oe("ArrayBuffer");function Ss(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Io(t.buffer),e}const ws=kt("string"),G=kt("function"),To=kt("number"),Dt=t=>t!==null&&typeof t=="object",xs=t=>t===!0||t===!1,gt=t=>{if(Tt(t)!=="object")return!1;const e=qr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Os=oe("Date"),Es=oe("File"),Ps=oe("Blob"),As=oe("FileList"),Ls=t=>Dt(t)&&G(t.pipe),$s=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||G(t.append)&&((e=Tt(t))==="formdata"||e==="object"&&G(t.toString)&&t.toString()==="[object FormData]"))},Rs=oe("URLSearchParams"),Cs=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xe(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),Ie(t))for(n=0,o=t.length;n0;)if(o=r[n],e===o.toLowerCase())return o;return null}const Do=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Fo=t=>!Je(t)&&t!==Do;function Sr(){const{caseless:t}=Fo(this)&&this||{},e={},r=(n,o)=>{const i=t&&ko(e,o)||o;gt(e[i])&>(n)?e[i]=Sr(e[i],n):gt(n)?e[i]=Sr({},n):Ie(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n(Xe(e,(o,i)=>{r&&G(o)?t[i]=_o(o,r):t[i]=o},{allOwnKeys:n}),t),_s=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Is=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Ts=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&qr(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},ks=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Ds=t=>{if(!t)return null;if(Ie(t))return t;let e=t.length;if(!To(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Fs=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&qr(Uint8Array)),js=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},Ms=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Bs=oe("HTMLFormElement"),Us=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),mn=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),zs=oe("RegExp"),jo=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Xe(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},Vs=t=>{jo(t,(e,r)=>{if(G(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(G(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Ks=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Ie(t)?n(t):n(String(t).split(e)),r},Hs=()=>{},qs=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Xt="abcdefghijklmnopqrstuvwxyz",yn="0123456789",Mo={DIGIT:yn,ALPHA:Xt,ALPHA_DIGIT:Xt+Xt.toUpperCase()+yn},Ws=(t=16,e=Mo.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function Js(t){return!!(t&&G(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Gs=t=>{const e=new Array(10),r=(n,o)=>{if(Dt(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const i=Ie(n)?[]:{};return Xe(n,(s,a)=>{const l=r(s,o+1);!Je(l)&&(i[a]=l)}),e[o]=void 0,i}}return n};return r(t,0)},Ys=oe("AsyncFunction"),Qs=t=>t&&(Dt(t)||G(t))&&G(t.then)&&G(t.catch),h={isArray:Ie,isArrayBuffer:Io,isBuffer:bs,isFormData:$s,isArrayBufferView:Ss,isString:ws,isNumber:To,isBoolean:xs,isObject:Dt,isPlainObject:gt,isUndefined:Je,isDate:Os,isFile:Es,isBlob:Ps,isRegExp:zs,isFunction:G,isStream:Ls,isURLSearchParams:Rs,isTypedArray:Fs,isFileList:As,forEach:Xe,merge:Sr,extend:Ns,trim:Cs,stripBOM:_s,inherits:Is,toFlatObject:Ts,kindOf:Tt,kindOfTest:oe,endsWith:ks,toArray:Ds,forEachEntry:js,matchAll:Ms,isHTMLForm:Bs,hasOwnProperty:mn,hasOwnProp:mn,reduceDescriptors:jo,freezeMethods:Vs,toObjectSet:Ks,toCamelCase:Us,noop:Hs,toFiniteNumber:qs,findKey:ko,global:Do,isContextDefined:Fo,ALPHABET:Mo,generateString:Ws,isSpecCompliantForm:Js,toJSONObject:Gs,isAsyncFn:Ys,isThenable:Qs};function $(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}h.inherits($,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Bo=$.prototype,Uo={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Uo[t]={value:t}});Object.defineProperties($,Uo);Object.defineProperty(Bo,"isAxiosError",{value:!0});$.from=(t,e,r,n,o,i)=>{const s=Object.create(Bo);return h.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),$.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const Xs=null;function wr(t){return h.isPlainObject(t)||h.isArray(t)}function zo(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function vn(t,e,r){return t?t.concat(e).map(function(o,i){return o=zo(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function Zs(t){return h.isArray(t)&&!t.some(wr)}const ea=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function Ft(t,e,r){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=h.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!h.isUndefined(m[g])});const n=r.metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(h.isDate(p))return p.toISOString();if(!l&&h.isBlob(p))throw new $("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(p)||h.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,g,m){let v=p;if(p&&!m&&typeof p=="object"){if(h.endsWith(g,"{}"))g=n?g:g.slice(0,-2),p=JSON.stringify(p);else if(h.isArray(p)&&Zs(p)||(h.isFileList(p)||h.endsWith(g,"[]"))&&(v=h.toArray(p)))return g=zo(g),v.forEach(function(S,w){!(h.isUndefined(S)||S===null)&&e.append(s===!0?vn([g],w,i):s===null?g:g+"[]",u(S))}),!1}return wr(p)?!0:(e.append(vn(m,g,i),u(p)),!1)}const d=[],f=Object.assign(ea,{defaultVisitor:c,convertValue:u,isVisitable:wr});function y(p,g){if(!h.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(p),h.forEach(p,function(v,b){(!(h.isUndefined(v)||v===null)&&o.call(e,v,h.isString(b)?b.trim():b,g,f))===!0&&y(v,g?g.concat(b):[b])}),d.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return y(t),e}function bn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Wr(t,e){this._pairs=[],t&&Ft(t,this,e)}const Vo=Wr.prototype;Vo.append=function(e,r){this._pairs.push([e,r])};Vo.toString=function(e){const r=e?function(n){return e.call(this,n,bn)}:bn;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function ta(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ko(t,e,r){if(!e)return t;const n=r&&r.encode||ta,o=r&&r.serialize;let i;if(o?i=o(e,r):i=h.isURLSearchParams(e)?e.toString():new Wr(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ra{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Sn=ra,Ho={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},na=typeof URLSearchParams<"u"?URLSearchParams:Wr,oa=typeof FormData<"u"?FormData:null,ia=typeof Blob<"u"?Blob:null,sa={isBrowser:!0,classes:{URLSearchParams:na,FormData:oa,Blob:ia},protocols:["http","https","file","blob","url","data"]},qo=typeof window<"u"&&typeof document<"u",aa=(t=>qo&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),la=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ua=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qo,hasStandardBrowserEnv:aa,hasStandardBrowserWebWorkerEnv:la},Symbol.toStringTag,{value:"Module"})),re={...ua,...sa};function ca(t,e){return Ft(t,new re.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return re.isNode&&h.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function fa(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function da(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n=r.length;return s=!s&&h.isArray(o)?o.length:s,l?(h.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!h.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&h.isArray(o[s])&&(o[s]=da(o[s])),!a)}if(h.isFormData(t)&&h.isFunction(t.entries)){const r={};return h.forEachEntry(t,(n,o)=>{e(fa(n),o,r,0)}),r}return null}function pa(t,e,r){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Jr={transitional:Ho,adapter:["xhr","http"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=h.isObject(e);if(i&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return o?JSON.stringify(Wo(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ca(e,this.formSerializer).toString();if((a=h.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ft(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),pa(e)):e}],transformResponse:[function(e){const r=this.transitional||Jr.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(e&&h.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?$.from(a,$.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:re.classes.FormData,Blob:re.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],t=>{Jr.headers[t]={}});const Gr=Jr,ha=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ga=t=>{const e={};let r,n,o;return t&&t.split(` +`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&ha[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},wn=Symbol("internals");function je(t){return t&&String(t).trim().toLowerCase()}function mt(t){return t===!1||t==null?t:h.isArray(t)?t.map(mt):String(t)}function ma(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const ya=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zt(t,e,r,n,o){if(h.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!h.isString(e)){if(h.isString(n))return e.indexOf(n)!==-1;if(h.isRegExp(n))return n.test(e)}}function va(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function ba(t,e){const r=h.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}class jt{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function i(a,l,u){const c=je(l);if(!c)throw new Error("header name must be a non-empty string");const d=h.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=mt(a))}const s=(a,l)=>h.forEach(a,(u,c)=>i(u,c,l));return h.isPlainObject(e)||e instanceof this.constructor?s(e,r):h.isString(e)&&(e=e.trim())&&!ya(e)?s(ga(e),r):e!=null&&i(r,e,n),this}get(e,r){if(e=je(e),e){const n=h.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return ma(o);if(h.isFunction(r))return r.call(this,o,n);if(h.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=je(e),e){const n=h.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Zt(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function i(s){if(s=je(s),s){const a=h.findKey(n,s);a&&(!r||Zt(n,n[a],a,r))&&(delete n[a],o=!0)}}return h.isArray(e)?e.forEach(i):i(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!e||Zt(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const r=this,n={};return h.forEach(this,(o,i)=>{const s=h.findKey(n,i);if(s){r[s]=mt(o),delete r[i];return}const a=e?va(i):String(i).trim();a!==i&&delete r[i],r[a]=mt(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return h.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&h.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[wn]=this[wn]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=je(s);n[a]||(ba(o,s),n[a]=!0)}return h.isArray(e)?e.forEach(i):i(e),this}}jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);h.reduceDescriptors(jt.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});h.freezeMethods(jt);const ae=jt;function er(t,e){const r=this||Gr,n=e||r,o=ae.from(n.headers);let i=n.data;return h.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Jo(t){return!!(t&&t.__CANCEL__)}function Ze(t,e,r){$.call(this,t??"canceled",$.ERR_CANCELED,e,r),this.name="CanceledError"}h.inherits(Ze,$,{__CANCEL__:!0});function Sa(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new $("Request failed with status code "+r.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const wa=re.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const s=[t+"="+encodeURIComponent(e)];h.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),h.isString(n)&&s.push("path="+n),h.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xa(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Oa(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Go(t,e){return t&&!xa(e)?Oa(t,e):e}const Ea=re.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let s=i;return e&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(s){const a=h.isString(s)?o(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function Pa(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Aa(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=n[i];s||(s=u),r[o]=l,n[o]=u;let d=i,f=0;for(;d!==o;)f+=r[d++],d=d%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,l=n(a),u=i<=s;r=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-i)/l:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const La=typeof XMLHttpRequest<"u",$a=La&&function(t){return new Promise(function(r,n){let o=t.data;const i=ae.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,l;function u(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let c;if(h.isFormData(o)){if(re.hasStandardBrowserEnv||re.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[g,...m]=c?c.split(";").map(v=>v.trim()).filter(Boolean):[];i.setContentType([g||"multipart/form-data",...m].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const g=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(g+":"+m))}const f=Go(t.baseURL,t.url);d.open(t.method.toUpperCase(),Ko(f,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function y(){if(!d)return;const g=ae.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),v={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:t,request:d};Sa(function(S){r(S),u()},function(S){n(S),u()},v),d=null}if("onloadend"in d?d.onloadend=y:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(y)},d.onabort=function(){d&&(n(new $("Request aborted",$.ECONNABORTED,t,d)),d=null)},d.onerror=function(){n(new $("Network Error",$.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const v=t.transitional||Ho;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),n(new $(m,v.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,t,d)),d=null},re.hasStandardBrowserEnv&&(a&&h.isFunction(a)&&(a=a(t)),a||a!==!1&&Ea(f))){const g=t.xsrfHeaderName&&t.xsrfCookieName&&wa.read(t.xsrfCookieName);g&&i.set(t.xsrfHeaderName,g)}o===void 0&&i.setContentType(null),"setRequestHeader"in d&&h.forEach(i.toJSON(),function(m,v){d.setRequestHeader(v,m)}),h.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",xn(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",xn(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=g=>{d&&(n(!g||g.type?new Ze(null,t,d):g),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=Pa(f);if(p&&re.protocols.indexOf(p)===-1){n(new $("Unsupported protocol "+p+":",$.ERR_BAD_REQUEST,t));return}d.send(o||null)})},xr={http:Xs,xhr:$a};h.forEach(xr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const On=t=>`- ${t}`,Ra=t=>h.isFunction(t)||t===null||t===!1,Yo={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since : +`+i.map(On).join(` +`):" "+On(i[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:xr};function tr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ze(null,t)}function En(t){return tr(t),t.headers=ae.from(t.headers),t.data=er.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yo.getAdapter(t.adapter||Gr.adapter)(t).then(function(n){return tr(t),n.data=er.call(t,t.transformResponse,n),n.headers=ae.from(n.headers),n},function(n){return Jo(n)||(tr(t),n&&n.response&&(n.response.data=er.call(t,t.transformResponse,n.response),n.response.headers=ae.from(n.response.headers))),Promise.reject(n)})}const Pn=t=>t instanceof ae?{...t}:t;function Re(t,e){e=e||{};const r={};function n(u,c,d){return h.isPlainObject(u)&&h.isPlainObject(c)?h.merge.call({caseless:d},u,c):h.isPlainObject(c)?h.merge({},c):h.isArray(c)?c.slice():c}function o(u,c,d){if(h.isUndefined(c)){if(!h.isUndefined(u))return n(void 0,u,d)}else return n(u,c,d)}function i(u,c){if(!h.isUndefined(c))return n(void 0,c)}function s(u,c){if(h.isUndefined(c)){if(!h.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function a(u,c,d){if(d in e)return n(u,c);if(d in t)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>o(Pn(u),Pn(c),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||o,f=d(t[c],e[c],c);h.isUndefined(f)&&d!==a||(r[c]=f)}),r}const Qo="1.6.8",Yr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Yr[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const An={};Yr.transitional=function(e,r,n){function o(i,s){return"[Axios v"+Qo+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(e===!1)throw new $(o(s," has been removed"+(r?" in "+r:"")),$.ERR_DEPRECATED);return r&&!An[s]&&(An[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,a):!0}};function Ca(t,e,r){if(typeof t!="object")throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const a=t[i],l=a===void 0||s(a,i,t);if(l!==!0)throw new $("option "+i+" must be "+l,$.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new $("Unknown option "+i,$.ERR_BAD_OPTION)}}const Or={assertOptions:Ca,validators:Yr},ue=Or.validators;class St{constructor(e){this.defaults=e,this.interceptors={request:new Sn,response:new Sn}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=` +`+i):n.stack=i}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Re(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Or.assertOptions(n,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),o!=null&&(h.isFunction(o)?r.paramsSerializer={serialize:o}:Or.assertOptions(o,{encode:ue.function,serialize:ue.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&h.merge(i.common,i[r.method]);i&&h.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=ae.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!l){const p=[En.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),f=p.length,c=Promise.resolve(r);d{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new Ze(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new Qr(function(o){e=o}),cancel:e}}}const Na=Qr;function _a(t){return function(r){return t.apply(null,r)}}function Ia(t){return h.isObject(t)&&t.isAxiosError===!0}const Er={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Er).forEach(([t,e])=>{Er[e]=t});const Ta=Er;function Xo(t){const e=new yt(t),r=_o(yt.prototype.request,e);return h.extend(r,yt.prototype,e,{allOwnKeys:!0}),h.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Xo(Re(t,o))},r}const N=Xo(Gr);N.Axios=yt;N.CanceledError=Ze;N.CancelToken=Na;N.isCancel=Jo;N.VERSION=Qo;N.toFormData=Ft;N.AxiosError=$;N.Cancel=N.CanceledError;N.all=function(e){return Promise.all(e)};N.spread=_a;N.isAxiosError=Ia;N.mergeConfig=Re;N.AxiosHeaders=ae;N.formToJSON=t=>Wo(h.isHTMLForm(t)?new FormData(t):t);N.getAdapter=Yo.getAdapter;N.HttpStatusCode=Ta;N.default=N;const Zo=N;var ka=Error,Da=EvalError,Fa=RangeError,ja=ReferenceError,ei=SyntaxError,et=TypeError,Ma=URIError,Ba=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==o||s.enumerable!==!0)return!1}return!0},Ln=typeof Symbol<"u"&&Symbol,Ua=Ba,za=function(){return typeof Ln!="function"||typeof Symbol!="function"||typeof Ln("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ua()},rr={__proto__:null,foo:{}},Va=Object,Ka=function(){return{__proto__:rr}.foo===rr.foo&&!(rr instanceof Va)},Ha="Function.prototype.bind called on incompatible ",qa=Object.prototype.toString,Wa=Math.max,Ja="[object Function]",$n=function(e,r){for(var n=[],o=0;o"u"||!I?A:I(Uint8Array),ye={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?A:ArrayBuffer,"%ArrayIteratorPrototype%":xe&&I?I([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":Ae,"%AsyncGenerator%":Ae,"%AsyncGeneratorFunction%":Ae,"%AsyncIteratorPrototype%":Ae,"%Atomics%":typeof Atomics>"u"?A:Atomics,"%BigInt%":typeof BigInt>"u"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":nl,"%eval%":eval,"%EvalError%":ol,"%Float32Array%":typeof Float32Array>"u"?A:Float32Array,"%Float64Array%":typeof Float64Array>"u"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?A:FinalizationRegistry,"%Function%":ti,"%GeneratorFunction%":Ae,"%Int8Array%":typeof Int8Array>"u"?A:Int8Array,"%Int16Array%":typeof Int16Array>"u"?A:Int16Array,"%Int32Array%":typeof Int32Array>"u"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":xe&&I?I(I([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map>"u"?A:Map,"%MapIteratorPrototype%":typeof Map>"u"||!xe||!I?A:I(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?A:Promise,"%Proxy%":typeof Proxy>"u"?A:Proxy,"%RangeError%":il,"%ReferenceError%":sl,"%Reflect%":typeof Reflect>"u"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?A:Set,"%SetIteratorPrototype%":typeof Set>"u"||!xe||!I?A:I(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":xe&&I?I(""[Symbol.iterator]()):A,"%Symbol%":xe?Symbol:A,"%SyntaxError%":Ce,"%ThrowTypeError%":ll,"%TypedArray%":cl,"%TypeError%":$e,"%Uint8Array%":typeof Uint8Array>"u"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?A:Uint32Array,"%URIError%":al,"%WeakMap%":typeof WeakMap>"u"?A:WeakMap,"%WeakRef%":typeof WeakRef>"u"?A:WeakRef,"%WeakSet%":typeof WeakSet>"u"?A:WeakSet};if(I)try{null.error}catch(t){var fl=I(I(t));ye["%Error.prototype%"]=fl}var dl=function t(e){var r;if(e==="%AsyncFunction%")r=nr("async function () {}");else if(e==="%GeneratorFunction%")r=nr("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=nr("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&I&&(r=I(o.prototype))}return ye[e]=r,r},Rn={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},tt=Xr,wt=rl,pl=tt.call(Function.call,Array.prototype.concat),hl=tt.call(Function.apply,Array.prototype.splice),Cn=tt.call(Function.call,String.prototype.replace),xt=tt.call(Function.call,String.prototype.slice),gl=tt.call(Function.call,RegExp.prototype.exec),ml=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yl=/\\(\\)?/g,vl=function(e){var r=xt(e,0,1),n=xt(e,-1);if(r==="%"&&n!=="%")throw new Ce("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ce("invalid intrinsic syntax, expected opening `%`");var o=[];return Cn(e,ml,function(i,s,a,l){o[o.length]=a?Cn(l,yl,"$1"):s||i}),o},bl=function(e,r){var n=e,o;if(wt(Rn,n)&&(o=Rn[n],n="%"+o[0]+"%"),wt(ye,n)){var i=ye[n];if(i===Ae&&(i=dl(n)),typeof i>"u"&&!r)throw new $e("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new Ce("intrinsic "+e+" does not exist!")},Te=function(e,r){if(typeof e!="string"||e.length===0)throw new $e("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new $e('"allowMissing" argument must be a boolean');if(gl(/^%?[^%]*%?$/,e)===null)throw new Ce("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=vl(e),o=n.length>0?n[0]:"",i=bl("%"+o+"%",r),s=i.name,a=i.value,l=!1,u=i.alias;u&&(o=u[0],hl(n,pl([0,1],u)));for(var c=1,d=!0;c=n.length){var g=me(a,f);d=!!g,d&&"get"in g&&!("originalValue"in g.get)?a=g.get:a=a[f]}else d=wt(a,f),a=a[f];d&&!l&&(ye[s]=a)}}return a},ri={exports:{}},ir,Nn;function Zr(){if(Nn)return ir;Nn=1;var t=Te,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ir=e,ir}var Sl=Te,vt=Sl("%Object.getOwnPropertyDescriptor%",!0);if(vt)try{vt([],"length")}catch{vt=null}var ni=vt,_n=Zr(),wl=ei,Oe=et,In=ni,xl=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Oe("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Oe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Oe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Oe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Oe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Oe("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!In&&In(e,r);if(_n)_n(e,r,{configurable:s===null&&l?l.configurable:!s,enumerable:o===null&&l?l.enumerable:!o,value:n,writable:i===null&&l?l.writable:!i});else if(a||!o&&!i&&!s)e[r]=n;else throw new wl("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Pr=Zr(),oi=function(){return!!Pr};oi.hasArrayLengthDefineBug=function(){if(!Pr)return null;try{return Pr([],"length",{value:1}).length!==1}catch{return!0}};var Ol=oi,El=Te,Tn=xl,Pl=Ol(),kn=ni,Dn=et,Al=El("%Math.floor%"),Ll=function(e,r){if(typeof e!="function")throw new Dn("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Al(r)!==r)throw new Dn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&kn){var s=kn(e,"length");s&&!s.configurable&&(o=!1),s&&!s.writable&&(i=!1)}return(o||i||!n)&&(Pl?Tn(e,"length",r,!0,!0):Tn(e,"length",r)),e};(function(t){var e=Xr,r=Te,n=Ll,o=et,i=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||e.call(s,i),l=Zr(),u=r("%Math.max%");t.exports=function(f){if(typeof f!="function")throw new o("a function is required");var y=a(e,s,arguments);return n(y,1+u(0,f.length-(arguments.length-1)),!0)};var c=function(){return a(e,i,arguments)};l?l(t.exports,"apply",{value:c}):t.exports.apply=c})(ri);var $l=ri.exports,ii=Te,si=$l,Rl=si(ii("String.prototype.indexOf")),Cl=function(e,r){var n=ii(e,!!r);return typeof n=="function"&&Rl(e,".prototype.")>-1?si(n):n};const Nl={},_l=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"})),Il=Gi(_l);var en=typeof Map=="function"&&Map.prototype,sr=Object.getOwnPropertyDescriptor&&en?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ot=en&&sr&&typeof sr.get=="function"?sr.get:null,Fn=en&&Map.prototype.forEach,tn=typeof Set=="function"&&Set.prototype,ar=Object.getOwnPropertyDescriptor&&tn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Et=tn&&ar&&typeof ar.get=="function"?ar.get:null,jn=tn&&Set.prototype.forEach,Tl=typeof WeakMap=="function"&&WeakMap.prototype,Ke=Tl?WeakMap.prototype.has:null,kl=typeof WeakSet=="function"&&WeakSet.prototype,He=kl?WeakSet.prototype.has:null,Dl=typeof WeakRef=="function"&&WeakRef.prototype,Mn=Dl?WeakRef.prototype.deref:null,Fl=Boolean.prototype.valueOf,jl=Object.prototype.toString,Ml=Function.prototype.toString,Bl=String.prototype.match,rn=String.prototype.slice,de=String.prototype.replace,Ul=String.prototype.toUpperCase,Bn=String.prototype.toLowerCase,ai=RegExp.prototype.test,Un=Array.prototype.concat,te=Array.prototype.join,zl=Array.prototype.slice,zn=Math.floor,Ar=typeof BigInt=="function"?BigInt.prototype.valueOf:null,lr=Object.getOwnPropertySymbols,Lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="object",D=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ne||"symbol")?Symbol.toStringTag:null,li=Object.prototype.propertyIsEnumerable,Vn=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Kn(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||ai.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-zn(-t):zn(t);if(n!==t){var o=String(n),i=rn.call(e,o.length+1);return de.call(o,r,"$&_")+"."+de.call(de.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return de.call(e,r,"$&_")}var $r=Il,Hn=$r.custom,qn=ci(Hn)?Hn:null,Vl=function t(e,r,n,o){var i=r||{};if(ce(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ce(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ce(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ce(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ce(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return di(e,i);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?Kn(e,l):l}if(typeof e=="bigint"){var u=String(e)+"n";return a?Kn(e,u):u}var c=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof e=="object")return Rr(e)?"[Array]":"[Object]";var d=au(i,n);if(typeof o>"u")o=[];else if(fi(o,e)>=0)return"[Circular]";function f(H,V,K){if(V&&(o=zl.call(o),o.push(V)),K){var Y={depth:i.depth};return ce(i,"quoteStyle")&&(Y.quoteStyle=i.quoteStyle),t(H,Y,n+1,o)}return t(H,i,n+1,o)}if(typeof e=="function"&&!Wn(e)){var y=Xl(e),p=st(e,f);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(p.length>0?" { "+te.call(p,", ")+" }":"")}if(ci(e)){var g=Ne?de.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Lr.call(e);return typeof e=="object"&&!Ne?Me(g):g}if(ou(e)){for(var m="<"+Bn.call(String(e.nodeName)),v=e.attributes||[],b=0;b",m}if(Rr(e)){if(e.length===0)return"[]";var S=st(e,f);return d&&!su(S)?"["+Cr(S,d)+"]":"[ "+te.call(S,", ")+" ]"}if(ql(e)){var w=st(e,f);return!("cause"in Error.prototype)&&"cause"in e&&!li.call(e,"cause")?"{ ["+String(e)+"] "+te.call(Un.call("[cause]: "+f(e.cause),w),", ")+" }":w.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+te.call(w,", ")+" }"}if(typeof e=="object"&&s){if(qn&&typeof e[qn]=="function"&&$r)return $r(e,{depth:c-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Zl(e)){var L=[];return Fn&&Fn.call(e,function(H,V){L.push(f(V,e,!0)+" => "+f(H,e))}),Jn("Map",Ot.call(e),L,d)}if(ru(e)){var P=[];return jn&&jn.call(e,function(H){P.push(f(H,e))}),Jn("Set",Et.call(e),P,d)}if(eu(e))return ur("WeakMap");if(nu(e))return ur("WeakSet");if(tu(e))return ur("WeakRef");if(Jl(e))return Me(f(Number(e)));if(Yl(e))return Me(f(Ar.call(e)));if(Gl(e))return Me(Fl.call(e));if(Wl(e))return Me(f(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===Yi)return"{ [object globalThis] }";if(!Hl(e)&&!Wn(e)){var E=st(e,f),M=Vn?Vn(e)===Object.prototype:e instanceof Object||e.constructor===Object,B=e instanceof Object?"":"null prototype",U=!M&&D&&Object(e)===e&&D in e?rn.call(pe(e),8,-1):B?"Object":"",z=M||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",he=z+(U||B?"["+te.call(Un.call([],U||[],B||[]),": ")+"] ":"");return E.length===0?he+"{}":d?he+"{"+Cr(E,d)+"}":he+"{ "+te.call(E,", ")+" }"}return String(e)};function ui(t,e,r){var n=(r.quoteStyle||e)==="double"?'"':"'";return n+t+n}function Kl(t){return de.call(String(t),/"/g,""")}function Rr(t){return pe(t)==="[object Array]"&&(!D||!(typeof t=="object"&&D in t))}function Hl(t){return pe(t)==="[object Date]"&&(!D||!(typeof t=="object"&&D in t))}function Wn(t){return pe(t)==="[object RegExp]"&&(!D||!(typeof t=="object"&&D in t))}function ql(t){return pe(t)==="[object Error]"&&(!D||!(typeof t=="object"&&D in t))}function Wl(t){return pe(t)==="[object String]"&&(!D||!(typeof t=="object"&&D in t))}function Jl(t){return pe(t)==="[object Number]"&&(!D||!(typeof t=="object"&&D in t))}function Gl(t){return pe(t)==="[object Boolean]"&&(!D||!(typeof t=="object"&&D in t))}function ci(t){if(Ne)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!Lr)return!1;try{return Lr.call(t),!0}catch{}return!1}function Yl(t){if(!t||typeof t!="object"||!Ar)return!1;try{return Ar.call(t),!0}catch{}return!1}var Ql=Object.prototype.hasOwnProperty||function(t){return t in this};function ce(t,e){return Ql.call(t,e)}function pe(t){return jl.call(t)}function Xl(t){if(t.name)return t.name;var e=Bl.call(Ml.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function fi(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return di(rn.call(t,0,e.maxStringLength),e)+n}var o=de.call(de.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,iu);return ui(o,"single",e)}function iu(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Ul.call(e.toString(16))}function Me(t){return"Object("+t+")"}function ur(t){return t+" { ? }"}function Jn(t,e,r,n){var o=n?Cr(r,n):te.call(r,", ");return t+" ("+e+") {"+o+"}"}function su(t){for(var e=0;e=0)return!1;return!0}function au(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=te.call(Array(t.indent+1)," ");else return null;return{base:r,prev:te.call(Array(e+1),r)}}function Cr(t,e){if(t.length===0)return"";var r=` +`+e.prev+e.base;return r+te.call(t,","+r)+` +`+e.prev}function st(t,e){var r=Rr(t),n=[];if(r){n.length=t.length;for(var o=0;o1;){var r=e.pop(),n=r.obj[r.prop];if(ge(n)){for(var o=[],i=0;i=dr?s.slice(l,l+dr):s,c=[],d=0;d=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===xu.RFC1738&&(f===40||f===41)){c[c.length]=u.charAt(d);continue}if(f<128){c[c.length]=Z[f];continue}if(f<2048){c[c.length]=Z[192|f>>6]+Z[128|f&63];continue}if(f<55296||f>=57344){c[c.length]=Z[224|f>>12]+Z[128|f>>6&63]+Z[128|f&63];continue}d+=1,f=65536+((f&1023)<<10|u.charCodeAt(d)&1023),c[c.length]=Z[240|f>>18]+Z[128|f>>12&63]+Z[128|f>>6&63]+Z[128|f&63]}a+=c.join("")}return a},$u=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=[],o=0;o"u"&&(L=0)}if(typeof c=="function"?S=c(r,S):S instanceof Date?S=y(S):n==="comma"&&ee(S)&&(S=bt.maybeMap(S,function(ie){return ie instanceof Date?y(ie):ie})),S===null){if(s)return u&&!m?u(r,_.encoder,v,"key",p):r;S=""}if(Du(S)||bt.isBuffer(S)){if(u){var M=m?r:u(r,_.encoder,v,"key",p);return[g(M)+"="+g(u(S,_.encoder,v,"value",p))]}return[g(r)+"="+g(String(S))]}var B=[];if(typeof S>"u")return B;var U;if(n==="comma"&&ee(S))m&&u&&(S=bt.maybeMap(S,u)),U=[{value:S.length>0?S.join(",")||null:void 0}];else if(ee(c))U=c;else{var z=Object.keys(S);U=d?z.sort(d):z}var he=l?r.replace(/\./g,"%2E"):r,H=o&&ee(S)&&S.length===1?he+"[]":he;if(i&&ee(S)&&S.length===0)return H+"[]";for(var V=0;V"u"?e.encodeDotInKeys===!0?!0:_.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:_.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:_.allowEmptyArrays,arrayFormat:s,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:_.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?_.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:_.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:_.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:_.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:_.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:_.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:_.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:_.strictNullHandling}},Mu=function(t,e){var r=t,n=ju(e),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):ee(n.filter)&&(i=n.filter,o=i);var s=[];if(typeof r!="object"||r===null)return"";var a=yi[n.arrayFormat],l=a==="comma"&&n.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var u=mi(),c=0;c0?y+f:""},_e=gi,Nr=Object.prototype.hasOwnProperty,Bu=Array.isArray,C={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:_e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Uu=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},bi=function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},zu="utf8=%26%2310003%3B",Vu="utf8=%E2%9C%93",Ku=function(e,r){var n={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=r.parameterLimit===1/0?void 0:r.parameterLimit,s=o.split(r.delimiter,i),a=-1,l,u=r.charset;if(r.charsetSentinel)for(l=0;l-1&&(p=Bu(p)?[p]:p);var g=Nr.call(n,y);g&&r.duplicates==="combine"?n[y]=_e.combine(n[y],p):(!g||r.duplicates==="last")&&(n[y]=p)}return n},Hu=function(t,e,r,n){for(var o=n?e:bi(e,r),i=t.length-1;i>=0;--i){var s,a=t[i];if(a==="[]"&&r.parseArrays)s=r.allowEmptyArrays&&o===""?[]:[].concat(o);else{s=r.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,u=r.decodeDotInKeys?l.replace(/%2E/g,"."):l,c=parseInt(u,10);!r.parseArrays&&u===""?s={0:o}:!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(s=[],s[c]=o):u!=="__proto__"&&(s[u]=o)}o=s}return o},qu=function(e,r,n,o){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=n.depth>0&&s.exec(i),u=l?i.slice(0,l.index):i,c=[];if(u){if(!n.plainObjects&&Nr.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var d=0;n.depth>0&&(l=a.exec(i))!==null&&d"u"?C.charset:e.charset,n=typeof e.duplicates>"u"?C.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:C.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:C.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:C.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:C.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:C.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:C.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:C.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:C.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:C.decoder,delimiter:typeof e.delimiter=="string"||_e.isRegExp(e.delimiter)?e.delimiter:C.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:C.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:C.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:C.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:C.strictNullHandling}},Ju=function(t,e){var r=Wu(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof t=="string"?Ku(t,r):t,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=e||ec,this.options=r,this.debug=r.debug}log(){for(var e=arguments.length,r=new Array(e),n=0;n{this.observers[n]||(this.observers[n]=new Map);const o=this.observers[n].get(r)||0;this.observers[n].set(r,o+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o{let[a,l]=s;for(let u=0;u{let[a,l]=s;for(let u=0;u{t=n,e=o});return r.resolve=t,r.reject=e,r}function Yn(t){return t==null?"":""+t}function tc(t,e,r){t.forEach(n=>{e[n]&&(r[n]=e[n])})}const rc=/###/g;function We(t,e,r){function n(a){return a&&a.indexOf("###")>-1?a.replace(rc,"."):a}function o(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let s=0;for(;s":">",'"':""","'":"'","/":"/"};function sc(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>ic[e]):t}class ac{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const lc=[" ",",","?","!",";"],uc=new ac(20);function cc(t,e,r){e=e||"",r=r||"";const n=lc.filter(s=>e.indexOf(s)<0&&r.indexOf(s)<0);if(n.length===0)return!0;const o=uc.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`);let i=!o.test(t);if(!i){const s=t.indexOf(r);s>0&&!o.test(t.substring(0,s))&&(i=!0)}return i}function _r(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(r);let o=t;for(let i=0;i-1&&l0?t.replace("_","-"):t}class Xn extends Mt{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,r],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&i?a.push(...n.split(i)):a.push(n)));const l=At(this.data,a);return!l&&!r&&!n&&e.indexOf(".")>-1&&(e=a[0],r=a[1],n=a.slice(2).join(".")),l||!s||typeof n!="string"?l:_r(this.data&&this.data[e]&&this.data[e][r],n,i)}addResource(e,r,n,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,r];n&&(a=a.concat(s?n.split(s):n)),e.indexOf(".")>-1&&(a=e.split("."),o=r,r=a[1]),this.addNamespaces(r),Qn(this.data,a,o),i.silent||this.emit("added",e,r,n,o)}addResources(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in n)(typeof n[i]=="string"||Array.isArray(n[i]))&&this.addResource(e,r,i,n[i],{silent:!0});o.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,r];e.indexOf(".")>-1&&(a=e.split("."),o=n,n=r,r=a[1]),this.addNamespaces(r);let l=At(this.data,a)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),o?Si(l,n,i):l={...l,...n},Qn(this.data,a,l),s.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,r)}:this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(o=>r[o]&&Object.keys(r[o]).length>0)}toJSON(){return this.data}}var wi={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,o){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,r,n,o))}),e}};const Zn={};class $t extends Mt{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),tc(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ne.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,r);return n&&n.res!==void 0}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let i=r.ns||this.options.defaultNS||[];const s=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!cc(e,n,o);if(s&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:i};const u=e.split(n);(n!==o||n===o&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(o)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(e[e.length-1],r),l=a[a.length-1],u=r.lng||this.language,c=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const w=r.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${w}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${w}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:s}const d=this.resolve(e,r);let f=d&&d.res;const y=d&&d.usedKey||s,p=d&&d.exactUsedKey||s,g=Object.prototype.toString.apply(f),m=["[object Number]","[object Function]","[object RegExp]"],v=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&m.indexOf(g)<0&&!(typeof v=="string"&&Array.isArray(f))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,f,{...r,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(d.res=w,d.usedParams=this.getUsedParamsDetails(r),d):w}if(i){const w=Array.isArray(f),L=w?[]:{},P=w?p:y;for(const E in f)if(Object.prototype.hasOwnProperty.call(f,E)){const M=`${P}${i}${E}`;L[E]=this.translate(M,{...r,joinArrays:!1,ns:a}),L[E]===M&&(L[E]=f[E])}f=L}}else if(b&&typeof v=="string"&&Array.isArray(f))f=f.join(v),f&&(f=this.extendTranslation(f,e,r,n));else{let w=!1,L=!1;const P=r.count!==void 0&&typeof r.count!="string",E=$t.hasDefaultValue(r),M=P?this.pluralResolver.getSuffix(u,r.count,r):"",B=r.ordinal&&P?this.pluralResolver.getSuffix(u,r.count,{ordinal:!1}):"",U=P&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),z=U&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${M}`]||r[`defaultValue${B}`]||r.defaultValue;!this.isValidLookup(f)&&E&&(w=!0,f=z),this.isValidLookup(f)||(L=!0,f=s);const H=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:f,V=E&&z!==f&&this.options.updateMissing;if(L||w||V){if(this.logger.log(V?"updateKey":"missingKey",u,l,s,V?z:f),i){const F=this.resolve(s,{...r,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let K=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let F=0;F{const cn=E&&ie!==f?ie:H;this.options.missingKeyHandler?this.options.missingKeyHandler(F,l,Q,cn,V,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(F,l,Q,cn,V,r),this.emit("missingKey",F,l,Q,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?K.forEach(F=>{const Q=this.pluralResolver.getSuffixes(F,r);U&&r[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(ie=>{Se([F],s+ie,r[`defaultValue${ie}`]||z)})}):Se(K,s,z))}f=this.extendTranslation(f,e,r,d,n),L&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(L||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,w?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(r),d):f}extendTranslation(e,r,n,o,i){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language,n),u){const f=e.match(this.interpolator.nestingRegexp),y=f&&f.length;c1&&arguments[1]!==void 0?arguments[1]:{},n,o,i,s,a;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),c=u.key;o=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=r.count!==void 0&&typeof r.count!="string",y=f&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(m=>{this.isValidLookup(n)||(a=m,!Zn[`${g[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Zn[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(v=>{if(this.isValidLookup(n))return;s=v;const b=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,c,v,m,r);else{let w;f&&(w=this.pluralResolver.getSuffix(v,r.count,r));const L=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(b.push(c+w),r.ordinal&&w.indexOf(P)===0&&b.push(c+w.replace(P,this.options.pluralSeparator)),y&&b.push(c+L)),p){const E=`${c}${this.options.contextSeparator}${r.context}`;b.push(E),f&&(b.push(E+w),r.ordinal&&w.indexOf(P)===0&&b.push(E+w.replace(P,this.options.pluralSeparator)),y&&b.push(E+L))}}let S;for(;S=b.pop();)this.isValidLookup(n)||(i=S,n=this.getResource(v,m,S,r))}))})}),{res:n,usedKey:o,exactUsedKey:i,usedLng:s,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,r,n,o):this.resourceStore.getResource(e,r,n,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&typeof e.replace!="string";let o=n?e.replace:e;if(n&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!n){o={...o};for(const i of r)delete o[i]}return o}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}function hr(t){return t.charAt(0).toUpperCase()+t.slice(1)}class eo{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ne.create("languageUtils")}getScriptPartFromCode(e){if(e=Lt(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Lt(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(o=>o.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=hr(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=hr(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=hr(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const o=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(o))&&(r=o)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const o=this.getLanguagePartFromCode(n);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],e),o=[],i=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),n.forEach(s=>{o.indexOf(s)<0&&i(this.formatLanguageCode(s))}),o}}let fc=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],dc={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const pc=["v1","v2","v3"],hc=["v4"],to={zero:0,one:1,two:2,few:3,many:4,other:5};function gc(){const t={};return fc.forEach(e=>{e.lngs.forEach(r=>{t[r]={numbers:e.nr,plurals:dc[e.fc]}})}),t}class mc{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=r,this.logger=ne.create("pluralResolver"),(!this.options.compatibilityJSON||hc.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=gc()}addRule(e,r){this.rules[e]=r}getRule(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Lt(e==="dev"?"en":e),{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(o=>`${r}${o}`)}getSuffixes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((o,i)=>to[o]-to[i]).map(o=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o}`):n.numbers.map(o=>this.getSuffix(e,o,r)):[]}getSuffix(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,n);return o?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o.select(r)}`:this.getSuffixRetroCompatible(o,r):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,r){const n=e.noAbs?e.plurals(r):e.plurals(Math.abs(r));let o=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!pc.includes(this.options.compatibilityJSON)}}function ro(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=oc(t,e,r);return!i&&o&&typeof r=="string"&&(i=_r(t,r,n),i===void 0&&(i=_r(e,r,n))),i}class yc{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ne.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:o,prefix:i,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:y,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:v,alwaysFormat:b}=e.interpolation;this.escape=r!==void 0?r:sc,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Ee(i):s||"{{",this.suffix=a?Ee(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?Ee(f):y||Ee("$t("),this.nestingSuffix=p?Ee(p):g||Ee(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=v||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,r,n,o){let i,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const b=ro(r,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...o,...r,interpolationkey:p}):b}const g=p.split(this.formatSeparator),m=g.shift().trim(),v=g.join(this.formatSeparator).trim();return this.format(ro(r,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),v,n,{...o,...r,interpolationkey:m})};this.resetRegExp();const d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,f=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(a=0;i=p.regex.exec(e);){const g=i[1].trim();if(s=c(g),s===void 0)if(typeof d=="function"){const v=d(e,i,o);s=typeof v=="string"?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))s="";else if(f){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Yn(s));const m=p.safeValue(s);if(e=e.replace(i[0],m),f?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s;function a(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const y=f.match(/'/g),p=f.match(/"/g);(y&&y.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;o=this.nestingRegexp.exec(e);){let l=[];s={...n},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const c=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=c.shift(),l=c,u=!0}if(i=r(a.call(this,o[1].trim(),s),s),i&&o[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=Yn(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),i=""),u&&(i=l.reduce((c,d)=>this.format(c,d,n.lng,{...n,interpolationkey:o[1].trim()}),i.trim())),e=e.replace(o[0],i),this.regexp.lastIndex=0}return e}}function vc(t){let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);e==="currency"&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();r[c]||(r[c]=u),u==="false"&&(r[c]=!1),u==="true"&&(r[c]=!0),isNaN(u)||(r[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:r}}function Pe(t){const e={};return function(n,o,i){const s=o+JSON.stringify(i);let a=e[s];return a||(a=t(Lt(o),i),e[s]=a),a(n)}}class bc{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ne.create("formatter"),this.options=e,this.formats={number:Pe((r,n)=>{const o=new Intl.NumberFormat(r,{...n});return i=>o.format(i)}),currency:Pe((r,n)=>{const o=new Intl.NumberFormat(r,{...n,style:"currency"});return i=>o.format(i)}),datetime:Pe((r,n)=>{const o=new Intl.DateTimeFormat(r,{...n});return i=>o.format(i)}),relativetime:Pe((r,n)=>{const o=new Intl.RelativeTimeFormat(r,{...n});return i=>o.format(i,n.range||"day")}),list:Pe((r,n)=>{const o=new Intl.ListFormat(r,{...n});return i=>o.format(i)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Pe(r)}format(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return r.split(this.formatSeparator).reduce((a,l)=>{const{formatName:u,formatOptions:c}=vc(l);if(this.formats[u]){let d=a;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=f.locale||f.lng||o.locale||o.lng||n;d=this.formats[u](a,y,{...c,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}function Sc(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class wc extends Mt{constructor(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=o,this.logger=ne.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,o.backend,o)}queueLoad(e,r,n,o){const i={},s={},a={},l={};return e.forEach(u=>{let c=!0;r.forEach(d=>{const f=`${u}|${d}`;!n.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,r,n){const o=e.split("|"),i=o[0],s=o[1];r&&this.emit("failedLoading",i,s,r),n&&this.store.addResourceBundle(i,s,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2;const a={};this.queue.forEach(l=>{nc(l.loaded,[i],s),Sc(l,e),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,r,n){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:o,wait:i,callback:s});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&o{this.read.call(this,e,r,n,o+1,i*2,s)},i);return}s(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(e,r);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,r,a)}prepareLoading(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof r=="string"&&(r=[r]);const i=this.queueLoad(e,r,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${r}loading namespace ${i} for language ${o} failed`,s),!s&&a&&this.logger.log(`${r}loaded namespace ${i} for language ${o}`,a),this.loaded(e,s,a)})}saveMissing(e,r,n,o,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,r,n,o,l):c=u(e,r,n,o),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else u(e,r,n,o,a,l)}!e||!e[0]||this.store.addResource(e[0],r,n,o)}}}function no(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let r={};if(typeof e[1]=="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(o=>{r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function oo(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function ut(){}function xc(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})}class Ge extends Mt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=oo(e),this.services={},this.logger=ne,this.modules={external:[]},xc(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(){var e=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const o=no();this.options={...o,...this.options,...oo(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);function i(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?ne.init(i(this.modules.logger),this.options):ne.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=bc);const d=new eo(this.options);this.store=new Xn(this.options.resources,this.options);const f=this.services;f.logger=ne,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new mc(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new yc(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new wc(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(y){for(var p=arguments.length,g=new Array(p>1?p-1:0),m=1;m1?p-1:0),m=1;m{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ut),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=Be(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut;const o=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,r,n){const o=Be();return e||(e=this.languages),r||(r=this.options.ns),n||(n=ut),this.services.backendConnector.reload(e,r,i=>{o.resolve(),n(i)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&wi.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,r){var n=this;this.isLanguageChangingTo=e;const o=Be();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,o.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),o}getFixedT(e,r,n){var o=this;const i=function(s,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d`${l.keyPrefix}${f}${p}`):y=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,o.t(y,l)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=r,i.keyPrefix=n,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};if(r.precheck){const a=r.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,e)&&(!o||s(i,e)))}loadNamespaces(e,r){const n=Be();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=Be();typeof e=="string"&&(e=[e]);const o=this.options.preload||[],i=e.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=o.concat(i),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new eo(no());return r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new Ge(e,r)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},i=new Ge(o);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n&&(i.store=new Xn(this.store.data,o),i.services.resourceStore=i.store),i.translator=new $t(i.services,o),i.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;ct.split(",").map((e,r)=>{e=e.trim();const n=e.replace(/([&*]|\+\+)/g,""),o=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return kr(n,o,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Array.isArray(o),r===0)});function Pc(t,e,r,n){const o=t.db.createObjectStore(e,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach(i=>Tr(o,i)),o}function Tr(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})}function kr(t,e,r,n,o,i,s){return{name:t,keyPath:e,unique:r,multi:n,auto:o,compound:i,src:(r&&!s?"&":"")+(n?"*":"")+(o?"++":"")+xi(e)}}function Oi(t,e,r){return{name:t,primKey:e,indexes:r,mappedClass:null,idxByName:Ac(r,n=>[n.name,n])}}function Ei(t,e){const r={};return[...t.objectStoreNames].forEach(o=>{const i=e.objectStore(o);let s=i.keyPath;const a=kr(xi(s),s||"",!1,!1,!!i.autoIncrement,s&&typeof s!="string",!0),l=[];for(let c=0;c0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}}return n}function Ac(t,e){return t.reduce((r,n,o)=>{var i=e(n,o);return i&&(r[i[0]]=i[1]),r},{})}function io(t,e,r,n){const o=Ei(e,r),i={};return Object.keys(t).forEach(a=>{const[l,...u]=Ec(t[a]);i[a]=Oi(a,l,u)}),Pi(o,i,n)}function Lc(t,e,r){t.add.forEach(n=>{Pc(r,n[0],n[1].primKey,n[1].indexes)}),t.change.forEach(n=>{if(n.recreate)throw"Not yet support for changing primary key";{const o=r.objectStore(n.name);n.add.forEach(i=>Tr(o,i)),n.change.forEach(i=>{o.deleteIndex(i.name),Tr(o,i)}),n.del.forEach(i=>o.deleteIndex(i))}}),t.del.forEach(n=>{e.deleteObjectStore(n)})}function $c(t){const e=new Map;return{idbOpen:async(o,{store:i,incrementalUpdate:s}={})=>{if(!o||typeof o!="string")return Promise.reject(new TypeError("dbName must be a string"));let a=e.get(o);if(a)try{return await c(await a)}catch(f){if(e.delete(o),!(f instanceof Error&&Object.prototype.toString.call(f)==="[object DOMException]"&&f.message.indexOf("The database connection is closing.")!==-1))return Promise.reject(f)}let l=d();return e.set(o,l),l.catch(()=>{l===e.get(o)&&e.delete(o)}),l;function u(f,y){const p=function(g){var v,b,S;const m=io(g,f,y,s);return!((v=m.add)!=null&&v.length||(b=m.change)!=null&&b.length||(S=m.del)!=null&&S.length)};switch(typeof i){case"string":{const[g,m]=i.split("|");return p({[g]:m||"++"})}case"function":try{return typeof i.call(this,f,y)!="function"}catch(g){throw g}case"object":if(i)return p(i);default:return!0}}function c(f){if(u(f,f.objectStoreNames.length?f.transaction([...f.objectStoreNames],"readonly"):void 0))return Promise.resolve(f);{let y=f.version+1;return d(y)}}function d(f){return new Promise((y,p)=>{let g=t.indexedDB.open(o,f);g.onerror=function(m){p(this.error)},g.onupgradeneeded=function(m){var S,w,L;const v=this.result,b=this.transaction;try{switch(typeof i){case"function":{const P=()=>i.call(this,v,b),E=()=>Ei(v,b);let M,B=E();for(;typeof(M=P())=="function";){M.call(this,v,b,m);const U=E(),z=Pi(B,U,!1);if(B=U,!((S=z.add)!=null&&S.length||(w=z.change)!=null&&w.length||(L=z.del)!=null&&L.length))throw new Error('Parameter "store" contradicts "upgradeneeded"')}break}case"string":case"object":{let P;if(typeof i=="string"){const[M,B]=i.split("|");P={[M]:B||"++"}}else P=i;const E=io(P,v,b,s);Lc(E,v,b);break}default:if(!u.call(this,v,b))throw new TypeError('Missing or wrong type of "upgradeneeded" parameter')}}catch(P){console.error(P),b.abort(),v.close(),p(P)}},g.onsuccess=function(m){const v=this.result;v.onversionchange=function(){v.close(),e.delete(o)},v.onclose=function(){e.delete(o)},e.set(o,v);try{y(c(v))}catch(b){p(b)}},g.onblocked=function(m){var b;let v=e.get(o);v&&((b=v==null?void 0:v.close)==null||b.call(v))}})}},idbDelete:o=>new Promise((i,s)=>{let a=t.indexedDB.deleteDatabase(o);a.onerror=function(l){s(this.error)},a.onsuccess=function(l){i(null)}})}}const Rc=$c(window),{idbOpen:Ai,idbDelete:dp}=Rc,Cc=(t,e)=>e.some(r=>t instanceof r);let so,ao;function Nc(){return so||(so=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function _c(){return ao||(ao=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Li=new WeakMap,Dr=new WeakMap,$i=new WeakMap,gr=new WeakMap,sn=new WeakMap;function Ic(t){const e=new Promise((r,n)=>{const o=()=>{t.removeEventListener("success",i),t.removeEventListener("error",s)},i=()=>{r(le(t.result)),o()},s=()=>{n(t.error),o()};t.addEventListener("success",i),t.addEventListener("error",s)});return e.then(r=>{r instanceof IDBCursor&&Li.set(r,t)}).catch(()=>{}),sn.set(e,t),e}function Tc(t){if(Dr.has(t))return;const e=new Promise((r,n)=>{const o=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",s),t.removeEventListener("abort",s)},i=()=>{r(),o()},s=()=>{n(t.error||new DOMException("AbortError","AbortError")),o()};t.addEventListener("complete",i),t.addEventListener("error",s),t.addEventListener("abort",s)});Dr.set(t,e)}let Fr={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Dr.get(t);if(e==="objectStoreNames")return t.objectStoreNames||$i.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return le(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function kc(t){Fr=t(Fr)}function Dc(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(mr(this),e,...r);return $i.set(n,e.sort?e.sort():[e]),le(n)}:_c().includes(t)?function(...e){return t.apply(mr(this),e),le(Li.get(this))}:function(...e){return le(t.apply(mr(this),e))}}function Fc(t){return typeof t=="function"?Dc(t):(t instanceof IDBTransaction&&Tc(t),Cc(t,Nc())?new Proxy(t,Fr):t)}function le(t){if(t instanceof IDBRequest)return Ic(t);if(gr.has(t))return gr.get(t);const e=Fc(t);return e!==t&&(gr.set(t,e),sn.set(e,t)),e}const mr=t=>sn.get(t);function jc(t,e,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const s=indexedDB.open(t,e),a=le(s);return n&&s.addEventListener("upgradeneeded",l=>{n(le(s.result),l.oldVersion,l.newVersion,le(s.transaction),l)}),r&&s.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const Mc=["get","getKey","getAll","getAllKeys","count"],Bc=["put","add","delete","clear"],yr=new Map;function lo(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(yr.get(e))return yr.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,o=Bc.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Mc.includes(r)))return;const i=async function(s,...a){const l=this.transaction(s,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(a.shift())),(await Promise.all([u[r](...a),o&&l.done]))[0]};return yr.set(e,i),i}kc(t=>({...t,get:(e,r,n)=>lo(e,r)||t.get(e,r,n),has:(e,r)=>!!lo(e,r)||t.has(e,r)}));const jr="GOST-UI",an=async t=>le(await Ai(jr,{store:t})),Uc=async t=>{const e=await Ai(jr),r=e.version+1;e.close(),jc(jr,r,{upgrade:(n,o,i,s,a)=>{t(s)}})},fe="localCache",Ue="savedServer";class J{constructor(e){X(this,"dsName",fe);X(this,"type");X(this,"_getIdb",()=>an(`${this.dsName}|++_id_,_key_,_type_,[_type_+_key_],[name+_type_+_key_]`));X(this,"_getTransaction",async()=>{const r=(await this._getIdb()).transaction(this.dsName,"readwrite"),n=r.objectStore(this.dsName);return{transaction:r,store:n}});X(this,"getList",async()=>(await this._getIdb()).getAllFromIndex(this.dsName,"[_type_+_key_]",IDBKeyRange.only([this.type,this.key])));X(this,"get",async e=>(await this._getIdb()).getFromIndex(this.dsName,"[name+_type_+_key_]",IDBKeyRange.only([e,this.type,this.key])));X(this,"add",async e=>{await(await this._getIdb()).add(this.dsName,{...e,_key_:this.key,_type_:this.type})});X(this,"put",async(e,r)=>{if(r._id_)await(await this._getIdb()).put(this.dsName,r);else{const{transaction:n,store:o}=await this._getTransaction(),i=await o.index("[name+_type_+_key_]").get(IDBKeyRange.only([e,this.type,this.key]));return r._id_=i._id_,await o.put({...i,...r,_id_:i._id_}),n.done}});X(this,"delete",async e=>{const{transaction:r,store:n}=await this._getTransaction(),o=await n.index("[name+_type_+_key_]").get(IDBKeyRange.only([e,this.type,this.key]));return await n.delete(o._id_),r.done});this.type=e}get key(){var e;return(e=un())==null?void 0:e.addr}}const zc=new J("admissions"),Vc=new J("authers"),Kc=new J("bypasses"),Hc=new J("chains"),qc=new J("climiters"),Wc=new J("limiters"),Jc=new J("rlimiters"),Gc=new J("hops"),Yc=new J("hosts"),Qc=new J("ingresses"),Xc=new J("resolvers"),Zc=new J("services");class De{static _getIdb(){return an({[Ue]:"addr",[fe]:"++_id_,_key_"})}static async getAllServer(){return(await this._getIdb()).getAll(Ue)}static async getServer(e){return(await this._getIdb()).get(Ue,e)}static async setServer(e){await(await this._getIdb()).put(Ue,e)}static async deleteServer(e,r=!1){await(await this._getIdb()).delete(Ue,e),r&&await this.deleteCacheConfig(e)}static async deleteCacheConfig(e){const o=await(await this._getIdb()).transaction([fe],"readwrite").objectStore(fe),i=await o.index("_key_").getAllKeys(IDBKeyRange.only(e));await o.delete(i)}static async getAllCacheConfig(e){const r=await this._getIdb();return e?r.getAllFromIndex(fe,"_key_",IDBKeyRange.only(e)):r.getAll(fe)}}const ef=async()=>{const t=await an(`${fe}|++_id_`),e=t.objectStoreNames,r=/^services-/,n="services",o=[...e].filter(s=>r.test(s)),i=t.transaction(e,"readwrite");for(const s of o){const a=await i.objectStore(s).getAll();let l=decodeURIComponent(s.replace(/^services-/,""));/^(https?:)?\/\//.test(l)?/^\/\//.test(l)&&(l=`${location.protocol}`+l):l=`${location.protocol}//`+l,a.length>0&&await a.map(u=>i.objectStore(fe).add({...u,_type_:n,_key_:l})),await i.objectStore(s).clear()}return await i.done,o.length&&Uc(s=>{const a=[...s.objectStoreNames],l=/^services-/;[...a.filter(c=>l.test(c)),"services","localConfigStore"].forEach(c=>{a.includes(c)&&s.db.deleteObjectStore(c)})}),o.length>0},pp=Object.freeze(Object.defineProperty({__proto__:null,GostCommit:J,ServerComm:De,admissions:zc,authers:Vc,bypasses:Kc,chains:Hc,climiters:qc,fixOldCacheConfig:ef,hops:Gc,hosts:Yc,ingresses:Qc,limiters:Wc,resolvers:Xc,rlimiters:Jc,services:Zc},Symbol.toStringTag,{value:"Module"}));function Ri(t,e,r=null){const n=t.getItem(e);if(n==null)return r;try{return JSON.parse(n)}catch(o){return console.error(o),r}}function Ci(t,e,r){if(r==null)return t.removeItem(e);t.setItem(e,JSON.stringify(r))}const tf=Ri.bind(null,sessionStorage),Ni=Ci.bind(null,sessionStorage),rf=Ri.bind(null,localStorage),nf=Ci.bind(null,localStorage),ln="__GOST_SERVER__",of="__USE_SERVER__",uo="__SETTINGS__",Rt=Zu.parse(location.search,{ignoreQueryPrefix:!0});Rt.use&&(Ni(ln,null),window[of]=Rt.use);let co=tf(ln);const ve=It(function(){return co},function(e){co=e,Ni(ln,e)}),ct=It(),ft=It(),Mr=It(rf.bind(null,uo,{}),nf.bind(null,uo)),un=()=>ve.get(),sf=async()=>{if(Rt.use){const e=Rt.use;window.history.replaceState(null,"",location.pathname);const r=await af(e);if(r){r.isLocal=!0,await Ii(r),r.time=Date.now(),ki(e,r);return}else Ti()}const t=un();if(t){await _i(t);return}},_i=async t=>{const e=t.addr.replace(/\/+$/,"");return Zo.get(e+"/config",{auth:t.auth}).catch(r=>{throw"verify error"})},Ii=async(t,e)=>{try{await _i(t),e?(t.isLocal=!0,ve.set(t),await ki(t.addr,t)):ve.set(t)}catch(r){throw r==="verify error"&&(Ti(),vr.error((r==null?void 0:r.message)||Ir("msg.connectionFailed"))),r}},Ti=async()=>{ve.set(null)},ki=async(t,e)=>De.setServer({...e,isLocal:!0,time:Date.now()}),af=async t=>De.getServer(t),lf=async t=>De.deleteServer(t),uf=async()=>De.getAllServer(),be=Zo.create();be.interceptors.request.use(t=>{const e=un();return t.baseURL=e==null?void 0:e.addr,t.auth=e==null?void 0:e.auth,t});be.interceptors.response.use(t=>{var e;return t.config.method!=="get"&&!((e=t.config)!=null&&e.noMsg)&&vr.success(Ir("msg.success")),t.data?t.data:t},t=>{var n,o;const{response:e}=t||{};let r=t.message||Ir("msg.unknown");throw(n=e==null?void 0:e.data)!=null&&n.msg&&(r=(o=e==null?void 0:e.data)==null?void 0:o.msg),vr.error(r),t});const k={config:"/config",admissions:"/config/admissions",authers:"/config/authers",bypasses:"/config/bypasses",chains:"/config/chains",climiters:"/config/climiters",limiters:"/config/limiters",rlimiters:"/config/rlimiters",hops:"/config/hops",hosts:"/config/hosts",ingresses:"/config/ingresses",observers:"/config/observers",resolvers:"/config/resolvers",sds:"/config/sds",services:"/config/services"},j=t=>({post:e=>be.post(t,e),put:(e,r)=>be.put(`${t}/${e}`,r),delete:e=>be.delete(`${t}/${e}`)}),cf=j(k.admissions),ff=j(k.authers),df=j(k.bypasses),pf=j(k.chains),hf=j(k.climiters),gf=j(k.limiters),mf=j(k.rlimiters),yf=j(k.hops),vf=j(k.hosts),bf=j(k.ingresses),Sf=j(k.resolvers),wf=j(k.services),xf=j(k.sds),Of=j(k.observers),Br=t=>be.get(k.config),Ef=(t="json",e)=>be.post(k.config,null,{params:{format:t,path:e},noMsg:!0}),hp=Object.freeze(Object.defineProperty({__proto__:null,admissions:cf,apis:k,authers:ff,bypasses:df,chains:pf,climiters:hf,getConfig:Br,getRESTfulApi:j,hops:yf,hosts:vf,ingresses:bf,limiters:gf,observers:Of,resolvers:Sf,rlimiters:mf,saveCofnig:Ef,sds:xf,services:wf},Symbol.toStringTag,{value:"Module"}));var Pf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};const Af=Pf;var Lf=function(e,r){return O.createElement(Ye,Qe({},e,{ref:r,icon:Af}))},$f=O.forwardRef(Lf);const Rf=$f;var Cf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};const Nf=Cf;var _f=function(e,r){return O.createElement(Ye,Qe({},e,{ref:r,icon:Nf}))},If=O.forwardRef(_f);const Tf=If;var kf={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"};const Df=kf;var Ff=function(e,r){return O.createElement(Ye,Qe({},e,{ref:r,icon:Df}))},jf=O.forwardRef(Ff);const Mf=jf;var Bf={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M548 818v126a16 16 0 01-16 16h-40a16 16 0 01-16-16V818c15.85 1.64 27.84 2.46 36 2.46 8.15 0 20.16-.82 36-2.46m205.25-115.66l89.1 89.1a16 16 0 010 22.62l-28.29 28.29a16 16 0 01-22.62 0l-89.1-89.1c12.37-10.04 21.43-17.95 27.2-23.71 5.76-5.77 13.67-14.84 23.71-27.2m-482.5 0c10.04 12.36 17.95 21.43 23.71 27.2 5.77 5.76 14.84 13.67 27.2 23.71l-89.1 89.1a16 16 0 01-22.62 0l-28.29-28.29a16 16 0 010-22.63zM512 278c129.24 0 234 104.77 234 234S641.24 746 512 746 278 641.24 278 512s104.77-234 234-234m0 72c-89.47 0-162 72.53-162 162s72.53 162 162 162 162-72.53 162-162-72.53-162-162-162M206 476c-1.64 15.85-2.46 27.84-2.46 36 0 8.15.82 20.16 2.46 36H80a16 16 0 01-16-16v-40a16 16 0 0116-16zm738 0a16 16 0 0116 16v40a16 16 0 01-16 16H818c1.64-15.85 2.46-27.84 2.46-36 0-8.15-.82-20.16-2.46-36zM814.06 180.65l28.29 28.29a16 16 0 010 22.63l-89.1 89.09c-10.04-12.37-17.95-21.43-23.71-27.2-5.77-5.76-14.84-13.67-27.2-23.71l89.1-89.1a16 16 0 0122.62 0m-581.5 0l89.1 89.1c-12.37 10.04-21.43 17.95-27.2 23.71-5.76 5.77-13.67 14.84-23.71 27.2l-89.1-89.1a16 16 0 010-22.62l28.29-28.29a16 16 0 0122.62 0M532 64a16 16 0 0116 16v126c-15.85-1.64-27.84-2.46-36-2.46-8.15 0-20.16.82-36 2.46V80a16 16 0 0116-16z"}}]},name:"sun",theme:"outlined"};const Uf=Bf;var zf=function(e,r){return O.createElement(Ye,Qe({},e,{ref:r,icon:Uf}))},Vf=O.forwardRef(zf);const Kf=Vf;var Hf={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};const qf=Hf;var Wf=function(e,r){return O.createElement(Ye,Qe({},e,{ref:r,icon:qf}))},Jf=O.forwardRef(Wf);const Gf=Jf;function Yf(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),r=0;r()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}};function po(t,e,r){t.loadNamespaces(e,Di(t,r))}function ho(t,e,r,n){typeof r=="string"&&(r=[r]),r.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(e,Di(t,n))}function Qf(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.languages[0],o=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const u=e.services.backendConnector.state[`${a}|${l}`];return u===-1||u===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(n,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(n,t)&&(!o||s(i,t)))}function Xf(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Ur("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:r.lng,precheck:(o,i)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,t))return!1}}):Qf(t,e,r)}const Zf=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ed={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},td=t=>ed[t],rd=t=>t.replace(Zf,td);let zr={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:rd};function nd(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zr={...zr,...t}}function od(){return zr}let Fi;function id(t){Fi=t}function sd(){return Fi}const ad={type:"3rdParty",init(t){nd(t.options.react),id(t)}},ld=O.createContext();class ud{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const cd=(t,e)=>{const r=O.useRef();return O.useEffect(()=>{r.current=e?r.current:t},[t,e]),r.current};function ji(t,e,r,n){return t.getFixedT(e,r,n)}function fd(t,e,r,n){return O.useCallback(ji(t,e,r,n),[t,e,r,n])}function Bt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:r}=e,{i18n:n,defaultNS:o}=O.useContext(ld)||{},i=r||n||sd();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new ud),!i){Ur("You will need to pass in an i18next instance by using initReactI18next");const w=(P,E)=>typeof E=="string"?E:E&&typeof E=="object"&&typeof E.defaultValue=="string"?E.defaultValue:Array.isArray(P)?P[P.length-1]:P,L=[w,{},!1];return L.t=w,L.i18n={},L.ready=!1,L}i.options.react&&i.options.react.wait!==void 0&&Ur("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...od(),...i.options.react,...e},{useSuspense:a,keyPrefix:l}=s;let u=t||o||i.options&&i.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(u);const c=(i.isInitialized||i.initializedStoreOnce)&&u.every(w=>Xf(w,i,s)),d=fd(i,e.lng||null,s.nsMode==="fallback"?u:u[0],l),f=()=>d,y=()=>ji(i,e.lng||null,s.nsMode==="fallback"?u:u[0],l),[p,g]=O.useState(f);let m=u.join();e.lng&&(m=`${e.lng}${m}`);const v=cd(m),b=O.useRef(!0);O.useEffect(()=>{const{bindI18n:w,bindI18nStore:L}=s;b.current=!0,!c&&!a&&(e.lng?ho(i,e.lng,u,()=>{b.current&&g(y)}):po(i,u,()=>{b.current&&g(y)})),c&&v&&v!==m&&b.current&&g(y);function P(){b.current&&g(y)}return w&&i&&i.on(w,P),L&&i&&i.store.on(L,P),()=>{b.current=!1,w&&i&&w.split(" ").forEach(E=>i.off(E,P)),L&&i&&L.split(" ").forEach(E=>i.store.off(E,P))}},[i,m]),O.useEffect(()=>{b.current&&c&&g(f)},[i,l,c]);const S=[p,i,c];if(S.t=p,S.i18n=i,S.ready=c,c||!c&&!a)return S;throw new Promise(w=>{e.lng?ho(i,e.lng,u,()=>w()):po(i,u,()=>w())})}const dd=()=>{const{t}=Bt(),[e,r]=O.useState(),n=O.useCallback(async()=>uf().then(o=>o.sort((i,s)=>{const a=i.time||0;return(s.time||0)-a})).then(o=>r(o)),[]);return O.useEffect(()=>{n()},[]),x.jsx(x.Fragment,{children:e&&(e==null?void 0:e.length)>0?x.jsxs(So,{direction:"vertical",style:{display:"flex"},children:[x.jsx("div",{children:t("home.quickConnect")}),x.jsx(Qi,{gutter:10,children:e.map(o=>x.jsx(Xi,{span:12,title:o.addr,style:{overflow:"hidden",textOverflow:"ellipsis"},children:x.jsxs(Zi,{gap:5,style:{overflow:"hidden"},children:[x.jsx("a",{style:{overflow:"hidden",textOverflow:"ellipsis",flex:"auto"},href:`?use=${o.addr}`,children:o.addr}),x.jsx(es,{style:{color:"red"},onClick:async()=>{await lf(o.addr),n()}})]})},o.addr))})]}):null})},pd=()=>{const[t,e]=O.useState(window.matchMedia("(prefers-color-scheme: dark)").matches);return O.useEffect(()=>{const r=window.matchMedia("(prefers-color-scheme: dark)"),n=o=>{e(o.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}},[]),t},Mi=()=>{const t=pd(),{theme:e}=Mr();return O.useMemo(()=>!e||e==="system"?t:e==="dark",[e,t])},hd=t=>{const e=Mr(),r=Mi(),n=r?x.jsx(Mf,{}):x.jsx(Kf,{});return x.jsx(Kr,{shape:"circle",icon:n,...t,onClick:()=>{const o={...e};o.theme=r?"light":"dark",Mr.set(o)}})},gd=t=>{const{i18n:e}=Bt(),[r,n]=O.useState(!1);return window.i18n=e,x.jsx(Kr,{loading:r,shape:"circle",...t,onClick:()=>{n(!0),e.changeLanguage(e.resolvedLanguage==="en"?"zh-cn":"en").finally(()=>n(!1))},children:r?"":e.resolvedLanguage==="en"?"中":"En"})},md=()=>{const{t,i18n:e}=Bt();return x.jsxs(x.Fragment,{children:[x.jsxs(we,{className:"home-form",size:"large",layout:"horizontal",initialValues:{baseURL:"http://",save:!0},onFinish:r=>{let n=r.baseURL;return/^(https?:)?\/\//.test(n)?/^\/\//.test(n)&&(n=`${location.protocol}`+n):n=`${location.protocol}//`+n,Ii({addr:n,auth:{username:r.username,password:r.password}},r.save)},children:[x.jsx("h1",{children:t("base.title")}),x.jsx("h2",{children:t("base.description")}),x.jsx(we.Item,{name:"baseURL",rules:[{required:!0,message:t("msg.baseURL.required")},{validator(r,n,o){n==="http://"&&o(t("msg.baseURL.required")),o()}}],children:x.jsx(Qt,{placeholder:t("placeholder.baseURL"),prefix:x.jsx(Rf,{className:"prefixIcon"})})}),x.jsx(we.Item,{name:"username",children:x.jsx(Qt,{placeholder:"username",prefix:x.jsx(Gf,{className:"prefixIcon"})})}),x.jsx(we.Item,{name:"password",children:x.jsx(Qt.Password,{placeholder:"password",prefix:x.jsx(Tf,{className:"prefixIcon"})})}),x.jsx(we.Item,{name:"save",valuePropName:"checked",children:x.jsx(ts,{children:t("base.form.local")})}),x.jsx(we.Item,{noStyle:!0,style:{marginBottom:"1em"},children:x.jsx(Kr,{block:!0,type:"primary",htmlType:"submit",children:t("base.cmd.connect")})}),x.jsx(dd,{})]}),x.jsx("div",{style:{position:"absolute",top:"1em",right:"1em"},children:x.jsxs(So,{children:[x.jsx(hd,{}),x.jsx(gd,{})]})})]})};const se=new No.EventEmitter;var Ut={},Bi={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Bi);var Fe=Bi.exports,zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.default=void 0;var yd={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"};zt.default=yd;var Vt={},rt={},Kt={};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.default=void 0;var vd={locale:"zh_CN",yearFormat:"YYYY年",cellDateFormat:"D",cellMeridiemFormat:"A",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};Kt.default=vd;var nt={};Object.defineProperty(nt,"__esModule",{value:!0});nt.default=void 0;const bd={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};nt.default=bd;var Ui=Fe.default;Object.defineProperty(rt,"__esModule",{value:!0});rt.default=void 0;var Sd=Ui(Kt),wd=Ui(nt);const zi={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Sd.default),timePickerLocale:Object.assign({},wd.default)};zi.lang.ok="确定";rt.default=zi;var xd=Fe.default;Object.defineProperty(Vt,"__esModule",{value:!0});Vt.default=void 0;var Od=xd(rt);Vt.default=Od.default;var Ht=Fe.default;Object.defineProperty(Ut,"__esModule",{value:!0});Ut.default=void 0;var Ed=Ht(zt),Pd=Ht(Vt),Ad=Ht(rt),Ld=Ht(nt);const q="${label}不是一个有效的${type}",$d={locale:"zh-cn",Pagination:Ed.default,DatePicker:Ad.default,TimePicker:Ld.default,Calendar:Pd.default,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{titles:["",""],searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:q,method:q,array:q,object:q,number:q,date:q,boolean:q,integer:q,float:q,regexp:q,email:q,url:q,hex:q},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码过期",refresh:"点击刷新",scanned:"已扫描"},ColorPicker:{presetEmpty:"暂无"}};Ut.default=$d;var Rd=Ut;const go=Vr(Rd);var qt={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0});Wt.default=void 0;var Cd={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};Wt.default=Cd;var Jt={},ot={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.default=void 0;var Nd={locale:"en_GB",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"Select time",dateSelect:"Select date",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"D/M/YYYY",dayFormat:"D",dateTimeFormat:"D/M/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};Gt.default=Nd;var it={};Object.defineProperty(it,"__esModule",{value:!0});it.default=void 0;const _d={placeholder:"Select time"};it.default=_d;var Vi=Fe.default;Object.defineProperty(ot,"__esModule",{value:!0});ot.default=void 0;var Id=Vi(Gt),Td=Vi(it);const kd={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Id.default),timePickerLocale:Object.assign({},Td.default)};ot.default=kd;var Dd=Fe.default;Object.defineProperty(Jt,"__esModule",{value:!0});Jt.default=void 0;var Fd=Dd(ot);Jt.default=Fd.default;var Yt=Fe.default;Object.defineProperty(qt,"__esModule",{value:!0});qt.default=void 0;var jd=Yt(Wt),Md=Yt(Jt),Bd=Yt(ot),Ud=Yt(it);const W="${label} is not a valid ${type}",zd={locale:"en-gb",Pagination:jd.default,DatePicker:Bd.default,TimePicker:Ud.default,Calendar:Md.default,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No Data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:W,method:W,array:W,object:W,number:W,date:W,boolean:W,integer:W,float:W,regexp:W,email:W,url:W,hex:W},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};qt.default=zd;var Vd=qt;const Kd=Vr(Vd),Hd=Ct.createContext({}),gp=Ct.createContext({localList:[],name:""}),mp=(t,e)=>{const r=`${t}:getComm`,n=o=>{o(e)};return se.on(r,n),()=>{se.off(r,n)}},yp=t=>new Promise((e,r)=>{const n=`${t}:getComm`;se.emit(n,e)}),qd=(t,e)=>{const r=t[e];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((n,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e)))})},{slice:Wd,forEach:Jd}=[];function Gd(t){return Jd.call(Wd.call(arguments,1),e=>{if(e)for(const r in e)t[r]===void 0&&(t[r]=e[r])}),t}const mo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Yd=(t,e,r)=>{const n=r||{};n.path=n.path||"/";const o=encodeURIComponent(e);let i=`${t}=${o}`;if(n.maxAge>0){const s=n.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(s)}`}if(n.domain){if(!mo.test(n.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${n.domain}`}if(n.path){if(!mo.test(n.path))throw new TypeError("option path is invalid");i+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(i+="; HttpOnly"),n.secure&&(i+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},yo={create(t,e,r,n){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+r*60*1e3)),n&&(o.domain=n),document.cookie=Yd(t,encodeURIComponent(e),o)},read(t){const e=`${t}=`,r=document.cookie.split(";");for(let n=0;n-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const s=o.substring(1).split("&");for(let a=0;a0&&s[a].substring(0,l)===e&&(r=s[a].substring(l+1))}}return r}};let ze=null;const vo=()=>{if(ze!==null)return ze;try{ze=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{ze=!1}return ze};var Zd={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&vo())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:r}=e;r&&vo()&&window.localStorage.setItem(r,t)}};let Ve=null;const bo=()=>{if(Ve!==null)return Ve;try{Ve=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ve=!1}return Ve};var ep={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&bo())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:r}=e;r&&bo()&&window.sessionStorage.setItem(r,t)}},tp={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:o}=navigator;if(r)for(let i=0;i0?e:void 0}},rp={name:"htmlTag",lookup(t){let{htmlTag:e}=t,r;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},np={name:"path",lookup(t){var o;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(o=r[typeof e=="number"?e:0])==null?void 0:o.replace("/",""):void 0}},op={name:"subdomain",lookup(t){var o,i;let{lookupFromSubdomainIndex:e}=t;const r=typeof e=="number"?e+1:1,n=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function ip(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class Ki{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,r)}init(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=Gd(r,this.options||{},ip()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Qd),this.addDetector(Xd),this.addDetector(Zd),this.addDetector(ep),this.addDetector(tp),this.addDetector(rp),this.addDetector(np),this.addDetector(op)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let r=[];return e.forEach(n=>{if(this.detectors[n]){let o=this.detectors[n].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(r=r.concat(o))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(e,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}Ki.type="languageDetector";var sp=function(e){return{type:"backend",init:function(n,o,i){},read:function(n,o,i){if(typeof e=="function"){if(e.length<3){try{var s=e(n,o);s&&typeof s.then=="function"?s.then(function(a){return i(null,a&&a.default||a)}).catch(i):i(null,s)}catch(a){i(a)}return}e(n,o,i);return}i(null,e&&e[n]&&e[n][o])}}};const Hi="en";T.use(Ki).use(ad).use(sp((t,e)=>qd(Object.assign({"../i18n/en.json":()=>pt(()=>import("./en-e998d6f7.js"),[],import.meta.url),"../i18n/languages.json":()=>pt(()=>import("./languages-a578aa29.js"),[],import.meta.url),"../i18n/zh.json":()=>pt(()=>import("./zh-c566da85.js"),[],import.meta.url)}),`../i18n/${t}.json`))).init({debug:!1,fallbackLng:Hi,interpolation:{escapeValue:!1}});function vp(t){if(typeof t=="string"||O.isValidElement(t))return t;const e=T.resolvedLanguage;return t[e]||t[Hi]||""}const ap=Ct.lazy(()=>pt(()=>import("./Manage-28bb5d8f.js"),["./Manage-28bb5d8f.js","./antd-af73db0d.js"],import.meta.url)),lp=t=>{const{locale:e,theme:r}=O.useContext(dt.ConfigContext);return O.useLayoutEffect(()=>{dt.config({theme:r,holderRender:n=>x.jsx(dt,{theme:r,children:n})})},[e,r]),x.jsx(ns,{children:t.children})};function up(){const t=ve(),{t:e,i18n:r}=Bt(),n=ct(),o=ft(),i=Mi(),[s,a]=O.useState(!1),[l,u]=O.useState(!1),[c,d]=O.useState(!1),[f,y]=O.useState(go),p=O.useMemo(()=>l||c,[l,c]),g=O.useRef({update:async()=>{var m;try{u(!0),d(!0);const[v,b]=await Promise.all([Br(),g.current.updateLocalConfig((m=ve.get())==null?void 0:m.addr)]);return ct.set(v),ft.set(b),[v,b]}finally{u(!1),d(!1)}},updateLocalConfig:async m=>{try{m||ft.set(null),d(!0);const v=await De.getAllCacheConfig(m),b={};return v.forEach(S=>{const{_type_:w}=S;(b[w]?b[w]:b[w]=[]).push(S)}),b}finally{d(!1)}},defaultTitle:document.title});return O.useEffect(()=>{sf().then(()=>a(!0));const m=async()=>ct.set(await Br()),v=async()=>{var S;return ft.set(await g.current.updateLocalConfig((S=ve.get())==null?void 0:S.addr))},b=g.current.update;return se.on("apiUpdate",m),se.on("localUpdate",v),se.on("update",b),()=>{se.off("apiUpdate",m),se.off("localUpdate",v),se.off("update",b)}},[]),O.useEffect(()=>{t?g.current.update().then(([m])=>{ct.set(m),document.title=t.addr.replace(/^(https?:)?\/\//,"")}):document.title=g.current.defaultTitle},[t]),O.useEffect(()=>{var m,v;i?(document.documentElement.classList.add("theme-dark"),(m=window==null?void 0:window.monaco)==null||m.editor.setTheme("vs-dark")):(document.documentElement.classList.remove("theme-dark"),(v=window==null?void 0:window.monaco)==null||v.editor.setTheme("vs"))},[i]),O.useEffect(()=>{const m=r.resolvedLanguage;y(m==="zh"?go:Kd)},[r.resolvedLanguage]),x.jsx(Hd.Provider,{value:{gostConfig:n,localConfig:o,isLoading:p},children:x.jsx(dt,{theme:{algorithm:i?rs.darkAlgorithm:void 0},locale:f,children:x.jsx(lp,{children:x.jsx(Ct.Suspense,{fallback:x.jsx(fn,{fullscreen:!0,size:"large"}),children:s?t?x.jsx(ap,{}):x.jsx(md,{}):x.jsx(fn,{fullscreen:!0,size:"large"})})})})})}br.createRoot(document.getElementById("root")).render(x.jsx(up,{}));export{hp as A,gp as C,pp as L,hd as T,Mi as a,vp as b,br as c,Hd as d,se as e,mp as f,sd as g,yp as h,ct as i,x as j,ve as k,uf as l,ef as m,Ti as n,gd as o,ki as p,Zu as q,Ef as s,Bt as u}; diff --git a/index.html b/index.html index 916ab27..26749b5 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,8 @@ require.config({ paths: { vs: document.getElementById("nonaco").src.replace(/\/loader\.js/,'') } }); })(); - - + +