lty-protocol 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1,6 @@
1
- (function(n,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(n=typeof globalThis<"u"?globalThis:n||self,t(n["lty-protocol"]={},n.Vue))})(this,(function(n,t){"use strict";const a=t.defineComponent({name:"MyButton",__name:"MyButton",emits:["click"],setup(o,{emit:e}){const c=e,s=()=>{c("click")};return(i,f)=>(t.openBlock(),t.createElementBlock("button",{class:"my-btn",onClick:s},[t.renderSlot(i.$slots,"default",{},void 0,!0)]))}}),l=(o,e)=>{const c=o.__vccOpts||o;for(const[s,i]of e)c[s]=i;return c},u=l(a,[["__scopeId","data-v-c654f959"]]),r=l(t.defineComponent({name:"MyButton",__name:"button2",emits:["click"],setup(o,{emit:e}){const c=e,s=()=>{c("click")};return(i,f)=>(t.openBlock(),t.createElementBlock("button",{class:"my-btn",onClick:s},[t.renderSlot(i.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-1477cfc3"]]);class d{options;constructor(e){this.options=e}add(e){this.options.name=e}get(){return this.options.name}}const m=[u,r],_={install(o){m.forEach(e=>{o.component(e.name,e)})}};n.Button2=r,n.Modbus=d,n.MyButton=u,n.default=_,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(q,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],P):(q=typeof globalThis<"u"?globalThis:q||self,P(q["lty-protocol"]={},q.Vue))})(this,(function(q,P){"use strict";function Or(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ft=Or(P),vr=P.defineComponent({name:"MyButton",__name:"MyButton",emits:["click"],setup(e,{emit:t}){const n=t,r=()=>{n("click")};return(s,a)=>(P.openBlock(),P.createElementBlock("button",{class:"my-btn",onClick:r},[P.renderSlot(s.$slots,"default",{},void 0,!0)]))}}),nn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},rn=nn(vr,[["__scopeId","data-v-c654f959"]]),sn=nn(P.defineComponent({name:"MyButton",__name:"button2",emits:["click"],setup(e,{emit:t}){const n=t,r=()=>{n("click")};return(s,a)=>(P.openBlock(),P.createElementBlock("button",{class:"my-btn",onClick:r},[P.renderSlot(s.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-1477cfc3"]]),Cr=P.defineComponent({name:"MyInput",props:{modelValue:String},emits:["update:modelValue"],setup(e,{emit:t}){const n=P.inject("UIComponents").Input;return n?()=>P.h(n,{modelValue:e.modelValue,"onUpdate:modelValue":r=>t("update:modelValue",r)}):null}});class ne{id;deviceId;type;static registry={};constructor(t){this.id=t.id,this.deviceId=t.deviceId}static register(t,n){ne.registry[t]=n}static fromPlain(t){const n=ne.registry[t.type];if(!n)throw new Error(`Unsupported protocol type: ${t.type}`);return n.fromPlain(t)}}class Ar{static getDefaultConfig(t){console.log(1231231,t);const n=t.baseInfo,r=t.configuration,s=t.tab;return{baseInfo:n,config:r,tab:s}}}const Sr={type:"Ethernet",baseInfo:[{key:"name",name:{i18nKey:"name"},defaultValue:"Ethernet"},{key:"supplier",name:{i18nKey:"supplier"},defaultValue:{i18nKey:"company"}},{key:"version",name:{i18nKey:"verison"},defaultValue:"1.0.0.0"},{key:"description",name:{i18nKey:"description"},defaultValue:{i18nKey:"descriptionMap.ethernet"}},{key:"category",name:{i18nKey:"category"},defaultValue:{i18nKey:"ethernet"}}],tab:[{name:{i18nKey:"general"},key:"general"},{name:{i18nKey:"ioMapping"},key:"ioMapping"}],configuration:{general:[{key:"netInterface",name:{i18nKey:"netInterface"},dataType:"string",componentType:"strInput",defaultValue:""},{key:"ipAddress",name:{i18nKey:"ipAddress"},dataType:"string",componentType:"ipInput",defaultValue:"192.168.1.1"},{key:"subnetMask",name:{i18nKey:"subnetMask"},dataType:"string",componentType:"ipInput",defaultValue:"255.255.255.0"},{key:"defaultGateway",name:{i18nKey:"defaultGateway"},dataType:"string",componentType:"ipInput",defaultValue:"0.0.0.0"},{key:"adaptedOSConfiguration",name:{i18nKey:"adaptedOSConfiguration"},dataType:"boolean",componentType:"switch",defaultValue:!1}],ioMapping:[{key:"busCycleTask",name:{i18nKey:"busCycleTask"},dataType:"string",componentType:"select",defaultValue:"-1"}]}};class Ue extends ne{type=ue.ETHERNET;moduleType=$e[ue.ETHERNET];baseInfo;config;tab;constructor(t){super(t);const{baseInfo:n,config:r,tab:s}=Ar.getDefaultConfig(Sr);this.baseInfo=n,this.config=r,this.tab=s}static fromPlain(t){return new Ue(t)}}class Qe extends ne{type=ue.MODBUS_TCP_SERVER;moduleType=$e[ue.MODBUS_TCP_SERVER];constructor(t){super(t)}static fromPlain(t){return new Qe(t)}}class qe extends ne{type=ue.MODBUS_TCP_CLIENT;moduleType=$e[ue.MODBUS_TCP_CLIENT];constructor(t){super(t)}static fromPlain(t){return new qe(t)}}class Ze extends ne{type=ue.MODBUS_TCP_SLAVE_DEVICE;moduleType=$e[ue.MODBUS_TCP_SLAVE_DEVICE];constructor(t){super(t)}static fromPlain(t){return new Ze(t)}}var ue=(e=>(e.ETHERNET="Ethernet",e.MODBUS_TCP_SERVER="ModbusTCPServer",e.MODBUS_TCP_CLIENT="ModbusTCPClient",e.MODBUS_TCP_SLAVE_DEVICE="ModbusTCPSlaveDevice",e.MODBUS_SERIAL_PORT="ModbusSerialPort",e.MODBUS_MASTER="ModbusMaster",e.MODBUS_SLAVE="ModbusSlave",e.MODBUS_SERIAL="ModbusSerial",e.OPCUA_SERVER="OPCUAServer",e.ETHER_CAT_MASTER="EtherCatMaster",e.ETHER_CAT_SLAVE="EtherCatSlave",e.ETHER_CAT_MODULE="EtherCatModule",e))(ue||{});const $e={Pprogrammable:4096,Protgrammable_Safety:4098,CAN_Master:16,CAN_Slave:17,CAN_Device:18,EtherCat_Master:64,EtherCat_Slave:65,ProfinetIO_Master:80,ProfinetIO_Device:81,EthernetIP_Scanner:100,EthernetIP_Adapter:101,Ethernet:110,ModbusTCPServer:88,ModbusTCPClient:89,ModbusTCPSlaveDevice:115,ModbusSerialPort:92,ModbusMaster:90,ModbusSlave:91,ModbusSerial:94,OPCUAServer:128,EtherCatMaster:64,EtherCatSlave:16384,EtherCatModule:16384};class an{map=new Map;constructor(){ne.register("Ethernet",Ue),ne.register("ModbusTCPServer",Qe),ne.register("ModbusTCPClient",qe),ne.register("ModbusTCPSlaveDevice",Ze)}init(t){this.clear(),t.forEach(n=>{const r=ne.fromPlain(n);this.map.set(n.id,r)})}build(t){return""}get(t){const n=Array.isArray(t)?t.map(r=>this.map.get(r)).filter(r=>r!==void 0):this.map.get(t);if(Array.isArray(n)&&!n.length||!n)throw new Error(`Protocol ${t} is not found.`);return n}add(t){this.map.set(t.id,t)}delete(t){Array.isArray(t)?t.forEach(n=>this.map.delete(n)):this.map.delete(t)}clear(){this.map.clear()}}const yr=P.defineComponent({__name:"Ethernet",props:{config:{}},setup(e){return(t,n)=>(P.openBlock(!0),P.createElementBlock(P.Fragment,null,P.renderList(e.config.tab,r=>(P.openBlock(),P.createElementBlock("div",{key:r.key},P.toDisplayString(t.$t(r.name.i18nKey)),1))),128))}}),Pr=P.defineComponent({__name:"App",setup(e){new an;const t=new Ue({id:1,deviceId:1,type:"Ethernet"});return(n,r)=>(P.openBlock(),P.createElementBlock("div",null,[P.createVNode(yr,{config:P.unref(t)},null,8,["config"])]))}});function fe(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const on={};function _t(e){on[e]||(on[e]=!0,fe(e))}const le=typeof window<"u";let re,be;if(process.env.NODE_ENV!=="production"){const e=le&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(re=t=>{e.mark(t)},be=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}const Dr=/\{([0-9a-zA-Z]+)\}/g;function ze(e,...t){return t.length===1&&F(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Dr,(n,r)=>t.hasOwnProperty(r)?t[r]:"")}const _e=(e,t=!1)=>t?Symbol.for(e):Symbol(e),kr=(e,t,n)=>Mr({l:e,k:t,s:n}),Mr=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),X=e=>typeof e=="number"&&isFinite(e),Rr=e=>mt(e)==="[object Date]",Se=e=>mt(e)==="[object RegExp]",et=e=>R(e)&&Object.keys(e).length===0,J=Object.assign,Fr=Object.create,W=(e=null)=>Fr(e);let ln;const he=()=>ln||(ln=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:W());function cn(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function un(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function wr(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(r,s,a)=>`${s}="${un(a)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(r,s,a)=>`${s}='${un(a)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(process.env.NODE_ENV!=="production"&&fe("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(r=>{e=e.replace(r,"$1javascript&#58;")}),e}const Ur=Object.prototype.hasOwnProperty;function ie(e,t){return Ur.call(e,t)}const x=Array.isArray,G=e=>typeof e=="function",L=e=>typeof e=="string",w=e=>typeof e=="boolean",F=e=>e!==null&&typeof e=="object",$r=e=>F(e)&&G(e.then)&&G(e.catch),fn=Object.prototype.toString,mt=e=>fn.call(e),R=e=>mt(e)==="[object Object]",Vr=e=>e==null?"":x(e)||R(e)&&e.toString===fn?JSON.stringify(e,null,2):String(e);function dt(e,t=""){return e.reduce((n,r,s)=>s===0?n+r:n+t+r,"")}const _n=2;function Wr(e,t=0,n=e.length){const r=e.split(/\r?\n/);let s=0;const a=[];for(let o=0;o<r.length;o++)if(s+=r[o].length+1,s>=t){for(let i=o-_n;i<=o+_n||n>s;i++){if(i<0||i>=r.length)continue;const u=i+1;a.push(`${u}${" ".repeat(3-String(u).length)}| ${r[i]}`);const E=r[i].length;if(i===o){const I=t-(s-E)+1,b=Math.max(1,n>s?E-I:n-t);a.push(" | "+" ".repeat(I)+"^".repeat(b))}else if(i>o){if(n>s){const I=Math.max(Math.min(n-s,E),1);a.push(" | "+"^".repeat(I))}s+=E+1}}break}return a.join(`
2
+ `)}function Et(){const e=new Map;return{events:e,on(n,r){const s=e.get(n);s&&s.push(r)||e.set(n,[r])},off(n,r){const s=e.get(n);s&&s.splice(s.indexOf(r)>>>0,1)},emit(n,r){(e.get(n)||[]).slice().map(s=>s(r)),(e.get("*")||[]).slice().map(s=>s(n,r))}}}const tt=e=>!F(e)||x(e);function nt(e,t){if(tt(e)||tt(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:r,des:s}=n.pop();Object.keys(r).forEach(a=>{a!=="__proto__"&&(F(r[a])&&!F(s[a])&&(s[a]=Array.isArray(r[a])?[]:W()),tt(s[a])||tt(r[a])?s[a]=r[a]:n.push({src:r[a],des:s[a]}))})}}function Gr(e,t,n){return{line:e,column:t,offset:n}}function pt(e,t,n){return{start:e,end:t}}const D={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,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},Hr=17,Br={[D.EXPECTED_TOKEN]:"Expected token: '{0}'",[D.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[D.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[D.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[D.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[D.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[D.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[D.EMPTY_PLACEHOLDER]:"Empty placeholder",[D.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[D.INVALID_LINKED_FORMAT]:"Invalid linked format",[D.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[D.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[D.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[D.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[D.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[D.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function ye(e,t,n={}){const{domain:r,messages:s,args:a}=n,o=process.env.NODE_ENV!=="production"?ze((s||Br)[e]||"",...a||[]):e,i=new SyntaxError(String(o));return i.code=e,t&&(i.location=t),i.domain=r,i}function xr(e){throw e}const Yr=/<\/?[\w\s="/.':;#-\/]+>/,Kr=e=>Yr.test(e),me=" ",jr="\r",Z=`
3
+ `,Xr="\u2028",Jr="\u2029";function Qr(e){const t=e;let n=0,r=1,s=1,a=0;const o=p=>t[p]===jr&&t[p+1]===Z,i=p=>t[p]===Z,u=p=>t[p]===Jr,E=p=>t[p]===Xr,I=p=>o(p)||i(p)||u(p)||E(p),b=()=>n,T=()=>r,A=()=>s,k=()=>a,C=p=>o(p)||u(p)||E(p)?Z:t[p],S=()=>C(n),f=()=>C(n+a);function m(){return a=0,I(n)&&(r++,s=0),o(n)&&n++,n++,s++,t[n]}function h(){return o(n+a)&&a++,a++,t[n+a]}function d(){n=0,r=1,s=1,a=0}function O(p=0){a=p}function v(){const p=n+a;for(;p!==n;)m();a=0}return{index:b,line:T,column:A,peekOffset:k,charAt:C,currentChar:S,currentPeek:f,next:m,peek:h,reset:d,resetPeek:O,skipToPeek:v}}const Ee=void 0,qr=".",mn="'",Zr="tokenizer";function zr(e,t={}){const n=t.location!==!1,r=Qr(e),s=()=>r.index(),a=()=>Gr(r.line(),r.column(),r.index()),o=a(),i=s(),u={currentType:13,offset:i,startLoc:o,endLoc:o,lastType:13,lastOffset:i,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},E=()=>u,{onError:I}=t;function b(l,c,g,...y){const B=E();if(c.column+=g,c.offset+=g,I){const K=n?pt(B.startLoc,c):null,U=ye(l,K,{domain:Zr,args:y});I(U)}}function T(l,c,g){l.endLoc=a(),l.currentType=c;const y={type:c};return n&&(y.loc=pt(l.startLoc,l.endLoc)),g!=null&&(y.value=g),y}const A=l=>T(l,13);function k(l,c){return l.currentChar()===c?(l.next(),c):(b(D.EXPECTED_TOKEN,a(),0,c),"")}function C(l){let c="";for(;l.currentPeek()===me||l.currentPeek()===Z;)c+=l.currentPeek(),l.peek();return c}function S(l){const c=C(l);return l.skipToPeek(),c}function f(l){if(l===Ee)return!1;const c=l.charCodeAt(0);return c>=97&&c<=122||c>=65&&c<=90||c===95}function m(l){if(l===Ee)return!1;const c=l.charCodeAt(0);return c>=48&&c<=57}function h(l,c){const{currentType:g}=c;if(g!==2)return!1;C(l);const y=f(l.currentPeek());return l.resetPeek(),y}function d(l,c){const{currentType:g}=c;if(g!==2)return!1;C(l);const y=l.currentPeek()==="-"?l.peek():l.currentPeek(),B=m(y);return l.resetPeek(),B}function O(l,c){const{currentType:g}=c;if(g!==2)return!1;C(l);const y=l.currentPeek()===mn;return l.resetPeek(),y}function v(l,c){const{currentType:g}=c;if(g!==7)return!1;C(l);const y=l.currentPeek()===".";return l.resetPeek(),y}function p(l,c){const{currentType:g}=c;if(g!==8)return!1;C(l);const y=f(l.currentPeek());return l.resetPeek(),y}function M(l,c){const{currentType:g}=c;if(!(g===7||g===11))return!1;C(l);const y=l.currentPeek()===":";return l.resetPeek(),y}function $(l,c){const{currentType:g}=c;if(g!==9)return!1;const y=()=>{const K=l.currentPeek();return K==="{"?f(l.peek()):K==="@"||K==="|"||K===":"||K==="."||K===me||!K?!1:K===Z?(l.peek(),y()):ce(l,!1)},B=y();return l.resetPeek(),B}function Q(l){C(l);const c=l.currentPeek()==="|";return l.resetPeek(),c}function ce(l,c=!0){const g=(B=!1,K="")=>{const U=l.currentPeek();return U==="{"||U==="@"||!U?B:U==="|"?!(K===me||K===Z):U===me?(l.peek(),g(!0,me)):U===Z?(l.peek(),g(!0,Z)):!0},y=g();return c&&l.resetPeek(),y}function Y(l,c){const g=l.currentChar();return g===Ee?Ee:c(g)?(l.next(),g):null}function Fe(l){const c=l.charCodeAt(0);return c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c===95||c===36}function Gt(l){return Y(l,Fe)}function Ht(l){const c=l.charCodeAt(0);return c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57||c===95||c===36||c===45}function Bt(l){return Y(l,Ht)}function xt(l){const c=l.charCodeAt(0);return c>=48&&c<=57}function Yt(l){return Y(l,xt)}function Kt(l){const c=l.charCodeAt(0);return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function ge(l){return Y(l,Kt)}function Ke(l){let c="",g="";for(;c=Yt(l);)g+=c;return g}function jt(l){let c="";for(;;){const g=l.currentChar();if(g==="{"||g==="}"||g==="@"||g==="|"||!g)break;if(g===me||g===Z)if(ce(l))c+=g,l.next();else{if(Q(l))break;c+=g,l.next()}else c+=g,l.next()}return c}function Xt(l){S(l);let c="",g="";for(;c=Bt(l);)g+=c;const y=l.currentChar();if(y&&y!=="}"&&y!==Ee&&y!==me&&y!==Z&&y!==" "){const B=ct(l);return b(D.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,g+B),g+B}return l.currentChar()===Ee&&b(D.UNTERMINATED_CLOSING_BRACE,a(),0),g}function Jt(l){S(l);let c="";return l.currentChar()==="-"?(l.next(),c+=`-${Ke(l)}`):c+=Ke(l),l.currentChar()===Ee&&b(D.UNTERMINATED_CLOSING_BRACE,a(),0),c}function Qt(l){return l!==mn&&l!==Z}function Ir(l){S(l),k(l,"'");let c="",g="";for(;c=Y(l,Qt);)c==="\\"?g+=qt(l):g+=c;const y=l.currentChar();return y===Z||y===Ee?(b(D.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),y===Z&&(l.next(),k(l,"'")),g):(k(l,"'"),g)}function qt(l){const c=l.currentChar();switch(c){case"\\":case"'":return l.next(),`\\${c}`;case"u":return it(l,c,4);case"U":return it(l,c,6);default:return b(D.UNKNOWN_ESCAPE_SEQUENCE,a(),0,c),""}}function it(l,c,g){k(l,c);let y="";for(let B=0;B<g;B++){const K=ge(l);if(!K){b(D.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${c}${y}${l.currentChar()}`);break}y+=K}return`\\${c}${y}`}function Zt(l){return l!=="{"&&l!=="}"&&l!==me&&l!==Z}function ct(l){S(l);let c="",g="";for(;c=Y(l,Zt);)g+=c;return g}function zt(l){let c="",g="";for(;c=Gt(l);)g+=c;return g}function en(l){const c=g=>{const y=l.currentChar();return y==="{"||y==="@"||y==="|"||y==="("||y===")"||!y||y===me?g:(g+=y,l.next(),c(g))};return c("")}function je(l){S(l);const c=k(l,"|");return S(l),c}function Xe(l,c){let g=null;switch(l.currentChar()){case"{":return c.braceNest>=1&&b(D.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),l.next(),g=T(c,2,"{"),S(l),c.braceNest++,g;case"}":return c.braceNest>0&&c.currentType===2&&b(D.EMPTY_PLACEHOLDER,a(),0),l.next(),g=T(c,3,"}"),c.braceNest--,c.braceNest>0&&S(l),c.inLinked&&c.braceNest===0&&(c.inLinked=!1),g;case"@":return c.braceNest>0&&b(D.UNTERMINATED_CLOSING_BRACE,a(),0),g=ve(l,c)||A(c),c.braceNest=0,g;default:{let B=!0,K=!0,U=!0;if(Q(l))return c.braceNest>0&&b(D.UNTERMINATED_CLOSING_BRACE,a(),0),g=T(c,1,je(l)),c.braceNest=0,c.inLinked=!1,g;if(c.braceNest>0&&(c.currentType===4||c.currentType===5||c.currentType===6))return b(D.UNTERMINATED_CLOSING_BRACE,a(),0),c.braceNest=0,Je(l,c);if(B=h(l,c))return g=T(c,4,Xt(l)),S(l),g;if(K=d(l,c))return g=T(c,5,Jt(l)),S(l),g;if(U=O(l,c))return g=T(c,6,Ir(l)),S(l),g;if(!B&&!K&&!U)return g=T(c,12,ct(l)),b(D.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,g.value),S(l),g;break}}return g}function ve(l,c){const{currentType:g}=c;let y=null;const B=l.currentChar();switch((g===7||g===8||g===11||g===9)&&(B===Z||B===me)&&b(D.INVALID_LINKED_FORMAT,a(),0),B){case"@":return l.next(),y=T(c,7,"@"),c.inLinked=!0,y;case".":return S(l),l.next(),T(c,8,".");case":":return S(l),l.next(),T(c,9,":");default:return Q(l)?(y=T(c,1,je(l)),c.braceNest=0,c.inLinked=!1,y):v(l,c)||M(l,c)?(S(l),ve(l,c)):p(l,c)?(S(l),T(c,11,zt(l))):$(l,c)?(S(l),B==="{"?Xe(l,c)||y:T(c,10,en(l))):(g===7&&b(D.INVALID_LINKED_FORMAT,a(),0),c.braceNest=0,c.inLinked=!1,Je(l,c))}}function Je(l,c){let g={type:13};if(c.braceNest>0)return Xe(l,c)||A(c);if(c.inLinked)return ve(l,c)||A(c);switch(l.currentChar()){case"{":return Xe(l,c)||A(c);case"}":return b(D.UNBALANCED_CLOSING_BRACE,a(),0),l.next(),T(c,3,"}");case"@":return ve(l,c)||A(c);default:{if(Q(l))return g=T(c,1,je(l)),c.braceNest=0,c.inLinked=!1,g;if(ce(l))return T(c,0,jt(l));break}}return g}function tn(){const{currentType:l,offset:c,startLoc:g,endLoc:y}=u;return u.lastType=l,u.lastOffset=c,u.lastStartLoc=g,u.lastEndLoc=y,u.offset=s(),u.startLoc=a(),r.currentChar()===Ee?T(u,13):Je(r,u)}return{nextToken:tn,currentOffset:s,currentPosition:a,context:E}}const es="parser",ts=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function ns(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function rs(e={}){const t=e.location!==!1,{onError:n}=e;function r(f,m,h,d,...O){const v=f.currentPosition();if(v.offset+=d,v.column+=d,n){const p=t?pt(h,v):null,M=ye(m,p,{domain:es,args:O});n(M)}}function s(f,m,h){const d={type:f};return t&&(d.start=m,d.end=m,d.loc={start:h,end:h}),d}function a(f,m,h,d){t&&(f.end=m,f.loc&&(f.loc.end=h))}function o(f,m){const h=f.context(),d=s(3,h.offset,h.startLoc);return d.value=m,a(d,f.currentOffset(),f.currentPosition()),d}function i(f,m){const h=f.context(),{lastOffset:d,lastStartLoc:O}=h,v=s(5,d,O);return v.index=parseInt(m,10),f.nextToken(),a(v,f.currentOffset(),f.currentPosition()),v}function u(f,m){const h=f.context(),{lastOffset:d,lastStartLoc:O}=h,v=s(4,d,O);return v.key=m,f.nextToken(),a(v,f.currentOffset(),f.currentPosition()),v}function E(f,m){const h=f.context(),{lastOffset:d,lastStartLoc:O}=h,v=s(9,d,O);return v.value=m.replace(ts,ns),f.nextToken(),a(v,f.currentOffset(),f.currentPosition()),v}function I(f){const m=f.nextToken(),h=f.context(),{lastOffset:d,lastStartLoc:O}=h,v=s(8,d,O);return m.type!==11?(r(f,D.UNEXPECTED_EMPTY_LINKED_MODIFIER,h.lastStartLoc,0),v.value="",a(v,d,O),{nextConsumeToken:m,node:v}):(m.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,h.lastStartLoc,0,de(m)),v.value=m.value||"",a(v,f.currentOffset(),f.currentPosition()),{node:v})}function b(f,m){const h=f.context(),d=s(7,h.offset,h.startLoc);return d.value=m,a(d,f.currentOffset(),f.currentPosition()),d}function T(f){const m=f.context(),h=s(6,m.offset,m.startLoc);let d=f.nextToken();if(d.type===8){const O=I(f);h.modifier=O.node,d=O.nextConsumeToken||f.nextToken()}switch(d.type!==9&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de(d)),d=f.nextToken(),d.type===2&&(d=f.nextToken()),d.type){case 10:d.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de(d)),h.key=b(f,d.value||"");break;case 4:d.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de(d)),h.key=u(f,d.value||"");break;case 5:d.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de(d)),h.key=i(f,d.value||"");break;case 6:d.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de(d)),h.key=E(f,d.value||"");break;default:{r(f,D.UNEXPECTED_EMPTY_LINKED_KEY,m.lastStartLoc,0);const O=f.context(),v=s(7,O.offset,O.startLoc);return v.value="",a(v,O.offset,O.startLoc),h.key=v,a(h,O.offset,O.startLoc),{nextConsumeToken:d,node:h}}}return a(h,f.currentOffset(),f.currentPosition()),{node:h}}function A(f){const m=f.context(),h=m.currentType===1?f.currentOffset():m.offset,d=m.currentType===1?m.endLoc:m.startLoc,O=s(2,h,d);O.items=[];let v=null;do{const $=v||f.nextToken();switch(v=null,$.type){case 0:$.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de($)),O.items.push(o(f,$.value||""));break;case 5:$.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de($)),O.items.push(i(f,$.value||""));break;case 4:$.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de($)),O.items.push(u(f,$.value||""));break;case 6:$.value==null&&r(f,D.UNEXPECTED_LEXICAL_ANALYSIS,m.lastStartLoc,0,de($)),O.items.push(E(f,$.value||""));break;case 7:{const Q=T(f);O.items.push(Q.node),v=Q.nextConsumeToken||null;break}}}while(m.currentType!==13&&m.currentType!==1);const p=m.currentType===1?m.lastOffset:f.currentOffset(),M=m.currentType===1?m.lastEndLoc:f.currentPosition();return a(O,p,M),O}function k(f,m,h,d){const O=f.context();let v=d.items.length===0;const p=s(1,m,h);p.cases=[],p.cases.push(d);do{const M=A(f);v||(v=M.items.length===0),p.cases.push(M)}while(O.currentType!==13);return v&&r(f,D.MUST_HAVE_MESSAGES_IN_PLURAL,h,0),a(p,f.currentOffset(),f.currentPosition()),p}function C(f){const m=f.context(),{offset:h,startLoc:d}=m,O=A(f);return m.currentType===13?O:k(f,h,d,O)}function S(f){const m=zr(f,J({},e)),h=m.context(),d=s(0,h.offset,h.startLoc);return t&&d.loc&&(d.loc.source=f),d.body=C(m),e.onCacheKey&&(d.cacheKey=e.onCacheKey(f)),h.currentType!==13&&r(m,D.UNEXPECTED_LEXICAL_ANALYSIS,h.lastStartLoc,0,f[h.offset]||""),a(d,m.currentOffset(),m.currentPosition()),d}return{parse:S}}function de(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 ss(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:a=>(n.helpers.add(a),a)}}function dn(e,t){for(let n=0;n<e.length;n++)gt(e[n],t)}function gt(e,t){switch(e.type){case 1:dn(e.cases,t),t.helper("plural");break;case 2:dn(e.items,t);break;case 6:{gt(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function as(e,t={}){const n=ss(e);n.helper("normalize"),e.body&&gt(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function os(e){const t=e.body;return t.type===2?En(t):t.cases.forEach(n=>En(n)),e}function En(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;n<e.items.length;n++){const r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=dt(t);for(let n=0;n<e.items.length;n++){const r=e.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const ls="minifier";function Pe(e){switch(e.t=e.type,e.type){case 0:{const t=e;Pe(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let r=0;r<n.length;r++)Pe(n[r]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let r=0;r<n.length;r++)Pe(n[r]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Pe(t.key),t.k=t.key,delete t.key,t.modifier&&(Pe(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!=="production")throw ye(D.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:ls,args:[e.type]})}delete e.type}const is="parser";function cs(e,t){const{filename:n,breakLineCode:r,needIndent:s}=t,a=t.location!==!1,o={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:s,indentLevel:0};a&&e.loc&&(o.source=e.loc.source);const i=()=>o;function u(C,S){o.code+=C}function E(C,S=!0){const f=S?r:"";u(s?f+" ".repeat(C):f)}function I(C=!0){const S=++o.indentLevel;C&&E(S)}function b(C=!0){const S=--o.indentLevel;C&&E(S)}function T(){E(o.indentLevel)}return{context:i,push:u,indent:I,deindent:b,newline:T,helper:C=>`_${C}`,needIndent:()=>o.needIndent}}function us(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),De(e,t.key),t.modifier?(e.push(", "),De(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function fs(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const s=t.items.length;for(let a=0;a<s&&(De(e,t.items[a]),a!==s-1);a++)e.push(", ");e.deindent(r()),e.push("])")}function _s(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const s=t.cases.length;for(let a=0;a<s&&(De(e,t.cases[a]),a!==s-1);a++)e.push(", ");e.deindent(r()),e.push("])")}}function ms(e,t){t.body?De(e,t.body):e.push("null")}function De(e,t){const{helper:n}=e;switch(t.type){case 0:ms(e,t);break;case 1:_s(e,t);break;case 2:fs(e,t);break;case 6:us(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!=="production")throw ye(D.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:is,args:[t.type]})}}const ds=(e,t={})=>{const n=L(t.mode)?t.mode:"normal",r=L(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
4
+ `,a=t.needIndent?t.needIndent:n!=="arrow",o=e.helpers||[],i=cs(e,{filename:r,breakLineCode:s,needIndent:a});i.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(a),o.length>0&&(i.push(`const { ${dt(o.map(I=>`${I}: _${I}`),", ")} } = ctx`),i.newline()),i.push("return "),De(i,e),i.deindent(a),i.push("}"),delete e.helpers;const{code:u,map:E}=i.context();return{ast:e,code:u,map:E?E.toJSON():void 0}};function Es(e,t={}){const n=J({},t),r=!!n.jit,s=!!n.minify,a=n.optimize==null?!0:n.optimize,i=rs(n).parse(e);return r?(a&&os(i),s&&Pe(i),{ast:i,code:""}):(as(i,n),ds(i,n))}function ps(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(he().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(he().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function se(e){return F(e)&&Tt(e)===0&&(ie(e,"b")||ie(e,"body"))}const pn=["b","body"];function gs(e){return Te(e,pn)}const gn=["c","cases"];function Ts(e){return Te(e,gn,[])}const Tn=["s","static"];function Ns(e){return Te(e,Tn)}const Nn=["i","items"];function bs(e){return Te(e,Nn,[])}const bn=["t","type"];function Tt(e){return Te(e,bn)}const hn=["v","value"];function rt(e,t){const n=Te(e,hn);if(n!=null)return n;throw Ve(t)}const In=["m","modifier"];function hs(e){return Te(e,In)}const Ln=["k","key"];function Is(e){const t=Te(e,Ln);if(t)return t;throw Ve(6)}function Te(e,t,n){for(let r=0;r<t.length;r++){const s=t[r];if(ie(e,s)&&e[s]!=null)return e[s]}return n}const On=[...pn,...gn,...Tn,...Nn,...Ln,...In,...hn,...bn];function Ve(e){return new Error(`unhandled node type: ${e}`)}function Nt(e){return n=>Ls(n,e)}function Ls(e,t){const n=gs(t);if(n==null)throw Ve(0);if(Tt(n)===1){const a=Ts(n);return e.plural(a.reduce((o,i)=>[...o,vn(e,i)],[]))}else return vn(e,n)}function vn(e,t){const n=Ns(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const r=bs(t).reduce((s,a)=>[...s,bt(e,a)],[]);return e.normalize(r)}}function bt(e,t){const n=Tt(t);switch(n){case 3:return rt(t,n);case 9:return rt(t,n);case 4:{const r=t;if(ie(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(ie(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw Ve(n)}case 5:{const r=t;if(ie(r,"i")&&X(r.i))return e.interpolate(e.list(r.i));if(ie(r,"index")&&X(r.index))return e.interpolate(e.list(r.index));throw Ve(n)}case 6:{const r=t,s=hs(r),a=Is(r);return e.linked(bt(e,a),s?bt(e,s):void 0,e.type)}case 7:return rt(t,n);case 8:return rt(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Os="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function vs(e,t){t&&Kr(e)&&fe(ze(Os,{source:e}))}const Cs=e=>e;let st=W();function As(e,t={}){let n=!1;const r=t.onError||xr;return t.onError=s=>{n=!0,r(s)},{...Es(e,t),detectError:n}}function Ss(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&L(e)){const n=w(t.warnHtmlMessage)?t.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&vs(e,n);const s=(t.onCacheKey||Cs)(e),a=st[s];if(a)return a;const{ast:o,detectError:i}=As(e,{...t,location:process.env.NODE_ENV!=="production",jit:!0}),u=Nt(o);return i?u:st[s]=u}else{if(process.env.NODE_ENV!=="production"&&!se(e))return fe(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),(()=>e);const n=e.cacheKey;if(n){const r=st[n];return r||(st[n]=Nt(e))}else return Nt(e)}}let We=null;function ys(e){We=e}function Ps(e,t,n){We&&We.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const Ds=ks("function:translate");function ks(e){return t=>We&&We.emit(e,t)}const z={INVALID_ARGUMENT:Hr,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Ms=24;function pe(e){return ye(e,null,process.env.NODE_ENV!=="production"?{messages:Rs}:void 0)}const Rs={[z.INVALID_ARGUMENT]:"Invalid arguments",[z.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[z.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[z.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[z.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[z.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[z.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function ht(e,t){return t.locale!=null?Cn(t.locale):Cn(e.locale)}let It;function Cn(e){if(L(e))return e;if(G(e)){if(e.resolvedOnce&&It!=null)return It;if(e.constructor.name==="Function"){const t=e();if($r(t))throw pe(z.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return It=t}else throw pe(z.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw pe(z.NOT_SUPPORT_LOCALE_TYPE)}function Fs(e,t,n){return[...new Set([n,...x(t)?t:F(t)?Object.keys(t):L(t)?[t]:[n]])]}function An(e,t,n){const r=L(n)?n:Ge,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let a=s.__localeChainCache.get(r);if(!a){a=[];let o=[n];for(;x(o);)o=Sn(a,o,t);const i=x(t)||!R(t)?t:t.default?t.default:null;o=L(i)?[i]:i,x(o)&&Sn(a,o,!1),s.__localeChainCache.set(r,a)}return a}function Sn(e,t,n){let r=!0;for(let s=0;s<t.length&&w(r);s++){const a=t[s];L(a)&&(r=ws(e,t[s],n))}return r}function ws(e,t,n){let r;const s=t.split("-");do{const a=s.join("-");r=Us(e,a,n),s.splice(-1,1)}while(s.length&&r===!0);return r}function Us(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const s=t.replace(/!/g,"");e.push(s),(x(n)||R(n))&&n[s]&&(r=n[s])}return r}const Ne=[];Ne[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ne[1]={w:[1],".":[2],"[":[4],o:[7]},Ne[2]={w:[2],i:[3,0],0:[3,0]},Ne[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ne[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ne[5]={"'":[4,0],o:8,l:[5,0]},Ne[6]={'"':[4,0],o:8,l:[6,0]};const $s=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Vs(e){return $s.test(e)}function Ws(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Gs(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Hs(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Vs(t)?Ws(t):"*"+t}function Bs(e){const t=[];let n=-1,r=0,s=0,a,o,i,u,E,I,b;const T=[];T[0]=()=>{o===void 0?o=i:o+=i},T[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},T[2]=()=>{T[0](),s++},T[3]=()=>{if(s>0)s--,r=4,T[0]();else{if(s=0,o===void 0||(o=Hs(o),o===!1))return!1;T[1]()}};function A(){const k=e[n+1];if(r===5&&k==="'"||r===6&&k==='"')return n++,i="\\"+k,T[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a==="\\"&&A())){if(u=Gs(a),b=Ne[r],E=b[u]||b.l||8,E===8||(r=E[0],E[1]!==void 0&&(I=T[E[1]],I&&(i=a,I()===!1))))return;if(r===7)return t}}const yn=new Map;function xs(e,t){return F(e)?e[t]:null}function Ys(e,t){if(!F(e))return null;let n=yn.get(t);if(n||(n=Bs(t),n&&yn.set(t,n)),!n)return null;const r=n.length;let s=e,a=0;for(;a<r;){const o=n[a];if(On.includes(o)&&se(s))return null;const i=s[o];if(i===void 0||G(s))return null;s=i,a++}return s}const ee={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},Ks=8,js={[ee.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[ee.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[ee.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[ee.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[ee.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[ee.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[ee.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function Ie(e,...t){return ze(js[e],...t)}const Xs="11.2.8",at=-1,Ge="en-US",ot="",Pn=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Js(){return{upper:(e,t)=>t==="text"&&L(e)?e.toUpperCase():t==="vnode"&&F(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&L(e)?e.toLowerCase():t==="vnode"&&F(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&L(e)?Pn(e):t==="vnode"&&F(e)&&"__v_isVNode"in e?Pn(e.children):e}}let Dn;function Qs(e){Dn=e}let kn;function qs(e){kn=e}let Mn;function Zs(e){Mn=e}let Rn=null;const zs=e=>{Rn=e},ea=()=>Rn;let Fn=null;const wn=e=>{Fn=e},ta=()=>Fn;let Un=0;function na(e={}){const t=G(e.onWarn)?e.onWarn:fe,n=L(e.version)?e.version:Xs,r=L(e.locale)||G(e.locale)?e.locale:Ge,s=G(r)?Ge:r,a=x(e.fallbackLocale)||R(e.fallbackLocale)||L(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,o=R(e.messages)?e.messages:Lt(s),i=R(e.datetimeFormats)?e.datetimeFormats:Lt(s),u=R(e.numberFormats)?e.numberFormats:Lt(s),E=J(W(),e.modifiers,Js()),I=e.pluralRules||W(),b=G(e.missing)?e.missing:null,T=w(e.missingWarn)||Se(e.missingWarn)?e.missingWarn:!0,A=w(e.fallbackWarn)||Se(e.fallbackWarn)?e.fallbackWarn:!0,k=!!e.fallbackFormat,C=!!e.unresolving,S=G(e.postTranslation)?e.postTranslation:null,f=R(e.processor)?e.processor:null,m=w(e.warnHtmlMessage)?e.warnHtmlMessage:!0,h=!!e.escapeParameter,d=G(e.messageCompiler)?e.messageCompiler:Dn;process.env.NODE_ENV!=="production"&&G(e.messageCompiler)&&_t(Ie(ee.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const O=G(e.messageResolver)?e.messageResolver:kn||xs,v=G(e.localeFallbacker)?e.localeFallbacker:Mn||Fs,p=F(e.fallbackContext)?e.fallbackContext:void 0,M=e,$=F(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,Q=F(M.__numberFormatters)?M.__numberFormatters:new Map,ce=F(M.__meta)?M.__meta:{};Un++;const Y={version:n,cid:Un,locale:r,fallbackLocale:a,messages:o,modifiers:E,pluralRules:I,missing:b,missingWarn:T,fallbackWarn:A,fallbackFormat:k,unresolving:C,postTranslation:S,processor:f,warnHtmlMessage:m,escapeParameter:h,messageCompiler:d,messageResolver:O,localeFallbacker:v,fallbackContext:p,onWarn:t,__meta:ce};return Y.datetimeFormats=i,Y.numberFormats=u,Y.__datetimeFormatters=$,Y.__numberFormatters=Q,process.env.NODE_ENV!=="production"&&(Y.__v_emitter=M.__v_emitter!=null?M.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&Ps(Y,n,ce),Y}const Lt=e=>({[e]:W()});function lt(e,t){return e instanceof RegExp?e.test(t):e}function $n(e,t){return e instanceof RegExp?e.test(t):e}function Ot(e,t,n,r,s){const{missing:a,onWarn:o}=e;if(process.env.NODE_ENV!=="production"){const i=e.__v_emitter;i&&i.emit("missing",{locale:n,key:t,type:s,groupId:`${s}:${t}`})}if(a!==null){const i=a(e,n,t,s);return L(i)?i:t}else return process.env.NODE_ENV!=="production"&&$n(r,t)&&o(Ie(ee.NOT_FOUND_KEY,{key:t,locale:n})),t}function He(e,t,n){const r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function Vn(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function ra(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(Vn(e,t[r]))return!0;return!1}const Wn=typeof Intl<"u",Gn={dateTimeFormat:Wn&&typeof Intl.DateTimeFormat<"u",numberFormat:Wn&&typeof Intl.NumberFormat<"u"};function Hn(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:s,onWarn:a,localeFallbacker:o}=e,{__datetimeFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!Gn.dateTimeFormat)return a(Ie(ee.CANNOT_FORMAT_DATE)),ot;const[u,E,I,b]=vt(...t),T=w(I.missingWarn)?I.missingWarn:e.missingWarn,A=w(I.fallbackWarn)?I.fallbackWarn:e.fallbackWarn,k=!!I.part,C=ht(e,I),S=o(e,s,C);if(!L(u)||u==="")return new Intl.DateTimeFormat(C,b).format(E);let f={},m,h=null,d=C,O=null;const v="datetime format";for(let $=0;$<S.length;$++){if(m=O=S[$],process.env.NODE_ENV!=="production"&&C!==m&&lt(A,u)&&a(Ie(ee.FALLBACK_TO_DATE_FORMAT,{key:u,target:m})),process.env.NODE_ENV!=="production"&&C!==m){const Q=e.__v_emitter;Q&&Q.emit("fallback",{type:v,key:u,from:d,to:O,groupId:`${v}:${u}`})}if(f=n[m]||{},h=f[u],R(h))break;Ot(e,u,m,T,v),d=O}if(!R(h)||!L(m))return r?at:u;let p=`${m}__${u}`;et(b)||(p=`${p}__${JSON.stringify(b)}`);let M=i.get(p);return M||(M=new Intl.DateTimeFormat(m,J({},h,b)),i.set(p,M)),k?M.formatToParts(E):M.format(E)}const Bn=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function vt(...e){const[t,n,r,s]=e,a=W();let o=W(),i;if(L(t)){const u=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw pe(z.INVALID_ISO_DATE_ARGUMENT);const E=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();i=new Date(E);try{i.toISOString()}catch{throw pe(z.INVALID_ISO_DATE_ARGUMENT)}}else if(Rr(t)){if(isNaN(t.getTime()))throw pe(z.INVALID_DATE_ARGUMENT);i=t}else if(X(t))i=t;else throw pe(z.INVALID_ARGUMENT);return L(n)?a.key=n:R(n)&&Object.keys(n).forEach(u=>{Bn.includes(u)?o[u]=n[u]:a[u]=n[u]}),L(r)?a.locale=r:R(r)&&(o=r),R(s)&&(o=s),[a.key||"",i,a,o]}function xn(e,t,n){const r=e;for(const s in n){const a=`${t}__${s}`;r.__datetimeFormatters.has(a)&&r.__datetimeFormatters.delete(a)}}function Yn(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:s,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!Gn.numberFormat)return a(Ie(ee.CANNOT_FORMAT_NUMBER)),ot;const[u,E,I,b]=Ct(...t),T=w(I.missingWarn)?I.missingWarn:e.missingWarn,A=w(I.fallbackWarn)?I.fallbackWarn:e.fallbackWarn,k=!!I.part,C=ht(e,I),S=o(e,s,C);if(!L(u)||u==="")return new Intl.NumberFormat(C,b).format(E);let f={},m,h=null,d=C,O=null;const v="number format";for(let $=0;$<S.length;$++){if(m=O=S[$],process.env.NODE_ENV!=="production"&&C!==m&&lt(A,u)&&a(Ie(ee.FALLBACK_TO_NUMBER_FORMAT,{key:u,target:m})),process.env.NODE_ENV!=="production"&&C!==m){const Q=e.__v_emitter;Q&&Q.emit("fallback",{type:v,key:u,from:d,to:O,groupId:`${v}:${u}`})}if(f=n[m]||{},h=f[u],R(h))break;Ot(e,u,m,T,v),d=O}if(!R(h)||!L(m))return r?at:u;let p=`${m}__${u}`;et(b)||(p=`${p}__${JSON.stringify(b)}`);let M=i.get(p);return M||(M=new Intl.NumberFormat(m,J({},h,b)),i.set(p,M)),k?M.formatToParts(E):M.format(E)}const Kn=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Ct(...e){const[t,n,r,s]=e,a=W();let o=W();if(!X(t))throw pe(z.INVALID_ARGUMENT);const i=t;return L(n)?a.key=n:R(n)&&Object.keys(n).forEach(u=>{Kn.includes(u)?o[u]=n[u]:a[u]=n[u]}),L(r)?a.locale=r:R(r)&&(o=r),R(s)&&(o=s),[a.key||"",i,a,o]}function jn(e,t,n){const r=e;for(const s in n){const a=`${t}__${s}`;r.__numberFormatters.has(a)&&r.__numberFormatters.delete(a)}}const sa=e=>e,aa=e=>"",oa="text",la=e=>e.length===0?"":dt(e),ia=Vr;function Xn(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function ca(e){const t=X(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(X(e.named.count)||X(e.named.n))?X(e.named.count)?e.named.count:X(e.named.n)?e.named.n:t:t}function ua(e,t){t.count||(t.count=e),t.n||(t.n=e)}function fa(e={}){const t=e.locale,n=ca(e),r=F(e.pluralRules)&&L(t)&&G(e.pluralRules[t])?e.pluralRules[t]:Xn,s=F(e.pluralRules)&&L(t)&&G(e.pluralRules[t])?Xn:void 0,a=f=>f[r(n,f.length,s)],o=e.list||[],i=f=>o[f],u=e.named||W();X(e.pluralIndex)&&ua(n,u);const E=f=>u[f];function I(f,m){const h=G(e.messages)?e.messages(f,!!m):F(e.messages)?e.messages[f]:!1;return h||(e.parent?e.parent.message(f):aa)}const b=f=>e.modifiers?e.modifiers[f]:sa,T=R(e.processor)&&G(e.processor.normalize)?e.processor.normalize:la,A=R(e.processor)&&G(e.processor.interpolate)?e.processor.interpolate:ia,k=R(e.processor)&&L(e.processor.type)?e.processor.type:oa,S={list:i,named:E,plural:a,linked:(f,...m)=>{const[h,d]=m;let O="text",v="";m.length===1?F(h)?(v=h.modifier||v,O=h.type||O):L(h)&&(v=h||v):m.length===2&&(L(h)&&(v=h||v),L(d)&&(O=d||O));const p=I(f,!0)(S),M=O==="vnode"&&x(p)&&v?p[0]:p;return v?b(v)(M,O):M},message:I,type:k,interpolate:A,normalize:T,values:J(W(),o,u)};return S}const Jn=()=>"",ae=e=>G(e);function Qn(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:s,messageCompiler:a,fallbackLocale:o,messages:i}=e,[u,E]=At(...t),I=w(E.missingWarn)?E.missingWarn:e.missingWarn,b=w(E.fallbackWarn)?E.fallbackWarn:e.fallbackWarn,T=w(E.escapeParameter)?E.escapeParameter:e.escapeParameter,A=!!E.resolvedMessage,k=L(E.default)||w(E.default)?w(E.default)?a?u:()=>u:E.default:n?a?u:()=>u:null,C=n||k!=null&&(L(k)||G(k)),S=ht(e,E);T&&_a(E);let[f,m,h]=A?[u,S,i[S]||W()]:qn(e,u,S,o,b,I),d=f,O=u;if(!A&&!(L(d)||se(d)||ae(d))&&C&&(d=k,O=d),!A&&(!(L(d)||se(d)||ae(d))||!L(m)))return s?at:u;if(process.env.NODE_ENV!=="production"&&L(d)&&e.messageCompiler==null)return fe(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`),u;let v=!1;const p=()=>{v=!0},M=ae(d)?d:Zn(e,u,m,d,O,p);if(v)return d;const $=pa(e,m,h,E),Q=fa($),ce=ma(e,M,Q);let Y=r?r(ce,u):ce;if(T&&L(Y)&&(Y=wr(Y)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Fe={timestamp:Date.now(),key:L(u)?u:ae(d)?d.key:"",locale:m||(ae(d)?d.locale:""),format:L(d)?d:ae(d)?d.source:"",message:Y};Fe.meta=J({},e.__meta,ea()||{}),Ds(Fe)}return Y}function _a(e){x(e.list)?e.list=e.list.map(t=>L(t)?cn(t):t):F(e.named)&&Object.keys(e.named).forEach(t=>{L(e.named[t])&&(e.named[t]=cn(e.named[t]))})}function qn(e,t,n,r,s,a){const{messages:o,onWarn:i,messageResolver:u,localeFallbacker:E}=e,I=E(e,r,n);let b=W(),T,A=null,k=n,C=null;const S="translate";for(let f=0;f<I.length;f++){if(T=C=I[f],process.env.NODE_ENV!=="production"&&n!==T&&!Vn(n,T)&&lt(s,t)&&i(Ie(ee.FALLBACK_TO_TRANSLATE,{key:t,target:T})),process.env.NODE_ENV!=="production"&&n!==T){const O=e.__v_emitter;O&&O.emit("fallback",{type:S,key:t,from:k,to:C,groupId:`${S}:${t}`})}b=o[T]||W();let m=null,h,d;if(process.env.NODE_ENV!=="production"&&le&&(m=window.performance.now(),h="intlify-message-resolve-start",d="intlify-message-resolve-end",re&&re(h)),(A=u(b,t))===null&&(A=b[t]),process.env.NODE_ENV!=="production"&&le){const O=window.performance.now(),v=e.__v_emitter;v&&m&&A&&v.emit("message-resolve",{type:"message-resolve",key:t,message:A,time:O-m,groupId:`${S}:${t}`}),h&&d&&re&&be&&(re(d),be("intlify message resolve",h,d))}if(L(A)||se(A)||ae(A))break;if(!ra(T,I)){const O=Ot(e,t,T,a,S);O!==t&&(A=O)}k=C}return[A,T,b]}function Zn(e,t,n,r,s,a){const{messageCompiler:o,warnHtmlMessage:i}=e;if(ae(r)){const T=r;return T.locale=T.locale||n,T.key=T.key||t,T}if(o==null){const T=(()=>r);return T.locale=n,T.key=t,T}let u=null,E,I;process.env.NODE_ENV!=="production"&&le&&(u=window.performance.now(),E="intlify-message-compilation-start",I="intlify-message-compilation-end",re&&re(E));const b=o(r,da(e,n,s,r,i,a));if(process.env.NODE_ENV!=="production"&&le){const T=window.performance.now(),A=e.__v_emitter;A&&u&&A.emit("message-compilation",{type:"message-compilation",message:r,time:T-u,groupId:`translate:${t}`}),E&&I&&re&&be&&(re(I),be("intlify message compilation",E,I))}return b.locale=n,b.key=t,b.source=r,b}function ma(e,t,n){let r=null,s,a;process.env.NODE_ENV!=="production"&&le&&(r=window.performance.now(),s="intlify-message-evaluation-start",a="intlify-message-evaluation-end",re&&re(s));const o=t(n);if(process.env.NODE_ENV!=="production"&&le){const i=window.performance.now(),u=e.__v_emitter;u&&r&&u.emit("message-evaluation",{type:"message-evaluation",value:o,time:i-r,groupId:`translate:${t.key}`}),s&&a&&re&&be&&(re(a),be("intlify message evaluation",s,a))}return o}function At(...e){const[t,n,r]=e,s=W();if(!L(t)&&!X(t)&&!ae(t)&&!se(t))throw pe(z.INVALID_ARGUMENT);const a=X(t)?String(t):(ae(t),t);return X(n)?s.plural=n:L(n)?s.default=n:R(n)&&!et(n)?s.named=n:x(n)&&(s.list=n),X(r)?s.plural=r:L(r)?s.default=r:R(r)&&J(s,r),[a,s]}function da(e,t,n,r,s,a){return{locale:t,key:n,warnHtmlMessage:s,onError:o=>{if(a&&a(o),process.env.NODE_ENV!=="production"){const i=Ea(r),u=`Message compilation error: ${o.message}`,E=o.location&&i&&Wr(i,o.location.start.offset,o.location.end.offset),I=e.__v_emitter;I&&i&&I.emit("compile-error",{message:i,error:o.message,start:o.location&&o.location.start.offset,end:o.location&&o.location.end.offset,groupId:`translate:${n}`}),console.error(E?`${u}
5
+ ${E}`:u)}else throw o},onCacheKey:o=>kr(t,n,o)}}function Ea(e){if(L(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function pa(e,t,n,r){const{modifiers:s,pluralRules:a,messageResolver:o,fallbackLocale:i,fallbackWarn:u,missingWarn:E,fallbackContext:I}=e,T={locale:t,modifiers:s,pluralRules:a,messages:(A,k)=>{let C=o(n,A);if(C==null&&(I||k)){const[,,S]=qn(I||e,A,t,i,u,E);C=o(S,A)}if(L(C)||se(C)){let S=!1;const m=Zn(e,A,t,C,A,()=>{S=!0});return S?Jn:m}else return ae(C)?C:Jn}};return e.processor&&(T.processor=e.processor),r.list&&(T.list=r.list),r.named&&(T.named=r.named),X(r.plural)&&(T.pluralIndex=r.plural),T}ps();function ga(){return zn().__VUE_DEVTOOLS_GLOBAL_HOOK__}function zn(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Ta=typeof Proxy=="function",Na="devtools-plugin:setup",ba="plugin:settings:set";let ke,St;function ha(){var e;return ke!==void 0||(typeof window<"u"&&window.performance?(ke=!0,St=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(ke=!0,St=globalThis.perf_hooks.performance):ke=!1),ke}function Ia(){return ha()?St.now():Date.now()}class La{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const o in t.settings){const i=t.settings[o];r[o]=i.defaultValue}const s=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},r);try{const o=localStorage.getItem(s),i=JSON.parse(o);Object.assign(a,i)}catch{}this.fallbacks={getSettings(){return a},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}a=o},now(){return Ia()}},n&&n.on(ba,(o,i)=>{o===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(o,i)=>this.target?this.target.on[i]:(...u)=>{this.onQueue.push({method:i,args:u})}}),this.proxiedTarget=new Proxy({},{get:(o,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...u)=>(this.targetQueue.push({method:i,args:u,resolve:()=>{}}),this.fallbacks[i](...u)):(...u)=>new Promise(E=>{this.targetQueue.push({method:i,args:u,resolve:E})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Oa(e,t){const n=e,r=zn(),s=ga(),a=Ta&&n.enableEarlyProxy;if(s&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Na,e,t);else{const o=a?new La(n,s):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:o}),o&&t(o.proxiedTarget)}}const va="11.2.8";function Ca(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(he().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(he().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(he().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(he().__INTLIFY_PROD_DEVTOOLS__=!1)}const H={UNEXPECTED_RETURN_TYPE:Ms,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function te(e,...t){return ye(e,null,process.env.NODE_ENV!=="production"?{messages:Aa,args:t}:void 0)}const Aa={[H.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[H.INVALID_ARGUMENT]:"Invalid argument",[H.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[H.NOT_INSTALLED]:"Need to install with `app.use` function",[H.UNEXPECTED_ERROR]:"Unexpected error",[H.REQUIRED_VALUE]:"Required in value: {0}",[H.INVALID_VALUE]:"Invalid value",[H.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[H.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[H.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[H.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},yt=_e("__translateVNode"),Pt=_e("__datetimeParts"),Dt=_e("__numberParts"),Le=_e("__enableEmitter"),Be=_e("__disableEmitter"),er=_e("__setPluralRules"),tr=_e("__injectWithOption"),kt=_e("__dispose"),oe={FALLBACK_TO_ROOT:Ks,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},Sa={[oe.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[oe.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[oe.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[oe.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
6
+ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[oe.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[oe.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function Me(e,...t){return ze(Sa[e],...t)}function xe(e){if(!F(e)||se(e))return e;for(const t in e)if(ie(e,t))if(!t.includes("."))F(e[t])&&xe(e[t]);else{const n=t.split("."),r=n.length-1;let s=e,a=!1;for(let o=0;o<r;o++){if(n[o]==="__proto__")throw new Error(`unsafe key: ${n[o]}`);if(n[o]in s||(s[n[o]]=W()),!F(s[n[o]])){process.env.NODE_ENV!=="production"&&fe(Me(oe.IGNORE_OBJ_FLATTEN,{key:n[o]})),a=!0;break}s=s[n[o]]}if(a||(se(s)?On.includes(n[r])||delete e[t]:(s[n[r]]=e[t],delete e[t])),!se(s)){const o=s[n[r]];F(o)&&xe(o)}}return e}function Mt(e,t){const{messages:n,__i18n:r,messageResolver:s,flatJson:a}=t,o=R(n)?n:x(r)?W():{[e]:W()};if(x(r)&&r.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:u,resource:E}=i;u?(o[u]=o[u]||W(),nt(E,o[u])):nt(E,o)}else L(i)&&nt(JSON.parse(i),o)}),s==null&&a)for(const i in o)ie(o,i)&&xe(o[i]);return o}function nr(e){return e.type}function rr(e,t,n){let r=F(t.messages)?t.messages:W();"__i18nGlobal"in n&&(r=Mt(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const s=Object.keys(r);s.length&&s.forEach(a=>{e.mergeLocaleMessage(a,r[a])});{if(F(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach(o=>{e.mergeDateTimeFormat(o,t.datetimeFormats[o])})}if(F(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach(o=>{e.mergeNumberFormat(o,t.numberFormats[o])})}}}function sr(e){return P.createVNode(P.Text,null,e,0)}function Re(){const e="currentInstance";return e in ft?ft[e]:ft.getCurrentInstance()}const ar="__INTLIFY_META__",or=()=>[],ya=()=>!1;let lr=0;function ir(e){return((t,n,r,s)=>e(n,r,Re()||void 0,s))}const Pa=()=>{const e=Re();let t=null;return e&&(t=nr(e)[ar])?{[ar]:t}:null};function Rt(e={}){const{__root:t,__injectWithOption:n}=e,r=t===void 0,s=e.flatJson,a=le?P.ref:P.shallowRef;let o=w(e.inheritLocale)?e.inheritLocale:!0;const i=a(t&&o?t.locale.value:L(e.locale)?e.locale:Ge),u=a(t&&o?t.fallbackLocale.value:L(e.fallbackLocale)||x(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i.value),E=a(Mt(i.value,e)),I=a(R(e.datetimeFormats)?e.datetimeFormats:{[i.value]:{}}),b=a(R(e.numberFormats)?e.numberFormats:{[i.value]:{}});let T=t?t.missingWarn:w(e.missingWarn)||Se(e.missingWarn)?e.missingWarn:!0,A=t?t.fallbackWarn:w(e.fallbackWarn)||Se(e.fallbackWarn)?e.fallbackWarn:!0,k=t?t.fallbackRoot:w(e.fallbackRoot)?e.fallbackRoot:!0,C=!!e.fallbackFormat,S=G(e.missing)?e.missing:null,f=G(e.missing)?ir(e.missing):null,m=G(e.postTranslation)?e.postTranslation:null,h=t?t.warnHtmlMessage:w(e.warnHtmlMessage)?e.warnHtmlMessage:!0,d=!!e.escapeParameter;const O=t?t.modifiers:R(e.modifiers)?e.modifiers:{};let v=e.pluralRules||t&&t.pluralRules,p;p=(()=>{r&&wn(null);const _={version:va,locale:i.value,fallbackLocale:u.value,messages:E.value,modifiers:O,pluralRules:v,missing:f===null?void 0:f,missingWarn:T,fallbackWarn:A,fallbackFormat:C,unresolving:!0,postTranslation:m===null?void 0:m,warnHtmlMessage:h,escapeParameter:d,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};_.datetimeFormats=I.value,_.numberFormats=b.value,_.__datetimeFormatters=R(p)?p.__datetimeFormatters:void 0,_.__numberFormatters=R(p)?p.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(_.__v_emitter=R(p)?p.__v_emitter:void 0);const N=na(_);return r&&wn(N),N})(),He(p,i.value,u.value);function $(){return[i.value,u.value,E.value,I.value,b.value]}const Q=P.computed({get:()=>i.value,set:_=>{p.locale=_,i.value=_}}),ce=P.computed({get:()=>u.value,set:_=>{p.fallbackLocale=_,u.value=_,He(p,i.value,_)}}),Y=P.computed(()=>E.value),Fe=P.computed(()=>I.value),Gt=P.computed(()=>b.value);function Ht(){return G(m)?m:null}function Bt(_){m=_,p.postTranslation=_}function xt(){return S}function Yt(_){_!==null&&(f=ir(_)),S=_,p.missing=f}function Kt(_,N){return _!=="translate"||!N.resolvedMessage}const ge=(_,N,V,j,Ce,ut)=>{$();let we;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(p.fallbackContext=t?ta():void 0),we=_(p)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(p.fallbackContext=void 0)}if(V!=="translate exists"&&X(we)&&we===at||V==="translate exists"&&!we){const[Ae,uo]=N();if(process.env.NODE_ENV!=="production"&&t&&L(Ae)&&Kt(V,uo)&&(k&&(lt(A,Ae)||$n(T,Ae))&&fe(Me(oe.FALLBACK_TO_ROOT,{key:Ae,type:V})),process.env.NODE_ENV!=="production")){const{__v_emitter:Lr}=p;Lr&&k&&Lr.emit("fallback",{type:V,key:Ae,to:"global",groupId:`${V}:${Ae}`})}return t&&k?j(t):Ce(Ae)}else{if(ut(we))return we;throw te(H.UNEXPECTED_RETURN_TYPE)}};function Ke(..._){return ge(N=>Reflect.apply(Qn,null,[N,..._]),()=>At(..._),"translate",N=>Reflect.apply(N.t,N,[..._]),N=>N,N=>L(N))}function jt(..._){const[N,V,j]=_;if(j&&!F(j))throw te(H.INVALID_ARGUMENT);return Ke(N,V,J({resolvedMessage:!0},j||{}))}function Xt(..._){return ge(N=>Reflect.apply(Hn,null,[N,..._]),()=>vt(..._),"datetime format",N=>Reflect.apply(N.d,N,[..._]),()=>ot,N=>L(N)||x(N))}function Jt(..._){return ge(N=>Reflect.apply(Yn,null,[N,..._]),()=>Ct(..._),"number format",N=>Reflect.apply(N.n,N,[..._]),()=>ot,N=>L(N)||x(N))}function Qt(_){return _.map(N=>L(N)||X(N)||w(N)?sr(String(N)):N)}const qt={normalize:Qt,interpolate:_=>_,type:"vnode"};function it(..._){return ge(N=>{let V;const j=N;try{j.processor=qt,V=Reflect.apply(Qn,null,[j,..._])}finally{j.processor=null}return V},()=>At(..._),"translate",N=>N[yt](..._),N=>[sr(N)],N=>x(N))}function Zt(..._){return ge(N=>Reflect.apply(Yn,null,[N,..._]),()=>Ct(..._),"number format",N=>N[Dt](..._),or,N=>L(N)||x(N))}function ct(..._){return ge(N=>Reflect.apply(Hn,null,[N,..._]),()=>vt(..._),"datetime format",N=>N[Pt](..._),or,N=>L(N)||x(N))}function zt(_){v=_,p.pluralRules=v}function en(_,N){return ge(()=>{if(!_)return!1;const V=L(N)?N:i.value,j=ve(V),Ce=p.messageResolver(j,_);return se(Ce)||ae(Ce)||L(Ce)},()=>[_],"translate exists",V=>Reflect.apply(V.te,V,[_,N]),ya,V=>w(V))}function je(_){let N=null;const V=An(p,u.value,i.value);for(let j=0;j<V.length;j++){const Ce=E.value[V[j]]||{},ut=p.messageResolver(Ce,_);if(ut!=null){N=ut;break}}return N}function Xe(_){const N=je(_);return N??(t?t.tm(_)||{}:{})}function ve(_){return E.value[_]||{}}function Je(_,N){if(s){const V={[_]:N};for(const j in V)ie(V,j)&&xe(V[j]);N=V[_]}E.value[_]=N,p.messages=E.value}function tn(_,N){E.value[_]=E.value[_]||{};const V={[_]:N};if(s)for(const j in V)ie(V,j)&&xe(V[j]);N=V[_],nt(N,E.value[_]),p.messages=E.value}function l(_){return I.value[_]||{}}function c(_,N){I.value[_]=N,p.datetimeFormats=I.value,xn(p,_,N)}function g(_,N){I.value[_]=J(I.value[_]||{},N),p.datetimeFormats=I.value,xn(p,_,N)}function y(_){return b.value[_]||{}}function B(_,N){b.value[_]=N,p.numberFormats=b.value,jn(p,_,N)}function K(_,N){b.value[_]=J(b.value[_]||{},N),p.numberFormats=b.value,jn(p,_,N)}lr++,t&&le&&(P.watch(t.locale,_=>{o&&(i.value=_,p.locale=_,He(p,i.value,u.value))}),P.watch(t.fallbackLocale,_=>{o&&(u.value=_,p.fallbackLocale=_,He(p,i.value,u.value))}));const U={id:lr,locale:Q,fallbackLocale:ce,get inheritLocale(){return o},set inheritLocale(_){o=_,_&&t&&(i.value=t.locale.value,u.value=t.fallbackLocale.value,He(p,i.value,u.value))},get availableLocales(){return Object.keys(E.value).sort()},messages:Y,get modifiers(){return O},get pluralRules(){return v||{}},get isGlobal(){return r},get missingWarn(){return T},set missingWarn(_){T=_,p.missingWarn=T},get fallbackWarn(){return A},set fallbackWarn(_){A=_,p.fallbackWarn=A},get fallbackRoot(){return k},set fallbackRoot(_){k=_},get fallbackFormat(){return C},set fallbackFormat(_){C=_,p.fallbackFormat=C},get warnHtmlMessage(){return h},set warnHtmlMessage(_){h=_,p.warnHtmlMessage=_},get escapeParameter(){return d},set escapeParameter(_){d=_,p.escapeParameter=_},t:Ke,getLocaleMessage:ve,setLocaleMessage:Je,mergeLocaleMessage:tn,getPostTranslationHandler:Ht,setPostTranslationHandler:Bt,getMissingHandler:xt,setMissingHandler:Yt,[er]:zt};return U.datetimeFormats=Fe,U.numberFormats=Gt,U.rt=jt,U.te=en,U.tm=Xe,U.d=Xt,U.n=Jt,U.getDateTimeFormat=l,U.setDateTimeFormat=c,U.mergeDateTimeFormat=g,U.getNumberFormat=y,U.setNumberFormat=B,U.mergeNumberFormat=K,U[tr]=n,U[yt]=it,U[Pt]=ct,U[Dt]=Zt,process.env.NODE_ENV!=="production"&&(U[Le]=_=>{p.__v_emitter=_},U[Be]=()=>{p.__v_emitter=void 0}),U}const cr="vue-i18n: composer properties",Ft={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},Da={"vue-i18n-resource-inspector":"Search for scopes ..."},ka={"vue-i18n-timeline":16764185};let wt;async function Ma(e,t){return new Promise((n,r)=>{try{Oa({id:"vue-devtools-plugin-vue-i18n",label:Ft["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[cr],app:e},s=>{wt=s,s.on.visitComponentTree(({componentInstance:o,treeNode:i})=>{Ra(o,i,t)}),s.on.inspectComponent(({componentInstance:o,instanceData:i})=>{o.__VUE_I18N__&&i&&(t.mode==="legacy"?o.__VUE_I18N__!==t.global.__composer&&fr(i,o.__VUE_I18N__):fr(i,o.__VUE_I18N__))}),s.addInspector({id:"vue-i18n-resource-inspector",label:Ft["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Da["vue-i18n-resource-inspector"]}),s.on.getInspectorTree(o=>{o.app===e&&o.inspectorId==="vue-i18n-resource-inspector"&&Va(o,t)});const a=new Map;s.on.getInspectorState(async o=>{if(o.app===e&&o.inspectorId==="vue-i18n-resource-inspector")if(s.unhighlightElement(),Ga(o,t),o.nodeId==="global"){if(!a.has(o.app)){const[i]=await s.getComponentInstances(o.app);a.set(o.app,i)}s.highlightElement(a.get(o.app))}else{const i=Wa(o.nodeId,t);i&&s.highlightElement(i)}}),s.on.editInspectorState(o=>{o.app===e&&o.inspectorId==="vue-i18n-resource-inspector"&&Ba(o,t)}),s.addTimelineLayer({id:"vue-i18n-timeline",label:Ft["vue-i18n-timeline"],color:ka["vue-i18n-timeline"]}),n(!0)})}catch(s){console.error(s),r(!1)}})}function ur(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Ra(e,t,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==r){const s={label:`i18n (${ur(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(s)}}function fr(e,t){const n=cr;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:Ut(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function Ut(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];G(r)&&"source"in r?t[n]=$a(r):se(r)&&r.loc&&r.loc.source?t[n]=r.loc.source:F(r)?t[n]=Ut(r):t[n]=r}),t}const Fa={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function wa(e){return e.replace(/[<>"&]/g,Ua)}function Ua(e){return Fa[e]||e}function $a(e){return{_custom:{type:"function",display:`<span>ƒ</span> ${e.source?`("${wa(e.source)}")`:"(?)"}`}}}function Va(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[r,s]of t.__instances){const a=t.mode==="composition"?s:s.__composer;n!==a&&e.rootNodes.push({id:a.id.toString(),label:`${ur(r)} Scope`})}}function Wa(e,t){let n=null;if(e!=="global"){for(const[r,s]of t.__instances.entries())if(s.id.toString()===e){n=r;break}}return n}function _r(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(r=>r.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function Ga(e,t){const n=_r(e.nodeId,t);return n&&(e.state=Ha(n)),null}function Ha(e){const t={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=r;const s="Locale messages info",a=[{type:s,key:"messages",editable:!1,value:Ut(e.messages.value)}];t[s]=a;{const o="Datetime formats info",i=[{type:o,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[o]=i;const u="Datetime formats info",E=[{type:u,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[u]=E}return t}function Ye(e,t){if(wt){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),wt.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function Ba(e,t){const n=_r(e.nodeId,t);if(n){const[r]=e.path;r==="locale"&&L(e.state.value)?n.locale.value=e.state.value:r==="fallbackLocale"&&(L(e.state.value)||x(e.state.value)||F(e.state.value))?n.fallbackLocale.value=e.state.value:r==="inheritLocale"&&w(e.state.value)&&(n.inheritLocale=e.state.value)}}function xa(e){const t=L(e.locale)?e.locale:Ge,n=L(e.fallbackLocale)||x(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=G(e.missing)?e.missing:void 0,s=w(e.silentTranslationWarn)||Se(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=w(e.silentFallbackWarn)||Se(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=w(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,u=R(e.modifiers)?e.modifiers:{},E=e.pluralizationRules,I=G(e.postTranslation)?e.postTranslation:void 0,b=L(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,T=!!e.escapeParameterHtml,A=w(e.sync)?e.sync:!0;let k=e.messages;if(R(e.sharedMessages)){const O=e.sharedMessages;k=Object.keys(O).reduce((p,M)=>{const $=p[M]||(p[M]={});return J($,O[M]),p},k||{})}const{__i18n:C,__root:S,__injectWithOption:f}=e,m=e.datetimeFormats,h=e.numberFormats,d=e.flatJson;return{locale:t,fallbackLocale:n,messages:k,flatJson:d,datetimeFormats:m,numberFormats:h,missing:r,missingWarn:s,fallbackWarn:a,fallbackRoot:o,fallbackFormat:i,modifiers:u,pluralRules:E,postTranslation:I,warnHtmlMessage:b,escapeParameter:T,messageResolver:e.messageResolver,inheritLocale:A,__i18n:C,__root:S,__injectWithOption:f}}function $t(e={}){const t=Rt(xa(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return w(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=w(s)?!s:s},get silentFallbackWarn(){return w(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=w(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,a){return t.te(s,a)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,a){t.setLocaleMessage(s,a)},mergeLocaleMessage(s,a){t.mergeLocaleMessage(s,a)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,a){t.setDateTimeFormat(s,a)},mergeDateTimeFormat(s,a){t.mergeDateTimeFormat(s,a)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,a){t.setNumberFormat(s,a)},mergeNumberFormat(s,a){t.mergeNumberFormat(s,a)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=s=>{const a=t;a[Le]&&a[Le](s)},r.__disableEmitter=()=>{const s=t;s[Be]&&s[Be]()}),r}function Ya(e,t,n){return{beforeCreate(){const r=Re();if(!r)throw te(H.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const a=s.i18n;if(s.__i18n&&(a.__i18n=s.__i18n),a.__root=t,this===this.$root)this.$i18n=mr(e,a);else{a.__injectWithOption=!0,a.__extender=n.__vueI18nExtend,this.$i18n=$t(a);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=mr(e,s);else{this.$i18n=$t({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&rr(t,s,s),this.$t=(...a)=>this.$i18n.t(...a),this.$rt=(...a)=>this.$i18n.rt(...a),this.$te=(a,o)=>this.$i18n.te(a,o),this.$d=(...a)=>this.$i18n.d(...a),this.$n=(...a)=>this.$i18n.n(...a),this.$tm=a=>this.$i18n.tm(a),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$i18n){const r=Re();if(!r)return;const s=this.$i18n;r.__VUE_I18N__=s.__composer;const a=this.__v_emitter=Et();s.__enableEmitter&&s.__enableEmitter(a),a.on("*",Ye)}},unmounted(){const r=Re();if(!r)throw te(H.UNEXPECTED_ERROR);const s=this.$i18n;process.env.NODE_ENV!=="production"&&r.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",Ye),delete this.__v_emitter),this.$i18n&&(s.__disableEmitter&&s.__disableEmitter(),delete r.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(r),delete this.$i18n}}}function mr(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[er](t.pluralizationRules||e.pluralizationRules);const n=Mt(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const Vt={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ka({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,s)=>[...r,...s.type===P.Fragment?s.children:[s]],[]):t.reduce((n,r)=>{const s=e[r];return s&&(n[r]=s()),n},W())}function dr(){return P.Fragment}const Er=P.defineComponent({name:"i18n-t",props:J({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>X(e)||!isNaN(e)}},Vt),setup(e,t){const{slots:n,attrs:r}=t,s=e.i18n||Wt({useScope:e.scope,__useComponent:!0});return()=>{const a=Object.keys(n).filter(b=>b[0]!=="_"),o=W();e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=L(e.plural)?+e.plural:e.plural);const i=Ka(t,a),u=s[yt](e.keypath,i,o),E=J(W(),r),I=L(e.tag)||F(e.tag)?e.tag:dr();return P.h(I,E,u)}}});function ja(e){return x(e)&&!L(e[0])}function pr(e,t,n,r){const{slots:s,attrs:a}=t;return()=>{const o={part:!0};let i=W();e.locale&&(o.locale=e.locale),L(e.format)?o.key=e.format:F(e.format)&&(L(e.format.key)&&(o.key=e.format.key),i=Object.keys(e.format).reduce((T,A)=>n.includes(A)?J(W(),T,{[A]:e.format[A]}):T,W()));const u=r(e.value,o,i);let E=[o.key];x(u)?E=u.map((T,A)=>{const k=s[T.type],C=k?k({[T.type]:T.value,index:A,parts:u}):[T.value];return ja(C)&&(C[0].key=`${T.type}-${A}`),C}):L(u)&&(E=[u]);const I=J(W(),a),b=L(e.tag)||F(e.tag)?e.tag:dr();return P.h(b,I,E)}}const gr=P.defineComponent({name:"i18n-n",props:J({value:{type:Number,required:!0},format:{type:[String,Object]}},Vt),setup(e,t){const n=e.i18n||Wt({useScope:e.scope,__useComponent:!0});return pr(e,t,Kn,(...r)=>n[Dt](...r))}});function Xa(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function Ja(e){const t=o=>{process.env.NODE_ENV!=="production"&&_t(Me(oe.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));const{instance:i,value:u}=o;if(!i||!i.$)throw te(H.UNEXPECTED_ERROR);const E=Xa(e,i.$),I=Tr(u);return[Reflect.apply(E.t,E,[...Nr(I)]),E]};return{created:(o,i)=>{const[u,E]=t(i);le&&e.global===E&&(o.__i18nWatcher=P.watch(E.locale,()=>{i.instance&&i.instance.$forceUpdate()})),o.__composer=E,o.textContent=u},unmounted:o=>{le&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:i})=>{if(o.__composer){const u=o.__composer,E=Tr(i);o.textContent=Reflect.apply(u.t,u,[...Nr(E)])}},getSSRProps:o=>{const[i]=t(o);return{textContent:i}}}}function Tr(e){if(L(e))return{path:e};if(R(e)){if(!("path"in e))throw te(H.REQUIRED_VALUE,"path");return e}else throw te(H.INVALID_VALUE)}function Nr(e){const{path:t,locale:n,args:r,choice:s,plural:a}=e,o={},i=r||{};return L(n)&&(o.locale=n),X(s)&&(o.plural=s),X(a)&&(o.plural=a),[t,i,o]}function Qa(e,t,...n){const r=R(n[0])?n[0]:{};(!w(r.globalInstall)||r.globalInstall)&&([Er.name,"I18nT"].forEach(a=>e.component(a,Er)),[gr.name,"I18nN"].forEach(a=>e.component(a,gr)),[hr.name,"I18nD"].forEach(a=>e.component(a,hr))),e.directive("t",Ja(t))}const qa=_e("global-vue-i18n");function Za(e={}){const t=__VUE_I18N_LEGACY_API__&&w(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!=="production"&&t&&_t(Me(oe.DEPRECATE_LEGACY_MODE));const n=w(e.globalInjection)?e.globalInjection:!0,r=new Map,[s,a]=za(e,t),o=_e(process.env.NODE_ENV!=="production"?"vue-i18n":"");function i(b){return r.get(b)||null}function u(b,T){r.set(b,T)}function E(b){r.delete(b)}const I={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(b,...T){if(process.env.NODE_ENV!=="production"&&(b.__VUE_I18N__=I),b.__VUE_I18N_SYMBOL__=o,b.provide(b.__VUE_I18N_SYMBOL__,I),R(T[0])){const C=T[0];I.__composerExtend=C.__composerExtend,I.__vueI18nExtend=C.__vueI18nExtend}let A=null;!t&&n&&(A=lo(b,I.global)),__VUE_I18N_FULL_INSTALL__&&Qa(b,I,...T),__VUE_I18N_LEGACY_API__&&t&&b.mixin(Ya(a,a.__composer,I));const k=b.unmount;if(b.unmount=()=>{A&&A(),I.dispose(),k()},process.env.NODE_ENV!=="production"){if(!await Ma(b,I))throw te(H.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const S=Et();if(t){const f=a;f.__enableEmitter&&f.__enableEmitter(S)}else{const f=a;f[Le]&&f[Le](S)}S.on("*",Ye)}},get global(){return a},dispose(){s.stop()},__instances:r,__getInstance:i,__setInstance:u,__deleteInstance:E};return I}function Wt(e={}){const t=Re();if(t==null)throw te(H.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw te(H.NOT_INSTALLED);const n=eo(t),r=no(n),s=nr(t),a=to(e,s);if(a==="global")return rr(r,e,s),r;if(a==="parent"){let u=ro(n,t,e.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&fe(Me(oe.NOT_FOUND_PARENT_SCOPE)),u=r),u}const o=n;let i=o.__getInstance(t);if(i==null){const u=J({},e);"__i18n"in s&&(u.__i18n=s.__i18n),r&&(u.__root=r),i=Rt(u),o.__composerExtend&&(i[kt]=o.__composerExtend(i)),ao(o,t,i),o.__setInstance(t,i)}else process.env.NODE_ENV!=="production"&&a==="local"&&fe(Me(oe.DUPLICATE_USE_I18N_CALLING));return i}function za(e,t){const n=P.effectScope(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>$t(e)):n.run(()=>Rt(e));if(r==null)throw te(H.UNEXPECTED_ERROR);return[n,r]}function eo(e){const t=P.inject(e.isCE?qa:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw te(e.isCE?H.NOT_INSTALLED_WITH_PROVIDE:H.UNEXPECTED_ERROR);return t}function to(e,t){return et(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function no(e){return e.mode==="composition"?e.global:e.global.__composer}function ro(e,t,n=!1){let r=null;const s=t.root;let a=so(t,n);for(;a!=null;){const o=e;if(e.mode==="composition")r=o.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){const i=o.__getInstance(a);i!=null&&(r=i.__composer,n&&r&&!r[tr]&&(r=null))}if(r!=null||s===a)break;a=a.parent}return r}function so(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function ao(e,t,n){let r=null;P.onMounted(()=>{if(process.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,r=Et();const s=n;s[Le]&&s[Le](r),r.on("*",Ye)}},t),P.onUnmounted(()=>{const s=n;process.env.NODE_ENV!=="production"&&(r&&r.off("*",Ye),s[Be]&&s[Be](),delete t.__VUE_I18N__),e.__deleteInstance(t);const a=s[kt];a&&(a(),delete s[kt])},t)}const oo=["locale","fallbackLocale","availableLocales"],br=["t","rt","d","n","tm","te"];function lo(e,t){const n=Object.create(null);return oo.forEach(s=>{const a=Object.getOwnPropertyDescriptor(t,s);if(!a)throw te(H.UNEXPECTED_ERROR);const o=P.isRef(a.value)?{get(){return a.value.value},set(i){a.value.value=i}}:{get(){return a.get&&a.get()}};Object.defineProperty(n,s,o)}),e.config.globalProperties.$i18n=n,br.forEach(s=>{const a=Object.getOwnPropertyDescriptor(t,s);if(!a||!a.value)throw te(H.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,a)}),()=>{delete e.config.globalProperties.$i18n,br.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const hr=P.defineComponent({name:"i18n-d",props:J({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Vt),setup(e,t){const n=e.i18n||Wt({useScope:e.scope,__useComponent:!0});return pr(e,t,Bn,(...r)=>n[Pt](...r))}});if(Ca(),Qs(Ss),qs(Ys),Zs(An),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=he();e.__INTLIFY__=!0,ys(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Oe=Za({legacy:!1,locale:"zh",fallbackLocale:"en",messages:{zh:{name:"名称",supplier:"供应商",version:"版本",description:"描述",category:"类别",general:"通用",ioMapping:"I/O映射",modbusSlaveChannel:"Modbus从站通道",status:"状态",ethernet:"以太网",modbusTcpServer:"Modbus TCP服务器",modbusTcpClient:"Modbus TCP客户端",modbusTCPSlaveDevice:"Modbus TCP从站设备",company:"成都数字创新科技有限公司",descriptionMap:{ethernet:"一种在以太网上充当Modbus服务器的设备。",modbusTcpServer:"一种在以太网上充当Modbus TCP服务器的设备。",modbusTcpClient:"一种在以太网上充当Modbus TCP客户端的设备。",modbusTCPSlaveDevice:"一种在以太网上充当Modbus TCP从站设备。"},netInterface:"网络接口",ipAddress:"IP地址",subnetMask:"子网掩码",defaultGateway:"默认网关",adaptedOSConfiguration:"适配操作系统配置",busCycleTask:"总线周期任务",defaultTask:"使用父总线循环设置",responseTimeout:"响应超时(ms)",socketTimeout:"Socket超时(ms)",reconnect:"自动重连",slaveIpAddress:"从站IP地址",port:"端口",watchDog:" 看门狗",slavePort:"从站端口",bindToAdapter:"绑定到适配器",holdingRegister:"保持寄存器",writable:"可写入",inputRegister:"输入寄存器",discreteBitArea:"离散位区域",coil:"线圈",discreteInput:"离散输入",dataModel:"数据模型",startAddress:"起始地址"},en:{name:"Name",supplier:"Supplier",version:"Version",description:"Description",category:"Category",general:"General",ioMapping:"I/O Mapping",modbusSlaveChannel:"Modbus Slave Channel",status:"Status",ethernet:"Ethernet",modbusTcpServer:"Modbus TCP Server",modbusTcpClient:"Modbus TCP Client",modbusTCPSlaveDevice:"Modbus TCP Slave Device",company:"Chengdu AIOSYS Innovation Technology Co., Ltd.",descriptionMap:{ethernet:"A device that works as a Modbus Server on Ethernet.",modbusTcpServer:"A device that works as a Modbus TCP Server.",modbusTcpClient:"A device that works as a Modbus TCP Client.",modbusTCPSlaveDevice:"A device that works as a Modbus TCP Slave Device."},netInterface:"Network Interface",ipAddress:"IP Address",subnetMask:"Subnet Mask",defaultGateway:"Default Gateway",adaptedOSConfiguration:"Adapted OS Configuration",busCycleTask:"Bus Cycle Task",defaultTask:"Use Parent Bus Cycle Setting",responseTimeout:"Response Timeout(ms)",socketTimeout:"Socket Timeout(ms)",reconnect:"Reconnect",slaveIpAddress:"Slave IP Address",port:"Port",watchDog:"Watch Dog",slavePort:"Slave Port",bindToAdapter:"Bind to Adapter",holdingRegister:"Holding Register",writable:"Writable",inputRegister:"Input Register",discreteBitArea:"Discrete Bit Area",coil:"Coil",discreteInput:"Discrete Input",dataModel:"Data Model",startAddress:"Start Address"}}});typeof window<"u"&&(window.$t=Oe.global.t.bind(Oe.global),Object.defineProperty(window,"$locale",{get(){return typeof Oe.global.locale=="string"?Oe.global.locale:Oe.global.locale.value},set(e){Oe.global.locale=e}})),P.createApp(Pr).use(Oe).mount("#app");const io=[rn,sn],co={install(e){io.forEach(t=>{e.component(t.name,t)})}};q.Button2=sn,q.EthernetProtocolItem=Ue,q.Input=Cr,q.ModbusTCPClientProtocolItem=qe,q.ModbusTCPServerProtocolItem=Qe,q.ModbusTCPSlaveDeviceProtocolItem=Ze,q.MyButton=rn,q.ProtocolCollection=an,q.ProtocolItem=ne,q.ProtocolType=ue,q.default=co,q.protocolMap=$e,Object.defineProperties(q,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
@@ -0,0 +1,61 @@
1
+ import { ICollection } from '../types';
2
+ import { ProtocolItem } from './protocolItem';
3
+ declare enum ProtocolType {
4
+ ETHERNET = "Ethernet",
5
+ MODBUS_TCP_SERVER = "ModbusTCPServer",
6
+ MODBUS_TCP_CLIENT = "ModbusTCPClient",
7
+ MODBUS_TCP_SLAVE_DEVICE = "ModbusTCPSlaveDevice",
8
+ MODBUS_SERIAL_PORT = "ModbusSerialPort",
9
+ MODBUS_MASTER = "ModbusMaster",
10
+ MODBUS_SLAVE = "ModbusSlave",
11
+ MODBUS_SERIAL = "ModbusSerial",
12
+ OPCUA_SERVER = "OPCUAServer",
13
+ ETHER_CAT_MASTER = "EtherCatMaster",
14
+ ETHER_CAT_SLAVE = "EtherCatSlave",
15
+ ETHER_CAT_MODULE = "EtherCatModule"
16
+ }
17
+ declare const protocolMap: {
18
+ Pprogrammable: number;
19
+ Protgrammable_Safety: number;
20
+ CAN_Master: number;
21
+ CAN_Slave: number;
22
+ CAN_Device: number;
23
+ EtherCat_Master: number;
24
+ EtherCat_Slave: number;
25
+ ProfinetIO_Master: number;
26
+ ProfinetIO_Device: number;
27
+ EthernetIP_Scanner: number;
28
+ EthernetIP_Adapter: number;
29
+ Ethernet: number;
30
+ ModbusTCPServer: number;
31
+ ModbusTCPClient: number;
32
+ ModbusTCPSlaveDevice: number;
33
+ ModbusSerialPort: number;
34
+ ModbusMaster: number;
35
+ ModbusSlave: number;
36
+ ModbusSerial: number;
37
+ OPCUAServer: number;
38
+ EtherCatMaster: number;
39
+ EtherCatSlave: number;
40
+ EtherCatModule: number;
41
+ };
42
+ /**
43
+ * 协议集合
44
+ * @function init 初始化协议集合
45
+ * @function build 编译协议集合
46
+ * @function get 根据ID获取协议
47
+ * @function add 添加协议
48
+ * @function delete 删除协议
49
+ * @function clear 清空协议集合
50
+ */
51
+ declare class ProtocolCollection implements ICollection<ProtocolItem> {
52
+ protected map: Map<number, ProtocolItem>;
53
+ constructor();
54
+ init(data: any[]): void;
55
+ build(deviceId: number): any;
56
+ get(id: number | number[]): ProtocolItem | ProtocolItem[];
57
+ add(data: ProtocolItem): void;
58
+ delete(id: number | number[]): void;
59
+ private clear;
60
+ }
61
+ export { ProtocolType, protocolMap, ProtocolCollection, ProtocolItem };
@@ -1 +1,3 @@
1
+ export * from './collection';
2
+ export * from './protocolItem';
1
3
  export * from './modbus';
@@ -0,0 +1,8 @@
1
+ declare class ConfigParser {
2
+ static getDefaultConfig(data: any): {
3
+ baseInfo: any;
4
+ config: any;
5
+ tab: any;
6
+ };
7
+ }
8
+ export default ConfigParser;
@@ -0,0 +1,122 @@
1
+ declare const _default: {
2
+ "type": "Ethernet",
3
+ "baseInfo": [
4
+ {
5
+ "key": "name",
6
+ "name": {
7
+ "i18nKey": "name"
8
+ },
9
+ "defaultValue": "Ethernet"
10
+ },
11
+ {
12
+ "key": "supplier",
13
+ "name": {
14
+ "i18nKey": "supplier"
15
+ },
16
+ "defaultValue": {
17
+ "i18nKey": "company"
18
+ }
19
+ },
20
+ {
21
+ "key": "version",
22
+ "name": {
23
+ "i18nKey": "verison"
24
+ },
25
+ "defaultValue": "1.0.0.0"
26
+ },
27
+ {
28
+ "key": "description",
29
+ "name": {
30
+ "i18nKey": "description"
31
+ },
32
+ "defaultValue": {
33
+ "i18nKey": "descriptionMap.ethernet"
34
+ }
35
+ },
36
+ {
37
+ "key": "category",
38
+ "name": {
39
+ "i18nKey": "category"
40
+ },
41
+ "defaultValue": {
42
+ "i18nKey": "ethernet"
43
+ }
44
+ }
45
+ ],
46
+ "tab": [
47
+ {
48
+ "name": {
49
+ "i18nKey": "general"
50
+ },
51
+ "key": "general"
52
+ },
53
+ {
54
+ "name": {
55
+ "i18nKey": "ioMapping"
56
+ },
57
+ "key": "ioMapping"
58
+ }
59
+ ],
60
+ "configuration": {
61
+ "general": [
62
+ {
63
+ "key": "netInterface",
64
+ "name": {
65
+ "i18nKey": "netInterface"
66
+ },
67
+ "dataType": "string",
68
+ "componentType": "strInput",
69
+ "defaultValue": ""
70
+ },
71
+ {
72
+ "key": "ipAddress",
73
+ "name": {
74
+ "i18nKey": "ipAddress"
75
+ },
76
+ "dataType": "string",
77
+ "componentType": "ipInput",
78
+ "defaultValue": "192.168.1.1"
79
+ },
80
+ {
81
+ "key": "subnetMask",
82
+ "name": {
83
+ "i18nKey": "subnetMask"
84
+ },
85
+ "dataType": "string",
86
+ "componentType": "ipInput",
87
+ "defaultValue": "255.255.255.0"
88
+ },
89
+ {
90
+ "key": "defaultGateway",
91
+ "name": {
92
+ "i18nKey": "defaultGateway"
93
+ },
94
+ "dataType": "string",
95
+ "componentType": "ipInput",
96
+ "defaultValue": "0.0.0.0"
97
+ },
98
+ {
99
+ "key": "adaptedOSConfiguration",
100
+ "name": {
101
+ "i18nKey": "adaptedOSConfiguration"
102
+ },
103
+ "dataType": "boolean",
104
+ "componentType": "switch",
105
+ "defaultValue": false
106
+ }
107
+ ],
108
+ "ioMapping": [
109
+ {
110
+ "key": "busCycleTask",
111
+ "name": {
112
+ "i18nKey": "busCycleTask"
113
+ },
114
+ "dataType": "string",
115
+ "componentType": "select",
116
+ "defaultValue": "-1"
117
+ }
118
+ ]
119
+ }
120
+ };
121
+
122
+ export default _default;
@@ -1,8 +1,29 @@
1
- import { IModbus } from '../../types/modbus';
2
- declare class Modbus {
3
- options: IModbus;
4
- constructor(options: IModbus);
5
- add(name: string): void;
6
- get(): string;
7
- }
8
- export { Modbus };
1
+ import { ProtocolItem } from '../collection';
2
+ declare class EthernetProtocolItem extends ProtocolItem {
3
+ type: string;
4
+ moduleType: number;
5
+ baseInfo: any;
6
+ config: any;
7
+ tab: any;
8
+ constructor(data: any);
9
+ static fromPlain(data: any): EthernetProtocolItem;
10
+ }
11
+ declare class ModbusTCPServerProtocolItem extends ProtocolItem {
12
+ type: string;
13
+ moduleType: number;
14
+ constructor(data: any);
15
+ static fromPlain(data: any): ModbusTCPServerProtocolItem;
16
+ }
17
+ declare class ModbusTCPClientProtocolItem extends ProtocolItem {
18
+ type: string;
19
+ moduleType: number;
20
+ constructor(data: any);
21
+ static fromPlain(data: any): ModbusTCPClientProtocolItem;
22
+ }
23
+ declare class ModbusTCPSlaveDeviceProtocolItem extends ProtocolItem {
24
+ type: string;
25
+ moduleType: number;
26
+ constructor(data: any);
27
+ static fromPlain(data: any): ModbusTCPSlaveDeviceProtocolItem;
28
+ }
29
+ export { EthernetProtocolItem, ModbusTCPServerProtocolItem, ModbusTCPClientProtocolItem, ModbusTCPSlaveDeviceProtocolItem };
@@ -0,0 +1,10 @@
1
+ declare class ProtocolItem {
2
+ id: number;
3
+ deviceId: number;
4
+ type?: string;
5
+ static registry: Record<string, any>;
6
+ constructor(data: any);
7
+ static register(type: string, ctor: any): void;
8
+ static fromPlain(data: any): ProtocolItem;
9
+ }
10
+ export { ProtocolItem };
@@ -0,0 +1,8 @@
1
+ interface ICollection<T> {
2
+ init(data: any[]): void;
3
+ build(deviceId: number): any;
4
+ get(id: number | number[]): T | T[];
5
+ add(data: any): void;
6
+ delete(id: number | number[]): void;
7
+ }
8
+ export type { ICollection };
@@ -1 +1,2 @@
1
+ export * from './base';
1
2
  export * from './modbus';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lty-protocol",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "main": "dist/lty-protocol.umd.js",
5
5
  "module": "dist/lty-protocol.mjs",
6
6
  "style": "dist/lty-protocol.css",
@@ -12,7 +12,8 @@
12
12
  "vue": "^3.0.0"
13
13
  },
14
14
  "scripts": {
15
- "build": "vite build"
15
+ "build": "vite build",
16
+ "dev": "vite"
16
17
  },
17
18
  "devDependencies": {
18
19
  "@types/node": "^24.10.1",
@@ -22,5 +23,10 @@
22
23
  "vite": "^7.2.4",
23
24
  "vite-plugin-dts": "^4.5.4",
24
25
  "vue-tsc": "^3.1.4"
26
+ },
27
+ "dependencies": {
28
+ "@types/lodash-es": "^4.17.12",
29
+ "lodash-es": "^4.17.23",
30
+ "vue-i18n": "^11.2.8"
25
31
  }
26
32
  }