function At(e,t){}const Hn=typeof window<"u",Gn=(e,t=!1)=>t?Symbol.for(e):Symbol(e),It=(e,t,n)=>Ot({l:e,k:t,s:n}),Ot=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),W=e=>typeof e=="number"&&isFinite(e),bt=e=>Ne(e)==="[object Date]",De=e=>Ne(e)==="[object RegExp]",ge=e=>k(e)&&Object.keys(e).length===0,te=Object.assign,yt=Object.create,K=(e=null)=>yt(e);function Re(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function ve(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Pt(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(s,i,c)=>`${i}="${ve(c)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(s,i,c)=>`${i}='${ve(c)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(s=>{e=e.replace(s,"$1javascript:")}),e}const kt=Object.prototype.hasOwnProperty;function ee(e,t){return kt.call(e,t)}const j=Array.isArray,F=e=>typeof e=="function",I=e=>typeof e=="string",V=e=>typeof e=="boolean",v=e=>e!==null&&typeof e=="object",Dt=e=>v(e)&&F(e.then)&&F(e.catch),He=Object.prototype.toString,Ne=e=>He.call(e),k=e=>Ne(e)==="[object Object]",Rt=e=>e==null?"":j(e)||k(e)&&e.toString===He?JSON.stringify(e,null,2):String(e);function Ce(e,t=""){return e.reduce((n,s,i)=>i===0?n+s:n+t+s,"")}const ie=e=>!v(e)||j(e);function xn(e,t){if(ie(e)||ie(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:s,des:i}=n.pop();Object.keys(s).forEach(c=>{c!=="__proto__"&&(v(s[c])&&!v(i[c])&&(i[c]=Array.isArray(s[c])?[]:K()),ie(i[c])||ie(s[c])?i[c]=s[c]:n.push({src:s[c],des:i[c]}))})}}function Bn(e=0){return t=>{const i=(typeof t=="string"?t:t.pathname).split("?")[0].split("/");return i[0]===""&&i.shift(),i.length>e&&i[e]||""}}function vt(e,t,n){return{line:e,column:t,offset:n}}function pe(e,t,n){return{start:e,end:t}}const P={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},wt=17;function Te(e,t,n={}){const{domain:s,messages:i,args:c}=n,d=e,_=new SyntaxError(String(d));return _.code=e,t&&(_.location=t),_.domain=s,_}function Mt(e){throw e}const H=" ",Ft="\r",$=` `,Ut="\u2028",$t="\u2029";function Wt(e){const t=e;let n=0,s=1,i=1,c=0;const d=O=>t[O]===Ft&&t[O+1]===$,_=O=>t[O]===$,m=O=>t[O]===$t,p=O=>t[O]===Ut,A=O=>d(O)||_(O)||m(O)||p(O),T=()=>n,N=()=>s,b=()=>i,y=()=>c,S=O=>d(O)||m(O)||p(O)?$:t[O],C=()=>S(n),l=()=>S(n+c);function f(){return c=0,A(n)&&(s++,i=0),d(n)&&n++,n++,i++,t[n]}function E(){return d(n+c)&&c++,c++,t[n+c]}function u(){n=0,s=1,i=1,c=0}function L(O=0){c=O}function h(){const O=n+c;for(;O!==n;)f();c=0}return{index:T,line:N,column:b,peekOffset:y,charAt:S,currentChar:C,currentPeek:l,next:f,peek:E,reset:u,resetPeek:L,skipToPeek:h}}const x=void 0,Kt=".",we="'",Vt="tokenizer";function Xt(e,t={}){const n=t.location!==!1,s=Wt(e),i=()=>s.index(),c=()=>vt(s.line(),s.column(),s.index()),d=c(),_=i(),m={currentType:13,offset:_,startLoc:d,endLoc:d,lastType:13,lastOffset:_,lastStartLoc:d,lastEndLoc:d,braceNest:0,inLinked:!1,text:""},p=()=>m,{onError:A}=t;function T(r,a,o,...g){const D=p();if(a.column+=o,a.offset+=o,A){const M=n?pe(D.startLoc,a):null,Y=Te(r,M,{domain:Vt,args:g});A(Y)}}function N(r,a,o){r.endLoc=c(),r.currentType=a;const g={type:a};return n&&(g.loc=pe(r.startLoc,r.endLoc)),o!=null&&(g.value=o),g}const b=r=>N(r,13);function y(r,a){return r.currentChar()===a?(r.next(),a):(T(P.EXPECTED_TOKEN,c(),0,a),"")}function S(r){let a="";for(;r.currentPeek()===H||r.currentPeek()===$;)a+=r.currentPeek(),r.peek();return a}function C(r){const a=S(r);return r.skipToPeek(),a}function l(r){if(r===x)return!1;const a=r.charCodeAt(0);return a>=97&&a<=122||a>=65&&a<=90||a===95}function f(r){if(r===x)return!1;const a=r.charCodeAt(0);return a>=48&&a<=57}function E(r,a){const{currentType:o}=a;if(o!==2)return!1;S(r);const g=l(r.currentPeek());return r.resetPeek(),g}function u(r,a){const{currentType:o}=a;if(o!==2)return!1;S(r);const g=r.currentPeek()==="-"?r.peek():r.currentPeek(),D=f(g);return r.resetPeek(),D}function L(r,a){const{currentType:o}=a;if(o!==2)return!1;S(r);const g=r.currentPeek()===we;return r.resetPeek(),g}function h(r,a){const{currentType:o}=a;if(o!==7)return!1;S(r);const g=r.currentPeek()===".";return r.resetPeek(),g}function O(r,a){const{currentType:o}=a;if(o!==8)return!1;S(r);const g=l(r.currentPeek());return r.resetPeek(),g}function R(r,a){const{currentType:o}=a;if(!(o===7||o===11))return!1;S(r);const g=r.currentPeek()===":";return r.resetPeek(),g}function w(r,a){const{currentType:o}=a;if(o!==9)return!1;const g=()=>{const M=r.currentPeek();return M==="{"?l(r.peek()):M==="@"||M==="|"||M===":"||M==="."||M===H||!M?!1:M===$?(r.peek(),g()):Q(r,!1)},D=g();return r.resetPeek(),D}function X(r){S(r);const a=r.currentPeek()==="|";return r.resetPeek(),a}function Q(r,a=!0){const o=(D=!1,M="")=>{const Y=r.currentPeek();return Y==="{"||Y==="@"||!Y?D:Y==="|"?!(M===H||M===$):Y===H?(r.peek(),o(!0,H)):Y===$?(r.peek(),o(!0,$)):!0},g=o();return a&&r.resetPeek(),g}function U(r,a){const o=r.currentChar();return o===x?x:a(o)?(r.next(),o):null}function ct(r){const a=r.charCodeAt(0);return a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===95||a===36}function it(r){return U(r,ct)}function lt(r){const a=r.charCodeAt(0);return a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===95||a===36||a===45}function ot(r){return U(r,lt)}function ut(r){const a=r.charCodeAt(0);return a>=48&&a<=57}function ft(r){return U(r,ut)}function dt(r){const a=r.charCodeAt(0);return a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102}function mt(r){return U(r,dt)}function ye(r){let a="",o="";for(;a=ft(r);)o+=a;return o}function _t(r){let a="";for(;;){const o=r.currentChar();if(o==="{"||o==="}"||o==="@"||o==="|"||!o)break;if(o===H||o===$)if(Q(r))a+=o,r.next();else{if(X(r))break;a+=o,r.next()}else a+=o,r.next()}return a}function Et(r){C(r);let a="",o="";for(;a=ot(r);)o+=a;const g=r.currentChar();if(g&&g!=="}"&&g!==x&&g!==H&&g!==$&&g!==" "){const D=ke(r);return T(P.INVALID_TOKEN_IN_PLACEHOLDER,c(),0,o+D),o+D}return r.currentChar()===x&&T(P.UNTERMINATED_CLOSING_BRACE,c(),0),o}function pt(r){C(r);let a="";return r.currentChar()==="-"?(r.next(),a+=`-${ye(r)}`):a+=ye(r),r.currentChar()===x&&T(P.UNTERMINATED_CLOSING_BRACE,c(),0),a}function Lt(r){return r!==we&&r!==$}function ht(r){C(r),y(r,"'");let a="",o="";for(;a=U(r,Lt);)a==="\\"?o+=gt(r):o+=a;const g=r.currentChar();return g===$||g===x?(T(P.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,c(),0),g===$&&(r.next(),y(r,"'")),o):(y(r,"'"),o)}function gt(r){const a=r.currentChar();switch(a){case"\\":case"'":return r.next(),`\\${a}`;case"u":return Pe(r,a,4);case"U":return Pe(r,a,6);default:return T(P.UNKNOWN_ESCAPE_SEQUENCE,c(),0,a),""}}function Pe(r,a,o){y(r,a);let g="";for(let D=0;D{const g=r.currentChar();return g==="{"||g==="@"||g==="|"||g==="("||g===")"||!g||g===H?o:(o+=g,r.next(),a(o))};return a("")}function ue(r){C(r);const a=y(r,"|");return C(r),a}function fe(r,a){let o=null;switch(r.currentChar()){case"{":return a.braceNest>=1&&T(P.NOT_ALLOW_NEST_PLACEHOLDER,c(),0),r.next(),o=N(a,2,"{"),C(r),a.braceNest++,o;case"}":return a.braceNest>0&&a.currentType===2&&T(P.EMPTY_PLACEHOLDER,c(),0),r.next(),o=N(a,3,"}"),a.braceNest--,a.braceNest>0&&C(r),a.inLinked&&a.braceNest===0&&(a.inLinked=!1),o;case"@":return a.braceNest>0&&T(P.UNTERMINATED_CLOSING_BRACE,c(),0),o=ce(r,a)||b(a),a.braceNest=0,o;default:{let D=!0,M=!0,Y=!0;if(X(r))return a.braceNest>0&&T(P.UNTERMINATED_CLOSING_BRACE,c(),0),o=N(a,1,ue(r)),a.braceNest=0,a.inLinked=!1,o;if(a.braceNest>0&&(a.currentType===4||a.currentType===5||a.currentType===6))return T(P.UNTERMINATED_CLOSING_BRACE,c(),0),a.braceNest=0,de(r,a);if(D=E(r,a))return o=N(a,4,Et(r)),C(r),o;if(M=u(r,a))return o=N(a,5,pt(r)),C(r),o;if(Y=L(r,a))return o=N(a,6,ht(r)),C(r),o;if(!D&&!M&&!Y)return o=N(a,12,ke(r)),T(P.INVALID_TOKEN_IN_PLACEHOLDER,c(),0,o.value),C(r),o;break}}return o}function ce(r,a){const{currentType:o}=a;let g=null;const D=r.currentChar();switch((o===7||o===8||o===11||o===9)&&(D===$||D===H)&&T(P.INVALID_LINKED_FORMAT,c(),0),D){case"@":return r.next(),g=N(a,7,"@"),a.inLinked=!0,g;case".":return C(r),r.next(),N(a,8,".");case":":return C(r),r.next(),N(a,9,":");default:return X(r)?(g=N(a,1,ue(r)),a.braceNest=0,a.inLinked=!1,g):h(r,a)||R(r,a)?(C(r),ce(r,a)):O(r,a)?(C(r),N(a,11,Ct(r))):w(r,a)?(C(r),D==="{"?fe(r,a)||g:N(a,10,Tt(r))):(o===7&&T(P.INVALID_LINKED_FORMAT,c(),0),a.braceNest=0,a.inLinked=!1,de(r,a))}}function de(r,a){let o={type:13};if(a.braceNest>0)return fe(r,a)||b(a);if(a.inLinked)return ce(r,a)||b(a);switch(r.currentChar()){case"{":return fe(r,a)||b(a);case"}":return T(P.UNBALANCED_CLOSING_BRACE,c(),0),r.next(),N(a,3,"}");case"@":return ce(r,a)||b(a);default:{if(X(r))return o=N(a,1,ue(r)),a.braceNest=0,a.inLinked=!1,o;if(Q(r))return N(a,0,_t(r));break}}return o}function St(){const{currentType:r,offset:a,startLoc:o,endLoc:g}=m;return m.lastType=r,m.lastOffset=a,m.lastStartLoc=o,m.lastEndLoc=g,m.offset=i(),m.startLoc=c(),s.currentChar()===x?N(m,13):de(s,m)}return{nextToken:St,currentOffset:i,currentPosition:c,context:p}}const Yt="parser",jt=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Ht(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const s=parseInt(t||n,16);return s<=55295||s>=57344?String.fromCodePoint(s):"�"}}}function Gt(e={}){const t=e.location!==!1,{onError:n}=e;function s(l,f,E,u,...L){const h=l.currentPosition();if(h.offset+=u,h.column+=u,n){const O=t?pe(E,h):null,R=Te(f,O,{domain:Yt,args:L});n(R)}}function i(l,f,E){const u={type:l};return t&&(u.start=f,u.end=f,u.loc={start:E,end:E}),u}function c(l,f,E,u){t&&(l.end=f,l.loc&&(l.loc.end=E))}function d(l,f){const E=l.context(),u=i(3,E.offset,E.startLoc);return u.value=f,c(u,l.currentOffset(),l.currentPosition()),u}function _(l,f){const E=l.context(),{lastOffset:u,lastStartLoc:L}=E,h=i(5,u,L);return h.index=parseInt(f,10),l.nextToken(),c(h,l.currentOffset(),l.currentPosition()),h}function m(l,f){const E=l.context(),{lastOffset:u,lastStartLoc:L}=E,h=i(4,u,L);return h.key=f,l.nextToken(),c(h,l.currentOffset(),l.currentPosition()),h}function p(l,f){const E=l.context(),{lastOffset:u,lastStartLoc:L}=E,h=i(9,u,L);return h.value=f.replace(jt,Ht),l.nextToken(),c(h,l.currentOffset(),l.currentPosition()),h}function A(l){const f=l.nextToken(),E=l.context(),{lastOffset:u,lastStartLoc:L}=E,h=i(8,u,L);return f.type!==11?(s(l,P.UNEXPECTED_EMPTY_LINKED_MODIFIER,E.lastStartLoc,0),h.value="",c(h,u,L),{nextConsumeToken:f,node:h}):(f.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,G(f)),h.value=f.value||"",c(h,l.currentOffset(),l.currentPosition()),{node:h})}function T(l,f){const E=l.context(),u=i(7,E.offset,E.startLoc);return u.value=f,c(u,l.currentOffset(),l.currentPosition()),u}function N(l){const f=l.context(),E=i(6,f.offset,f.startLoc);let u=l.nextToken();if(u.type===8){const L=A(l);E.modifier=L.node,u=L.nextConsumeToken||l.nextToken()}switch(u.type!==9&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(u)),u=l.nextToken(),u.type===2&&(u=l.nextToken()),u.type){case 10:u.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(u)),E.key=T(l,u.value||"");break;case 4:u.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(u)),E.key=m(l,u.value||"");break;case 5:u.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(u)),E.key=_(l,u.value||"");break;case 6:u.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(u)),E.key=p(l,u.value||"");break;default:{s(l,P.UNEXPECTED_EMPTY_LINKED_KEY,f.lastStartLoc,0);const L=l.context(),h=i(7,L.offset,L.startLoc);return h.value="",c(h,L.offset,L.startLoc),E.key=h,c(E,L.offset,L.startLoc),{nextConsumeToken:u,node:E}}}return c(E,l.currentOffset(),l.currentPosition()),{node:E}}function b(l){const f=l.context(),E=f.currentType===1?l.currentOffset():f.offset,u=f.currentType===1?f.endLoc:f.startLoc,L=i(2,E,u);L.items=[];let h=null;do{const w=h||l.nextToken();switch(h=null,w.type){case 0:w.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(w)),L.items.push(d(l,w.value||""));break;case 5:w.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(w)),L.items.push(_(l,w.value||""));break;case 4:w.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(w)),L.items.push(m(l,w.value||""));break;case 6:w.value==null&&s(l,P.UNEXPECTED_LEXICAL_ANALYSIS,f.lastStartLoc,0,G(w)),L.items.push(p(l,w.value||""));break;case 7:{const X=N(l);L.items.push(X.node),h=X.nextConsumeToken||null;break}}}while(f.currentType!==13&&f.currentType!==1);const O=f.currentType===1?f.lastOffset:l.currentOffset(),R=f.currentType===1?f.lastEndLoc:l.currentPosition();return c(L,O,R),L}function y(l,f,E,u){const L=l.context();let h=u.items.length===0;const O=i(1,f,E);O.cases=[],O.cases.push(u);do{const R=b(l);h||(h=R.items.length===0),O.cases.push(R)}while(L.currentType!==13);return h&&s(l,P.MUST_HAVE_MESSAGES_IN_PLURAL,E,0),c(O,l.currentOffset(),l.currentPosition()),O}function S(l){const f=l.context(),{offset:E,startLoc:u}=f,L=b(l);return f.currentType===13?L:y(l,E,u,L)}function C(l){const f=Xt(l,te({},e)),E=f.context(),u=i(0,E.offset,E.startLoc);return t&&u.loc&&(u.loc.source=l),u.body=S(f),e.onCacheKey&&(u.cacheKey=e.onCacheKey(l)),E.currentType!==13&&s(f,P.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,l[E.offset]||""),c(u,f.currentOffset(),f.currentPosition()),u}return{parse:C}}function G(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function xt(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:c=>(n.helpers.add(c),c)}}function Me(e,t){for(let n=0;nFe(n)),e}function Fe(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;nd;function m(S,C){d.code+=S}function p(S,C=!0){const l=C?s:"";m(i?l+" ".repeat(S):l)}function A(S=!0){const C=++d.indentLevel;S&&p(C)}function T(S=!0){const C=--d.indentLevel;S&&p(C)}function N(){p(d.indentLevel)}return{context:_,push:m,indent:A,deindent:T,newline:N,helper:S=>`_${S}`,needIndent:()=>d.needIndent}}function qt(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),re(e,t.key),t.modifier?(e.push(", "),re(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function Zt(e,t){const{helper:n,needIndent:s}=e;e.push(`${n("normalize")}([`),e.indent(s());const i=t.items.length;for(let c=0;c1){e.push(`${n("plural")}([`),e.indent(s());const i=t.cases.length;for(let c=0;c{const n=I(t.mode)?t.mode:"normal",s=I(t.filename)?t.filename:"message.intl";t.sourceMap;const i=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` `,c=t.needIndent?t.needIndent:n!=="arrow",d=e.helpers||[],_=Qt(e,{filename:s,breakLineCode:i,needIndent:c});_.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),_.indent(c),d.length>0&&(_.push(`const { ${Ce(d.map(A=>`${A}: _${A}`),", ")} } = ctx`),_.newline()),_.push("return "),re(_,e),_.deindent(c),_.push("}"),delete e.helpers;const{code:m,map:p}=_.context();return{ast:e,code:m,map:p?p.toJSON():void 0}};function nn(e,t={}){const n=te({},t),s=!!n.jit,i=!!n.minify,c=n.optimize==null?!0:n.optimize,_=Gt(n).parse(e);return s?(c&&Jt(_),i&&ne(_),{ast:_,code:""}):(Bt(_,n),tn(_,n))}function se(e){return v(e)&&Ae(e)===0&&(ee(e,"b")||ee(e,"body"))}const Ge=["b","body"];function rn(e){return Z(e,Ge)}const xe=["c","cases"];function sn(e){return Z(e,xe,[])}const Be=["s","static"];function an(e){return Z(e,Be)}const Je=["i","items"];function cn(e){return Z(e,Je,[])}const Qe=["t","type"];function Ae(e){return Z(e,Qe)}const qe=["v","value"];function le(e,t){const n=Z(e,qe);if(n!=null)return n;throw ae(t)}const Ze=["m","modifier"];function ln(e){return Z(e,Ze)}const ze=["k","key"];function on(e){const t=Z(e,ze);if(t)return t;throw ae(6)}function Z(e,t,n){for(let s=0;sfn(n,e)}function fn(e,t){const n=rn(t);if(n==null)throw ae(0);if(Ae(n)===1){const c=sn(n);return e.plural(c.reduce((d,_)=>[...d,Ue(e,_)],[]))}else return Ue(e,n)}function Ue(e,t){const n=an(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const s=cn(t).reduce((i,c)=>[...i,Le(e,c)],[]);return e.normalize(s)}}function Le(e,t){const n=Ae(t);switch(n){case 3:return le(t,n);case 9:return le(t,n);case 4:{const s=t;if(ee(s,"k")&&s.k)return e.interpolate(e.named(s.k));if(ee(s,"key")&&s.key)return e.interpolate(e.named(s.key));throw ae(n)}case 5:{const s=t;if(ee(s,"i")&&W(s.i))return e.interpolate(e.list(s.i));if(ee(s,"index")&&W(s.index))return e.interpolate(e.list(s.index));throw ae(n)}case 6:{const s=t,i=ln(s),c=on(s);return e.linked(Le(e,c),i?Le(e,i):void 0,e.type)}case 7:return le(t,n);case 8:return le(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const dn=e=>e;let oe=K();function mn(e,t={}){let n=!1;const s=t.onError||Mt;return t.onError=i=>{n=!0,s(i)},{...nn(e,t),detectError:n}}function Jn(e,t){if(I(e)){V(t.warnHtmlMessage)&&t.warnHtmlMessage;const s=(t.onCacheKey||dn)(e),i=oe[s];if(i)return i;const{ast:c,detectError:d}=mn(e,{...t,location:!1,jit:!0}),_=me(c);return d?_:oe[s]=_}else{const n=e.cacheKey;if(n){const s=oe[n];return s||(oe[n]=me(e))}else return me(e)}}const B={INVALID_ARGUMENT:wt,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Qn=24;function J(e){return Te(e,null,void 0)}function Ie(e,t){return t.locale!=null?$e(t.locale):$e(e.locale)}let _e;function $e(e){if(I(e))return e;if(F(e)){if(e.resolvedOnce&&_e!=null)return _e;if(e.constructor.name==="Function"){const t=e();if(Dt(t))throw J(B.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _e=t}else throw J(B.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw J(B.NOT_SUPPORT_LOCALE_TYPE)}function _n(e,t,n){return[...new Set([n,...j(t)?t:v(t)?Object.keys(t):I(t)?[t]:[n]])]}function qn(e,t,n){const s=I(n)?n:he,i=e;i.__localeChainCache||(i.__localeChainCache=new Map);let c=i.__localeChainCache.get(s);if(!c){c=[];let d=[n];for(;j(d);)d=We(c,d,t);const _=j(t)||!k(t)?t:t.default?t.default:null;d=I(_)?[_]:_,j(d)&&We(c,d,!1),i.__localeChainCache.set(s,c)}return c}function We(e,t,n){let s=!0;for(let i=0;i{d===void 0?d=_:d+=_},N[1]=()=>{d!==void 0&&(t.push(d),d=void 0)},N[2]=()=>{N[0](),i++},N[3]=()=>{if(i>0)i--,s=4,N[0]();else{if(i=0,d===void 0||(d=Cn(d),d===!1))return!1;N[1]()}};function b(){const y=e[n+1];if(s===5&&y==="'"||s===6&&y==='"')return n++,_="\\"+y,N[0](),!0}for(;s!==null;)if(n++,c=e[n],!(c==="\\"&&b())){if(m=Nn(c),T=z[s],p=T[m]||T.l||8,p===8||(s=p[0],p[1]!==void 0&&(A=N[p[1]],A&&(_=c,A()===!1))))return;if(s===7)return t}}const Ke=new Map;function Sn(e,t){return v(e)?e[t]:null}function Zn(e,t){if(!v(e))return null;let n=Ke.get(t);if(n||(n=Tn(t),n&&Ke.set(t,n)),!n)return null;const s=n.length;let i=e,c=0;for(;c`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function In(){return{upper:(e,t)=>t==="text"&&I(e)?e.toUpperCase():t==="vnode"&&v(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&I(e)?e.toLowerCase():t==="vnode"&&v(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&I(e)?Ve(e):t==="vnode"&&v(e)&&"__v_isVNode"in e?Ve(e.children):e}}let et;function er(e){et=e}let tt;function tr(e){tt=e}let nt;function nr(e){nt=e}const rr=e=>{};let rt=null;const sr=e=>{rt=e},ar=()=>rt;let Xe=0;function cr(e={}){const t=F(e.onWarn)?e.onWarn:At,n=I(e.version)?e.version:An,s=I(e.locale)||F(e.locale)?e.locale:he,i=F(s)?he:s,c=j(e.fallbackLocale)||k(e.fallbackLocale)||I(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,d=k(e.messages)?e.messages:Ee(i),_=k(e.datetimeFormats)?e.datetimeFormats:Ee(i),m=k(e.numberFormats)?e.numberFormats:Ee(i),p=te(K(),e.modifiers,In()),A=e.pluralRules||K(),T=F(e.missing)?e.missing:null,N=V(e.missingWarn)||De(e.missingWarn)?e.missingWarn:!0,b=V(e.fallbackWarn)||De(e.fallbackWarn)?e.fallbackWarn:!0,y=!!e.fallbackFormat,S=!!e.unresolving,C=F(e.postTranslation)?e.postTranslation:null,l=k(e.processor)?e.processor:null,f=V(e.warnHtmlMessage)?e.warnHtmlMessage:!0,E=!!e.escapeParameter,u=F(e.messageCompiler)?e.messageCompiler:et,L=F(e.messageResolver)?e.messageResolver:tt||Sn,h=F(e.localeFallbacker)?e.localeFallbacker:nt||_n,O=v(e.fallbackContext)?e.fallbackContext:void 0,R=e,w=v(R.__datetimeFormatters)?R.__datetimeFormatters:new Map,X=v(R.__numberFormatters)?R.__numberFormatters:new Map,Q=v(R.__meta)?R.__meta:{};Xe++;const U={version:n,cid:Xe,locale:s,fallbackLocale:c,messages:d,modifiers:p,pluralRules:A,missing:T,missingWarn:N,fallbackWarn:b,fallbackFormat:y,unresolving:S,postTranslation:C,processor:l,warnHtmlMessage:f,escapeParameter:E,messageCompiler:u,messageResolver:L,localeFallbacker:h,fallbackContext:O,onWarn:t,__meta:Q};return U.datetimeFormats=_,U.numberFormats=m,U.__datetimeFormatters=w,U.__numberFormatters=X,U}const Ee=e=>({[e]:K()});function be(e,t,n,s,i){const{missing:c,onWarn:d}=e;if(c!==null){const _=c(e,n,t,i);return I(_)?_:t}else return t}function ir(e,t,n){const s=e;s.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function On(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function bn(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let s=n+1;s{yn.includes(m)?d[m]=n[m]:c[m]=n[m]}),I(s)?c.locale=s:k(s)&&(d=s),k(i)&&(d=i),[c.key||"",_,c,d]}function or(e,t,n){const s=e;for(const i in n){const c=`${t}__${i}`;s.__datetimeFormatters.has(c)&&s.__datetimeFormatters.delete(c)}}function ur(e,...t){const{numberFormats:n,unresolving:s,fallbackLocale:i,onWarn:c,localeFallbacker:d}=e,{__numberFormatters:_}=e,[m,p,A,T]=Dn(...t),N=V(A.missingWarn)?A.missingWarn:e.missingWarn;V(A.fallbackWarn)?A.fallbackWarn:e.fallbackWarn;const b=!!A.part,y=Ie(e,A),S=d(e,i,y);if(!I(m)||m==="")return new Intl.NumberFormat(y,T).format(p);let C={},l,f=null;const E="number format";for(let h=0;h{kn.includes(m)?d[m]=n[m]:c[m]=n[m]}),I(s)?c.locale=s:k(s)&&(d=s),k(i)&&(d=i),[c.key||"",_,c,d]}function fr(e,t,n){const s=e;for(const i in n){const c=`${t}__${i}`;s.__numberFormatters.has(c)&&s.__numberFormatters.delete(c)}}const Rn=e=>e,vn=e=>"",wn="text",Mn=e=>e.length===0?"":Ce(e),Fn=Rt;function Ye(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Un(e){const t=W(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(W(e.named.count)||W(e.named.n))?W(e.named.count)?e.named.count:W(e.named.n)?e.named.n:t:t}function $n(e,t){t.count||(t.count=e),t.n||(t.n=e)}function Wn(e={}){const t=e.locale,n=Un(e),s=v(e.pluralRules)&&I(t)&&F(e.pluralRules[t])?e.pluralRules[t]:Ye,i=v(e.pluralRules)&&I(t)&&F(e.pluralRules[t])?Ye:void 0,c=l=>l[s(n,l.length,i)],d=e.list||[],_=l=>d[l],m=e.named||K();W(e.pluralIndex)&&$n(n,m);const p=l=>m[l];function A(l,f){const E=F(e.messages)?e.messages(l,!!f):v(e.messages)?e.messages[l]:!1;return E||(e.parent?e.parent.message(l):vn)}const T=l=>e.modifiers?e.modifiers[l]:Rn,N=k(e.processor)&&F(e.processor.normalize)?e.processor.normalize:Mn,b=k(e.processor)&&F(e.processor.interpolate)?e.processor.interpolate:Fn,y=k(e.processor)&&I(e.processor.type)?e.processor.type:wn,C={list:_,named:p,plural:c,linked:(l,...f)=>{const[E,u]=f;let L="text",h="";f.length===1?v(E)?(h=E.modifier||h,L=E.type||L):I(E)&&(h=E||h):f.length===2&&(I(E)&&(h=E||h),I(u)&&(L=u||L));const O=A(l,!0)(C),R=L==="vnode"&&j(O)&&h?O[0]:O;return h?T(h)(R,L):R},message:A,type:y,interpolate:b,normalize:N,values:te(K(),d,m)};return C}const je=()=>"",q=e=>F(e);function dr(e,...t){const{fallbackFormat:n,postTranslation:s,unresolving:i,messageCompiler:c,fallbackLocale:d,messages:_}=e,[m,p]=Xn(...t),A=V(p.missingWarn)?p.missingWarn:e.missingWarn,T=V(p.fallbackWarn)?p.fallbackWarn:e.fallbackWarn,N=V(p.escapeParameter)?p.escapeParameter:e.escapeParameter,b=!!p.resolvedMessage,y=I(p.default)||V(p.default)?V(p.default)?c?m:()=>m:p.default:n?c?m:()=>m:null,S=n||y!=null&&(I(y)||F(y)),C=Ie(e,p);N&&Kn(p);let[l,f,E]=b?[m,C,_[C]||K()]:st(e,m,C,d,T,A),u=l,L=m;if(!b&&!(I(u)||se(u)||q(u))&&S&&(u=y,L=u),!b&&(!(I(u)||se(u)||q(u))||!I(f)))return i?Oe:m;let h=!1;const O=()=>{h=!0},R=q(u)?u:at(e,m,f,u,L,O);if(h)return u;const w=jn(e,f,E,p),X=Wn(w),Q=Vn(e,R,X);let U=s?s(Q,m):Q;return N&&I(U)&&(U=Pt(U)),U}function Kn(e){j(e.list)?e.list=e.list.map(t=>I(t)?Re(t):t):v(e.named)&&Object.keys(e.named).forEach(t=>{I(e.named[t])&&(e.named[t]=Re(e.named[t]))})}function st(e,t,n,s,i,c){const{messages:d,onWarn:_,messageResolver:m,localeFallbacker:p}=e,A=p(e,s,n);let T=K(),N,b=null;const y="translate";for(let S=0;Ss);return p.locale=n,p.key=t,p}const m=d(s,Yn(e,n,i,s,_,c));return m.locale=n,m.key=t,m.source=s,m}function Vn(e,t,n){return t(n)}function Xn(...e){const[t,n,s]=e,i=K();if(!I(t)&&!W(t)&&!q(t)&&!se(t))throw J(B.INVALID_ARGUMENT);const c=W(t)?String(t):(q(t),t);return W(n)?i.plural=n:I(n)?i.default=n:k(n)&&!ge(n)?i.named=n:j(n)&&(i.list=n),W(s)?i.plural=s:I(s)?i.default=s:k(s)&&te(i,s),[c,i]}function Yn(e,t,n,s,i,c){return{locale:t,key:n,warnHtmlMessage:i,onError:d=>{throw c&&c(d),d},onCacheKey:d=>It(t,n,d)}}function jn(e,t,n,s){const{modifiers:i,pluralRules:c,messageResolver:d,fallbackLocale:_,fallbackWarn:m,missingWarn:p,fallbackContext:A}=e,N={locale:t,modifiers:i,pluralRules:c,messages:(b,y)=>{let S=d(n,b);if(S==null&&(A||y)){const[,,C]=st(A||e,b,t,_,m,p);S=d(C,b)}if(I(S)||se(S)){let C=!1;const f=at(e,b,t,S,b,()=>{C=!0});return C?je:f}else return q(S)?S:je}};return e.processor&&(N.processor=e.processor),s.list&&(N.list=s.list),s.named&&(N.named=s.named),W(s.plural)&&(N.pluralIndex=s.plural),N}export{un as A,dr as B,Qn as C,he as D,Pn as E,lr as F,Dn as G,ur as H,q as I,kn as J,yn as K,er as L,zn as M,Oe as N,tr as O,nr as P,Jn as Q,Zn as R,Bn as S,Ne as T,te as a,k as b,Te as c,ge as d,v as e,K as f,I as g,j as h,V as i,De as j,F as k,Hn as l,Gn as m,xn as n,ee as o,cr as p,or as q,fr as r,W as s,se as t,ir as u,rr as v,ar as w,qn as x,sr as y,Xn as z};