rinho-serial 0.0.0-stage → 1.0.0

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.
package/rinho.mjs ADDED
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+ // rinho CLI, build fe00d56c1440. Generated from the configurator at config.rinho.com.ar.
3
+ // Usage: node rinho.mjs validate <file.txt | -> [--model zero,spider,smart] [--fw 1.09.28.T50] [--offline]
4
+ // node rinho.mjs explain "<command>" [--model zero]
5
+ // node rinho.mjs zones from-csv|assign|list|build|inspect ... (node rinho.mjs --help)
6
+ // node rinho.mjs ports | query <port> <Q...> | send <port> <config.txt> | run <port> "<cmd>" --confirmed | zones load <port> --url ...
7
+ // (serial needs the serialport driver: the same file ships as the npm package rinho-serial)
8
+ // (c) Rinho Telematics. Free to use for configuring Rinho devices.
9
+ var f0=Object.create;var gu=Object.defineProperty;var m0=Object.getOwnPropertyDescriptor;var h0=Object.getOwnPropertyNames;var g0=Object.getPrototypeOf,v0=Object.prototype.hasOwnProperty;var mt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var b0=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of h0(t))!v0.call(e,n)&&n!==r&&gu(e,n,{get:()=>t[n],enumerable:!(a=m0(t,n))||a.enumerable});return e};var be=(e,t,r)=>(r=e!=null?f0(g0(e)):{},b0(t||!e||!e.__esModule?gu(r,"default",{value:e,enumerable:!0}):r,e));var nr=O(me=>{"use strict";function S0(e,t,r){if(r===void 0&&(r=Array.prototype),e&&typeof r.find=="function")return r.find.call(e,t);for(var a=0;a<e.length;a++)if(ar(e,a)){var n=e[a];if(t.call(void 0,n,a,e))return n}}function Or(e,t){return t===void 0&&(t=Object),t&&typeof t.getOwnPropertyDescriptors=="function"&&(e=t.create(null,t.getOwnPropertyDescriptors(e))),t&&typeof t.freeze=="function"?t.freeze(e):e}function ar(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function C0(e,t){if(e===null||typeof e!="object")throw new TypeError("target is not an object");for(var r in t)ar(t,r)&&(e[r]=t[r]);return e}var vu=Or({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function x0(e){return ar(vu,e.toLowerCase())}var bu=Or({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function y0(e){return ar(bu,e.toLowerCase())}var Ua=Or({script:!1,style:!1,textarea:!0,title:!0});function w0(e){var t=e.toLowerCase();return ar(Ua,t)&&!Ua[t]}function A0(e){var t=e.toLowerCase();return ar(Ua,t)&&Ua[t]}function Su(e){return e===$a.HTML}function E0(e){return Su(e)||e===$a.XML_XHTML_APPLICATION}var $a=Or({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),D0=Object.keys($a).map(function(e){return $a[e]});function T0(e){return D0.indexOf(e)>-1}var R0=Or({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});me.assign=C0;me.find=S0;me.freeze=Or;me.HTML_BOOLEAN_ATTRIBUTES=vu;me.HTML_RAW_TEXT_ELEMENTS=Ua;me.HTML_VOID_ELEMENTS=bu;me.hasDefaultHTMLNamespace=E0;me.hasOwn=ar;me.isHTMLBooleanAttribute=x0;me.isHTMLRawTextElement=w0;me.isHTMLEscapableRawTextElement=A0;me.isHTMLMimeType=Su;me.isHTMLVoidElement=y0;me.isValidMimeType=T0;me.MIME_TYPE=$a;me.NAMESPACE=R0});var za=O(qa=>{"use strict";var _0=nr();function xu(e,t){e.prototype=Object.create(Error.prototype,{constructor:{value:e},name:{value:e.name,enumerable:!0,writable:t}})}var Va=_0.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),yu=Object.keys(Va);function wu(e){return typeof e=="number"&&e>=1&&e<=25}function I0(e){return typeof e=="string"&&e.substring(e.length-Va.Error.length)===Va.Error}function Ga(e,t){wu(e)?(this.name=yu[e],this.message=t||""):(this.message=e,this.name=I0(t)?t:Va.Error),Error.captureStackTrace&&Error.captureStackTrace(this,Ga)}xu(Ga,!0);Object.defineProperties(Ga.prototype,{code:{enumerable:!0,get:function(){var e=yu.indexOf(this.name);return wu(e)?e:0}}});var Au={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},ds=Object.entries(Au);for(Wa=0;Wa<ds.length;Wa++)Cu=ds[Wa][0],Ga[Cu]=ds[Wa][1];var Cu,Wa;function ps(e,t,r){this.message=e,this.locator=t,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,ps)}xu(ps);qa.DOMException=Ga;qa.DOMExceptionName=Va;qa.ExceptionCode=Au;qa.ParseError=ps});var Ss=O(U=>{"use strict";function Iu(e){try{typeof e!="function"&&(e=RegExp);var t=new e("\u{1D306}","u").exec("\u{1D306}");return!!t&&t[0].length===2}catch{}return!1}var Mr=Iu();function Mt(e){if(e.source[0]!=="[")throw new Error(e+" can not be used with chars");return e.source.slice(1,e.source.lastIndexOf("]"))}function Pr(e,t){if(e.source[0]!=="[")throw new Error("/"+e.source+"/ can not be used with chars_without");if(!t||typeof t!="string")throw new Error(JSON.stringify(t)+" is not a valid search");if(e.source.indexOf(t)===-1)throw new Error('"'+t+'" is not is /'+e.source+"/");if(t==="-"&&e.source.indexOf(t)!==1)throw new Error('"'+t+'" is not at the first postion of /'+e.source+"/");return new RegExp(e.source.replace(t,""),Mr?"u":"")}function W(e){var t=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(r){var a=typeof r=="string";if(a&&t===void 0&&r==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return a?r:r.source}).join(""),Mr?"u":"")}function M(e){if(arguments.length===0)throw new Error("no parameters provided");return W.apply(M,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var N0="\uFFFD",Bt=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Mr&&(Bt=W("[",Mt(Bt),"\\u{10000}-\\u{10FFFF}","]"));var O0=new RegExp("[^"+Mt(Bt)+"]",Mr?"u":""),io=/[\x20\x09\x0D\x0A]/,P0=Mt(io),K=W(io,"+"),J=W(io,"*"),Xa=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Mr&&(Xa=W("[",Mt(Xa),"\\u{10000}-\\u{10FFFF}","]"));var k0=Mt(Xa),hs=W("[",k0,Mt(/[-.0-9\xB7]/),Mt(/[\u0300-\u036F\u203F-\u2040]/),"]"),Me=W(Xa,hs,"*"),M0=W("^",Me,"$"),Eu=W(hs,"+"),B0=W("&",Me,";"),L0=M(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),Ha=M(B0,"|",L0),ja=W("%",Me,";"),gs=M(W('"',M(/[^%&"]/,"|",ja,"|",Ha),"*",'"'),"|",W("'",M(/[^%&']/,"|",ja,"|",Ha),"*","'")),F0=M('"',M(/[^<&"]/,"|",Ha),"*",'"',"|","'",M(/[^<&']/,"|",Ha),"*","'"),U0=Pr(Xa,":"),$0=Pr(hs,":"),fs=W(U0,$0,"*"),W0=W("^",fs,"$"),Ka=W(fs,M(":",fs),"?"),V0=W("^",Ka,"$"),G0=W("(",Ka,")"),kr=M(/"[^"]*"|'[^']*'/),q0=W(/^<\?/,"(",Me,")",M(K,"(?!",io,")(",Bt,"*?)"),"?",/\?>/),Du=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,Za=M('"',Du,'*"',"|","'",Pr(Du,"'"),"*'"),Nu="<!--",Ou="-->",z0=W(Nu,M(Pr(Bt,"-"),"|",W("-",Pr(Bt,"-"))),"*",Ou),Tu="#PCDATA",X0=M(W(/\(/,J,Tu,M(J,/\|/,J,Ka),"*",J,/\)\*/),"|",W(/\(/,J,Tu,J,/\)/)),H0=/[?*+]?/,j0=W(/\([^>]+\)/,H0),K0=M("EMPTY","|","ANY","|",X0,"|",j0),Z0="<!ELEMENT",Q0=W(Z0,K,M(Ka,"|",ja),K,M(K0,"|",ja),J,">"),Y0=W("NOTATION",K,/\(/,J,Me,M(J,/\|/,J,Me),"*",J,/\)/),J0=W(/\(/,J,Eu,M(J,/\|/,J,Eu),"*",J,/\)/),eb=M(Y0,"|",J0),tb=M(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",eb),rb=M(/#REQUIRED|#IMPLIED/,"|",M(M("#FIXED",K),"?",F0)),ab=M(K,Me,K,tb,K,rb),nb="<!ATTLIST",ob=W(nb,K,Me,ab,"*",J,">"),ms="about:legacy-compat",ib=M('"'+ms+'"',"|","'"+ms+"'"),vs="SYSTEM",so="PUBLIC",lo=M(M(vs,K,kr),"|",M(so,K,Za,K,kr)),sb=W("^",M(M(vs,K,"(?<SystemLiteralOnly>",kr,")"),"|",M(so,K,"(?<PubidLiteral>",Za,")",K,"(?<SystemLiteral>",kr,")"))),lb=W("^",Za,"$"),cb=W("^",kr,"$"),ub=M(K,"NDATA",K,Me),db=M(gs,"|",M(lo,ub,"?")),Pu="<!ENTITY",pb=W(Pu,K,Me,K,db,J,">"),fb=M(gs,"|",lo),mb=W(Pu,K,"%",K,Me,K,fb,J,">"),hb=M(pb,"|",mb),gb=W(so,K,Za),vb=W("<!NOTATION",K,Me,K,M(lo,"|",gb),J,">"),bs=W(J,"=",J),Ru=/1[.]\d+/,bb=W(K,"version",bs,M("'",Ru,"'","|",'"',Ru,'"')),_u=/[A-Za-z][-A-Za-z0-9._]*/,Sb=M(K,"encoding",bs,M('"',_u,'"',"|","'",_u,"'")),Cb=M(K,"standalone",bs,M("'",M("yes","|","no"),"'","|",'"',M("yes","|","no"),'"')),xb=W(/^<\?xml/,bb,Sb,"?",Cb,"?",J,/\?>/),yb="<!DOCTYPE",wb="<![CDATA[",Ab="]]>",Eb=/<!\[CDATA\[/,Db=/\]\]>/,Tb=W(Bt,"*?",Db),Rb=W(Eb,Tb);U.chars=Mt;U.chars_without=Pr;U.detectUnicodeSupport=Iu;U.reg=W;U.regg=M;U.ABOUT_LEGACY_COMPAT=ms;U.ABOUT_LEGACY_COMPAT_SystemLiteral=ib;U.AttlistDecl=ob;U.CDATA_START=wb;U.CDATA_END=Ab;U.CDSect=Rb;U.Char=Bt;U.Comment=z0;U.COMMENT_START=Nu;U.COMMENT_END=Ou;U.DOCTYPE_DECL_START=yb;U.elementdecl=Q0;U.EntityDecl=hb;U.EntityValue=gs;U.ExternalID=lo;U.ExternalID_match=sb;U.Name=Me;U.Name_exact=M0;U.NCName_exact=W0;U.NotationDecl=vb;U.Reference=Ha;U.PEReference=ja;U.PI=q0;U.PUBLIC=so;U.PubidLiteral=Za;U.PubidLiteral_match=lb;U.QName=Ka;U.QName_exact=V0;U.QName_group=G0;U.S=K;U.SChar_s=P0;U.S_OPT=J;U.SYSTEM=vs;U.SystemLiteral=kr;U.SystemLiteral_match=cb;U.InvalidChar=O0;U.UNICODE_REPLACEMENT_CHARACTER=N0;U.UNICODE_SUPPORT=Mr;U.XMLDecl=xb});var _s=O(ne=>{"use strict";var Ve=nr(),rt=Ve.find,_b=Ve.hasDefaultHTMLNamespace,Lr=Ve.hasOwn,Ib=Ve.isHTMLMimeType,Nb=Ve.isHTMLRawTextElement,Ob=Ve.isHTMLVoidElement,Qa=Ve.MIME_TYPE,at=Ve.NAMESPACE,we=Symbol(),$u=za(),P=$u.DOMException,Se=$u.DOMExceptionName,ae=Ss();function Re(e){if(e!==we)throw new TypeError("Illegal constructor")}function Pb(e){return e!==""}function kb(e){return e?e.split(/[\t\n\f\r ]+/).filter(Pb):[]}function Mb(e,t){return Lr(e,t)||(e[t]=!0),e}function ku(e){if(!e)return[];var t=kb(e);return Object.keys(t.reduce(Mb,{}))}function Bb(e){return function(t){return e&&e.indexOf(t)!==-1}}function Wu(e){if(!ae.QName_exact.test(e))throw new P(P.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+e+'"')}function xs(e,t){Wu(t),e=e||null;var r=null,a=t;if(t.indexOf(":")>=0){var n=t.split(":");r=n[0],a=n[1]}if(r!==null&&e===null)throw new P(P.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&e!==Ve.NAMESPACE.XML)throw new P(P.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||t==="xmlns")&&e!==Ve.NAMESPACE.XMLNS)throw new P(P.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(e===Ve.NAMESPACE.XMLNS&&r!=="xmlns"&&t!=="xmlns")throw new P(P.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[e,r,a]}function $r(e,t){for(var r in e)Lr(e,r)&&(t[r]=e[r])}function _e(e,t){var r=e.prototype;if(!(r instanceof t)){let a=function(){};a.prototype=t.prototype,a=new a,$r(r,a),e.prototype=r=a}r.constructor!=e&&(typeof e!="function"&&console.error("unknown Class:"+e),r.constructor=e)}var Ie={},We=Ie.ELEMENT_NODE=1,Fr=Ie.ATTRIBUTE_NODE=2,Ya=Ie.TEXT_NODE=3,Vu=Ie.CDATA_SECTION_NODE=4,Gu=Ie.ENTITY_REFERENCE_NODE=5,Lb=Ie.ENTITY_NODE=6,ys=Ie.PROCESSING_INSTRUCTION_NODE=7,ws=Ie.COMMENT_NODE=8,Br=Ie.DOCUMENT_NODE=9,qu=Ie.DOCUMENT_TYPE_NODE=10,Lt=Ie.DOCUMENT_FRAGMENT_NODE=11,Fb=Ie.NOTATION_NODE=12,re=Ve.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function zu(e,t){if(t.length<e.length)return zu(t,e);var r=null;for(var a in e){if(e[a]!==t[a])return r;r=e[a]}return r}function Mu(e){return e.guid||(e.guid=Math.random()),e.guid}function ue(){}ue.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e){var t;typeof e=="function"?t={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e?t={requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==!1,nodeFilter:e.nodeFilter||null}:t={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var r=[],a=0;a<this.length;a++)Rs(this[a],r,null,t);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}};ue.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function tt(e,t){this._node=e,this._refresh=t,fo(this)}function fo(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(rd(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var a=r.length;a in e;a++)Lr(e,a)&&delete e[a];$r(r,e),e._inc=t}}tt.prototype.item=function(e){return fo(this),this[e]||null};_e(tt,ue);function Ur(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function Xu(e,t){for(var r=0;r<e.length;){if(e[r]===t)return r;r++}}function As(e,t,r){if(!t)return e._noNsIndex;var a=e._nsIndex[t];return!a&&r&&(a=e._nsIndex[t]=Object.create(null)),a}function Ub(e,t,r){var a=As(e,t,!1),n=a&&a[r];return n||null}function $b(e,t){As(e,t.namespaceURI,!0)[t.localName]=t}function Wb(e,t){var r=As(e,t.namespaceURI,!1);r&&delete r[t.localName]}function Vb(e,t,r,a){if(a?t[Xu(t,a)]=r:(t[t.length]=r,t.length++),$b(t,r),e){r.ownerElement=e;var n=e.ownerDocument;n&&(a&&Ku(n,e,a),Gb(n,e,r))}}function Bu(e,t,r){var a=Xu(t,r);if(a>=0){for(var n=t.length-1;a<=n;)t[a]=t[++a];if(t.length=n,Wb(t,r),e){var o=e.ownerDocument;o&&Ku(o,e,r),r.ownerElement=null}}}Ur.prototype={length:0,item:ue.prototype.item,getNamedItem:function(e){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());for(var t=0;t<this.length;){var r=this[t];if(r.nodeName===e)return r;t++}return null},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!==this._ownerElement)throw new P(P.INUSE_ATTRIBUTE_ERR);var r=Ub(this,e.namespaceURI,e.localName);return r===e?e:(Vb(this._ownerElement,this,e,r),r)},setNamedItemNS:function(e){return this.setNamedItem(e)},removeNamedItem:function(e){var t=this.getNamedItem(e);if(!t)throw new P(P.NOT_FOUND_ERR,e);return Bu(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);if(!r)throw new P(P.NOT_FOUND_ERR,e?e+" : "+t:t);return Bu(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){e||(e=null);for(var r=0;r<this.length;){var a=this[r];if(a.localName===t&&a.namespaceURI===e)return a;r++}return null}};Ur.prototype[Symbol.iterator]=function(){var e=this,t=0;return{next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Hu(){}Hu.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var a=Qa.XML_APPLICATION;e===at.HTML?a=Qa.XML_XHTML_APPLICATION:e===at.SVG&&(a=Qa.XML_SVG_IMAGE);var n=new gt(we,{contentType:a});if(n.implementation=this,n.childNodes=new ue,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r,a){Wu(e);var n=new go(we);return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n.internalSubset=a||"",n.childNodes=new ue,n},createHTMLDocument:function(e){var t=new gt(we,{contentType:Qa.HTML});if(t.implementation=this,t.childNodes=new ue,e!==!1){t.doctype=this.createDocumentType("html"),t.doctype.ownerDocument=t,t.appendChild(t.doctype);var r=t.createElement("html");t.appendChild(r);var a=t.createElement("head");if(r.appendChild(a),typeof e=="string"){var n=t.createElement("title");n.appendChild(t.createTextNode(e)),a.appendChild(n)}r.appendChild(t.createElement("body"))}return t}};function z(e){Re(e)}z.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var e=this.getRootNode();return e&&e.nodeType===e.DOCUMENT_NODE},contains:function(e){if(!e)return!1;var t=e;do{if(this===t)return!0;t=t.parentNode}while(t);return!1},getRootNode:function(e){var t=this;do{if(!t.parentNode)return t;t=t.parentNode}while(t)},isEqualNode:function(e){if(!e)return!1;for(var t=[{node:this,other:e}];t.length>0;){var r=t.pop(),a=r.node,n=r.other;if(a.nodeType!==n.nodeType)return!1;switch(a.nodeType){case a.DOCUMENT_TYPE_NODE:if(a.name!==n.name||a.publicId!==n.publicId||a.systemId!==n.systemId)return!1;break;case a.ELEMENT_NODE:if(a.namespaceURI!==n.namespaceURI||a.prefix!==n.prefix||a.localName!==n.localName||a.attributes.length!==n.attributes.length)return!1;for(var o=0;o<a.attributes.length;o++){var i=a.attributes.item(o),s=n.getAttributeNodeNS(i.namespaceURI,i.localName);if(!s)return!1;t.push({node:i,other:s})}break;case a.ATTRIBUTE_NODE:if(a.namespaceURI!==n.namespaceURI||a.localName!==n.localName||a.value!==n.value)return!1;break;case a.PROCESSING_INSTRUCTION_NODE:if(a.target!==n.target||a.data!==n.data)return!1;break;case a.TEXT_NODE:case a.CDATA_SECTION_NODE:case a.COMMENT_NODE:if(a.data!==n.data)return!1;break}if(a.childNodes.length!==n.childNodes.length)return!1;for(var o=a.childNodes.length-1;o>=0;o--)t.push({node:a.childNodes[o],other:n.childNodes[o]})}return!0},isSameNode:function(e){return this===e},insertBefore:function(e,t){return po(this,e,t)},replaceChild:function(e,t){po(this,e,t,Yu),t&&this.removeChild(t)},removeChild:function(e){return Zu(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(e){return td(this.ownerDocument||this,this,e)},normalize:function(){he(this,null,{enter:function(e){for(var t=e.firstChild;t;){var r=t.nextSibling;if(r!==null&&r.nodeType===Ya&&t.nodeType===Ya){for(var a=[],n=r;n!==null&&n.nodeType===Ya;)a.push(n.data),n=n.nextSibling;for(var o=t.nextSibling;o!==n;){var i=o.nextSibling;o.parentNode=null,o.previousSibling=null,o.nextSibling=null,o=i}t.nextSibling=n,n!==null?n.previousSibling=t:e.lastChild=t,t.appendData(a.join("")),Es(e.ownerDocument,e),t=n}else t=r}return!0}})},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r){for(var a in r)if(Lr(r,a)&&r[a]===e)return a}t=t.nodeType==Fr?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Lr(r,e))return r[e];t=t.nodeType==Fr?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return t==null},compareDocumentPosition:function(e){if(this===e)return 0;var t=e,r=this,a=null,n=null;if(t instanceof or&&(a=t,t=a.ownerElement),r instanceof or&&(n=r,r=n.ownerElement,a&&t&&r===t))for(var o=0,i;i=r.attributes[o];o++){if(i===a)return re.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+re.DOCUMENT_POSITION_PRECEDING;if(i===n)return re.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+re.DOCUMENT_POSITION_FOLLOWING}if(!t||!r||r.ownerDocument!==t.ownerDocument)return re.DOCUMENT_POSITION_DISCONNECTED+re.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(Mu(r.ownerDocument)>Mu(t.ownerDocument)?re.DOCUMENT_POSITION_FOLLOWING:re.DOCUMENT_POSITION_PRECEDING);if(n&&t===r)return re.DOCUMENT_POSITION_CONTAINS+re.DOCUMENT_POSITION_PRECEDING;if(a&&t===r)return re.DOCUMENT_POSITION_CONTAINED_BY+re.DOCUMENT_POSITION_FOLLOWING;for(var s=[],l=t.parentNode;l;){if(!n&&l===r)return re.DOCUMENT_POSITION_CONTAINED_BY+re.DOCUMENT_POSITION_FOLLOWING;s.push(l),l=l.parentNode}s.reverse();for(var c=[],u=r.parentNode;u;){if(!a&&u===t)return re.DOCUMENT_POSITION_CONTAINS+re.DOCUMENT_POSITION_PRECEDING;c.push(u),u=u.parentNode}c.reverse();var p=zu(s,c);for(var f in p.childNodes){var h=p.childNodes[f];if(h===r)return re.DOCUMENT_POSITION_FOLLOWING;if(h===t)return re.DOCUMENT_POSITION_PRECEDING;if(c.indexOf(h)>=0)return re.DOCUMENT_POSITION_FOLLOWING;if(s.indexOf(h)>=0)return re.DOCUMENT_POSITION_PRECEDING}return 0}};function ju(e){return e=="<"&&"&lt;"||e==">"&&"&gt;"||e=="&"&&"&amp;"||e=='"'&&"&quot;"||"&#"+e.charCodeAt()+";"}$r(Ie,z);$r(Ie,z.prototype);$r(re,z);$r(re,z.prototype);function uo(e,t){he(e,null,{enter:function(r){return t(r)?he.STOP:!0}})}function he(e,t,r){for(var a=[{node:e,context:t,phase:he.ENTER}];a.length>0;){var n=a.pop();if(n.phase===he.ENTER){var o=r.enter(n.node,n.context);if(o===he.STOP)return he.STOP;if(a.push({node:n.node,context:o,phase:he.EXIT}),o==null)continue;for(var i=n.node.lastChild;i;)a.push({node:i,context:o,phase:he.ENTER}),i=i.previousSibling}else r.exit&&r.exit(n.node,n.context)}}he.STOP=Symbol("walkDOM.STOP");he.ENTER=0;he.EXIT=1;function gt(e,t){Re(e);var r=t||{};this.ownerDocument=this,this.contentType=r.contentType||Qa.XML_APPLICATION,this.type=Ib(this.contentType)?"html":"xml"}function Gb(e,t,r){e&&e._inc++;var a=r.namespaceURI;a===at.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}function Ku(e,t,r,a){e&&e._inc++;var n=r.namespaceURI;n===at.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function Es(e,t,r){if(e&&e._inc){e._inc++;var a=t.childNodes;if(r&&!r.nextSibling)a[a.length++]=r;else{for(var n=t.firstChild,o=0;n;)a[o++]=n,n=n.nextSibling;a.length=o,delete a[a.length]}}}function Zu(e,t){if(e!==t.parentNode)throw new P(P.NOT_FOUND_ERR,"child's parent is not parent");var r=t.previousSibling,a=t.nextSibling;return r?r.nextSibling=a:e.firstChild=a,a?a.previousSibling=r:e.lastChild=r,Es(e.ownerDocument,e),t.parentNode=null,t.previousSibling=null,t.nextSibling=null,t}function qb(e){return e&&(e.nodeType===z.DOCUMENT_NODE||e.nodeType===z.DOCUMENT_FRAGMENT_NODE||e.nodeType===z.ELEMENT_NODE)}function zb(e){return e&&(e.nodeType===z.CDATA_SECTION_NODE||e.nodeType===z.COMMENT_NODE||e.nodeType===z.DOCUMENT_FRAGMENT_NODE||e.nodeType===z.DOCUMENT_TYPE_NODE||e.nodeType===z.ELEMENT_NODE||e.nodeType===z.PROCESSING_INSTRUCTION_NODE||e.nodeType===z.TEXT_NODE)}function Ft(e){return e&&e.nodeType===z.DOCUMENT_TYPE_NODE}function ht(e){return e&&e.nodeType===z.ELEMENT_NODE}function Qu(e){return e&&e.nodeType===z.TEXT_NODE}function Lu(e,t){var r=e.childNodes||[];if(rt(r,ht)||Ft(t))return!1;var a=rt(r,Ft);return!(t&&a&&r.indexOf(a)>r.indexOf(t))}function Fu(e,t){var r=e.childNodes||[];function a(o){return ht(o)&&o!==t}if(rt(r,a))return!1;var n=rt(r,Ft);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function Xb(e,t,r){if(!qb(e))throw new P(P.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new P(P.NOT_FOUND_ERR,"child not in parent");if(!zb(t)||Ft(t)&&e.nodeType!==z.DOCUMENT_NODE)throw new P(P.HIERARCHY_REQUEST_ERR,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Hb(e,t,r){var a=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===z.DOCUMENT_FRAGMENT_NODE){var o=n.filter(ht);if(o.length>1||rt(n,Qu))throw new P(P.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(o.length===1&&!Lu(e,r))throw new P(P.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ht(t)&&!Lu(e,r))throw new P(P.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Ft(t)){if(rt(a,Ft))throw new P(P.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=rt(a,ht);if(r&&a.indexOf(i)<a.indexOf(r))throw new P(P.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&i)throw new P(P.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Yu(e,t,r){var a=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===z.DOCUMENT_FRAGMENT_NODE){var o=n.filter(ht);if(o.length>1||rt(n,Qu))throw new P(P.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(o.length===1&&!Fu(e,r))throw new P(P.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(ht(t)&&!Fu(e,r))throw new P(P.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(Ft(t)){if(rt(a,function(l){return Ft(l)&&l!==r}))throw new P(P.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=rt(a,ht);if(r&&a.indexOf(i)<a.indexOf(r))throw new P(P.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function po(e,t,r,a){Xb(e,t,r),e.nodeType===z.DOCUMENT_NODE&&(a||Hb)(e,t,r);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Lt){var o=t.firstChild;if(o==null)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,r==null?e.lastChild=i:r.previousSibling=i;do o.parentNode=e;while(o!==i&&(o=o.nextSibling));return Es(e.ownerDocument||e,e,t),t.nodeType==Lt&&(t.firstChild=t.lastChild=null),t}gt.prototype={implementation:null,nodeName:"#document",nodeType:Br,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType===Lt){for(var r=e.firstChild;r;){var a=r.nextSibling;this.insertBefore(r,t),r=a}return e}return po(this,e,t),e.ownerDocument=this,this.documentElement===null&&e.nodeType===We&&(this.documentElement=e),e},removeChild:function(e){var t=Zu(this,e);return t===this.documentElement&&(this.documentElement=null),t},replaceChild:function(e,t){po(this,e,t,Yu),e.ownerDocument=this,t&&this.removeChild(t),ht(e)&&(this.documentElement=e)},importNode:function(e,t){return jb(this,e,t)},getElementById:function(e){var t=null;return uo(this.documentElement,function(r){if(r.nodeType==We&&r.getAttribute("id")==e)return t=r,!0}),t},createElement:function(e){var t=new vt(we);t.ownerDocument=this,this.type==="html"&&(e=e.toLowerCase()),_b(this.contentType)&&(t.namespaceURI=at.HTML),t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new ue;var r=t.attributes=new Ur;return r._ownerElement=t,t},createDocumentFragment:function(){var e=new Wr(we);return e.ownerDocument=this,e.childNodes=new ue,e},createTextNode:function(e){var t=new Ja(we);return t.ownerDocument=this,t.childNodes=new ue,t.appendData(e),t},createComment:function(e){var t=new mo(we);return t.ownerDocument=this,t.childNodes=new ue,t.appendData(e),t},createCDATASection:function(e){if(e.indexOf("]]>")!==-1)throw new P(P.INVALID_CHARACTER_ERR,'data contains "]]>"');var t=new ho(we);return t.ownerDocument=this,t.childNodes=new ue,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new bo(we);return r.ownerDocument=this,r.childNodes=new ue,r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){if(!ae.QName_exact.test(e))throw new P(P.INVALID_CHARACTER_ERR,'invalid character in name "'+e+'"');return this.type==="html"&&(e=e.toLowerCase()),this._createAttribute(e)},_createAttribute:function(e){var t=new or(we);return t.ownerDocument=this,t.childNodes=new ue,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!ae.Name_exact.test(e))throw new P(P.INVALID_CHARACTER_ERR,'not a valid xml name "'+e+'"');if(this.type==="html")throw new P("document is an html document",Se.NotSupportedError);var t=new vo(we);return t.ownerDocument=this,t.childNodes=new ue,t.nodeName=e,t},createElementNS:function(e,t){var r=xs(e,t),a=new vt(we),n=a.attributes=new Ur;return a.childNodes=new ue,a.ownerDocument=this,a.nodeName=t,a.tagName=t,a.namespaceURI=r[0],a.prefix=r[1],a.localName=r[2],n._ownerElement=a,a},createAttributeNS:function(e,t){var r=xs(e,t),a=new or(we);return a.ownerDocument=this,a.childNodes=new ue,a.nodeName=t,a.name=t,a.specified=!0,a.namespaceURI=r[0],a.prefix=r[1],a.localName=r[2],a}};_e(gt,z);function vt(e){Re(e),this._nsMap=Object.create(null)}vt.prototype={nodeType:We,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===at.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(e){return!!this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t?t.value:null},getAttributeNode:function(e){return this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase()),this.attributes.getNamedItem(e)},setAttribute:function(e,t){this._isInHTMLDocumentAndNamespace()&&(e=e.toLowerCase());var r=this.getAttributeNode(e);r?r.value=r.nodeValue=""+t:(r=this.ownerDocument._createAttribute(e),r.value=r.nodeValue=""+t,this.setAttributeNode(r))},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r?r.value:null},setAttributeNS:function(e,t,r){var a=xs(e,t),n=a[2],o=this.getAttributeNodeNS(e,n);o?o.value=o.nodeValue=""+r:(o=this.ownerDocument.createAttributeNS(e,t),o.value=o.nodeValue=""+r,this.setAttributeNode(o))},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByClassName:function(e){var t=ku(e);return new tt(this,function(r){var a=[];return t.length>0&&uo(r,function(n){if(n!==r&&n.nodeType===We){var o=n.getAttribute("class");if(o){var i=e===o;if(!i){var s=ku(o);i=t.every(Bb(s))}i&&a.push(n)}}}),a})},getElementsByTagName:function(e){var t=(this.nodeType===Br?this:this.ownerDocument).type==="html",r=e.toLowerCase();return new tt(this,function(a){var n=[];return uo(a,function(o){if(!(o===a||o.nodeType!==We))if(e==="*")n.push(o);else{var i=o.getQualifiedName(),s=t&&o.namespaceURI===at.HTML?r:e;i===s&&n.push(o)}}),n})},getElementsByTagNameNS:function(e,t){return new tt(this,function(r){var a=[];return uo(r,function(n){n!==r&&n.nodeType===We&&(e==="*"||n.namespaceURI===e)&&(t==="*"||n.localName==t)&&a.push(n)}),a})}};gt.prototype.getElementsByClassName=vt.prototype.getElementsByClassName;gt.prototype.getElementsByTagName=vt.prototype.getElementsByTagName;gt.prototype.getElementsByTagNameNS=vt.prototype.getElementsByTagNameNS;_e(vt,z);function or(e){Re(e),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}or.prototype.nodeType=Fr;_e(or,z);function Ut(e){Re(e)}Ut.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){var a=this.data.substring(0,e),n=this.data.substring(e+t);r=a+r+n,this.nodeValue=this.data=r,this.length=r.length}};_e(Ut,z);function Ja(e){Re(e)}Ja.prototype={nodeName:"#text",nodeType:Ya,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var a=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling),a}};_e(Ja,Ut);function mo(e){Re(e)}mo.prototype={nodeName:"#comment",nodeType:ws};_e(mo,Ut);function ho(e){Re(e)}ho.prototype={nodeName:"#cdata-section",nodeType:Vu};_e(ho,Ja);function go(e){Re(e)}go.prototype.nodeType=qu;_e(go,z);function Ds(e){Re(e)}Ds.prototype.nodeType=Fb;_e(Ds,z);function Ts(e){Re(e)}Ts.prototype.nodeType=Lb;_e(Ts,z);function vo(e){Re(e)}vo.prototype.nodeType=Gu;_e(vo,z);function Wr(e){Re(e)}Wr.prototype.nodeName="#document-fragment";Wr.prototype.nodeType=Lt;_e(Wr,z);function bo(e){Re(e)}bo.prototype.nodeType=ys;_e(bo,Ut);function Ju(){}Ju.prototype.serializeToString=function(e,t){return ed.call(e,t)};z.prototype.toString=ed;function ed(e){var t;typeof e=="function"?t={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:e}:e!=null?t={requireWellFormed:!!e.requireWellFormed,splitCDATASections:e.splitCDATASections!==!1,nodeFilter:e.nodeFilter||null}:t={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var r=[],a=this.nodeType===Br&&this.documentElement||this,n=a.prefix,o=a.namespaceURI;if(o&&n==null){var n=a.lookupPrefix(o);if(n==null)var i=[{namespace:o,prefix:null}]}return Rs(this,r,i,t),r.join("")}function Uu(e,t,r){var a=e.prefix||"",n=e.namespaceURI;if(!n||a==="xml"&&n===at.XML||n===at.XMLNS)return!1;for(var o=r.length;o--;){var i=r[o];if(i.prefix===a)return i.namespace!==n}return!0}function co(e,t,r,a){if(a&&!ae.QName_exact.test(t))throw new P('The attribute name "'+t+'" is not a valid XML QName',Se.InvalidStateError);e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,ju),'"')}function Rs(e,t,r,a){r||(r=[]);var n=a.nodeFilter,o=a.requireWellFormed,i=a.splitCDATASections,s=e.nodeType===Br?e:e.ownerDocument,l=s.type==="html";he(e,{ns:r},{enter:function(c,u){var p=u.ns;if(n)if(c=n(c),c){if(typeof c=="string")return t.push(c),null}else return null;switch(c.nodeType){case We:var f=c.attributes,h=f.length,v=c.tagName,b=v;if(!l&&!c.prefix&&c.namespaceURI){for(var x,C=0;C<f.length;C++)if(f.item(C).name==="xmlns"){x=f.item(C).value;break}if(!x)for(var d=p.length-1;d>=0;d--){var m=p[d];if(m.prefix===""&&m.namespace===c.namespaceURI){x=m.namespace;break}}if(x!==c.namespaceURI)for(var d=p.length-1;d>=0;d--){var m=p[d];if(m.namespace===c.namespaceURI){m.prefix&&(b=m.prefix+":"+v);break}}}if(o&&!ae.QName_exact.test(b))throw new P('The element name "'+b+'" is not a valid XML QName',Se.InvalidStateError);t.push("<",b);for(var w=p.slice(),A=0;A<h;A++){var R=f.item(A);R.prefix=="xmlns"?w.push({prefix:R.localName,namespace:R.value}):R.nodeName=="xmlns"&&w.push({prefix:"",namespace:R.value})}for(var A=0;A<h;A++){var R=f.item(A);if(Uu(R,l,w)){var I=R.prefix||"",D=R.namespaceURI;co(t,I?"xmlns:"+I:"xmlns",D,o),w.push({prefix:I,namespace:D})}var T=n?n(R):R;T&&(typeof T=="string"?t.push(T):co(t,T.name,T.value,o))}if(v===b&&Uu(c,l,w)){var y=c.prefix||"",D=c.namespaceURI;co(t,y?"xmlns:"+y:"xmlns",D,o),w.push({prefix:y,namespace:D})}var g=!c.firstChild;if(g&&(l||c.namespaceURI===at.HTML)&&(g=Ob(v)),g)return t.push("/>"),null;if(t.push(">"),l&&Nb(v)){for(var E=c.firstChild;E;)E.data?t.push(E.data):Rs(E,t,w.slice(),a),E=E.nextSibling;return t.push("</",b,">"),null}return{ns:w,tag:b};case Br:case Lt:if(o&&c.nodeType===Br&&c.documentElement==null)throw new P("The Document has no documentElement",Se.InvalidStateError);return{ns:p};case Fr:return co(t,c.name,c.value,o),null;case Ya:if(o&&ae.InvalidChar.test(c.data))throw new P("The Text node data contains characters outside the XML Char production",Se.InvalidStateError);return t.push(c.data.replace(/[<&>]/g,ju)),null;case Vu:if(o&&c.data.indexOf("]]>")!==-1)throw new P('The CDATASection data contains "]]>"',Se.InvalidStateError);return i?t.push(ae.CDATA_START,c.data.replace(/]]>/g,"]]]]><![CDATA[>"),ae.CDATA_END):t.push(ae.CDATA_START,c.data,ae.CDATA_END),null;case ws:if(o){if(ae.InvalidChar.test(c.data))throw new P("The comment node data contains characters outside the XML Char production",Se.InvalidStateError);if(c.data.indexOf("--")!==-1||c.data[c.data.length-1]==="-")throw new P('The comment node data contains "--" or ends with "-"',Se.InvalidStateError)}return t.push(ae.COMMENT_START,c.data,ae.COMMENT_END),null;case qu:var _=c.publicId,N=c.systemId;if(o){if(!ae.Name_exact.test(c.name))throw new P('The doctype name "'+c.name+'" is not a valid XML Name',Se.InvalidStateError);if(_&&!ae.PubidLiteral_match.test(_))throw new P("DocumentType publicId is not a valid PubidLiteral",Se.InvalidStateError);if(N&&N!=="."&&!ae.SystemLiteral_match.test(N))throw new P("DocumentType systemId is not a valid SystemLiteral",Se.InvalidStateError);if(c.internalSubset&&c.internalSubset.indexOf("]>")!==-1)throw new P('DocumentType internalSubset contains "]>"',Se.InvalidStateError)}return t.push(ae.DOCTYPE_DECL_START," ",c.name),_?(t.push(" ",ae.PUBLIC," ",_),N&&N!=="."&&t.push(" ",N)):N&&N!=="."&&t.push(" ",ae.SYSTEM," ",N),c.internalSubset&&t.push(" [",c.internalSubset,"]"),t.push(">"),null;case ys:if(o){if(!ae.NCName_exact.test(c.target)||c.target.toLowerCase()==="xml")throw new P('The processing instruction target "'+c.target+'" is not a valid XML NCName or is reserved',Se.InvalidStateError);if(ae.InvalidChar.test(c.data))throw new P("The ProcessingInstruction data contains characters outside the XML Char production",Se.InvalidStateError);if(c.data.indexOf("?>")!==-1)throw new P('The ProcessingInstruction data contains "?>"',Se.InvalidStateError)}return t.push("<?",c.target," ",c.data,"?>"),null;case Gu:if(o&&!ae.Name_exact.test(c.nodeName))throw new P('The entity reference name "'+c.nodeName+'" is not a valid XML Name',Se.InvalidStateError);return t.push("&",c.nodeName,";"),null;default:return t.push("??",c.nodeName),null}},exit:function(c,u){u&&u.tag&&t.push("</",u.tag,">")}})}function jb(e,t,r){var a;return he(t,null,{enter:function(n,o){var i=n.cloneNode(!1);i.ownerDocument=e,i.parentNode=null,o===null?a=i:o.appendChild(i);var s=n.nodeType===Fr||r;return s?i:null}}),a}function td(e,t,r){var a;return he(t,null,{enter:function(n,o){var i=new n.constructor(we);for(var s in n)if(Lr(n,s)){var l=n[s];typeof l!="object"&&l!=i[s]&&(i[s]=l)}n.childNodes&&(i.childNodes=new ue),i.ownerDocument=e;var c=r;switch(i.nodeType){case We:var u=n.attributes,p=i.attributes=new Ur,f=u.length;p._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(td(e,u.item(h),!0));break;case Fr:c=!0}return o!==null?o.appendChild(i):a=i,c?i:null}}),a}function rd(e,t,r){e[t]=r}function Cs(e){for(var t=[],r=e.firstChild;r;)r.nodeType===We&&t.push(r),r=r.nextSibling;return t}try{Object.defineProperty&&(Object.defineProperty(tt.prototype,"length",{get:function(){return fo(this),this.$$length}}),Object.defineProperty(z.prototype,"textContent",{get:function(){if(this.nodeType===We||this.nodeType===Lt){var e=[];return he(this,null,{enter:function(t){if(t.nodeType===We||t.nodeType===Lt)return!0;if(t.nodeType===ys||t.nodeType===ws)return null;e.push(t.nodeValue)}}),e.join("")}return this.nodeValue},set:function(e){switch(this.nodeType){case We:case Lt:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Object.defineProperty(Ut.prototype,"data",{get:function(){return this._data!=null?this._data:""},set:function(e){this._data=e,this.length=typeof e=="string"?e.length:0}}),Object.defineProperty(Ut.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!0,configurable:!0}),Object.defineProperty(vt.prototype,"children",{get:function(){return new tt(this,Cs)}}),Object.defineProperty(gt.prototype,"children",{get:function(){return new tt(this,Cs)}}),Object.defineProperty(Wr.prototype,"children",{get:function(){return new tt(this,Cs)}}),rd=function(e,t,r){e["$$"+t]=r})}catch{}ne._updateLiveList=fo;ne.Attr=or;ne.CDATASection=ho;ne.CharacterData=Ut;ne.Comment=mo;ne.Document=gt;ne.DocumentFragment=Wr;ne.DocumentType=go;ne.DOMImplementation=Hu;ne.Element=vt;ne.Entity=Ts;ne.EntityReference=vo;ne.LiveNodeList=tt;ne.NamedNodeMap=Ur;ne.Node=z;ne.NodeList=ue;ne.Notation=Ds;ne.Text=Ja;ne.ProcessingInstruction=bo;ne.walkDOM=he;ne.XMLSerializer=Ju});var nd=O(en=>{"use strict";var ad=nr().freeze;en.XML_ENTITIES=ad({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});en.HTML_ENTITIES=ad({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
10
+ `,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});en.entityMap=en.HTML_ENTITIES});var fd=O(Co=>{"use strict";var Xr=nr(),$=Ss(),ld=za(),Kb=Xr.isHTMLEscapableRawTextElement,Zb=Xr.isHTMLMimeType,Qb=Xr.isHTMLRawTextElement,an=Xr.hasOwn,od=Xr.NAMESPACE,Yb=ld.ParseError,Jb=ld.DOMException,Vr=0,$t=1,Gr=2,tn=3,qr=4,zr=5,rn=6,So=7;function cd(){}cd.prototype={parse:function(e,t,r){var a=this.domBuilder;a.startDocument(),aS(t,t=Object.create(null)),eS(e,t,r,a,this.errorHandler),a.endDocument()}};var Is=/&#?\w+;?/g;function eS(e,t,r,a,n){var o=Zb(a.mimeType);e.indexOf($.UNICODE_REPLACEMENT_CHARACTER)>=0&&n.warning("Unicode replacement character detected, source encoding issues?");function i(k){if(k>65535){k-=65536;var te=55296+(k>>10),$e=56320+(k&1023);return String.fromCharCode(te,$e)}else return String.fromCharCode(k)}function s(k){var te=k[k.length-1]===";"?k:k+";";if(!o&&te!==k)return n.error("EntityRef: expecting ;"),k;var $e=$.Reference.exec(te);if(!$e||$e[0].length!==te.length)return n.error("entity not matching Reference production: "+k),k;var et=te.slice(1,-1);return an(r,et)?r[et]:et.charAt(0)==="#"?i(parseInt(et.substring(1).replace("x","0x"))):(n.error("entity not found:"+k),k)}function l(k){if(k>x){var te=e.substring(x,k).replace(Is,s);f&&h(x),a.characters(te,0,k-x),x=k}}var c=0,u=0,p=/\r\n?|\n|$/g,f=a.locator;function h(k,te){for(;k>=u&&(te=p.exec(e));)c=u,u=te.index+te[0].length,f.lineNumber++;f.columnNumber=k-c+1}for(var v=[{currentNSMap:t}],b=[],x=0;;){try{var C=e.indexOf("<",x);if(C<0){if(!o&&b.length>0)return n.fatalError("unclosed xml tag(s): "+b.join(", "));if(!e.substring(x).match(/^\s*$/)){var d=a.doc,m=d.createTextNode(e.substring(x));if(d.documentElement)return n.error("Extra content at the end of the document");d.appendChild(m),a.currentElement=m}return}if(C>x){var w=e.substring(x,C);!o&&b.length===0&&(w=w.replace(new RegExp($.S_OPT.source,"g"),""),w&&n.error("Unexpected content outside root element: '"+w+"'")),l(C)}switch(e.charAt(C+1)){case"/":var F=e.indexOf(">",C+2),A=e.substring(C+2,F>0?F:void 0);if(!A)return n.fatalError("end tag name missing");var R=$.reg("^",$.QName_group,$.S_OPT,"$"),I=F>0&&R.exec(A);if(!I){var D=F>0&&$.reg("^",$.QName_group).exec(A);if(o&&D)n.warning('end tag name contains invalid trailing characters: "'+A+'"'),I=D;else if(D&&new RegExp(R.source,R.flags+"m").test(A))n.error('end tag name is followed by a line break and trailing content: "'+A+'"'),I=D;else return n.fatalError('end tag name contains invalid characters: "'+A+'"')}if(!a.currentElement&&!a.doc.documentElement)return;var T=b[b.length-1]||a.currentElement.tagName||a.doc.documentElement.tagName||"";if(T!==I[1]){var y=I[1].toLowerCase();if(!o||T.toLowerCase()!==y)return n.fatalError('Opening and ending tag mismatch: "'+T+'" != "'+A+'"')}var g=v.pop();b.pop();var E=g.localNSMap;if(a.endElement(g.uri,g.localName,T),E)for(var _ in E)an(E,_)&&a.endPrefixMapping(_);F++;break;case"?":f&&h(C),F=oS(e,C,a,n);break;case"!":f&&h(C),F=dd(e,C,a,n,o);break;default:f&&h(C);var N=new pd,B=v[v.length-1].currentNSMap,F=tS(e,C,N,B,s,n,o),V=N.length;if(N.closed||(o&&Xr.isHTMLVoidElement(N.tagName)?N.closed=!0:b.push(N.tagName)),f&&V){for(var se=id(f,{}),Te=0;Te<V;Te++){var Ue=N[Te];h(Ue.offset),Ue.locator=id(f,{})}a.locator=se,sd(N,a,B)&&v.push(N),a.locator=f}else sd(N,a,B)&&v.push(N);o&&!N.closed?F=rS(e,F,N.tagName,s,a):F++}}catch(k){if(k instanceof Yb)throw k;if(k instanceof Jb)return n.fatalError("Error constructing the DOM: "+k.name+": "+k.message,k);n.error("element parse error: "+k),F=-1}F>x?x=F:l(Math.max(C,x)+1)}}function id(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function tS(e,t,r,a,n,o,i){function s(h,v,b){if(an(r.attributeNames,h))return o.fatalError("Attribute "+h+" redefined");if(!i&&v.indexOf("<")>=0)return o.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(h,v.replace(/[\t\n\r]/g," ").replace(Is,n),b)}for(var l,c,u=++t,p=Vr;;){var f=e.charAt(u);if(p===Vr&&f==="<")throw new Error("unexpected < in tag name: "+e.slice(t,u));switch(f){case"=":if(p===$t)l=e.slice(t,u),p=tn;else if(p===Gr)p=tn;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(p===tn||p===$t)if(p===$t&&(o.warning('attribute value must after "="'),l=e.slice(t,u)),t=u+1,u=e.indexOf(f,t),u>0)c=e.slice(t,u),s(l,c,t-1),p=zr;else throw new Error("attribute value no end '"+f+"' match");else if(p==qr)c=e.slice(t,u),s(l,c,t),o.warning('attribute "'+l+'" missed start quot('+f+")!!"),t=u+1,p=zr;else throw new Error('attribute value must after "="');break;case"/":switch(p){case Vr:r.setTagName(e.slice(t,u));case zr:case rn:case So:p=So,r.closed=!0;case qr:case $t:break;case Gr:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),p==Vr&&r.setTagName(e.slice(t,u)),u;case">":switch(p){case Vr:r.setTagName(e.slice(t,u));case zr:case rn:case So:break;case qr:case $t:c=e.slice(t,u),c.slice(-1)==="/"&&(r.closed=!0,c=c.slice(0,-1));case Gr:p===Gr&&(c=l),p==qr?(o.warning('attribute "'+c+'" missed quot(")!'),s(l,c,t)):(i||o.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),s(c,c,t));break;case tn:if(!i)return o.fatalError(`AttValue: ' or " expected`)}return u;case"\x80":f=" ";default:if(f<=" ")switch(p){case Vr:r.setTagName(e.slice(t,u)),p=rn;break;case $t:l=e.slice(t,u),p=Gr;break;case qr:var c=e.slice(t,u);o.warning('attribute "'+c+'" missed quot(")!!'),s(l,c,t);case zr:p=rn;break}else switch(p){case Gr:i||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),s(l,l,t),t=u,p=$t;break;case zr:o.warning('attribute space is required"'+l+'"!!');case rn:p=$t,t=u;break;case tn:p=qr,t=u;break;case So:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function sd(e,t,r){for(var a=e.tagName,n=null,p=e.length;p--;){var o=e[p],i=o.qName,s=o.value,f=i.indexOf(":");if(f>0)var l=o.prefix=i.slice(0,f),c=i.slice(f+1),u=l==="xmlns"&&c;else c=i,l=null,u=i==="xmlns"&&"";o.localName=c,u!==!1&&(n==null&&(n=Object.create(null),r=Object.create(r)),r[u]=n[u]=s,o.uri=od.XMLNS,t.startPrefixMapping(u,s))}for(var p=e.length;p--;)o=e[p],o.prefix&&(o.prefix==="xml"&&(o.uri=od.XML),o.prefix!=="xmlns"&&(o.uri=r[o.prefix]));var f=a.indexOf(":");f>0?(l=e.prefix=a.slice(0,f),c=e.localName=a.slice(f+1)):(l=null,c=e.localName=a);var h=e.uri=r[l||""];if(t.startElement(h,c,a,e),e.closed){if(t.endElement(h,c,a),n)for(l in n)an(n,l)&&t.endPrefixMapping(l)}else return e.currentNSMap=r,e.localNSMap=n,!0}function rS(e,t,r,a,n){var o=Kb(r);if(o||Qb(r)){var i=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");i.lastIndex=t;var s=i.exec(e),l=s?s.index:-1;if(l<0)return t+1;var c=e.substring(t+1,l);return o&&(c=c.replace(Is,a)),n.characters(c,0,c.length),l}return t+1}function aS(e,t){for(var r in e)an(e,r)&&(t[r]=e[r])}function ud(e,t){var r=t;function a(u){return u=u||0,e.charAt(r+u)}function n(u){u=u||1,r+=u}function o(){for(var u=0;r<e.length;){var p=a();if(p!==" "&&p!==`
11
+ `&&p!==" "&&p!=="\r")return u;u++,n()}return-1}function i(){return e.substring(r)}function s(u){return e.substring(r,r+u.length)===u}function l(u){return e.substring(r,r+u.length).toUpperCase()===u.toUpperCase()}function c(u){var p=$.reg("^",u),f=p.exec(i());return f?(n(f[0].length),f[0]):null}return{char:a,getIndex:function(){return r},getMatch:c,getSource:function(){return e},skip:n,skipBlanks:o,substringFromIndex:i,substringStartsWith:s,substringStartsWithCaseInsensitive:l}}function nS(e,t){function r(s,l){var c=$.PI.exec(s.substringFromIndex());return c?c[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+s.getIndex()):(s.skip(c[0].length),c[0]):l.fatalError("processing instruction is not well-formed at position "+s.getIndex())}var a=e.getSource();if(e.char()==="["){e.skip(1);for(var n=e.getIndex();e.getIndex()<a.length;){if(e.skipBlanks(),e.char()==="]"){var o=a.substring(n,e.getIndex());return e.skip(1),o}var i=null;if(e.char()==="<"&&e.char(1)==="!")switch(e.char(2)){case"E":e.char(3)==="L"?i=e.getMatch($.elementdecl):e.char(3)==="N"&&(i=e.getMatch($.EntityDecl));break;case"A":i=e.getMatch($.AttlistDecl);break;case"N":i=e.getMatch($.NotationDecl);break;case"-":i=e.getMatch($.Comment);break}else if(e.char()==="<"&&e.char(1)==="?")i=r(e,t);else if(e.char()==="%")i=e.getMatch($.PEReference);else return t.fatalError("Error detected in Markup declaration");if(!i)return t.fatalError("Error in internal subset at position "+e.getIndex())}return t.fatalError("doctype internal subset is not well-formed, missing ]")}}function dd(e,t,r,a,n){var o=ud(e,t);switch(n?o.char(2).toUpperCase():o.char(2)){case"-":var i=o.getMatch($.Comment);return i?(r.comment(i,$.COMMENT_START.length,i.length-$.COMMENT_START.length-$.COMMENT_END.length),o.getIndex()):a.fatalError("comment is not well-formed at position "+o.getIndex());case"[":var s=o.getMatch($.CDSect);return s?!n&&!r.currentElement?a.fatalError("CDATA outside of element"):(r.startCDATA(),r.characters(s,$.CDATA_START.length,s.length-$.CDATA_START.length-$.CDATA_END.length),r.endCDATA(),o.getIndex()):a.fatalError("Invalid CDATA starting at position "+t);case"D":{if(r.doc&&r.doc.documentElement)return a.fatalError("Doctype not allowed inside or after documentElement at position "+o.getIndex());if(n?!o.substringStartsWithCaseInsensitive($.DOCTYPE_DECL_START):!o.substringStartsWith($.DOCTYPE_DECL_START))return a.fatalError("Expected "+$.DOCTYPE_DECL_START+" at position "+o.getIndex());if(o.skip($.DOCTYPE_DECL_START.length),o.skipBlanks()<1)return a.fatalError("Expected whitespace after "+$.DOCTYPE_DECL_START+" at position "+o.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=o.getMatch($.Name),!l.name)return a.fatalError("doctype name missing or contains unexpected characters at position "+o.getIndex());if(n&&l.name.toLowerCase()!=="html"&&a.warning("Unexpected DOCTYPE in HTML document at position "+o.getIndex()),o.skipBlanks(),o.substringStartsWith($.PUBLIC)||o.substringStartsWith($.SYSTEM)){var c=$.ExternalID_match.exec(o.substringFromIndex());if(!c)return a.fatalError("doctype external id is not well-formed at position "+o.getIndex());c.groups.SystemLiteralOnly!==void 0?l.systemId=c.groups.SystemLiteralOnly:(l.systemId=c.groups.SystemLiteral,l.publicId=c.groups.PubidLiteral),o.skip(c[0].length)}else if(n&&o.substringStartsWithCaseInsensitive($.SYSTEM)){if(o.skip($.SYSTEM.length),o.skipBlanks()<1)return a.fatalError("Expected whitespace after "+$.SYSTEM+" at position "+o.getIndex());if(l.systemId=o.getMatch($.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return a.fatalError("Expected "+$.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+$.SYSTEM+" at position "+o.getIndex())}return n&&l.systemId&&!$.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&a.warning("Unexpected doctype.systemId in HTML document at position "+o.getIndex()),n||(o.skipBlanks(),l.internalSubset=nS(o,a)),o.skipBlanks(),o.char()!==">"?a.fatalError("doctype not terminated with > at position "+o.getIndex()):(o.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),o.getIndex())}default:return a.fatalError('Not well-formed XML starting with "<!" at position '+t)}}function oS(e,t,r,a){var n=e.substring(t).match($.PI);if(!n)return a.fatalError("Invalid processing instruction starting at position "+t);if(n[1].toLowerCase()==="xml"){if(t>0)return a.fatalError("processing instruction at position "+t+" is an xml declaration which is only at the start of the document");if(!$.XMLDecl.test(e.substring(t)))return a.fatalError("xml declaration is not well-formed")}return r.processingInstruction(n[1],n[2]),t+n[0].length}function pd(){this.attributeNames=Object.create(null)}pd.prototype={setTagName:function(e){if(!$.QName_exact.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!$.QName_exact.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};Co.XMLReader=cd;Co.parseUtils=ud;Co.parseDoctypeCommentOrCData=dd});var Cd=O(jr=>{"use strict";var ir=nr(),iS=_s(),sS=za(),md=nd(),lS=fd(),cS=iS.DOMImplementation,uS=ir.hasDefaultHTMLNamespace,dS=ir.isHTMLMimeType,pS=ir.isValidMimeType,vd=ir.MIME_TYPE,Ns=ir.NAMESPACE,hd=sS.ParseError,fS=lS.XMLReader;function bd(e){return e.replace(/\r[\n\u0085]/g,`
12
+ `).replace(/[\r\u0085\u2028\u2029]/g,`
13
+ `)}function Sd(e){if(e=e||{},e.locator===void 0&&(e.locator=!0),this.assign=e.assign||ir.assign,this.domHandler=e.domHandler||yo,this.onError=e.onError||e.errorHandler,e.errorHandler&&typeof e.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");e.errorHandler&&e.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=e.normalizeLineEndings||bd,this.locator=!!e.locator,this.xmlns=this.assign(Object.create(null),e.xmlns)}Sd.prototype.parseFromString=function(e,t){if(!pS(t))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+t+'" is not valid.');var r=this.assign(Object.create(null),this.xmlns),a=md.XML_ENTITIES,n=r[""]||null;uS(t)?(a=md.HTML_ENTITIES,n=Ns.HTML):t===vd.XML_SVG_IMAGE&&(n=Ns.SVG),r[""]=n,r.xml=r.xml||Ns.XML;var o=new this.domHandler({mimeType:t,defaultNamespace:n,onError:this.onError}),i=this.locator?{}:void 0;this.locator&&o.setDocumentLocator(i);var s=new fS;s.errorHandler=o,s.domBuilder=o;var l=!ir.isHTMLMimeType(t);return l&&typeof e!="string"&&s.errorHandler.fatalError("source is not a string"),s.parse(this.normalizeLineEndings(String(e)),r,a),o.doc.documentElement||s.errorHandler.fatalError("missing root element"),o.doc};function yo(e){var t=e||{};this.mimeType=t.mimeType||vd.XML_APPLICATION,this.defaultNamespace=t.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=t.onError}function Hr(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}yo.prototype={startDocument:function(){var e=new cS;this.doc=dS(this.mimeType)?e.createHTMLDocument(!1):e.createDocument(this.defaultNamespace,"")},startElement:function(e,t,r,a){var n=this.doc,o=n.createElementNS(e,r||t),i=a.length;xo(this,o),this.currentElement=o,this.locator&&Hr(this.locator,o);for(var s=0;s<i;s++){var e=a.getURI(s),l=a.getValue(s),r=a.getQName(s),c=n.createAttributeNS(e,r);this.locator&&Hr(a.getLocator(s),c),c.value=c.nodeValue=l,o.setAttributeNode(c)}},endElement:function(e,t,r){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&Hr(this.locator,r),xo(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=gd.apply(this,arguments),e){if(this.cdata)var a=this.doc.createCDATASection(e);else var a=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(a):/^\s*$/.test(e)&&this.doc.appendChild(a),this.locator&&Hr(this.locator,a)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){e&&(e.lineNumber=0),this.locator=e},comment:function(e,t,r){e=gd.apply(this,arguments);var a=this.doc.createComment(e);this.locator&&Hr(this.locator,a),xo(this,a)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r,a){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r,a);this.locator&&Hr(this.locator,o),xo(this,o),this.doc.doctype=o}},reportError:function(e,t){if(typeof this.onError=="function")try{this.onError(e,t,this)}catch(r){throw new hd("Reporting "+e+' "'+t+'" caused '+r,this.locator)}else console.error("[xmldom "+e+"] "+t,mS(this.locator))},warning:function(e){this.reportError("warning",e)},error:function(e){this.reportError("error",e)},fatalError:function(e,t){throw this.reportError("fatalError",e),new hd(e,this.locator,t)}};function mS(e){if(e)return`
14
+ @#[line:`+e.lineNumber+",col:"+e.columnNumber+"]"}function gd(e,t,r){return typeof e=="string"?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){yo.prototype[e]=function(){return null}});function xo(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}function hS(e){if(e==="error")throw"onErrorStopParsing"}function gS(){throw"onWarningStopParsing"}jr.__DOMHandler=yo;jr.DOMParser=Sd;jr.normalizeLineEndings=bd;jr.onErrorStopParsing=hS;jr.onWarningStopParsing=gS});var xd=O(X=>{"use strict";var Kr=nr();X.assign=Kr.assign;X.hasDefaultHTMLNamespace=Kr.hasDefaultHTMLNamespace;X.isHTMLMimeType=Kr.isHTMLMimeType;X.isValidMimeType=Kr.isValidMimeType;X.MIME_TYPE=Kr.MIME_TYPE;X.NAMESPACE=Kr.NAMESPACE;var wo=za();X.DOMException=wo.DOMException;X.DOMExceptionName=wo.DOMExceptionName;X.ExceptionCode=wo.ExceptionCode;X.ParseError=wo.ParseError;var de=_s();X.Attr=de.Attr;X.CDATASection=de.CDATASection;X.CharacterData=de.CharacterData;X.Comment=de.Comment;X.Document=de.Document;X.DocumentFragment=de.DocumentFragment;X.DocumentType=de.DocumentType;X.DOMImplementation=de.DOMImplementation;X.Element=de.Element;X.Entity=de.Entity;X.EntityReference=de.EntityReference;X.LiveNodeList=de.LiveNodeList;X.NamedNodeMap=de.NamedNodeMap;X.Node=de.Node;X.NodeList=de.NodeList;X.Notation=de.Notation;X.ProcessingInstruction=de.ProcessingInstruction;X.Text=de.Text;X.XMLSerializer=de.XMLSerializer;var Ao=Cd();X.DOMParser=Ao.DOMParser;X.normalizeLineEndings=Ao.normalizeLineEndings;X.onErrorStopParsing=Ao.onErrorStopParsing;X.onWarningStopParsing=Ao.onWarningStopParsing});var rp=O(G=>{"use strict";var pn=Symbol.for("react.element"),zS=Symbol.for("react.portal"),XS=Symbol.for("react.fragment"),HS=Symbol.for("react.strict_mode"),jS=Symbol.for("react.profiler"),KS=Symbol.for("react.provider"),ZS=Symbol.for("react.context"),QS=Symbol.for("react.forward_ref"),YS=Symbol.for("react.suspense"),JS=Symbol.for("react.memo"),eC=Symbol.for("react.lazy"),zd=Symbol.iterator;function tC(e){return e===null||typeof e!="object"?null:(e=zd&&e[zd]||e["@@iterator"],typeof e=="function"?e:null)}var jd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Kd=Object.assign,Zd={};function ta(e,t,r){this.props=e,this.context=t,this.refs=Zd,this.updater=r||jd}ta.prototype.isReactComponent={};ta.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ta.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qd(){}Qd.prototype=ta.prototype;function Ks(e,t,r){this.props=e,this.context=t,this.refs=Zd,this.updater=r||jd}var Zs=Ks.prototype=new Qd;Zs.constructor=Ks;Kd(Zs,ta.prototype);Zs.isPureReactComponent=!0;var Xd=Array.isArray,Yd=Object.prototype.hasOwnProperty,Qs={current:null},Jd={key:!0,ref:!0,__self:!0,__source:!0};function ep(e,t,r){var a,n={},o=null,i=null;if(t!=null)for(a in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Yd.call(t,a)&&!Jd.hasOwnProperty(a)&&(n[a]=t[a]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];n.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)n[a]===void 0&&(n[a]=s[a]);return{$$typeof:pn,type:e,key:o,ref:i,props:n,_owner:Qs.current}}function rC(e,t){return{$$typeof:pn,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ys(e){return typeof e=="object"&&e!==null&&e.$$typeof===pn}function aC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Hd=/\/+/g;function js(e,t){return typeof e=="object"&&e!==null&&e.key!=null?aC(""+e.key):t.toString(36)}function Mo(e,t,r,a,n){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case pn:case zS:i=!0}}if(i)return i=e,n=n(i),e=a===""?"."+js(i,0):a,Xd(n)?(r="",e!=null&&(r=e.replace(Hd,"$&/")+"/"),Mo(n,t,r,"",function(c){return c})):n!=null&&(Ys(n)&&(n=rC(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(Hd,"$&/")+"/")+e)),t.push(n)),1;if(i=0,a=a===""?".":a+":",Xd(e))for(var s=0;s<e.length;s++){o=e[s];var l=a+js(o,s);i+=Mo(o,t,r,l,n)}else if(l=tC(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=a+js(o,s++),i+=Mo(o,t,r,l,n);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function ko(e,t,r){if(e==null)return e;var a=[],n=0;return Mo(e,a,"","",function(o){return t.call(r,o,n++)}),a}function nC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ae={current:null},Bo={transition:null},oC={ReactCurrentDispatcher:Ae,ReactCurrentBatchConfig:Bo,ReactCurrentOwner:Qs};function tp(){throw Error("act(...) is not supported in production builds of React.")}G.Children={map:ko,forEach:function(e,t,r){ko(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ko(e,function(){t++}),t},toArray:function(e){return ko(e,function(t){return t})||[]},only:function(e){if(!Ys(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Component=ta;G.Fragment=XS;G.Profiler=jS;G.PureComponent=Ks;G.StrictMode=HS;G.Suspense=YS;G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oC;G.act=tp;G.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a=Kd({},e.props),n=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Qs.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)Yd.call(t,l)&&!Jd.hasOwnProperty(l)&&(a[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)a.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];a.children=s}return{$$typeof:pn,type:e.type,key:n,ref:o,props:a,_owner:i}};G.createContext=function(e){return e={$$typeof:ZS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:KS,_context:e},e.Consumer=e};G.createElement=ep;G.createFactory=function(e){var t=ep.bind(null,e);return t.type=e,t};G.createRef=function(){return{current:null}};G.forwardRef=function(e){return{$$typeof:QS,render:e}};G.isValidElement=Ys;G.lazy=function(e){return{$$typeof:eC,_payload:{_status:-1,_result:e},_init:nC}};G.memo=function(e,t){return{$$typeof:JS,type:e,compare:t===void 0?null:t}};G.startTransition=function(e){var t=Bo.transition;Bo.transition={};try{e()}finally{Bo.transition=t}};G.unstable_act=tp;G.useCallback=function(e,t){return Ae.current.useCallback(e,t)};G.useContext=function(e){return Ae.current.useContext(e)};G.useDebugValue=function(){};G.useDeferredValue=function(e){return Ae.current.useDeferredValue(e)};G.useEffect=function(e,t){return Ae.current.useEffect(e,t)};G.useId=function(){return Ae.current.useId()};G.useImperativeHandle=function(e,t,r){return Ae.current.useImperativeHandle(e,t,r)};G.useInsertionEffect=function(e,t){return Ae.current.useInsertionEffect(e,t)};G.useLayoutEffect=function(e,t){return Ae.current.useLayoutEffect(e,t)};G.useMemo=function(e,t){return Ae.current.useMemo(e,t)};G.useReducer=function(e,t,r){return Ae.current.useReducer(e,t,r)};G.useRef=function(e){return Ae.current.useRef(e)};G.useState=function(e){return Ae.current.useState(e)};G.useSyncExternalStore=function(e,t,r){return Ae.current.useSyncExternalStore(e,t,r)};G.useTransition=function(){return Ae.current.useTransition()};G.version="18.3.1"});var Pe=O((ST,ap)=>{"use strict";ap.exports=rp()});var op=O((CT,np)=>{np.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}});var cp=O((xT,lp)=>{var fn,iC=(fn=op())&&typeof fn=="object"&&"default"in fn?fn.default:fn,sC=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function ip(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=e.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(t.name=r[1],(iC[r[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var a=e.indexOf("-->");return{type:"comment",comment:a!==-1?e.slice(4,a):""}}for(var n=new RegExp(sC),o=null;(o=n.exec(e))!==null;)if(o[0].trim())if(o[1]){var i=o[1].trim(),s=[i,""];i.indexOf("=")>-1&&(s=i.split("=")),t.attrs[s[0]]=s[1],n.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var lC=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,cC=/^\s*$/,uC=Object.create(null);function sp(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?(function(r){var a=[];for(var n in r)a.push(n+'="'+r[n]+'"');return a.length?" "+a.join(" "):""})(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(sp,"")+"</"+t.name+">";case"comment":return e+"<!--"+t.comment+"-->"}}lp.exports={parse:function(e,t){t||(t={}),t.components||(t.components=uC);var r,a=[],n=[],o=-1,i=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");a.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(lC,function(l,c){if(i){if(l!=="</"+r.name+">")return;i=!1}var u,p=l.charAt(1)!=="/",f=l.startsWith("<!--"),h=c+l.length,v=e.charAt(h);if(f){var b=ip(l);return o<0?(a.push(b),a):((u=n[o]).children.push(b),a)}if(p&&(o++,(r=ip(l)).type==="tag"&&t.components[r.name]&&(r.type="component",i=!0),r.voidElement||i||!v||v==="<"||r.children.push({type:"text",content:e.slice(h,e.indexOf("<",h))}),o===0&&a.push(r),(u=n[o-1])&&u.children.push(r),n[o]=r),(!p||r.voidElement)&&(o>-1&&(r.voidElement||r.name===l.slice(2,-1))&&(o--,r=o===-1?a:n[o]),!i&&v!=="<"&&v)){u=o===-1?a:n[o].children;var x=e.indexOf("<",h),C=e.slice(h,x===-1?void 0:x);cC.test(C)&&(C=" "),(x>-1&&o+u.length>=0||C!==" ")&&u.push({type:"text",content:C})}}),a},stringify:function(e){return e.reduce(function(t,r){return t+sp("",r)},"")}}});var xp=O(Cp=>{"use strict";var aa=Pe();function xC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yC=typeof Object.is=="function"?Object.is:xC,wC=aa.useState,AC=aa.useEffect,EC=aa.useLayoutEffect,DC=aa.useDebugValue;function TC(e,t){var r=t(),a=wC({inst:{value:r,getSnapshot:t}}),n=a[0].inst,o=a[1];return EC(function(){n.value=r,n.getSnapshot=t,tl(n)&&o({inst:n})},[e,r,t]),AC(function(){return tl(n)&&o({inst:n}),e(function(){tl(n)&&o({inst:n})})},[e]),DC(r),r}function tl(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!yC(e,r)}catch{return!0}}function RC(e,t){return t()}var _C=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?RC:TC;Cp.useSyncExternalStore=aa.useSyncExternalStore!==void 0?aa.useSyncExternalStore:_C});var wp=O((cR,yp)=>{"use strict";yp.exports=xp()});var xn=O((iN,ml)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?ml.exports={nextTick:P2}:ml.exports=process;function P2(e,t,r,a){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,o,i;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,a)});default:for(o=new Array(n-1),i=0;i<o.length;)o[i++]=arguments[i];return process.nextTick(function(){e.apply(null,o)})}}});var If=O((sN,_f)=>{var k2={}.toString;_f.exports=Array.isArray||function(e){return k2.call(e)=="[object Array]"}});var hl=O((lN,Nf)=>{Nf.exports=mt("stream")});var yn=O((gl,Pf)=>{var oi=mt("buffer"),Et=oi.Buffer;function Of(e,t){for(var r in e)t[r]=e[r]}Et.from&&Et.alloc&&Et.allocUnsafe&&Et.allocUnsafeSlow?Pf.exports=oi:(Of(oi,gl),gl.Buffer=ua);function ua(e,t,r){return Et(e,t,r)}Of(Et,ua);ua.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Et(e,t,r)};ua.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=Et(e);return t!==void 0?typeof r=="string"?a.fill(t,r):a.fill(t):a.fill(0),a};ua.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Et(e)};ua.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return oi.SlowBuffer(e)}});var da=O(xe=>{function M2(e){return Array.isArray?Array.isArray(e):ii(e)==="[object Array]"}xe.isArray=M2;function B2(e){return typeof e=="boolean"}xe.isBoolean=B2;function L2(e){return e===null}xe.isNull=L2;function F2(e){return e==null}xe.isNullOrUndefined=F2;function U2(e){return typeof e=="number"}xe.isNumber=U2;function $2(e){return typeof e=="string"}xe.isString=$2;function W2(e){return typeof e=="symbol"}xe.isSymbol=W2;function V2(e){return e===void 0}xe.isUndefined=V2;function G2(e){return ii(e)==="[object RegExp]"}xe.isRegExp=G2;function q2(e){return typeof e=="object"&&e!==null}xe.isObject=q2;function z2(e){return ii(e)==="[object Date]"}xe.isDate=z2;function X2(e){return ii(e)==="[object Error]"||e instanceof Error}xe.isError=X2;function H2(e){return typeof e=="function"}xe.isFunction=H2;function j2(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}xe.isPrimitive=j2;xe.isBuffer=mt("buffer").Buffer.isBuffer;function ii(e){return Object.prototype.toString.call(e)}});var kf=O((uN,vl)=>{typeof Object.create=="function"?vl.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:vl.exports=function(t,r){if(r){t.super_=r;var a=function(){};a.prototype=r.prototype,t.prototype=new a,t.prototype.constructor=t}}});var pa=O((dN,Sl)=>{try{if(bl=mt("util"),typeof bl.inherits!="function")throw"";Sl.exports=bl.inherits}catch{Sl.exports=kf()}var bl});var Bf=O((pN,Cl)=>{"use strict";function K2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Mf=yn().Buffer,wn=mt("util");function Z2(e,t,r){e.copy(t,r)}Cl.exports=(function(){function e(){K2(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(r){var a={data:r,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},e.prototype.unshift=function(r){var a={data:r,next:this.head};this.length===0&&(this.tail=a),this.head=a,++this.length},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(r){if(this.length===0)return"";for(var a=this.head,n=""+a.data;a=a.next;)n+=r+a.data;return n},e.prototype.concat=function(r){if(this.length===0)return Mf.alloc(0);for(var a=Mf.allocUnsafe(r>>>0),n=this.head,o=0;n;)Z2(n.data,a,o),o+=n.data.length,n=n.next;return a},e})();wn&&wn.inspect&&wn.inspect.custom&&(Cl.exports.prototype[wn.inspect.custom]=function(){var e=wn.inspect({length:this.length});return this.constructor.name+" "+e})});var xl=O((fN,Lf)=>{"use strict";var si=xn();function Q2(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return a||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,si.nextTick(li,this,e)):si.nextTick(li,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,si.nextTick(li,r,o)):si.nextTick(li,r,o):t&&t(o)}),this)}function Y2(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function li(e,t){e.emit("error",t)}Lf.exports={destroy:Q2,undestroy:Y2}});var Uf=O((mN,Ff)=>{Ff.exports=mt("util").deprecate});var wl=O((hN,Hf)=>{"use strict";var mr=xn();Hf.exports=le;function Wf(e){var t=this;this.next=null,this.entry=null,this.finish=function(){gw(t,e)}}var J2=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:mr.nextTick,fa;le.WritableState=En;var Vf=Object.create(da());Vf.inherits=pa();var ew={deprecate:Uf()},Gf=hl(),ui=yn().Buffer,tw=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function rw(e){return ui.from(e)}function aw(e){return ui.isBuffer(e)||e instanceof tw}var qf=xl();Vf.inherits(le,Gf);function nw(){}function En(e,t){fa=fa||hr(),e=e||{};var r=t instanceof fa;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var a=e.highWaterMark,n=e.writableHighWaterMark,o=this.objectMode?16:16*1024;a||a===0?this.highWaterMark=a:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=e.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){dw(t,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new Wf(this)}En.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(En.prototype,"buffer",{get:ew.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var ci;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ci=Function.prototype[Symbol.hasInstance],Object.defineProperty(le,Symbol.hasInstance,{value:function(e){return ci.call(this,e)?!0:this!==le?!1:e&&e._writableState instanceof En}})):ci=function(e){return e instanceof this};function le(e){if(fa=fa||hr(),!ci.call(le,this)&&!(this instanceof fa))return new le(e);this._writableState=new En(e,this),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Gf.call(this)}le.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function ow(e,t){var r=new Error("write after end");e.emit("error",r),mr.nextTick(t,r)}function iw(e,t,r,a){var n=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),mr.nextTick(a,o),n=!1),n}le.prototype.write=function(e,t,r){var a=this._writableState,n=!1,o=!a.objectMode&&aw(e);return o&&!ui.isBuffer(e)&&(e=rw(e)),typeof t=="function"&&(r=t,t=null),o?t="buffer":t||(t=a.defaultEncoding),typeof r!="function"&&(r=nw),a.ended?ow(this,r):(o||iw(this,a,e,r))&&(a.pendingcb++,n=lw(this,a,o,e,t,r)),n};le.prototype.cork=function(){var e=this._writableState;e.corked++};le.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&zf(this,e))};le.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function sw(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=ui.from(t,r)),t}Object.defineProperty(le.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function lw(e,t,r,a,n,o){if(!r){var i=sw(t,a,n);a!==i&&(r=!0,n="buffer",a=i)}var s=t.objectMode?1:a.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:a,encoding:n,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else yl(e,t,!1,s,a,n,o);return l}function yl(e,t,r,a,n,o,i){t.writelen=a,t.writecb=i,t.writing=!0,t.sync=!0,r?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function cw(e,t,r,a,n){--t.pendingcb,r?(mr.nextTick(n,a),mr.nextTick(An,e,t),e._writableState.errorEmitted=!0,e.emit("error",a)):(n(a),e._writableState.errorEmitted=!0,e.emit("error",a),An(e,t))}function uw(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function dw(e,t){var r=e._writableState,a=r.sync,n=r.writecb;if(uw(r),t)cw(e,r,a,t,n);else{var o=Xf(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&zf(e,r),a?J2($f,e,r,o,n):$f(e,r,o,n)}}function $f(e,t,r,a){r||pw(e,t),t.pendingcb--,a(),An(e,t)}function pw(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function zf(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var a=t.bufferedRequestCount,n=new Array(a),o=t.corkedRequestsFree;o.entry=r;for(var i=0,s=!0;r;)n[i]=r,r.isBuf||(s=!1),r=r.next,i+=1;n.allBuffers=s,yl(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Wf(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,u=r.callback,p=t.objectMode?1:l.length;if(yl(e,t,!1,p,l,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}le.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))};le.prototype._writev=null;le.prototype.end=function(e,t,r){var a=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),a.corked&&(a.corked=1,this.uncork()),a.ending||hw(this,a,r)};function Xf(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function fw(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),An(e,t)})}function mw(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=!0,mr.nextTick(fw,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function An(e,t){var r=Xf(t);return r&&(mw(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"))),r}function hw(e,t,r){t.ending=!0,An(e,t),r&&(t.finished?mr.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function gw(e,t,r){var a=e.entry;for(e.entry=null;a;){var n=a.callback;t.pendingcb--,n(r),a=a.next}t.corkedRequestsFree.next=e}Object.defineProperty(le.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});le.prototype.destroy=qf.destroy;le.prototype._undestroy=qf.undestroy;le.prototype._destroy=function(e,t){this.end(),t(e)}});var hr=O((gN,Qf)=>{"use strict";var jf=xn(),vw=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Qf.exports=Dt;var Kf=Object.create(da());Kf.inherits=pa();var Zf=Dl(),El=wl();Kf.inherits(Dt,Zf);for(Al=vw(El.prototype),di=0;di<Al.length;di++)pi=Al[di],Dt.prototype[pi]||(Dt.prototype[pi]=El.prototype[pi]);var Al,pi,di;function Dt(e){if(!(this instanceof Dt))return new Dt(e);Zf.call(this,e),El.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",bw)}Object.defineProperty(Dt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function bw(){this.allowHalfOpen||this._writableState.ended||jf.nextTick(Sw,this)}function Sw(e){e.end()}Object.defineProperty(Dt.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}});Dt.prototype._destroy=function(e,t){this.push(null),this.end(),jf.nextTick(t,e)}});var _l=O(Jf=>{"use strict";var Rl=yn().Buffer,Yf=Rl.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Cw(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function xw(e){var t=Cw(e);if(typeof t!="string"&&(Rl.isEncoding===Yf||!Yf(e)))throw new Error("Unknown encoding: "+e);return t||e}Jf.StringDecoder=Dn;function Dn(e){this.encoding=xw(e);var t;switch(this.encoding){case"utf16le":this.text=Tw,this.end=Rw,t=4;break;case"utf8":this.fillLast=Aw,t=4;break;case"base64":this.text=_w,this.end=Iw,t=3;break;default:this.write=Nw,this.end=Ow;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Rl.allocUnsafe(t)}Dn.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Dn.prototype.end=Dw;Dn.prototype.text=Ew;Dn.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Tl(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function yw(e,t,r){var a=t.length-1;if(a<r)return 0;var n=Tl(t[a]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--a<r||n===-2?0:(n=Tl(t[a]),n>=0?(n>0&&(e.lastNeed=n-2),n):--a<r||n===-2?0:(n=Tl(t[a]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function ww(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function Aw(e){var t=this.lastTotal-this.lastNeed,r=ww(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function Ew(e,t){var r=yw(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var a=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,a),e.toString("utf8",t,a)}function Dw(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Tw(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var a=r.charCodeAt(r.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function Rw(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function _w(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Iw(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Nw(e){return e.toString(this.encoding)}function Ow(e){return e&&e.length?this.write(e):""}});var Dl=O((SN,dm)=>{"use strict";var ha=xn();dm.exports=Q;var Pw=If(),Tn;Q.ReadableState=im;var bN=mt("events").EventEmitter,am=function(e,t){return e.listeners(t).length},kl=hl(),Rn=yn().Buffer,kw=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Mw(e){return Rn.from(e)}function Bw(e){return Rn.isBuffer(e)||e instanceof kw}var nm=Object.create(da());nm.inherits=pa();var Il=mt("util"),j=void 0;Il&&Il.debuglog?j=Il.debuglog("stream"):j=function(){};var Lw=Bf(),om=xl(),ma;nm.inherits(Q,kl);var Nl=["error","close","destroy","pause","resume"];function Fw(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Pw(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function im(e,t){Tn=Tn||hr(),e=e||{};var r=t instanceof Tn;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var a=e.highWaterMark,n=e.readableHighWaterMark,o=this.objectMode?16:16*1024;a||a===0?this.highWaterMark=a:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Lw,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(ma||(ma=_l().StringDecoder),this.decoder=new ma(e.encoding),this.encoding=e.encoding)}function Q(e){if(Tn=Tn||hr(),!(this instanceof Q))return new Q(e);this._readableState=new im(e,this),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),kl.call(this)}Object.defineProperty(Q.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Q.prototype.destroy=om.destroy;Q.prototype._undestroy=om.undestroy;Q.prototype._destroy=function(e,t){this.push(null),t(e)};Q.prototype.push=function(e,t){var r=this._readableState,a;return r.objectMode?a=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Rn.from(e,t),t=""),a=!0),sm(this,e,t,!1,a)};Q.prototype.unshift=function(e){return sm(this,e,null,!0,!1)};function sm(e,t,r,a,n){var o=e._readableState;if(t===null)o.reading=!1,Vw(e,o);else{var i;n||(i=Uw(o,t)),i?e.emit("error",i):o.objectMode||t&&t.length>0?(typeof t!="string"&&!o.objectMode&&Object.getPrototypeOf(t)!==Rn.prototype&&(t=Mw(t)),a?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Ol(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||t.length!==0?Ol(e,o,t,!1):lm(e,o)):Ol(e,o,t,!1))):a||(o.reading=!1)}return $w(o)}function Ol(e,t,r,a){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,a?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&fi(e)),lm(e,t)}function Uw(e,t){var r;return!Bw(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function $w(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}Q.prototype.isPaused=function(){return this._readableState.flowing===!1};Q.prototype.setEncoding=function(e){return ma||(ma=_l().StringDecoder),this._readableState.decoder=new ma(e),this._readableState.encoding=e,this};var em=8388608;function Ww(e){return e>=em?e=em:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function tm(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Ww(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Q.prototype.read=function(e){j("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return j("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Pl(this):fi(this),null;if(e=tm(e,t),e===0&&t.ended)return t.length===0&&Pl(this),null;var a=t.needReadable;j("need readable",a),(t.length===0||t.length-e<t.highWaterMark)&&(a=!0,j("length less than watermark",a)),t.ended||t.reading?(a=!1,j("reading or ended",a)):a&&(j("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=tm(r,t)));var n;return e>0?n=cm(e,t):n=null,n===null?(t.needReadable=!0,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Pl(this)),n!==null&&this.emit("data",n),n};function Vw(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,fi(e)}}function fi(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(j("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?ha.nextTick(rm,e):rm(e))}function rm(e){j("emit readable"),e.emit("readable"),Ml(e)}function lm(e,t){t.readingMore||(t.readingMore=!0,ha.nextTick(Gw,e,t))}function Gw(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(j("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}Q.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))};Q.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e);break}a.pipesCount+=1,j("pipe count=%d opts=%j",a.pipesCount,t);var n=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,o=n?s:x;a.endEmitted?ha.nextTick(o):r.once("end",o),e.on("unpipe",i);function i(C,d){j("onunpipe"),C===r&&d&&d.hasUnpiped===!1&&(d.hasUnpiped=!0,u())}function s(){j("onend"),e.end()}var l=qw(r);e.on("drain",l);var c=!1;function u(){j("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",i),r.removeListener("end",s),r.removeListener("end",x),r.removeListener("data",f),c=!0,a.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&l()}var p=!1;r.on("data",f);function f(C){j("ondata"),p=!1;var d=e.write(C);d===!1&&!p&&((a.pipesCount===1&&a.pipes===e||a.pipesCount>1&&um(a.pipes,e)!==-1)&&!c&&(j("false write response, pause",a.awaitDrain),a.awaitDrain++,p=!0),r.pause())}function h(C){j("onerror",C),x(),e.removeListener("error",h),am(e,"error")===0&&e.emit("error",C)}Fw(e,"error",h);function v(){e.removeListener("finish",b),x()}e.once("close",v);function b(){j("onfinish"),e.removeListener("close",v),x()}e.once("finish",b);function x(){j("unpipe"),r.unpipe(e)}return e.emit("pipe",r),a.flowing||(j("pipe resume"),r.resume()),e};function qw(e){return function(){var t=e._readableState;j("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&am(e,"data")&&(t.flowing=!0,Ml(e))}}Q.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var a=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)a[o].emit("unpipe",this,{hasUnpiped:!1});return this}var i=um(t.pipes,e);return i===-1?this:(t.pipes.splice(i,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};Q.prototype.on=function(e,t){var r=kl.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==!1&&this.resume();else if(e==="readable"){var a=this._readableState;!a.endEmitted&&!a.readableListening&&(a.readableListening=a.needReadable=!0,a.emittedReadable=!1,a.reading?a.length&&fi(this):ha.nextTick(zw,this))}return r};Q.prototype.addListener=Q.prototype.on;function zw(e){j("readable nexttick read 0"),e.read(0)}Q.prototype.resume=function(){var e=this._readableState;return e.flowing||(j("resume"),e.flowing=!0,Xw(this,e)),this};function Xw(e,t){t.resumeScheduled||(t.resumeScheduled=!0,ha.nextTick(Hw,e,t))}function Hw(e,t){t.reading||(j("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Ml(e),t.flowing&&!t.reading&&e.read(0)}Q.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Ml(e){var t=e._readableState;for(j("flow",t.flowing);t.flowing&&e.read()!==null;);}Q.prototype.wrap=function(e){var t=this,r=this._readableState,a=!1;e.on("end",function(){if(j("wrapped end"),r.decoder&&!r.ended){var i=r.decoder.end();i&&i.length&&t.push(i)}t.push(null)}),e.on("data",function(i){if(j("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!(r.objectMode&&i==null)&&!(!r.objectMode&&(!i||!i.length))){var s=t.push(i);s||(a=!0,e.pause())}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(i){return function(){return e[i].apply(e,arguments)}})(n));for(var o=0;o<Nl.length;o++)e.on(Nl[o],this.emit.bind(this,Nl[o]));return this._read=function(i){j("wrapped _read",i),a&&(a=!1,e.resume())},this};Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Q._fromList=cm;function cm(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=jw(e,t.buffer,t.decoder),r}function jw(e,t,r){var a;return e<t.head.data.length?(a=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?a=t.shift():a=r?Kw(e,t):Zw(e,t),a}function Kw(e,t){var r=t.head,a=1,n=r.data;for(e-=n.length;r=r.next;){var o=r.data,i=e>o.length?o.length:e;if(i===o.length?n+=o:n+=o.slice(0,e),e-=i,e===0){i===o.length?(++a,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(i));break}++a}return t.length-=a,n}function Zw(e,t){var r=Rn.allocUnsafe(e),a=t.head,n=1;for(a.data.copy(r),e-=a.data.length;a=a.next;){var o=a.data,i=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,i),e-=i,e===0){i===o.length?(++n,a.next?t.head=a.next:t.head=t.tail=null):(t.head=a,a.data=o.slice(i));break}++n}return t.length-=n,r}function Pl(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,ha.nextTick(Qw,t,e))}function Qw(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function um(e,t){for(var r=0,a=e.length;r<a;r++)if(e[r]===t)return r;return-1}});var Bl=O((CN,mm)=>{"use strict";mm.exports=Tt;var mi=hr(),fm=Object.create(da());fm.inherits=pa();fm.inherits(Tt,mi);function Yw(e,t){var r=this._transformState;r.transforming=!1;var a=r.writecb;if(!a)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),a(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function Tt(e){if(!(this instanceof Tt))return new Tt(e);mi.call(this,e),this._transformState={afterTransform:Yw.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Jw)}function Jw(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){pm(e,t,r)}):pm(this,null,null)}Tt.prototype.push=function(e,t){return this._transformState.needTransform=!1,mi.prototype.push.call(this,e,t)};Tt.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};Tt.prototype._write=function(e,t,r){var a=this._transformState;if(a.writecb=r,a.writechunk=e,a.writeencoding=t,!a.transforming){var n=this._readableState;(a.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};Tt.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Tt.prototype._destroy=function(e,t){var r=this;mi.prototype._destroy.call(this,e,function(a){t(a),r.emit("close")})};function pm(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var bm=O((xN,vm)=>{"use strict";vm.exports=_n;var hm=Bl(),gm=Object.create(da());gm.inherits=pa();gm.inherits(_n,hm);function _n(e){if(!(this instanceof _n))return new _n(e);hm.call(this,e)}_n.prototype._transform=function(e,t,r){r(null,e)}});var Ll=O((ge,hi)=>{var st=mt("stream");process.env.READABLE_STREAM==="disable"&&st?(hi.exports=st,ge=hi.exports=st.Readable,ge.Readable=st.Readable,ge.Writable=st.Writable,ge.Duplex=st.Duplex,ge.Transform=st.Transform,ge.PassThrough=st.PassThrough,ge.Stream=st):(ge=hi.exports=Dl(),ge.Stream=st||ge,ge.Readable=ge,ge.Writable=wl(),ge.Duplex=hr(),ge.Transform=Bl(),ge.PassThrough=bm())});var Rt=O(Be=>{"use strict";Be.base64=!0;Be.array=!0;Be.string=!0;Be.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";Be.nodebuffer=typeof Buffer<"u";Be.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")Be.blob=!1;else{Fl=new ArrayBuffer(0);try{Be.blob=new Blob([Fl],{type:"application/zip"}).size===0}catch{try{Sm=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Ul=new Sm,Ul.append(Fl),Be.blob=Ul.getBlob("application/zip").size===0}catch{Be.blob=!1}}}var Fl,Sm,Ul;try{Be.nodestream=!!Ll().Readable}catch{Be.nodestream=!1}});var Wl=O($l=>{"use strict";var eA=ee(),tA=Rt(),lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";$l.encode=function(e){for(var t=[],r,a,n,o,i,s,l,c=0,u=e.length,p=u,f=eA.getTypeOf(e)!=="string";c<e.length;)p=u-c,f?(r=e[c++],a=c<u?e[c++]:0,n=c<u?e[c++]:0):(r=e.charCodeAt(c++),a=c<u?e.charCodeAt(c++):0,n=c<u?e.charCodeAt(c++):0),o=r>>2,i=(r&3)<<4|a>>4,s=p>1?(a&15)<<2|n>>6:64,l=p>2?n&63:64,t.push(lt.charAt(o)+lt.charAt(i)+lt.charAt(s)+lt.charAt(l));return t.join("")};$l.decode=function(e){var t,r,a,n,o,i,s,l=0,c=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var p=e.length*3/4;if(e.charAt(e.length-1)===lt.charAt(64)&&p--,e.charAt(e.length-2)===lt.charAt(64)&&p--,p%1!==0)throw new Error("Invalid base64 input, bad content length.");var f;for(tA.uint8array?f=new Uint8Array(p|0):f=new Array(p|0);l<e.length;)n=lt.indexOf(e.charAt(l++)),o=lt.indexOf(e.charAt(l++)),i=lt.indexOf(e.charAt(l++)),s=lt.indexOf(e.charAt(l++)),t=n<<2|o>>4,r=(o&15)<<4|i>>2,a=(i&3)<<6|s,f[c++]=t,i!==64&&(f[c++]=r),s!==64&&(f[c++]=a);return f}});var In=O((AN,Cm)=>{"use strict";Cm.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}}});var Am=O((EN,wm)=>{"use strict";var xm=global.MutationObserver||global.WebKitMutationObserver,ga;process.browser?xm?(Vl=0,ym=new xm(Nn),Gl=global.document.createTextNode(""),ym.observe(Gl,{characterData:!0}),ga=function(){Gl.data=Vl=++Vl%2}):!global.setImmediate&&typeof global.MessageChannel<"u"?(ql=new global.MessageChannel,ql.port1.onmessage=Nn,ga=function(){ql.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?ga=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){Nn(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:ga=function(){setTimeout(Nn,0)}:ga=function(){process.nextTick(Nn)};var Vl,ym,Gl,ql,zl,On=[];function Nn(){zl=!0;for(var e,t,r=On.length;r;){for(t=On,On=[],e=-1;++e<r;)t[e]();r=On.length}zl=!1}wm.exports=rA;function rA(e){On.push(e)===1&&!zl&&ga()}});var Nm=O((DN,Im)=>{"use strict";var Em=Am();function va(){}var ye={},Dm=["REJECTED"],Xl=["FULFILLED"],Tm=["PENDING"];process.browser||(Pn=["UNHANDLED"]);var Pn;Im.exports=zt;function zt(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=Tm,this.queue=[],this.outcome=void 0,process.browser||(this.handled=Pn),e!==va&&Rm(this,e)}zt.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,a);function r(n){function o(){return n}return t.resolve(e()).then(o)}function a(n){function o(){throw n}return t.resolve(e()).then(o)}};zt.prototype.catch=function(e){return this.then(null,e)};zt.prototype.then=function(e,t){if(typeof e!="function"&&this.state===Xl||typeof t!="function"&&this.state===Dm)return this;var r=new this.constructor(va);if(process.browser||this.handled===Pn&&(this.handled=null),this.state!==Tm){var a=this.state===Xl?e:t;Hl(r,a,this.outcome)}else this.queue.push(new kn(r,e,t));return r};function kn(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}kn.prototype.callFulfilled=function(e){ye.resolve(this.promise,e)};kn.prototype.otherCallFulfilled=function(e){Hl(this.promise,this.onFulfilled,e)};kn.prototype.callRejected=function(e){ye.reject(this.promise,e)};kn.prototype.otherCallRejected=function(e){Hl(this.promise,this.onRejected,e)};function Hl(e,t,r){Em(function(){var a;try{a=t(r)}catch(n){return ye.reject(e,n)}a===e?ye.reject(e,new TypeError("Cannot resolve promise with itself")):ye.resolve(e,a)})}ye.resolve=function(e,t){var r=_m(aA,t);if(r.status==="error")return ye.reject(e,r.value);var a=r.value;if(a)Rm(e,a);else{e.state=Xl,e.outcome=t;for(var n=-1,o=e.queue.length;++n<o;)e.queue[n].callFulfilled(t)}return e};ye.reject=function(e,t){e.state=Dm,e.outcome=t,process.browser||e.handled===Pn&&Em(function(){e.handled===Pn&&process.emit("unhandledRejection",t,e)});for(var r=-1,a=e.queue.length;++r<a;)e.queue[r].callRejected(t);return e};function aA(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments)}}function Rm(e,t){var r=!1;function a(s){r||(r=!0,ye.reject(e,s))}function n(s){r||(r=!0,ye.resolve(e,s))}function o(){t(n,a)}var i=_m(o);i.status==="error"&&a(i.value)}function _m(e,t){var r={};try{r.value=e(t),r.status="success"}catch(a){r.status="error",r.value=a}return r}zt.resolve=nA;function nA(e){return e instanceof this?e:ye.resolve(new this(va),e)}zt.reject=oA;function oA(e){var t=new this(va);return ye.reject(t,e)}zt.all=iA;function iA(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,a=!1;if(!r)return this.resolve([]);for(var n=new Array(r),o=0,i=-1,s=new this(va);++i<r;)l(e[i],i);return s;function l(c,u){t.resolve(c).then(p,function(f){a||(a=!0,ye.reject(s,f))});function p(f){n[u]=f,++o===r&&!a&&(a=!0,ye.resolve(s,n))}}}zt.race=sA;function sA(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,a=!1;if(!r)return this.resolve([]);for(var n=-1,o=new this(va);++n<r;)i(e[n]);return o;function i(s){t.resolve(s).then(function(l){a||(a=!0,ye.resolve(o,l))},function(l){a||(a=!0,ye.reject(o,l))})}}});var ba=O((TN,Om)=>{"use strict";var jl=null;typeof Promise<"u"?jl=Promise:jl=Nm();Om.exports={Promise:jl}});var km=O(Pm=>{(function(e,t){"use strict";if(e.setImmediate)return;var r=1,a={},n=!1,o=e.document,i;function s(d){typeof d!="function"&&(d=new Function(""+d));for(var m=new Array(arguments.length-1),w=0;w<m.length;w++)m[w]=arguments[w+1];var A={callback:d,args:m};return a[r]=A,i(r),r++}function l(d){delete a[d]}function c(d){var m=d.callback,w=d.args;switch(w.length){case 0:m();break;case 1:m(w[0]);break;case 2:m(w[0],w[1]);break;case 3:m(w[0],w[1],w[2]);break;default:m.apply(t,w);break}}function u(d){if(n)setTimeout(u,0,d);else{var m=a[d];if(m){n=!0;try{c(m)}finally{l(d),n=!1}}}}function p(){i=function(d){process.nextTick(function(){u(d)})}}function f(){if(e.postMessage&&!e.importScripts){var d=!0,m=e.onmessage;return e.onmessage=function(){d=!1},e.postMessage("","*"),e.onmessage=m,d}}function h(){var d="setImmediate$"+Math.random()+"$",m=function(w){w.source===e&&typeof w.data=="string"&&w.data.indexOf(d)===0&&u(+w.data.slice(d.length))};e.addEventListener?e.addEventListener("message",m,!1):e.attachEvent("onmessage",m),i=function(w){e.postMessage(d+w,"*")}}function v(){var d=new MessageChannel;d.port1.onmessage=function(m){var w=m.data;u(w)},i=function(m){d.port2.postMessage(m)}}function b(){var d=o.documentElement;i=function(m){var w=o.createElement("script");w.onreadystatechange=function(){u(m),w.onreadystatechange=null,d.removeChild(w),w=null},d.appendChild(w)}}function x(){i=function(d){setTimeout(u,0,d)}}var C=Object.getPrototypeOf&&Object.getPrototypeOf(e);C=C&&C.setTimeout?C:e,{}.toString.call(e.process)==="[object process]"?p():f()?h():e.MessageChannel?v():o&&"onreadystatechange"in o.createElement("script")?b():x(),C.setImmediate=s,C.clearImmediate=l})(typeof self>"u"?typeof global>"u"?Pm:global:self)});var ee=O(ce=>{"use strict";var Xt=Rt(),lA=Wl(),Sa=In(),Kl=ba();km();function cA(e){var t=null;return Xt.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),vi(e,t)}ce.newBlob=function(e,t){ce.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,a=new r;return a.append(e),a.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function Mn(e){return e}function vi(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var gi={stringifyByChunk:function(e,t,r){var a=[],n=0,o=e.length;if(o<=r)return String.fromCharCode.apply(null,e);for(;n<o;)t==="array"||t==="nodebuffer"?a.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,o)))):a.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,o)))),n+=r;return a.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return Xt.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return Xt.nodebuffer&&String.fromCharCode.apply(null,Sa.allocBuffer(1)).length===1}catch{return!1}})()}};function Bn(e){var t=65536,r=ce.getTypeOf(e),a=!0;if(r==="uint8array"?a=gi.applyCanBeUsed.uint8array:r==="nodebuffer"&&(a=gi.applyCanBeUsed.nodebuffer),a)for(;t>1;)try{return gi.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2)}return gi.stringifyByChar(e)}ce.applyFromCharCode=Bn;function bi(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var Ht={};Ht.string={string:Mn,array:function(e){return vi(e,new Array(e.length))},arraybuffer:function(e){return Ht.string.uint8array(e).buffer},uint8array:function(e){return vi(e,new Uint8Array(e.length))},nodebuffer:function(e){return vi(e,Sa.allocBuffer(e.length))}};Ht.array={string:Bn,array:Mn,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return Sa.newBufferFrom(e)}};Ht.arraybuffer={string:function(e){return Bn(new Uint8Array(e))},array:function(e){return bi(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:Mn,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return Sa.newBufferFrom(new Uint8Array(e))}};Ht.uint8array={string:Bn,array:function(e){return bi(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:Mn,nodebuffer:function(e){return Sa.newBufferFrom(e)}};Ht.nodebuffer={string:Bn,array:function(e){return bi(e,new Array(e.length))},arraybuffer:function(e){return Ht.nodebuffer.uint8array(e).buffer},uint8array:function(e){return bi(e,new Uint8Array(e.length))},nodebuffer:Mn};ce.transformTo=function(e,t){if(t||(t=""),!e)return t;ce.checkSupport(e);var r=ce.getTypeOf(t),a=Ht[r][e](t);return a};ce.resolve=function(e){for(var t=e.split("/"),r=[],a=0;a<t.length;a++){var n=t[a];n==="."||n===""&&a!==0&&a!==t.length-1||(n===".."?r.pop():r.push(n))}return r.join("/")};ce.getTypeOf=function(e){if(typeof e=="string")return"string";if(Object.prototype.toString.call(e)==="[object Array]")return"array";if(Xt.nodebuffer&&Sa.isBuffer(e))return"nodebuffer";if(Xt.uint8array&&e instanceof Uint8Array)return"uint8array";if(Xt.arraybuffer&&e instanceof ArrayBuffer)return"arraybuffer"};ce.checkSupport=function(e){var t=Xt[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};ce.MAX_VALUE_16BITS=65535;ce.MAX_VALUE_32BITS=-1;ce.pretty=function(e){var t="",r,a;for(a=0;a<(e||"").length;a++)r=e.charCodeAt(a),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};ce.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})};ce.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r};ce.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};ce.prepareContent=function(e,t,r,a,n){var o=Kl.Promise.resolve(t).then(function(i){var s=Xt.blob&&(i instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(i))!==-1);return s&&typeof FileReader<"u"?new Kl.Promise(function(l,c){var u=new FileReader;u.onload=function(p){l(p.target.result)},u.onerror=function(p){c(p.target.error)},u.readAsArrayBuffer(i)}):i});return o.then(function(i){var s=ce.getTypeOf(i);return s?(s==="arraybuffer"?i=ce.transformTo("uint8array",i):s==="string"&&(n?i=lA.decode(i):r&&a!==!0&&(i=cA(i))),i):Kl.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}});var Le=O((IN,Bm)=>{"use strict";function Mm(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}Mm.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.end()}),e.on("error",function(r){t.error(r)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};Bm.exports=Mm});var xa=O(jt=>{"use strict";var Ca=ee(),gr=Rt(),uA=In(),Si=Le(),Ln=new Array(256);for(_t=0;_t<256;_t++)Ln[_t]=_t>=252?6:_t>=248?5:_t>=240?4:_t>=224?3:_t>=192?2:1;var _t;Ln[254]=Ln[254]=1;var dA=function(e){var t,r,a,n,o,i=e.length,s=0;for(n=0;n<i;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<i&&(a=e.charCodeAt(n+1),(a&64512)===56320&&(r=65536+(r-55296<<10)+(a-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(gr.uint8array?t=new Uint8Array(s):t=new Array(s),o=0,n=0;o<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<i&&(a=e.charCodeAt(n+1),(a&64512)===56320&&(r=65536+(r-55296<<10)+(a-56320),n++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t},pA=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Ln[e[r]]>t?r:t},fA=function(e){var t,r,a,n,o=e.length,i=new Array(o*2);for(r=0,t=0;t<o;){if(a=e[t++],a<128){i[r++]=a;continue}if(n=Ln[a],n>4){i[r++]=65533,t+=n-1;continue}for(a&=n===2?31:n===3?15:7;n>1&&t<o;)a=a<<6|e[t++]&63,n--;if(n>1){i[r++]=65533;continue}a<65536?i[r++]=a:(a-=65536,i[r++]=55296|a>>10&1023,i[r++]=56320|a&1023)}return i.length!==r&&(i.subarray?i=i.subarray(0,r):i.length=r),Ca.applyFromCharCode(i)};jt.utf8encode=function(t){return gr.nodebuffer?uA.newBufferFrom(t,"utf-8"):dA(t)};jt.utf8decode=function(t){return gr.nodebuffer?Ca.transformTo("nodebuffer",t).toString("utf-8"):(t=Ca.transformTo(gr.uint8array?"uint8array":"array",t),fA(t))};function Ci(){Si.call(this,"utf-8 decode"),this.leftOver=null}Ca.inherits(Ci,Si);Ci.prototype.processChunk=function(e){var t=Ca.transformTo(gr.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(gr.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=pA(t),n=t;a!==t.length&&(gr.uint8array?(n=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(n=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:jt.utf8decode(n),meta:e.meta})};Ci.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:jt.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)};jt.Utf8DecodeWorker=Ci;function Zl(){Si.call(this,"utf-8 encode")}Ca.inherits(Zl,Si);Zl.prototype.processChunk=function(e){this.push({data:jt.utf8encode(e.data),meta:e.meta})};jt.Utf8EncodeWorker=Zl});var $m=O((ON,Um)=>{"use strict";var Lm=Le(),Fm=ee();function Ql(e){Lm.call(this,"ConvertWorker to "+e),this.destType=e}Fm.inherits(Ql,Lm);Ql.prototype.processChunk=function(e){this.push({data:Fm.transformTo(this.destType,e.data),meta:e.meta})};Um.exports=Ql});var Gm=O((PN,Vm)=>{"use strict";var Wm=Ll().Readable,mA=ee();mA.inherits(Yl,Wm);function Yl(e,t,r){Wm.call(this,t),this._helper=e;var a=this;e.on("data",function(n,o){a.push(n)||a._helper.pause(),r&&r(o)}).on("error",function(n){a.emit("error",n)}).on("end",function(){a.push(null)})}Yl.prototype._read=function(){this._helper.resume()};Vm.exports=Yl});var Jl=O((kN,Xm)=>{"use strict";var vr=ee(),hA=$m(),gA=Le(),vA=Wl(),bA=Rt(),SA=ba(),qm=null;if(bA.nodestream)try{qm=Gm()}catch{}function CA(e,t,r){switch(e){case"blob":return vr.newBlob(vr.transformTo("arraybuffer",t),r);case"base64":return vA.encode(t);default:return vr.transformTo(e,t)}}function xA(e,t){var r,a=0,n=null,o=0;for(r=0;r<t.length;r++)o+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(n=new Uint8Array(o),r=0;r<t.length;r++)n.set(t[r],a),a+=t[r].length;return n;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function yA(e,t){return new SA.Promise(function(r,a){var n=[],o=e._internalType,i=e._outputType,s=e._mimeType;e.on("data",function(l,c){n.push(l),t&&t(c)}).on("error",function(l){n=[],a(l)}).on("end",function(){try{var l=CA(i,xA(o,n),s);r(l)}catch(c){a(c)}n=[]}).resume()})}function zm(e,t,r){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string";break}try{this._internalType=a,this._outputType=t,this._mimeType=r,vr.checkSupport(a),this._worker=e.pipe(new hA(a)),e.lock()}catch(n){this._worker=new gA("error"),this._worker.error(n)}}zm.prototype={accumulate:function(e){return yA(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(a){t.call(r,a.data,a.meta)}):this._worker.on(e,function(){vr.delay(t,arguments,r)}),this},resume:function(){return vr.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(vr.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new qm(this,{objectMode:this._outputType!=="nodebuffer"},e)}};Xm.exports=zm});var ec=O(Ke=>{"use strict";Ke.base64=!1;Ke.binary=!1;Ke.dir=!1;Ke.createFolders=!0;Ke.date=null;Ke.compression=null;Ke.compressionOptions=null;Ke.comment=null;Ke.unixPermissions=null;Ke.dosPermissions=null});var tc=O((BN,Hm)=>{"use strict";var xi=ee(),yi=Le(),wA=16*1024;function ya(e){yi.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(r){t.dataIsReady=!0,t.data=r,t.max=r&&r.length||0,t.type=xi.getTypeOf(r),t.isPaused||t._tickAndRepeat()},function(r){t.error(r)})}xi.inherits(ya,yi);ya.prototype.cleanUp=function(){yi.prototype.cleanUp.call(this),this.data=null};ya.prototype.resume=function(){return yi.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,xi.delay(this._tickAndRepeat,[],this)),!0):!1};ya.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(xi.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))};ya.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=wA,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,r);break;case"uint8array":t=this.data.subarray(this.index,r);break;case"array":case"nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};Hm.exports=ya});var wi=O((LN,Km)=>{"use strict";var AA=ee();function EA(){for(var e,t=[],r=0;r<256;r++){e=r;for(var a=0;a<8;a++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var jm=EA();function DA(e,t,r,a){var n=jm,o=a+r;e=e^-1;for(var i=a;i<o;i++)e=e>>>8^n[(e^t[i])&255];return e^-1}function TA(e,t,r,a){var n=jm,o=a+r;e=e^-1;for(var i=a;i<o;i++)e=e>>>8^n[(e^t.charCodeAt(i))&255];return e^-1}Km.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var a=AA.getTypeOf(t)!=="string";return a?DA(r|0,t,t.length,0):TA(r|0,t,t.length,0)}});var ac=O((FN,Qm)=>{"use strict";var Zm=Le(),RA=wi(),_A=ee();function rc(){Zm.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}_A.inherits(rc,Zm);rc.prototype.processChunk=function(e){this.streamInfo.crc32=RA(e.data,this.streamInfo.crc32||0),this.push(e)};Qm.exports=rc});var Jm=O((UN,Ym)=>{"use strict";var IA=ee(),nc=Le();function oc(e){nc.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}IA.inherits(oc,nc);oc.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}nc.prototype.processChunk.call(this,e)};Ym.exports=oc});var Ai=O(($N,rh)=>{"use strict";var eh=ba(),th=tc(),NA=ac(),ic=Jm();function sc(e,t,r,a,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=a,this.compressedContent=n}sc.prototype={getContentWorker:function(){var e=new th(eh.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new ic("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new th(eh.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};sc.createWorkerFrom=function(e,t,r){return e.pipe(new NA).pipe(new ic("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new ic("compressedSize")).withStreamInfo("compression",t)};rh.exports=sc});var ih=O((WN,oh)=>{"use strict";var OA=Jl(),PA=tc(),lc=xa(),cc=Ai(),ah=Le(),uc=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}};uc.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var a=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var n=!this._dataBinary;n&&!a&&(t=t.pipe(new lc.Utf8EncodeWorker)),!n&&a&&(t=t.pipe(new lc.Utf8DecodeWorker))}catch(o){t=new ah("error"),t.error(o)}return new OA(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof cc&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new lc.Utf8EncodeWorker)),cc.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof cc?this._data.getContentWorker():this._data instanceof ah?this._data:new PA(this._data)}};var nh=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],kA=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(Ei=0;Ei<nh.length;Ei++)uc.prototype[nh[Ei]]=kA;var Ei;oh.exports=uc});var It=O(Ee=>{"use strict";var MA=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function BA(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ee.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var a in r)BA(r,a)&&(e[a]=r[a])}}return e};Ee.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var LA={arraySet:function(e,t,r,a,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+a),n);return}for(var o=0;o<a;o++)e[n+o]=t[r+o]},flattenChunks:function(e){var t,r,a,n,o,i;for(a=0,t=0,r=e.length;t<r;t++)a+=e[t].length;for(i=new Uint8Array(a),n=0,t=0,r=e.length;t<r;t++)o=e[t],i.set(o,n),n+=o.length;return i}},FA={arraySet:function(e,t,r,a,n){for(var o=0;o<a;o++)e[n+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};Ee.setTyped=function(e){e?(Ee.Buf8=Uint8Array,Ee.Buf16=Uint16Array,Ee.Buf32=Int32Array,Ee.assign(Ee,LA)):(Ee.Buf8=Array,Ee.Buf16=Array,Ee.Buf32=Array,Ee.assign(Ee,FA))};Ee.setTyped(MA)});var _h=O(Ea=>{"use strict";var UA=It(),$A=4,sh=0,lh=1,WA=2;function Aa(e){for(var t=e.length;--t>=0;)e[t]=0}var VA=0,mh=1,GA=2,qA=3,zA=258,vc=29,Gn=256,Un=Gn+1+vc,wa=30,bc=19,hh=2*Un+1,br=15,dc=16,XA=7,Sc=256,gh=16,vh=17,bh=18,hc=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Di=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],HA=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Sh=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],jA=512,Nt=new Array((Un+2)*2);Aa(Nt);var Fn=new Array(wa*2);Aa(Fn);var $n=new Array(jA);Aa($n);var Wn=new Array(zA-qA+1);Aa(Wn);var Cc=new Array(vc);Aa(Cc);var Ti=new Array(wa);Aa(Ti);function pc(e,t,r,a,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=a,this.max_length=n,this.has_stree=e&&e.length}var Ch,xh,yh;function fc(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function wh(e){return e<256?$n[e]:$n[256+(e>>>7)]}function Vn(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function ke(e,t,r){e.bi_valid>dc-r?(e.bi_buf|=t<<e.bi_valid&65535,Vn(e,e.bi_buf),e.bi_buf=t>>dc-e.bi_valid,e.bi_valid+=r-dc):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function ct(e,t,r){ke(e,r[t*2],r[t*2+1])}function Ah(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function KA(e){e.bi_valid===16?(Vn(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function ZA(e,t){var r=t.dyn_tree,a=t.max_code,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,u,p,f,h,v,b=0;for(f=0;f<=br;f++)e.bl_count[f]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<hh;c++)u=e.heap[c],f=r[r[u*2+1]*2+1]+1,f>l&&(f=l,b++),r[u*2+1]=f,!(u>a)&&(e.bl_count[f]++,h=0,u>=s&&(h=i[u-s]),v=r[u*2],e.opt_len+=v*(f+h),o&&(e.static_len+=v*(n[u*2+1]+h)));if(b!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,b-=2}while(b>0);for(f=l;f!==0;f--)for(u=e.bl_count[f];u!==0;)p=e.heap[--c],!(p>a)&&(r[p*2+1]!==f&&(e.opt_len+=(f-r[p*2+1])*r[p*2],r[p*2+1]=f),u--)}}function Eh(e,t,r){var a=new Array(br+1),n=0,o,i;for(o=1;o<=br;o++)a[o]=n=n+r[o-1]<<1;for(i=0;i<=t;i++){var s=e[i*2+1];s!==0&&(e[i*2]=Ah(a[s]++,s))}}function QA(){var e,t,r,a,n,o=new Array(br+1);for(r=0,a=0;a<vc-1;a++)for(Cc[a]=r,e=0;e<1<<hc[a];e++)Wn[r++]=a;for(Wn[r-1]=a,n=0,a=0;a<16;a++)for(Ti[a]=n,e=0;e<1<<Di[a];e++)$n[n++]=a;for(n>>=7;a<wa;a++)for(Ti[a]=n<<7,e=0;e<1<<Di[a]-7;e++)$n[256+n++]=a;for(t=0;t<=br;t++)o[t]=0;for(e=0;e<=143;)Nt[e*2+1]=8,e++,o[8]++;for(;e<=255;)Nt[e*2+1]=9,e++,o[9]++;for(;e<=279;)Nt[e*2+1]=7,e++,o[7]++;for(;e<=287;)Nt[e*2+1]=8,e++,o[8]++;for(Eh(Nt,Un+1,o),e=0;e<wa;e++)Fn[e*2+1]=5,Fn[e*2]=Ah(e,5);Ch=new pc(Nt,hc,Gn+1,Un,br),xh=new pc(Fn,Di,0,wa,br),yh=new pc(new Array(0),HA,0,bc,XA)}function Dh(e){var t;for(t=0;t<Un;t++)e.dyn_ltree[t*2]=0;for(t=0;t<wa;t++)e.dyn_dtree[t*2]=0;for(t=0;t<bc;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Sc*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function Th(e){e.bi_valid>8?Vn(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function YA(e,t,r,a){Th(e),a&&(Vn(e,r),Vn(e,~r)),UA.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function ch(e,t,r,a){var n=t*2,o=r*2;return e[n]<e[o]||e[n]===e[o]&&a[t]<=a[r]}function mc(e,t,r){for(var a=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&ch(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!ch(t,a,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=a}function uh(e,t,r){var a,n,o=0,i,s;if(e.last_lit!==0)do a=e.pending_buf[e.d_buf+o*2]<<8|e.pending_buf[e.d_buf+o*2+1],n=e.pending_buf[e.l_buf+o],o++,a===0?ct(e,n,t):(i=Wn[n],ct(e,i+Gn+1,t),s=hc[i],s!==0&&(n-=Cc[i],ke(e,n,s)),a--,i=wh(a),ct(e,i,r),s=Di[i],s!==0&&(a-=Ti[i],ke(e,a,s)));while(o<e.last_lit);ct(e,Sc,t)}function gc(e,t){var r=t.dyn_tree,a=t.stat_desc.static_tree,n=t.stat_desc.has_stree,o=t.stat_desc.elems,i,s,l=-1,c;for(e.heap_len=0,e.heap_max=hh,i=0;i<o;i++)r[i*2]!==0?(e.heap[++e.heap_len]=l=i,e.depth[i]=0):r[i*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,r[c*2]=1,e.depth[c]=0,e.opt_len--,n&&(e.static_len-=a[c*2+1]);for(t.max_code=l,i=e.heap_len>>1;i>=1;i--)mc(e,r,i);c=o;do i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],mc(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=s,r[c*2]=r[i*2]+r[s*2],e.depth[c]=(e.depth[i]>=e.depth[s]?e.depth[i]:e.depth[s])+1,r[i*2+1]=r[s*2+1]=c,e.heap[1]=c++,mc(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],ZA(e,t),Eh(r,l,e.bl_count)}function dh(e,t,r){var a,n=-1,o,i=t[1],s=0,l=7,c=4;for(i===0&&(l=138,c=3),t[(r+1)*2+1]=65535,a=0;a<=r;a++)o=i,i=t[(a+1)*2+1],!(++s<l&&o===i)&&(s<c?e.bl_tree[o*2]+=s:o!==0?(o!==n&&e.bl_tree[o*2]++,e.bl_tree[gh*2]++):s<=10?e.bl_tree[vh*2]++:e.bl_tree[bh*2]++,s=0,n=o,i===0?(l=138,c=3):o===i?(l=6,c=3):(l=7,c=4))}function ph(e,t,r){var a,n=-1,o,i=t[1],s=0,l=7,c=4;for(i===0&&(l=138,c=3),a=0;a<=r;a++)if(o=i,i=t[(a+1)*2+1],!(++s<l&&o===i)){if(s<c)do ct(e,o,e.bl_tree);while(--s!==0);else o!==0?(o!==n&&(ct(e,o,e.bl_tree),s--),ct(e,gh,e.bl_tree),ke(e,s-3,2)):s<=10?(ct(e,vh,e.bl_tree),ke(e,s-3,3)):(ct(e,bh,e.bl_tree),ke(e,s-11,7));s=0,n=o,i===0?(l=138,c=3):o===i?(l=6,c=3):(l=7,c=4)}}function JA(e){var t;for(dh(e,e.dyn_ltree,e.l_desc.max_code),dh(e,e.dyn_dtree,e.d_desc.max_code),gc(e,e.bl_desc),t=bc-1;t>=3&&e.bl_tree[Sh[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function e1(e,t,r,a){var n;for(ke(e,t-257,5),ke(e,r-1,5),ke(e,a-4,4),n=0;n<a;n++)ke(e,e.bl_tree[Sh[n]*2+1],3);ph(e,e.dyn_ltree,t-1),ph(e,e.dyn_dtree,r-1)}function t1(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return sh;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return lh;for(r=32;r<Gn;r++)if(e.dyn_ltree[r*2]!==0)return lh;return sh}var fh=!1;function r1(e){fh||(QA(),fh=!0),e.l_desc=new fc(e.dyn_ltree,Ch),e.d_desc=new fc(e.dyn_dtree,xh),e.bl_desc=new fc(e.bl_tree,yh),e.bi_buf=0,e.bi_valid=0,Dh(e)}function Rh(e,t,r,a){ke(e,(VA<<1)+(a?1:0),3),YA(e,t,r,!0)}function a1(e){ke(e,mh<<1,3),ct(e,Sc,Nt),KA(e)}function n1(e,t,r,a){var n,o,i=0;e.level>0?(e.strm.data_type===WA&&(e.strm.data_type=t1(e)),gc(e,e.l_desc),gc(e,e.d_desc),i=JA(e),n=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=n&&(n=o)):n=o=r+5,r+4<=n&&t!==-1?Rh(e,t,r,a):e.strategy===$A||o===n?(ke(e,(mh<<1)+(a?1:0),3),uh(e,Nt,Fn)):(ke(e,(GA<<1)+(a?1:0),3),e1(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),uh(e,e.dyn_ltree,e.dyn_dtree)),Dh(e),a&&Th(e)}function o1(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Wn[r]+Gn+1)*2]++,e.dyn_dtree[wh(t)*2]++),e.last_lit===e.lit_bufsize-1}Ea._tr_init=r1;Ea._tr_stored_block=Rh;Ea._tr_flush_block=n1;Ea._tr_tally=o1;Ea._tr_align=a1});var xc=O((qN,Ih)=>{"use strict";function i1(e,t,r,a){for(var n=e&65535|0,o=e>>>16&65535|0,i=0;r!==0;){i=r>2e3?2e3:r,r-=i;do n=n+t[a++]|0,o=o+n|0;while(--i);n%=65521,o%=65521}return n|o<<16|0}Ih.exports=i1});var yc=O((zN,Nh)=>{"use strict";function s1(){for(var e,t=[],r=0;r<256;r++){e=r;for(var a=0;a<8;a++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var l1=s1();function c1(e,t,r,a){var n=l1,o=a+r;e^=-1;for(var i=a;i<o;i++)e=e>>>8^n[(e^t[i])&255];return e^-1}Nh.exports=c1});var Ri=O((XN,Oh)=>{"use strict";Oh.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var Wh=O(pt=>{"use strict";var De=It(),qe=_h(),Bh=xc(),Kt=yc(),u1=Ri(),yr=0,d1=1,p1=3,er=4,Ph=5,dt=0,kh=1,ze=-2,f1=-3,wc=-5,m1=-1,h1=1,_i=2,g1=3,v1=4,b1=0,S1=2,Pi=8,C1=9,x1=15,y1=8,w1=29,A1=256,Ec=A1+1+w1,E1=30,D1=19,T1=2*Ec+1,R1=15,q=3,Yt=258,Ze=Yt+q+1,_1=32,ki=42,Dc=69,Ii=73,Ni=91,Oi=103,Sr=113,zn=666,fe=1,Xn=2,Cr=3,Ra=4,I1=3;function Jt(e,t){return e.msg=u1[t],t}function Mh(e){return(e<<1)-(e>4?9:0)}function Qt(e){for(var t=e.length;--t>=0;)e[t]=0}function Zt(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(De.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function ve(e,t){qe._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Zt(e.strm)}function H(e,t){e.pending_buf[e.pending++]=t}function qn(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function N1(e,t,r,a){var n=e.avail_in;return n>a&&(n=a),n===0?0:(e.avail_in-=n,De.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=Bh(e.adler,t,n,r):e.state.wrap===2&&(e.adler=Kt(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function Lh(e,t){var r=e.max_chain_length,a=e.strstart,n,o,i=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-Ze?e.strstart-(e.w_size-Ze):0,c=e.window,u=e.w_mask,p=e.prev,f=e.strstart+Yt,h=c[a+i-1],v=c[a+i];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(c[n+i]!==v||c[n+i-1]!==h||c[n]!==c[a]||c[++n]!==c[a+1])){a+=2,n++;do;while(c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&c[++a]===c[++n]&&a<f);if(o=Yt-(f-a),a=f-Yt,o>i){if(e.match_start=t,i=o,o>=s)break;h=c[a+i-1],v=c[a+i]}}while((t=p[t&u])>l&&--r!==0);return i<=e.lookahead?i:e.lookahead}function xr(e){var t=e.w_size,r,a,n,o,i;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ze)){De.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,a=e.hash_size,r=a;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--a);a=t,r=a;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--a);o+=t}if(e.strm.avail_in===0)break;if(a=N1(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=a,e.lookahead+e.insert>=q)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+q-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<q)););}while(e.lookahead<Ze&&e.strm.avail_in!==0)}function O1(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(xr(e),e.lookahead===0&&t===yr)return fe;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var a=e.block_start+r;if((e.strstart===0||e.strstart>=a)&&(e.lookahead=e.strstart-a,e.strstart=a,ve(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Ze&&(ve(e,!1),e.strm.avail_out===0))return fe}return e.insert=0,t===er?(ve(e,!0),e.strm.avail_out===0?Cr:Ra):(e.strstart>e.block_start&&(ve(e,!1),e.strm.avail_out===0),fe)}function Ac(e,t){for(var r,a;;){if(e.lookahead<Ze){if(xr(e),e.lookahead<Ze&&t===yr)return fe;if(e.lookahead===0)break}if(r=0,e.lookahead>=q&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+q-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-Ze&&(e.match_length=Lh(e,r)),e.match_length>=q)if(a=qe._tr_tally(e,e.strstart-e.match_start,e.match_length-q),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=q){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+q-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else a=qe._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(ve(e,!1),e.strm.avail_out===0))return fe}return e.insert=e.strstart<q-1?e.strstart:q-1,t===er?(ve(e,!0),e.strm.avail_out===0?Cr:Ra):e.last_lit&&(ve(e,!1),e.strm.avail_out===0)?fe:Xn}function Da(e,t){for(var r,a,n;;){if(e.lookahead<Ze){if(xr(e),e.lookahead<Ze&&t===yr)return fe;if(e.lookahead===0)break}if(r=0,e.lookahead>=q&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+q-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=q-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-Ze&&(e.match_length=Lh(e,r),e.match_length<=5&&(e.strategy===h1||e.match_length===q&&e.strstart-e.match_start>4096)&&(e.match_length=q-1)),e.prev_length>=q&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-q,a=qe._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-q),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+q-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=q-1,e.strstart++,a&&(ve(e,!1),e.strm.avail_out===0))return fe}else if(e.match_available){if(a=qe._tr_tally(e,0,e.window[e.strstart-1]),a&&ve(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return fe}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=qe._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<q-1?e.strstart:q-1,t===er?(ve(e,!0),e.strm.avail_out===0?Cr:Ra):e.last_lit&&(ve(e,!1),e.strm.avail_out===0)?fe:Xn}function P1(e,t){for(var r,a,n,o,i=e.window;;){if(e.lookahead<=Yt){if(xr(e),e.lookahead<=Yt&&t===yr)return fe;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=q&&e.strstart>0&&(n=e.strstart-1,a=i[n],a===i[++n]&&a===i[++n]&&a===i[++n])){o=e.strstart+Yt;do;while(a===i[++n]&&a===i[++n]&&a===i[++n]&&a===i[++n]&&a===i[++n]&&a===i[++n]&&a===i[++n]&&a===i[++n]&&n<o);e.match_length=Yt-(o-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=q?(r=qe._tr_tally(e,1,e.match_length-q),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=qe._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(ve(e,!1),e.strm.avail_out===0))return fe}return e.insert=0,t===er?(ve(e,!0),e.strm.avail_out===0?Cr:Ra):e.last_lit&&(ve(e,!1),e.strm.avail_out===0)?fe:Xn}function k1(e,t){for(var r;;){if(e.lookahead===0&&(xr(e),e.lookahead===0)){if(t===yr)return fe;break}if(e.match_length=0,r=qe._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(ve(e,!1),e.strm.avail_out===0))return fe}return e.insert=0,t===er?(ve(e,!0),e.strm.avail_out===0?Cr:Ra):e.last_lit&&(ve(e,!1),e.strm.avail_out===0)?fe:Xn}function ut(e,t,r,a,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=a,this.func=n}var Ta;Ta=[new ut(0,0,0,0,O1),new ut(4,4,8,4,Ac),new ut(4,5,16,8,Ac),new ut(4,6,32,32,Ac),new ut(4,4,16,16,Da),new ut(8,16,32,32,Da),new ut(8,16,128,128,Da),new ut(8,32,128,256,Da),new ut(32,128,258,1024,Da),new ut(32,258,258,4096,Da)];function M1(e){e.window_size=2*e.w_size,Qt(e.head),e.max_lazy_match=Ta[e.level].max_lazy,e.good_match=Ta[e.level].good_length,e.nice_match=Ta[e.level].nice_length,e.max_chain_length=Ta[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=q-1,e.match_available=0,e.ins_h=0}function B1(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pi,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new De.Buf16(T1*2),this.dyn_dtree=new De.Buf16((2*E1+1)*2),this.bl_tree=new De.Buf16((2*D1+1)*2),Qt(this.dyn_ltree),Qt(this.dyn_dtree),Qt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new De.Buf16(R1+1),this.heap=new De.Buf16(2*Ec+1),Qt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new De.Buf16(2*Ec+1),Qt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Fh(e){var t;return!e||!e.state?Jt(e,ze):(e.total_in=e.total_out=0,e.data_type=S1,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?ki:Sr,e.adler=t.wrap===2?0:1,t.last_flush=yr,qe._tr_init(t),dt)}function Uh(e){var t=Fh(e);return t===dt&&M1(e.state),t}function L1(e,t){return!e||!e.state||e.state.wrap!==2?ze:(e.state.gzhead=t,dt)}function $h(e,t,r,a,n,o){if(!e)return ze;var i=1;if(t===m1&&(t=6),a<0?(i=0,a=-a):a>15&&(i=2,a-=16),n<1||n>C1||r!==Pi||a<8||a>15||t<0||t>9||o<0||o>v1)return Jt(e,ze);a===8&&(a=9);var s=new B1;return e.state=s,s.strm=e,s.wrap=i,s.gzhead=null,s.w_bits=a,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+q-1)/q),s.window=new De.Buf8(s.w_size*2),s.head=new De.Buf16(s.hash_size),s.prev=new De.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new De.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=o,s.method=r,Uh(e)}function F1(e,t){return $h(e,t,Pi,x1,y1,b1)}function U1(e,t){var r,a,n,o;if(!e||!e.state||t>Ph||t<0)return e?Jt(e,ze):ze;if(a=e.state,!e.output||!e.input&&e.avail_in!==0||a.status===zn&&t!==er)return Jt(e,e.avail_out===0?wc:ze);if(a.strm=e,r=a.last_flush,a.last_flush=t,a.status===ki)if(a.wrap===2)e.adler=0,H(a,31),H(a,139),H(a,8),a.gzhead?(H(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),H(a,a.gzhead.time&255),H(a,a.gzhead.time>>8&255),H(a,a.gzhead.time>>16&255),H(a,a.gzhead.time>>24&255),H(a,a.level===9?2:a.strategy>=_i||a.level<2?4:0),H(a,a.gzhead.os&255),a.gzhead.extra&&a.gzhead.extra.length&&(H(a,a.gzhead.extra.length&255),H(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=Kt(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=Dc):(H(a,0),H(a,0),H(a,0),H(a,0),H(a,0),H(a,a.level===9?2:a.strategy>=_i||a.level<2?4:0),H(a,I1),a.status=Sr);else{var i=Pi+(a.w_bits-8<<4)<<8,s=-1;a.strategy>=_i||a.level<2?s=0:a.level<6?s=1:a.level===6?s=2:s=3,i|=s<<6,a.strstart!==0&&(i|=_1),i+=31-i%31,a.status=Sr,qn(a,i),a.strstart!==0&&(qn(a,e.adler>>>16),qn(a,e.adler&65535)),e.adler=1}if(a.status===Dc)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(a.gzhead.extra.length&65535)&&!(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=Kt(e.adler,a.pending_buf,a.pending-n,n)),Zt(e),n=a.pending,a.pending===a.pending_buf_size));)H(a,a.gzhead.extra[a.gzindex]&255),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(e.adler=Kt(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=Ii)}else a.status=Ii;if(a.status===Ii)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=Kt(e.adler,a.pending_buf,a.pending-n,n)),Zt(e),n=a.pending,a.pending===a.pending_buf_size)){o=1;break}a.gzindex<a.gzhead.name.length?o=a.gzhead.name.charCodeAt(a.gzindex++)&255:o=0,H(a,o)}while(o!==0);a.gzhead.hcrc&&a.pending>n&&(e.adler=Kt(e.adler,a.pending_buf,a.pending-n,n)),o===0&&(a.gzindex=0,a.status=Ni)}else a.status=Ni;if(a.status===Ni)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=Kt(e.adler,a.pending_buf,a.pending-n,n)),Zt(e),n=a.pending,a.pending===a.pending_buf_size)){o=1;break}a.gzindex<a.gzhead.comment.length?o=a.gzhead.comment.charCodeAt(a.gzindex++)&255:o=0,H(a,o)}while(o!==0);a.gzhead.hcrc&&a.pending>n&&(e.adler=Kt(e.adler,a.pending_buf,a.pending-n,n)),o===0&&(a.status=Oi)}else a.status=Oi;if(a.status===Oi&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Zt(e),a.pending+2<=a.pending_buf_size&&(H(a,e.adler&255),H(a,e.adler>>8&255),e.adler=0,a.status=Sr)):a.status=Sr),a.pending!==0){if(Zt(e),e.avail_out===0)return a.last_flush=-1,dt}else if(e.avail_in===0&&Mh(t)<=Mh(r)&&t!==er)return Jt(e,wc);if(a.status===zn&&e.avail_in!==0)return Jt(e,wc);if(e.avail_in!==0||a.lookahead!==0||t!==yr&&a.status!==zn){var l=a.strategy===_i?k1(a,t):a.strategy===g1?P1(a,t):Ta[a.level].func(a,t);if((l===Cr||l===Ra)&&(a.status=zn),l===fe||l===Cr)return e.avail_out===0&&(a.last_flush=-1),dt;if(l===Xn&&(t===d1?qe._tr_align(a):t!==Ph&&(qe._tr_stored_block(a,0,0,!1),t===p1&&(Qt(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),Zt(e),e.avail_out===0))return a.last_flush=-1,dt}return t!==er?dt:a.wrap<=0?kh:(a.wrap===2?(H(a,e.adler&255),H(a,e.adler>>8&255),H(a,e.adler>>16&255),H(a,e.adler>>24&255),H(a,e.total_in&255),H(a,e.total_in>>8&255),H(a,e.total_in>>16&255),H(a,e.total_in>>24&255)):(qn(a,e.adler>>>16),qn(a,e.adler&65535)),Zt(e),a.wrap>0&&(a.wrap=-a.wrap),a.pending!==0?dt:kh)}function $1(e){var t;return!e||!e.state?ze:(t=e.state.status,t!==ki&&t!==Dc&&t!==Ii&&t!==Ni&&t!==Oi&&t!==Sr&&t!==zn?Jt(e,ze):(e.state=null,t===Sr?Jt(e,f1):dt))}function W1(e,t){var r=t.length,a,n,o,i,s,l,c,u;if(!e||!e.state||(a=e.state,i=a.wrap,i===2||i===1&&a.status!==ki||a.lookahead))return ze;for(i===1&&(e.adler=Bh(e.adler,t,r,0)),a.wrap=0,r>=a.w_size&&(i===0&&(Qt(a.head),a.strstart=0,a.block_start=0,a.insert=0),u=new De.Buf8(a.w_size),De.arraySet(u,t,r-a.w_size,a.w_size,0),t=u,r=a.w_size),s=e.avail_in,l=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,xr(a);a.lookahead>=q;){n=a.strstart,o=a.lookahead-(q-1);do a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+q-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++;while(--o);a.strstart=n,a.lookahead=q-1,xr(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=q-1,a.match_available=0,e.next_in=l,e.input=c,e.avail_in=s,a.wrap=i,dt}pt.deflateInit=F1;pt.deflateInit2=$h;pt.deflateReset=Uh;pt.deflateResetKeep=Fh;pt.deflateSetHeader=L1;pt.deflate=U1;pt.deflateEnd=$1;pt.deflateSetDictionary=W1;pt.deflateInfo="pako deflate (from Nodeca project)"});var Tc=O(_a=>{"use strict";var Mi=It(),Vh=!0,Gh=!0;try{String.fromCharCode.apply(null,[0])}catch{Vh=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Gh=!1}var Hn=new Mi.Buf8(256);for(Ot=0;Ot<256;Ot++)Hn[Ot]=Ot>=252?6:Ot>=248?5:Ot>=240?4:Ot>=224?3:Ot>=192?2:1;var Ot;Hn[254]=Hn[254]=1;_a.string2buf=function(e){var t,r,a,n,o,i=e.length,s=0;for(n=0;n<i;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<i&&(a=e.charCodeAt(n+1),(a&64512)===56320&&(r=65536+(r-55296<<10)+(a-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Mi.Buf8(s),o=0,n=0;o<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<i&&(a=e.charCodeAt(n+1),(a&64512)===56320&&(r=65536+(r-55296<<10)+(a-56320),n++)),r<128?t[o++]=r:r<2048?(t[o++]=192|r>>>6,t[o++]=128|r&63):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|r&63):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|r&63);return t};function qh(e,t){if(t<65534&&(e.subarray&&Gh||!e.subarray&&Vh))return String.fromCharCode.apply(null,Mi.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}_a.buf2binstring=function(e){return qh(e,e.length)};_a.binstring2buf=function(e){for(var t=new Mi.Buf8(e.length),r=0,a=t.length;r<a;r++)t[r]=e.charCodeAt(r);return t};_a.buf2string=function(e,t){var r,a,n,o,i=t||e.length,s=new Array(i*2);for(a=0,r=0;r<i;){if(n=e[r++],n<128){s[a++]=n;continue}if(o=Hn[n],o>4){s[a++]=65533,r+=o-1;continue}for(n&=o===2?31:o===3?15:7;o>1&&r<i;)n=n<<6|e[r++]&63,o--;if(o>1){s[a++]=65533;continue}n<65536?s[a++]=n:(n-=65536,s[a++]=55296|n>>10&1023,s[a++]=56320|n&1023)}return qh(s,a)};_a.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Hn[e[r]]>t?r:t}});var Rc=O((KN,zh)=>{"use strict";function V1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}zh.exports=V1});var Kh=O(Zn=>{"use strict";var jn=Wh(),Kn=It(),Ic=Tc(),Nc=Ri(),G1=Rc(),jh=Object.prototype.toString,q1=0,_c=4,Ia=0,Xh=1,Hh=2,z1=-1,X1=0,H1=8;function wr(e){if(!(this instanceof wr))return new wr(e);this.options=Kn.assign({level:z1,method:H1,chunkSize:16384,windowBits:15,memLevel:8,strategy:X1,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new G1,this.strm.avail_out=0;var r=jn.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==Ia)throw new Error(Nc[r]);if(t.header&&jn.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(typeof t.dictionary=="string"?a=Ic.string2buf(t.dictionary):jh.call(t.dictionary)==="[object ArrayBuffer]"?a=new Uint8Array(t.dictionary):a=t.dictionary,r=jn.deflateSetDictionary(this.strm,a),r!==Ia)throw new Error(Nc[r]);this._dict_set=!0}}wr.prototype.push=function(e,t){var r=this.strm,a=this.options.chunkSize,n,o;if(this.ended)return!1;o=t===~~t?t:t===!0?_c:q1,typeof e=="string"?r.input=Ic.string2buf(e):jh.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Kn.Buf8(a),r.next_out=0,r.avail_out=a),n=jn.deflate(r,o),n!==Xh&&n!==Ia)return this.onEnd(n),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(o===_c||o===Hh))&&(this.options.to==="string"?this.onData(Ic.buf2binstring(Kn.shrinkBuf(r.output,r.next_out))):this.onData(Kn.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&n!==Xh);return o===_c?(n=jn.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Ia):(o===Hh&&(this.onEnd(Ia),r.avail_out=0),!0)};wr.prototype.onData=function(e){this.chunks.push(e)};wr.prototype.onEnd=function(e){e===Ia&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Kn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Oc(e,t){var r=new wr(t);if(r.push(e,!0),r.err)throw r.msg||Nc[r.err];return r.result}function j1(e,t){return t=t||{},t.raw=!0,Oc(e,t)}function K1(e,t){return t=t||{},t.gzip=!0,Oc(e,t)}Zn.Deflate=wr;Zn.deflate=Oc;Zn.deflateRaw=j1;Zn.gzip=K1});var Qh=O((QN,Zh)=>{"use strict";var Bi=30,Z1=12;Zh.exports=function(t,r){var a,n,o,i,s,l,c,u,p,f,h,v,b,x,C,d,m,w,A,R,I,D,T,y,g;a=t.state,n=t.next_in,y=t.input,o=n+(t.avail_in-5),i=t.next_out,g=t.output,s=i-(r-t.avail_out),l=i+(t.avail_out-257),c=a.dmax,u=a.wsize,p=a.whave,f=a.wnext,h=a.window,v=a.hold,b=a.bits,x=a.lencode,C=a.distcode,d=(1<<a.lenbits)-1,m=(1<<a.distbits)-1;e:do{b<15&&(v+=y[n++]<<b,b+=8,v+=y[n++]<<b,b+=8),w=x[v&d];t:for(;;){if(A=w>>>24,v>>>=A,b-=A,A=w>>>16&255,A===0)g[i++]=w&65535;else if(A&16){R=w&65535,A&=15,A&&(b<A&&(v+=y[n++]<<b,b+=8),R+=v&(1<<A)-1,v>>>=A,b-=A),b<15&&(v+=y[n++]<<b,b+=8,v+=y[n++]<<b,b+=8),w=C[v&m];r:for(;;){if(A=w>>>24,v>>>=A,b-=A,A=w>>>16&255,A&16){if(I=w&65535,A&=15,b<A&&(v+=y[n++]<<b,b+=8,b<A&&(v+=y[n++]<<b,b+=8)),I+=v&(1<<A)-1,I>c){t.msg="invalid distance too far back",a.mode=Bi;break e}if(v>>>=A,b-=A,A=i-s,I>A){if(A=I-A,A>p&&a.sane){t.msg="invalid distance too far back",a.mode=Bi;break e}if(D=0,T=h,f===0){if(D+=u-A,A<R){R-=A;do g[i++]=h[D++];while(--A);D=i-I,T=g}}else if(f<A){if(D+=u+f-A,A-=f,A<R){R-=A;do g[i++]=h[D++];while(--A);if(D=0,f<R){A=f,R-=A;do g[i++]=h[D++];while(--A);D=i-I,T=g}}}else if(D+=f-A,A<R){R-=A;do g[i++]=h[D++];while(--A);D=i-I,T=g}for(;R>2;)g[i++]=T[D++],g[i++]=T[D++],g[i++]=T[D++],R-=3;R&&(g[i++]=T[D++],R>1&&(g[i++]=T[D++]))}else{D=i-I;do g[i++]=g[D++],g[i++]=g[D++],g[i++]=g[D++],R-=3;while(R>2);R&&(g[i++]=g[D++],R>1&&(g[i++]=g[D++]))}}else if((A&64)===0){w=C[(w&65535)+(v&(1<<A)-1)];continue r}else{t.msg="invalid distance code",a.mode=Bi;break e}break}}else if((A&64)===0){w=x[(w&65535)+(v&(1<<A)-1)];continue t}else if(A&32){a.mode=Z1;break e}else{t.msg="invalid literal/length code",a.mode=Bi;break e}break}}while(n<o&&i<l);R=b>>3,n-=R,b-=R<<3,v&=(1<<b)-1,t.next_in=n,t.next_out=i,t.avail_in=n<o?5+(o-n):5-(n-o),t.avail_out=i<l?257+(l-i):257-(i-l),a.hold=v,a.bits=b}});var ng=O((YN,ag)=>{"use strict";var Yh=It(),Na=15,Jh=852,eg=592,tg=0,Pc=1,rg=2,Q1=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Y1=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],J1=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],eE=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ag.exports=function(t,r,a,n,o,i,s,l){var c=l.bits,u=0,p=0,f=0,h=0,v=0,b=0,x=0,C=0,d=0,m=0,w,A,R,I,D,T=null,y=0,g,E=new Yh.Buf16(Na+1),_=new Yh.Buf16(Na+1),N=null,B=0,F,V,se;for(u=0;u<=Na;u++)E[u]=0;for(p=0;p<n;p++)E[r[a+p]]++;for(v=c,h=Na;h>=1&&E[h]===0;h--);if(v>h&&(v=h),h===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<h&&E[f]===0;f++);for(v<f&&(v=f),C=1,u=1;u<=Na;u++)if(C<<=1,C-=E[u],C<0)return-1;if(C>0&&(t===tg||h!==1))return-1;for(_[1]=0,u=1;u<Na;u++)_[u+1]=_[u]+E[u];for(p=0;p<n;p++)r[a+p]!==0&&(s[_[r[a+p]]++]=p);if(t===tg?(T=N=s,g=19):t===Pc?(T=Q1,y-=257,N=Y1,B-=257,g=256):(T=J1,N=eE,g=-1),m=0,p=0,u=f,D=i,b=v,x=0,R=-1,d=1<<v,I=d-1,t===Pc&&d>Jh||t===rg&&d>eg)return 1;for(;;){F=u-x,s[p]<g?(V=0,se=s[p]):s[p]>g?(V=N[B+s[p]],se=T[y+s[p]]):(V=96,se=0),w=1<<u-x,A=1<<b,f=A;do A-=w,o[D+(m>>x)+A]=F<<24|V<<16|se|0;while(A!==0);for(w=1<<u-1;m&w;)w>>=1;if(w!==0?(m&=w-1,m+=w):m=0,p++,--E[u]===0){if(u===h)break;u=r[a+s[p]]}if(u>v&&(m&I)!==R){for(x===0&&(x=v),D+=f,b=u-x,C=1<<b;b+x<h&&(C-=E[b+x],!(C<=0));)b++,C<<=1;if(d+=1<<b,t===Pc&&d>Jh||t===rg&&d>eg)return 1;R=m&I,o[R]=v<<24|b<<16|D-i|0}}return m!==0&&(o[D+m]=u-x<<24|64<<16|0),l.bits=v,0}});var Ug=O(Qe=>{"use strict";var Fe=It(),Uc=xc(),ft=yc(),tE=Qh(),Qn=ng(),rE=0,Ig=1,Ng=2,og=4,aE=5,Li=6,Ar=0,nE=1,oE=2,Xe=-2,Og=-3,$c=-4,iE=-5,ig=8,Pg=1,sg=2,lg=3,cg=4,ug=5,dg=6,pg=7,fg=8,mg=9,hg=10,$i=11,Pt=12,kc=13,gg=14,Mc=15,vg=16,bg=17,Sg=18,Cg=19,Fi=20,Ui=21,xg=22,yg=23,wg=24,Ag=25,Eg=26,Bc=27,Dg=28,Tg=29,Y=30,Wc=31,sE=32,lE=852,cE=592,uE=15,dE=uE;function Rg(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function pE(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Fe.Buf16(320),this.work=new Fe.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function kg(e){var t;return!e||!e.state?Xe:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Pg,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Fe.Buf32(lE),t.distcode=t.distdyn=new Fe.Buf32(cE),t.sane=1,t.back=-1,Ar)}function Mg(e){var t;return!e||!e.state?Xe:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,kg(e))}function Bg(e,t){var r,a;return!e||!e.state||(a=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Xe:(a.window!==null&&a.wbits!==t&&(a.window=null),a.wrap=r,a.wbits=t,Mg(e))}function Lg(e,t){var r,a;return e?(a=new pE,e.state=a,a.window=null,r=Bg(e,t),r!==Ar&&(e.state=null),r):Xe}function fE(e){return Lg(e,dE)}var _g=!0,Lc,Fc;function mE(e){if(_g){var t;for(Lc=new Fe.Buf32(512),Fc=new Fe.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Qn(Ig,e.lens,0,288,Lc,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Qn(Ng,e.lens,0,32,Fc,0,e.work,{bits:5}),_g=!1}e.lencode=Lc,e.lenbits=9,e.distcode=Fc,e.distbits=5}function Fg(e,t,r,a){var n,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Fe.Buf8(o.wsize)),a>=o.wsize?(Fe.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(n=o.wsize-o.wnext,n>a&&(n=a),Fe.arraySet(o.window,t,r-a,n,o.wnext),a-=n,a?(Fe.arraySet(o.window,t,r-a,a,0),o.wnext=a,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=n))),0}function hE(e,t){var r,a,n,o,i,s,l,c,u,p,f,h,v,b,x=0,C,d,m,w,A,R,I,D,T=new Fe.Buf8(4),y,g,E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Xe;r=e.state,r.mode===Pt&&(r.mode=kc),i=e.next_out,n=e.output,l=e.avail_out,o=e.next_in,a=e.input,s=e.avail_in,c=r.hold,u=r.bits,p=s,f=l,D=Ar;e:for(;;)switch(r.mode){case Pg:if(r.wrap===0){r.mode=kc;break}for(;u<16;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(r.wrap&2&&c===35615){r.check=0,T[0]=c&255,T[1]=c>>>8&255,r.check=ft(r.check,T,2,0),c=0,u=0,r.mode=sg;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=Y;break}if((c&15)!==ig){e.msg="unknown compression method",r.mode=Y;break}if(c>>>=4,u-=4,I=(c&15)+8,r.wbits===0)r.wbits=I;else if(I>r.wbits){e.msg="invalid window size",r.mode=Y;break}r.dmax=1<<I,e.adler=r.check=1,r.mode=c&512?hg:Pt,c=0,u=0;break;case sg:for(;u<16;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(r.flags=c,(r.flags&255)!==ig){e.msg="unknown compression method",r.mode=Y;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=Y;break}r.head&&(r.head.text=c>>8&1),r.flags&512&&(T[0]=c&255,T[1]=c>>>8&255,r.check=ft(r.check,T,2,0)),c=0,u=0,r.mode=lg;case lg:for(;u<32;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}r.head&&(r.head.time=c),r.flags&512&&(T[0]=c&255,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,r.check=ft(r.check,T,4,0)),c=0,u=0,r.mode=cg;case cg:for(;u<16;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}r.head&&(r.head.xflags=c&255,r.head.os=c>>8),r.flags&512&&(T[0]=c&255,T[1]=c>>>8&255,r.check=ft(r.check,T,2,0)),c=0,u=0,r.mode=ug;case ug:if(r.flags&1024){for(;u<16;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}r.length=c,r.head&&(r.head.extra_len=c),r.flags&512&&(T[0]=c&255,T[1]=c>>>8&255,r.check=ft(r.check,T,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=dg;case dg:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),Fe.arraySet(r.head.extra,a,o,h,I)),r.flags&512&&(r.check=ft(r.check,a,h,o)),s-=h,o+=h,r.length-=h),r.length))break e;r.length=0,r.mode=pg;case pg:if(r.flags&2048){if(s===0)break e;h=0;do I=a[o+h++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I));while(I&&h<s);if(r.flags&512&&(r.check=ft(r.check,a,h,o)),s-=h,o+=h,I)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=fg;case fg:if(r.flags&4096){if(s===0)break e;h=0;do I=a[o+h++],r.head&&I&&r.length<65536&&(r.head.comment+=String.fromCharCode(I));while(I&&h<s);if(r.flags&512&&(r.check=ft(r.check,a,h,o)),s-=h,o+=h,I)break e}else r.head&&(r.head.comment=null);r.mode=mg;case mg:if(r.flags&512){for(;u<16;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(c!==(r.check&65535)){e.msg="header crc mismatch",r.mode=Y;break}c=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Pt;break;case hg:for(;u<32;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}e.adler=r.check=Rg(c),c=0,u=0,r.mode=$i;case $i:if(r.havedict===0)return e.next_out=i,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=c,r.bits=u,oE;e.adler=r.check=1,r.mode=Pt;case Pt:if(t===aE||t===Li)break e;case kc:if(r.last){c>>>=u&7,u-=u&7,r.mode=Bc;break}for(;u<3;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}switch(r.last=c&1,c>>>=1,u-=1,c&3){case 0:r.mode=gg;break;case 1:if(mE(r),r.mode=Fi,t===Li){c>>>=2,u-=2;break e}break;case 2:r.mode=bg;break;case 3:e.msg="invalid block type",r.mode=Y}c>>>=2,u-=2;break;case gg:for(c>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=Y;break}if(r.length=c&65535,c=0,u=0,r.mode=Mc,t===Li)break e;case Mc:r.mode=vg;case vg:if(h=r.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break e;Fe.arraySet(n,a,o,h,i),s-=h,o+=h,l-=h,i+=h,r.length-=h;break}r.mode=Pt;break;case bg:for(;u<14;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(r.nlen=(c&31)+257,c>>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Y;break}r.have=0,r.mode=Sg;case Sg:for(;r.have<r.ncode;){for(;u<3;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}r.lens[E[r.have++]]=c&7,c>>>=3,u-=3}for(;r.have<19;)r.lens[E[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,y={bits:r.lenbits},D=Qn(rE,r.lens,0,19,r.lencode,0,r.work,y),r.lenbits=y.bits,D){e.msg="invalid code lengths set",r.mode=Y;break}r.have=0,r.mode=Cg;case Cg:for(;r.have<r.nlen+r.ndist;){for(;x=r.lencode[c&(1<<r.lenbits)-1],C=x>>>24,d=x>>>16&255,m=x&65535,!(C<=u);){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(m<16)c>>>=C,u-=C,r.lens[r.have++]=m;else{if(m===16){for(g=C+2;u<g;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(c>>>=C,u-=C,r.have===0){e.msg="invalid bit length repeat",r.mode=Y;break}I=r.lens[r.have-1],h=3+(c&3),c>>>=2,u-=2}else if(m===17){for(g=C+3;u<g;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}c>>>=C,u-=C,I=0,h=3+(c&7),c>>>=3,u-=3}else{for(g=C+7;u<g;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}c>>>=C,u-=C,I=0,h=11+(c&127),c>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Y;break}for(;h--;)r.lens[r.have++]=I}}if(r.mode===Y)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Y;break}if(r.lenbits=9,y={bits:r.lenbits},D=Qn(Ig,r.lens,0,r.nlen,r.lencode,0,r.work,y),r.lenbits=y.bits,D){e.msg="invalid literal/lengths set",r.mode=Y;break}if(r.distbits=6,r.distcode=r.distdyn,y={bits:r.distbits},D=Qn(Ng,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,y),r.distbits=y.bits,D){e.msg="invalid distances set",r.mode=Y;break}if(r.mode=Fi,t===Li)break e;case Fi:r.mode=Ui;case Ui:if(s>=6&&l>=258){e.next_out=i,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=c,r.bits=u,tE(e,f),i=e.next_out,n=e.output,l=e.avail_out,o=e.next_in,a=e.input,s=e.avail_in,c=r.hold,u=r.bits,r.mode===Pt&&(r.back=-1);break}for(r.back=0;x=r.lencode[c&(1<<r.lenbits)-1],C=x>>>24,d=x>>>16&255,m=x&65535,!(C<=u);){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(d&&(d&240)===0){for(w=C,A=d,R=m;x=r.lencode[R+((c&(1<<w+A)-1)>>w)],C=x>>>24,d=x>>>16&255,m=x&65535,!(w+C<=u);){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}c>>>=w,u-=w,r.back+=w}if(c>>>=C,u-=C,r.back+=C,r.length=m,d===0){r.mode=Eg;break}if(d&32){r.back=-1,r.mode=Pt;break}if(d&64){e.msg="invalid literal/length code",r.mode=Y;break}r.extra=d&15,r.mode=xg;case xg:if(r.extra){for(g=r.extra;u<g;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=yg;case yg:for(;x=r.distcode[c&(1<<r.distbits)-1],C=x>>>24,d=x>>>16&255,m=x&65535,!(C<=u);){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if((d&240)===0){for(w=C,A=d,R=m;x=r.distcode[R+((c&(1<<w+A)-1)>>w)],C=x>>>24,d=x>>>16&255,m=x&65535,!(w+C<=u);){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}c>>>=w,u-=w,r.back+=w}if(c>>>=C,u-=C,r.back+=C,d&64){e.msg="invalid distance code",r.mode=Y;break}r.offset=m,r.extra=d&15,r.mode=wg;case wg:if(r.extra){for(g=r.extra;u<g;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Y;break}r.mode=Ag;case Ag:if(l===0)break e;if(h=f-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Y;break}h>r.wnext?(h-=r.wnext,v=r.wsize-h):v=r.wnext-h,h>r.length&&(h=r.length),b=r.window}else b=n,v=i-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do n[i++]=b[v++];while(--h);r.length===0&&(r.mode=Ui);break;case Eg:if(l===0)break e;n[i++]=r.length,l--,r.mode=Ui;break;case Bc:if(r.wrap){for(;u<32;){if(s===0)break e;s--,c|=a[o++]<<u,u+=8}if(f-=l,e.total_out+=f,r.total+=f,f&&(e.adler=r.check=r.flags?ft(r.check,n,f,i-f):Uc(r.check,n,f,i-f)),f=l,(r.flags?c:Rg(c))!==r.check){e.msg="incorrect data check",r.mode=Y;break}c=0,u=0}r.mode=Dg;case Dg:if(r.wrap&&r.flags){for(;u<32;){if(s===0)break e;s--,c+=a[o++]<<u,u+=8}if(c!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=Y;break}c=0,u=0}r.mode=Tg;case Tg:D=nE;break e;case Y:D=Og;break e;case Wc:return $c;case sE:default:return Xe}return e.next_out=i,e.avail_out=l,e.next_in=o,e.avail_in=s,r.hold=c,r.bits=u,(r.wsize||f!==e.avail_out&&r.mode<Y&&(r.mode<Bc||t!==og))&&Fg(e,e.output,e.next_out,f-e.avail_out)?(r.mode=Wc,$c):(p-=e.avail_in,f-=e.avail_out,e.total_in+=p,e.total_out+=f,r.total+=f,r.wrap&&f&&(e.adler=r.check=r.flags?ft(r.check,n,f,e.next_out-f):Uc(r.check,n,f,e.next_out-f)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Pt?128:0)+(r.mode===Fi||r.mode===Mc?256:0),(p===0&&f===0||t===og)&&D===Ar&&(D=iE),D)}function gE(e){if(!e||!e.state)return Xe;var t=e.state;return t.window&&(t.window=null),e.state=null,Ar}function vE(e,t){var r;return!e||!e.state||(r=e.state,(r.wrap&2)===0)?Xe:(r.head=t,t.done=!1,Ar)}function bE(e,t){var r=t.length,a,n,o;return!e||!e.state||(a=e.state,a.wrap!==0&&a.mode!==$i)?Xe:a.mode===$i&&(n=1,n=Uc(n,t,r,0),n!==a.check)?Og:(o=Fg(e,t,r,r),o?(a.mode=Wc,$c):(a.havedict=1,Ar))}Qe.inflateReset=Mg;Qe.inflateReset2=Bg;Qe.inflateResetKeep=kg;Qe.inflateInit=fE;Qe.inflateInit2=Lg;Qe.inflate=hE;Qe.inflateEnd=gE;Qe.inflateGetHeader=vE;Qe.inflateSetDictionary=bE;Qe.inflateInfo="pako inflate (from Nodeca project)"});var Vc=O((eO,$g)=>{"use strict";$g.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var Vg=O((tO,Wg)=>{"use strict";function SE(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Wg.exports=SE});var qg=O(Jn=>{"use strict";var Oa=Ug(),Yn=It(),Wi=Tc(),ie=Vc(),Gc=Ri(),CE=Rc(),xE=Vg(),Gg=Object.prototype.toString;function Er(e){if(!(this instanceof Er))return new Er(e);this.options=Yn.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new CE,this.strm.avail_out=0;var r=Oa.inflateInit2(this.strm,t.windowBits);if(r!==ie.Z_OK)throw new Error(Gc[r]);if(this.header=new xE,Oa.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Wi.string2buf(t.dictionary):Gg.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Oa.inflateSetDictionary(this.strm,t.dictionary),r!==ie.Z_OK)))throw new Error(Gc[r])}Er.prototype.push=function(e,t){var r=this.strm,a=this.options.chunkSize,n=this.options.dictionary,o,i,s,l,c,u=!1;if(this.ended)return!1;i=t===~~t?t:t===!0?ie.Z_FINISH:ie.Z_NO_FLUSH,typeof e=="string"?r.input=Wi.binstring2buf(e):Gg.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Yn.Buf8(a),r.next_out=0,r.avail_out=a),o=Oa.inflate(r,ie.Z_NO_FLUSH),o===ie.Z_NEED_DICT&&n&&(o=Oa.inflateSetDictionary(this.strm,n)),o===ie.Z_BUF_ERROR&&u===!0&&(o=ie.Z_OK,u=!1),o!==ie.Z_STREAM_END&&o!==ie.Z_OK)return this.onEnd(o),this.ended=!0,!1;r.next_out&&(r.avail_out===0||o===ie.Z_STREAM_END||r.avail_in===0&&(i===ie.Z_FINISH||i===ie.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Wi.utf8border(r.output,r.next_out),l=r.next_out-s,c=Wi.buf2string(r.output,s),r.next_out=l,r.avail_out=a-l,l&&Yn.arraySet(r.output,r.output,s,l,0),this.onData(c)):this.onData(Yn.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&o!==ie.Z_STREAM_END);return o===ie.Z_STREAM_END&&(i=ie.Z_FINISH),i===ie.Z_FINISH?(o=Oa.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===ie.Z_OK):(i===ie.Z_SYNC_FLUSH&&(this.onEnd(ie.Z_OK),r.avail_out=0),!0)};Er.prototype.onData=function(e){this.chunks.push(e)};Er.prototype.onEnd=function(e){e===ie.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Yn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function qc(e,t){var r=new Er(t);if(r.push(e,!0),r.err)throw r.msg||Gc[r.err];return r.result}function yE(e,t){return t=t||{},t.raw=!0,qc(e,t)}Jn.Inflate=Er;Jn.inflate=qc;Jn.inflateRaw=yE;Jn.ungzip=qc});var Hg=O((aO,Xg)=>{"use strict";var wE=It().assign,AE=Kh(),EE=qg(),DE=Vc(),zg={};wE(zg,AE,EE,DE);Xg.exports=zg});var Kg=O(Gi=>{"use strict";var TE=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",RE=Hg(),jg=ee(),Vi=Le(),_E=TE?"uint8array":"array";Gi.magic="\b\0";function Dr(e,t){Vi.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}jg.inherits(Dr,Vi);Dr.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(jg.transformTo(_E,e.data),!1)};Dr.prototype.flush=function(){Vi.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)};Dr.prototype.cleanUp=function(){Vi.prototype.cleanUp.call(this),this._pako=null};Dr.prototype._createPako=function(){this._pako=new RE[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};Gi.compressWorker=function(e){return new Dr("Deflate",e)};Gi.uncompressWorker=function(){return new Dr("Inflate",{})}});var Xc=O(zc=>{"use strict";var Zg=Le();zc.STORE={magic:"\0\0",compressWorker:function(){return new Zg("STORE compression")},uncompressWorker:function(){return new Zg("STORE decompression")}};zc.DEFLATE=Kg()});var Hc=O(Tr=>{"use strict";Tr.LOCAL_FILE_HEADER="PK";Tr.CENTRAL_FILE_HEADER="PK";Tr.CENTRAL_DIRECTORY_END="PK";Tr.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Tr.ZIP64_CENTRAL_DIRECTORY_END="PK";Tr.DATA_DESCRIPTOR="PK\x07\b"});var ev=O((sO,Jg)=>{"use strict";var Pa=ee(),ka=Le(),jc=xa(),Qg=wi(),qi=Hc(),Z=function(e,t){var r="",a;for(a=0;a<t;a++)r+=String.fromCharCode(e&255),e=e>>>8;return r},IE=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},NE=function(e){return(e||0)&63},Yg=function(e,t,r,a,n,o){var i=e.file,s=e.compression,l=o!==jc.utf8encode,c=Pa.transformTo("string",o(i.name)),u=Pa.transformTo("string",jc.utf8encode(i.name)),p=i.comment,f=Pa.transformTo("string",o(p)),h=Pa.transformTo("string",jc.utf8encode(p)),v=u.length!==i.name.length,b=h.length!==p.length,x,C,d="",m="",w="",A=i.dir,R=i.date,I={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(I.crc32=e.crc32,I.compressedSize=e.compressedSize,I.uncompressedSize=e.uncompressedSize);var D=0;t&&(D|=8),!l&&(v||b)&&(D|=2048);var T=0,y=0;A&&(T|=16),n==="UNIX"?(y=798,T|=IE(i.unixPermissions,A)):(y=20,T|=NE(i.dosPermissions,A)),x=R.getUTCHours(),x=x<<6,x=x|R.getUTCMinutes(),x=x<<5,x=x|R.getUTCSeconds()/2,C=R.getUTCFullYear()-1980,C=C<<4,C=C|R.getUTCMonth()+1,C=C<<5,C=C|R.getUTCDate(),v&&(m=Z(1,1)+Z(Qg(c),4)+u,d+="up"+Z(m.length,2)+m),b&&(w=Z(1,1)+Z(Qg(f),4)+h,d+="uc"+Z(w.length,2)+w);var g="";g+=`
15
+ \0`,g+=Z(D,2),g+=s.magic,g+=Z(x,2),g+=Z(C,2),g+=Z(I.crc32,4),g+=Z(I.compressedSize,4),g+=Z(I.uncompressedSize,4),g+=Z(c.length,2),g+=Z(d.length,2);var E=qi.LOCAL_FILE_HEADER+g+c+d,_=qi.CENTRAL_FILE_HEADER+Z(y,2)+g+Z(f.length,2)+"\0\0\0\0"+Z(T,4)+Z(a,4)+c+d+f;return{fileRecord:E,dirRecord:_}},OE=function(e,t,r,a,n){var o="",i=Pa.transformTo("string",n(a));return o=qi.CENTRAL_DIRECTORY_END+"\0\0\0\0"+Z(e,2)+Z(e,2)+Z(t,4)+Z(r,4)+Z(i.length,2)+i,o},PE=function(e){var t="";return t=qi.DATA_DESCRIPTOR+Z(e.crc32,4)+Z(e.compressedSize,4)+Z(e.uncompressedSize,4),t};function Ye(e,t,r,a){ka.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=a,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}Pa.inherits(Ye,ka);Ye.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,a=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,ka.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-a-1))/r:100}}))};Ye.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=Yg(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0};Ye.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=Yg(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:PE(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null};Ye.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,a=OE(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:a,meta:{percent:100}})};Ye.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()};Ye.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(r){t.error(r)}),this};Ye.prototype.resume=function(){if(!ka.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0};Ye.prototype.error=function(e){var t=this._sources;if(!ka.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch{}return!0};Ye.prototype.lock=function(){ka.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()};Jg.exports=Ye});var rv=O(tv=>{"use strict";var kE=Xc(),ME=ev(),BE=function(e,t){var r=e||t,a=kE[r];if(!a)throw new Error(r+" is not a valid compression method !");return a};tv.generateWorker=function(e,t,r){var a=new ME(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(o,i){n++;var s=BE(i.options.compression,t.compression),l=i.options.compressionOptions||t.compressionOptions||{},c=i.dir,u=i.date;i._compressWorker(s,l).withStreamInfo("file",{name:o,dir:c,date:u,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(a)}),a.entriesCount=n}catch(o){a.error(o)}return a}});var nv=O((cO,av)=>{"use strict";var LE=ee(),zi=Le();function eo(e,t){zi.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}LE.inherits(eo,zi);eo.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}})}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})};eo.prototype.pause=function(){return zi.prototype.pause.call(this)?(this._stream.pause(),!0):!1};eo.prototype.resume=function(){return zi.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};av.exports=eo});var mv=O((uO,fv)=>{"use strict";var FE=xa(),to=ee(),lv=Le(),UE=Jl(),cv=ec(),ov=Ai(),$E=ih(),WE=rv(),iv=In(),VE=nv(),uv=function(e,t,r){var a=to.getTypeOf(t),n,o=to.extend(r||{},cv);o.date=o.date||new Date,o.compression!==null&&(o.compression=o.compression.toUpperCase()),typeof o.unixPermissions=="string"&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&o.unixPermissions&16384&&(o.dir=!0),o.dosPermissions&&o.dosPermissions&16&&(o.dir=!0),o.dir&&(e=dv(e)),o.createFolders&&(n=GE(e))&&pv.call(this,n,!0);var i=a==="string"&&o.binary===!1&&o.base64===!1;(!r||typeof r.binary>"u")&&(o.binary=!i);var s=t instanceof ov&&t.uncompressedSize===0;(s||o.dir||!t||t.length===0)&&(o.base64=!1,o.binary=!0,t="",o.compression="STORE",a="string");var l=null;t instanceof ov||t instanceof lv?l=t:iv.isNode&&iv.isStream(t)?l=new VE(e,t):l=to.prepareContent(e,t,o.binary,o.optimizedBinaryString,o.base64);var c=new $E(e,l,o);this.files[e]=c},GE=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},dv=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},pv=function(e,t){return t=typeof t<"u"?t:cv.createFolders,e=dv(e),this.files[e]||uv.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function sv(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var qE={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,a;for(t in this.files)a=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,a)},filter:function(e){var t=[];return this.forEach(function(r,a){e(r,a)&&t.push(a)}),t},file:function(e,t,r){if(arguments.length===1)if(sv(e)){var a=e;return this.filter(function(o,i){return!i.dir&&a.test(o)})}else{var n=this.files[this.root+e];return n&&!n.dir?n:null}else e=this.root+e,uv.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(sv(e))return this.filter(function(n,o){return o.dir&&e.test(n)});var t=this.root+e,r=pv.call(this,t),a=this.clone();return a.root=r.name,a},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(n,o){return o.name.slice(0,e.length)===e}),a=0;a<r.length;a++)delete this.files[r[a].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=to.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:FE.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");to.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var a=r.comment||this.comment||"";t=WE.generateWorker(this,r,a)}catch(n){t=new lv("error"),t.error(n)}return new UE(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};fv.exports=qE});var Kc=O((dO,gv)=>{"use strict";var zE=ee();function hv(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}hv.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return zE.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};gv.exports=hv});var Zc=O((pO,bv)=>{"use strict";var vv=Kc(),XE=ee();function Ma(e){vv.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255}XE.inherits(Ma,vv);Ma.prototype.byteAt=function(e){return this.data[this.zero+e]};Ma.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),a=e.charCodeAt(2),n=e.charCodeAt(3),o=this.length-4;o>=0;--o)if(this.data[o]===t&&this.data[o+1]===r&&this.data[o+2]===a&&this.data[o+3]===n)return o-this.zero;return-1};Ma.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),a=e.charCodeAt(2),n=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&r===o[1]&&a===o[2]&&n===o[3]};Ma.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};bv.exports=Ma});var xv=O((fO,Cv)=>{"use strict";var Sv=Kc(),HE=ee();function Ba(e){Sv.call(this,e)}HE.inherits(Ba,Sv);Ba.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};Ba.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};Ba.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};Ba.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};Cv.exports=Ba});var Yc=O((mO,wv)=>{"use strict";var yv=Zc(),jE=ee();function Qc(e){yv.call(this,e)}jE.inherits(Qc,yv);Qc.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};wv.exports=Qc});var Dv=O((hO,Ev)=>{"use strict";var Av=Yc(),KE=ee();function Jc(e){Av.call(this,e)}KE.inherits(Jc,Av);Jc.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};Ev.exports=Jc});var eu=O((gO,Rv)=>{"use strict";var Xi=ee(),Tv=Rt(),ZE=Zc(),QE=xv(),YE=Dv(),JE=Yc();Rv.exports=function(e){var t=Xi.getTypeOf(e);return Xi.checkSupport(t),t==="string"&&!Tv.uint8array?new QE(e):t==="nodebuffer"?new YE(e):Tv.uint8array?new JE(Xi.transformTo("uint8array",e)):new ZE(Xi.transformTo("array",e))}});var Ov=O((vO,Nv)=>{"use strict";var tu=eu(),tr=ee(),eD=Ai(),_v=wi(),Hi=xa(),ji=Xc(),tD=Rt(),rD=0,aD=3,nD=function(e){for(var t in ji)if(Object.prototype.hasOwnProperty.call(ji,t)&&ji[t].magic===e)return ji[t];return null};function Iv(e,t){this.options=e,this.loadOptions=t}Iv.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=nD(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+tr.pretty(this.compressionMethod)+" unknown (inner file : "+tr.transformTo("string",this.fileName)+")");this.decompressed=new eD(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===rD&&(this.dosPermissions=this.externalFileAttributes&63),e===aD&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=tu(this.extraFields[1].value);this.uncompressedSize===tr.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===tr.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===tr.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===tr.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,a,n;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),a=e.readInt(2),n=e.readData(a),this.extraFields[r]={id:r,length:a,value:n};e.setIndex(t)},handleUTF8:function(){var e=tD.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=Hi.utf8decode(this.fileName),this.fileCommentStr=Hi.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else{var r=tr.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var a=this.findExtraFieldUnicodeComment();if(a!==null)this.fileCommentStr=a;else{var n=tr.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=tu(e.value);return t.readInt(1)!==1||_v(this.fileName)!==t.readInt(4)?null:Hi.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=tu(e.value);return t.readInt(1)!==1||_v(this.fileComment)!==t.readInt(4)?null:Hi.utf8decode(t.readData(e.length-5))}return null}};Nv.exports=Iv});var Mv=O((bO,kv)=>{"use strict";var oD=eu(),kt=ee(),Je=Hc(),iD=Ov(),sD=Rt();function Pv(e){this.files=[],this.loadOptions=e}Pv.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+kt.pretty(t)+", expected "+kt.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var a=this.reader.readString(4),n=a===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=sD.uint8array?"uint8array":"array",r=kt.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t=0,r,a,n;t<e;)r=this.reader.readInt(2),a=this.reader.readInt(4),n=this.reader.readData(a),this.zip64ExtensibleData[r]={id:r,length:a,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(Je.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(Je.CENTRAL_FILE_HEADER);)e=new iD({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(Je.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,Je.LOCAL_FILE_HEADER);throw t?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(Je.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===kt.MAX_VALUE_16BITS||this.diskWithCentralDirStart===kt.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===kt.MAX_VALUE_16BITS||this.centralDirRecords===kt.MAX_VALUE_16BITS||this.centralDirSize===kt.MAX_VALUE_32BITS||this.centralDirOffset===kt.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(Je.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(Je.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,Je.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(Je.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(Je.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var a=this.centralDirOffset+this.centralDirSize;this.zip64&&(a+=20,a+=12+this.zip64EndOfCentralSize);var n=r-a;if(n>0)this.isSignature(r,Je.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=oD(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};kv.exports=Pv});var Fv=O((SO,Lv)=>{"use strict";var ru=ee(),Ki=ba(),lD=xa(),cD=Mv(),uD=ac(),Bv=In();function dD(e){return new Ki.Promise(function(t,r){var a=e.decompressed.getContentWorker().pipe(new uD);a.on("error",function(n){r(n)}).on("end",function(){a.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}Lv.exports=function(e,t){var r=this;return t=ru.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:lD.utf8decode}),Bv.isNode&&Bv.isStream(e)?Ki.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):ru.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(a){var n=new cD(t);return n.load(a),n}).then(function(n){var o=[Ki.Promise.resolve(n)],i=n.files;if(t.checkCRC32)for(var s=0;s<i.length;s++)o.push(dD(i[s]));return Ki.Promise.all(o)}).then(function(n){for(var o=n.shift(),i=o.files,s=0;s<i.length;s++){var l=i[s],c=l.fileNameStr,u=ru.resolve(l.fileNameStr);r.file(u,l.decompressed,{binary:!0,optimizedBinaryString:!0,date:l.date,dir:l.dir,comment:l.fileCommentStr.length?l.fileCommentStr:null,unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions,createFolders:t.createFolders}),l.dir||(r.file(u).unsafeOriginalName=c)}return o.zipComment.length&&(r.comment=o.zipComment),r})}});var $v=O((CO,Uv)=>{"use strict";function He(){if(!(this instanceof He))return new He;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new He;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e}}He.prototype=mv();He.prototype.loadAsync=Fv();He.support=Rt();He.defaults=ec();He.version="3.10.1";He.loadAsync=function(e,t){return new He().loadAsync(e,t)};He.external=ba();Uv.exports=He});var oo=()=>{};console.log=oo;console.info=oo;console.warn=oo;console.debug=oo;var Nr=be(xd(),1);import Fa from"node:fs";function Zr(e){return typeof e!="number"||e<0||e>=196?"??":e<100?String(e).padStart(2,"0"):(e+60).toString(16).toUpperCase().padStart(2,"0")}function Ne(e){if(typeof e!="string"||e.length!==2)return null;let t=e[0],r=e[1],a=t>="0"&&t<="9",n=r>="0"&&r<="9",o=t>="A"&&t<="F",i=n||r>="A"&&r<="F";return a&&n?parseInt(e,10):o&&i?parseInt(e,16)-60:null}var yd=256;function Oe(e){return typeof e!="number"||e<0||e>=yd?"00":e.toString(16).toUpperCase().padStart(2,"0")}function wd(e){if(typeof e!="string")return null;let t=parseInt(e,16);return isNaN(t)||t<0||t>=yd?null:t}var nn=8,Ad=99;var vS=e=>[{id:"system",label:e("triggers.cat.system")},{id:"io",label:e("triggers.cat.io")},{id:"speed",label:e("triggers.cat.speed")},{id:"analog",label:e("triggers.cat.analog")},{id:"timer",label:e("triggers.cat.timer")},{id:"geo",label:e("triggers.cat.geo")},{id:"gps",label:e("triggers.cat.gps")},{id:"accel",label:e("triggers.cat.accel")},{id:"ble",label:e("triggers.cat.ble")},{id:"can",label:e("triggers.cat.can")},{id:"comm",label:e("triggers.cat.comm")},{id:"power",label:e("triggers.cat.power")}],HD=vS(e=>({"triggers.cat.system":"Sistema","triggers.cat.io":"Entradas / Salidas","triggers.cat.speed":"Velocidad","triggers.cat.analog":"Anal\xF3gico / Bater\xEDa","triggers.cat.timer":"Timers","triggers.cat.geo":"Geocercas","triggers.cat.gps":"GPS","triggers.cat.accel":"Aceler\xF3metro","triggers.cat.ble":"Bluetooth / BLE","triggers.cat.can":"CAN / Variables","triggers.cat.comm":"Comunicaciones","triggers.cat.power":"Alimentaci\xF3n"})[e]||e),bS=e=>[{token:"IN",minIdx:0,maxIdx:9,description:e("triggers.in"),category:"io"},{token:"XP",minIdx:0,maxIdx:2,description:e("triggers.xp"),category:"io"},{token:"FCT",minIdx:0,maxIdx:5,description:e("triggers.fct"),category:"io"},{token:"OW",minIdx:0,maxIdx:7,description:e("triggers.ow"),category:"io"},{token:"OWP",minIdx:0,maxIdx:1,description:e("triggers.owp"),category:"io",indices:{0:e("triggers.owp.portA"),1:e("triggers.owp.portB")}},{token:"PB",minIdx:0,maxIdx:1,description:e("triggers.pb"),category:"io"},{token:"VL",minIdx:0,maxIdx:15,description:e("triggers.vl"),category:"speed"},{token:"AR",minIdx:0,maxIdx:11,description:e("triggers.ar"),category:"analog"},{token:"VBU",minIdx:0,maxIdx:3,description:e("triggers.vbu"),category:"analog",indices:{0:"OFF",1:"LOW",2:"FULL",3:"DOWN"}},{token:"KO",minIdx:0,maxIdx:4,description:e("triggers.ko"),category:"analog",indices:{0:e("triggers.ko.fullSleep"),1:e("triggers.ko.partialRest"),2:"Full ON",3:e("triggers.ko.enabled"),4:e("triggers.ko.exitingUlp")}},{token:"TD",minIdx:0,maxIdx:31,description:e("triggers.td"),category:"timer"},{token:"TR",minIdx:0,maxIdx:7,description:e("triggers.tr"),category:"timer"},{token:"NT",minIdx:0,maxIdx:31,description:e("triggers.nt"),category:"timer"},{token:"HM",minIdx:0,maxIdx:7,description:e("triggers.hm"),category:"timer"},{token:"WP",minIdx:0,maxIdx:31,description:e("triggers.wp"),category:"geo"},{token:"RG",minIdx:0,maxIdx:31,description:e("triggers.rg"),category:"geo"},{token:"ZNA",minIdx:0,maxIdx:Ad,description:e("triggers.zna"),category:"geo"},{token:"ZNB",minIdx:0,maxIdx:Ad,description:e("triggers.znb"),category:"geo"},{token:"PK",minIdx:0,maxIdx:1,description:e("triggers.pk"),category:"geo",indices:{0:e("triggers.pk.parked"),1:e("triggers.pk.enabled")}},{token:"DC",minIdx:0,maxIdx:2,description:e("triggers.dc"),category:"gps"},{token:"DV",minIdx:0,maxIdx:3,description:e("triggers.dv"),category:"gps"},{token:"TK",minIdx:0,maxIdx:2,description:e("triggers.tk"),category:"gps",indices:{0:e("triggers.tk.fired"),1:e("triggers.tk.enabled"),2:e("triggers.tk.state")}},{token:"MVXP",minIdx:0,maxIdx:3,description:e("triggers.mvxp"),category:"accel"},{token:"MVXN",minIdx:0,maxIdx:3,description:e("triggers.mvxn"),category:"accel"},{token:"MVYP",minIdx:0,maxIdx:3,description:e("triggers.mvyp"),category:"accel"},{token:"MVYN",minIdx:0,maxIdx:3,description:e("triggers.mvyn"),category:"accel"},{token:"MVZP",minIdx:0,maxIdx:3,description:e("triggers.mvzp"),category:"accel"},{token:"MVZN",minIdx:0,maxIdx:3,description:e("triggers.mvzn"),category:"accel"},{token:"BS",minIdx:0,maxIdx:3,description:e("triggers.bs"),category:"ble"},{token:"BE",minIdx:0,maxIdx:4,description:e("triggers.be"),category:"ble"},{token:"BSW",minIdx:0,maxIdx:3,description:e("triggers.bsw"),category:"ble"},{token:"BSWN",minIdx:0,maxIdx:3,description:e("triggers.bswn"),category:"ble"},{token:"DTC",minIdx:0,maxIdx:3,description:e("triggers.dtc"),category:"can",indices:{0:e("triggers.dtc.active"),1:e("triggers.dtc.new"),2:e("triggers.dtc.lamp"),3:e("triggers.dtc.cleared")}},{token:"UV",minIdx:0,maxIdx:47,description:e("triggers.uv"),category:"can"},{token:"U",minIdx:0,maxIdx:63,description:e("triggers.u"),category:"can"},{token:"XB",minIdx:0,maxIdx:7,description:e("triggers.xb"),category:"system"},{token:"RL",minIdx:0,maxIdx:195,description:e("triggers.rl"),category:"system"},{token:"ACK",minIdx:0,maxIdx:6,description:e("triggers.ack"),category:"system"},{token:"IC",minIdx:0,maxIdx:3,description:e("triggers.ic"),category:"system",indices:{0:e("triggers.icSession"),1:e("triggers.icMode"),2:e("triggers.icValid"),3:e("triggers.icInvalid")}},{token:"ICL",minIdx:0,maxIdx:99,description:e("triggers.icl"),category:"system"},{token:"DRV",minIdx:0,maxIdx:4,description:e("triggers.drv"),category:"system",indices:{0:e("triggers.drvOn"),1:e("triggers.drvLogin"),2:e("triggers.drvLogout"),3:e("triggers.drvInvalid"),4:e("triggers.drvWindow")}},{token:"MC",minIdx:0,maxIdx:nn-1,description:"Mobile Country Code",category:"system"},{token:"SIM",minIdx:0,maxIdx:1,description:e("triggers.sim"),category:"comm",indices:{0:"SIM 0",1:"SIM 1"}},{token:"CID",minIdx:0,maxIdx:9,description:e("triggers.cid"),category:"comm"},{token:"CQ",minIdx:0,maxIdx:3,description:e("triggers.cq"),category:"comm"}],SS=e=>[{token:"IGN",description:e("triggers.ign"),category:"system"},{token:"PWR",description:e("triggers.pwr"),category:"system"},{token:"BU",description:e("triggers.bu"),category:"system"},{token:"GPS",description:e("triggers.gps"),category:"gps"},{token:"AC",description:e("triggers.ac"),category:"accel"},{token:"CEL",description:e("triggers.cel"),category:"comm"},{token:"WIF",description:e("triggers.wif"),category:"comm"},{token:"JMD",description:e("triggers.jmd"),category:"comm"},{token:"CAN",description:e("triggers.can"),category:"can"},{token:"BTH",description:e("triggers.bth"),category:"ble"},{token:"TT",description:e("triggers.tt"),category:"timer"},{token:"INTPWR",description:e("triggers.intpwr"),category:"power"},{token:"VIOPWR",description:e("triggers.viopwr"),category:"power"},{token:"CELPWR",description:e("triggers.celpwr"),category:"power"},{token:"GPSPWR",description:e("triggers.gpspwr"),category:"power"},{token:"WIFPWR",description:e("triggers.wifpwr"),category:"power"},{token:"BTHPWR",description:e("triggers.bthpwr"),category:"power"}],Eo=bS(e=>e),Ps=SS(e=>e),CS=e=>[{token:"+",label:e("triggers.sense.active"),description:e("triggers.sense.activeDesc")},{token:"-",label:e("triggers.sense.deactive"),description:e("triggers.sense.deactiveDesc")},{token:"*",label:e("triggers.sense.change"),description:e("triggers.sense.changeDesc")}],xS=e=>[{token:"&",label:"AND",description:e("triggers.op.and")},{token:"|",label:"OR",description:e("triggers.op.or")},{token:"^",label:"XOR",description:e("triggers.op.xor")},{token:"&!",label:"NAND",description:e("triggers.op.nand")},{token:"|!",label:"NOR",description:e("triggers.op.nor")},{token:"^!",label:"XNOR",description:e("triggers.op.xnor")}],jD=CS(e=>e),KD=xS(e=>e);function on(e){return Eo.some(t=>t.token===e)}function Ed(e,t){return e==="RL"||e==="ZNA"||e==="ZNB"?Zr(t??0):String(t??0).padStart(2,"0")}function yS(e,t){return Ed(e,t)}function Dd(e,t){if(!e||e.length===0)return"";let r=({token:n,index:o,negate:i})=>{let l=on(n)?yS(n,o):"";return`${n}${l}${i?"!":""}`},a=r(e[0]);for(let n=1;n<e.length;n++)a+=r(e[n])+(t[n-1]||"&");return a}var Os=new Set([...Eo,...Ps].map(e=>e.token));function wS(e){if(Os.has(e))return e;for(let t=e.length-1;t>=2;t--){let r=e.slice(0,t);if(!Os.has(r)||on(r))continue;let a=e.slice(t);for(let n of Os)if(a.startsWith(n))return r}return e}function bt(e){if(!e||!e.trim())return{terms:[],operators:[]};let t=e.trim(),r=[],a=[],n=()=>{let s=t.match(/^RL([0-9A-F]{2})(!)?/);if(s){let p=Ne(s[1]);if(p!==null)return t=t.slice(s[0].length),{token:"RL",index:p,negate:s[2]==="!"}}if(s=t.match(/^(ZNA|ZNB)([0-9A-F]{2})(!)?/),s){let p=Ne(s[2]);if(p!==null)return t=t.slice(s[0].length),{token:s[1],index:p,negate:s[3]==="!"}}if(s=t.match(/^[A-Z]+/),!s)return null;let l=wS(s[0]);t=t.slice(l.length),s=t.match(/^(\d*)(!)?/),t=t.slice(s[0].length);let c=s[1]||void 0,u=c!==void 0?parseInt(c,10):null;return{token:l,index:u,negate:s[2]==="!"}},o=()=>{let s=t.match(/^(\^!|&!|\|!|\^|&|\|)/);return s?(t=t.slice(s[1].length),s[1]):null},i=n();if(!i)return{terms:[],operators:[]};for(r.push(i);t.length>0;){let s=n();if(!s)break;r.push(s);let l=o();l&&a.push(l)}return{terms:r,operators:a}}function ks(e){if(!e)return"";let{terms:t,operators:r}=bt(e);if(!t.length)return e;let a={"&":"AND","|":"OR","^":"XOR","&!":"NAND","|!":"NOR","^!":"XNOR"},n=i=>{let l=on(i.token)?Ed(i.token,i.index):"",c=`${i.token}${l}`;return i.negate?`(NOT ${c})`:c},o=n(t[0]);for(let i=1;i<t.length;i++){let s=a[r[i-1]||"&"]||"AND";o=`(${o} ${s} ${n(t[i])})`}return o}var L=e=>typeof e=="string",sn=()=>{let e,t,r=new Promise((a,n)=>{e=a,t=n});return r.resolve=e,r.reject=t,r},Td=e=>e==null?"":""+e,AS=(e,t,r)=>{e.forEach(a=>{t[a]&&(r[a]=t[a])})},ES=/###/g,Rd=e=>e&&e.indexOf("###")>-1?e.replace(ES,"."):e,_d=e=>!e||L(e),ln=(e,t,r)=>{let a=L(t)?t.split("."):t,n=0;for(;n<a.length-1;){if(_d(e))return{};let o=Rd(a[n]);!e[o]&&r&&(e[o]=new r),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++n}return _d(e)?{}:{obj:e,k:Rd(a[n])}},Id=(e,t,r)=>{let{obj:a,k:n}=ln(e,t,Object);if(a!==void 0||t.length===1){a[n]=r;return}let o=t[t.length-1],i=t.slice(0,t.length-1),s=ln(e,i,Object);for(;s.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),s=ln(e,i,Object),s?.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=r},DS=(e,t,r,a)=>{let{obj:n,k:o}=ln(e,t,Object);n[o]=n[o]||[],n[o].push(r)},To=(e,t)=>{let{obj:r,k:a}=ln(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,a))return r[a]},TS=(e,t,r)=>{let a=To(e,r);return a!==void 0?a:To(t,r)},Ld=(e,t,r)=>{for(let a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?L(e[a])||e[a]instanceof String||L(t[a])||t[a]instanceof String?r&&(e[a]=t[a]):Ld(e[a],t[a],r):e[a]=t[a]);return e},sr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),RS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},_S=e=>L(e)?e.replace(/[&<>"'\/]/g,t=>RS[t]):e,Fs=class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){let r=this.regExpMap.get(t);if(r!==void 0)return r;let a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}},IS=[" ",",","?","!",";"],NS=new Fs(20),OS=(e,t,r)=>{t=t||"",r=r||"";let a=IS.filter(i=>t.indexOf(i)<0&&r.indexOf(i)<0);if(a.length===0)return!0;let n=NS.getRegExp(`(${a.map(i=>i==="?"?"\\?":i).join("|")})`),o=!n.test(e);if(!o){let i=e.indexOf(r);i>0&&!n.test(e.substring(0,i))&&(o=!0)}return o},Us=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let a=t.split(r),n=e;for(let o=0;o<a.length;){if(!n||typeof n!="object")return;let i,s="";for(let l=o;l<a.length;++l)if(l!==o&&(s+=r),s+=a[l],i=n[s],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<a.length-1)continue;o+=l-o+1;break}n=i}return n},cn=e=>e?.replace(/_/g,"-"),PS={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}},$s=class e{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||PS,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,a,n){return n&&!this.debug?null:(L(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},nt=new $s,Qr=class{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);let n=this.observers[a].get(r)||0;this.observers[a].set(r,n+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([n,o])=>{for(let i=0;i<o;i++)n(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,o])=>{for(let i=0;i<o;i++)n.apply(n,[t,...r])})}},Ro=class extends Qr{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){let r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,a,n={}){let o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,i=n.ignoreJSONStructure!==void 0?n.ignoreJSONStructure:this.options.ignoreJSONStructure,s;t.indexOf(".")>-1?s=t.split("."):(s=[t,r],a&&(Array.isArray(a)?s.push(...a):L(a)&&o?s.push(...a.split(o)):s.push(a)));let l=To(this.data,s);return!l&&!r&&!a&&t.indexOf(".")>-1&&(t=s[0],r=s[1],a=s.slice(2).join(".")),l||!i||!L(a)?l:Us(this.data?.[t]?.[r],a,o)}addResource(t,r,a,n,o={silent:!1}){let i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=[t,r];a&&(s=s.concat(i?a.split(i):a)),t.indexOf(".")>-1&&(s=t.split("."),n=r,r=s[1]),this.addNamespaces(r),Id(this.data,s,n),o.silent||this.emit("added",t,r,a,n)}addResources(t,r,a,n={silent:!1}){for(let o in a)(L(a[o])||Array.isArray(a[o]))&&this.addResource(t,r,o,a[o],{silent:!0});n.silent||this.emit("added",t,r,a)}addResourceBundle(t,r,a,n,o,i={silent:!1,skipCopy:!1}){let s=[t,r];t.indexOf(".")>-1&&(s=t.split("."),n=a,a=r,r=s[1]),this.addNamespaces(r);let l=To(this.data,s)||{};i.skipCopy||(a=JSON.parse(JSON.stringify(a))),n?Ld(l,a,o):l={...l,...a},Id(this.data,s,l),i.silent||this.emit("added",t,r,a)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){let r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(n=>r[n]&&Object.keys(r[n]).length>0)}toJSON(){return this.data}},Fd={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,a,n){return e.forEach(o=>{t=this.processors[o]?.process(t,r,a,n)??t}),t}},Ud=Symbol("i18next/PATH_KEY");function kS(){let e=[],t=Object.create(null),r;return t.get=(a,n)=>(r?.revoke?.(),n===Ud?e:(e.push(n),r=Proxy.revocable(a,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}function lr(e,t){let{[Ud]:r}=e(kS()),a=t?.keySeparator??".",n=t?.nsSeparator??":";if(r.length>1&&n){let o=t?.ns,i=Array.isArray(o)?o:null;if(i&&i.length>1&&i.slice(1).includes(r[0]))return`${r[0]}${n}${r.slice(1).join(a)}`}return r.join(a)}var Nd={},Ms=e=>!L(e)&&typeof e!="boolean"&&typeof e!="number",_o=class e extends Qr{constructor(t,r={}){super(),AS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=nt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){let a={...r};if(t==null)return!1;let n=this.resolve(t,a);if(n?.res===void 0)return!1;let o=Ms(n.res);return!(a.returnObjects===!1&&o)}extractFromKey(t,r){let a=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");let n=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ns||this.options.defaultNS||[],i=a&&t.indexOf(a)>-1,s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!OS(t,a,n);if(i&&!s){let l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:L(o)?[o]:o};let c=t.split(a);(a!==n||a===n&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(n)}return{key:t,namespaces:L(o)?[o]:o}}translate(t,r,a){let n=typeof r=="object"?{...r}:r;if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";typeof t=="function"&&(t=lr(t,{...this.options,...n})),Array.isArray(t)||(t=[String(t)]),t=t.map(_=>typeof _=="function"?lr(_,{...this.options,...n}):String(_));let o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],n),c=l[l.length-1],u=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");let p=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return f?o?{res:`${c}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${u}${s}`:o?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:s;let h=this.resolve(t,n),v=h?.res,b=h?.usedKey||s,x=h?.exactUsedKey||s,C=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,w=n.count!==void 0&&!L(n.count),A=e.hasDefaultValue(n),R=w?this.pluralResolver.getSuffix(p,n.count,n):"",I=n.ordinal&&w?this.pluralResolver.getSuffix(p,n.count,{ordinal:!1}):"",D=w&&!n.ordinal&&n.count===0,T=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${I}`]||n.defaultValue,y=v;m&&!v&&A&&(y=T);let g=Ms(y),E=Object.prototype.toString.apply(y);if(m&&y&&g&&C.indexOf(E)<0&&!(L(d)&&Array.isArray(y))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,y,{...n,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(h.res=_,h.usedParams=this.getUsedParamsDetails(n),h):_}if(i){let _=Array.isArray(y),N=_?[]:{},B=_?x:b;for(let F in y)if(Object.prototype.hasOwnProperty.call(y,F)){let V=`${B}${i}${F}`;A&&!v?N[F]=this.translate(V,{...n,defaultValue:Ms(T)?T[F]:void 0,joinArrays:!1,ns:l}):N[F]=this.translate(V,{...n,joinArrays:!1,ns:l}),N[F]===V&&(N[F]=y[F])}v=N}}else if(m&&L(d)&&Array.isArray(v))v=v.join(d),v&&(v=this.extendTranslation(v,t,n,a));else{let _=!1,N=!1;!this.isValidLookup(v)&&A&&(_=!0,v=T),this.isValidLookup(v)||(N=!0,v=s);let F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:v,V=A&&T!==v&&this.options.updateMissing;if(N||_||V){if(this.logger.log(V?"updateKey":"missingKey",p,c,s,V?T:v),i){let k=this.resolve(s,{...n,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let se=[],Te=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Te&&Te[0])for(let k=0;k<Te.length;k++)se.push(Te[k]);else this.options.saveMissingTo==="all"?se=this.languageUtils.toResolveHierarchy(n.lng||this.language):se.push(n.lng||this.language);let Ue=(k,te,$e)=>{let et=A&&$e!==v?$e:F;this.options.missingKeyHandler?this.options.missingKeyHandler(k,c,te,et,V,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(k,c,te,et,V,n),this.emit("missingKey",k,c,te,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?se.forEach(k=>{let te=this.pluralResolver.getSuffixes(k,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&te.indexOf(`${this.options.pluralSeparator}zero`)<0&&te.push(`${this.options.pluralSeparator}zero`),te.forEach($e=>{Ue([k],s+$e,n[`defaultValue${$e}`]||T)})}):Ue(se,s,T))}v=this.extendTranslation(v,t,n,h,a),N&&v===s&&this.options.appendNamespaceToMissingKey&&(v=`${c}${u}${s}`),(N||_)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${s}`:s,_?v:void 0,n))}return o?(h.res=v,h.usedParams=this.getUsedParamsDetails(n),h):v}extendTranslation(t,r,a,n,o){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});let l=L(t)&&(a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(l){let p=t.match(this.interpolator.nestingRegexp);c=p&&p.length}let u=a.replace&&!L(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,a.lng||this.language||n.usedLng,a),l){let p=t.match(this.interpolator.nestingRegexp),f=p&&p.length;c<f&&(a.nest=!1)}!a.lng&&n&&n.res&&(a.lng=this.language||n.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,(...p)=>o?.[0]===p[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${r[0]}`),null):this.translate(...p,r),a)),a.interpolation&&this.interpolator.reset()}let i=a.postProcess||this.options.postProcess,s=L(i)?[i]:i;return t!=null&&s?.length&&a.applyPostProcessor!==!1&&(t=Fd.handle(s,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t,r={}){let a,n,o,i,s;return L(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?lr(l,{...this.options,...r}):l)),t.forEach(l=>{if(this.isValidLookup(a))return;let c=this.extractFromKey(l,r),u=c.key;n=u;let p=c.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));let f=r.count!==void 0&&!L(r.count),h=f&&!r.ordinal&&r.count===0,v=r.context!==void 0&&(L(r.context)||typeof r.context=="number")&&r.context!=="",b=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);p.forEach(x=>{this.isValidLookup(a)||(s=x,!Nd[`${b[0]}-${x}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(Nd[`${b[0]}-${x}`]=!0,this.logger.warn(`key "${n}" for languages "${b.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(C=>{if(this.isValidLookup(a))return;i=C;let d=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(d,u,C,x,r);else{let w;f&&(w=this.pluralResolver.getSuffix(C,r.count,r));let A=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&w.indexOf(R)===0&&d.push(u+w.replace(R,this.options.pluralSeparator)),d.push(u+w),h&&d.push(u+A)),v){let I=`${u}${this.options.contextSeparator||"_"}${r.context}`;d.push(I),f&&(r.ordinal&&w.indexOf(R)===0&&d.push(I+w.replace(R,this.options.pluralSeparator)),d.push(I+w),h&&d.push(I+A))}}let m;for(;m=d.pop();)this.isValidLookup(a)||(o=m,a=this.getResource(C,x,m,r))}))})}),{res:a,usedKey:n,exactUsedKey:o,usedLng:i,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,a,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,a,n):this.resourceStore.getResource(t,r,a,n)}getUsedParamsDetails(t={}){let r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!L(t.replace),n=a?t.replace:t;if(a&&typeof t.count<"u"&&(n.count=t.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!a){n={...n};for(let o of r)delete n[o]}return n}static hasDefaultValue(t){let r="defaultValue";for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&r===a.substring(0,r.length)&&t[a]!==void 0)return!0;return!1}},Io=class{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=nt.create("languageUtils")}getScriptPartFromCode(t){if(t=cn(t),!t||t.indexOf("-")<0)return null;let r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=cn(t),!t||t.indexOf("-")<0)return t;let r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(L(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(a=>{if(r)return;let n=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(n))&&(r=n)}),!r&&this.options.supportedLngs&&t.forEach(a=>{if(r)return;let n=this.getScriptPartFromCode(a);if(this.isSupportedCode(n))return r=n;let o=this.getLanguagePartFromCode(a);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),L(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let a=t[r];return a||(a=t[this.getScriptPartFromCode(r)]),a||(a=t[this.formatLanguageCode(r)]),a||(a=t[this.getLanguagePartFromCode(r)]),a||(a=t.default),a||[]}toResolveHierarchy(t,r){let a=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),n=[],o=i=>{i&&(this.isSupportedCode(i)?n.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return L(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):L(t)&&o(this.formatLanguageCode(t)),a.forEach(i=>{n.indexOf(i)<0&&o(this.formatLanguageCode(i))}),n}},Od={zero:0,one:1,two:2,few:3,many:4,other:5},Pd={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Ws=class{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=nt.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){let a=cn(t==="dev"?"en":t),n=r.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:a,type:n});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(a,{type:n})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Pd;if(!t.match(/-|_/))return Pd;let l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,r)}return this.pluralRulesCache[o]=i,i}needsPlural(t,r={}){let a=this.getRule(t,r);return a||(a=this.getRule("dev",r)),a?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,a={}){return this.getSuffixes(t,a).map(n=>`${r}${n}`)}getSuffixes(t,r={}){let a=this.getRule(t,r);return a||(a=this.getRule("dev",r)),a?a.resolvedOptions().pluralCategories.sort((n,o)=>Od[n]-Od[o]).map(n=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n}`):[]}getSuffix(t,r,a={}){let n=this.getRule(t,a);return n?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${n.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,a))}},kd=(e,t,r,a=".",n=!0)=>{let o=TS(e,t,r);return!o&&n&&L(r)&&(o=Us(e,r,a),o===void 0&&(o=Us(t,r,a))),o},Bs=e=>e.replace(/\$/g,"$$$$"),No=class{constructor(t={}){this.logger=nt.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});let{escape:r,escapeValue:a,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:v,nestingSuffixEscaped:b,nestingOptionsSeparator:x,maxReplaces:C,alwaysFormat:d}=t.interpolation;this.escape=r!==void 0?r:_S,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=n!==void 0?n:!1,this.prefix=o?sr(o):i||"{{",this.suffix=s?sr(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?sr(f):h||sr("$t("),this.nestingSuffix=v?sr(v):b||sr(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=C||1e3,this.alwaysFormat=d!==void 0?d:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let t=(r,a)=>r?.source===a?(r.lastIndex=0,r):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,a,n){let o,i,s,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(h.indexOf(this.formatSeparator)<0){let C=kd(r,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,a,{...n,...r,interpolationkey:h}):C}let v=h.split(this.formatSeparator),b=v.shift().trim(),x=v.join(this.formatSeparator).trim();return this.format(kd(r,l,b,this.options.keySeparator,this.options.ignoreJSONStructure),x,a,{...n,...r,interpolationkey:b})};this.resetRegExp();let u=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Bs(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Bs(this.escape(h)):Bs(h)}].forEach(h=>{for(s=0;o=h.regex.exec(t);){let v=o[1].trim();if(i=c(v),i===void 0)if(typeof u=="function"){let x=u(t,o,n);i=L(x)?x:""}else if(n&&Object.prototype.hasOwnProperty.call(n,v))i="";else if(p){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!L(i)&&!this.useRawValueToEscape&&(i=Td(i));let b=h.safeValue(i);if(t=t.replace(o[0],b),p?(h.regex.lastIndex+=i.length,h.regex.lastIndex-=o[0].length):h.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,r,a={}){let n,o,i,s=(l,c)=>{let u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;let p=l.split(new RegExp(`${sr(u)}[ ]*{`)),f=`{${p[1]}`;l=p[0],f=this.interpolate(f,i);let h=f.match(/'/g),v=f.match(/"/g);((h?.length??0)%2===0&&!v||(v?.length??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{i=JSON.parse(f),c&&(i={...c,...i})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,b),`${l}${u}${f}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;n=this.nestingRegexp.exec(t);){let l=[];i={...a},i=i.replace&&!L(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let c=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(c!==-1&&(l=n[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),n[1]=n[1].slice(0,c)),o=r(s.call(this,n[1].trim(),i),i),o&&n[0]===t&&!L(o))return o;L(o)||(o=Td(o)),o||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),o=""),l.length&&(o=l.reduce((u,p)=>this.format(u,p,a.lng,{...a,interpolationkey:n[1].trim()}),o.trim())),t=t.replace(n[0],o),this.regexp.lastIndex=0}return t}},MS=e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let a=e.split("(");t=a[0].toLowerCase().trim();let n=a[1].substring(0,a[1].length-1);t==="currency"&&n.indexOf(":")<0?r.currency||(r.currency=n.trim()):t==="relativetime"&&n.indexOf(":")<0?r.range||(r.range=n.trim()):n.split(";").forEach(i=>{if(i){let[s,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},Md=e=>{let t={};return(r,a,n)=>{let o=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(o={...o,[n.interpolationkey]:void 0});let i=a+JSON.stringify(o),s=t[i];return s||(s=e(cn(a),n),t[i]=s),s(r)}},BS=e=>(t,r,a)=>e(cn(r),a)(t),Vs=class{constructor(t={}){this.logger=nt.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";let a=r.cacheInBuiltFormats?Md:BS;this.formats={number:a((n,o)=>{let i=new Intl.NumberFormat(n,{...o});return s=>i.format(s)}),currency:a((n,o)=>{let i=new Intl.NumberFormat(n,{...o,style:"currency"});return s=>i.format(s)}),datetime:a((n,o)=>{let i=new Intl.DateTimeFormat(n,{...o});return s=>i.format(s)}),relativetime:a((n,o)=>{let i=new Intl.RelativeTimeFormat(n,{...o});return s=>i.format(s,o.range||"day")}),list:a((n,o)=>{let i=new Intl.ListFormat(n,{...o});return s=>i.format(s)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Md(r)}format(t,r,a,n={}){let o=r.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){let s=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,l)=>{let{formatName:c,formatOptions:u}=MS(l);if(this.formats[c]){let p=s;try{let f=n?.formatParams?.[n.interpolationkey]||{},h=f.locale||f.lng||n.locale||n.lng||a;p=this.formats[c](s,h,{...u,...n,...f})}catch(f){this.logger.warn(f)}return p}else this.logger.warn(`there was no format function for ${c}`);return s},t)}},LS=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Gs=class extends Qr{constructor(t,r,a,n={}){super(),this.backend=t,this.store=r,this.services=a,this.languageUtils=a.languageUtils,this.options=n,this.logger=nt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(a,n.backend,n)}queueLoad(t,r,a,n){let o={},i={},s={},l={};return t.forEach(c=>{let u=!0;r.forEach(p=>{let f=`${c}|${p}`;!a.reload&&this.store.hasResourceBundle(c,p)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?i[f]===void 0&&(i[f]=!0):(this.state[f]=1,u=!1,i[f]===void 0&&(i[f]=!0),o[f]===void 0&&(o[f]=!0),l[p]===void 0&&(l[p]=!0)))}),u||(s[c]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,r,a){let n=t.split("|"),o=n[0],i=n[1];r&&this.emit("failedLoading",o,i,r),!r&&a&&this.store.addResourceBundle(o,i,a,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&a&&(this.state[t]=0);let s={};this.queue.forEach(l=>{DS(l.loaded,[o],i),LS(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});let u=l.loaded[c];u.length&&u.forEach(p=>{s[c][p]===void 0&&(s[c][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,r,a,n=0,o=this.retryTimeout,i){if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:a,tried:n,wait:o,callback:i});return}this.readingCalls++;let s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){let p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(c&&u&&n<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,a,n+1,o*2,i)},o);return}i(c,u)},l=this.backend[a].bind(this.backend);if(l.length===2){try{let c=l(t,r);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,r,s)}prepareLoading(t,r,a={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();L(t)&&(t=this.languageUtils.toResolveHierarchy(t)),L(r)&&(r=[r]);let o=this.queueLoad(t,r,a,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,r,a){this.prepareLoading(t,r,{},a)}reload(t,r,a){this.prepareLoading(t,r,{reload:!0},a)}loadOne(t,r=""){let a=t.split("|"),n=a[0],o=a[1];this.read(n,o,"read",void 0,void 0,(i,s)=>{i&&this.logger.warn(`${r}loading namespace ${o} for language ${n} failed`,i),!i&&s&&this.logger.log(`${r}loaded namespace ${o} for language ${n}`,s),this.loaded(t,i,s)})}saveMissing(t,r,a,n,o,i={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${a}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend?.create){let l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,r,a,n,l):u=c(t,r,a,n),u&&typeof u.then=="function"?u.then(p=>s(null,p)).catch(s):s(null,u)}catch(u){s(u)}else c(t,r,a,n,s,l)}!t||!t[0]||this.store.addResource(t[0],r,a,n)}}},Ls=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),L(e[1])&&(t.defaultValue=e[1]),L(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){let r=e[3]||e[2];Object.keys(r).forEach(a=>{t[a]=r[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Bd=e=>(L(e.ns)&&(e.ns=[e.ns]),L(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),L(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),Do=()=>{},FS=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})},$d="__i18next_supportNoticeShown",US=()=>!!(typeof globalThis<"u"&&globalThis[$d]||typeof process<"u"&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE),$S=()=>{typeof globalThis<"u"&&(globalThis[$d]=!0)},WS=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(t=>t?.projectId)),qs=class e extends Qr{constructor(t={},r){if(super(),this.options=Bd(t),this.services={},this.logger=nt,this.modules={external:[]},FS(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(L(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));let a=Ls();this.options={...a,...this.options,...Bd(t)},this.options.interpolation={...a.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=a.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!WS(this)&&!US()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("\u{1F310} i18next is made possible by our own product, Locize \u2014 consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \u{1F499}"),$S());let n=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?nt.init(n(this.modules.logger),this.options):nt.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Vs;let u=new Io(this.options);this.store=new Ro(this.options.resources,this.options);let p=this.services;p.logger=nt,p.resourceStore=this.store,p.languageUtils=u,p.pluralResolver=new Ws(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==a.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(p.formatter=n(c),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new No(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new Gs(n(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(h,...v)=>{this.emit(h,...v)}),this.modules.languageDetector&&(p.languageDetector=n(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=n(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new _o(this.services,this.options),this.translator.on("*",(h,...v)=>{this.emit(h,...v)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Do),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});let s=sn(),l=()=>{let c=(u,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(p),r(u,p)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,r=Do){let a=r,n=L(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();let o=[],i=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};n?i(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>i(l)),this.options.preload?.forEach?.(s=>i(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(s)})}else a(null)}reloadResources(t,r,a){let n=sn();return typeof t=="function"&&(a=t,t=void 0),typeof r=="function"&&(a=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),a||(a=Do),this.services.backendConnector.reload(t,r,o=>{n.resolve(),a(o)}),n}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Fd.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){let a=this.languages[r];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;let a=sn();this.emit("languageChanging",t);let n=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},o=(s,l)=>{l?this.isLanguageChangingTo===t&&(n(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,a.resolve((...c)=>this.t(...c)),r&&r(s,(...c)=>this.t(...c))},i=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);let l=L(s)?s:s&&s[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(L(s)?[s]:s);c&&(this.language||n(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{o(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),a}getFixedT(t,r,a){let n=(o,i,...s)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([o,i].concat(s)):l={...i},l.lng=l.lng||n.lng,l.lngs=l.lngs||n.lngs,l.ns=l.ns||n.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||a||n.keyPrefix);let c={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=lr(l.keyPrefix,c));let u=this.options.keySeparator||".",p;return l.keyPrefix&&Array.isArray(o)?p=o.map(f=>(typeof f=="function"&&(f=lr(f,c)),`${l.keyPrefix}${u}${f}`)):(typeof o=="function"&&(o=lr(o,c)),p=l.keyPrefix?`${l.keyPrefix}${u}${o}`:o),this.t(p,l)};return L(t)?n.lng=t:n.lngs=t,n.ns=r,n.keyPrefix=a,n}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let a=r.lng||this.resolvedLanguage||this.languages[0],n=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;let i=(s,l)=>{let c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(r.precheck){let s=r.precheck(this,i);if(s!==void 0)return s}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(a,t)&&(!n||i(o,t)))}loadNamespaces(t,r){let a=sn();return this.options.ns?(L(t)&&(t=[t]),t.forEach(n=>{this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}),this.loadResources(n=>{a.resolve(),r&&r(n)}),a):(r&&r(),Promise.resolve())}loadLanguages(t,r){let a=sn();L(t)&&(t=[t]);let n=this.options.preload||[],o=t.filter(i=>n.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=n.concat(o),this.loadResources(i=>{a.resolve(),r&&r(i)}),a):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{let n=new Intl.Locale(t);if(n&&n.getTextInfo){let o=n.getTextInfo();if(o&&o.direction)return o.direction}}catch{}let r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services?.languageUtils||new Io(Ls());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){let a=new e(t,r);return a.createInstance=e.createInstance,a}cloneInstance(t={},r=Do){let a=t.forkResourceStore;a&&delete t.forkResourceStore;let n={...this.options,...t,isClone:!0},o=new e(n);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},a){let s=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,p)=>(u[p]={...l[c][p]},u),l[c]),l),{});o.store=new Ro(s,n),o.services.resourceStore=o.store}if(t.interpolation){let l={...Ls().interpolation,...this.options.interpolation,...t.interpolation},c={...n,interpolation:l};o.services.interpolator=new No(c)}return o.translator=new _o(o.services,n),o.translator.on("*",(s,...l)=>{o.emit(s,...l)}),o.init(n,r),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},pe=qs.createInstance(),QD=pe.createInstance,YD=pe.dir,JD=pe.init,eT=pe.loadResources,tT=pe.reloadResources,rT=pe.use,aT=pe.changeLanguage,nT=pe.getFixedT,oT=pe.t,iT=pe.exists,sT=pe.setDefaultNamespace,lT=pe.hasLoadedNamespace,cT=pe.loadNamespaces,uT=pe.loadLanguages;function Wd(e,t){if(e.eventRef&&t){for(let[r,a]of Object.entries(t))if(a===e.eventRef)return Number(r)}return e.eventNum??30}var Yr={zero:2,spider:3,smart:7,pi:1},Jr={zero:1,spider:3,smart:3,pi:1},cr=e=>Array.isArray(e)?e:[];function Oo(e){let t=cr(e);return t.length>0&&!t.includes("zero")&&!t.includes("pi")}function Vd(e){let t=cr(e);return t.length===0||t.includes("smart")}function un(e){let t=cr(e);return t.length>0&&!t.includes("pi")}function dn(e){let t=cr(e);return t.length===0?2:Math.min(...t.map(r=>Yr[r]??2))}function ea(e){let t=cr(e);return t.length===0?1:Math.min(...t.map(r=>Jr[r]??1))}var mT={zero:{inputs:Yr.zero,outputs:Jr.zero},spider:{inputs:Yr.spider,outputs:Jr.spider},smart:{inputs:Yr.smart,outputs:Jr.smart},pi:{inputs:Yr.pi,outputs:Jr.pi}};var VS={zero:"Zero",spider:"Spider",smart:"Smart",pi:"PI"};function zs(e,t){let r=cr(e);if(!r.length)return[];let a=Math.min(...r.map(t));return r.filter(n=>t(n)===a)}function Xs(e,t){return cr(e).filter(r=>!t([r]))}var St=e=>{let t=e.map(r=>VS[r]??r);return t.length<=1?t[0]??"":`${t.slice(0,-1).join(", ")} y ${t[t.length-1]}`},Gd=e=>Yr[e]??2,qd=e=>Jr[e]??1;var GS=Array.from({length:16},(e,t)=>`U${t.toString(16).toUpperCase()}`),qS=["CY","CC","CO","TX","CP","CQ","BP","AD","AE","SC","HT","GP","IB","CR","CT","CU","CV","BQ","BR","BV","HQ","HR","HV","LC","TZ","ER","EQ","CW"],Hs=[...GS,...qS],Po=e=>Hs.includes(e);var bC=be(Pe(),1);var hn=be(Pe(),1);var hC=be(cp(),1);var Lo=(e,t,r,a)=>{let n=[r,{code:t,...a||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(n,"warn","react-i18next::",!0);ur(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...n):console?.warn&&console.warn(...n)},up={},mn=(e,t,r,a)=>{ur(r)&&up[r]||(ur(r)&&(up[r]=new Date),Lo(e,t,r,a))};var ur=e=>typeof e=="string";var dC=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pC={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},fC=e=>pC[e],Js=e=>e.replace(dC,fC);var dp={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Js,transDefaultProps:void 0},Fo=(e={})=>{dp={...dp,...e}};var pp,Uo=e=>{pp=e},ot=()=>pp;var fp=be(Pe(),1);var $o={type:"3rdParty",init(e){Fo(e.options.react),Uo(e)}};var dr=(0,fp.createContext)();var bp=be(Pe(),1);var pr=be(Pe(),1);var ra=class e extends Error{constructor(t,r,a){super(t),this.name="TranslationParserError",this.position=r,this.translationString=a,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};var mp={"&nbsp;":"\xA0","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&copy;":"\xA9","&reg;":"\xAE","&trade;":"\u2122","&hellip;":"\u2026","&ndash;":"\u2013","&mdash;":"\u2014","&lsquo;":"\u2018","&rsquo;":"\u2019","&sbquo;":"\u201A","&ldquo;":"\u201C","&rdquo;":"\u201D","&bdquo;":"\u201E","&dagger;":"\u2020","&Dagger;":"\u2021","&bull;":"\u2022","&prime;":"\u2032","&Prime;":"\u2033","&lsaquo;":"\u2039","&rsaquo;":"\u203A","&sect;":"\xA7","&para;":"\xB6","&middot;":"\xB7","&ensp;":"\u2002","&emsp;":"\u2003","&thinsp;":"\u2009","&euro;":"\u20AC","&pound;":"\xA3","&yen;":"\xA5","&cent;":"\xA2","&curren;":"\xA4","&times;":"\xD7","&divide;":"\xF7","&minus;":"\u2212","&plusmn;":"\xB1","&ne;":"\u2260","&le;":"\u2264","&ge;":"\u2265","&asymp;":"\u2248","&equiv;":"\u2261","&infin;":"\u221E","&int;":"\u222B","&sum;":"\u2211","&prod;":"\u220F","&radic;":"\u221A","&part;":"\u2202","&permil;":"\u2030","&deg;":"\xB0","&micro;":"\xB5","&larr;":"\u2190","&uarr;":"\u2191","&rarr;":"\u2192","&darr;":"\u2193","&harr;":"\u2194","&crarr;":"\u21B5","&lArr;":"\u21D0","&uArr;":"\u21D1","&rArr;":"\u21D2","&dArr;":"\u21D3","&hArr;":"\u21D4","&alpha;":"\u03B1","&beta;":"\u03B2","&gamma;":"\u03B3","&delta;":"\u03B4","&epsilon;":"\u03B5","&zeta;":"\u03B6","&eta;":"\u03B7","&theta;":"\u03B8","&iota;":"\u03B9","&kappa;":"\u03BA","&lambda;":"\u03BB","&mu;":"\u03BC","&nu;":"\u03BD","&xi;":"\u03BE","&omicron;":"\u03BF","&pi;":"\u03C0","&rho;":"\u03C1","&sigma;":"\u03C3","&tau;":"\u03C4","&upsilon;":"\u03C5","&phi;":"\u03C6","&chi;":"\u03C7","&psi;":"\u03C8","&omega;":"\u03C9","&Alpha;":"\u0391","&Beta;":"\u0392","&Gamma;":"\u0393","&Delta;":"\u0394","&Epsilon;":"\u0395","&Zeta;":"\u0396","&Eta;":"\u0397","&Theta;":"\u0398","&Iota;":"\u0399","&Kappa;":"\u039A","&Lambda;":"\u039B","&Mu;":"\u039C","&Nu;":"\u039D","&Xi;":"\u039E","&Omicron;":"\u039F","&Pi;":"\u03A0","&Rho;":"\u03A1","&Sigma;":"\u03A3","&Tau;":"\u03A4","&Upsilon;":"\u03A5","&Phi;":"\u03A6","&Chi;":"\u03A7","&Psi;":"\u03A8","&Omega;":"\u03A9","&Agrave;":"\xC0","&Aacute;":"\xC1","&Acirc;":"\xC2","&Atilde;":"\xC3","&Auml;":"\xC4","&Aring;":"\xC5","&AElig;":"\xC6","&Ccedil;":"\xC7","&Egrave;":"\xC8","&Eacute;":"\xC9","&Ecirc;":"\xCA","&Euml;":"\xCB","&Igrave;":"\xCC","&Iacute;":"\xCD","&Icirc;":"\xCE","&Iuml;":"\xCF","&ETH;":"\xD0","&Ntilde;":"\xD1","&Ograve;":"\xD2","&Oacute;":"\xD3","&Ocirc;":"\xD4","&Otilde;":"\xD5","&Ouml;":"\xD6","&Oslash;":"\xD8","&Ugrave;":"\xD9","&Uacute;":"\xDA","&Ucirc;":"\xDB","&Uuml;":"\xDC","&Yacute;":"\xDD","&THORN;":"\xDE","&szlig;":"\xDF","&agrave;":"\xE0","&aacute;":"\xE1","&acirc;":"\xE2","&atilde;":"\xE3","&auml;":"\xE4","&aring;":"\xE5","&aelig;":"\xE6","&ccedil;":"\xE7","&egrave;":"\xE8","&eacute;":"\xE9","&ecirc;":"\xEA","&euml;":"\xEB","&igrave;":"\xEC","&iacute;":"\xED","&icirc;":"\xEE","&iuml;":"\xEF","&eth;":"\xF0","&ntilde;":"\xF1","&ograve;":"\xF2","&oacute;":"\xF3","&ocirc;":"\xF4","&otilde;":"\xF5","&ouml;":"\xF6","&oslash;":"\xF8","&ugrave;":"\xF9","&uacute;":"\xFA","&ucirc;":"\xFB","&uuml;":"\xFC","&yacute;":"\xFD","&thorn;":"\xFE","&yuml;":"\xFF","&iexcl;":"\xA1","&iquest;":"\xBF","&fnof;":"\u0192","&circ;":"\u02C6","&tilde;":"\u02DC","&OElig;":"\u0152","&oelig;":"\u0153","&Scaron;":"\u0160","&scaron;":"\u0161","&Yuml;":"\u0178","&ordf;":"\xAA","&ordm;":"\xBA","&macr;":"\xAF","&acute;":"\xB4","&cedil;":"\xB8","&sup1;":"\xB9","&sup2;":"\xB2","&sup3;":"\xB3","&frac14;":"\xBC","&frac12;":"\xBD","&frac34;":"\xBE","&spades;":"\u2660","&clubs;":"\u2663","&hearts;":"\u2665","&diams;":"\u2666","&loz;":"\u25CA","&oline;":"\u203E","&frasl;":"\u2044","&weierp;":"\u2118","&image;":"\u2111","&real;":"\u211C","&alefsym;":"\u2135"},SC=new RegExp(Object.keys(mp).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g"),hp=e=>e.replace(SC,t=>mp[t]).replace(/&#(\d+);/g,(t,r)=>String.fromCharCode(parseInt(r,10))).replace(/&#x([0-9a-fA-F]+);/g,(t,r)=>String.fromCharCode(parseInt(r,16)));var gp=e=>{let t=[],r=0,a="",n=()=>{a&&(t.push({type:"Text",value:a,position:r-a.length}),a="")};for(;r<e.length;){let o=e[r];if(o==="<"){let i=e.slice(r).match(/^<(\d+)>/);if(i)n(),t.push({type:"TagOpen",value:i[0],position:r,tagNumber:parseInt(i[1],10)}),r+=i[0].length;else{let s=e.slice(r).match(/^<\/(\d+)>/);s?(n(),t.push({type:"TagClose",value:s[0],position:r,tagNumber:parseInt(s[1],10)}),r+=s[0].length):(a+=o,r+=1)}}else a+=o,r+=1}return n(),t};var gn=be(Pe(),1);var CC=(e,t,r)=>{let{type:a,props:n={}}=e;if(n.children&&Array.isArray(n.children)&&r){let{children:o,...i}=n;return gn.default.createElement(a,i,...t)}return t.length===0?gn.default.createElement(a,n):t.length===1?gn.default.createElement(a,n,t[0]):gn.default.createElement(a,n,...t)},vp=(e,t=[])=>{if(!e)return[];let r=gp(e),a=[],n=[],o=new Set,i=()=>{if(n.length===0)return t;let s=n[n.length-1];return s.declaration.props?.children&&Array.isArray(s.declaration.props.children)?s.declaration.props.children:s.declarations};if(r.forEach(s=>{switch(s.type){case"Text":{let l=hp(s.value);(n.length>0?n[n.length-1].children:a).push(l)}break;case"TagOpen":{let{tagNumber:l}=s,c=i(),u=c[l];if(!u){o.add(l);let p=`<${l}>`;(n.length>0?n[n.length-1].children:a).push(p);break}n.push({tagNumber:l,children:[],position:s.position,declaration:u,declarations:c})}break;case"TagClose":{let{tagNumber:l}=s;if(o.has(l)){let f=`</${l}>`;(n.length>0?n[n.length-1].children:a).push(f),o.delete(l);break}if(n.length===0)throw new ra(`Unexpected closing tag </${l}> at position ${s.position}`,s.position,e);let c=n.pop();if(c.tagNumber!==l)throw new ra(`Mismatched tags: expected </${c.tagNumber}> but got </${l}> at position ${s.position}`,s.position,e);let u=CC(c.declaration,c.children,c.declarations);(n.length>0?n[n.length-1].children:a).push(u)}break}}),n.length>0){let s=n[n.length-1];throw new ra(`Unclosed tag <${s.tagNumber}> at position ${s.position}`,s.position,e)}return a};function Wo({i18nKey:e,defaultTranslation:t,content:r,ns:a,values:n={},i18n:o,t:i}){let s=o||ot();if(!s)return mn(s,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:e}),pr.default.createElement(pr.default.Fragment,{},t);let l=i||s.t?.bind(s)||(f=>f),c=a||l.ns||s.options?.defaultNS;c=ur(c)?[c]:c||["translation"];let u=n;s.options?.interpolation?.defaultVariables&&(u=n&&Object.keys(n).length>0?{...n,...s.options.interpolation.defaultVariables}:{...s.options.interpolation.defaultVariables});let p=l(e,{defaultValue:t,...u,ns:c});try{let f=vp(p,r);return pr.default.createElement(pr.default.Fragment,{},...f)}catch(f){return Lo(s,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${e}": ${f.message}`,{i18nKey:e,error:f}),pr.default.createElement(pr.default.Fragment,{},p)}}Wo.displayName="IcuTransWithoutContext";function Sp({i18nKey:e,defaultTranslation:t,content:r,ns:a,values:n={},i18n:o,t:i}){let{i18n:s,defaultNS:l}=(0,bp.useContext)(dr)||{},c=o||s||ot(),u=i||c?.t.bind(c);return Wo({i18nKey:e,defaultTranslation:t,content:r,ns:a||u?.ns||l||c?.options?.defaultNS,values:n,i18n:c,t:i})}Sp.displayName="IcuTrans";var na=be(Pe(),1),IC=be(wp(),1);var Ep=be(Pe(),1);var Dp=be(Pe(),1);var MC=be(Pe(),1);var OC=be(Pe(),1);var Tp={language:{es:"Espa\xF1ol",en:"English",pt:"Portugu\xEAs"},nav:{general:"General",comm:"Comunicaci\xF3n",wifi:"WiFi",webserver:"Web Server (WS)",cellular:"Celular",country:"Pa\xEDs (MCC)",gps:"GPS",config:"Configuraci\xF3n",waypoints:"Waypoints",regions:"Regiones",io:"I/O",inputs:"Entradas",outputs:"Salidas",analogCalibration:"Anal\xF3gicas",canbus:"CAN bus",customCan:"Custom CAN",onewire:"One Wire",tempSensors:"Sensores de temperatura",bluetooth:"Bluetooth",ibeacon:"iBeacon",bleSensors:"Sensores BLE",smartWildcard:"Smart Wildcard",accel:"Aceler\xF3metro",modules:"M\xF3dulos",all:"Todos",timers:"Timers (TD)",schedule:"Horarios (TR)",counters:"Contadores (NT)",heading:"Heading (DC)",speed:"Velocidad (VL)",acceleration:"Aceleraci\xF3n (DV)",maneuvers:"Maniobras (HM)",vectors:"Vectores (MVT)",tilt:"Inclinaci\xF3n (TK)",analog:"Anal\xF3gicos (AR)",parking:"Parking (PK)",triggers:"Disparadores (UV)",flags:"Flags (U)",capture:"Capturador (CXXB)",blackBox:"Caja negra (CXBB)",reports:"Reportes (UC)",driverDrv:"Chofer (DRV)",driverManager:"Driver Manager (IC)",rules:"Reglas (RL)",events:"Eventos",periodic:"Peri\xF3dicos",driving:"Conducci\xF3n",speedEntry:"Velocidad",ioEvents:"Eventos I/O",battery:"Bater\xEDa",parkingEntry:"Parking",custom:"Personalizadas"},pages:{general:{title:"General",desc:"Compatibilidad de modelos, descripci\xF3n y etiqueta del dispositivo"},comm:{title:"Comunicaci\xF3n",desc:"Servidores de destino y protocolo IP"},cellular:{title:"Celular",desc:"Configuraci\xF3n del operador celular y APN"},gps_config:{title:"Configuraci\xF3n GPS",desc:"Modo GPS y filtros de calidad de se\xF1al"},gps_waypoints:{title:"Waypoints",desc:"Geocercas circulares (WP00-WP31): punto central + radio"},gps_regions:{title:"Regiones",desc:"Geocercas poligonales (RG00-RG31): hasta 32 v\xE9rtices"},rules_periodic:{title:"Peri\xF3dicos",desc:"Reportes peri\xF3dicos por tiempo"},rules_driving:{title:"Conducci\xF3n",desc:"Eventos de conducci\xF3n y cambio de estado"},rules_io:{title:"Entradas digitales",desc:"Eventos por cambio de estado en entradas"},rules_speed:{title:"Velocidad",desc:"Control de velocidad con alerta sonora (Buzzer)"},rules_battery:{title:"Bater\xEDa",desc:"Monitoreo de tensi\xF3n del veh\xEDculo con alertas autom\xE1ticas por nivel"},rules_parking:{title:"Parking",desc:"Geocerca de parking para detectar remolque o movimiento sin autorizaci\xF3n"},rules_custom:{title:"Personalizadas",desc:"Reglas avanzadas con cualquier se\xF1al del dispositivo"},tpl_all:{title:"Todos los m\xF3dulos",desc:"Vista unificada de todos los recursos configurados"},tpl_timers:{title:"Timers (TD)",desc:"Temporizadores del dispositivo (TD00-TD31)"},tpl_heading:{title:"Headings (DC)",desc:"Cambio de direcci\xF3n GPS (DC00-DC02)"},tpl_speed:{title:"Velocidad (VL)",desc:"Umbrales de velocidad (VL00-VL15)"},tpl_dv:{title:"Aceleraci\xF3n (DV)",desc:"Frenada y aceleraci\xF3n brusca por GPS (DV00-DV03)"},tpl_hm:{title:"Maniobras (HM)",desc:"Detecci\xF3n de maniobras bruscas (HM00-HM07)"},tpl_ar:{title:"Anal\xF3gicos (AR)",desc:"Rangos anal\xF3gicos de tensi\xF3n (AR00-AR11)"},tpl_uv:{title:"Disparadores (UV)",desc:"Variables de usuario con expresiones (UV00-UV47)"},tpl_u:{title:"Flags (U)",desc:"Flags booleanos SET/CLR (U00-U63)"},tpl_nt:{title:"Contadores (NT)",desc:"Contadores con valor m\xE1ximo configurable (NT00-NT31)"},tpl_uc:{title:"Reportes (UC)",desc:"F\xF3rmulas de c\xF3mputo de usuario (UC00-UC15)"},tpl_tr:{title:"Horarios (TR)",desc:"Reglas por horario (TR00-TR07)"},tpl_mvt:{title:"Vectores (MVT)",desc:"Vectores de movimiento por aceler\xF3metro"},tpl_xb:{title:"Capturador (CXXB)",desc:"Capturador serial externo (CXXB00-CXXB07)"},tpl_bb:{title:"Caja negra (CXBB)",desc:"R\xE1faga de reportes antes y despu\xE9s de un evento"},tpl_drv:{title:"Chofer (DRV)",desc:"De d\xF3nde sale el chofer del equipo, cu\xE1ndo se exige y qu\xE9 pasa si no se identifica"},tpl_ic:{title:"Driver Manager (IC)",desc:"Gesti\xF3n de conductores por c\xF3digo alfanum\xE9rico"},voice:{title:"Audio / Voz",desc:"Configuraci\xF3n de llamadas de voz (solo Smart)",preamp:"Ganancia mic",spk:"Ganancia parlante",hint:"Timeout: duraci\xF3n m\xE1xima de la llamada. Los Caller ID (CID) definen qu\xE9 n\xFAmeros auto-contestan y con qu\xE9 modo de audio."},rf:{title:"RF (SubGHz)",desc:"M\xF3dulo de radio SubGHz",toggle:"Habilitar m\xF3dulo RF (SubGHz)"},sms_whitelist:{title:"SMS Whitelist",desc:"Solo acepta comandos SMS de los numeros configurados en Destinos SMS",toggle:"Solo aceptar comandos SMS de numeros en la lista de destinos"},tpl_sm:{title:"Destinos SMS (SM)",desc:"N\xFAmeros de tel\xE9fono para notificaciones SMS"},tpl_cid:{title:"Caller ID (CID)",desc:"Entradas de Caller ID / ICCID"},tpl_mc:{title:"Pa\xEDs (MCC)",desc:"Pa\xEDses vigilados por Mobile Country Code"},tpl_cxtr:{title:"Puertos UART (CXTR)",desc:"Configuraci\xF3n de baudrate por puerto serial"},tpl_pk:{title:"Parking (PK)",desc:"Geocerca din\xE1mica de parking"},tpl_tk:{title:"Inclinaci\xF3n (TK)",desc:"Detecci\xF3n de vuelco e inclinaci\xF3n"},tpl_rules:{title:"Reglas (RL)",desc:"Reglas del motor de eventos del dispositivo"},inputs:{title:"Entradas",desc:"Antirebote (debounce) de entradas digitales e ignici\xF3n"},outputs:{title:"Salidas",desc:"Salidas digitales y corte gradual"},analogCalibration:{title:"Calibraci\xF3n de anal\xF3gicas",desc:"Curvas de transformaci\xF3n CXAIN para entradas anal\xF3gicas (AIN0, AIN1, AIN2, AIN7)"},canbus_config:{title:"CAN bus",desc:"Configuraci\xF3n del bus CAN del veh\xEDculo"},canbus_custom:{title:"Custom CAN",desc:"Configuraci\xF3n custom de PIDs CAN bus"},onewire_config:{title:"One Wire",desc:"Bus OneWire para iButton y sensores de temperatura Dallas"},onewire_dt:{title:"Sensores de temperatura",desc:"Sensores de temperatura Dallas DS18B20 conectados al bus OneWire"},bluetooth_config:{title:"Bluetooth",desc:"Configuraci\xF3n general del m\xF3dulo Bluetooth"},bluetooth_beacons:{title:"iBeacon",desc:"Beacons BLE por UUID/MAC"},bluetooth_sensors:{title:"Sensores BLE",desc:"Sensores BLE (Escort, MOKO, etc.) por MAC/ID"},bluetooth_wildcard:{title:"Smart Wildcard",desc:"Captura BLE wildcard por UUID/Major/Minor"},accel:{title:"Aceler\xF3metro",desc:"Umbral de detecci\xF3n de movimiento del aceler\xF3metro"},wifi:{title:"WiFi",desc:"Redes WiFi, modo AP y estaci\xF3n"},webserver:{title:"Web Server",desc:"Servidor web embebido con botones y consola"},summary:{title:"Resumen",desc:"Resumen legible de toda la configuraci\xF3n"}},common:{enabled:"Habilitado",disabled:"Deshabilitado",notConfigured:"Sin configurar",on:"ON",off:"OFF",yes:"S\xED",no:"No",cancel:"Cancelar",confirm:"Confirmar",close:"Cerrar",accept:"Aceptar",send:"Enviar",read:"Leer",done:"Listo",delete:"Borrar",deleteConfirm:"Borrar?",save:"Guardar",search:"Buscar",searchPlaceholder:"Buscar...",copy:"Copiar",copied:"Copiado",edit:"Editar",import:"Importar",export:"Exportar",name:"Nombre",index:"\xCDndice",noResults:"Sin resultados",clear:"Limpiar",active:"Activo",inactive:"Inactivo",loading:"Cargando...",error:"Error",advanced:"Avanzado",basic:"B\xE1sico",mode:"Modo",type:"Tipo",interval:"Intervalo",angle:"\xC1ngulo",speed:"Velocidad",key:"Llave",addToken:"+ Agregar {{token}}",presets:"Perfiles predefinidos",sec:"seg",min:"min",hmAccelGps:"Acel GPS",hmBrakeGps:"Fren GPS",hmTurnLeft:"Giro izq",hmTurnRight:"Giro der",hmCentripetal:"Centr\xEDpeta",hmLatImpact:"Imp.lat",hmAccelImu:"Acel IMU",hmBrakeImu:"Fren IMU"},connection:{connect:"Conectar",disconnect:"Desconectar",connecting:"Conectando...",verifying:"Verificando dispositivo...",openingPort:"Abriendo puerto serial",waitingDevice:"Esperando respuesta del equipo",detectingBaud:"Buscando la velocidad del puerto serie del equipo",noPortSelected:"No se seleccion\xF3 ning\xFAn puerto",authFailed:"No se pudo autenticar con el dispositivo",browserNotSupported:"Navegador no compatible",browserRequirement:"Requiere Chrome, Edge u Opera con Web Serial API.",connectionError:"Error de conexi\xF3n",modelMismatch:"El dispositivo conectado es un {{model}}, pero la configuraci\xF3n no lo incluye como destino."},login:{title:"Login requerido",description:"El dispositivo no responde. Ingres\xE1 el password para autenticarte.",passwordPlaceholder:"Password del dispositivo",invalidPassword:"Login inv\xE1lido. Verific\xE1 el password e intent\xE1 de nuevo.",rememberPassword:"Recordar password",authenticating:"Autenticando..."},sendDialog:{title:"Enviar configuraci\xF3n",warningRules:"Se borrar\xE1n todas las reglas existentes en el dispositivo y se reemplazar\xE1n por la nueva configuraci\xF3n.",confirmAction:"Esta acci\xF3n no se puede deshacer. \xBFContinuar?",sendAnyway:"Enviar de todos modos",cancelWrite:"Cancelar escritura",sendConfirm:"Enviar?",sendToDevice:"Enviar al dispositivo",ackFailed:"Fallaron {{failed}}/{{total}}",ackFailedTitle:"Sin confirmaci\xF3n del dispositivo",sending:"Enviando Configuraci\xF3n...",sendComplete:"Env\xEDo Completado",of:"de",successful:"exitosos",failed:"fallidos"},readDialog:{cancelRead:"Cancelar lectura",readConfirm:"Leer?",readParams:"Leer {{count}} par\xE1metros del dispositivo",readDevice:"Leer del dispositivo",generalConfig:"Configuracion general",allConfig:"Comunicacion, GPS, I/O, WiFi, BLE, modulos, CAN, reglas",waypointsRegions:"Waypoints y Regiones",waypointsDesc:"32 geocercas circulares + 32 poligonales",additionalQueries:"queries adicionales",replaceWarning:"Se reemplazara la configuracion actual con la del dispositivo.",readCancelled:"Lectura cancelada",reading:"Leyendo configuraci\xF3n...",readComplete:"Lectura completada",queries:"queries",responses:"respuestas",importSuccess:"Configuraci\xF3n importada correctamente.",cancelledNoChanges:"Lectura cancelada. No se aplicaron cambios."},sendBar:{newConfig:"Nuevo / Restablecer configuraci\xF3n",saveCtrlS:"Guardar (Ctrl+S)",noChanges:"Sin cambios",discardChanges:"Descartar cambios",eventTable:"Tabla de eventos",exportConfig:"Exportar configuraci\xF3n",importConfig:"Importar configuraci\xF3n",readingConfig:"Leyendo configuraci\xF3n...",readConfig:"Leer configuraci\xF3n del dispositivo",goToGeneral:"Ir a General",validate:"Validar",valid:"\u2713 V\xE1lido",connectToSend:"Conectar para enviar",connectToSendHint:"Abre el selector de puerto USB",importConfirmTitle:"Importar configuraci\xF3n",importConfirmMsg:'Se reemplazar\xE1 la configuraci\xF3n actual con el contenido del archivo. Esta acci\xF3n se puede revertir con "Descartar cambios" mientras no guardes.',importReplace:"Reemplazar configuraci\xF3n",resetConfig:"Restablecer configuraci\xF3n",resetAdvancedMsg:"Se limpiar\xE1n todos los m\xF3dulos y reglas. Se mantendr\xE1n los ajustes generales predeterminados.",resetBasicMsg:"Se restablecer\xE1 la configuraci\xF3n predeterminada con reglas est\xE1ndar.",reset:"Restablecer",importSuccess:"Importaci\xF3n exitosa",importError:"Error al importar",parsed:"parseados",omitted:"omitidos",omittedCommands:"comandos omitidos (borrados masivos, power, etc.)",unrecognizedLine:"l\xEDnea no reconocida",unrecognizedLines:"l\xEDneas no reconocidas",invalidJsonConfig:'El archivo JSON no contiene el campo "config"',noValidCommands:"No se encontraron comandos v\xE1lidos (formato >CMD<)",serialRead:"Lectura serial",warnings:"Advertencias ({{count}})",errors:"Errores ({{count}})",unknown:"desconocido"},general:{tagLabel:"Etiqueta (TAG)",tagDesc:"Texto personalizado almacenado en el dispositivo. \xDAtil para identificar unidades. Se configura con el comando >STAG<.",tagPlaceholder:"UNIDAD-001",changePassword:"Cambiar Password (PW)",passwordDesc:"Configura un nuevo password en el dispositivo. Se enviar\xE1 al final de la grabaci\xF3n con el comando >SPW<.",passwordPlaceholder:"Dejar vac\xEDo para no cambiar",compatibility:"Compatibilidad",compatibilityDesc:"Indic\xE1 en qu\xE9 modelos se usar\xE1 esta configuraci\xF3n. El asistente limitar\xE1 las opciones seg\xFAn el m\xEDnimo de I/O disponibles.",selectModel:"Seleccion\xE1 al menos un modelo.",modelNoWifiBt:"Sin WiFi/BT",configMode:"Modo de configuraci\xF3n",advancedDesc:"Todas las reglas se gestionan como reglas personalizadas. Control total sobre cada regla SRL.",basicDesc:"Los m\xF3dulos guiados simplifican la configuraci\xF3n. Cada m\xF3dulo genera sus reglas autom\xE1ticamente.",description:"Descripci\xF3n",descriptionInfo:"Nota interna opcional. No se env\xEDa al dispositivo: viaja en el TXT como comentario (@rinho desc) y se conserva al importar/exportar. Tip: separ\xE1 bloques con una l\xEDnea \xAB\u2014\xBB y empezalos con \xABT\xCDTULO:\xBB en may\xFAsculas para verlos como secciones en el Resumen.",descriptionPlaceholder:"Ej: Configuraci\xF3n para flota de camiones \u2014 zona norte",descriptionExpand:"Maximizar",descriptionPreview:"Vista previa",switchToAdvanced:"Cambiar a modo avanzado",switchToBasic:"Cambiar a modo simple",switchAdvancedMsg:"Todas las reglas de los m\xF3dulos (conducci\xF3n, velocidad, bater\xEDa, parking) se convertir\xE1n en reglas personalizadas editables. Los m\xF3dulos quedar\xE1n desactivados.",switchBasicMsg:"Se restablecer\xE1n los m\xF3dulos guiados vac\xEDos (desactivados). Esta acci\xF3n requiere que no haya reglas personalizadas.",cannotRevert_one:"No se puede volver a modo simple porque hay {{count}} regla que no es compatible con los m\xF3dulos guiados.",cannotRevert_other:"No se puede volver a modo simple porque hay {{count}} reglas que no son compatibles con los m\xF3dulos guiados.",newPassword:"Nuevo password"},cellular:{enableModule:"Habilitar m\xF3dulo celular",operator:"Operador (COPS)",operatorSelection:"Selecci\xF3n de operador",automatic:"Autom\xE1tico",manual:"Manual",registrationMode:"Modo de registro",manualFallback:"Manual + fallback auto",manualForced:"Manual forzado",technology:"Tecnolog\xEDa (AcT)",techUnspecified:"Sin especificar",techLTE:"LTE (Cat-M / NB-IoT)",techGSM:"GSM (2G)",techUTRAN:"UTRAN (3G)",techNBIoT:"NB-IoT",operatorCode:"C\xF3digo de operador (MCC+MNC)",operatorCodePlaceholder:"ej: 72207",apn:"APN",apnName:"Nombre APN",apnPlaceholder:"ej: igprs.claro.com.ar",apnClearDesc:"Se env\xEDa el comando de APN vac\xEDo: borra el APN guardado del equipo y deja que el firmware lo detecte solo (equipos con firmware reciente y Rinho PI). En firmware viejo el celular puede no conectar sin APN.",apnUser:"Usuario APN",apnPassword:"Password APN",optionalField:"(vac\xEDo si no requiere)",searchOperator:"Buscar operador (COPS)",searchOperatorPlaceholder:"Buscar por operador, pa\xEDs o c\xF3digo...",searchApn:"Buscar APN",searchApnPlaceholder:"Buscar operador...",noResults:"Sin resultados",smsWhitelist:"SMS Whitelist (wake)",rfEnabled:"M\xF3dulo RF",imeiHint:"Conect\xE1 el equipo para leer el IMEI."},wifi:{title:"WiFi",enable:"Habilitar WiFi",networkInfo:"Hasta 10 redes guardadas (SAPW00\u2013SAPW09). El dispositivo se conecta a la primera disponible.",configured_one:"{{count}} configurada",configured_other:"{{count}} configuradas",networkName:"Nombre de red",password:"Contrase\xF1a",addNetwork:"Agregar red",notConfigured:"Sin configurar",network:"Red",mode:"Modo WiFi",modeSta:"Estaci\xF3n",modeApx:"AP Primario",modeApy:"AP Secundario",modeStaDesc:"El dispositivo se conecta a una red WiFi existente como cliente.",modeApDesc:"El dispositivo crea su propia red WiFi a la que otros se pueden conectar.",apDesc:"Configur\xE1 el nombre y contrase\xF1a de la red WiFi que crear\xE1 el dispositivo.",apPrimary:"Access Point primario",apSecondary:"Access Point secundario",apSsidPlaceholder:"Nombre del AP",apPassPlaceholder:"Contrase\xF1a del AP",apRequired:"SSID y contrase\xF1a son obligatorios para el modo seleccionado",staNetworks:"Redes estaci\xF3n",configured_one:"{{count}} configurada",configured_other:"{{count}} configuradas",ip:"Direcci\xF3n IP",gateway:"Puerta de enlace",mask:"M\xE1scara de subred",ipPlaceholder:"192.168.4.1",gatewayPlaceholder:"192.168.4.1",maskDefault:"255.255.255.0"},ws:{enable:"Habilitar Web Server",desc:"Servidor web embebido accesible desde la IP del dispositivo. En modo AP se muestra autom\xE1ticamente como portal cautivo.",language:"Idioma",title:"T\xEDtulo",pin:"PIN",pinPlaceholder:"Sin PIN",showConsole:"Mostrar consola de comandos",buttons:"Botones",addButton:"Agregar bot\xF3n",btnLabel:"Texto del bot\xF3n",btnTypeCommand:"Comando directo",btnTypeCode0:"Login num\xE9rico (CODE0)",btnTypeCode1:"Login alfanum\xE9rico (CODE1)",btnTypeXb:"Entrada din\xE1mica (XB)",command:"Comando",visible:"Visible",hidden:"Oculto",preview:"Vista previa",previewInput:"Escribir texto...",noButtons:"Sin botones configurados",generatedCommand:"Comando generado"},gps:{updateMode:"Modo de actualizaci\xF3n GPS",minFix:"Fix m\xEDnimo",maxPdop:"PDOP m\xE1ximo",minSatellites:"Sat\xE9lites m\xEDn.",modeHeader:"Modo GPS (CXGPS)",modeDesc:"Define cu\xE1ndo el dispositivo actualiza los datos de posici\xF3n GPS.",modeAlways:"Siempre (1s)",modeIgnOnly:"Solo con IGN",modeSpeed:"Vel. > 5 km/h",qualityHeader:"Calidad GPS (CXCQ)",qualityDesc:"Filtros de calidad m\xEDnima para aceptar un reporte GPS."},modules:{searchPlaceholder:"Buscar m\xF3dulo...",timing:"Temporizaci\xF3n",drivingGroup:"Conducci\xF3n",signals:"Se\xF1ales",logic:"L\xF3gica y procesamiento",identification:"Identificaci\xF3n",communication:"Comunicaci\xF3n",ble:"Bluetooth",rulesEngine:"Motor de reglas",noResults:'Sin resultados para "{{filter}}"'},resource:{disabled:"Deshabilitado",notConfigured:"Sin configurar",configure:"Configurar",deleteAll:"Borrar todos",addResource:"Agregar",query:"Consulta:",inExpressions:"En UV/UC:",value:"valor",age:"antiguedad (ms)",permanent:"permanente",volatile:"vol\xE1til",expressionPlaceholder:"Expresi\xF3n...",wildcardTooltip:"Wildcard: dispara cada hora/minuto/segundo",searchPlaceholder:"Buscar...",useThisValue:"usar este valor",noMatches:"Sin coincidencias"},canbus:{protocol:"Protocolo",speed:"Velocidad",format:"Formato",fuelTrip:"Fuel Trip (Soft)",engine:"Motor",gasoline:"Gasolina",diesel:"Diesel"},onewire:{resetVdd:"Reset VDD",noReset:"No reiniciar",every10s:"Cada 10s",every20s:"Cada 20s",every30s:"Cada 30s",tempSensorAsKey:"Sensor de temperatura como llave",notAvailable:"OneWire no disponible para el modelo seleccionado.",busDescription:"Bus OneWire para lectura de iButton y sensores de temperatura Dallas."},rules:{reportRules:"Reglas de Reporte",activeRules:"activas",noActiveRules:"Sin reglas activas el dispositivo no generar\xE1 reportes.",periodicIgnOn:"Peri\xF3dico con IGN",engineOn:"Motor encendido",periodicIgnOff:"Peri\xF3dico sin IGN",engineOff:"Motor apagado / detenido",headingChange:"Cambio de rumbo",headingDesc:"Al cambiar direcci\xF3n de viaje",ignition:"Ignici\xF3n",ignitionDesc:"Encendido / apagado del veh\xEDculo",input:"Entrada",inputDesc:"Eventos por cambio de estado",digitalOutputs:"Salidas digitales",output:"Salida",outputDesc:"Eventos por cambio de estado",falseToTrue:"de falso a verdadero",trueToFalse:"de verdadero a falso",anyEdge:"cualquier flanco",changes:"cambia",datalogDesc:"DataLog: memoria circular, lo nuevo pisa lo viejo, sale lo m\xE1s antiguo primero (caja negra)",bufferDesc:"Buffer: 2.728 posiciones con prioridad de escritura H\u2192L\u2192M y salida priorizada, ideal para alarmas",bufDescription:"2.728 posiciones con prioridad de escritura (H\u2192L\u2192M) y salida priorizada. Ideal para alarmas.",logDescription:"Memoria circular de {{count}} registros. Lo m\xE1s nuevo pisa lo m\xE1s viejo, sale lo m\xE1s antiguo primero. Funciona como caja negra.",rulesCount:"{{count}} reglas"},actions:{report:"Generar reporte",output:"Activar salida (XP)",userVar:"Variable de usuario (U)",timerReset:"Acci\xF3n de timer (TD)",parking:"Parking (SPKA/SPKD)",gpsMode:"Modo GPS (SCXGPS)",counter:"Contador (NT)",sleep:"Modo dormido (SKO)",gradualCut:"Corte Gradual (GC)",raw:"Comando raw",searchSignal:"Buscar se\xF1al... (ej: IN05, GPS, timer)",negated:"Se\xF1al negada \u2014 click para quitar NOT",negate:"Click para negar (NOT)"},header:{config:"Config",status:"Estado",firmware:"Firmware",terminal:"Terminal"},monitor:{serialLog:"Log Serial",noActivity:"Sin actividad...",connectDevice:"Conect\xE1 un dispositivo para ver el estado en vivo",title:"Monitor",querying:"Consultando...",latitude:"Latitud",longitude:"Longitud",speed:"Velocidad",heading:"Rumbo",satellites:"Sat\xE9lites",fix:"Fix",batteryLabel:"Bater\xEDa",odometer:"Od\xF3metro",noGps:"Sin se\xF1al GPS ({{sats}} sat\xE9lites)",waitingData:"Esperando datos...",ssid:"SSID",signal:"Se\xF1al",sendBuffer:"Buffer de Env\xEDo",gprsQueue:"Cola GPRS",smsQueue:"Cola SMS",datalog:"DataLog",totalRecords:"Registros totales",pending:"Pendientes"},status:{title:"Estado",summary:"Resumen",code:"C\xF3digo",assistant:"Asistente",backToStatus:"\u25C0 Estado",ignOn:"IGN ON",ignOff:"IGN OFF",wifiInactive:"Inactivo",queue:"Cola",total:"Total",noFix:"Sin fix",lat:"Lat",lon:"Lon",vel:"Vel",sat:"Sat",date:"Fecha",gndNote:"0 = a masa (GND)",noPosition:"Sin posici\xF3n",clearConfirm:"Vaciar",clearBusy:"Ocupado",clearError:"Sin respuesta",clearBufferHint:"Vaciar la cola de env\xEDo pendiente (>CBU<)",clearPendingHint:"Marcar los registros del log como enviados (>SDLC<). No borra el log."},ota:{title:"Actualizar Firmware (OTA)",successTitle:"Actualizacion exitosa",noUpdateTitle:"Sin actualizacion",errorTitle:"Error en la actualizacion",successMsg:"El firmware fue instalado correctamente. El dispositivo esta reiniciando.",noUpdateMsg:"El dispositivo ya tiene una version mas nueva que la disponible en el servidor. No se realizo cambio.",errorMsg:"Verifica que el dispositivo este conectado a WiFi e intenta nuevamente.",description:"Descarga e instala la ultima version del firmware desde el servidor Rinho.",wifiConnected:"Conectado a",wifiNoConnection:"WiFi activo pero sin conexion",wifiNotActive:"WiFi no esta activo en el dispositivo",cellularLabel:"Celular",noWifi:"Este dispositivo no tiene WiFi. La actualizacion se realizara por celular.",wifiWarning:"El dispositivo debe estar conectado a WiFi. No desconectar durante el proceso (~2 min).",cellularWarning:"Se usara el modulo celular. Asegurate de tener buena senal y datos disponibles. Puede ser mas lento que WiFi.",advancedOptions:"Opciones avanzadas",skipVersionCheck:"Sin chequeo de version",skipVersionDesc:"Fuerza la instalacion aunque sea la misma version",firmwareUrl:"URL del firmware",customUrl:"URL personalizada",resetUrl:"Restablecer URL por defecto",switchPartition:"Cambiar particion",switchPartitionDesc:"Alterna entre la version actual y la anterior (SFRMCP)",change:"Cambiar",downloading:"Descargando firmware...",downloadOta:"Descargar .OTA",rebootCheck:{waiting:"Esperando que el equipo reinicie para verificar la versi\xF3n. Se reconecta solo.",confirmed:"Verificado: el equipo arranc\xF3 con {{version}}.",sameBuild:"El equipo arranc\xF3 con el mismo firmware que ten\xEDa: la actualizaci\xF3n no qued\xF3 aplicada.",noResponse:"No se pudo verificar: el equipo no respondi\xF3 despu\xE9s del reinicio. Reconectalo y revis\xE1 la versi\xF3n.",booted:"El equipo arranc\xF3 con {{version}}.",sameBuildForced:"El equipo arranc\xF3 con la misma build: se reinstal\xF3 el mismo firmware (actualizaci\xF3n forzada).",sameBuildServer:"Se reinstal\xF3 la misma build: el archivo del servidor es la versi\xF3n que ya ten\xEDa el equipo."},downloadOtaBusy:"Descargando .OTA\u2026",downloadOtaError:"No se pudo descargar el .OTA",configuring:"Configurando URL y esperando respuesta del dispositivo...",kbDownloaded:"KB descargados",updating:"Actualizando...",startUpdate:"Iniciar actualizacion",deviceLog:"Log del dispositivo",kbProcessed:"KB procesados",firmwareVariant:"Variante de firmware",current:"actual",variantSwitchWarning:"Vas a cambiar de {{from}} a {{to}}. El dispositivo cambiara de variante de firmware. Asegurate de que sea intencional.",cable:{method:"Por cable",checking:"Verificando si el equipo acepta firmware por cable...",sourceUrl:"Desde URL",sourceFile:"Archivo local",chooseFile:"Elegir archivo .OTA",noFile:"Ning\xFAn archivo elegido",urlLabel:"URL del firmware",urlFromDevice:"URL configurada en el equipo (IP2)",urlOfficial:"URL oficial del servidor Rinho",urlEdited:"URL escrita a mano",useOfficialUrl:"Usar la URL oficial",compatible:"Compatible: {{model}} {{flash}}",resumeInfo:"Hay una carga a medias ({{pct}} %): se contin\xFAa desde ah\xED.",warning:"No desconectes el cable durante la carga. Tarda ~3 min por cable serie y ~1,5 min por USB.",start:"Instalar por cable",cancel:"Cancelar carga",cancelConfirm:"\xBFCancelar la carga?",retry:"Reintentar",reconnect:"Conectar",confirmProduct:"Confirmo que este archivo corresponde a este equipo",otherChannel:"El equipo tiene otra carga de firmware en curso por otro canal (por ejemplo celular). Si segu\xEDs, esa carga se descarta.",otherChannelContinue:"Descartar y seguir",progress:"{{done}} de {{total}} KB \xB7 {{kbps}} KB/s \xB7 faltan {{eta}}",phases:{downloading:"Descargando",preparing:"Preparando",sending:"Enviando",verifying:"Verificando",installing:"Instalando",confirming:"Confirmando"},confirming:"El equipo se est\xE1 reiniciando. Confirmando la versi\xF3n nueva... Si se desconect\xF3, volv\xE9 a conectarlo.",confirmingAuto:"El equipo se est\xE1 reiniciando. Se reconecta solo y confirma la versi\xF3n nueva: no hace falta tocar nada.",confirmedTitle:"Firmware instalado",confirmedMsg:"El equipo arranc\xF3 con {{version}}.",unconfirmedTitle:"No se pudo confirmar la instalaci\xF3n",unconfirmed:{sameBuild:"El equipo arranc\xF3 con el mismo firmware que ten\xEDa: la carga fue rechazada o era la misma build.",noResponse:"El equipo no respondi\xF3 despu\xE9s del reinicio. Reconectalo y verific\xE1 la versi\xF3n."},cancelledTitle:"Carga cancelada",cancelledMsg:"El equipo sigue con su firmware anterior.",errorTitle:"Error en la carga por cable",reasons:{badName:"El nombre del archivo no es un firmware Rinho (.OTA de SPIDERIOT, ZEROIOT o AUDIOT).",empty:"El archivo est\xE1 vac\xEDo.",tooLarge:"El archivo es demasiado grande.",unknownDevice:"No se pudo identificar el modelo del equipo. Reconect\xE1 y prob\xE1 de nuevo.",modelMismatch:"Este firmware no corresponde a este equipo (modelo o memoria distintos).",variantSwitch:"Vas a cambiar de variante de firmware (WiFi a NimBLE o al rev\xE9s). Despu\xE9s revis\xE1 >QBTH< y, si el Bluetooth no anda, apag\xE1 el WiFi con >SCXWIF0,0,0<.",productUnverified:"No se puede distinguir un Zero de un Audience: confirm\xE1 que el archivo es el correcto.",productMismatch:"El equipo est\xE1 configurado para {{expected}} y est\xE1s cargando {{actual}}."},errors:{NOT_SUPPORTED:"El firmware del equipo no acepta carga por cable.",FILE_INVALID:"El archivo no es v\xE1lido.",DOWNLOAD_FAILED:"No se pudo descargar el firmware.",BUSY:"El equipo est\xE1 haciendo otra actualizaci\xF3n.",OPEN_FAILED:"El equipo no pudo abrir la carga.",OTHER_CHANNEL_SESSION:"Se cancel\xF3 para no pisar la carga en curso por otro canal.",NO_RESPONSE:"El equipo no responde.",TOO_MANY_ERRORS:"Demasiados errores de transmisi\xF3n.",FLASH_WRITE:"Error escribiendo la memoria del equipo.",SESSION_LOST:"Se perdi\xF3 la sesi\xF3n de carga en el equipo.",HASH_FAILED:"El equipo no pudo verificar lo escrito.",IMAGE_INVALID:"El equipo rechaz\xF3 la imagen (\xBFfirmware de otro modelo o clave?).",COMMIT_FAILED:"El equipo no pudo instalar el firmware.",DISCONNECTED:"Se perdi\xF3 la conexi\xF3n con el equipo. Reconect\xE1 y toc\xE1 Reintentar: la carga contin\xFAa desde donde qued\xF3.",CANCELLED:"Carga cancelada."}}},activityLog:{title:"Log / Terminal",resumeLog:"Reanudar log",pauseLog:"Pausar log",copyLog:"Copiar log",clearLog:"Limpiar log",noActivity:"Sin actividad...",sendCommand:"Enviar comando..."},sendProgress:{sending:"Enviando Configuraci\xF3n...",complete:"Env\xEDo Completado",abortedDisconnected:"Dispositivo desconectado: la configuraci\xF3n qued\xF3 incompleta ({{sent}} de {{total}} comandos confirmados). Reconect\xE1 y reenvi\xE1 la configuraci\xF3n completa.",abortedNoResponse:"El dispositivo dej\xF3 de responder: la configuraci\xF3n qued\xF3 incompleta ({{sent}} de {{total}} comandos confirmados). Verific\xE1 la conexi\xF3n y reenvi\xE1 la configuraci\xF3n completa.",of:"de",successful:"exitosos",failed:"fallidos"},modeSwitch:{basic:"B\xE1sico",advanced:"Avanzado",switchToAdvanced:"Cambiar a Avanzado",switchToBasic:"Cambiar a B\xE1sico",advancedWarning:"Las reglas y m\xF3dulos se convertir\xE1n en reglas personalizadas editables. Los recursos de hardware se migrar\xE1n autom\xE1ticamente.",classification_one:"Clasificaci\xF3n de {{count}} regla",classification_other:"Clasificaci\xF3n de {{count}} reglas",fixedRules:"Reglas fijas",speedModule:"M\xF3dulo velocidad",detected:"detectado",batteryModule:"M\xF3dulo bater\xEDa",parkingModule:"M\xF3dulo parking",classified:"Clasificadas",lostRules_one:"{{count}} regla no se puede clasificar y se perder\xE1",lostRules_other:"{{count}} reglas no se pueden clasificar y se perder\xE1n",andMore:"... y {{count}} m\xE1s",noBasicEquivalent:"M\xF3dulos sin equivalente en b\xE1sico:",allClassified:"Todas las reglas y m\xF3dulos se clasificaron correctamente.",switchLose:"Cambiar ({{count}} se perder\xE1n)",goToSummary:"Ir a Resumen"},configPanel:{server:"Servidor",commands:"Comandos",fixedRules:"Reglas fijas",speed:"Velocidad",battery:"Bater\xEDa",parking:"Parking",waypoints:"Waypoints",regions:"Regiones",detectedModel:"Modelo detectado",importToAdvanced:"Importar c\xF3digo a Avanzado",importWarning:"Se reemplazar\xE1 la configuraci\xF3n actual con los comandos editados. El modo cambiar\xE1 a Avanzado.",commandCount:"comandos"},changelog:{new:"Nuevo",change:"Cambio"},triggers:{"cat.system":"Sistema","cat.io":"Entradas / Salidas","cat.speed":"Velocidad","cat.analog":"Anal\xF3gico / Bater\xEDa","cat.timer":"Timers","cat.geo":"Geocercas","cat.gps":"GPS","cat.accel":"Aceler\xF3metro","cat.ble":"Bluetooth / BLE","cat.can":"CAN / Variables","cat.comm":"Comunicaciones","cat.power":"Alimentaci\xF3n",in:"Entrada digital",xp:"Salida de expansi\xF3n",fct:"Factory counter disparado",ow:"iButton detectado",owp:"iButton por puerto","owp.portA":"Puerto A","owp.portB":"Puerto B",vl:"L\xEDmite de velocidad",ar:"Entrada anal\xF3gica",vbu:"Voltaje backup",ko:"Reposo/Sleep","ko.fullSleep":"Dormido total","ko.partialRest":"Reposo parcial","ko.enabled":"KO habilitado","ko.exitingUlp":"Saliendo KO++",td:"Temporizador",tr:"Regla de tiempo",nt:"Contador",hm:"Harsh maneuver",wp:"Geocerca circular",rg:"Geocerca poligonal",zna:"Zona extendida A (geocerca)",znb:"Zona extendida B (geocerca)",pk:"Parking","pk.parked":"Estacionado","pk.enabled":"Habilitado",dc:"Cambio de direcci\xF3n GPS",dv:"Delta de velocidad (frenada/aceleraci\xF3n brusca)",tk:"Tracking remolque","tk.fired":"Evento disparado","tk.enabled":"Habilitado","tk.state":"Estado triggered",mvxp:"Movimiento eje X+",mvxn:"Movimiento eje X-",mvyp:"Movimiento eje Y+",mvyn:"Movimiento eje Y-",mvzp:"Movimiento eje Z+",mvzn:"Movimiento eje Z-",bs:"BLE Sensor activo",be:"BLE Beacon detectado",bsw:"BLE Smart Wildcard activo",bswn:"BLE nuevo dispositivo detectado",bth:"Cliente Bluetooth conectado",uv:"Variable de usuario",u:"Flag de usuario",xb:"XBuffer con datos",rl:"Estado de otra regla",ack:"ACK recibido de destino",drv:"Chofer (DRV)",drvOn:"Hay chofer",drvLogin:"Login",drvLogout:"Logout",drvInvalid:"C\xF3digo no autorizado",drvWindow:"Venci\xF3 la ventana sin chofer",ic:"Driver Manager - estado",icSession:"Sesi\xF3n iniciada",icMode:"Cambio de modo",icValid:"Usuario v\xE1lido",icInvalid:"Usuario inv\xE1lido",icl:"Driver Manager - c\xF3digo v\xE1lido",sim:"SIM seleccionada",cid:"Caller ID (llamada entrante)",cq:"Calidad GPS (posici\xF3n confiable)",ign:"Ignici\xF3n activa",pwr:"Alimentaci\xF3n cortada",bu:"Buffer con reportes pendientes",gps:"GPS fix v\xE1lido",ac:"Movimiento (aceler\xF3metro)",cel:"Modem registrado en red",wif:"WiFi conectado",jmd:"Jamming detectado",can:"Datos CAN recibidos",tt:"Tick del sistema (alterna 0/1 cada 1s)",dtc:"Fallas CAN (DTC J1939)","dtc.active":"Hay fallas activas","dtc.new":"Falla nueva","dtc.lamp":"L\xE1mpara de falla encendida","dtc.cleared":"Fallas limpiadas",pb:"R\xE1faga de pulsos (PC)",intpwr:"Fuente interna encendida",viopwr:"Tensi\xF3n externa encendida",celpwr:"Modem HW encendido",gpspwr:"GPS HW encendido",wifpwr:"WiFi HW encendido",bthpwr:"Bluetooth encendido","sense.active":"+ Activa","sense.deactive":"\u2212 Desact.","sense.change":"* Cambio","sense.activeDesc":"Flanco ascendente (0 \u2192 1)","sense.deactiveDesc":"Flanco descendente (1 \u2192 0)","sense.changeDesc":"Cualquier cambio de estado","op.and":"Y l\xF3gico","op.or":"O l\xF3gico","op.xor":"O exclusivo","op.nand":"NOT AND","op.nor":"NOT OR","op.xnor":"NOT XOR"},configPage:{bleSensorFields:"Campos de sensores BLE",bleSensorRef:"Referencia para MBS() y UV",bleSensorUsage:"Usar MBS(sensor, campo) en expresiones UV/UC. El campo puede ser el nombre (ej: temp) o el \xEDndice num\xE9rico (ej: 0)."},time:{now:"ahora",seconds:"{{s}} seg",minutesSeconds:"{{m}}min {{s}}s",minutes:"{{m}} min",hours:"{{h}}h",hoursMinutes:"{{h}}h {{m}}min",ago:"hace"},map:{editWaypoint:"Editar waypoint en mapa",editRegion:"Editar regi\xF3n en mapa",searchPlace:"Buscar lugar o direcci\xF3n...",clickToAddVertices:"Clic en el mapa para agregar v\xE9rtices \xB7 Arrastrar marcador para mover \xB7 Clic en marcador para eliminar (m\xEDn. 3)",deleteVertex:"Eliminar v\xE9rtice",deleteRegion:"Eliminar regi\xF3n",regionNamePlaceholder:"Nombre de la regi\xF3n",noPolygonsFound:"No se encontraron pol\xEDgonos en el archivo.",noPointsFound:"No se encontraron puntos en el archivo.",pointImported:"Punto importado",polygonImported:"Pol\xEDgono importado",vertices:"v\xE9rtices",moreInFile:"m\xE1s en archivo"},summary:{title:"Resumen de Configuraci\xF3n",copy:"Copiar",copied:"\u2713 Copiado",compatibleWith:"Compatible con",commSection:"Comunicaci\xF3n",mainServerBy:"Servidor principal por",at:"en",backupAt:"respaldo en",backChannelBy:"Canal BACK por",towards:"hacia",keepAlive:"Keep Alive cada",apnLabel:"SIM 0 APN:",apnUser:"usuario:",operator:"Operador:",dualSim:"SIM 1 (Dual SIM): APN:",noApn:"(sin APN)",cellDisabled:"Celular deshabilitado.",wifiLabel:"WiFi:",wifiDisabled:"deshabilitado.",networkCount_one:"{{count}} red configurada.",networkCount_other:"{{count}} redes configuradas.",reportSection:"Reporte y GPS",everyWithIgnOn:"Cada <strong>{{time}}</strong> con IGN encendida",everyWithIgnOff:"cada <strong>{{time}}</strong> con IGN apagada",headingAt:"Rumbo a <strong>{{angle}}\xB0</strong>",eventsDefinedCount_one:"<strong>{{count}}</strong> evento definido:",eventsDefinedCount_other:"<strong>{{count}}</strong> eventos definidos:",noEventsDefined:"Sin eventos definidos.",gpsLabel:"GPS:",gpsFix:"fix \u2265 {{fix}}D",gpsPdop:"PDOP \u2264 {{pdop}}",gpsSats:"\u2265 {{sats}} sat\xE9lites",ignitionLabel:"Ignici\xF3n:",gpsMode:["Siempre (1s)","Solo con IGN","Velocidad > 5 km/h"],ignMode:["Normal (cable)","Manual (SS)","Por tensi\xF3n"],datalogLabel:"DataLog:",toLog:"al Log",toBuffer:"al Buffer",eventsSection:"Motor de eventos",noActiveRules:"Sin reglas activas.",activeRulesCount_one:"<strong>{{count}} regla activa:</strong>",activeRulesCount_other:"<strong>{{count}} reglas activas:</strong>",priorityLow:"baja",priorityMed:"media",priorityHigh:"alta",periodicIgnOn:"Peri\xF3dico IGN cada {{time}}",periodicIgnOff:"Peri\xF3dico sin IGN cada {{time}}",headingOver:"Rumbo > {{angle}}\xB0",ignOn:"Encender IGN",ignOff:"Apagar IGN",speedOver:"Exceso > {{speed}} km/h",speedUnder:"Bajo {{speed}} km/h",noEvent:"sin evento",customRulesCount_one:"<strong>{{count}}</strong> regla personalizada",customRulesCount_other:"<strong>{{count}}</strong> reglas personalizadas",disabledCount_one:"{{count}} deshabilitada",disabledCount_other:"{{count}} deshabilitadas",unnamed:"(sin nombre)",geofencesSection:"Geocercas",waypointsActive_one:"<strong>{{count}}</strong> waypoint activo",waypointsActive_other:"<strong>{{count}}</strong> waypoints activos",waypointsDisabled_one:"{{count}} deshabilitado",waypointsDisabled_other:"{{count}} deshabilitados",regionsActive_one:"<strong>{{count}}</strong> regi\xF3n poligonal",regionsActive_other:"<strong>{{count}}</strong> regiones poligonales",regionsDisabled_one:"{{count}} deshabilitada",regionsDisabled_other:"{{count}} deshabilitadas",vertices:"v\xE9rt.",totalCommands:"{{count}} comandos totales.",seg:"seg",min:"min"},code:{ipsPassword:"Wialon IPS password: {{pw}}",ipsPasswordEmpty:"Wialon IPS password: (vac\xEDo)",protoMain:"Protocolo MAIN={{main}}, BACK={{back}}, ventana={{win}}",serverEmpty:"{{label}}: (vac\xEDo)",serverPrimary:"Principal",serverSecondary:"Secundario",serverBackPrimary:"BACK principal",serverBackSecondary:"BACK secundario",keepAlive:"Keep Alive cada {{secs}}s ({{ch}})",modemOn:"M\xF3dem celular: encendido",modemOff:"M\xF3dem celular: apagado",operatorAuto:"Operador: selecci\xF3n autom\xE1tica",operatorManual:"Operador manual: {{op}}",apnSim0:"APN SIM0: {{apn}}",apnCleared:"APN borrado (detecci\xF3n autom\xE1tica)",sim1ApnCleared:"APN de SIM1 borrado (detecci\xF3n autom\xE1tica)",simModeSingle:"Modo SIM: solo SIM0",simModeSwitch:"Modo SIM: switcheo autom\xE1tico SIM0/SIM1",sim1OperatorAuto:"SIM1: operador autom\xE1tico",sim1OperatorManual:"SIM1: operador manual {{op}}",sim1Apn:"SIM1 APN: {{apn}}",timerIgnOn:"Timer con IGN: {{time}}",timerIgnOff:"Timer sin IGN: {{time}}",headingChange:"Cambio de rumbo: {{angle}}\xB0",gpsModeAlways:"siempre (1s)",gpsModeIgn:"solo con IGN",gpsModeSpeed:"velocidad > 5 km/h",gpsMode:"Modo GPS: {{mode}}",gpsQuality:"Calidad GPS: fix\u2265{{fix}}D, PDOP\u2264{{pdop}}, sats\u2265{{sats}}",ignNormal:"normal",ignManual:"manual (SS)",ignVoltage:"por tensi\xF3n",ignManualLiberaIn07:"manual (libera IN07)",ignition:"Ignici\xF3n: {{mode}}",ignitionWithTimes:"Ignici\xF3n: {{mode}} \xB7 ON {{ton}}s \xB7 OFF {{toff}}s",ignVbatManual:"Umbrales de ignici\xF3n manuales: ON > {{on}} V, OFF < {{off}} V",ignVbatAuto:"Umbrales de ignici\xF3n autom\xE1ticos",tagDevice:"Etiqueta del dispositivo: {{tag}}",tagEmpty:"Etiqueta: (vac\xEDa)",passwordChange:"Cambio de password",inputDebounce:"{{label}}: ON={{on}}ms, OFF={{off}}ms",outputDisabled:"{{label}}: deshabilitada",outputDuration:"duraci\xF3n={{dur}}ms",outputBlink:"blink={{on}}ms/{{off}}ms",outputPersistent:"estado persistente",wifiEnabled:"WiFi habilitado",wifiDisabled:"WiFi deshabilitado",wifiNetworkEmpty:"Red WiFi {{idx}}: (vac\xEDa)",wifiNetwork:"Red WiFi {{idx}}: {{ssid}}",datalogDestAll:"todos",datalogDestGPRS:"GPRS",datalogDestWIF:"WiFi",datalogDestBTH:"Bluetooth",datalogDestTRM:"Terminal",datalogDestBACK:"Backup",datalogDestBGP:"Backup+GPRS",datalogDestBWI:"Backup+WiFi",datalog:"DataLog: {{dest}}, {{mode}}",alertSpeedOn:"Velocidad de alerta ON: {{speed}} km/h",alertSpeedOff:"Velocidad de corte OFF: {{speed}} km/h",batteryLow:"Bater\xEDa baja: {{min}}V \u2013 {{max}}V",batteryOk:"Bater\xEDa OK: {{min}}V+",batteryDisconnect:"Desconexi\xF3n: 0V \u2013 {{max}}V",parkingConfig:"Parking idx:{{idx}}, radio:{{radius}}m, confirmaci\xF3n:{{deb}}s",clearAllRules:"Borrar todas las reglas existentes",wifiReconnect:"WiFi: reconectar al energizar",speedActivate:"Velocidad: activar XP{{out}} al superar {{speed}} km/h",speedRestored:"Velocidad restablecida < {{speed}} km/h",speedRestoredOutput:"Velocidad restablecida < {{speed}} km/h \u2192 XP{{out}} OFF",batteryLowDetected:"Bater\xEDa baja detectada \u2192 evt:{{evt}}",batteryOkRestored:"Bater\xEDa OK restablecida \u2192 evt:{{evt}}",batteryDisconnected:"Desconexi\xF3n de bater\xEDa \u2192 evt:{{evt}}",parkingActivate:"Parking: activar al apagar IGN",parkingActivateGps:"Parking: activar al apagar IGN + GPS modo 1",parkingAlert:"Parking: alerta por movimiento \u2192 evt:{{evt}}",parkingAlertGps:"Parking: alerta por movimiento \u2192 evt:{{evt}} + restaurar GPS",prioLow:"baja",prioMedium:"media",prioHigh:"alta",noActions:"sin acciones",pkActivate:"PK activar",pkDeactivate:"PK desactivar",clearAllWaypoints:"Borrar todos los waypoints",waypointDisabled:"{{label}}: deshabilitado",waypointRadius:"{{label}}: radio {{radius}}",clearAllRegions:"Borrar todas las regiones",clearAllSpeeds:"Borrar todos los umbrales de velocidad",clearAllTimers:"Borrar todos los timers",clearAllUserVars:"Borrar todas las variables de usuario",clearDriverManager:"Borrar Driver Manager",everyHour:"cada hora",everyMin:"cada min",everySec:"cada seg",braking:"frenada",acceleration:"aceleraci\xF3n",hmAcelGps:"Acel GPS",hmBrakeGps:"Fren GPS",hmTurnLeft:"Giro izq",hmTurnRight:"Giro der",hmCentripetal:"Centr\xEDpeta",hmImpLat:"Imp.lat",hmImpFront:"Imp.frontal",hmImpRear:"Imp.post",hmDisabled:"deshabilitado",hmType:"tipo {{type}}",tiltAutoIgn:"auto IGN",tiltManual:"manual",tilt:"Inclinaci\xF3n: {{mode}}, estab={{stab}}s, detect={{det}}s, \xE1ngulo={{angle}}\xB0",tiltDisabled:"Inclinaci\xF3n: deshabilitada",counterMax:"{{label}}: m\xE1ximo {{max}}",flagPermanent:"permanente",flagVolatile:"vol\xE1til",captureSrcSerial:"Serial",captureSrcGps:"GPS",captureSrcModem:"Modem",captureSrcBle:"BLE",captureSrcDebug:"Debug",captureSrcCan:"CAN",captureSrcOff:"OFF",captureSource:"{{label}}: fuente {{src}}, puerto {{port}}",analogSource:"{{label}}: fuente {{src}}",bluetoothOn:"Bluetooth: encendido",bluetoothOff:"Bluetooth: apagado",onewireEnabled:"OneWire: habilitado",uartPortBaudrate:"UART principal: {{baudrate}} bps",onewireDisabled:"OneWire: deshabilitado",driverNoName:"(sin nombre)",driver:"Driver {{idx}}: {{name}}",regionBlockEmpty:"{{label}}: bloque {{block}} \u2014 vac\xEDo",regionBlockVerts:"{{label}}: bloque {{block}} \u2014 {{count}} v\xE9rtice",regionBlockVerts_other:"{{label}}: bloque {{block}} \u2014 {{count}} v\xE9rtices",dallasTemp:"{{label}}: Dallas temp",ecuThrottle:"Acelerador",ecuFuelPct:"Combustible %",ecuOdometer:"Od\xF3metro",ecuLiters:"Litros",ecuSpeed:"Velocidad",ecuEngineTemp:"Temp motor",ecuOilPressure:"Presi\xF3n aceite",ecuFuelTrip:"Fuel trip",ecuFuelTripSoft:"Fuel trip soft",ecuEngineHours:"Horas motor",ecuChassis:"Chassis",ecuFuelRate:"Tasa comb.",ecuTorque:"Torque",ecuWheelSpeed:"Vel ruedas",ecuEngineLoad:"Carga motor",ecuRuntime:"Runtime",ecuDistMil:"Dist MIL",ecuLitersCustom:"Litros custom",ecuMlCustom:"mL custom",ecuParkingBrake:"Freno mano",ecuBrakePedal:"Pedal freno",ecuThrottleCustom:"Acelerador custom",ecuDriverDoor:"Puerta conductor",ecuPassengerDoor:"Puerta acompa\xF1ante",ecuClutch:"Embrague",ecuTurbo:"Turbo",headerGenerated:"Configuraci\xF3n generada por Rinho Configurator",headerDate:"Fecha: {{date}}",headerTag:"Etiqueta: {{tag}}",headerDescription:"Descripci\xF3n: {{desc}}",headerCompatible:"Compatible con: {{models}}",sectionTag:"Etiqueta",sectionPassword:"Password",sectionIpProtocol:"Protocolo IP",sectionServers:"Servidores",sectionKeepAlive:"Keep Alive",sectionWialonPassword:"Wialon IPS Password",sectionWifi:"WiFi",sectionCellular:"Celular",sectionDatalog:"DataLog",sectionCountry:"Pa\xEDs (MCC)",sectionGps:"GPS",sectionIgnition:"Ignici\xF3n",sectionInputDebounce:"Antirebote Entradas (IT)",sectionCanBus:"CAN bus",sectionEcuCan:"ECU CAN (CXECU)",sectionOneWire:"OneWire",sectionDallasTemp:"Dallas Temp (DT)",sectionUartPort:"Puerto UART (CXTR)",sectionDigitalOutputs:"Salidas Digitales (XP)",sectionGradualCut:"Corte Gradual (GC)",sectionBluetooth:"Bluetooth (CXBTH)",sectionBeaconsBle:"Beacons BLE (BE)",sectionSensorsBle:"Sensores BLE (BS)",sectionSmartWildcard:"BLE Smart Wildcard (BSW)",sectionTimers:"Timers (TD)",sectionSchedule:"Horarios (TR)",sectionCounters:"Contadores (NT)",sectionHeading:"\xC1ngulo de Rumbo (DC)",sectionSpeed:"Velocidad (VL)",sectionAcceleration:"Aceleraci\xF3n (DV)",sectionManeuvers:"Maniobras (HM)",sectionVectors:"Vectores Movimiento (MVT)",sectionTilt:"Inclinaci\xF3n (TK)",sectionAccelerometer:"Aceler\xF3metro (CXAC)",sectionAnalogCalibration:"Calibraci\xF3n Anal\xF3gica (CXAIN)",sectionAnalog:"Anal\xF3gicos (AR)",sectionParking:"Parking (PK)",sectionTriggers:"Disparadores (UV)",sectionFlags:"Flags (U)",sectionCapture:"Capturador Serial (CXXB)",sectionReports:"Reportes de Usuario (UC)",sectionBlackBox:"Caja negra (CXBB)",sectionDriverManager:"Driver Manager (IC)",sectionRules:"Reglas (RL)",sectionWaypoints:"Waypoints (WP)",sectionRegions:"Regiones (RG)",sectionOther:"--- Otros ---",valServerRequired:"Se requiere el servidor principal (IP0)",valPortInvalid:"Puerto inv\xE1lido (1-65535)",valTimerRange:"Timer: 1-99999 seg",valAngleRange:"\xC1ngulo: 1\xB0-359\xB0",valSsidRequired:"Ingrese al menos un SSID",valApnRequired:"Sin APN: se enviar\xE1 el comando de APN vac\xEDo, que borra el APN guardado del equipo y lo deja en detecci\xF3n autom\xE1tica (firmware reciente y Rinho PI). En firmware viejo el equipo puede quedar sin datos hasta cargarle un APN.",valNoComm:"Sin celular ni WiFi habilitados: el dispositivo no podr\xE1 comunicarse con el servidor.",sectionDrv:"Chofer (DRV)",drvOrigen0:"Chofer apagado",drvOrigen1:"Chofer: iButton",drvOrigen2:"Chofer: sesi\xF3n IC",drvOrigen3:"Chofer: solo manual",drvOrigen4:"Chofer: tac\xF3grafo",drvBleOff:"Chofer por Bluetooth apagado",drvBleOn:"Chofer por Bluetooth (BSW0{{slot}})",valDrvRpt:"Chofer (DRV): el reporte \xAB{{rpt}}\xBB no es v\xE1lido. Va como la acci\xF3n G sin la G: 2 letras o n\xFAmeros, 2 hexa y la prioridad H, M o L (ej. U101H).",valDrvAvisoCorte:"Chofer (DRV): el aviso no puede ir en la salida del corte ({{xp}}).",valDrvOkCorte:"Chofer (DRV): la confirmaci\xF3n no puede ir en la salida del corte ({{xp}}).",valDrvTacoSinCan:"Chofer (DRV): el origen tac\xF3grafo necesita bus CAN (el ZERO y el PI no lo tienen).",valDrvSalida:"Chofer (DRV): {{xp}} no existe en el equipo (tiene {{n}} salida/s).",valDrvListaVacia:"Chofer (DRV): exige el listado ICL pero el listado est\xE1 vac\xEDo, as\xED que no va a poder identificarse nadie.",valDrvBleSinBle:"Chofer por Bluetooth: el equipo no tiene Bluetooth y lo va a rechazar.",valDrvBleOrigen:"Chofer por Bluetooth: solo funciona con origen iButton o sesi\xF3n IC; con este origen el equipo lo ignora.",valDrvBleSlot:"Chofer por Bluetooth: {{bsw}} no est\xE1 configurado, as\xED que nunca va a enganchar un beacon.",valWifiBtBoth:"WiFi y Bluetooth encendidos a la vez: el SPIDER y el SMART no permiten ambos y el Bluetooth quedar\xE1 apagado. Dej\xE1 uno solo (solo el ZERO admite los dos).",valWifiBtCoexFw:"WiFi y Bluetooth a la vez en el ZERO: requiere firmware 1.09.28.T50 o superior (el portal web con Bluetooth prendido, T52). Con uno anterior el Bluetooth queda apagado.",valUvEmptyRange:"{{uv}} nunca se activa: el equipo dispara con M\xCDN \u2264 valor < M\xC1X, y M\xCDN ({{min}}) no es menor que M\xC1X ({{max}}).",valUvEmptyRangeExact:"{{uv}} nunca se activa: el m\xE1ximo no se incluye (M\xCDN \u2264 valor < M\xC1X). Para disparar con {{min}} exacto, pon\xE9 M\xC1X = {{exact}}.",valEventDuplicate:"Evento {{evt}} repetido ({{names}}): la plataforma no los va a poder distinguir. Cambi\xE1 el n\xFAmero de uno en la Tabla de Eventos.",valEventGap:"Eventos {{evts}}: las plataformas que leen 00 a 99 (ej. SmartTrack) no los reciben. Us\xE1 n\xFAmeros de 00 a 99.",valOk:"OK",valWarnings:"Advertencias"},ignition:{header:"Ignici\xF3n (CXIGN)",desc:"Define c\xF3mo el dispositivo detecta el estado de la ignici\xF3n del veh\xEDculo.",modeLabel:"Modo de ignici\xF3n",modeNormal:"Normal",modeManual:"Manual",byVoltage:"Por tensi\xF3n",modeManualLiberaIn07:"Manual (libera IN07)",modeNormalDesc:"Detecci\xF3n por entrada digital de ignici\xF3n.",modeManualDesc:"El estado IGN se controla manualmente por software (comando SS). No usa entrada f\xEDsica.",modeManualLiberaIn07Desc:"El estado IGN se controla manualmente por software y libera IN07 para uso general.",voltageDesc:"El firmware mide V al iniciar y <strong>detecta autom\xE1ticamente</strong> si el veh\xEDculo es 12V o 24V, aplicando el conjunto de umbrales correspondiente. La hist\xE9resis evita oscilaciones cerca del umbral.",vehicle:"Veh\xEDculo",ifV:"si V",debounceHeader:"Tiempos de estabilizaci\xF3n (debounce)",debounceDesc:"Tiempo que la se\xF1al debe mantenerse estable antes de confirmar el cambio de estado. Evita falsos positivos por ruido o cortes moment\xE1neos.",tonLabel:"Tiempo al encender (ON)",toffLabel:"Tiempo al apagar (OFF)",secondsUnit:"segundos",vbatManualLabel:"Umbrales manuales",vbatManualDesc:"Reemplaza los umbrales autom\xE1ticos de f\xE1brica. Procedimiento de campo: consultar la tensi\xF3n con motor apagado y con motor encendido, y poner los dos cortes en el medio de esa banda.",vbatOnLabel:"Enciende arriba de",vbatOffLabel:"Apaga abajo de",vbatFwNote:"Requiere firmware v1.09.26 (build T15) o superior. Si el equipo conectado no lo soporta, el comando se omite al enviar.",voltsUnit:"V"},inputs:{header:"Antirebote de Entradas (IT)",pullUpDesc:"Entradas con pull-up: <1>libre = 1</1> \xB7 <3>a GND = 0</3> (activada).",debounceDesc:"<strong>ON</strong>: retardo en reposo (se\xF1al libre, = 1) \xB7 <strong>OFF</strong>: retardo al activar (a GND, = 0).",descriptiveName:"nombre descriptivo"},servers:{header:"Servidores",desc:"Ingres\xE1 IP directa (ej: 64.120.108.24) o nombre DNS (ej: dm.rinho.com.ar). Se detecta autom\xE1ticamente.",ipOrDns:"IP o dominio DNS",port:"Puerto",addSecondary:"+ Agregar servidor secundario (IP1)",password:"Contrase\xF1a",enableBack:"Habilitar canal de respaldo (BACK)",ipPlaceholder:"64.120.108.24 o dm.rinho.com.ar",ipsPasswordPlaceholder:"password del servidor Wialon"},timers:{reportTimers:"Timers de Reporte",ignOnLabel:"Timer con IGN encendido",ignOffLabel:"Timer sin IGN / detenido",advancedHeader:"Timers (TD00\u2013TD31)",advancedDesc:"Cada timer genera un pulso peri\xF3dico por tiempo y/o distancia. Se usan como disparadores en las reglas (TD00+, TD01+, etc.).",noTimers:"No hay timers configurados.",addTimer:"+ Agregar timer",namePlaceholder:"Ej: Timer reporte con IGN",time:"Tiempo",distance:"Distancia",sec:"seg",meters:"metros"},waypoints:{header:"Waypoints (Geocercas Circulares)",desc:"Hasta 32 waypoints (WP00\u2013WP31). Cada uno define un punto central y radio. Disponibles como se\xF1ales en el motor de eventos y en reglas personalizadas.",addWaypoint:"+ Agregar waypoint",importKml:"Importar KML",maxReached:"M\xE1ximo de 32 waypoints alcanzado.",waypointName:"Nombre del waypoint",coordinates:"Coordenadas",latitude:"Latitud",longitude:"Longitud",radius:"Radio",generatedCmd:"Comando generado",editOnMap:"Editar en mapa",internal:"Interno",deleteWaypoint:"Eliminar waypoint",imported_one:"{{count}} waypoint importado",imported_other:"{{count}} waypoints importados",ignored:"{{count}} ignorado \u2014 sin espacio",ignored_other:"{{count}} ignorados \u2014 sin espacio",deleteCount:"Borrar {{count}}",noPoints:"No se encontraron puntos en el archivo.",error:"Error"},tilt:{header:"Detecci\xF3n de inclinaci\xF3n",desc:"Detecta vuelco o inclinaci\xF3n usando el aceler\xF3metro. Trigger: TK+",manual:"Manual",autoIgn:"Auto con IGN",stabilization:"Estabiliz.",detection:"Detecci\xF3n",sec:"seg",runtimeDesc:"Primero espera {{stab}}s inm\xF3vil para calibrar, luego monitorea. Si la inclinaci\xF3n supera {{angle}}\xB0 por m\xE1s de {{detect}}s, dispara TK+."},heading:{title:"\xC1ngulo de Rumbo",label:"Cambio de rumbo (grados)",desc:"Genera un reporte adicional cuando el veh\xEDculo gira m\xE1s de {{angle}}\xB0"},logging:{title:"Descarga de Reportes",label:"Descarga por DataLog",enabledDesc:"Los reportes se almacenan en el DataLog (12.000 registros) y se descargan autom\xE1ticamente al servidor. M\xE1s confiable ante p\xE9rdida de conectividad.",disabledDesc:"Los reportes se almacenan en el buffer interno (2.728 registros) y se env\xEDan por GPRS/SMS."},battery:{title:"Monitoreo de bater\xEDa",desc:"Genera eventos autom\xE1ticos cuando la tensi\xF3n del veh\xEDculo entra en las zonas de desconexi\xF3n, bater\xEDa baja o restablecimiento. Utiliza rangos anal\xF3gicos (AR) del dispositivo.",monitoring:"\u{1F50B} Monitoreo de bater\xEDa",disconnection:"Desconexi\xF3n",low:"Baja",ok:"OK",lowBattery:"Bater\xEDa baja",batteryOk:"Bater\xEDa OK (restablecimiento)",events:"Eventos",advancedResources:"Recursos avanzados",arLow:"AR Baja:",arOk:"AR OK:",arDisc:"AR Desc:",datalogTooltip:"DataLog: memoria circular",bufferTooltip:"Buffer: priorizado, ideal para alarmas"},outputs:{title:"Salidas Digitales (CXXP)",desc:"Configura el modo de activaci\xF3n de cada salida digital.",disabled:"deshabilitada",fixed:"fija",continuousBlink:"blink continuo",fixedMode:"Fija",blinkMode:"Parpadeo",fixedDesc:"Estado persistente (no vol\xE1til). Se activa/desactiva por comando o regla.",duration:"Duraci\xF3n"},parking:{title:"Modo Parking",desc:"Establece una geocerca virtual desde la posici\xF3n actual al apagar la ignici\xF3n. Si el veh\xEDculo sale del radio configurado, genera un evento de alerta.",radius:"Radio de geocerca",confirmTime:"Tiempo de confirmaci\xF3n",gpsMode1:"Cambiar GPS a modo 1 al estacionar",gpsMode1Note:"(SCXGPS1 \u2014 solo con IGN)",gpsRestore:"Restaurar GPS al detectar movimiento",gpsRestoreNote:"(SCXGPS0 \u2014 siempre activo)",activateOnIgnOff:"Activar parking al apagar ignici\xF3n",movementDetected:"Movimiento detectado",datalogTooltip:"DataLog: memoria circular",bufferTooltip:"Buffer: priorizado, ideal para alarmas"},velAlert:{title:"Control de velocidad",desc:"Genera eventos de exceso de velocidad y de restablecimiento. Opcionalmente activa una salida digital (buzzer) al superar el l\xEDmite y la apaga al bajar del umbral de corte.",header:"\u{1F6A8} Control de velocidad",cutoff:"Corte: <strong>{{speed}} km/h</strong>",limit:"L\xEDmite: <strong>{{speed}} km/h</strong>",logTitle:"DataLog: memoria circular",bufTitle:"Buffer: priorizado, ideal para alarmas",ignCondition:"Con IGN encendido",activateOutput:"Activar salida (buzzer)",speedExcess:"Exceso de velocidad",speedRestore:"Velocidad restablecida",advancedResources:"Recursos avanzados",evt:"Evt"},regions:{deleteVertex:"Eliminar v\xE9rtice",regionName:"Nombre de la regi\xF3n",maxVertices:"M\xE1ximo 32 v\xE9rtices.",minVertices:"Se necesitan al menos 3 v\xE9rtices con coordenadas para generar el comando.",commandsGenerated:"Comandos generados ({{count}} bloques)",deleteConfirm:"Borrar?",deleteRegion:"Eliminar regi\xF3n",title:"Regiones (Geocercas Poligonales)",latitude:"Latitud",longitude:"Longitud",addVertex:"+ Agregar v\xE9rtice",noPolygons:"No se encontraron pol\xEDgonos en el archivo.",imported_one:"{{count}} regi\xF3n importada",imported_other:"{{count}} regiones importadas",importedIgnored_one:"{{count}} ignorada \u2014 sin espacio",importedIgnored_other:"{{count}} ignoradas \u2014 sin espacio",clearAll:"Borrar todas",clearCount:"Borrar {{count}}",description:"Hasta 32 regiones (RG00\u2013RG31). Cada regi\xF3n es un pol\xEDgono de 3 a 32 v\xE9rtices. Los pol\xEDgonos con m\xE1s de 8 puntos se dividen en bloques de hasta 8 por comando.",addRegion:"+ Agregar regi\xF3n",importKml:"Importar KML",maxReached:"M\xE1ximo de 32 regiones alcanzado.",editOnMap:"Editar en mapa"},protocol:{ipProtocol:"Protocolo IP",title:"Protocolo IP",windowLabel_one:"Ventana: {{count}} reporte simult\xE1neo",windowLabel_other:"Ventana: {{count}} reportes simult\xE1neos",windowSummary:"Ventana: {{count}} rep.",windowShort:"Ventana: {{count}} rep.",windowDesc:"Cantidad de reportes que el dispositivo puede descargar en simult\xE1neo hacia el servidor.",windowDescription:"Cantidad de reportes que el dispositivo puede descargar en simult\xE1neo hacia el servidor.",keepAlive:"Keep Alive",keepAliveDescription:"Env\xEDa un mensaje peri\xF3dico al servidor para mantener la sesi\xF3n activa y confirmar conectividad. Si el servidor no recibe el keep alive en el tiempo configurado, puede considerar el dispositivo desconectado.",keepAliveDesc:"Env\xEDa un mensaje peri\xF3dico al servidor para mantener la sesi\xF3n activa y confirmar conectividad. Si el servidor no recibe el keep alive en el tiempo configurado, puede considerar el dispositivo desconectado.",channelMain:"Canal MAIN",channelBack:"Canal BACK",dataLog:"DataLog",dataLogDescription:"Almacenamiento local de reportes. Se env\xEDan autom\xE1ticamente cuando hay conectividad.",datalogDesc:"Almacenamiento local de reportes. Se env\xEDan autom\xE1ticamente cuando hay conectividad.",enabled:"Habilitado",destination:"Destino",destAll:"Todos",destTerminal:"Terminal",retries:"Reintentos",time:"Tiempo",seconds:"seg",order:"Orden",fifo:"FIFO (m\xE1s antiguo primero)",lifo:"LIFO (m\xE1s reciente primero)",dlAll:"Todos",dlBluetooth:"Bluetooth",dlTerminal:"Terminal",dlBackup:"Backup",dlBackupGprs:"Backup+GPRS",dlBackupWifi:"Backup+WiFi"},sms:{retries:"Reintentos",timeout:"Timeout",desc:"Cantidad de reintentos de env\xEDo SMS y timeout entre cada intento (0 = default del m\xF3dem)."},customRules:{rulesHeader:"Reglas",customRulesHeader:"Reglas personalizadas",eventTable:"Tabla de eventos",deleteAll:"Borrar todas",advancedDesc:"Todas las reglas del dispositivo. Asign\xE1 etiquetas a los recursos para identificarlos f\xE1cilmente.",basicDesc:"Defin\xED reglas adicionales usando cualquier se\xF1al del dispositivo.",addRule:"+ Agregar RL",ruleName:"Nombre",ruleNamePlaceholder:"Nombre descriptivo de la regla",trigger:"Disparador",triggerHint:"se\xF1al que activa la regla",condition:"Condicionante",conditionHint:"condici\xF3n adicional (opcional)",actions:"Acciones",actionsRun:"ejecutar al dispararse",addAction:"+ Agregar acci\xF3n",noTrigger:"Sin disparador configurado",noCondition:"Sin condici\xF3n configurada",noActions:"Sin acciones configuradas",addSignal:"+ se\xF1al",searchSignalPlaceholder:"Buscar se\xF1al... (ej: IN05, GPS, timer)",noSearchResults:"Sin resultados",gpsModeNormal:"Normal (din\xE1mico)",gpsModeAnchor:"Ancla (posici\xF3n fija)",gpsModeBySpeed:"Por velocidad",parkingActivate:"Activar",parkingDeactivate:"Desactivar",timerRestart:"Reiniciar",timerStop:"Detener",sleepWake:"Despertar",sleepSleep:"Dormir",sleepEnable:"Habilitar",sleepDisable:"Deshabilitar",gcActivate:"Activar",gcStop:"Detener",gcReset:"Reset",resourceLabels:"Etiquetas de recursos",resourceLabelsDesc:"Asignar nombres a los recursos para identificarlos en el selector de se\xF1ales.",addLabel:"+ Etiquetar",eventTableTitle:"Tabla de Eventos",eventTableDesc:"Nombre descriptivo para cada numero de evento. Se usa en reglas y en el codigo generado.",eventNamePlaceholder:"Nombre del evento...",eventDuplicate:"Ya existe un evento con esa descripci\xF3n",eventDuplicateRevert:"Descripci\xF3n duplicada \u2014 revertido",onlyDefined:"Solo definidos",noEventsDefined:"No hay eventos definidos",showAll:"Mostrar todos",useEventTable:"Usa la Tabla de Eventos para definir.",labelTimers:"Timers",labelSpeeds:"Velocidades",labelAnalog:"Anal\xF3gicos",labelCounters:"Contadores",edgeFalseToTrue:"de falso a verdadero (flanco ascendente)",edgeTrueToFalse:"de verdadero a falso (flanco descendente)",edgeAny:"cualquier flanco",sleepAccel:"Aceler\xF3metro",sleepInputs:"Entradas",sleepCellular:"Celular",sleepInternalPower:"Fuente interna",sleepExternalPower:"Fuente externa",reposoFull:"Reposo full",gpsOff:"GPS off",timeUnitSec:"seg",timeUnitMin:"min",timeUnitHrs:"hrs",reposo:"Reposo",visual:"Visual",triggerRawPlaceholder:"Expresi\xF3n raw del disparador (ej: IGN&VL00)",conditionRawPlaceholder:"Expresi\xF3n raw de la condici\xF3n (ej: IGN&!U00)",cancel:"No",index:"\xCDndice",expand:"Expandir",collapse:"Contraer",confirmDelete:"Borrar?",yes:"S\xED",no:"No",deleteRule:"Eliminar regla",duplicateRule:"Duplicar regla",enableRule:"Habilitar regla",disableRule:"Deshabilitar regla",copy:"copia",search:"Buscar",close:"Cerrar",delete:"Borrar",permanent:"permanente",volatile:"vol\xE1til",moveUp:"Mover arriba",moveDown:"Mover abajo",gpsModeNormalShort:"Normal",gpsModeAnchorShort:"Ancla",gpsModeSpeedShort:"Vel.",event:"Evento",priority:"prioridad",descOutput:"Salida",descVariable:"Variable",descCounter:"Contador",descGradualCut:"Corte Gradual",descMode:"Modo",descUnknown:"Desconocido",counterIncrement:"Incrementar",counterDecrement:"Decrementar",undefined:"Sin definir",noResultsFor:'Sin resultados para "{{filter}}"'},zeroConfig:{periodicIgnOn:"Peri\xF3dico con IGN",periodicIgnOff:"Peri\xF3dico sin IGN",headingChange:"Cambio de rumbo",ignitionOn:"Encender IGN",ignitionOff:"Apagar IGN",inputActivation:"Activaci\xF3n de entrada",inputDeactivation:"Desactivaci\xF3n de entrada",outputActivation:"Activaci\xF3n de salida",outputDeactivation:"Desactivaci\xF3n de salida"},modeManager:{timerWithIgn:"Timer con IGN",timerWithoutIgn:"Timer sin IGN",headingChange:"Cambio de rumbo",overspeed:"Exceso de velocidad",speedRestore:"Velocidad restablecida",batteryLow:"Bater\xEDa baja",batteryOk:"Bater\xEDa OK",batteryDisconnected:"Desconexi\xF3n de bater\xEDa",parking:"Parking",wialonIpsTemplate:"Template Wialon IPS",wialonCanTemplate:"Template Wialon + CAN",wifiReconnectOnPower:"WiFi: reconectar al energizar",moduleAcceleration:"Aceleraci\xF3n (DV)",moduleManeuvers:"Maniobras (HM)",moduleVectors:"Vectores (MVT)",moduleTilt:"Inclinaci\xF3n (TK)",moduleSchedules:"Horarios (TR)",moduleCounters:"Contadores (NT)",moduleTriggers:"Disparadores (UV)",moduleReports:"Reportes (UC)",moduleFlags:"Flags (U)",moduleCapturer:"Capturador (CXXB)",moduleBlackBox:"Caja negra (CXBB)",moduleDrv:"Chofer (DRV)",moduleDrvB:"Chofer por Bluetooth (DRVB)",moduleDriver:"Driver Manager (IC)",moduleEcuCan:"ECU CAN (CXECU)"},allRes:{emptyMessage:"No hay recursos configurados. Agreg\xE1 timers, velocidades, anal\xF3gicos u otros recursos que necesites para tus reglas.",units:{sec:"seg"},td:{label:"Timers",desc:"Pulso peri\xF3dico por tiempo y/o distancia. Trigger: TD00+",timeout:"Tiempo",distance:"Distancia"},dc:{label:"Headings",desc:"Cambio de direcci\xF3n GPS. Trigger: DC00+",angle:"\xC1ngulo",disabled:"deshabilitado"},vl:{label:"Velocidad",desc:"Umbral de velocidad. Trigger: VL00+, VL01-",speed:"Velocidad",filtered:"Filtrado",filteredOn:"filtrado",filteredOff:"sin filtro",settle:"Sostenido",settleUnit:"d\xE9cimas"},dv:{label:"Aceleraci\xF3n",desc:"Frenada/aceleraci\xF3n brusca por delta de velocidad GPS. Trigger: DV00+"},hm:{label:"Maniobras",desc:"Maniobras bruscas. HM00-01: GPS, HM02-07: aceler\xF3metro. Trigger: HM00+",eventType:"Tipo",eventTypes:{"0":"Acel GPS","1":"Fren GPS","2":"Giro izq","3":"Giro der","4":"Centr\xEDpeta","5":"Imp.lat","6":"Acel IMU","7":"Fren IMU"},magnitude:"Magnitud",minSpeed:"Vel m\xEDn",hysteresis:"Hist\xE9resis",timeWindow:"Ventana",preset:{fleet:"Flota Comercial","fleet.accel":"Aceleraci\xF3n","fleet.brake":"Frenado","fleet.latImpact":"Impacto lateral","fleet.frontImpact":"Impacto frontal",hazmat:"Veh\xEDculos Peligrosos","hazmat.accel":"Aceleraci\xF3n suave","hazmat.brake":"Frenado gradual","hazmat.turnL":"Giro izq suave","hazmat.turnR":"Giro der suave","hazmat.centripetal":"Centr\xEDpeta","hazmat.latImpact":"Imp. lateral","hazmat.frontImpact":"Imp. frontal","hazmat.rearImpact":"Imp. posterior",family:"Familiar Est\xE1ndar","family.accel":"Aceleraci\xF3n","family.brake":"Frenado","family.turnL":"Giro izq","family.turnR":"Giro der","family.latImpact":"Imp. lateral","family.frontImpact":"Imp. frontal","family.rearImpact":"Imp. posterior","family.centripetal":"Centr\xEDpeta"}},ar:{label:"Anal\xF3gicos",desc:"Monitoreo anal\xF3gico: voltaje, ADC o temperatura. Activa se\xF1al cuando valor est\xE1 en rango [m\xEDn, m\xE1x). Trigger: AR00+",source:"Origen","source.vbat":"Bater\xEDa principal (VBat) \u2014 cV","source.vbu":"Bater\xEDa backup (VBU) \u2014 cV","source.adc0":"ADC 0 (AN0) \u2014 cV","source.adc1":"ADC 1 (AN1) \u2014 cV","source.adc2":"ADC 2 (AN2) \u2014 cV","source.adc3":"ADC 3 (AN3) \u2014 cV","source.adc4":"ADC 4 (AN4) \u2014 cV","source.adc5":"ADC 5 (AN5) \u2014 cV","source.tempMcu":"Temperatura MCU \u2014 c\xB0C","source.dallas0":"Temperatura Dallas 0 \u2014 c\xB0C","source.dallas1":"Temperatura Dallas 1 \u2014 c\xB0C","source.dallas2":"Temperatura Dallas 2 \u2014 c\xB0C","source.dallas3":"Temperatura Dallas 3 \u2014 c\xB0C","source.dallas4":"Temperatura Dallas 4 \u2014 c\xB0C","source.dallas5":"Temperatura Dallas 5 \u2014 c\xB0C","source.dallas6":"Temperatura Dallas 6 \u2014 c\xB0C","source.dallas7":"Temperatura Dallas 7 \u2014 c\xB0C",min:"M\xEDn",max:"M\xE1x"},u:{desc:"Flags booleanos SET/CLR desde acciones de reglas. U00-U15: vol\xE1tiles. U16-U31: permanentes. U32-U47: vol\xE1tiles. U48-U63: permanentes. Trigger: U00+",value:"Valor",permanent:"permanente",volatile:"vol\xE1til"},nt:{label:"Contadores",desc:"Contadores con valor m\xE1ximo. Se incrementan/decrementan desde acciones. Dispara al llegar al m\xE1ximo. Trigger: NT00+",maxcount:"M\xE1ximo"},tr:{label:"Horarios",desc:"Reglas por horario. Dispara en un momento espec\xEDfico o peri\xF3dicamente. ** = cada hora/minuto/segundo (wildcard). Default: ****** (cada segundo). Trigger: TR00+",hora:"Hora",minuto:"Minuto",segundo:"Segundo"},mvt:{label:"Vectores",desc:"Vectores de movimiento por aceler\xF3metro (umbrales XYZ en mg). Triggers: MVXP, MVXN, MVYP, MVYN, MVZP, MVZN"},cxbb:{label:"Caja negra",desc:"Captura un reporte en forma continua y, cuando una regla ejecuta {GBBxxH;@LOG}, emite las muestras pasadas y futuras con el evento xx. Una r\xE1faga por vez: otro GBB mientras sale la anterior se ignora. Con U0-UF la muestra lleva solo el texto del UC, sin posici\xF3n: incluila en el SUC. Sin ;@LOG va a la cola viva y se pierde sin cobertura.",reportType:"Reporte",sampleRate:"Muestreo",history:"Pasadas",future:"Futuras"},cxxb:{label:"Capturador",desc:"Capturador serial externo. Configura puerto, timeout, delimitadores. Dispara como XB00+",source:"Fuente","source.disabled":"Deshabilitado","source.modem":"M\xF3dem",port:"Puerto",rxChars:"Fin por caracteres",rxTimeout:"Fin por timeout",header:"Header (inicio)",footer:"Footer (fin)",displayMode:"Formato salida","displayMode.binary":"Binario","displayMode.hex":"Hexadecimal",showHeadFoot:"Incluir H/F en captura"},uv:{label:"Disparadores",desc:"Variables de usuario con expresiones condicionales. Trigger: UV00+",expression:"Expresi\xF3n"},uc:{label:"Reportes",desc:"Templates de reportes personalizados. Se generan desde acciones de reglas con GU{slot}.",expression:"Expresi\xF3n"},drv:{help:{origen:"De d\xF3nde sale el chofer. iButton: la \xFAltima llave le\xEDda. Sesi\xF3n IC: el login del Driver Manager (llave, control RF o SIC). Solo manual: SDRV/CDRV desde la plataforma o por SMS. Tac\xF3grafo: la tarjeta del chofer 1 (bus CAN). Cambiar el origen hace logout.",lista:"Cualquier c\xF3digo: cualquier llave o tarjeta queda como chofer. Solo ICL: solo los c\xF3digos cargados en el listado del Driver Manager; uno de afuera no entra y dispara DRV03.",retencion:"Segundos con la ignici\xF3n apagada hasta el logout autom\xE1tico. 0 = el chofer queda hasta que se identifique otro o llegue un CDRV.",ventana:"Segundos que tiene el chofer para identificarse al dar contacto. 0 = no se exige chofer (sin aviso ni corte). Si vence sin chofer dispara DRV04 y aplica el corte.",aviso:"Salida que se activa mientras corre la ventana (buzzer o luz) para recordarle al chofer que se identifique. No puede ser la salida del corte.",corte:"Qu\xE9 pasa si vence la ventana sin chofer o se presenta un c\xF3digo no autorizado. Corte por XP: activa esa salida. Gradual: usa el corte gradual (GC). Habilitaci\xF3n H: la salida se activa solo con chofer, as\xED que el veh\xEDculo no arranca sin identificarse.",velCorte:"El corte por salida espera a que la velocidad baje de este valor (km/h), para no cortar con el veh\xEDculo en marcha. No aplica al gradual ni a la habilitaci\xF3n.",rptLogin:"Reporte en cada login, escrito como la acci\xF3n G sin la G: tipo (2 caracteres), n\xFAmero de evento en hexa y prioridad H, M o L. Ej. U101H = plantilla U1, evento 01, prioridad alta. Vac\xEDo = ninguno.",rptLogout:"Reporte en cada logout (CDRV, retenci\xF3n vencida o cambio de chofer). Mismo formato, ej. U102H. Vac\xEDo = ninguno.",rptInvalido:"Reporte cuando se presenta un c\xF3digo no autorizado (con Solo ICL). Mismo formato, ej. U103H. Vac\xEDo = ninguno.",rptSinChofer:"Reporte cuando vence la ventana sin que nadie se identifique. Mismo formato, ej. U104H. Vac\xEDo = ninguno.",dst:"Ad\xF3nde van esos reportes: GP servidor principal, WI por WiFi, BT Bluetooth, TR puerto serie, BGP y BWI backup por celular o WiFi, LOG solo la memoria, BACK el backup, ALL todos.",xpOk:"Salida que se activa 2 s en cada login, para confirmarle al chofer que qued\xF3 identificado (buzzer o luz). No puede ser la salida del corte."},label:"Chofer",desc:"Un solo chofer por equipo: va a Wialon/Traccar (campo iButton), al token DRV, al TRIP y a las se\xF1ales DRV00 (hay chofer), DRV01 login, DRV02 logout, DRV03 c\xF3digo no autorizado, DRV04 venci\xF3 la ventana.",origen:"Origen",origen0:"Apagado",origen1:"iButton (\xFAltima llave)",origen2:"Sesi\xF3n IC",origen3:"Solo manual (SDRV)",origen4:"Tac\xF3grafo (CAN)",lista:"Listado",lista0:"Cualquier c\xF3digo",lista1:"Solo ICL",retencion:"Retenci\xF3n",ventana:"Ventana",aviso:"Aviso",ninguna:"Ninguna",corte:"Corte",sinCorte:"Sin corte",corteXp:"Corte por",corteG:"Corte gradual (GC)",corteH:"Habilitaci\xF3n (solo arranca con chofer) por",velCorte:"Vel. corte",rptLogin:"Rpt login",rptLogout:"Rpt logout",rptInvalido:"Rpt inv\xE1lido",rptSinChofer:"Rpt sin chofer",rptPlaceholder:"Ej: U101H (vac\xEDo = ninguno)",dst:"Destino rpt",xpOk:"OK login",xpOkXp:"2 s en cada login"},drvb:{help:{slot:"Slot BSW (Bluetooth wildcard) que engancha el beacon del chofer. Ese BSW se configura aparte, en Bluetooth, con el filtro del beacon. Apagado = sin chofer por Bluetooth.",modo:"Presencia: el chofer queda logueado mientras el beacon est\xE1 cerca y sale cuando el BSW lo pierde. Bot\xF3n: cada pulsaci\xF3n del beacon hace login (reemplaza al chofer actual).",id:"Qu\xE9 se toma como c\xF3digo del chofer: la MAC del beacon (12 hex), o el major+minor del iBeacon (8 hex) / la instancia del Eddystone-UID (12 hex).",toggle:"Solo en modo Bot\xF3n: volver a apretar el mismo beacon hace logout."},label:"Chofer por Bluetooth",desc:"El chofer sale de un beacon (iBeacon o Eddystone-UID) enganchado por un slot BSW. Funciona con origen iButton o sesi\xF3n IC.",slot:"Slot BSW",apagado:"Apagado",modo:"Modo",modoP:"Presencia",modoB:"Bot\xF3n",id:"C\xF3digo",idI:"Major+minor / instancia",toggle:"Bot\xF3n: 2\xAA = logout"},ic:{desc:"Gesti\xF3n de conductores por c\xF3digo alfanum\xE9rico. IC00: sesi\xF3n, IC01: modo, IC02: timeout, IC03: login fallido. ICL: c\xF3digo v\xE1lido.",name:"Nombre",namePlaceholder:"Nombre del conductor",code:"C\xF3digo",codePlaceholder:"C\xF3digo alfanum\xE9rico"},sm:{label:"Destinos SMS",desc:"N\xFAmeros de tel\xE9fono para notificaciones SMS (hasta 5 destinos).",phone:"Tel\xE9fono",phonePlaceholder:"+5491122334455"},cid:{label:"Caller ID",desc:"Recepci\xF3n de llamadas de voz. Detecta caller ID entrante y auto-contesta seg\xFAn modo. Usar % como wildcard para cualquier n\xFAmero. Trigger: CID00+",mode:"Modo",mode0:"Solo detectar (no contesta)",mode1:"Auto-contestar (micr\xF3fono)",mode2:"Auto-contestar (micr\xF3fono + parlante)",cidString:"N\xFAmero",cidPlaceholder:"+5491122334455 o % para todos"},mc:{label:"Pa\xEDs (MCC)",desc:"Pa\xEDs en el que est\xE1 operando el m\xF3dem, por Mobile Country Code. La se\xF1al MC00 est\xE1 activa mientras el MCC de la red coincide con el del slot: sirve para reglas de roaming (cruce de frontera). Ej: 722 Argentina, 724 Brasil, 730 Chile, 736 Bolivia, 744 Paraguay, 748 Uruguay. Trigger: MC00+",mcc:"MCC",country:"Pa\xEDs",placeholder:"Buscar pa\xEDs o escribir MCC"},cxtr:{label:"Puertos UART",desc:"Velocidad del puerto serie principal, el mismo por el que se configura el equipo: al enviarla, el configurador reabre el puerto a la velocidad nueva y la confirma. 38400 y 57600 requieren firmware 1.09.28.T40. No aplica al ZERO (USB nativo)."},tk:{label:"Inclinaci\xF3n",desc:"Detecci\xF3n de vuelco/inclinaci\xF3n por aceler\xF3metro. Trigger: TK+",mode:"Modo",stabTime:"Estabiliz.",detectTime:"Detecci\xF3n",angle:"\xC1ngulo"},cxcan:{desc:"Configuraci\xF3n del bus CAN del veh\xEDculo.",protocol:"Protocolo",speed:"Velocidad",format:"Formato",engine:"Motor",gasoline:"Gasolina"},cxow:{desc:"Bus OneWire para iButton y sensores de temperatura Dallas. Solo Spider y Smart.",noReset:"No reiniciar",every10s:"Cada 10s",every20s:"Cada 20s",every30s:"Cada 30s",useAsKey:"Sensor de temperatura como llave",key:"Llave",tempMode:"Sensores de temperatura",modeTemp:"Solo temperatura",modeKey:"Como llave",modeAuto:"Auto-asignar DT (TH/TL)",auto:"Auto DT",invKey:"C\xF3digo de la llave",invNo:"Como lo lee el equipo (familia primero)",invYes:"Como est\xE1 grabado en la llave (invertido)",invShort:"Invertido"},dt:{desc:"Sensores de temperatura Dallas DS18B20 conectados al bus OneWire. Se leen con OW(n) o MDT(n,f) en expresiones.",romPlaceholder:"16 caracteres hex (ej: 28FF1234567890AB)"},gc:{label:"Corte Gradual",desc:"Corte gradual de motor: activa una salida con pulsos que se alargan progresivamente hasta quedar fija.",output:"Salida (XP)",step:"Paso",interval:"Intervalo",max:"Maximo",invert:"Invertir",inverted:"invertido",normal:"normal"},cxac:{label:"Aceler\xF3metro",desc:"Umbral del aceler\xF3metro para detecci\xF3n de movimiento. 0=deshabilitado.",threshold:"Umbral"},cxain:{header:"Curvas de calibraci\xF3n (CXAIN)",intro:"Convierte el voltaje crudo de cada entrada anal\xF3gica en unidades del sensor (litros, %, \xB0C\u2026) usando 2 puntos. Solo afecta la conversi\xF3n: para generar se\xF1ales/eventos us\xE1 el m\xF3dulo Anal\xF3gicos (AR).",labelField:"Etiqueta",labelPlaceholder:"sensor de combustible, temperatura, etc.",unit:"Unidad",calibration:"Calibraci\xF3n",whenReads:"Cuando lee",shows:"\u2192 muestra",linearHint:"Entre ambos puntos se interpola una recta.",advanced:"Avanzado: l\xEDmites de salida",clampHint:"Recorta la salida para que no pase de estos valores aunque la curva extrapole fuera de rango.",neverBelow:"Nunca menos de",neverAbove:"Nunca m\xE1s de",autoClamp:"Auto",preview:"Vista previa",testVoltage:"Voltaje de prueba",applyPreset:"Aplicar preset",choosePreset:"Elegir preset\u2026",notConfigured:"sin configurar",errors:{sameVoltage:"Las dos tensiones no pueden ser iguales."}},cxecu:{desc:"Configuraci\xF3n custom de PIDs CAN bus. Define c\xF3mo parsear cada se\xF1al del veh\xEDculo.",idx:{"1":"Acelerador %","2":"Combustible %","3":"Od\xF3metro total","4":"Litros total","5":"Velocidad","6":"Temp. motor","7":"Presi\xF3n aceite","10":"Horas motor","12":"Tasa combustible","15":"Vel. ruedas","17":"Carga motor %","18":"Runtime motor","19":"Dist. c/MIL","20":"Litros custom","22":"Freno mano","23":"Pedal freno","24":"Acelerador % custom","25":"Puerta conductor","26":"Puerta acompa\xF1ante","27":"Pedal embrague","28":"Presi\xF3n turbo"},startBit:"Bit inicio",bitLength:"Longitud",min:"M\xEDnimo",max:"M\xE1ximo",sign:"Signo"},pk:{desc:"Geocerca din\xE1mica. Se activa con SPKA, dispara como PK00+",radius:"Radio",debounce:"Confirm."},cxbth:{desc:"Configuraci\xF3n general del m\xF3dulo Bluetooth (BLE/NimBLE). El PIN permite autenticar conexiones SPP.",power:"Encendido",name:"Nombre",namePlaceholder:"Nombre del dispositivo BT (hasta 16 chars)",pinPlaceholder:"Vacio o 4 digitos (ej: 1234)",noPin:"sin PIN",timeout:"Timeout login",noLimit:"sin limite"},be:{desc:"Detecci\xF3n de beacons BLE por ID. Trigger: BE00+",idPlaceholder:"16 caracteres hex (8 bytes)",distance:"Distancia"},common:{noLimit:"sin lim."},bs:{label:"Sensores BLE",desc:"Sensores BLE (Escort, MOKO, Teltonika, Technoton) por MAC/ID. Lectura de temperatura, humedad, nivel de combustible, distancia, etc. Trigger: BS00+",idPlaceholder:"MAC o ID del sensor",sensorType:"Tipo sensor",type:{auto:"Automatico"},maxDist:"Distancia max"},bsw:{desc:"Captura BLE wildcard: detecta dispositivos por UUID/Major/Minor con filtros. Trigger: BSW00+",independent:"Independiente",independentHint:"No inyecta en sensores BS, solo emite eventos BSW/BSWN",allBs:"Todos los BS",allBsHint:"Inyecta la MAC detectada en todos los sensores BS configurados",noBsConfigured:"No hay sensores BS configurados",filterUuid:"Filtro UUID",uuidPlaceholder:"32 hex o vac\xEDo para todos",filterMajor:"Filtro Major",filterMinor:"Filtro Minor",noFilterPlaceholder:"Sin filtro (cualquiera)",any:"cualquiera",maxDist:"Distancia max"}},ucBuilder:{presets:"Presets",insert:"Insertar",fullTemplates:"Templates completos",inserts:"Inserta",systemVars:"Variables del sistema",indexedFunctions:"Funciones indexadas",ruleActionHint:"En reglas, us\xE1 la acci\xF3n de reporte ",ruleActionHintSuffix:"para generar este reporte.",cat:{wialon:"Wialon IPS",fields:"Campos de respuesta",operators:"Operadores",power:"Alimentaci\xF3n",gps:"GPS",odometer:"Od\xF3metro",status:"Estado",report:"Reporte",io:"I/O",modules:"M\xF3dulos",sensors:"Sensores",geo:"Geocercas",can:"CAN / Avanzado"},snippet:{wialonBase:"Base Wialon IPS (campos standard)",paramInt:"Par\xE1metro entero",paramFloat:"Par\xE1metro decimal",paramText:"Par\xE1metro texto",reportNumber:"N\xFAmero de reporte",gpsFullPos:"Posici\xF3n GPS completa",ioFull:"I/O completo",bufferXB00:"Buffer XB00",counterNT00:"Contador NT00",splitQIO:"Split QIO por delimitador",cmdQuotes:"Comando con comillas",concatComma:"Concatenar con coma",concatNoSep:"Concatenar sin separador",textLiteral:"Texto literal",slotHex:"Slot hexadecimal",addWialonParam:"Agregar par\xE1metro Wialon"},eval:{mainVoltage:"Tensi\xF3n principal (cV)",backupVoltage:"Tensi\xF3n backup (cV)",speed:"Velocidad (km/h)",latitude:"Latitud",longitude:"Longitud",heading:"Rumbo (\xB0)",altitude:"Altitud (m)",gpsAge:"Antig\xFCedad GPS (s)",gpsOn:"GPS encendido (0/1)",totalOdometer:"Od\xF3metro total (m)",partialOdometer:"Od\xF3metro parcial (m)",ignition:"Ignici\xF3n (0/1)",cellSignal:"Se\xF1al celular (dBm)",parkingActive:"Parking activo (0/1)",accelActive:"Aceler\xF3metro activo (0/1)",reportNumber:"N\xFAmero de reporte",internalTimestamp:"Timestamp interno (ms)"},evalFn:{digitalInput:"Entrada digital n",extOutput:"Salida externa n",analogInput:"Entrada anal\xF3gica n",triggerUV:"Disparador UV n",userFlag:"Flag de usuario n",counter:"Contador NT n",timer:"Timer TD n",speed:"Velocidad VL n",analog:"Anal\xF3gico AR n",angle:"\xC1ngulo DC n",ruleState:"Estado de regla RL n",dallasTemp:"Temperatura Dallas n",bleSensor:"Sensor BLE n",bleWildcard:"BLE Wildcard n",bufferXB:"Buffer XB n",circularGeofence:"Geocerca circular WP n",polygonGeofence:"Geocerca poligonal RG n",canEcu:"CAN ECU(n, par\xE1metro p)",bleSensorField:"Sensor BLE(n, campo f)",dallasField:"Dallas(n, campo f)",counterField:"Contador(n, campo f)"},preset:{wialonBasic:"Wialon b\xE1sico",wialonBasicDesc:"Template est\xE1ndar con tensi\xF3n, od\xF3metro, se\xF1al e ignici\xF3n",wialonRNU:"Wialon + RNU",wialonRNUDesc:"Base Wialon + n\xFAmero de reporte + par\xE1metros",wialonCAN:"Wialon + CAN",wialonCANDesc:"Con RPM, temperatura motor y combustible",wialonCANFull:"Wialon + CAN completo",wialonCANFullDesc:"Reporte ER completo: RPM, acelerador, combustible, velocidad, motor (cN = \xEDndice ECU)",wialonDallas:"Wialon + Dallas",wialonDallasDesc:"Con 2 sensores de temperatura Dallas",wialonBLE:"Wialon + BLE",wialonBLEDesc:"Con temperatura y humedad de sensor BLE",traccar:"Traccar",traccarDesc:"Wialon IPS con nombres de Traccar: tensi\xF3n, od\xF3metro (m), se\xF1al, ignici\xF3n y c\xF3digo de evento",traccarCAN:"Traccar + CAN",traccarCANDesc:"Traccar con RPM, combustible %, temperatura motor, horas de motor (ms) y litros consumidos",rcqCounters:"RCQ + Contadores",rcqCountersDesc:"Posici\xF3n GPS + contadores NT00 y NT01",multiBuffer:"Multi-buffer",multiBufferDesc:"Reporte compuesto con m\xFAltiples buffers XB",ucGrouper:"UC agrupador",ucGrouperDesc:"Agrupa m\xFAltiples UC en uno solo"},validate:{title:"Validaci\xF3n",valid:"Expresi\xF3n v\xE1lida",errorCount:"{{count}} error",errorCount_other:"{{count}} errores",warnCount:"{{count}} aviso",warnCount_other:"{{count}} avisos",autofixComma:"Corregir comas \u2192 ;",tooLong:"El template supera {{max}} caracteres ({{n}})",unbalancedQuotes:"Comillas simples ' sin cerrar",tooManyTokens:"Demasiadas expresiones '...': {{n}} (m\xE1x {{max}}), las restantes se ignoran",exprTooLong:"Expresi\xF3n supera {{max}} caracteres: '{{expr}}'",commaInExpr:"Coma dentro de '...': us\xE1 ';' como separador \u2192 '{{expr}}'",unbalancedParens:"Par\xE9ntesis sin balancear: '{{expr}}'",unknownToken:"Token EVAL no reconocido: '{{token}}'",noArgsExpected:"'{{token}}' no lleva argumentos",argsExpected:"'{{token}}' requiere {{arity}} argumento(s)",wrongArity:"'{{token}}' espera {{arity}} argumento(s), tiene {{got}}"}},uvBuilder:{emptyRange:"Nunca se activa: el equipo dispara con M\xCDN \u2264 valor < M\xC1X, y M\xCDN ({{min}}) no es menor que M\xC1X ({{max}}).",emptyRangeExact:"Nunca se activa: el m\xE1ximo no se incluye. Para disparar con {{min}} exacto, pon\xE9 M\xC1X = {{exact}}.",expression:"Expresi\xF3n UV",examples:"Ejemplos",type:"Tipo",length:"Largo",min:"M\xEDn",max:"M\xE1x",time:"Tiempo",sec:"seg",text:"texto",fixedWidth:"ancho fijo",fieldN:"campo",fieldLabel:"Campo",fieldsOf:"Campos de",apply:"Aplicar",other:"Otro",rawPlaceholder:"QIO,7,1,1,2",splitByDelimiter:"Split por delimitador",removeSplit:"Quitar split",splitDescription:"Divide la respuesta por un car\xE1cter delimitador y selecciona un campo por \xEDndice.",splitPreview:"dividir por '{{char}}', tomar campo {{field}}",triggers:"Dispara",when:"cuando",changes:"cambia",orLess:"o menos",orMore:"o m\xE1s",in:"en",of:"de",and:"y",by:"por",conv:{signed:"Signed (con signo)",unsigned:"Unsigned (sin signo)",float:"Float (decimal)",hexBE:"HEX Big Endian",hexLE:"HEX Little Endian",ascii:"ASCII (texto)",delta:"Delta (cambio)"},cmd:{qio:"I/O completo",qcq:"Posici\xF3n GPS compacta",qcel:"Estado celular",qxb00:"Buffer capturador XB00",qxb02:"Buffer capturador XB02",qxb04:"Buffer capturador XB04",qnt:"Contador",qodo:"Od\xF3metro",qssu:"Flag de usuario",qbs:"Sensor BLE",qbsw:"BLE Smart Wildcard"},field:{ignition:"Ignici\xF3n (0/1)",digitalInputs:"Entradas digitales (7 bits)",outputs3bit:"Salidas (3 bits)",voltage:"Tensi\xF3n principal (cV)",backupBattery:"Bater\xEDa backup (cV)",reportNum:"N\xFAmero de reporte",date:"Fecha (DDMMAA)",time:"Hora (HHMMSS)",latitude:"Latitud (\xB17 d\xEDgitos)",longitude:"Longitud (\xB18 d\xEDgitos)",speedKmh:"Velocidad (km/h)",heading:"Rumbo (\xB0)",inputsHex:"Entradas (hex)",outputsHex:"Salidas (hex)",voltageDiv10:"Tensi\xF3n (/10)",odometerHex:"Od\xF3metro (hex)",gpsPower:"GPS encendido",fix:"Fix (2D/3D)",satellites:"Sat\xE9lites",index:"\xCDndice",maxValue:"Valor m\xE1ximo",currentValue:"Valor actual",totalOdometer:"Od\xF3metro total",partialOdometer:"Od\xF3metro parcial",flagIndex:"\xCDndice de flag",state:"Estado (00/11)",headerIndex:"Header + \xEDndice",sensorId:"ID del sensor",sensorType:"Tipo de sensor",distance:"Distancia",outputValue:"Valor de salida",headerStatus:"Header + estado",filterUUID:"Filtro UUID",filterMajor:"Filtro Major",filterMinor:"Filtro Minor",timeoutSec:"Timeout (seg)",maxDistance:"Distancia m\xE1xima"},note:{xb00:"Contenido variable seg\xFAn configuraci\xF3n CXXB00",xb02:"Contenido variable seg\xFAn configuraci\xF3n CXXB02",xb04:"Contenido variable seg\xFAn configuraci\xF3n CXXB04",qbs:"Campos separados por coma. Subcampos del sensor separados por punto y coma.",qbsw:"Campos separados por coma. Detecciones separadas por punto y coma."},example:{xb00Split:"Split por ; para sensores seriales",xb02Split:"Split por , para datos GPS NMEA",xb04Ascii:"Comparaci\xF3n ASCII de estado"},delim:{label:"Delim",semicolon:"Punto y coma",comma:"Coma",asterisk:"Asterisco",pipe:"Pipe",equals:"Igual",space:"Espacio"},preset:{ignByPos:"IGN por posici\xF3n",ignByPosDesc:"Ignici\xF3n desde QIO posici\xF3n fija",ignBySplit:"IGN por split",ignBySplitDesc:"Ignici\xF3n desde QIO con split por ;",digitalInputSplit:"Entrada digital split",digitalInputSplitDesc:"Entrada digital desde QIO con split por ;",speedQCQ:"Velocidad QCQ",speedQCQDesc:"Velocidad desde posici\xF3n GPS compacta",satellitesQCQ:"Sat\xE9lites QCQ",satellitesQCQDesc:"Cantidad de sat\xE9lites desde QCQ",fixModeQCQ:"Modo fix QCQ",fixModeQCQDesc:"Modo de fix GPS desde QCQ",bufferXB00:"Buffer XB00",bufferXB00Desc:"Primer byte del buffer XB00",xb00SplitFloat:"XB00 split float",xb00SplitFloatDesc:"Campo 1 de XB00 como float con split por ;",gpsAntennaOk:"Antena GPS OK",gpsAntennaOkDesc:"Detecta texto 'OK' en XB04 (estado antena)",gpsAntennaOpen:"Antena GPS abierta",gpsAntennaOpenDesc:"Detecta texto 'OPEN' en XB04",gpsAntennaShort:"Antena GPS cortocircuito",gpsAntennaShortDesc:"Detecta texto 'SHORT' en XB04",hardBrake:"Frenada brusca",hardBrakeDesc:"Delta de velocidad negativo en QCQ",hardAccel:"Aceleraci\xF3n brusca",hardAccelDesc:"Delta de velocidad positivo en QCQ",suddenChangeXB:"Cambio repentino XB",suddenChangeXBDesc:"Cambio repentino en XB00 con split"}},fwCompat:{title:"Compatibilidad de firmware",intro:"El equipo conectado ({{deviceFw}}) no soporta todo lo configurado:",ignVbatTh:"Umbrales manuales de ignici\xF3n por tensi\xF3n",apModeCli:"AP WiFi en modo cliente",blackBox:"Caja negra (CXBB)",owAutoDt:"Auto-asignaci\xF3n de DT por TH/TL",drv:"Chofer (DRV)",drvHab:"Chofer: habilitaci\xF3n (corte H)",drvTaco:"Chofer: origen tac\xF3grafo",drvCorte:"Chofer: ventana, aviso y corte",drvRpt:"Chofer: reportes autom\xE1ticos y confirmaci\xF3n",drvBle:"Chofer por Bluetooth (DRVB)",owInvKey:"C\xF3digo de la llave invertido (CXOW)",uartBaud3857:"Puerto serie a 38400 o 57600 bps",zones:"Zonas (cat\xE1logo masivo de geocercas, ZNA/ZNB)",requires:"requiere v{{minFw}}",willSkip:"No se enviar\xE1",willDowngrade:"Se enviar\xE1 degradado",logSkipped:"FW: {{label}} omitido \u2014 requiere v{{minFw}}, equipo {{deviceFw}}",logDowngraded:"FW: {{label}} degradado \u2014 requiere v{{minFw}}, equipo {{deviceFw}}",continue:"Continuar sin estos comandos",cancel:"Cancelar"},assistantUi:{title:"Asistente",open:"Abrir el asistente (arrastralo para moverlo de lugar)",close:"Cerrar (la conversaci\xF3n se conserva)",intro:"Asistente de configuraci\xF3n.",sessionExpired:"Tu sesi\xF3n venci\xF3. Volv\xE9 a ingresar.",login:"Ingresar",privacy:"La configuraci\xF3n y el estado del equipo se env\xEDan a un servicio de IA externo, con las credenciales enmascaradas y sin la posici\xF3n del veh\xEDculo. Las conversaciones se guardan para mejorar el asistente. Revis\xE1 lo que propone antes de aplicarlo o enviarlo: el uso es responsabilidad del usuario.",logout:"Salir",clearChat:"Borrar chat",clearChatTitle:"Borrar la conversaci\xF3n",clearAsk:"\xBFBorrar la conversaci\xF3n?",clear:"Borrar",no:"No",usageTitle:"Conversaci\xF3n: {{pct}} % del m\xE1ximo ({{n}} mensajes)",usageFull:"La conversaci\xF3n est\xE1 llena. Borr\xE1 el chat para seguir (la configuraci\xF3n no se toca).",usageWarn:"La conversaci\xF3n va por el {{pct}} %. Cuando se llene vas a tener que borrar el chat para seguir.",writing:"escribiendo\u2026",thinking:"pensando\u2026",placeholder:"\xBFQu\xE9 hace esta config?",send:"Enviar",goTo:"clic para ir",cmdInvalid:"As\xED como est\xE1, el configurador no lo acepta: {{motivo}}",sendTitle:"El asistente quiere enviar al equipo",sendYes:"Enviar al equipo",sendPhysical:"Esto activa una salida f\xEDsica del equipo. Si est\xE1 cableada a un corte de motor, una sirena o una traba, va a actuar ahora.",noChanges:"Sin cambios en la configuraci\xF3n.",whatChanges:"Qu\xE9 cambia",pending:"Queda pendiente",modeNotice:"Al aplicar, la configuraci\xF3n pasa a modo Avanzado, igual que al importar desde C\xF3digo.",viewCommands:"Ver los comandos",apply:"Aplicar",applied:"Aplicado. Toc\xE1 cualquier cambio para ver d\xF3nde qued\xF3.",description:"Descripci\xF3n de la configuraci\xF3n",discard:"Descartar",models:"Modelos de la configuraci\xF3n: {{despues}} (antes: {{antes}})",unspecified:"sin especificar",nameOf:"Nombre de",before:"antes",sugTitle:"Prob\xE1 con",sugThis:"\xBFQu\xE9 hace esto que tengo seleccionado?",sugStatus:"\xBFC\xF3mo est\xE1 el equipo?",sugCompare:"Compar\xE1 lo que tiene el equipo con esta configuraci\xF3n",sugExplain:"Explicame esta configuraci\xF3n",sugCheck:"\xBFQu\xE9 le falta a esta configuraci\xF3n para funcionar?",sugSpeed:"Arm\xE1 un aviso de exceso de velocidad con buzzer",sugWialon:"Quiero reportar por Wialon",sugInputs:"Report\xE1 cuando se abre una puerta o tocan el p\xE1nico"}};var Rp={language:{es:"Espa\xF1ol",en:"English",pt:"Portugu\xEAs"},nav:{general:"General",comm:"Communication",wifi:"WiFi",webserver:"Web Server (WS)",cellular:"Cellular",country:"Country (MCC)",gps:"GPS",config:"Configuration",waypoints:"Waypoints",regions:"Regions",io:"I/O",inputs:"Inputs",outputs:"Outputs",analogCalibration:"Analog",canbus:"CAN bus",customCan:"Custom CAN",onewire:"One Wire",tempSensors:"Temperature sensors",bluetooth:"Bluetooth",ibeacon:"iBeacon",bleSensors:"BLE Sensors",smartWildcard:"Smart Wildcard",accel:"Accelerometer",modules:"Modules",all:"All",timers:"Timers (TD)",schedule:"Schedule (TR)",counters:"Counters (NT)",heading:"Heading (DC)",speed:"Speed (VL)",acceleration:"Acceleration (DV)",maneuvers:"Maneuvers (HM)",vectors:"Vectors (MVT)",tilt:"Tilt (TK)",analog:"Analog (AR)",parking:"Parking (PK)",triggers:"Triggers (UV)",flags:"Flags (U)",capture:"Capture (CXXB)",blackBox:"Black box (CXBB)",reports:"Reports (UC)",driverDrv:"Driver (DRV)",driverManager:"Driver Manager (IC)",rules:"Rules (RL)",events:"Events",periodic:"Periodic",driving:"Driving",speedEntry:"Speed",ioEvents:"I/O Events",battery:"Battery",parkingEntry:"Parking",custom:"Custom"},pages:{general:{title:"General",desc:"Model compatibility, description, and device tag"},comm:{title:"Communication",desc:"Destination servers and IP protocol"},cellular:{title:"Cellular",desc:"Cellular operator and APN configuration"},gps_config:{title:"GPS Configuration",desc:"GPS mode and signal quality filters"},gps_waypoints:{title:"Waypoints",desc:"Circular geofences (WP00-WP31): center point + radius"},gps_regions:{title:"Regions",desc:"Polygonal geofences (RG00-RG31): up to 32 vertices"},rules_periodic:{title:"Periodic",desc:"Periodic time-based reports"},rules_driving:{title:"Driving",desc:"Driving events and state changes"},rules_io:{title:"Digital inputs",desc:"Events triggered by input state changes"},rules_speed:{title:"Speed",desc:"Speed control with audible alert (Buzzer)"},rules_battery:{title:"Battery",desc:"Vehicle voltage monitoring with automatic level alerts"},rules_parking:{title:"Parking",desc:"Parking geofence to detect towing or unauthorized movement"},rules_custom:{title:"Custom",desc:"Advanced rules with any device signal"},tpl_all:{title:"All modules",desc:"Unified view of all configured resources"},tpl_timers:{title:"Timers (TD)",desc:"Device timers (TD00-TD31)"},tpl_heading:{title:"Headings (DC)",desc:"GPS direction change (DC00-DC02)"},tpl_speed:{title:"Speed (VL)",desc:"Speed thresholds (VL00-VL15)"},tpl_dv:{title:"Acceleration (DV)",desc:"Hard braking and acceleration by GPS (DV00-DV03)"},tpl_hm:{title:"Maneuvers (HM)",desc:"Harsh maneuver detection (HM00-HM07)"},tpl_ar:{title:"Analog (AR)",desc:"Analog voltage ranges (AR00-AR11)"},tpl_uv:{title:"Triggers (UV)",desc:"User variables with expressions (UV00-UV47)"},tpl_u:{title:"Flags (U)",desc:"Boolean SET/CLR flags (U00-U63)"},tpl_nt:{title:"Counters (NT)",desc:"Counters with configurable max value (NT00-NT31)"},tpl_uc:{title:"Reports (UC)",desc:"User computation formulas (UC00-UC15)"},tpl_tr:{title:"Schedule (TR)",desc:"Schedule-based rules (TR00-TR07)"},tpl_mvt:{title:"Vectors (MVT)",desc:"Accelerometer motion vectors"},tpl_xb:{title:"Capture (CXXB)",desc:"External serial capture (CXXB00-CXXB07)"},tpl_bb:{title:"Black box (CXBB)",desc:"Burst of reports before and after an event"},tpl_drv:{title:"Driver (DRV)",desc:"Where the device driver comes from, when it is required and what happens if nobody identifies"},tpl_ic:{title:"Driver Manager (IC)",desc:"Driver management via alphanumeric code"},voice:{title:"Audio / Voice",desc:"Voice call configuration (Smart only)",preamp:"Mic gain",spk:"Speaker gain",hint:"Timeout: max call duration. Caller ID (CID) entries define which numbers auto-answer and with which audio mode."},rf:{title:"RF (SubGHz)",desc:"SubGHz radio module",toggle:"Enable RF module (SubGHz)"},sms_whitelist:{title:"SMS Whitelist",desc:"Only accept SMS commands from numbers configured in SMS Destinations",toggle:"Only accept SMS commands from numbers in the destinations list"},tpl_sm:{title:"SMS Destinations (SM)",desc:"Phone numbers for SMS notifications"},tpl_cid:{title:"Caller ID (CID)",desc:"Caller ID / ICCID entries"},tpl_mc:{title:"Country (MCC)",desc:"Countries watched by Mobile Country Code"},tpl_cxtr:{title:"UART Ports (CXTR)",desc:"Serial port baudrate configuration"},tpl_pk:{title:"Parking (PK)",desc:"Dynamic parking geofence"},tpl_tk:{title:"Tilt (TK)",desc:"Rollover and tilt detection"},tpl_rules:{title:"Rules (RL)",desc:"Device event engine rules"},inputs:{title:"Inputs",desc:"Digital input debounce and ignition"},outputs:{title:"Outputs",desc:"Digital outputs and gradual cut"},analogCalibration:{title:"Analog calibration",desc:"CXAIN transformation curves for analog inputs (AIN0, AIN1, AIN2, AIN7)"},canbus_config:{title:"CAN bus",desc:"Vehicle CAN bus configuration"},canbus_custom:{title:"Custom CAN",desc:"Custom CAN bus PID configuration"},onewire_config:{title:"One Wire",desc:"OneWire bus for iButton and Dallas temperature sensors"},onewire_dt:{title:"Temperature sensors",desc:"Dallas DS18B20 temperature sensors on OneWire bus"},bluetooth_config:{title:"Bluetooth",desc:"General Bluetooth module configuration"},bluetooth_beacons:{title:"iBeacon",desc:"BLE beacons by UUID/MAC"},bluetooth_sensors:{title:"BLE Sensors",desc:"BLE sensors (Escort, MOKO, etc.) by MAC/ID"},bluetooth_wildcard:{title:"Smart Wildcard",desc:"BLE wildcard capture by UUID/Major/Minor"},accel:{title:"Accelerometer",desc:"Accelerometer motion detection threshold"},wifi:{title:"WiFi",desc:"WiFi networks, AP and station mode"},webserver:{title:"Web Server",desc:"Embedded web server with buttons and console"},summary:{title:"Summary",desc:"Readable summary of the entire configuration"}},common:{enabled:"Enabled",disabled:"Disabled",notConfigured:"Not configured",on:"ON",off:"OFF",yes:"Yes",no:"No",cancel:"Cancel",confirm:"Confirm",close:"Close",accept:"Accept",send:"Send",read:"Read",done:"Done",delete:"Delete",deleteConfirm:"Delete?",save:"Save",search:"Search",searchPlaceholder:"Search...",copy:"Copy",copied:"Copied",edit:"Edit",import:"Import",export:"Export",name:"Name",index:"Index",noResults:"No results",clear:"Clear",active:"Active",inactive:"Inactive",loading:"Loading...",error:"Error",advanced:"Advanced",basic:"Basic",mode:"Mode",type:"Type",interval:"Interval",angle:"Angle",speed:"Speed",key:"Key",addToken:"+ Add {{token}}",presets:"Predefined profiles",sec:"sec",min:"min",hmAccelGps:"Accel GPS",hmBrakeGps:"Brake GPS",hmTurnLeft:"Left turn",hmTurnRight:"Right turn",hmCentripetal:"Centripetal",hmLatImpact:"Lat. impact",hmAccelImu:"Accel IMU",hmBrakeImu:"Brake IMU"},connection:{connect:"Connect",disconnect:"Disconnect",connecting:"Connecting...",verifying:"Verifying device...",openingPort:"Opening serial port",waitingDevice:"Waiting for device response",detectingBaud:"Looking for the device serial port speed",noPortSelected:"No port selected",authFailed:"Could not authenticate with device",browserNotSupported:"Browser not supported",browserRequirement:"Requires Chrome, Edge or Opera with Web Serial API.",connectionError:"Connection error",modelMismatch:"The connected device is a {{model}}, but the configuration does not include it as a target."},login:{title:"Login required",description:"Device not responding. Enter the password to authenticate.",passwordPlaceholder:"Device password",invalidPassword:"Invalid login. Check the password and try again.",rememberPassword:"Remember password",authenticating:"Authenticating..."},sendDialog:{title:"Send configuration",warningRules:"All existing rules on the device will be deleted and replaced with the new configuration.",confirmAction:"This action cannot be undone. Continue?",sendAnyway:"Send anyway",cancelWrite:"Cancel write",sendConfirm:"Send?",sendToDevice:"Send to device",ackFailed:"{{failed}}/{{total}} failed",ackFailedTitle:"No confirmation from device",sending:"Sending Configuration...",sendComplete:"Send Complete",of:"of",successful:"successful",failed:"failed"},readDialog:{cancelRead:"Cancel read",readConfirm:"Read?",readParams:"Read {{count}} parameters from device",readDevice:"Read from device",generalConfig:"General configuration",allConfig:"Communication, GPS, I/O, WiFi, BLE, modules, CAN, rules",waypointsRegions:"Waypoints and Regions",waypointsDesc:"32 circular geofences + 32 polygonal",additionalQueries:"additional queries",replaceWarning:"Current configuration will be replaced with device data.",readCancelled:"Read cancelled",reading:"Reading configuration...",readComplete:"Read complete",queries:"queries",responses:"responses",importSuccess:"Configuration imported successfully.",cancelledNoChanges:"Read cancelled. No changes applied."},sendBar:{newConfig:"New / Reset configuration",saveCtrlS:"Save (Ctrl+S)",noChanges:"No changes",discardChanges:"Discard changes",eventTable:"Event table",exportConfig:"Export configuration",importConfig:"Import configuration",readingConfig:"Reading configuration...",readConfig:"Read configuration from device",goToGeneral:"Go to General",validate:"Validate",valid:"\u2713 Valid",connectToSend:"Connect to send",connectToSendHint:"Opens the USB port picker",importConfirmTitle:"Import configuration",importConfirmMsg:'The current configuration will be replaced with the file contents. You can revert with "Discard changes" until you save.',importReplace:"Replace configuration",resetConfig:"Reset configuration",resetAdvancedMsg:"All modules and rules will be cleared. Default general settings will be kept.",resetBasicMsg:"Default configuration with standard rules will be restored.",reset:"Reset",importSuccess:"Import successful",importError:"Import error",parsed:"parsed",omitted:"omitted",omittedCommands:"commands omitted (mass deletes, power, etc.)",unrecognizedLine:"unrecognized line",unrecognizedLines:"unrecognized lines",invalidJsonConfig:'JSON file does not contain a "config" field',noValidCommands:"No valid commands found (format >CMD<)",serialRead:"Serial read",warnings:"Warnings ({{count}})",errors:"Errors ({{count}})",unknown:"unknown"},general:{tagLabel:"Tag (TAG)",tagDesc:"Custom text stored on the device. Useful for identifying units. Configured with the >STAG< command.",tagPlaceholder:"UNIT-001",changePassword:"Change Password (PW)",passwordDesc:"Sets a new password on the device. Sent at the end of programming with the >SPW< command.",passwordPlaceholder:"Leave empty to keep current",compatibility:"Compatibility",compatibilityDesc:"Select which models will use this configuration. The wizard will limit options based on minimum available I/O.",selectModel:"Select at least one model.",modelNoWifiBt:"No WiFi/BT",configMode:"Configuration mode",advancedDesc:"All rules are managed as custom rules. Full control over each SRL rule.",basicDesc:"Guided modules simplify configuration. Each module generates its rules automatically.",description:"Description",descriptionInfo:"Optional internal note. Not sent to the device: it travels in the TXT as a comment (@rinho desc) and is preserved on import/export. Tip: separate blocks with a \u201C\u2014\u201D line and start them with an UPPERCASE \u201CTITLE:\u201D to show them as sections in the Summary.",descriptionPlaceholder:"E.g.: Configuration for truck fleet \u2014 north zone",descriptionExpand:"Maximize",descriptionPreview:"Preview",switchToAdvanced:"Switch to advanced mode",switchToBasic:"Switch to basic mode",switchAdvancedMsg:"All module rules (driving, speed, battery, parking) will be converted to editable custom rules. Modules will be deactivated.",switchBasicMsg:"Empty guided modules will be restored (deactivated). This action requires no custom rules.",cannotRevert_one:"Cannot switch to basic mode because {{count}} rule is not compatible with guided modules.",cannotRevert_other:"Cannot switch to basic mode because {{count}} rules are not compatible with guided modules.",newPassword:"New password"},cellular:{enableModule:"Enable cellular module",operator:"Operator (COPS)",operatorSelection:"Operator selection",automatic:"Automatic",manual:"Manual",registrationMode:"Registration mode",manualFallback:"Manual + auto fallback",manualForced:"Manual forced",technology:"Technology (AcT)",techUnspecified:"Unspecified",techLTE:"LTE (Cat-M / NB-IoT)",techGSM:"GSM (2G)",techUTRAN:"UTRAN (3G)",techNBIoT:"NB-IoT",operatorCode:"Operator code (MCC+MNC)",operatorCodePlaceholder:"e.g.: 72207",apn:"APN",apnName:"APN Name",apnPlaceholder:"e.g.: internet",apnClearDesc:"Sends the empty APN command: clears the APN stored in the device and lets the firmware detect it automatically (recent firmware and Rinho PI). On old firmware the modem may not connect without an APN.",apnUser:"APN User",apnPassword:"APN Password",optionalField:"(empty if not required)",searchOperator:"Search operator (COPS)",searchOperatorPlaceholder:"Search by operator, country or code...",searchApn:"Search APN",searchApnPlaceholder:"Search operator...",noResults:"No results",smsWhitelist:"SMS Whitelist (wake)",rfEnabled:"RF Module",imeiHint:"Connect the device to read the IMEI."},wifi:{title:"WiFi",enable:"Enable WiFi",networkInfo:"Up to 10 saved networks (SAPW00\u2013SAPW09). The device connects to the first available.",configured_one:"{{count}} configured",configured_other:"{{count}} configured",networkName:"Network name",password:"Password",addNetwork:"Add network",notConfigured:"Not configured",network:"Network",mode:"WiFi mode",modeSta:"Station",modeApx:"AP Primary",modeApy:"AP Secondary",modeStaDesc:"The device connects to an existing WiFi network as a client.",modeApDesc:"The device creates its own WiFi network that others can connect to.",apDesc:"Configure the name and password of the WiFi network the device will create.",apPrimary:"Primary Access Point",apSecondary:"Secondary Access Point",apSsidPlaceholder:"AP name",apPassPlaceholder:"AP password",apRequired:"SSID and password are required for the selected mode",staNetworks:"Station networks",configured_one:"{{count}} configured",configured_other:"{{count}} configured",ip:"IP address",gateway:"Gateway",mask:"Subnet mask",ipPlaceholder:"192.168.4.1",gatewayPlaceholder:"192.168.4.1",maskDefault:"255.255.255.0"},ws:{enable:"Enable Web Server",desc:"Embedded web server accessible via the device IP. In AP mode it shows automatically as a captive portal.",language:"Language",title:"Title",pin:"PIN",pinPlaceholder:"No PIN",showConsole:"Show command console",buttons:"Buttons",addButton:"Add button",btnLabel:"Button text",btnTypeCommand:"Direct command",btnTypeCode0:"Numeric login (CODE0)",btnTypeCode1:"Alphanumeric login (CODE1)",btnTypeXb:"Dynamic input (XB)",command:"Command",visible:"Visible",hidden:"Hidden",preview:"Preview",previewInput:"Type text...",noButtons:"No buttons configured",generatedCommand:"Generated command"},gps:{updateMode:"GPS update mode",minFix:"Minimum fix",maxPdop:"Maximum PDOP",minSatellites:"Min. satellites",modeHeader:"GPS Mode (CXGPS)",modeDesc:"Defines when the device updates GPS position data.",modeAlways:"Always (1s)",modeIgnOnly:"IGN only",modeSpeed:"Speed > 5 km/h",qualityHeader:"GPS Quality (CXCQ)",qualityDesc:"Minimum quality filters to accept a GPS report."},modules:{searchPlaceholder:"Search module...",timing:"Timing",drivingGroup:"Driving",signals:"Signals",logic:"Logic and processing",identification:"Identification",communication:"Communication",ble:"Bluetooth",rulesEngine:"Rules engine",noResults:'No results for "{{filter}}"'},resource:{disabled:"Disabled",notConfigured:"Not configured",configure:"Configure",deleteAll:"Delete all",addResource:"Add",query:"Query:",inExpressions:"In UV/UC:",value:"value",age:"age (ms)",permanent:"permanent",volatile:"volatile",expressionPlaceholder:"Expression...",wildcardTooltip:"Wildcard: fires every hour/minute/second",searchPlaceholder:"Search...",useThisValue:"use this value",noMatches:"No matches"},canbus:{protocol:"Protocol",speed:"Speed",format:"Format",fuelTrip:"Fuel Trip (Soft)",engine:"Engine",gasoline:"Gasoline",diesel:"Diesel"},onewire:{resetVdd:"Reset VDD",noReset:"No reset",every10s:"Every 10s",every20s:"Every 20s",every30s:"Every 30s",tempSensorAsKey:"Temperature sensor as key",notAvailable:"OneWire not available for the selected model.",busDescription:"OneWire bus for iButton and Dallas temperature sensor reading."},rules:{reportRules:"Report Rules",activeRules:"active",noActiveRules:"Without active rules the device will not generate reports.",periodicIgnOn:"Periodic with IGN",engineOn:"Engine on",periodicIgnOff:"Periodic without IGN",engineOff:"Engine off / stopped",headingChange:"Heading change",headingDesc:"When travel direction changes",ignition:"Ignition",ignitionDesc:"Vehicle on / off",input:"Input",inputDesc:"State change events",digitalOutputs:"Digital outputs",output:"Output",outputDesc:"State change events",falseToTrue:"false to true",trueToFalse:"true to false",anyEdge:"any edge",changes:"changes",datalogDesc:"DataLog: circular memory, newest overwrites oldest, oldest exits first (black box)",bufferDesc:"Buffer: 2,728 positions with H\u2192L\u2192M write priority and prioritized output, ideal for alarms",bufDescription:"2,728 positions with write priority (H\u2192L\u2192M) and prioritized output. Ideal for alarms.",logDescription:"Circular memory of {{count}} records. Newest overwrites oldest, oldest exits first. Works as a black box.",rulesCount:"{{count}} rules"},actions:{report:"Generate report",output:"Activate output (XP)",userVar:"User variable (U)",timerReset:"Timer action (TD)",parking:"Parking (SPKA/SPKD)",gpsMode:"GPS Mode (SCXGPS)",counter:"Counter (NT)",sleep:"Sleep mode (SKO)",gradualCut:"Gradual Cut (GC)",raw:"Raw command",searchSignal:"Search signal... (e.g.: IN05, GPS, timer)",negated:"Signal negated \u2014 click to remove NOT",negate:"Click to negate (NOT)"},header:{config:"Config",status:"Status",firmware:"Firmware",terminal:"Terminal"},monitor:{serialLog:"Serial Log",noActivity:"No activity...",connectDevice:"Connect a device to see live status",title:"Monitor",querying:"Querying...",latitude:"Latitude",longitude:"Longitude",speed:"Speed",heading:"Heading",satellites:"Satellites",fix:"Fix",batteryLabel:"Battery",odometer:"Odometer",noGps:"No GPS signal ({{sats}} satellites)",waitingData:"Waiting for data...",ssid:"SSID",signal:"Signal",sendBuffer:"Send Buffer",gprsQueue:"GPRS Queue",smsQueue:"SMS Queue",datalog:"DataLog",totalRecords:"Total records",pending:"Pending"},status:{title:"Status",summary:"Summary",code:"Code",assistant:"Assistant",backToStatus:"\u25C0 Status",ignOn:"IGN ON",ignOff:"IGN OFF",wifiInactive:"Inactive",queue:"Queue",total:"Total",noFix:"No fix",lat:"Lat",lon:"Lon",vel:"Speed",sat:"Sat",date:"Date",gndNote:"0 = to ground (GND)",noPosition:"No position",clearConfirm:"Clear",clearBusy:"Busy",clearError:"No response",clearBufferHint:"Clear the pending send queue (>CBU<)",clearPendingHint:"Mark log records as sent (>SDLC<). Does not erase the log."},ota:{title:"Update Firmware (OTA)",successTitle:"Update successful",noUpdateTitle:"No update",errorTitle:"Update error",successMsg:"Firmware installed successfully. Device is restarting.",noUpdateMsg:"Device already has a newer version than available on server. No changes made.",errorMsg:"Verify device is connected to WiFi and try again.",description:"Download and install the latest firmware version from Rinho server.",wifiConnected:"Connected to",wifiNoConnection:"WiFi active but no connection",wifiNotActive:"WiFi is not active on the device",cellularLabel:"Cellular",noWifi:"This device has no WiFi. Update will be done via cellular.",wifiWarning:"Device must be connected to WiFi. Do not disconnect during the process (~2 min).",cellularWarning:"Cellular module will be used. Make sure you have good signal and available data. May be slower than WiFi.",advancedOptions:"Advanced options",skipVersionCheck:"Skip version check",skipVersionDesc:"Force installation even if same version",firmwareUrl:"Firmware URL",customUrl:"Custom URL",resetUrl:"Reset to default URL",switchPartition:"Switch partition",switchPartitionDesc:"Toggle between current and previous version (SFRMCP)",change:"Change",downloading:"Downloading firmware...",downloadOta:"Download .OTA",rebootCheck:{waiting:"Waiting for the device to restart to verify the version. It reconnects on its own.",confirmed:"Verified: the device started with {{version}}.",sameBuild:"The device started with the same firmware it had: the update was not applied.",noResponse:"Could not verify: the device did not respond after restarting. Reconnect it and check the version.",booted:"The device started with {{version}}.",sameBuildForced:"The device started with the same build: the same firmware was reinstalled (forced update).",sameBuildServer:"The same build was reinstalled: the file on the server is the version the device already had."},downloadOtaBusy:"Downloading .OTA\u2026",downloadOtaError:"Could not download the .OTA",configuring:"Configuring URL and waiting for device response...",kbDownloaded:"KB downloaded",updating:"Updating...",startUpdate:"Start update",deviceLog:"Device log",kbProcessed:"KB processed",firmwareVariant:"Firmware variant",current:"current",variantSwitchWarning:"You are switching from {{from}} to {{to}}. The device will change firmware variant. Make sure this is intentional.",cable:{method:"By cable",checking:"Checking whether the device accepts firmware by cable...",sourceUrl:"From URL",sourceFile:"Local file",chooseFile:"Choose .OTA file",noFile:"No file chosen",urlLabel:"Firmware URL",urlFromDevice:"URL configured on the device (IP2)",urlOfficial:"Official Rinho server URL",urlEdited:"URL typed by hand",useOfficialUrl:"Use the official URL",compatible:"Compatible: {{model}} {{flash}}",resumeInfo:"There is an unfinished load ({{pct}} %): it will continue from there.",warning:"Do not disconnect the cable during the load. It takes ~3 min over serial and ~1.5 min over USB.",start:"Install by cable",cancel:"Cancel load",cancelConfirm:"Cancel the load?",retry:"Retry",reconnect:"Connect",confirmProduct:"I confirm this file belongs to this device",otherChannel:"The device has another firmware load in progress on another channel (for example cellular). If you continue, that load is discarded.",otherChannelContinue:"Discard and continue",progress:"{{done}} of {{total}} KB \xB7 {{kbps}} KB/s \xB7 {{eta}} left",phases:{downloading:"Downloading",preparing:"Preparing",sending:"Sending",verifying:"Verifying",installing:"Installing",confirming:"Confirming"},confirming:"The device is restarting. Confirming the new version... If it disconnected, connect it again.",confirmingAuto:"The device is restarting. It reconnects on its own and confirms the new version: no action needed.",confirmedTitle:"Firmware installed",confirmedMsg:"The device started with {{version}}.",unconfirmedTitle:"Installation could not be confirmed",unconfirmed:{sameBuild:"The device started with the same firmware it had: the load was rejected or it was the same build.",noResponse:"The device did not respond after restarting. Reconnect it and check the version."},cancelledTitle:"Load cancelled",cancelledMsg:"The device keeps its previous firmware.",errorTitle:"Cable load error",reasons:{badName:"The file name is not a Rinho firmware (.OTA from SPIDERIOT, ZEROIOT or AUDIOT).",empty:"The file is empty.",tooLarge:"The file is too large.",unknownDevice:"The device model could not be identified. Reconnect and try again.",modelMismatch:"This firmware does not match this device (different model or memory).",variantSwitch:"You are switching firmware variant (WiFi to NimBLE or back). Afterwards check >QBTH< and, if Bluetooth does not work, turn WiFi off with >SCXWIF0,0,0<.",productUnverified:"A Zero cannot be told apart from an Audience: confirm the file is the right one.",productMismatch:"The device is configured for {{expected}} and you are loading {{actual}}."},errors:{NOT_SUPPORTED:"The device firmware does not accept loading by cable.",FILE_INVALID:"The file is not valid.",DOWNLOAD_FAILED:"The firmware could not be downloaded.",BUSY:"The device is doing another update.",OPEN_FAILED:"The device could not open the load.",OTHER_CHANNEL_SESSION:"Cancelled so as not to overwrite the load in progress on another channel.",NO_RESPONSE:"The device does not respond.",TOO_MANY_ERRORS:"Too many transmission errors.",FLASH_WRITE:"Error writing the device memory.",SESSION_LOST:"The load session on the device was lost.",HASH_FAILED:"The device could not verify what was written.",IMAGE_INVALID:"The device rejected the image (firmware from another model or key?).",COMMIT_FAILED:"The device could not install the firmware.",DISCONNECTED:"Connection with the device was lost. Reconnect and press Retry: the load continues where it stopped.",CANCELLED:"Load cancelled."}}},activityLog:{title:"Log / Terminal",resumeLog:"Resume log",pauseLog:"Pause log",copyLog:"Copy log",clearLog:"Clear log",noActivity:"No activity...",sendCommand:"Send command..."},sendProgress:{sending:"Sending Configuration...",complete:"Send Complete",abortedDisconnected:"Device disconnected: the configuration is incomplete ({{sent}} of {{total}} commands confirmed). Reconnect and resend the full configuration.",abortedNoResponse:"The device stopped responding: the configuration is incomplete ({{sent}} of {{total}} commands confirmed). Check the connection and resend the full configuration.",of:"of",successful:"successful",failed:"failed"},modeSwitch:{basic:"Basic",advanced:"Advanced",switchToAdvanced:"Switch to Advanced",switchToBasic:"Switch to Basic",advancedWarning:"Rules and modules will be converted to editable custom rules. Hardware resources will be automatically migrated.",classification_one:"Classification of {{count}} rule",classification_other:"Classification of {{count}} rules",fixedRules:"Fixed rules",speedModule:"Speed module",detected:"detected",batteryModule:"Battery module",parkingModule:"Parking module",classified:"Classified",lostRules_one:"{{count}} rule cannot be classified and will be lost",lostRules_other:"{{count}} rules cannot be classified and will be lost",andMore:"... and {{count}} more",noBasicEquivalent:"Modules without basic equivalent:",allClassified:"All rules and modules were classified correctly.",switchLose:"Switch ({{count}} will be lost)",goToSummary:"Go to Summary"},configPanel:{server:"Server",commands:"Commands",fixedRules:"Fixed rules",speed:"Speed",battery:"Battery",parking:"Parking",waypoints:"Waypoints",regions:"Regions",detectedModel:"Detected model",importToAdvanced:"Import code to Advanced",importWarning:"Current configuration will be replaced with edited commands. Mode will change to Advanced.",commandCount:"commands"},changelog:{new:"New",change:"Change"},triggers:{"cat.system":"System","cat.io":"Inputs / Outputs","cat.speed":"Speed","cat.analog":"Analog / Battery","cat.timer":"Timers","cat.geo":"Geofences","cat.gps":"GPS","cat.accel":"Accelerometer","cat.ble":"Bluetooth / BLE","cat.can":"CAN / Variables","cat.comm":"Communications","cat.power":"Power",in:"Digital input",xp:"Expansion output",fct:"Factory counter fired",ow:"iButton detected",owp:"iButton by port","owp.portA":"Port A","owp.portB":"Port B",vl:"Speed threshold",ar:"Analog input",vbu:"Backup voltage",ko:"Rest/Sleep","ko.fullSleep":"Full sleep","ko.partialRest":"Partial rest","ko.enabled":"KO enabled","ko.exitingUlp":"Exiting KO++",td:"Timer",tr:"Schedule rule",nt:"Counter",hm:"Harsh maneuver",wp:"Circular geofence",rg:"Polygonal geofence",zna:"Extended geofence A",znb:"Extended geofence B",pk:"Parking","pk.parked":"Parked","pk.enabled":"Enabled",dc:"GPS direction change",dv:"Speed delta (harsh braking/acceleration)",tk:"Trailer tracking","tk.fired":"Event fired","tk.enabled":"Enabled","tk.state":"Triggered state",mvxp:"Motion axis X+",mvxn:"Motion axis X-",mvyp:"Motion axis Y+",mvyn:"Motion axis Y-",mvzp:"Motion axis Z+",mvzn:"Motion axis Z-",bs:"BLE Sensor active",be:"BLE Beacon detected",bsw:"BLE Smart Wildcard active",bswn:"BLE new device detected",bth:"Bluetooth client connected",uv:"User variable",u:"User flag",xb:"XBuffer with data",rl:"Other rule state",ack:"ACK received from destination",drv:"Driver (DRV)",drvOn:"Driver present",drvLogin:"Login",drvLogout:"Logout",drvInvalid:"Unauthorized code",drvWindow:"Window expired without driver",ic:"Driver Manager - state",icSession:"Session started",icMode:"Mode change",icValid:"Valid user",icInvalid:"Invalid user",icl:"Driver Manager - valid code",sim:"SIM selected",cid:"Caller ID (incoming call)",cq:"GPS quality (reliable position)",ign:"Ignition active",pwr:"Power cut",bu:"Buffer with pending reports",gps:"GPS fix valid",ac:"Motion (accelerometer)",cel:"Modem registered on network",wif:"WiFi connected",jmd:"Jamming detected",can:"CAN data received",tt:"System tick (alternates 0/1 every 1s)",dtc:"CAN faults (DTC J1939)","dtc.active":"Active faults present","dtc.new":"New fault","dtc.lamp":"Fault lamp on","dtc.cleared":"Faults cleared",pb:"Pulse burst (PC)",intpwr:"Internal power on",viopwr:"External voltage on",celpwr:"Modem HW on",gpspwr:"GPS HW on",wifpwr:"WiFi HW on",bthpwr:"Bluetooth on","sense.active":"+ Active","sense.deactive":"\u2212 Deact.","sense.change":"* Change","sense.activeDesc":"Rising edge (0 \u2192 1)","sense.deactiveDesc":"Falling edge (1 \u2192 0)","sense.changeDesc":"Any state change","op.and":"Logical AND","op.or":"Logical OR","op.xor":"Exclusive OR","op.nand":"NOT AND","op.nor":"NOT OR","op.xnor":"NOT XOR"},configPage:{bleSensorFields:"BLE sensor fields",bleSensorRef:"Reference for MBS() and UV",bleSensorUsage:"Use MBS(sensor, field) in UV/UC expressions. The field can be the name (e.g.: temp) or the numeric index (e.g.: 0)."},time:{now:"now",seconds:"{{s}} sec",minutesSeconds:"{{m}}min {{s}}s",minutes:"{{m}} min",hours:"{{h}}h",hoursMinutes:"{{h}}h {{m}}min",ago:"ago"},map:{editWaypoint:"Edit waypoint on map",editRegion:"Edit region on map",searchPlace:"Search place or address...",clickToAddVertices:"Click on map to add vertices \xB7 Drag marker to move \xB7 Click marker to delete (min. 3)",deleteVertex:"Delete vertex",deleteRegion:"Delete region",regionNamePlaceholder:"Region name",noPolygonsFound:"No polygons found in the file.",noPointsFound:"No points found in the file.",pointImported:"Point imported",polygonImported:"Polygon imported",vertices:"vertices",moreInFile:"more in file"},summary:{title:"Configuration Summary",copy:"Copy",copied:"\u2713 Copied",compatibleWith:"Compatible with",commSection:"Communication",mainServerBy:"Main server via",at:"at",backupAt:"backup at",backChannelBy:"BACK channel via",towards:"to",keepAlive:"Keep Alive every",apnLabel:"SIM 0 APN:",apnUser:"user:",operator:"Operator:",dualSim:"SIM 1 (Dual SIM): APN:",noApn:"(no APN)",cellDisabled:"Cellular disabled.",wifiLabel:"WiFi:",wifiDisabled:"disabled.",networkCount_one:"{{count}} network configured.",networkCount_other:"{{count}} networks configured.",reportSection:"Report and GPS",everyWithIgnOn:"Every <strong>{{time}}</strong> with IGN on",everyWithIgnOff:"every <strong>{{time}}</strong> with IGN off",headingAt:"Heading at <strong>{{angle}}\xB0</strong>",eventsDefinedCount_one:"<strong>{{count}}</strong> event defined:",eventsDefinedCount_other:"<strong>{{count}}</strong> events defined:",noEventsDefined:"No events defined.",gpsLabel:"GPS:",gpsFix:"fix \u2265 {{fix}}D",gpsPdop:"PDOP \u2264 {{pdop}}",gpsSats:"\u2265 {{sats}} satellites",ignitionLabel:"Ignition:",gpsMode:["Always (1s)","IGN only","Speed > 5 km/h"],ignMode:["Normal (wire)","Manual (SS)","By voltage"],datalogLabel:"DataLog:",toLog:"to Log",toBuffer:"to Buffer",eventsSection:"Event engine",noActiveRules:"No active rules.",activeRulesCount_one:"<strong>{{count}} active rule:</strong>",activeRulesCount_other:"<strong>{{count}} active rules:</strong>",priorityLow:"low",priorityMed:"medium",priorityHigh:"high",periodicIgnOn:"Periodic IGN every {{time}}",periodicIgnOff:"Periodic no IGN every {{time}}",headingOver:"Heading > {{angle}}\xB0",ignOn:"IGN on",ignOff:"IGN off",speedOver:"Over {{speed}} km/h",speedUnder:"Under {{speed}} km/h",noEvent:"no event",customRulesCount_one:"<strong>{{count}}</strong> custom rule",customRulesCount_other:"<strong>{{count}}</strong> custom rules",disabledCount_one:"{{count}} disabled",disabledCount_other:"{{count}} disabled",unnamed:"(unnamed)",geofencesSection:"Geofences",waypointsActive_one:"<strong>{{count}}</strong> active waypoint",waypointsActive_other:"<strong>{{count}}</strong> active waypoints",waypointsDisabled_one:"{{count}} disabled",waypointsDisabled_other:"{{count}} disabled",regionsActive_one:"<strong>{{count}}</strong> polygonal region",regionsActive_other:"<strong>{{count}}</strong> polygonal regions",regionsDisabled_one:"{{count}} disabled",regionsDisabled_other:"{{count}} disabled",vertices:"vert.",totalCommands:"{{count}} total commands.",seg:"sec",min:"min"},code:{ipsPassword:"Wialon IPS password: {{pw}}",ipsPasswordEmpty:"Wialon IPS password: (empty)",protoMain:"Protocol MAIN={{main}}, BACK={{back}}, window={{win}}",serverEmpty:"{{label}}: (empty)",serverPrimary:"Primary",serverSecondary:"Secondary",serverBackPrimary:"BACK primary",serverBackSecondary:"BACK secondary",keepAlive:"Keep Alive every {{secs}}s ({{ch}})",modemOn:"Cellular modem: on",modemOff:"Cellular modem: off",operatorAuto:"Operator: automatic selection",operatorManual:"Manual operator: {{op}}",apnSim0:"APN SIM0: {{apn}}",apnCleared:"APN cleared (automatic detection)",sim1ApnCleared:"SIM1 APN cleared (automatic detection)",simModeSingle:"SIM mode: SIM0 only",simModeSwitch:"SIM mode: automatic SIM0/SIM1 switching",sim1OperatorAuto:"SIM1: automatic operator",sim1OperatorManual:"SIM1: manual operator {{op}}",sim1Apn:"SIM1 APN: {{apn}}",timerIgnOn:"Timer with IGN: {{time}}",timerIgnOff:"Timer without IGN: {{time}}",headingChange:"Heading change: {{angle}}\xB0",gpsModeAlways:"always (1s)",gpsModeIgn:"IGN only",gpsModeSpeed:"speed > 5 km/h",gpsMode:"GPS mode: {{mode}}",gpsQuality:"GPS quality: fix\u2265{{fix}}D, PDOP\u2264{{pdop}}, sats\u2265{{sats}}",ignNormal:"normal",ignManual:"manual (SS)",ignVoltage:"by voltage",ignManualLiberaIn07:"manual (frees IN07)",ignition:"Ignition: {{mode}}",ignitionWithTimes:"Ignition: {{mode}} \xB7 ON {{ton}}s \xB7 OFF {{toff}}s",ignVbatManual:"Manual ignition thresholds: ON > {{on}} V, OFF < {{off}} V",ignVbatAuto:"Automatic ignition thresholds",tagDevice:"Device tag: {{tag}}",tagEmpty:"Tag: (empty)",passwordChange:"Password change",inputDebounce:"{{label}}: ON={{on}}ms, OFF={{off}}ms",outputDisabled:"{{label}}: disabled",outputDuration:"duration={{dur}}ms",outputBlink:"blink={{on}}ms/{{off}}ms",outputPersistent:"persistent state",wifiEnabled:"WiFi enabled",wifiDisabled:"WiFi disabled",wifiNetworkEmpty:"WiFi network {{idx}}: (empty)",wifiNetwork:"WiFi network {{idx}}: {{ssid}}",datalogDestAll:"all",datalogDestGPRS:"GPRS",datalogDestWIF:"WiFi",datalogDestBTH:"Bluetooth",datalogDestTRM:"Terminal",datalogDestBACK:"Backup",datalogDestBGP:"Backup+GPRS",datalogDestBWI:"Backup+WiFi",datalog:"DataLog: {{dest}}, {{mode}}",alertSpeedOn:"Alert speed ON: {{speed}} km/h",alertSpeedOff:"Cut-off speed OFF: {{speed}} km/h",batteryLow:"Low battery: {{min}}V \u2013 {{max}}V",batteryOk:"Battery OK: {{min}}V+",batteryDisconnect:"Disconnection: 0V \u2013 {{max}}V",parkingConfig:"Parking idx:{{idx}}, radius:{{radius}}m, confirm:{{deb}}s",clearAllRules:"Clear all existing rules",wifiReconnect:"WiFi: reconnect on power up",speedActivate:"Speed: activate XP{{out}} above {{speed}} km/h",speedRestored:"Speed restored < {{speed}} km/h",speedRestoredOutput:"Speed restored < {{speed}} km/h \u2192 XP{{out}} OFF",batteryLowDetected:"Low battery detected \u2192 evt:{{evt}}",batteryOkRestored:"Battery OK restored \u2192 evt:{{evt}}",batteryDisconnected:"Battery disconnection \u2192 evt:{{evt}}",parkingActivate:"Parking: activate on IGN off",parkingActivateGps:"Parking: activate on IGN off + GPS mode 1",parkingAlert:"Parking: movement alert \u2192 evt:{{evt}}",parkingAlertGps:"Parking: movement alert \u2192 evt:{{evt}} + restore GPS",prioLow:"low",prioMedium:"medium",prioHigh:"high",noActions:"no actions",pkActivate:"PK activate",pkDeactivate:"PK deactivate",clearAllWaypoints:"Clear all waypoints",waypointDisabled:"{{label}}: disabled",waypointRadius:"{{label}}: radius {{radius}}",clearAllRegions:"Clear all regions",clearAllSpeeds:"Clear all speed thresholds",clearAllTimers:"Clear all timers",clearAllUserVars:"Clear all user variables",clearDriverManager:"Clear Driver Manager",everyHour:"every hour",everyMin:"every min",everySec:"every sec",braking:"braking",acceleration:"acceleration",hmAcelGps:"GPS Accel",hmBrakeGps:"GPS Brake",hmTurnLeft:"Left turn",hmTurnRight:"Right turn",hmCentripetal:"Centripetal",hmImpLat:"Lat. impact",hmImpFront:"Front impact",hmImpRear:"Rear impact",hmDisabled:"disabled",hmType:"type {{type}}",tiltAutoIgn:"auto IGN",tiltManual:"manual",tilt:"Tilt: {{mode}}, stab={{stab}}s, detect={{det}}s, angle={{angle}}\xB0",tiltDisabled:"Tilt: disabled",counterMax:"{{label}}: max {{max}}",flagPermanent:"permanent",flagVolatile:"volatile",captureSrcSerial:"Serial",captureSrcGps:"GPS",captureSrcModem:"Modem",captureSrcBle:"BLE",captureSrcDebug:"Debug",captureSrcCan:"CAN",captureSrcOff:"OFF",captureSource:"{{label}}: source {{src}}, port {{port}}",analogSource:"{{label}}: source {{src}}",bluetoothOn:"Bluetooth: on",bluetoothOff:"Bluetooth: off",onewireEnabled:"OneWire: enabled",uartPortBaudrate:"Main UART: {{baudrate}} bps",onewireDisabled:"OneWire: disabled",driverNoName:"(no name)",driver:"Driver {{idx}}: {{name}}",regionBlockEmpty:"{{label}}: block {{block}} \u2014 empty",regionBlockVerts:"{{label}}: block {{block}} \u2014 {{count}} vertex",regionBlockVerts_other:"{{label}}: block {{block}} \u2014 {{count}} vertices",dallasTemp:"{{label}}: Dallas temp",ecuThrottle:"Throttle",ecuFuelPct:"Fuel %",ecuOdometer:"Odometer",ecuLiters:"Liters",ecuSpeed:"Speed",ecuEngineTemp:"Engine temp",ecuOilPressure:"Oil pressure",ecuFuelTrip:"Fuel trip",ecuFuelTripSoft:"Fuel trip soft",ecuEngineHours:"Engine hours",ecuChassis:"Chassis",ecuFuelRate:"Fuel rate",ecuTorque:"Torque",ecuWheelSpeed:"Wheel speed",ecuEngineLoad:"Engine load",ecuRuntime:"Runtime",ecuDistMil:"Dist MIL",ecuLitersCustom:"Custom liters",ecuMlCustom:"Custom mL",ecuParkingBrake:"Parking brake",ecuBrakePedal:"Brake pedal",ecuThrottleCustom:"Custom throttle",ecuDriverDoor:"Driver door",ecuPassengerDoor:"Passenger door",ecuClutch:"Clutch",ecuTurbo:"Turbo",headerGenerated:"Configuration generated by Rinho Configurator",headerDate:"Date: {{date}}",headerTag:"Tag: {{tag}}",headerDescription:"Description: {{desc}}",headerCompatible:"Compatible with: {{models}}",sectionTag:"Tag",sectionPassword:"Password",sectionIpProtocol:"IP Protocol",sectionServers:"Servers",sectionKeepAlive:"Keep Alive",sectionWialonPassword:"Wialon IPS Password",sectionWifi:"WiFi",sectionCellular:"Cellular",sectionDatalog:"DataLog",sectionCountry:"Country (MCC)",sectionGps:"GPS",sectionIgnition:"Ignition",sectionInputDebounce:"Input Debounce (IT)",sectionCanBus:"CAN bus",sectionEcuCan:"ECU CAN (CXECU)",sectionOneWire:"OneWire",sectionDallasTemp:"Dallas Temp (DT)",sectionUartPort:"UART Port (CXTR)",sectionDigitalOutputs:"Digital Outputs (XP)",sectionGradualCut:"Gradual Cut (GC)",sectionBluetooth:"Bluetooth (CXBTH)",sectionBeaconsBle:"BLE Beacons (BE)",sectionSensorsBle:"BLE Sensors (BS)",sectionSmartWildcard:"BLE Smart Wildcard (BSW)",sectionTimers:"Timers (TD)",sectionSchedule:"Schedule (TR)",sectionCounters:"Counters (NT)",sectionHeading:"Heading Angle (DC)",sectionSpeed:"Speed (VL)",sectionAcceleration:"Acceleration (DV)",sectionManeuvers:"Maneuvers (HM)",sectionVectors:"Motion Vectors (MVT)",sectionTilt:"Tilt (TK)",sectionAccelerometer:"Accelerometer (CXAC)",sectionAnalogCalibration:"Analog Calibration (CXAIN)",sectionAnalog:"Analog (AR)",sectionParking:"Parking (PK)",sectionTriggers:"Triggers (UV)",sectionFlags:"Flags (U)",sectionCapture:"Serial Capture (CXXB)",sectionReports:"User Reports (UC)",sectionBlackBox:"Black box (CXBB)",sectionDriverManager:"Driver Manager (IC)",sectionRules:"Rules (RL)",sectionWaypoints:"Waypoints (WP)",sectionRegions:"Regions (RG)",sectionOther:"--- Other ---",valServerRequired:"Primary server required (IP0)",valPortInvalid:"Invalid port (1-65535)",valTimerRange:"Timer: 1-99999 sec",valAngleRange:"Angle: 1\xB0-359\xB0",valSsidRequired:"Enter at least one SSID",valApnRequired:"No APN set: the empty APN command will be sent, clearing the APN stored in the device and leaving it in automatic detection (recent firmware and Rinho PI). On old firmware the device may lose data connectivity until an APN is set.",valNoComm:"No cellular or WiFi enabled: the device will not be able to communicate with the server.",sectionDrv:"Driver (DRV)",drvOrigen0:"Driver off",drvOrigen1:"Driver: iButton",drvOrigen2:"Driver: IC session",drvOrigen3:"Driver: manual only",drvOrigen4:"Driver: tachograph",drvBleOff:"Bluetooth driver off",drvBleOn:"Bluetooth driver (BSW0{{slot}})",valDrvRpt:'Driver (DRV): report "{{rpt}}" is not valid. It is written like the G action without the G: 2 letters or digits, 2 hex digits and priority H, M or L (e.g. U101H).',valDrvAvisoCorte:"Driver (DRV): the warning cannot use the cut output ({{xp}}).",valDrvOkCorte:"Driver (DRV): the confirmation cannot use the cut output ({{xp}}).",valDrvTacoSinCan:"Driver (DRV): the tachograph source needs a CAN bus (the ZERO and the PI have none).",valDrvSalida:"Driver (DRV): {{xp}} does not exist on the device (it has {{n}} output(s)).",valDrvListaVacia:"Driver (DRV): the ICL list is required but it is empty, so nobody will be able to identify.",valDrvBleSinBle:"Bluetooth driver: the device has no Bluetooth and will reject it.",valDrvBleOrigen:"Bluetooth driver: it only works with the iButton or IC session source; with this source the device ignores it.",valDrvBleSlot:"Bluetooth driver: {{bsw}} is not configured, so it will never catch a beacon.",valWifiBtBoth:"WiFi and Bluetooth both on: the SPIDER and the SMART do not allow both and Bluetooth will stay off. Keep only one (only the ZERO supports both).",valWifiBtCoexFw:"WiFi and Bluetooth together on the ZERO: requires firmware 1.09.28.T50 or later (the web portal with Bluetooth on, T52). With an older one Bluetooth stays off.",valUvEmptyRange:"{{uv}} never triggers: the device fires on MIN \u2264 value < MAX, and MIN ({{min}}) is not less than MAX ({{max}}).",valUvEmptyRangeExact:"{{uv}} never triggers: the maximum is not included (MIN \u2264 value < MAX). To fire on exactly {{min}}, set MAX = {{exact}}.",valEventDuplicate:"Event {{evt}} repeated ({{names}}): the platform will not be able to tell them apart. Change the number of one of them in the Event Table.",valEventGap:"Events {{evts}}: platforms that read 00 to 99 (e.g. SmartTrack) do not receive them. Use numbers from 00 to 99.",valOk:"OK",valWarnings:"Warnings"},ignition:{header:"Ignition (CXIGN)",desc:"Defines how the device detects the vehicle ignition state.",modeLabel:"Ignition mode",modeNormal:"Normal",modeManual:"Manual",byVoltage:"By voltage",modeManualLiberaIn07:"Manual (frees IN07)",modeNormalDesc:"Detection via digital ignition input.",modeManualDesc:"IGN state is controlled manually via software (SS command). No physical input is used.",modeManualLiberaIn07Desc:"IGN state is controlled manually via software and frees IN07 for general use.",voltageDesc:"Firmware measures V at startup and <strong>auto-detects</strong> whether the vehicle is 12V or 24V, applying the corresponding threshold set. Hysteresis prevents oscillation near the threshold.",vehicle:"Vehicle",ifV:"if V",debounceHeader:"Stabilization times (debounce)",debounceDesc:"Time the signal must remain stable before confirming the state change. Prevents false positives from noise or momentary cuts.",tonLabel:"Turn-on time (ON)",toffLabel:"Turn-off time (OFF)",secondsUnit:"seconds",vbatManualLabel:"Manual thresholds",vbatManualDesc:"Replaces the factory automatic thresholds. Field procedure: check the voltage with the engine off and with the engine running, then set both cutoffs in the middle of that range.",vbatOnLabel:"Turns on above",vbatOffLabel:"Turns off below",vbatFwNote:"Requires firmware v1.09.26 (build T15) or higher. If the connected device doesn't support it, the command is skipped when sending.",voltsUnit:"V"},inputs:{header:"Input Debounce (IT)",pullUpDesc:"Pull-up inputs: <1>free = 1</1> \xB7 <3>to GND = 0</3> (active).",debounceDesc:"<strong>ON</strong>: delay at rest (free signal, = 1) \xB7 <strong>OFF</strong>: delay on activation (to GND, = 0).",descriptiveName:"descriptive name"},servers:{header:"Servers",desc:"Enter direct IP (e.g.: 64.120.108.24) or DNS name (e.g.: dm.rinho.com.ar). Automatically detected.",ipOrDns:"IP or DNS domain",port:"Port",addSecondary:"+ Add secondary server (IP1)",password:"Password",enableBack:"Enable backup channel (BACK)",ipPlaceholder:"64.120.108.24 or dm.rinho.com.ar",ipsPasswordPlaceholder:"Wialon server password"},timers:{reportTimers:"Report Timers",ignOnLabel:"Timer with IGN on",ignOffLabel:"Timer without IGN / stopped",advancedHeader:"Timers (TD00\u2013TD31)",advancedDesc:"Each timer generates a periodic pulse by time and/or distance. Used as triggers in rules (TD00+, TD01+, etc.).",noTimers:"No timers configured.",addTimer:"+ Add timer",namePlaceholder:"E.g.: Timer report with IGN",time:"Time",distance:"Distance",sec:"sec",meters:"meters"},waypoints:{header:"Waypoints (Circular Geofences)",desc:"Up to 32 waypoints (WP00\u2013WP31). Each defines a center point and radius. Available as signals in the event engine and custom rules.",addWaypoint:"+ Add waypoint",importKml:"Import KML",maxReached:"Maximum of 32 waypoints reached.",waypointName:"Waypoint name",coordinates:"Coordinates",latitude:"Latitude",longitude:"Longitude",radius:"Radius",generatedCmd:"Generated command",editOnMap:"Edit on map",internal:"Internal",deleteWaypoint:"Delete waypoint",imported_one:"{{count}} waypoint imported",imported_other:"{{count}} waypoints imported",ignored:"{{count}} ignored \u2014 no space",ignored_other:"{{count}} ignored \u2014 no space",deleteCount:"Delete {{count}}",noPoints:"No points found in the file.",error:"Error"},tilt:{header:"Tilt detection",desc:"Detects rollover or tilt using the accelerometer. Trigger: TK+",manual:"Manual",autoIgn:"Auto with IGN",stabilization:"Stabiliz.",detection:"Detection",sec:"sec",runtimeDesc:"First waits {{stab}}s immobile to calibrate, then monitors. If tilt exceeds {{angle}}\xB0 for more than {{detect}}s, fires TK+."},heading:{title:"Heading Angle",label:"Heading change (degrees)",desc:"Generates an additional report when the vehicle turns more than {{angle}}\xB0"},logging:{title:"Report Download",label:"Download via DataLog",enabledDesc:"Reports are stored in the DataLog (12,000 records) and downloaded automatically to the server. More reliable during connectivity loss.",disabledDesc:"Reports are stored in the internal buffer (2,728 records) and sent via GPRS/SMS."},battery:{title:"Battery monitoring",desc:"Generates automatic events when vehicle voltage enters the disconnection, low battery or restored zones. Uses analog ranges (AR) from the device.",monitoring:"\u{1F50B} Battery monitoring",disconnection:"Disconnection",low:"Low",ok:"OK",lowBattery:"Low battery",batteryOk:"Battery OK (restored)",events:"Events",advancedResources:"Advanced resources",arLow:"AR Low:",arOk:"AR OK:",arDisc:"AR Disc:",datalogTooltip:"DataLog: circular memory",bufferTooltip:"Buffer: prioritized, ideal for alarms"},outputs:{title:"Digital Outputs (CXXP)",desc:"Configure the activation mode for each digital output.",disabled:"disabled",fixed:"fixed",continuousBlink:"continuous blink",fixedMode:"Fixed",blinkMode:"Blink",fixedDesc:"Persistent (non-volatile) state. Activated/deactivated by command or rule.",duration:"Duration"},parking:{title:"Parking Mode",desc:"Sets a virtual geofence from the current position when ignition is turned off. If the vehicle leaves the configured radius, generates an alert event.",radius:"Geofence radius",confirmTime:"Confirmation time",gpsMode1:"Switch GPS to mode 1 when parked",gpsMode1Note:"(SCXGPS1 \u2014 IGN only)",gpsRestore:"Restore GPS on movement detection",gpsRestoreNote:"(SCXGPS0 \u2014 always active)",activateOnIgnOff:"Activate parking on ignition off",movementDetected:"Movement detected",datalogTooltip:"DataLog: circular memory",bufferTooltip:"Buffer: prioritized, ideal for alarms"},velAlert:{title:"Speed control",desc:"Generates overspeed and restored events. Optionally activates a digital output (buzzer) when exceeding the limit and turns it off below the cutoff threshold.",header:"\u{1F6A8} Speed control",cutoff:"Cutoff: <strong>{{speed}} km/h</strong>",limit:"Limit: <strong>{{speed}} km/h</strong>",logTitle:"DataLog: circular memory",bufTitle:"Buffer: prioritized, ideal for alarms",ignCondition:"With IGN on",activateOutput:"Activate output (buzzer)",speedExcess:"Speed excess",speedRestore:"Speed restored",advancedResources:"Advanced resources",evt:"Evt"},regions:{deleteVertex:"Delete vertex",regionName:"Region name",maxVertices:"Maximum 32 vertices.",minVertices:"At least 3 vertices with coordinates are needed to generate the command.",commandsGenerated:"Commands generated ({{count}} blocks)",deleteConfirm:"Delete?",deleteRegion:"Delete region",title:"Regions (Polygon Geofences)",latitude:"Latitude",longitude:"Longitude",addVertex:"+ Add vertex",noPolygons:"No polygons found in the file.",imported_one:"{{count}} region imported",imported_other:"{{count}} regions imported",importedIgnored_one:"{{count}} ignored \u2014 no space",importedIgnored_other:"{{count}} ignored \u2014 no space",clearAll:"Clear all",clearCount:"Clear {{count}}",description:"Up to 32 regions (RG00\u2013RG31). Each region is a polygon of 3 to 32 vertices. Polygons with more than 8 points are split into blocks of up to 8 per command.",addRegion:"+ Add region",importKml:"Import KML",maxReached:"Maximum of 32 regions reached.",editOnMap:"Edit on map"},protocol:{ipProtocol:"IP Protocol",title:"IP Protocol",windowLabel_one:"Window: {{count}} simultaneous report",windowLabel_other:"Window: {{count}} simultaneous reports",windowShort:"Window: {{count}} rep.",windowSummary:"Window: {{count}}",windowDesc:"Number of reports the device can download simultaneously to the server.",windowDescription:"Number of reports the device can download simultaneously to the server.",keepAlive:"Keep Alive",keepAliveDesc:"Sends a periodic message to the server to keep the session active and confirm connectivity. If the server does not receive the keep alive within the configured time, it may consider the device disconnected.",keepAliveDescription:"Sends a periodic message to the server to keep the session active and confirm connectivity.",channelMain:"MAIN channel",channelBack:"BACK channel",dataLog:"DataLog",dataLogDescription:"Local report storage. Sent automatically when connectivity is available.",datalogDesc:"Local report storage. Sent automatically when connectivity is available.",enabled:"Enabled",destination:"Destination",destAll:"All",destTerminal:"Terminal",retries:"Retries",time:"Time",seconds:"sec",order:"Order",fifo:"FIFO (oldest first)",lifo:"LIFO (newest first)",dlAll:"All",dlBluetooth:"Bluetooth",dlTerminal:"Terminal",dlBackup:"Backup",dlBackupGprs:"Backup+GPRS",dlBackupWifi:"Backup+WiFi"},sms:{retries:"Retries",timeout:"Timeout",desc:"Number of SMS send retries and timeout between each attempt (0 = modem default)."},zeroConfig:{periodicIgnOn:"Periodic with IGN",periodicIgnOff:"Periodic without IGN",headingChange:"Heading change",ignitionOn:"IGN on",ignitionOff:"IGN off",inputActivation:"Input activation",inputDeactivation:"Input deactivation",outputActivation:"Output activation",outputDeactivation:"Output deactivation"},modeManager:{timerWithIgn:"Timer with IGN",timerWithoutIgn:"Timer without IGN",headingChange:"Heading change",overspeed:"Overspeed",speedRestore:"Speed restored",batteryLow:"Low battery",batteryOk:"Battery OK",batteryDisconnected:"Battery disconnected",parking:"Parking",wialonIpsTemplate:"Wialon IPS template",wialonCanTemplate:"Wialon + CAN template",wifiReconnectOnPower:"WiFi: reconnect on power up",moduleAcceleration:"Acceleration (DV)",moduleManeuvers:"Maneuvers (HM)",moduleVectors:"Vectors (MVT)",moduleTilt:"Tilt (TK)",moduleSchedules:"Schedule (TR)",moduleCounters:"Counters (NT)",moduleTriggers:"Triggers (UV)",moduleReports:"Reports (UC)",moduleFlags:"Flags (U)",moduleCapturer:"Capture (CXXB)",moduleBlackBox:"Black box (CXBB)",moduleDrv:"Driver (DRV)",moduleDrvB:"Bluetooth driver (DRVB)",moduleDriver:"Driver Manager (IC)",moduleEcuCan:"ECU CAN (CXECU)"},customRules:{rulesHeader:"Rules",customRulesHeader:"Custom rules",eventTable:"Event table",deleteAll:"Delete all",advancedDesc:"All device rules. Assign labels to resources for easy identification.",basicDesc:"Define additional rules using any device signal.",addRule:"+ Add RL",ruleName:"Name",ruleNamePlaceholder:"Descriptive rule name",trigger:"Trigger",triggerHint:"signal that activates the rule",condition:"Condition",conditionHint:"additional condition (optional)",actions:"Actions",actionsRun:"execute on trigger",addAction:"+ Add action",noTrigger:"No trigger configured",noCondition:"No condition configured",noActions:"No actions configured",addSignal:"+ signal",searchSignalPlaceholder:"Search signal... (e.g.: IN05, GPS, timer)",noSearchResults:"No results",gpsModeNormal:"Normal (dynamic)",gpsModeAnchor:"Anchor (fixed position)",gpsModeBySpeed:"By speed",parkingActivate:"Activate",parkingDeactivate:"Deactivate",timerRestart:"Restart",timerStop:"Stop",sleepWake:"Wake",sleepSleep:"Sleep",sleepEnable:"Enable",sleepDisable:"Disable",gcActivate:"Activate",gcStop:"Stop",gcReset:"Reset",resourceLabels:"Resource labels",resourceLabelsDesc:"Assign names to resources to identify them in the signal selector.",addLabel:"+ Label",eventTableTitle:"Event Table",eventTableDesc:"Descriptive name for each event number. Used in rules and generated code.",eventNamePlaceholder:"Event name...",eventDuplicate:"An event with this description already exists",eventDuplicateRevert:"Duplicate description \u2014 reverted",onlyDefined:"Only defined",noEventsDefined:"No events defined",showAll:"Show all",useEventTable:"Use the Event Table to define.",labelTimers:"Timers",labelSpeeds:"Speeds",labelAnalog:"Analog",labelCounters:"Counters",edgeFalseToTrue:"false to true (rising edge)",edgeTrueToFalse:"true to false (falling edge)",edgeAny:"any edge",sleepAccel:"Accelerometer",sleepInputs:"Inputs",sleepCellular:"Cellular",sleepInternalPower:"Internal power",sleepExternalPower:"External power",reposoFull:"Full rest",gpsOff:"GPS off",reposo:"Rest",permanent:"permanent",volatile:"volatile",moveUp:"Move up",moveDown:"Move down",collapse:"Collapse",expand:"Expand",confirmDelete:"Delete?",yes:"Yes",no:"No",deleteRule:"Delete rule",duplicateRule:"Duplicate rule",enableRule:"Enable rule",disableRule:"Disable rule",copy:"copy",index:"Index",search:"Search",cancel:"Cancel",event:"Event",priority:"Priority",descOutput:"Output",descVariable:"Variable",descMode:"Mode",descCounter:"Counter",descGradualCut:"Gradual Cut",descUnknown:"Unknown",counterIncrement:"Increment",counterDecrement:"Decrement",gpsModeNormalShort:"Normal",gpsModeAnchorShort:"Anchor",gpsModeSpeedShort:"Speed",timeUnitSec:"sec",timeUnitMin:"min",timeUnitHrs:"hrs",visual:"Visual",triggerRawPlaceholder:"Trigger raw expression (e.g.: IGN&VL00)",conditionRawPlaceholder:"Condition raw expression (e.g.: IGN&!U00)",noResultsFor:'No results for "{{filter}}"',undefined:"Undefined",close:"Close",delete:"Delete"},allRes:{emptyMessage:"No resources configured. Add timers, speeds, analog or other resources you need for your rules.",units:{sec:"sec"},td:{label:"Timers",desc:"Periodic pulse by time and/or distance. Trigger: TD00+",timeout:"Time",distance:"Distance"},dc:{label:"Headings",desc:"GPS direction change. Trigger: DC00+",angle:"Angle",disabled:"disabled"},vl:{label:"Speed",desc:"Speed threshold. Trigger: VL00+, VL01-",speed:"Speed",filtered:"Filtered",filteredOn:"filtered",filteredOff:"unfiltered",settle:"Sustained",settleUnit:"tenths"},dv:{label:"Acceleration",desc:"Hard braking/acceleration by GPS speed delta. Trigger: DV00+"},hm:{label:"Maneuvers",desc:"Harsh maneuvers. HM00-01: GPS, HM02-07: accelerometer. Trigger: HM00+",eventType:"Type",eventTypes:{"0":"GPS Accel","1":"GPS Brake","2":"Left turn","3":"Right turn","4":"Centripetal","5":"Lat. impact","6":"IMU Accel","7":"IMU Brake"},magnitude:"Magnitude",minSpeed:"Min speed",hysteresis:"Hysteresis",timeWindow:"Window",preset:{fleet:"Commercial Fleet","fleet.accel":"Acceleration","fleet.brake":"Braking","fleet.latImpact":"Lateral impact","fleet.frontImpact":"Frontal impact",hazmat:"Hazardous Vehicles","hazmat.accel":"Gentle acceleration","hazmat.brake":"Gradual braking","hazmat.turnL":"Gentle left turn","hazmat.turnR":"Gentle right turn","hazmat.centripetal":"Centripetal","hazmat.latImpact":"Lat. impact","hazmat.frontImpact":"Frontal impact","hazmat.rearImpact":"Rear impact",family:"Family Standard","family.accel":"Acceleration","family.brake":"Braking","family.turnL":"Left turn","family.turnR":"Right turn","family.latImpact":"Lat. impact","family.frontImpact":"Frontal impact","family.rearImpact":"Rear impact","family.centripetal":"Centripetal"}},ar:{label:"Analog",desc:"Analog monitoring: voltage, ADC or temperature. Triggers when value is in range [min, max). Trigger: AR00+",source:"Source","source.vbat":"Main battery (VBat) \u2014 cV","source.vbu":"Backup battery (VBU) \u2014 cV","source.adc0":"ADC 0 (AN0) \u2014 cV","source.adc1":"ADC 1 (AN1) \u2014 cV","source.adc2":"ADC 2 (AN2) \u2014 cV","source.adc3":"ADC 3 (AN3) \u2014 cV","source.adc4":"ADC 4 (AN4) \u2014 cV","source.adc5":"ADC 5 (AN5) \u2014 cV","source.tempMcu":"MCU Temperature \u2014 c\xB0C","source.dallas0":"Dallas Temperature 0 \u2014 c\xB0C","source.dallas1":"Dallas Temperature 1 \u2014 c\xB0C","source.dallas2":"Dallas Temperature 2 \u2014 c\xB0C","source.dallas3":"Dallas Temperature 3 \u2014 c\xB0C","source.dallas4":"Dallas Temperature 4 \u2014 c\xB0C","source.dallas5":"Dallas Temperature 5 \u2014 c\xB0C","source.dallas6":"Dallas Temperature 6 \u2014 c\xB0C","source.dallas7":"Dallas Temperature 7 \u2014 c\xB0C",min:"Min",max:"Max"},u:{desc:"Boolean SET/CLR flags from rule actions. U00-U15: volatile. U16-U31: permanent. U32-U47: volatile. U48-U63: permanent. Trigger: U00+",value:"Value",permanent:"permanent",volatile:"volatile"},nt:{label:"Counters",desc:"Counters with max value. Incremented/decremented from actions. Fires on reaching max. Trigger: NT00+",maxcount:"Maximum"},tr:{label:"Schedule",desc:"Schedule-based rules. Fires at a specific time or periodically. ** = every hour/minute/second (wildcard). Default: ****** (every second). Trigger: TR00+",hora:"Hour",minuto:"Minute",segundo:"Second"},mvt:{label:"Vectors",desc:"Accelerometer motion vectors (XYZ thresholds in mg). Triggers: MVXP, MVXN, MVYP, MVYN, MVZP, MVZN"},cxbb:{label:"Black box",desc:"Continuously captures a report and, when a rule runs {GBBxxH;@LOG}, sends the past and future samples with event xx. One burst at a time: another GBB while the previous one is being sent is ignored. With U0-UF the sample carries only the UC text, without position: include it in the SUC. Without ;@LOG it goes to the live queue and is lost without coverage.",reportType:"Report",sampleRate:"Sampling",history:"Past",future:"Future"},cxxb:{label:"Capture",desc:"External serial capture. Configures port, timeout, delimiters. Fires as XB00+",source:"Source","source.disabled":"Disabled","source.modem":"Modem",port:"Port",rxChars:"End by characters",rxTimeout:"End by timeout",header:"Header (start)",footer:"Footer (end)",displayMode:"Output format","displayMode.binary":"Binary","displayMode.hex":"Hexadecimal",showHeadFoot:"Include H/F in capture"},uv:{label:"Triggers",desc:"User variables with conditional expressions. Trigger: UV00+",expression:"Expression"},uc:{label:"Reports",desc:"Custom report templates. Generated from rule actions with GU{slot}.",expression:"Expression"},drv:{help:{origen:"Where the driver comes from. iButton: the last key read. IC session: the Driver Manager login (key, RF remote or SIC). Manual only: SDRV/CDRV from the platform or by SMS. Tachograph: driver 1 card (CAN bus). Changing the source logs the driver out.",lista:"Any code: any key or card becomes the driver. ICL only: only the codes loaded in the Driver Manager list; any other code is rejected and fires DRV03.",retencion:"Seconds with ignition off until the automatic logout. 0 = the driver stays until another one identifies or a CDRV arrives.",ventana:"Seconds the driver has to identify after ignition on. 0 = no driver required (no warning, no cut). If it expires without a driver it fires DRV04 and applies the cut.",aviso:"Output turned on while the window runs (buzzer or light) to remind the driver to identify. It cannot be the cut output.",corte:"What happens when the window expires without a driver or an unauthorized code shows up. Cut on XP: turns that output on. Gradual: uses the gradual cut (GC). Enable H: the output is on only with a driver, so the vehicle does not start without identifying.",velCorte:"The output cut waits until speed drops below this value (km/h), so it never cuts a moving vehicle. It does not apply to the gradual cut or to the enable output.",rptLogin:"Report on each login, written like the G action without the G: type (2 characters), event number in hex and priority H, M or L. E.g. U101H = template U1, event 01, high priority. Empty = none.",rptLogout:"Report on each logout (CDRV, retention expired or driver change). Same format, e.g. U102H. Empty = none.",rptInvalido:"Report when an unauthorized code shows up (with ICL only). Same format, e.g. U103H. Empty = none.",rptSinChofer:"Report when the window expires without anybody identifying. Same format, e.g. U104H. Empty = none.",dst:"Where those reports go: GP main server, WI over WiFi, BT Bluetooth, TR serial port, BGP and BWI backup over cellular or WiFi, LOG memory only, BACK the backup, ALL all of them.",xpOk:"Output turned on for 2 s on each login, to confirm to the driver that the login worked (buzzer or light). It cannot be the cut output."},label:"Driver",desc:"A single driver per device: it goes to Wialon/Traccar (iButton field), the DRV token, TRIP and the signals DRV00 (driver present), DRV01 login, DRV02 logout, DRV03 unauthorized code, DRV04 window expired.",origen:"Source",origen0:"Off",origen1:"iButton (last key)",origen2:"IC session",origen3:"Manual only (SDRV)",origen4:"Tachograph (CAN)",lista:"List",lista0:"Any code",lista1:"ICL only",retencion:"Retention",ventana:"Window",aviso:"Warning",ninguna:"None",corte:"Cut",sinCorte:"No cut",corteXp:"Cut on",corteG:"Gradual cut (GC)",corteH:"Enable (starts only with a driver) on",velCorte:"Cut speed",rptLogin:"Login rpt",rptLogout:"Logout rpt",rptInvalido:"Invalid rpt",rptSinChofer:"No-driver rpt",rptPlaceholder:"E.g. U101H (empty = none)",dst:"Rpt destination",xpOk:"Login OK",xpOkXp:"2 s on each login"},drvb:{help:{slot:"BSW slot (Bluetooth wildcard) that catches the driver beacon. That BSW is configured separately, in Bluetooth, with the beacon filter. Off = no Bluetooth driver.",modo:"Presence: the driver stays logged in while the beacon is near and is logged out when the BSW loses it. Button: each beacon press logs in (replaces the current driver).",id:"What is used as the driver code: the beacon MAC (12 hex), or the iBeacon major+minor (8 hex) / the Eddystone-UID instance (12 hex).",toggle:"Button mode only: pressing the same beacon again logs out."},label:"Bluetooth driver",desc:"The driver comes from a beacon (iBeacon or Eddystone-UID) caught by a BSW slot. Works with the iButton or IC session source.",slot:"BSW slot",apagado:"Off",modo:"Mode",modoP:"Presence",modoB:"Button",id:"Code",idI:"Major+minor / instance",toggle:"Button: 2nd = logout"},ic:{desc:"Driver management via alphanumeric code. IC00: session, IC01: mode, IC02: timeout, IC03: login failed. ICL: valid code.",name:"Name",namePlaceholder:"Driver name",code:"Code",codePlaceholder:"Alphanumeric code"},sm:{label:"SMS Destinations",desc:"Phone numbers for SMS notifications (up to 5 destinations).",phone:"Phone number",phonePlaceholder:"+5491122334455"},cid:{label:"Caller ID",desc:"Voice call reception. Detects incoming caller ID and auto-answers based on mode. Use % as wildcard for any number. Trigger: CID00+",mode:"Mode",mode0:"Detect only (no answer)",mode1:"Auto-answer (microphone)",mode2:"Auto-answer (microphone + speaker)",cidString:"Number",cidPlaceholder:"+5491122334455 or % for all"},mc:{label:"Country (MCC)",desc:"Country the modem is operating in, by Mobile Country Code. The MC00 signal is active while the network MCC matches the slot: useful for roaming rules (border crossing). E.g. 722 Argentina, 724 Brazil, 730 Chile, 736 Bolivia, 744 Paraguay, 748 Uruguay. Trigger: MC00+",mcc:"MCC",country:"Country",placeholder:"Search country or type MCC"},cxtr:{label:"UART Ports",desc:"Main serial port speed, the same port used to configure the device: when it is sent, the configurator reopens the port at the new speed and confirms it. 38400 and 57600 require firmware 1.09.28.T40. Does not apply to the ZERO (native USB)."},tk:{label:"Tilt",desc:"Rollover/tilt detection by accelerometer. Trigger: TK+",mode:"Mode",stabTime:"Stabiliz.",detectTime:"Detection",angle:"Angle"},cxcan:{desc:"Vehicle CAN bus configuration.",protocol:"Protocol",speed:"Speed",format:"Format",engine:"Engine",gasoline:"Gasoline"},cxow:{desc:"OneWire bus for iButton and Dallas temperature sensors. Spider and Smart only.",noReset:"No reset",every10s:"Every 10s",every20s:"Every 20s",every30s:"Every 30s",useAsKey:"Temperature sensor as key",key:"Key",tempMode:"Temperature sensors",modeTemp:"Temperature only",modeKey:"As key",modeAuto:"Auto-assign DT (TH/TL)",auto:"Auto DT",invKey:"Key code",invNo:"As read by the device (family first)",invYes:"As engraved on the key (reversed)",invShort:"Reversed"},dt:{desc:"Dallas DS18B20 temperature sensors on OneWire bus. Read with OW(n) or MDT(n,f) in expressions.",romPlaceholder:"16 hex characters (e.g.: 28FF1234567890AB)"},gc:{label:"Gradual Cut",desc:"Gradual engine cut: activates an output with pulses that progressively lengthen until fixed.",output:"Output (XP)",step:"Step",interval:"Interval",max:"Maximum",invert:"Invert",inverted:"inverted",normal:"normal"},cxac:{label:"Accelerometer",desc:"Accelerometer threshold for motion detection. 0=disabled.",threshold:"Threshold"},cxain:{header:"Calibration curves (CXAIN)",intro:"Converts the raw voltage of each analog input into sensor units (liters, %, \xB0C\u2026) using 2 points. This only affects the conversion: to generate signals/events use the Analog (AR) module.",labelField:"Label",labelPlaceholder:"fuel sensor, temperature, etc.",unit:"Unit",calibration:"Calibration",whenReads:"When it reads",shows:"\u2192 show",linearHint:"A straight line is interpolated between both points.",advanced:"Advanced: output limits",clampHint:"Clips the output so it never goes beyond these values even if the curve extrapolates out of range.",neverBelow:"Never below",neverAbove:"Never above",autoClamp:"Auto",preview:"Preview",testVoltage:"Test voltage",applyPreset:"Apply preset",choosePreset:"Choose preset\u2026",notConfigured:"not configured",errors:{sameVoltage:"The two voltages cannot be equal."}},cxecu:{desc:"Custom CAN bus PID configuration. Define how to parse each vehicle signal.",idx:{"1":"Throttle %","2":"Fuel %","3":"Total odometer","4":"Total liters","5":"Speed","6":"Engine temp","7":"Oil pressure","10":"Engine hours","12":"Fuel rate","15":"Wheel speed","17":"Engine load %","18":"Engine runtime","19":"Dist. w/MIL","20":"Custom liters","22":"Parking brake","23":"Brake pedal","24":"Custom throttle %","25":"Driver door","26":"Passenger door","27":"Clutch pedal","28":"Turbo pressure"},startBit:"Start bit",bitLength:"Length",min:"Minimum",max:"Maximum",sign:"Sign"},pk:{desc:"Dynamic geofence. Activated with SPKA, fires as PK00+",radius:"Radius",debounce:"Confirm."},cxbth:{desc:"General Bluetooth module configuration (BLE/NimBLE). PIN allows authenticating SPP connections.",power:"Power",name:"Name",namePlaceholder:"BT device name (up to 16 chars)",pinPlaceholder:"Empty or 4 digits (e.g.: 1234)",noPin:"no PIN",timeout:"Login timeout",noLimit:"no limit"},be:{desc:"BLE beacon detection by ID. Trigger: BE00+",idPlaceholder:"16 hex characters (8 bytes)",distance:"Distance"},bs:{label:"BLE Sensors",desc:"BLE sensors (Escort, MOKO, Teltonika, Technoton) by MAC/ID. Temperature, humidity, fuel level, distance reading, etc. Trigger: BS00+",idPlaceholder:"MAC or sensor ID",sensorType:"Sensor type",type:{auto:"Automatic"},maxDist:"Max distance"},bsw:{desc:"BLE wildcard capture: detects devices by UUID/Major/Minor with filters. Trigger: BSW00+",independent:"Independent",independentHint:"Does not inject into BS sensors, only emits BSW/BSWN events",allBs:"All BS",allBsHint:"Injects the detected MAC into every configured BS sensor",noBsConfigured:"No BS sensors configured",filterUuid:"Filter UUID",uuidPlaceholder:"32 hex or empty for all",filterMajor:"Filter Major",filterMinor:"Filter Minor",noFilterPlaceholder:"No filter (any)",any:"any",maxDist:"Max distance"},common:{noLimit:"no limit"}},ucBuilder:{presets:"Presets",insert:"Insert",fullTemplates:"Full templates",inserts:"Inserts",systemVars:"System variables",indexedFunctions:"Indexed functions",ruleActionHint:"To use in a rule, add action ",ruleActionHintSuffix:"where XX = event number.",cat:{wialon:"Wialon",fields:"Fields",operators:"Operators",power:"Power",gps:"GPS",odometer:"Odometer",status:"Status",report:"Report",io:"I/O",modules:"Modules",sensors:"Sensors",geo:"Geo",can:"CAN / Multi-field"},snippet:{wialonBase:"Base Wialon report (QWD0)",paramInt:"Integer parameter for Wialon",paramFloat:"Float parameter for Wialon",paramText:"Text parameter for Wialon",reportNumber:"Report number",gpsFullPos:"Full GPS position (QCQ)",ioFull:"Full I/O status (QIO)",bufferXB00:"Capture buffer XB00",counterNT00:"Counter NT00 value",splitQIO:"QIO split by delimiter",cmdQuotes:"Quoted command with arguments",concatComma:"Concatenate with comma separator",concatNoSep:"Concatenate without separator",textLiteral:"Literal text",slotHex:"Current slot in hex",addWialonParam:"Add Wialon parameter"},eval:{mainVoltage:"Main battery voltage (cV)",backupVoltage:"Backup battery voltage (cV)",speed:"GPS speed (km/h)",latitude:"Latitude",longitude:"Longitude",heading:"Heading (degrees)",altitude:"Altitude (m)",gpsAge:"GPS fix age (sec)",gpsOn:"GPS active (0/1)",totalOdometer:"Total odometer (m)",partialOdometer:"Partial odometer (m)",ignition:"Ignition (0/1)",cellSignal:"Cellular signal quality",parkingActive:"Parking active (0/1)",accelActive:"Accelerometer active (0/1)",reportNumber:"Report number",internalTimestamp:"Internal timestamp"},evalFn:{digitalInput:"Digital input n (0/1)",extOutput:"External output n (0/1)",analogInput:"Analog input n (cV)",triggerUV:"Trigger UV n (0/1)",userFlag:"User flag n (0/1)",counter:"Counter NT n value",timer:"Timer TD n state",speed:"Speed VL n state",analog:"Analog AR n state",angle:"Heading DC n state",ruleState:"Rule RL n state",dallasTemp:"Dallas temperature n (c\xB0C)",bleSensor:"BLE sensor n value",bleWildcard:"BLE wildcard n value",bufferXB:"Capture buffer XB n",circularGeofence:"Circular geofence WP n (0/1)",polygonGeofence:"Polygonal geofence RG n (0/1)",canEcu:"CAN ECU parameter (index, property)",bleSensorField:"BLE sensor field (index, field)",dallasField:"Dallas sensor field (index, field)",counterField:"Counter field (index, field)"},preset:{wialonBasic:"Wialon basic",wialonBasicDesc:"Voltage, odometer, signal and ignition",wialonRNU:"Wialon + report number",wialonRNUDesc:"QWD0 base + report number + extra params",wialonCAN:"Wialon + CAN",wialonCANDesc:"Voltage, odometer, RPM, engine temp, fuel",wialonCANFull:"Wialon + full CAN",wialonCANFullDesc:"Full ER report: RPM, throttle, fuel, speed, engine (cN = ECU index)",wialonDallas:"Wialon + Dallas",wialonDallasDesc:"Voltage, odometer, 2 temperature sensors",wialonBLE:"Wialon + BLE",wialonBLEDesc:"Voltage, BLE sensor temperature and humidity",traccar:"Traccar",traccarDesc:"Wialon IPS with Traccar names: voltage, odometer (m), signal, ignition and event code",traccarCAN:"Traccar + CAN",traccarCANDesc:"Traccar with RPM, fuel %, engine temp, engine hours (ms) and fuel used",rcqCounters:"RCQ + Counters",rcqCountersDesc:"Full position + 2 counter values",multiBuffer:"Multi-buffer",multiBufferDesc:"Position + multiple XB buffer fields",ucGrouper:"UC Grouper",ucGrouperDesc:"Combines multiple UC templates into one"},validate:{title:"Validation",valid:"Valid expression",errorCount:"{{count}} error",errorCount_other:"{{count}} errors",warnCount:"{{count}} warning",warnCount_other:"{{count}} warnings",autofixComma:"Fix commas \u2192 ;",tooLong:"Template exceeds {{max}} characters ({{n}})",unbalancedQuotes:"Unclosed single quote '",tooManyTokens:"Too many '...' expressions: {{n}} (max {{max}}), the rest are ignored",exprTooLong:"Expression exceeds {{max}} characters: '{{expr}}'",commaInExpr:"Comma inside '...': use ';' as separator \u2192 '{{expr}}'",unbalancedParens:"Unbalanced parentheses: '{{expr}}'",unknownToken:"Unknown EVAL token: '{{token}}'",noArgsExpected:"'{{token}}' takes no arguments",argsExpected:"'{{token}}' requires {{arity}} argument(s)",wrongArity:"'{{token}}' expects {{arity}} argument(s), got {{got}}"}},uvBuilder:{emptyRange:"Never triggers: the device fires on MIN \u2264 value < MAX, and MIN ({{min}}) is not less than MAX ({{max}}).",emptyRangeExact:"Never triggers: the maximum is not included. To fire on exactly {{min}}, set MAX = {{exact}}.",expression:"Expression",examples:"Examples",type:"Type",length:"Length",time:"Time",min:"Min",max:"Max",sec:"sec",text:"text",fixedWidth:"fixed width",fieldN:"field",rawPlaceholder:"e.g.: QIO,7,1,1,2",apply:"Apply",other:"Other",splitByDelimiter:"Split by delimiter",removeSplit:"Remove split",splitDescription:"Splits the response by a delimiter character and selects a specific field (base 0).",splitPreview:"split by '{{char}}', field {{field}}",delim:{label:"Delim",semicolon:"Semicolon ;",comma:"Comma ,",asterisk:"Asterisk *",pipe:"Pipe |",equals:"Equals =",space:"Space"},fieldLabel:"Field",fieldsOf:"Fields of",conv:{signed:"Signed integer",unsigned:"Unsigned integer",float:"Floating point",hexBE:"Hexadecimal (Big Endian)",hexLE:"Hexadecimal (Little Endian)",ascii:"ASCII text match",delta:"Delta (change detection)"},cmd:{qio:"Full I/O status",qcq:"Compact position report",qcel:"Cellular module status",qxb00:"Capture buffer XB00",qxb02:"Capture buffer XB02",qxb04:"Capture buffer XB04",qnt:"Counter value",qodo:"Odometer (total + partial)",qssu:"User flag state",qbs:"BLE sensor status",qbsw:"BLE wildcard status"},field:{ignition:"Ignition (0/1)",digitalInputs:"Digital inputs (7 bits)",outputs3bit:"Outputs (3 bits)",voltage:"Main voltage (cV)",backupBattery:"Backup battery (cV)",reportNum:"Report number",date:"Date (DDMMYY)",time:"Time (HHMMSS)",latitude:"Latitude (\xB17 digits)",longitude:"Longitude (\xB18 digits)",speedKmh:"Speed (km/h)",heading:"Heading (degrees)",inputsHex:"Inputs (hex)",outputsHex:"Outputs (hex)",voltageDiv10:"Voltage /10 (V)",odometerHex:"Odometer (hex, meters)",gpsPower:"GPS power (0/1)",fix:"Fix type (0-3)",satellites:"Satellites",index:"Index",maxValue:"Maximum value",currentValue:"Current value",totalOdometer:"Total odometer (m)",partialOdometer:"Partial odometer (m)",flagIndex:"Flag index",state:"State (00/11)",headerIndex:"Header + index",sensorId:"Sensor ID/MAC",sensorType:"Sensor type",distance:"Distance",outputValue:"Output value",headerStatus:"Header + status",filterUUID:"Filter UUID",filterMajor:"Filter Major",filterMinor:"Filter Minor",timeoutSec:"Timeout (sec)",maxDistance:"Max distance"},note:{xb00:"Content depends on CXXB00 configuration (serial, GPS, modem, etc.)",xb02:"Content depends on CXXB02 configuration",xb04:"Content depends on CXXB04 configuration",qbs:"Output fields depend on the sensor type configured. Use split to access specific values.",qbsw:"Shows wildcard configuration and detected device info."},example:{xb00Split:"Common: split by semicolon",xb02Split:"Common: split by comma",xb04Ascii:"ASCII text match"},triggers:"Triggers",when:"when",changes:"changes",orLess:"or less",orMore:"or more",in:"in",by:"by",of:"of",and:"and",preset:{ignByPos:"IGN by position",ignByPosDesc:"Ignition state from QIO fixed position",ignBySplit:"IGN by split",ignBySplitDesc:"Ignition from QIO split by semicolon, field 1",digitalInputSplit:"Digital input split",digitalInputSplitDesc:"Input from QIO split by semicolon, field 2",speedQCQ:"Speed (QCQ)",speedQCQDesc:"Speed from compact position report",satellitesQCQ:"Satellites (QCQ)",satellitesQCQDesc:"Satellite count from QCQ, triggers when \u22644",fixModeQCQ:"Fix mode (QCQ)",fixModeQCQDesc:"GPS fix type from QCQ, triggers on 3D fix",bufferXB00:"Buffer XB00",bufferXB00Desc:"First character of capture buffer XB00",xb00SplitFloat:"XB00 split float",xb00SplitFloatDesc:"Float value from XB00, split by semicolon, field 1",gpsAntennaOk:"GPS antenna OK",gpsAntennaOkDesc:"Matches 'OK' in XB04 GPS antenna status",gpsAntennaOpen:"GPS antenna OPEN",gpsAntennaOpenDesc:"Matches 'OPEN' in XB04 GPS antenna status",gpsAntennaShort:"GPS antenna SHORT",gpsAntennaShortDesc:"Matches 'SHORT' in XB04 GPS antenna status",hardBrake:"Hard brake",hardBrakeDesc:"Speed delta -20 km/h in 5 sec",hardAccel:"Hard acceleration",hardAccelDesc:"Speed delta +20 km/h in 5 sec",suddenChangeXB:"Sudden change XB",suddenChangeXBDesc:"Delta \xB110 in XB00 split value over 30 sec window"}},fwCompat:{title:"Firmware compatibility",intro:"The connected device ({{deviceFw}}) does not support everything configured:",ignVbatTh:"Manual ignition thresholds by voltage",apModeCli:"WiFi AP in client mode",blackBox:"Black box (CXBB)",owAutoDt:"DT auto-assignment by TH/TL",drv:"Driver (DRV)",drvHab:"Driver: enable output (H cut)",drvTaco:"Driver: tachograph source",drvCorte:"Driver: window, warning and cut",drvRpt:"Driver: automatic reports and confirmation",drvBle:"Bluetooth driver (DRVB)",owInvKey:"Reversed key code (CXOW)",uartBaud3857:"Serial port at 38400 or 57600 bps",zones:"Zones (mass geofence catalog, ZNA/ZNB)",requires:"requires v{{minFw}}",willSkip:"Will not be sent",willDowngrade:"Will be sent downgraded",logSkipped:"FW: {{label}} skipped \u2014 requires v{{minFw}}, device {{deviceFw}}",logDowngraded:"FW: {{label}} downgraded \u2014 requires v{{minFw}}, device {{deviceFw}}",continue:"Continue without these commands",cancel:"Cancel"},assistantUi:{title:"Assistant",open:"Open the assistant (drag it to move it)",close:"Close (the conversation is kept)",intro:"Configuration assistant.",sessionExpired:"Your session expired. Please sign in again.",login:"Sign in",privacy:"The configuration and device status are sent to an external AI service, with credentials masked and without the vehicle position. Conversations are stored to improve the assistant. Review what it proposes before applying or sending it: use is the user's responsibility.",logout:"Sign out",clearChat:"Clear chat",clearChatTitle:"Clear the conversation",clearAsk:"Clear the conversation?",clear:"Clear",no:"No",usageTitle:"Conversation: {{pct}} % of the maximum ({{n}} messages)",usageFull:"The conversation is full. Clear the chat to continue (the configuration is not touched).",usageWarn:"The conversation is at {{pct}} %. When it fills up you will have to clear the chat to continue.",writing:"writing\u2026",thinking:"thinking\u2026",placeholder:"What does this config do?",send:"Send",goTo:"click to go",cmdInvalid:"As written, the configurator does not accept it: {{motivo}}",sendTitle:"The assistant wants to send to the device",sendYes:"Send to device",sendPhysical:"This activates a physical output of the device. If it is wired to an engine cut-off, a siren or a lock, it will act now.",noChanges:"No changes to the configuration.",whatChanges:"What changes",pending:"Still pending",modeNotice:"When applied, the configuration switches to Advanced mode, the same as importing from Code.",viewCommands:"View the commands",apply:"Apply",applied:"Applied. Tap any change to see where it landed.",description:"Configuration description",discard:"Discard",models:"Configuration models: {{despues}} (before: {{antes}})",unspecified:"unspecified",nameOf:"Name of",before:"before",sugTitle:"Try",sugThis:"What does the thing I have selected do?",sugStatus:"How is the device doing?",sugCompare:"Compare what the device has with this configuration",sugExplain:"Explain this configuration to me",sugCheck:"What is this configuration missing to work?",sugSpeed:"Set up an overspeed warning with a buzzer",sugWialon:"I want to report through Wialon",sugInputs:"Report when a door opens or the panic button is pressed"}};var _p={language:{es:"Espa\xF1ol",en:"English",pt:"Portugu\xEAs"},nav:{general:"Geral",comm:"Comunica\xE7\xE3o",wifi:"WiFi",webserver:"Web Server (WS)",cellular:"Celular",country:"Pa\xEDs (MCC)",gps:"GPS",config:"Configura\xE7\xE3o",waypoints:"Waypoints",regions:"Regi\xF5es",io:"I/O",inputs:"Entradas",outputs:"Sa\xEDdas",analogCalibration:"Anal\xF3gicas",canbus:"CAN bus",customCan:"Custom CAN",onewire:"One Wire",tempSensors:"Sensores de temperatura",bluetooth:"Bluetooth",ibeacon:"iBeacon",bleSensors:"Sensores BLE",smartWildcard:"Smart Wildcard",accel:"Aceler\xF4metro",modules:"M\xF3dulos",all:"Todos",timers:"Timers (TD)",schedule:"Hor\xE1rios (TR)",counters:"Contadores (NT)",heading:"Heading (DC)",speed:"Velocidade (VL)",acceleration:"Acelera\xE7\xE3o (DV)",maneuvers:"Manobras (HM)",vectors:"Vetores (MVT)",tilt:"Inclina\xE7\xE3o (TK)",analog:"Anal\xF3gicos (AR)",parking:"Parking (PK)",triggers:"Disparadores (UV)",flags:"Flags (U)",capture:"Capturador (CXXB)",blackBox:"Caixa preta (CXBB)",reports:"Relat\xF3rios (UC)",driverDrv:"Motorista (DRV)",driverManager:"Driver Manager (IC)",rules:"Regras (RL)",events:"Eventos",periodic:"Peri\xF3dicos",driving:"Condu\xE7\xE3o",speedEntry:"Velocidade",ioEvents:"Eventos I/O",battery:"Bateria",parkingEntry:"Parking",custom:"Personalizadas"},pages:{general:{title:"Geral",desc:"Compatibilidade de modelos, descri\xE7\xE3o e etiqueta do dispositivo"},comm:{title:"Comunica\xE7\xE3o",desc:"Servidores de destino e protocolo IP"},cellular:{title:"Celular",desc:"Configura\xE7\xE3o da operadora celular e APN"},gps_config:{title:"Configura\xE7\xE3o GPS",desc:"Modo GPS e filtros de qualidade de sinal"},gps_waypoints:{title:"Waypoints",desc:"Geocercas circulares (WP00-WP31): ponto central + raio"},gps_regions:{title:"Regi\xF5es",desc:"Geocercas poligonais (RG00-RG31): at\xE9 32 v\xE9rtices"},rules_periodic:{title:"Peri\xF3dicos",desc:"Relat\xF3rios peri\xF3dicos por tempo"},rules_driving:{title:"Condu\xE7\xE3o",desc:"Eventos de condu\xE7\xE3o e mudan\xE7a de estado"},rules_io:{title:"Entradas digitais",desc:"Eventos por mudan\xE7a de estado nas entradas"},rules_speed:{title:"Velocidade",desc:"Controle de velocidade com alerta sonoro (Buzzer)"},rules_battery:{title:"Bateria",desc:"Monitoramento de tens\xE3o do ve\xEDculo com alertas autom\xE1ticos por n\xEDvel"},rules_parking:{title:"Parking",desc:"Geocerca de parking para detectar reboque ou movimento n\xE3o autorizado"},rules_custom:{title:"Personalizadas",desc:"Regras avan\xE7adas com qualquer sinal do dispositivo"},tpl_all:{title:"Todos os m\xF3dulos",desc:"Vista unificada de todos os recursos configurados"},tpl_timers:{title:"Timers (TD)",desc:"Temporizadores do dispositivo (TD00-TD31)"},tpl_heading:{title:"Headings (DC)",desc:"Mudan\xE7a de dire\xE7\xE3o GPS (DC00-DC02)"},tpl_speed:{title:"Velocidade (VL)",desc:"Limiares de velocidade (VL00-VL15)"},tpl_dv:{title:"Acelera\xE7\xE3o (DV)",desc:"Frenagem e acelera\xE7\xE3o brusca por GPS (DV00-DV03)"},tpl_hm:{title:"Manobras (HM)",desc:"Detec\xE7\xE3o de manobras bruscas (HM00-HM07)"},tpl_ar:{title:"Anal\xF3gicos (AR)",desc:"Faixas anal\xF3gicas de tens\xE3o (AR00-AR11)"},tpl_uv:{title:"Disparadores (UV)",desc:"Vari\xE1veis de usu\xE1rio com express\xF5es (UV00-UV47)"},tpl_u:{title:"Flags (U)",desc:"Flags booleanos SET/CLR (U00-U63)"},tpl_nt:{title:"Contadores (NT)",desc:"Contadores com valor m\xE1ximo configur\xE1vel (NT00-NT31)"},tpl_uc:{title:"Relat\xF3rios (UC)",desc:"F\xF3rmulas de c\xE1lculo do usu\xE1rio (UC00-UC15)"},tpl_tr:{title:"Hor\xE1rios (TR)",desc:"Regras por hor\xE1rio (TR00-TR07)"},tpl_mvt:{title:"Vetores (MVT)",desc:"Vetores de movimento por aceler\xF4metro"},tpl_xb:{title:"Capturador (CXXB)",desc:"Capturador serial externo (CXXB00-CXXB07)"},tpl_bb:{title:"Caixa preta (CXBB)",desc:"Rajada de relat\xF3rios antes e depois de um evento"},tpl_drv:{title:"Motorista (DRV)",desc:"De onde vem o motorista do equipamento, quando \xE9 exigido e o que acontece se n\xE3o se identificar"},tpl_ic:{title:"Driver Manager (IC)",desc:"Gest\xE3o de motoristas por c\xF3digo alfanum\xE9rico"},voice:{title:"\xC1udio / Voz",desc:"Configura\xE7\xE3o de chamadas de voz (apenas Smart)",preamp:"Ganho mic",spk:"Ganho alto-falante",hint:"Timeout: dura\xE7\xE3o m\xE1xima da chamada. Os Caller ID (CID) definem quais n\xFAmeros auto-atendem e com qual modo de \xE1udio."},rf:{title:"RF (SubGHz)",desc:"M\xF3dulo de r\xE1dio SubGHz",toggle:"Habilitar m\xF3dulo RF (SubGHz)"},sms_whitelist:{title:"SMS Whitelist",desc:"Aceita apenas comandos SMS dos numeros configurados em Destinos SMS",toggle:"Aceitar apenas comandos SMS de numeros na lista de destinos"},tpl_sm:{title:"Destinos SMS (SM)",desc:"N\xFAmeros de telefone para notifica\xE7\xF5es SMS"},tpl_cid:{title:"Caller ID (CID)",desc:"Entradas de Caller ID / ICCID"},tpl_mc:{title:"Pa\xEDs (MCC)",desc:"Pa\xEDses monitorados por Mobile Country Code"},tpl_cxtr:{title:"Portas UART (CXTR)",desc:"Configura\xE7\xE3o de baudrate por porta serial"},tpl_pk:{title:"Parking (PK)",desc:"Geocerca din\xE2mica de parking"},tpl_tk:{title:"Inclina\xE7\xE3o (TK)",desc:"Detec\xE7\xE3o de capotamento e inclina\xE7\xE3o"},tpl_rules:{title:"Regras (RL)",desc:"Regras do motor de eventos do dispositivo"},inputs:{title:"Entradas",desc:"Debounce de entradas digitais e igni\xE7\xE3o"},outputs:{title:"Sa\xEDdas",desc:"Sa\xEDdas digitais e corte gradual"},analogCalibration:{title:"Calibra\xE7\xE3o de anal\xF3gicas",desc:"Curvas de transforma\xE7\xE3o CXAIN para entradas anal\xF3gicas (AIN0, AIN1, AIN2, AIN7)"},canbus_config:{title:"CAN bus",desc:"Configura\xE7\xE3o do barramento CAN do ve\xEDculo"},canbus_custom:{title:"Custom CAN",desc:"Configura\xE7\xE3o custom de PIDs CAN bus"},onewire_config:{title:"One Wire",desc:"Barramento OneWire para iButton e sensores de temperatura Dallas"},onewire_dt:{title:"Sensores de temperatura",desc:"Sensores de temperatura Dallas DS18B20 no barramento OneWire"},bluetooth_config:{title:"Bluetooth",desc:"Configura\xE7\xE3o geral do m\xF3dulo Bluetooth"},bluetooth_beacons:{title:"iBeacon",desc:"Beacons BLE por UUID/MAC"},bluetooth_sensors:{title:"Sensores BLE",desc:"Sensores BLE (Escort, MOKO, etc.) por MAC/ID"},bluetooth_wildcard:{title:"Smart Wildcard",desc:"Captura BLE wildcard por UUID/Major/Minor"},accel:{title:"Aceler\xF4metro",desc:"Limiar de detec\xE7\xE3o de movimento do aceler\xF4metro"},wifi:{title:"WiFi",desc:"Redes WiFi, modo AP e esta\xE7\xE3o"},webserver:{title:"Web Server",desc:"Servidor web embarcado com bot\xF5es e console"},summary:{title:"Resumo",desc:"Resumo leg\xEDvel de toda a configura\xE7\xE3o"}},common:{enabled:"Habilitado",disabled:"Desabilitado",notConfigured:"N\xE3o configurado",on:"ON",off:"OFF",yes:"Sim",no:"N\xE3o",cancel:"Cancelar",confirm:"Confirmar",close:"Fechar",accept:"Aceitar",send:"Enviar",read:"Ler",done:"Pronto",delete:"Excluir",deleteConfirm:"Excluir?",save:"Salvar",search:"Buscar",searchPlaceholder:"Buscar...",copy:"Copiar",copied:"Copiado",edit:"Editar",import:"Importar",export:"Exportar",name:"Nome",index:"\xCDndice",noResults:"Sem resultados",clear:"Limpar",active:"Ativo",inactive:"Inativo",loading:"Carregando...",error:"Erro",advanced:"Avan\xE7ado",basic:"B\xE1sico",mode:"Modo",type:"Tipo",interval:"Intervalo",angle:"\xC2ngulo",speed:"Velocidade",key:"Chave",addToken:"+ Adicionar {{token}}",presets:"Perfis predefinidos",sec:"seg",min:"min",hmAccelGps:"Acel GPS",hmBrakeGps:"Fren GPS",hmTurnLeft:"Curva esq",hmTurnRight:"Curva dir",hmCentripetal:"Centr\xEDpeta",hmLatImpact:"Imp.lat",hmAccelImu:"Acel IMU",hmBrakeImu:"Fren IMU"},connection:{connect:"Conectar",disconnect:"Desconectar",connecting:"Conectando...",verifying:"Verificando dispositivo...",openingPort:"Abrindo porta serial",waitingDevice:"Aguardando resposta do equipamento",detectingBaud:"Procurando a velocidade da porta serial do equipamento",noPortSelected:"Nenhuma porta selecionada",authFailed:"N\xE3o foi poss\xEDvel autenticar com o dispositivo",browserNotSupported:"Navegador n\xE3o compat\xEDvel",browserRequirement:"Requer Chrome, Edge ou Opera com Web Serial API.",connectionError:"Erro de conex\xE3o",modelMismatch:"O dispositivo conectado \xE9 um {{model}}, mas a configura\xE7\xE3o n\xE3o o inclui como destino."},login:{title:"Login necess\xE1rio",description:"O dispositivo n\xE3o responde. Digite a senha para autenticar.",passwordPlaceholder:"Senha do dispositivo",invalidPassword:"Login inv\xE1lido. Verifique a senha e tente novamente.",rememberPassword:"Lembrar senha",authenticating:"Autenticando..."},sendDialog:{title:"Enviar configura\xE7\xE3o",warningRules:"Todas as regras existentes no dispositivo ser\xE3o exclu\xEDdas e substitu\xEDdas pela nova configura\xE7\xE3o.",confirmAction:"Esta a\xE7\xE3o n\xE3o pode ser desfeita. Continuar?",sendAnyway:"Enviar mesmo assim",cancelWrite:"Cancelar escrita",sendConfirm:"Enviar?",sendToDevice:"Enviar ao dispositivo",ackFailed:"Falharam {{failed}}/{{total}}",ackFailedTitle:"Sem confirma\xE7\xE3o do dispositivo",sending:"Enviando Configura\xE7\xE3o...",sendComplete:"Envio Conclu\xEDdo",of:"de",successful:"bem-sucedidos",failed:"falharam"},readDialog:{cancelRead:"Cancelar leitura",readConfirm:"Ler?",readParams:"Ler {{count}} par\xE2metros do dispositivo",readDevice:"Ler do dispositivo",generalConfig:"Configura\xE7\xE3o geral",allConfig:"Comunica\xE7\xE3o, GPS, I/O, WiFi, BLE, m\xF3dulos, CAN, regras",waypointsRegions:"Waypoints e Regi\xF5es",waypointsDesc:"32 geocercas circulares + 32 poligonais",additionalQueries:"queries adicionais",replaceWarning:"A configura\xE7\xE3o atual ser\xE1 substitu\xEDda pelos dados do dispositivo.",readCancelled:"Leitura cancelada",reading:"Lendo configura\xE7\xE3o...",readComplete:"Leitura conclu\xEDda",queries:"queries",responses:"respostas",importSuccess:"Configura\xE7\xE3o importada com sucesso.",cancelledNoChanges:"Leitura cancelada. Nenhuma altera\xE7\xE3o aplicada."},sendBar:{newConfig:"Novo / Redefinir configura\xE7\xE3o",saveCtrlS:"Salvar (Ctrl+S)",noChanges:"Sem altera\xE7\xF5es",discardChanges:"Descartar altera\xE7\xF5es",eventTable:"Tabela de eventos",exportConfig:"Exportar configura\xE7\xE3o",importConfig:"Importar configura\xE7\xE3o",readingConfig:"Lendo configura\xE7\xE3o...",readConfig:"Ler configura\xE7\xE3o do dispositivo",goToGeneral:"Ir para Geral",validate:"Validar",valid:"\u2713 V\xE1lido",connectToSend:"Conectar para enviar",connectToSendHint:"Abre o seletor de porta USB",importConfirmTitle:"Importar configura\xE7\xE3o",importConfirmMsg:'A configura\xE7\xE3o atual ser\xE1 substitu\xEDda pelo conte\xFAdo do arquivo. Voc\xEA pode reverter com "Descartar altera\xE7\xF5es" enquanto n\xE3o salvar.',importReplace:"Substituir configura\xE7\xE3o",resetConfig:"Redefinir configura\xE7\xE3o",resetAdvancedMsg:"Todos os m\xF3dulos e regras ser\xE3o limpos. As configura\xE7\xF5es gerais padr\xE3o ser\xE3o mantidas.",resetBasicMsg:"A configura\xE7\xE3o padr\xE3o com regras padr\xE3o ser\xE1 restaurada.",reset:"Redefinir",importSuccess:"Importa\xE7\xE3o bem-sucedida",importError:"Erro ao importar",parsed:"analisados",omitted:"omitidos",omittedCommands:"comandos omitidos (exclus\xF5es em massa, power, etc.)",unrecognizedLine:"linha n\xE3o reconhecida",unrecognizedLines:"linhas n\xE3o reconhecidas",invalidJsonConfig:'O arquivo JSON n\xE3o cont\xE9m o campo "config"',noValidCommands:"Nenhum comando v\xE1lido encontrado (formato >CMD<)",serialRead:"Leitura serial",warnings:"Avisos ({{count}})",errors:"Erros ({{count}})",unknown:"desconhecido"},general:{tagLabel:"Etiqueta (TAG)",tagDesc:"Texto personalizado armazenado no dispositivo. \xDAtil para identificar unidades. Configurado com o comando >STAG<.",tagPlaceholder:"UNIDADE-001",changePassword:"Alterar Senha (PW)",passwordDesc:"Define uma nova senha no dispositivo. Ser\xE1 enviada no final da grava\xE7\xE3o com o comando >SPW<.",passwordPlaceholder:"Deixar vazio para n\xE3o alterar",compatibility:"Compatibilidade",compatibilityDesc:"Indique em quais modelos esta configura\xE7\xE3o ser\xE1 usada. O assistente limitar\xE1 as op\xE7\xF5es com base no m\xEDnimo de I/O dispon\xEDveis.",selectModel:"Selecione pelo menos um modelo.",modelNoWifiBt:"Sem WiFi/BT",configMode:"Modo de configura\xE7\xE3o",advancedDesc:"Todas as regras s\xE3o gerenciadas como regras personalizadas. Controle total sobre cada regra SRL.",basicDesc:"Os m\xF3dulos guiados simplificam a configura\xE7\xE3o. Cada m\xF3dulo gera suas regras automaticamente.",description:"Descri\xE7\xE3o",descriptionInfo:"Nota interna opcional. N\xE3o \xE9 enviada ao dispositivo: viaja no TXT como coment\xE1rio (@rinho desc) e \xE9 preservada ao importar/exportar. Dica: separe blocos com uma linha \u201C\u2014\u201D e comece-os com \u201CT\xCDTULO:\u201D em mai\xFAsculas para v\xEA-los como se\xE7\xF5es no Resumo.",descriptionPlaceholder:"Ex: Configura\xE7\xE3o para frota de caminh\xF5es \u2014 zona norte",descriptionExpand:"Maximizar",descriptionPreview:"Pr\xE9-visualiza\xE7\xE3o",switchToAdvanced:"Mudar para modo avan\xE7ado",switchToBasic:"Mudar para modo simples",switchAdvancedMsg:"Todas as regras dos m\xF3dulos (condu\xE7\xE3o, velocidade, bateria, parking) ser\xE3o convertidas em regras personalizadas edit\xE1veis. Os m\xF3dulos ser\xE3o desativados.",switchBasicMsg:"Os m\xF3dulos guiados vazios ser\xE3o restaurados (desativados). Esta a\xE7\xE3o requer que n\xE3o haja regras personalizadas.",cannotRevert_one:"N\xE3o \xE9 poss\xEDvel voltar ao modo simples porque h\xE1 {{count}} regra incompat\xEDvel com os m\xF3dulos guiados.",cannotRevert_other:"N\xE3o \xE9 poss\xEDvel voltar ao modo simples porque h\xE1 {{count}} regras incompat\xEDveis com os m\xF3dulos guiados.",newPassword:"Nova senha"},cellular:{enableModule:"Habilitar m\xF3dulo celular",operator:"Operadora (COPS)",operatorSelection:"Sele\xE7\xE3o de operadora",automatic:"Autom\xE1tico",manual:"Manual",registrationMode:"Modo de registro",manualFallback:"Manual + fallback auto",manualForced:"Manual for\xE7ado",technology:"Tecnologia (AcT)",techUnspecified:"N\xE3o especificado",techLTE:"LTE (Cat-M / NB-IoT)",techGSM:"GSM (2G)",techUTRAN:"UTRAN (3G)",techNBIoT:"NB-IoT",operatorCode:"C\xF3digo da operadora (MCC+MNC)",operatorCodePlaceholder:"ex: 72207",apn:"APN",apnName:"Nome do APN",apnPlaceholder:"ex: internet",apnClearDesc:"Envia o comando de APN vazio: apaga o APN guardado no equipamento e deixa o firmware detect\xE1-lo sozinho (firmware recente e Rinho PI). Em firmware antigo o celular pode n\xE3o conectar sem APN.",apnUser:"Usu\xE1rio APN",apnPassword:"Senha APN",optionalField:"(vazio se n\xE3o necess\xE1rio)",searchOperator:"Buscar operadora (COPS)",searchOperatorPlaceholder:"Buscar por operadora, pa\xEDs ou c\xF3digo...",searchApn:"Buscar APN",searchApnPlaceholder:"Buscar operadora...",noResults:"Sem resultados",smsWhitelist:"SMS Whitelist (wake)",rfEnabled:"M\xF3dulo RF",imeiHint:"Conecte o equipamento para ler o IMEI."},wifi:{title:"WiFi",enable:"Habilitar WiFi",networkInfo:"At\xE9 10 redes salvas (SAPW00\u2013SAPW09). O dispositivo se conecta \xE0 primeira dispon\xEDvel.",configured_one:"{{count}} configurada",configured_other:"{{count}} configuradas",networkName:"Nome da rede",password:"Senha",addNetwork:"Adicionar rede",notConfigured:"Sem configura\xE7\xE3o",network:"Rede",mode:"Modo WiFi",modeSta:"Esta\xE7\xE3o",modeApx:"AP Prim\xE1rio",modeApy:"AP Secund\xE1rio",modeStaDesc:"O dispositivo se conecta a uma rede WiFi existente como cliente.",modeApDesc:"O dispositivo cria sua pr\xF3pria rede WiFi \xE0 qual outros podem se conectar.",apDesc:"Configure o nome e a senha da rede WiFi que o dispositivo criar\xE1.",apPrimary:"Access Point prim\xE1rio",apSecondary:"Access Point secund\xE1rio",apSsidPlaceholder:"Nome do AP",apPassPlaceholder:"Senha do AP",apRequired:"SSID e senha s\xE3o obrigat\xF3rios para o modo selecionado",staNetworks:"Redes esta\xE7\xE3o",configured_one:"{{count}} configurada",configured_other:"{{count}} configuradas",ip:"Endere\xE7o IP",gateway:"Gateway",mask:"M\xE1scara de sub-rede",ipPlaceholder:"192.168.4.1",gatewayPlaceholder:"192.168.4.1",maskDefault:"255.255.255.0"},ws:{enable:"Habilitar Web Server",desc:"Servidor web embarcado acess\xEDvel pelo IP do dispositivo. No modo AP \xE9 mostrado automaticamente como portal cativo.",language:"Idioma",title:"T\xEDtulo",pin:"PIN",pinPlaceholder:"Sem PIN",showConsole:"Mostrar console de comandos",buttons:"Bot\xF5es",addButton:"Adicionar bot\xE3o",btnLabel:"Texto do bot\xE3o",btnTypeCommand:"Comando direto",btnTypeCode0:"Login num\xE9rico (CODE0)",btnTypeCode1:"Login alfanum\xE9rico (CODE1)",btnTypeXb:"Entrada din\xE2mica (XB)",command:"Comando",visible:"Vis\xEDvel",hidden:"Oculto",preview:"Pr\xE9-visualiza\xE7\xE3o",previewInput:"Digitar texto...",noButtons:"Nenhum bot\xE3o configurado",generatedCommand:"Comando gerado"},gps:{updateMode:"Modo de atualiza\xE7\xE3o GPS",minFix:"Fix m\xEDnimo",maxPdop:"PDOP m\xE1ximo",minSatellites:"Sat\xE9lites m\xEDn.",modeHeader:"Modo GPS (CXGPS)",modeDesc:"Define quando o dispositivo atualiza os dados de posi\xE7\xE3o GPS.",modeAlways:"Sempre (1s)",modeIgnOnly:"S\xF3 com IGN",modeSpeed:"Vel. > 5 km/h",qualityHeader:"Qualidade GPS (CXCQ)",qualityDesc:"Filtros de qualidade m\xEDnima para aceitar um relat\xF3rio GPS."},modules:{searchPlaceholder:"Buscar m\xF3dulo...",timing:"Temporiza\xE7\xE3o",drivingGroup:"Condu\xE7\xE3o",signals:"Sinais",logic:"L\xF3gica e processamento",identification:"Identifica\xE7\xE3o",communication:"Comunica\xE7\xE3o",ble:"Bluetooth",rulesEngine:"Motor de regras",noResults:'Sem resultados para "{{filter}}"'},resource:{disabled:"Desabilitado",notConfigured:"N\xE3o configurado",configure:"Configurar",deleteAll:"Excluir todos",addResource:"Adicionar",query:"Consulta:",inExpressions:"Em UV/UC:",value:"valor",age:"idade (ms)",permanent:"permanente",volatile:"vol\xE1til",expressionPlaceholder:"Express\xE3o...",wildcardTooltip:"Wildcard: dispara a cada hora/minuto/segundo",searchPlaceholder:"Buscar...",useThisValue:"usar este valor",noMatches:"Sem correspond\xEAncias"},canbus:{protocol:"Protocolo",speed:"Velocidade",format:"Formato",fuelTrip:"Fuel Trip (Soft)",engine:"Motor",gasoline:"Gasolina",diesel:"Diesel"},onewire:{resetVdd:"Reset VDD",noReset:"N\xE3o reiniciar",every10s:"A cada 10s",every20s:"A cada 20s",every30s:"A cada 30s",tempSensorAsKey:"Sensor de temperatura como chave",notAvailable:"OneWire n\xE3o dispon\xEDvel para o modelo selecionado.",busDescription:"Barramento OneWire para leitura de iButton e sensores de temperatura Dallas."},rules:{reportRules:"Regras de Relat\xF3rio",activeRules:"ativas",noActiveRules:"Sem regras ativas o dispositivo n\xE3o gerar\xE1 relat\xF3rios.",periodicIgnOn:"Peri\xF3dico com IGN",engineOn:"Motor ligado",periodicIgnOff:"Peri\xF3dico sem IGN",engineOff:"Motor desligado / parado",headingChange:"Mudan\xE7a de rumo",headingDesc:"Ao mudar dire\xE7\xE3o de viagem",ignition:"Igni\xE7\xE3o",ignitionDesc:"Ligar / desligar do ve\xEDculo",input:"Entrada",inputDesc:"Eventos por mudan\xE7a de estado",digitalOutputs:"Sa\xEDdas digitais",output:"Sa\xEDda",outputDesc:"Eventos por mudan\xE7a de estado",falseToTrue:"de falso para verdadeiro",trueToFalse:"de verdadeiro para falso",anyEdge:"qualquer borda",changes:"muda",datalogDesc:"DataLog: mem\xF3ria circular, o novo sobrescreve o antigo, sai o mais antigo primeiro (caixa preta)",bufferDesc:"Buffer: 2.728 posi\xE7\xF5es com prioridade de escrita H\u2192L\u2192M e sa\xEDda priorizada, ideal para alarmes",bufDescription:"2.728 posi\xE7\xF5es com prioridade de escrita (H\u2192L\u2192M) e sa\xEDda priorizada. Ideal para alarmes.",logDescription:"Mem\xF3ria circular de {{count}} registros. O mais novo sobrescreve o mais antigo, sai o mais antigo primeiro. Funciona como caixa preta.",rulesCount:"{{count}} regras"},actions:{report:"Gerar relat\xF3rio",output:"Ativar sa\xEDda (XP)",userVar:"Vari\xE1vel de usu\xE1rio (U)",timerReset:"A\xE7\xE3o de timer (TD)",parking:"Parking (SPKA/SPKD)",gpsMode:"Modo GPS (SCXGPS)",counter:"Contador (NT)",sleep:"Modo dorm\xEAncia (SKO)",gradualCut:"Corte Gradual (GC)",raw:"Comando raw",searchSignal:"Buscar sinal... (ex: IN05, GPS, timer)",negated:"Sinal negado \u2014 clique para remover NOT",negate:"Clique para negar (NOT)"},header:{config:"Config",status:"Estado",firmware:"Firmware",terminal:"Terminal"},monitor:{serialLog:"Log Serial",noActivity:"Sem atividade...",connectDevice:"Conecte um dispositivo para ver o estado ao vivo",title:"Monitor",querying:"Consultando...",latitude:"Latitude",longitude:"Longitude",speed:"Velocidade",heading:"Rumo",satellites:"Sat\xE9lites",fix:"Fix",batteryLabel:"Bateria",odometer:"Od\xF4metro",noGps:"Sem sinal GPS ({{sats}} sat\xE9lites)",waitingData:"Aguardando dados...",ssid:"SSID",signal:"Sinal",sendBuffer:"Buffer de Envio",gprsQueue:"Fila GPRS",smsQueue:"Fila SMS",datalog:"DataLog",totalRecords:"Registros totais",pending:"Pendentes"},status:{title:"Estado",summary:"Resumo",code:"C\xF3digo",assistant:"Assistente",backToStatus:"\u25C0 Estado",ignOn:"IGN ON",ignOff:"IGN OFF",wifiInactive:"Inativo",queue:"Fila",total:"Total",noFix:"Sem fix",lat:"Lat",lon:"Lon",vel:"Vel",sat:"Sat",date:"Data",gndNote:"0 = ao terra (GND)",noPosition:"Sem posi\xE7\xE3o",clearConfirm:"Esvaziar",clearBusy:"Ocupado",clearError:"Sem resposta",clearBufferHint:"Esvaziar a fila de envio pendente (>CBU<)",clearPendingHint:"Marcar os registros do log como enviados (>SDLC<). N\xE3o apaga o log."},ota:{title:"Atualizar Firmware (OTA)",successTitle:"Atualiza\xE7\xE3o bem-sucedida",noUpdateTitle:"Sem atualiza\xE7\xE3o",errorTitle:"Erro na atualiza\xE7\xE3o",successMsg:"O firmware foi instalado com sucesso. O dispositivo est\xE1 reiniciando.",noUpdateMsg:"O dispositivo j\xE1 possui uma vers\xE3o mais recente que a dispon\xEDvel no servidor. Nenhuma altera\xE7\xE3o foi feita.",errorMsg:"Verifique se o dispositivo est\xE1 conectado ao WiFi e tente novamente.",description:"Baixa e instala a \xFAltima vers\xE3o do firmware do servidor Rinho.",wifiConnected:"Conectado a",wifiNoConnection:"WiFi ativo mas sem conex\xE3o",wifiNotActive:"WiFi n\xE3o est\xE1 ativo no dispositivo",cellularLabel:"Celular",noWifi:"Este dispositivo n\xE3o tem WiFi. A atualiza\xE7\xE3o ser\xE1 feita por celular.",wifiWarning:"O dispositivo deve estar conectado ao WiFi. N\xE3o desconecte durante o processo (~2 min).",cellularWarning:"O m\xF3dulo celular ser\xE1 usado. Certifique-se de ter bom sinal e dados dispon\xEDveis. Pode ser mais lento que WiFi.",advancedOptions:"Op\xE7\xF5es avan\xE7adas",skipVersionCheck:"Sem verifica\xE7\xE3o de vers\xE3o",skipVersionDesc:"For\xE7a a instala\xE7\xE3o mesmo sendo a mesma vers\xE3o",firmwareUrl:"URL do firmware",customUrl:"URL personalizada",resetUrl:"Restaurar URL padr\xE3o",switchPartition:"Trocar parti\xE7\xE3o",switchPartitionDesc:"Alterna entre a vers\xE3o atual e a anterior (SFRMCP)",change:"Trocar",downloading:"Baixando firmware...",downloadOta:"Baixar .OTA",rebootCheck:{waiting:"Aguardando o dispositivo reiniciar para verificar a vers\xE3o. Ele se reconecta sozinho.",confirmed:"Verificado: o dispositivo iniciou com {{version}}.",sameBuild:"O dispositivo iniciou com o mesmo firmware que tinha: a atualiza\xE7\xE3o n\xE3o foi aplicada.",noResponse:"N\xE3o foi poss\xEDvel verificar: o dispositivo n\xE3o respondeu ap\xF3s reiniciar. Reconecte-o e confira a vers\xE3o.",booted:"O dispositivo iniciou com {{version}}.",sameBuildForced:"O dispositivo iniciou com a mesma build: o mesmo firmware foi reinstalado (atualiza\xE7\xE3o for\xE7ada).",sameBuildServer:"A mesma build foi reinstalada: o arquivo do servidor \xE9 a vers\xE3o que o dispositivo j\xE1 tinha."},downloadOtaBusy:"Baixando .OTA\u2026",downloadOtaError:"N\xE3o foi poss\xEDvel baixar o .OTA",configuring:"Configurando URL e aguardando resposta do dispositivo...",kbDownloaded:"KB baixados",updating:"Atualizando...",startUpdate:"Iniciar atualiza\xE7\xE3o",deviceLog:"Log do dispositivo",kbProcessed:"KB processados",firmwareVariant:"Variante de firmware",current:"atual",variantSwitchWarning:"Voce vai mudar de {{from}} para {{to}}. O dispositivo vai trocar de variante de firmware. Certifique-se de que e intencional.",cable:{method:"Por cabo",checking:"Verificando se o dispositivo aceita firmware por cabo...",sourceUrl:"Da URL",sourceFile:"Arquivo local",chooseFile:"Escolher arquivo .OTA",noFile:"Nenhum arquivo escolhido",urlLabel:"URL do firmware",urlFromDevice:"URL configurada no equipamento (IP2)",urlOfficial:"URL oficial do servidor Rinho",urlEdited:"URL digitada manualmente",useOfficialUrl:"Usar a URL oficial",compatible:"Compat\xEDvel: {{model}} {{flash}}",resumeInfo:"H\xE1 uma carga pela metade ({{pct}} %): continua de onde parou.",warning:"N\xE3o desconecte o cabo durante a carga. Leva ~3 min por cabo serial e ~1,5 min por USB.",start:"Instalar por cabo",cancel:"Cancelar carga",cancelConfirm:"Cancelar a carga?",retry:"Tentar novamente",reconnect:"Conectar",confirmProduct:"Confirmo que este arquivo corresponde a este dispositivo",otherChannel:"O dispositivo tem outra carga de firmware em andamento por outro canal (por exemplo celular). Se continuar, essa carga \xE9 descartada.",otherChannelContinue:"Descartar e continuar",progress:"{{done}} de {{total}} KB \xB7 {{kbps}} KB/s \xB7 faltam {{eta}}",phases:{downloading:"Baixando",preparing:"Preparando",sending:"Enviando",verifying:"Verificando",installing:"Instalando",confirming:"Confirmando"},confirming:"O dispositivo est\xE1 reiniciando. Confirmando a vers\xE3o nova... Se desconectou, conecte-o novamente.",confirmingAuto:"O dispositivo est\xE1 reiniciando. Ele se reconecta sozinho e confirma a vers\xE3o nova: n\xE3o \xE9 preciso fazer nada.",confirmedTitle:"Firmware instalado",confirmedMsg:"O dispositivo iniciou com {{version}}.",unconfirmedTitle:"N\xE3o foi poss\xEDvel confirmar a instala\xE7\xE3o",unconfirmed:{sameBuild:"O dispositivo iniciou com o mesmo firmware que tinha: a carga foi rejeitada ou era a mesma build.",noResponse:"O dispositivo n\xE3o respondeu ap\xF3s reiniciar. Reconecte-o e verifique a vers\xE3o."},cancelledTitle:"Carga cancelada",cancelledMsg:"O dispositivo continua com o firmware anterior.",errorTitle:"Erro na carga por cabo",reasons:{badName:"O nome do arquivo n\xE3o \xE9 um firmware Rinho (.OTA de SPIDERIOT, ZEROIOT ou AUDIOT).",empty:"O arquivo est\xE1 vazio.",tooLarge:"O arquivo \xE9 grande demais.",unknownDevice:"N\xE3o foi poss\xEDvel identificar o modelo do dispositivo. Reconecte e tente novamente.",modelMismatch:"Este firmware n\xE3o corresponde a este dispositivo (modelo ou mem\xF3ria diferentes).",variantSwitch:"Voc\xEA vai trocar de variante de firmware (WiFi para NimBLE ou o contr\xE1rio). Depois verifique >QBTH< e, se o Bluetooth n\xE3o funcionar, desligue o WiFi com >SCXWIF0,0,0<.",productUnverified:"N\xE3o \xE9 poss\xEDvel distinguir um Zero de um Audience: confirme que o arquivo \xE9 o correto.",productMismatch:"O dispositivo est\xE1 configurado para {{expected}} e voc\xEA est\xE1 carregando {{actual}}."},errors:{NOT_SUPPORTED:"O firmware do dispositivo n\xE3o aceita carga por cabo.",FILE_INVALID:"O arquivo n\xE3o \xE9 v\xE1lido.",DOWNLOAD_FAILED:"N\xE3o foi poss\xEDvel baixar o firmware.",BUSY:"O dispositivo est\xE1 fazendo outra atualiza\xE7\xE3o.",OPEN_FAILED:"O dispositivo n\xE3o conseguiu abrir a carga.",OTHER_CHANNEL_SESSION:"Cancelado para n\xE3o sobrescrever a carga em andamento por outro canal.",NO_RESPONSE:"O dispositivo n\xE3o responde.",TOO_MANY_ERRORS:"Erros de transmiss\xE3o demais.",FLASH_WRITE:"Erro ao gravar a mem\xF3ria do dispositivo.",SESSION_LOST:"A sess\xE3o de carga no dispositivo foi perdida.",HASH_FAILED:"O dispositivo n\xE3o conseguiu verificar o que foi gravado.",IMAGE_INVALID:"O dispositivo rejeitou a imagem (firmware de outro modelo ou chave?).",COMMIT_FAILED:"O dispositivo n\xE3o conseguiu instalar o firmware.",DISCONNECTED:"A conex\xE3o com o dispositivo foi perdida. Reconecte e toque em Tentar novamente: a carga continua de onde parou.",CANCELLED:"Carga cancelada."}}},activityLog:{title:"Log / Terminal",resumeLog:"Retomar log",pauseLog:"Pausar log",copyLog:"Copiar log",clearLog:"Limpar log",noActivity:"Sem atividade...",sendCommand:"Enviar comando..."},sendProgress:{sending:"Enviando Configura\xE7\xE3o...",complete:"Envio Conclu\xEDdo",abortedDisconnected:"Dispositivo desconectado: a configura\xE7\xE3o ficou incompleta ({{sent}} de {{total}} comandos confirmados). Reconecte e reenvie a configura\xE7\xE3o completa.",abortedNoResponse:"O dispositivo parou de responder: a configura\xE7\xE3o ficou incompleta ({{sent}} de {{total}} comandos confirmados). Verifique a conex\xE3o e reenvie a configura\xE7\xE3o completa.",of:"de",successful:"bem-sucedidos",failed:"falharam"},modeSwitch:{basic:"B\xE1sico",advanced:"Avan\xE7ado",switchToAdvanced:"Mudar para Avan\xE7ado",switchToBasic:"Mudar para B\xE1sico",advancedWarning:"As regras e m\xF3dulos ser\xE3o convertidos em regras personalizadas edit\xE1veis. Os recursos de hardware ser\xE3o migrados automaticamente.",classification_one:"Classifica\xE7\xE3o de {{count}} regra",classification_other:"Classifica\xE7\xE3o de {{count}} regras",fixedRules:"Regras fixas",speedModule:"M\xF3dulo velocidade",detected:"detectado",batteryModule:"M\xF3dulo bateria",parkingModule:"M\xF3dulo parking",classified:"Classificadas",lostRules_one:"{{count}} regra n\xE3o pode ser classificada e ser\xE1 perdida",lostRules_other:"{{count}} regras n\xE3o podem ser classificadas e ser\xE3o perdidas",andMore:"... e {{count}} mais",noBasicEquivalent:"M\xF3dulos sem equivalente no b\xE1sico:",allClassified:"Todas as regras e m\xF3dulos foram classificados corretamente.",switchLose:"Mudar ({{count}} ser\xE3o perdidas)",goToSummary:"Ir para Resumo"},configPanel:{server:"Servidor",commands:"Comandos",fixedRules:"Regras fixas",speed:"Velocidade",battery:"Bateria",parking:"Parking",waypoints:"Waypoints",regions:"Regi\xF5es",detectedModel:"Modelo detectado",importToAdvanced:"Importar c\xF3digo para Avan\xE7ado",importWarning:"A configura\xE7\xE3o atual ser\xE1 substitu\xEDda pelos comandos editados. O modo mudar\xE1 para Avan\xE7ado.",commandCount:"comandos"},changelog:{new:"Novo",change:"Altera\xE7\xE3o"},triggers:{"cat.system":"Sistema","cat.io":"Entradas / Sa\xEDdas","cat.speed":"Velocidade","cat.analog":"Anal\xF3gico / Bateria","cat.timer":"Timers","cat.geo":"Geocercas","cat.gps":"GPS","cat.accel":"Aceler\xF4metro","cat.ble":"Bluetooth / BLE","cat.can":"CAN / Vari\xE1veis","cat.comm":"Comunica\xE7\xF5es","cat.power":"Alimenta\xE7\xE3o",in:"Entrada digital",xp:"Sa\xEDda de expans\xE3o",fct:"Factory counter disparado",ow:"iButton detectado",owp:"iButton por porta","owp.portA":"Porta A","owp.portB":"Porta B",vl:"Limite de velocidade",ar:"Entrada anal\xF3gica",vbu:"Voltagem backup",ko:"Repouso/Sleep","ko.fullSleep":"Dorm\xEAncia total","ko.partialRest":"Repouso parcial","ko.enabled":"KO habilitado","ko.exitingUlp":"Saindo KO++",td:"Temporizador",tr:"Regra de hor\xE1rio",nt:"Contador",hm:"Manobra brusca",wp:"Geocerca circular",rg:"Geocerca poligonal",zna:"Zona estendida A (geocerca)",znb:"Zona estendida B (geocerca)",pk:"Parking","pk.parked":"Estacionado","pk.enabled":"Habilitado",dc:"Mudan\xE7a de dire\xE7\xE3o GPS",dv:"Delta de velocidade (frenagem/acelera\xE7\xE3o brusca)",tk:"Tracking reboque","tk.fired":"Evento disparado","tk.enabled":"Habilitado","tk.state":"Estado triggered",mvxp:"Movimento eixo X+",mvxn:"Movimento eixo X-",mvyp:"Movimento eixo Y+",mvyn:"Movimento eixo Y-",mvzp:"Movimento eixo Z+",mvzn:"Movimento eixo Z-",bs:"Sensor BLE ativo",be:"Beacon BLE detectado",bsw:"BLE Smart Wildcard ativo",bswn:"BLE novo dispositivo detectado",bth:"Cliente Bluetooth conectado",uv:"Vari\xE1vel de usu\xE1rio",u:"Flag de usu\xE1rio",xb:"XBuffer com dados",rl:"Estado de outra regra",ack:"ACK recebido do destino",drv:"Motorista (DRV)",drvOn:"H\xE1 motorista",drvLogin:"Login",drvLogout:"Logout",drvInvalid:"C\xF3digo n\xE3o autorizado",drvWindow:"Janela vencida sem motorista",ic:"Driver Manager - estado",icSession:"Sess\xE3o iniciada",icMode:"Mudan\xE7a de modo",icValid:"Usu\xE1rio v\xE1lido",icInvalid:"Usu\xE1rio inv\xE1lido",icl:"Driver Manager - c\xF3digo v\xE1lido",sim:"SIM selecionada",cid:"Caller ID (chamada recebida)",cq:"Qualidade GPS (posi\xE7\xE3o confi\xE1vel)",ign:"Igni\xE7\xE3o ativa",pwr:"Alimenta\xE7\xE3o cortada",bu:"Buffer com relat\xF3rios pendentes",gps:"GPS fix v\xE1lido",ac:"Movimento (aceler\xF4metro)",cel:"Modem registrado na rede",wif:"WiFi conectado",jmd:"Jamming detectado",can:"Dados CAN recebidos",tt:"Tick do sistema (alterna 0/1 a cada 1s)",dtc:"Falhas CAN (DTC J1939)","dtc.active":"H\xE1 falhas ativas","dtc.new":"Falha nova","dtc.lamp":"L\xE2mpada de falha acesa","dtc.cleared":"Falhas limpas",pb:"Rajada de pulsos (PC)",intpwr:"Fonte interna ligada",viopwr:"Tens\xE3o externa ligada",celpwr:"Modem HW ligado",gpspwr:"GPS HW ligado",wifpwr:"WiFi HW ligado",bthpwr:"Bluetooth ligado","sense.active":"+ Ativa","sense.deactive":"\u2212 Desativ.","sense.change":"* Mudan\xE7a","sense.activeDesc":"Borda de subida (0 \u2192 1)","sense.deactiveDesc":"Borda de descida (1 \u2192 0)","sense.changeDesc":"Qualquer mudan\xE7a de estado","op.and":"E l\xF3gico","op.or":"OU l\xF3gico","op.xor":"OU exclusivo","op.nand":"NOT AND","op.nor":"NOT OR","op.xnor":"NOT XOR"},configPage:{bleSensorFields:"Campos de sensores BLE",bleSensorRef:"Refer\xEAncia para MBS() e UV",bleSensorUsage:"Usar MBS(sensor, campo) em express\xF5es UV/UC. O campo pode ser o nome (ex: temp) ou o \xEDndice num\xE9rico (ex: 0)."},time:{now:"agora",seconds:"{{s}} seg",minutesSeconds:"{{m}}min {{s}}s",minutes:"{{m}} min",hours:"{{h}}h",hoursMinutes:"{{h}}h {{m}}min",ago:"h\xE1"},map:{editWaypoint:"Editar waypoint no mapa",editRegion:"Editar regi\xE3o no mapa",searchPlace:"Buscar lugar ou endere\xE7o...",clickToAddVertices:"Clique no mapa para adicionar v\xE9rtices \xB7 Arraste marcador para mover \xB7 Clique no marcador para excluir (m\xEDn. 3)",deleteVertex:"Excluir v\xE9rtice",deleteRegion:"Excluir regi\xE3o",regionNamePlaceholder:"Nome da regi\xE3o",noPolygonsFound:"Nenhum pol\xEDgono encontrado no arquivo.",noPointsFound:"Nenhum ponto encontrado no arquivo.",pointImported:"Ponto importado",polygonImported:"Pol\xEDgono importado",vertices:"v\xE9rtices",moreInFile:"mais no arquivo"},summary:{title:"Resumo da Configura\xE7\xE3o",copy:"Copiar",copied:"\u2713 Copiado",compatibleWith:"Compat\xEDvel com",commSection:"Comunica\xE7\xE3o",mainServerBy:"Servidor principal via",at:"em",backupAt:"backup em",backChannelBy:"Canal BACK via",towards:"para",keepAlive:"Keep Alive a cada",apnLabel:"SIM 0 APN:",apnUser:"usu\xE1rio:",operator:"Operadora:",dualSim:"SIM 1 (Dual SIM): APN:",noApn:"(sem APN)",cellDisabled:"Celular desabilitado.",wifiLabel:"WiFi:",wifiDisabled:"desabilitado.",networkCount_one:"{{count}} rede configurada.",networkCount_other:"{{count}} redes configuradas.",reportSection:"Relat\xF3rio e GPS",everyWithIgnOn:"A cada <strong>{{time}}</strong> com IGN ligada",everyWithIgnOff:"a cada <strong>{{time}}</strong> com IGN desligada",headingAt:"Rumo a <strong>{{angle}}\xB0</strong>",eventsDefinedCount_one:"<strong>{{count}}</strong> evento definido:",eventsDefinedCount_other:"<strong>{{count}}</strong> eventos definidos:",noEventsDefined:"Sem eventos definidos.",gpsLabel:"GPS:",gpsFix:"fix \u2265 {{fix}}D",gpsPdop:"PDOP \u2264 {{pdop}}",gpsSats:"\u2265 {{sats}} sat\xE9lites",ignitionLabel:"Igni\xE7\xE3o:",gpsMode:["Sempre (1s)","S\xF3 com IGN","Velocidade > 5 km/h"],ignMode:["Normal (cabo)","Manual (SS)","Por tens\xE3o"],datalogLabel:"DataLog:",toLog:"ao Log",toBuffer:"ao Buffer",eventsSection:"Motor de eventos",noActiveRules:"Sem regras ativas.",activeRulesCount_one:"<strong>{{count}} regra ativa:</strong>",activeRulesCount_other:"<strong>{{count}} regras ativas:</strong>",priorityLow:"baixa",priorityMed:"m\xE9dia",priorityHigh:"alta",periodicIgnOn:"Peri\xF3dico IGN a cada {{time}}",periodicIgnOff:"Peri\xF3dico sem IGN a cada {{time}}",headingOver:"Rumo > {{angle}}\xB0",ignOn:"Ligar IGN",ignOff:"Desligar IGN",speedOver:"Excesso > {{speed}} km/h",speedUnder:"Abaixo de {{speed}} km/h",noEvent:"sem evento",customRulesCount_one:"<strong>{{count}}</strong> regra personalizada",customRulesCount_other:"<strong>{{count}}</strong> regras personalizadas",disabledCount_one:"{{count}} desabilitada",disabledCount_other:"{{count}} desabilitadas",unnamed:"(sem nome)",geofencesSection:"Geocercas",waypointsActive_one:"<strong>{{count}}</strong> waypoint ativo",waypointsActive_other:"<strong>{{count}}</strong> waypoints ativos",waypointsDisabled_one:"{{count}} desabilitado",waypointsDisabled_other:"{{count}} desabilitados",regionsActive_one:"<strong>{{count}}</strong> regi\xE3o poligonal",regionsActive_other:"<strong>{{count}}</strong> regi\xF5es poligonais",regionsDisabled_one:"{{count}} desabilitada",regionsDisabled_other:"{{count}} desabilitadas",vertices:"v\xE9rt.",totalCommands:"{{count}} comandos totais.",seg:"seg",min:"min"},code:{ipsPassword:"Wialon IPS password: {{pw}}",ipsPasswordEmpty:"Wialon IPS password: (vazio)",protoMain:"Protocolo MAIN={{main}}, BACK={{back}}, janela={{win}}",serverEmpty:"{{label}}: (vazio)",serverPrimary:"Principal",serverSecondary:"Secund\xE1rio",serverBackPrimary:"BACK principal",serverBackSecondary:"BACK secund\xE1rio",keepAlive:"Keep Alive a cada {{secs}}s ({{ch}})",modemOn:"Modem celular: ligado",modemOff:"Modem celular: desligado",operatorAuto:"Operadora: sele\xE7\xE3o autom\xE1tica",operatorManual:"Operadora manual: {{op}}",apnSim0:"APN SIM0: {{apn}}",apnCleared:"APN apagado (detec\xE7\xE3o autom\xE1tica)",sim1ApnCleared:"APN do SIM1 apagado (detec\xE7\xE3o autom\xE1tica)",simModeSingle:"Modo SIM: apenas SIM0",simModeSwitch:"Modo SIM: altern\xE2ncia autom\xE1tica SIM0/SIM1",sim1OperatorAuto:"SIM1: operadora autom\xE1tica",sim1OperatorManual:"SIM1: operadora manual {{op}}",sim1Apn:"SIM1 APN: {{apn}}",timerIgnOn:"Timer com IGN: {{time}}",timerIgnOff:"Timer sem IGN: {{time}}",headingChange:"Mudan\xE7a de rumo: {{angle}}\xB0",gpsModeAlways:"sempre (1s)",gpsModeIgn:"apenas com IGN",gpsModeSpeed:"velocidade > 5 km/h",gpsMode:"Modo GPS: {{mode}}",gpsQuality:"Qualidade GPS: fix\u2265{{fix}}D, PDOP\u2264{{pdop}}, sats\u2265{{sats}}",ignNormal:"normal",ignManual:"manual (SS)",ignVoltage:"por tens\xE3o",ignManualLiberaIn07:"manual (libera IN07)",ignition:"Igni\xE7\xE3o: {{mode}}",ignitionWithTimes:"Igni\xE7\xE3o: {{mode}} \xB7 ON {{ton}}s \xB7 OFF {{toff}}s",ignVbatManual:"Limiares de igni\xE7\xE3o manuais: ON > {{on}} V, OFF < {{off}} V",ignVbatAuto:"Limiares de igni\xE7\xE3o autom\xE1ticos",tagDevice:"Etiqueta do dispositivo: {{tag}}",tagEmpty:"Etiqueta: (vazia)",passwordChange:"Altera\xE7\xE3o de senha",inputDebounce:"{{label}}: ON={{on}}ms, OFF={{off}}ms",outputDisabled:"{{label}}: desabilitada",outputDuration:"dura\xE7\xE3o={{dur}}ms",outputBlink:"blink={{on}}ms/{{off}}ms",outputPersistent:"estado persistente",wifiEnabled:"WiFi habilitado",wifiDisabled:"WiFi desabilitado",wifiNetworkEmpty:"Rede WiFi {{idx}}: (vazia)",wifiNetwork:"Rede WiFi {{idx}}: {{ssid}}",datalogDestAll:"todos",datalogDestGPRS:"GPRS",datalogDestWIF:"WiFi",datalogDestBTH:"Bluetooth",datalogDestTRM:"Terminal",datalogDestBACK:"Backup",datalogDestBGP:"Backup+GPRS",datalogDestBWI:"Backup+WiFi",datalog:"DataLog: {{dest}}, {{mode}}",alertSpeedOn:"Velocidade de alerta ON: {{speed}} km/h",alertSpeedOff:"Velocidade de corte OFF: {{speed}} km/h",batteryLow:"Bateria baixa: {{min}}V \u2013 {{max}}V",batteryOk:"Bateria OK: {{min}}V+",batteryDisconnect:"Desconex\xE3o: 0V \u2013 {{max}}V",parkingConfig:"Parking idx:{{idx}}, raio:{{radius}}m, confirma\xE7\xE3o:{{deb}}s",clearAllRules:"Apagar todas as regras existentes",wifiReconnect:"WiFi: reconectar ao energizar",speedActivate:"Velocidade: ativar XP{{out}} ao superar {{speed}} km/h",speedRestored:"Velocidade restabelecida < {{speed}} km/h",speedRestoredOutput:"Velocidade restabelecida < {{speed}} km/h \u2192 XP{{out}} OFF",batteryLowDetected:"Bateria baixa detectada \u2192 evt:{{evt}}",batteryOkRestored:"Bateria OK restabelecida \u2192 evt:{{evt}}",batteryDisconnected:"Desconex\xE3o de bateria \u2192 evt:{{evt}}",parkingActivate:"Parking: ativar ao desligar IGN",parkingActivateGps:"Parking: ativar ao desligar IGN + GPS modo 1",parkingAlert:"Parking: alerta por movimento \u2192 evt:{{evt}}",parkingAlertGps:"Parking: alerta por movimento \u2192 evt:{{evt}} + restaurar GPS",prioLow:"baixa",prioMedium:"m\xE9dia",prioHigh:"alta",noActions:"sem a\xE7\xF5es",pkActivate:"PK ativar",pkDeactivate:"PK desativar",clearAllWaypoints:"Apagar todos os waypoints",waypointDisabled:"{{label}}: desabilitado",waypointRadius:"{{label}}: raio {{radius}}",clearAllRegions:"Apagar todas as regi\xF5es",clearAllSpeeds:"Apagar todos os limites de velocidade",clearAllTimers:"Apagar todos os timers",clearAllUserVars:"Apagar todas as vari\xE1veis de usu\xE1rio",clearDriverManager:"Apagar Driver Manager",everyHour:"cada hora",everyMin:"cada min",everySec:"cada seg",braking:"frenagem",acceleration:"acelera\xE7\xE3o",hmAcelGps:"Acel GPS",hmBrakeGps:"Fren GPS",hmTurnLeft:"Curva esq",hmTurnRight:"Curva dir",hmCentripetal:"Centr\xEDpeta",hmImpLat:"Imp.lat",hmImpFront:"Imp.frontal",hmImpRear:"Imp.post",hmDisabled:"desabilitado",hmType:"tipo {{type}}",tiltAutoIgn:"auto IGN",tiltManual:"manual",tilt:"Inclina\xE7\xE3o: {{mode}}, estab={{stab}}s, detect={{det}}s, \xE2ngulo={{angle}}\xB0",tiltDisabled:"Inclina\xE7\xE3o: desabilitada",counterMax:"{{label}}: m\xE1ximo {{max}}",flagPermanent:"permanente",flagVolatile:"vol\xE1til",captureSrcSerial:"Serial",captureSrcGps:"GPS",captureSrcModem:"Modem",captureSrcBle:"BLE",captureSrcDebug:"Debug",captureSrcCan:"CAN",captureSrcOff:"OFF",captureSource:"{{label}}: fonte {{src}}, porta {{port}}",analogSource:"{{label}}: fonte {{src}}",bluetoothOn:"Bluetooth: ligado",bluetoothOff:"Bluetooth: desligado",onewireEnabled:"OneWire: habilitado",uartPortBaudrate:"UART principal: {{baudrate}} bps",onewireDisabled:"OneWire: desabilitado",driverNoName:"(sem nome)",driver:"Driver {{idx}}: {{name}}",regionBlockEmpty:"{{label}}: bloco {{block}} \u2014 vazio",regionBlockVerts:"{{label}}: bloco {{block}} \u2014 {{count}} v\xE9rtice",regionBlockVerts_other:"{{label}}: bloco {{block}} \u2014 {{count}} v\xE9rtices",dallasTemp:"{{label}}: Dallas temp",ecuThrottle:"Acelerador",ecuFuelPct:"Combust\xEDvel %",ecuOdometer:"Od\xF4metro",ecuLiters:"Litros",ecuSpeed:"Velocidade",ecuEngineTemp:"Temp motor",ecuOilPressure:"Press\xE3o \xF3leo",ecuFuelTrip:"Fuel trip",ecuFuelTripSoft:"Fuel trip soft",ecuEngineHours:"Horas motor",ecuChassis:"Chassis",ecuFuelRate:"Taxa comb.",ecuTorque:"Torque",ecuWheelSpeed:"Vel rodas",ecuEngineLoad:"Carga motor",ecuRuntime:"Runtime",ecuDistMil:"Dist MIL",ecuLitersCustom:"Litros custom",ecuMlCustom:"mL custom",ecuParkingBrake:"Freio m\xE3o",ecuBrakePedal:"Pedal freio",ecuThrottleCustom:"Acelerador custom",ecuDriverDoor:"Porta motorista",ecuPassengerDoor:"Porta passageiro",ecuClutch:"Embreagem",ecuTurbo:"Turbo",headerGenerated:"Configura\xE7\xE3o gerada pelo Rinho Configurator",headerDate:"Data: {{date}}",headerTag:"Etiqueta: {{tag}}",headerDescription:"Descri\xE7\xE3o: {{desc}}",headerCompatible:"Compat\xEDvel com: {{models}}",sectionTag:"Etiqueta",sectionPassword:"Senha",sectionIpProtocol:"Protocolo IP",sectionServers:"Servidores",sectionKeepAlive:"Keep Alive",sectionWialonPassword:"Wialon IPS Password",sectionWifi:"WiFi",sectionCellular:"Celular",sectionDatalog:"DataLog",sectionCountry:"Pa\xEDs (MCC)",sectionGps:"GPS",sectionIgnition:"Igni\xE7\xE3o",sectionInputDebounce:"Debounce Entradas (IT)",sectionCanBus:"CAN bus",sectionEcuCan:"ECU CAN (CXECU)",sectionOneWire:"OneWire",sectionDallasTemp:"Dallas Temp (DT)",sectionUartPort:"Porta UART (CXTR)",sectionDigitalOutputs:"Sa\xEDdas Digitais (XP)",sectionGradualCut:"Corte Gradual (GC)",sectionBluetooth:"Bluetooth (CXBTH)",sectionBeaconsBle:"Beacons BLE (BE)",sectionSensorsBle:"Sensores BLE (BS)",sectionSmartWildcard:"BLE Smart Wildcard (BSW)",sectionTimers:"Timers (TD)",sectionSchedule:"Hor\xE1rios (TR)",sectionCounters:"Contadores (NT)",sectionHeading:"\xC2ngulo de Rumo (DC)",sectionSpeed:"Velocidade (VL)",sectionAcceleration:"Acelera\xE7\xE3o (DV)",sectionManeuvers:"Manobras (HM)",sectionVectors:"Vetores Movimento (MVT)",sectionTilt:"Inclina\xE7\xE3o (TK)",sectionAccelerometer:"Aceler\xF4metro (CXAC)",sectionAnalogCalibration:"Calibra\xE7\xE3o Anal\xF3gica (CXAIN)",sectionAnalog:"Anal\xF3gicos (AR)",sectionParking:"Parking (PK)",sectionTriggers:"Disparadores (UV)",sectionFlags:"Flags (U)",sectionCapture:"Capturador Serial (CXXB)",sectionReports:"Relat\xF3rios de Usu\xE1rio (UC)",sectionBlackBox:"Caixa preta (CXBB)",sectionDriverManager:"Driver Manager (IC)",sectionRules:"Regras (RL)",sectionWaypoints:"Waypoints (WP)",sectionRegions:"Regi\xF5es (RG)",sectionOther:"--- Outros ---",valServerRequired:"Servidor principal necess\xE1rio (IP0)",valPortInvalid:"Porta inv\xE1lida (1-65535)",valTimerRange:"Timer: 1-99999 seg",valAngleRange:"\xC2ngulo: 1\xB0-359\xB0",valSsidRequired:"Insira pelo menos um SSID",valApnRequired:"Sem APN: ser\xE1 enviado o comando de APN vazio, que apaga o APN guardado no equipamento e o deixa em detec\xE7\xE3o autom\xE1tica (firmware recente e Rinho PI). Em firmware antigo o equipamento pode ficar sem dados at\xE9 configurar um APN.",valNoComm:"Sem celular nem WiFi habilitados: o dispositivo n\xE3o poder\xE1 se comunicar com o servidor.",sectionDrv:"Motorista (DRV)",drvOrigen0:"Motorista desligado",drvOrigen1:"Motorista: iButton",drvOrigen2:"Motorista: sess\xE3o IC",drvOrigen3:"Motorista: s\xF3 manual",drvOrigen4:"Motorista: tac\xF3grafo",drvBleOff:"Motorista por Bluetooth desligado",drvBleOn:"Motorista por Bluetooth (BSW0{{slot}})",valDrvRpt:"Motorista (DRV): o relat\xF3rio \xAB{{rpt}}\xBB n\xE3o \xE9 v\xE1lido. Vai como a a\xE7\xE3o G sem o G: 2 letras ou n\xFAmeros, 2 hexa e a prioridade H, M ou L (ex. U101H).",valDrvAvisoCorte:"Motorista (DRV): o aviso n\xE3o pode usar a sa\xEDda do corte ({{xp}}).",valDrvOkCorte:"Motorista (DRV): a confirma\xE7\xE3o n\xE3o pode usar a sa\xEDda do corte ({{xp}}).",valDrvTacoSinCan:"Motorista (DRV): a origem tac\xF3grafo precisa de barramento CAN (o ZERO e o PI n\xE3o t\xEAm).",valDrvSalida:"Motorista (DRV): {{xp}} n\xE3o existe no equipamento (tem {{n}} sa\xEDda/s).",valDrvListaVacia:"Motorista (DRV): exige a lista ICL, mas a lista est\xE1 vazia, ent\xE3o ningu\xE9m vai conseguir se identificar.",valDrvBleSinBle:"Motorista por Bluetooth: o equipamento n\xE3o tem Bluetooth e vai rejeit\xE1-lo.",valDrvBleOrigen:"Motorista por Bluetooth: s\xF3 funciona com origem iButton ou sess\xE3o IC; com esta origem o equipamento o ignora.",valDrvBleSlot:"Motorista por Bluetooth: {{bsw}} n\xE3o est\xE1 configurado, ent\xE3o nunca vai pegar um beacon.",valWifiBtBoth:"WiFi e Bluetooth ligados ao mesmo tempo: o SPIDER e o SMART n\xE3o permitem os dois e o Bluetooth ficar\xE1 desligado. Deixe s\xF3 um (s\xF3 o ZERO aceita os dois).",valWifiBtCoexFw:"WiFi e Bluetooth juntos no ZERO: requer firmware 1.09.28.T50 ou superior (o portal web com Bluetooth ligado, T52). Com um anterior o Bluetooth fica desligado.",valUvEmptyRange:"{{uv}} nunca \xE9 ativado: o equipamento dispara com M\xCDN \u2264 valor < M\xC1X, e M\xCDN ({{min}}) n\xE3o \xE9 menor que M\xC1X ({{max}}).",valUvEmptyRangeExact:"{{uv}} nunca \xE9 ativado: o m\xE1ximo n\xE3o \xE9 inclu\xEDdo (M\xCDN \u2264 valor < M\xC1X). Para disparar com {{min}} exato, use M\xC1X = {{exact}}.",valEventDuplicate:"Evento {{evt}} repetido ({{names}}): a plataforma n\xE3o vai conseguir distingui-los. Mude o n\xFAmero de um deles na Tabela de Eventos.",valEventGap:"Eventos {{evts}}: as plataformas que leem 00 a 99 (ex. SmartTrack) n\xE3o os recebem. Use n\xFAmeros de 00 a 99.",valOk:"OK",valWarnings:"Avisos"},ignition:{header:"Igni\xE7\xE3o (CXIGN)",desc:"Define como o dispositivo detecta o estado da igni\xE7\xE3o do ve\xEDculo.",modeLabel:"Modo de igni\xE7\xE3o",modeNormal:"Normal",modeManual:"Manual",byVoltage:"Por tens\xE3o",modeManualLiberaIn07:"Manual (libera IN07)",modeNormalDesc:"Detec\xE7\xE3o pela entrada digital de igni\xE7\xE3o.",modeManualDesc:"O estado IGN \xE9 controlado manualmente por software (comando SS). N\xE3o usa entrada f\xEDsica.",modeManualLiberaIn07Desc:"O estado IGN \xE9 controlado manualmente por software e libera IN07 para uso geral.",voltageDesc:"O firmware mede V ao iniciar e <strong>detecta automaticamente</strong> se o ve\xEDculo \xE9 12V ou 24V, aplicando o conjunto de limiares correspondente. A histerese evita oscila\xE7\xF5es perto do limiar.",vehicle:"Ve\xEDculo",ifV:"se V",debounceHeader:"Tempos de estabiliza\xE7\xE3o (debounce)",debounceDesc:"Tempo que o sinal deve permanecer est\xE1vel antes de confirmar a mudan\xE7a de estado. Evita falsos positivos por ru\xEDdo ou cortes moment\xE2neos.",tonLabel:"Tempo ao ligar (ON)",toffLabel:"Tempo ao desligar (OFF)",secondsUnit:"segundos",vbatManualLabel:"Limiares manuais",vbatManualDesc:"Substitui os limiares autom\xE1ticos de f\xE1brica. Procedimento de campo: verificar a tens\xE3o com o motor desligado e com o motor ligado, e colocar os dois cortes no meio dessa faixa.",vbatOnLabel:"Liga acima de",vbatOffLabel:"Desliga abaixo de",vbatFwNote:"Requer firmware v1.09.26 (build T15) ou superior. Se o equipamento conectado n\xE3o suportar, o comando \xE9 omitido ao enviar.",voltsUnit:"V"},inputs:{header:"Debounce de Entradas (IT)",pullUpDesc:"Entradas com pull-up: <1>livre = 1</1> \xB7 <3>ao GND = 0</3> (ativada).",debounceDesc:"<strong>ON</strong>: atraso em repouso (sinal livre, = 1) \xB7 <strong>OFF</strong>: atraso ao ativar (ao GND, = 0).",descriptiveName:"nome descritivo"},servers:{header:"Servidores",desc:"Insira IP direto (ex: 64.120.108.24) ou nome DNS (ex: dm.rinho.com.ar). Detectado automaticamente.",ipOrDns:"IP ou dom\xEDnio DNS",port:"Porta",addSecondary:"+ Adicionar servidor secund\xE1rio (IP1)",password:"Senha",enableBack:"Habilitar canal de backup (BACK)",ipPlaceholder:"64.120.108.24 ou dm.rinho.com.ar",ipsPasswordPlaceholder:"senha do servidor Wialon"},timers:{reportTimers:"Timers de Relat\xF3rio",ignOnLabel:"Timer com IGN ligada",ignOffLabel:"Timer sem IGN / parado",advancedHeader:"Timers (TD00\u2013TD31)",advancedDesc:"Cada timer gera um pulso peri\xF3dico por tempo e/ou dist\xE2ncia. Usados como disparadores nas regras (TD00+, TD01+, etc.).",noTimers:"Nenhum timer configurado.",addTimer:"+ Adicionar timer",namePlaceholder:"Ex: Timer relat\xF3rio com IGN",time:"Tempo",distance:"Dist\xE2ncia",sec:"seg",meters:"metros"},waypoints:{header:"Waypoints (Geocercas Circulares)",desc:"At\xE9 32 waypoints (WP00\u2013WP31). Cada um define um ponto central e raio. Dispon\xEDveis como sinais no motor de eventos e em regras personalizadas.",addWaypoint:"+ Adicionar waypoint",importKml:"Importar KML",maxReached:"M\xE1ximo de 32 waypoints atingido.",waypointName:"Nome do waypoint",coordinates:"Coordenadas",latitude:"Latitude",longitude:"Longitude",radius:"Raio",generatedCmd:"Comando gerado",editOnMap:"Editar no mapa",internal:"Interno",deleteWaypoint:"Excluir waypoint",imported_one:"{{count}} waypoint importado",imported_other:"{{count}} waypoints importados",ignored:"{{count}} ignorado \u2014 sem espa\xE7o",ignored_other:"{{count}} ignorados \u2014 sem espa\xE7o",deleteCount:"Excluir {{count}}",noPoints:"Nenhum ponto encontrado no arquivo.",error:"Erro"},tilt:{header:"Detec\xE7\xE3o de inclina\xE7\xE3o",desc:"Detecta capotamento ou inclina\xE7\xE3o usando o aceler\xF4metro. Trigger: TK+",manual:"Manual",autoIgn:"Auto com IGN",stabilization:"Estabiliz.",detection:"Detec\xE7\xE3o",sec:"seg",runtimeDesc:"Primeiro espera {{stab}}s im\xF3vel para calibrar, depois monitora. Se a inclina\xE7\xE3o superar {{angle}}\xB0 por mais de {{detect}}s, dispara TK+."},heading:{title:"\xC2ngulo de Rumo",label:"Mudan\xE7a de rumo (graus)",desc:"Gera um relat\xF3rio adicional quando o ve\xEDculo gira mais de {{angle}}\xB0"},logging:{title:"Download de Relat\xF3rios",label:"Download por DataLog",enabledDesc:"Os relat\xF3rios s\xE3o armazenados no DataLog (12.000 registros) e baixados automaticamente para o servidor. Mais confi\xE1vel em caso de perda de conectividade.",disabledDesc:"Os relat\xF3rios s\xE3o armazenados no buffer interno (2.728 registros) e enviados por GPRS/SMS."},battery:{title:"Monitoramento de bateria",desc:"Gera eventos autom\xE1ticos quando a tens\xE3o do ve\xEDculo entra nas zonas de desconex\xE3o, bateria baixa ou restabelecimento. Utiliza faixas anal\xF3gicas (AR) do dispositivo.",monitoring:"\u{1F50B} Monitoramento de bateria",disconnection:"Desconex\xE3o",low:"Baixa",ok:"OK",lowBattery:"Bateria baixa",batteryOk:"Bateria OK (restabelecimento)",events:"Eventos",advancedResources:"Recursos avan\xE7ados",arLow:"AR Baixa:",arOk:"AR OK:",arDisc:"AR Desc:",datalogTooltip:"DataLog: mem\xF3ria circular",bufferTooltip:"Buffer: priorizado, ideal para alarmes"},outputs:{title:"Sa\xEDdas Digitais (CXXP)",desc:"Configure o modo de ativa\xE7\xE3o de cada sa\xEDda digital.",disabled:"desabilitada",fixed:"fixa",continuousBlink:"blink cont\xEDnuo",fixedMode:"Fixa",blinkMode:"Piscar",fixedDesc:"Estado persistente (n\xE3o vol\xE1til). Ativado/desativado por comando ou regra.",duration:"Dura\xE7\xE3o"},parking:{title:"Modo Parking",desc:"Estabelece uma geocerca virtual a partir da posi\xE7\xE3o atual ao desligar a igni\xE7\xE3o. Se o ve\xEDculo sair do raio configurado, gera um evento de alerta.",radius:"Raio da geocerca",confirmTime:"Tempo de confirma\xE7\xE3o",gpsMode1:"Mudar GPS para modo 1 ao estacionar",gpsMode1Note:"(SCXGPS1 \u2014 s\xF3 com IGN)",gpsRestore:"Restaurar GPS ao detectar movimento",gpsRestoreNote:"(SCXGPS0 \u2014 sempre ativo)",activateOnIgnOff:"Ativar parking ao desligar igni\xE7\xE3o",movementDetected:"Movimento detectado",datalogTooltip:"DataLog: mem\xF3ria circular",bufferTooltip:"Buffer: priorizado, ideal para alarmes"},velAlert:{title:"Controle de velocidade",desc:"Gera eventos de excesso de velocidade e de restabelecimento. Opcionalmente ativa uma sa\xEDda digital (buzzer) ao superar o limite e a desliga abaixo do limiar de corte.",header:"\u{1F6A8} Controle de velocidade",cutoff:"Corte: <strong>{{speed}} km/h</strong>",limit:"Limite: <strong>{{speed}} km/h</strong>",logTitle:"DataLog: mem\xF3ria circular",bufTitle:"Buffer: priorizado, ideal para alarmes",ignCondition:"Com IGN ligada",activateOutput:"Ativar sa\xEDda (buzzer)",speedExcess:"Excesso de velocidade",speedRestore:"Velocidade restabelecida",advancedResources:"Recursos avan\xE7ados",evt:"Evt"},regions:{deleteVertex:"Excluir v\xE9rtice",regionName:"Nome da regi\xE3o",maxVertices:"M\xE1ximo 32 v\xE9rtices.",minVertices:"S\xE3o necess\xE1rios pelo menos 3 v\xE9rtices com coordenadas para gerar o comando.",commandsGenerated:"Comandos gerados ({{count}} blocos)",deleteConfirm:"Excluir?",deleteRegion:"Excluir regi\xE3o",title:"Regi\xF5es (Geocercas Poligonais)",latitude:"Latitude",longitude:"Longitude",addVertex:"+ Adicionar v\xE9rtice",noPolygons:"Nenhum pol\xEDgono encontrado no arquivo.",imported_one:"{{count}} regi\xE3o importada",imported_other:"{{count}} regi\xF5es importadas",importedIgnored_one:"{{count}} ignorada \u2014 sem espa\xE7o",importedIgnored_other:"{{count}} ignoradas \u2014 sem espa\xE7o",clearAll:"Excluir todas",clearCount:"Excluir {{count}}",description:"At\xE9 32 regi\xF5es (RG00\u2013RG31). Cada regi\xE3o \xE9 um pol\xEDgono de 3 a 32 v\xE9rtices. Pol\xEDgonos com mais de 8 pontos s\xE3o divididos em blocos de at\xE9 8 por comando.",addRegion:"+ Adicionar regi\xE3o",importKml:"Importar KML",maxReached:"M\xE1ximo de 32 regi\xF5es atingido.",editOnMap:"Editar no mapa"},protocol:{ipProtocol:"Protocolo IP",title:"Protocolo IP",windowLabel_one:"Janela: {{count}} relat\xF3rio simult\xE2neo",windowLabel_other:"Janela: {{count}} relat\xF3rios simult\xE2neos",windowShort:"Janela: {{count}} rel.",windowSummary:"Janela: {{count}}",windowDesc:"Quantidade de relat\xF3rios que o dispositivo pode descarregar simultaneamente para o servidor.",windowDescription:"Quantidade de relat\xF3rios que o dispositivo pode descarregar simultaneamente para o servidor.",keepAlive:"Keep Alive",keepAliveDesc:"Envia uma mensagem peri\xF3dica ao servidor para manter a sess\xE3o ativa e confirmar conectividade. Se o servidor n\xE3o receber o keep alive no tempo configurado, pode considerar o dispositivo desconectado.",keepAliveDescription:"Envia uma mensagem peri\xF3dica ao servidor para manter a sess\xE3o ativa e confirmar conectividade.",channelMain:"Canal MAIN",channelBack:"Canal BACK",dataLog:"DataLog",datalogDesc:"Armazenamento local de relat\xF3rios. Enviados automaticamente quando h\xE1 conectividade.",dataLogDescription:"Armazenamento local de relat\xF3rios. Enviados automaticamente quando h\xE1 conectividade.",enabled:"Habilitado",destination:"Destino",destAll:"Todos",destTerminal:"Terminal",retries:"Retentativas",time:"Tempo",seconds:"seg",order:"Ordem",fifo:"FIFO (mais antigo primeiro)",lifo:"LIFO (mais recente primeiro)",dlAll:"Todos",dlBluetooth:"Bluetooth",dlTerminal:"Terminal",dlBackup:"Backup",dlBackupGprs:"Backup+GPRS",dlBackupWifi:"Backup+WiFi"},sms:{retries:"Retentativas",timeout:"Timeout",desc:"Quantidade de retentativas de envio SMS e timeout entre cada tentativa (0 = padr\xE3o do modem)."},zeroConfig:{periodicIgnOn:"Peri\xF3dico com IGN",periodicIgnOff:"Peri\xF3dico sem IGN",headingChange:"Mudan\xE7a de rumo",ignitionOn:"Ligar IGN",ignitionOff:"Desligar IGN",inputActivation:"Ativa\xE7\xE3o de entrada",inputDeactivation:"Desativa\xE7\xE3o de entrada",outputActivation:"Ativa\xE7\xE3o de sa\xEDda",outputDeactivation:"Desativa\xE7\xE3o de sa\xEDda"},modeManager:{timerWithIgn:"Timer com IGN",timerWithoutIgn:"Timer sem IGN",headingChange:"Mudan\xE7a de rumo",overspeed:"Excesso de velocidade",speedRestore:"Velocidade restabelecida",batteryLow:"Bateria baixa",batteryOk:"Bateria OK",batteryDisconnected:"Desconex\xE3o de bateria",parking:"Parking",wialonIpsTemplate:"Template Wialon IPS",wialonCanTemplate:"Template Wialon + CAN",wifiReconnectOnPower:"WiFi: reconectar ao energizar",moduleAcceleration:"Acelera\xE7\xE3o (DV)",moduleManeuvers:"Manobras (HM)",moduleVectors:"Vetores (MVT)",moduleTilt:"Inclina\xE7\xE3o (TK)",moduleSchedules:"Hor\xE1rios (TR)",moduleCounters:"Contadores (NT)",moduleTriggers:"Disparadores (UV)",moduleReports:"Relat\xF3rios (UC)",moduleFlags:"Flags (U)",moduleCapturer:"Capturador (CXXB)",moduleBlackBox:"Caixa preta (CXBB)",moduleDrv:"Motorista (DRV)",moduleDrvB:"Motorista por Bluetooth (DRVB)",moduleDriver:"Driver Manager (IC)",moduleEcuCan:"ECU CAN (CXECU)"},customRules:{rulesHeader:"Regras",customRulesHeader:"Regras personalizadas",eventTable:"Tabela de eventos",deleteAll:"Excluir todas",advancedDesc:"Todas as regras do dispositivo. Atribua etiquetas aos recursos para identific\xE1-los facilmente.",basicDesc:"Defina regras adicionais usando qualquer sinal do dispositivo.",addRule:"+ Adicionar RL",ruleName:"Nome",ruleNamePlaceholder:"Nome descritivo da regra",trigger:"Disparador",triggerHint:"sinal que ativa a regra",condition:"Condi\xE7\xE3o",conditionHint:"condi\xE7\xE3o adicional (opcional)",actions:"A\xE7\xF5es",actionsRun:"executar ao disparar",addAction:"+ Adicionar a\xE7\xE3o",noTrigger:"Sem disparador configurado",noCondition:"Sem condi\xE7\xE3o configurada",noActions:"Sem a\xE7\xF5es configuradas",addSignal:"+ sinal",searchSignalPlaceholder:"Buscar sinal... (ex: IN05, GPS, timer)",noSearchResults:"Sem resultados",search:"Buscar",gpsModeNormal:"Normal (din\xE2mico)",gpsModeAnchor:"\xC2ncora (posi\xE7\xE3o fixa)",gpsModeBySpeed:"Por velocidade",gpsModeNormalShort:"Normal",gpsModeAnchorShort:"\xC2ncora",gpsModeSpeedShort:"Vel.",parkingActivate:"Ativar",parkingDeactivate:"Desativar",timerRestart:"Reiniciar",timerStop:"Parar",sleepWake:"Despertar",sleepSleep:"Dormir",sleepEnable:"Habilitar",sleepDisable:"Desabilitar",gcActivate:"Ativar",gcStop:"Parar",gcReset:"Reset",resourceLabels:"Etiquetas de recursos",resourceLabelsDesc:"Atribuir nomes aos recursos para identific\xE1-los no seletor de sinais.",addLabel:"+ Etiquetar",eventTableTitle:"Tabela de Eventos",eventTableDesc:"Nome descritivo para cada n\xFAmero de evento. Usado nas regras e no c\xF3digo gerado.",eventNamePlaceholder:"Nome do evento...",eventDuplicate:"J\xE1 existe um evento com essa descri\xE7\xE3o",eventDuplicateRevert:"Descri\xE7\xE3o duplicada \u2014 revertido",onlyDefined:"S\xF3 definidos",noEventsDefined:"Nenhum evento definido",showAll:"Mostrar todos",useEventTable:"Use a Tabela de Eventos para definir.",labelTimers:"Timers",labelSpeeds:"Velocidades",labelAnalog:"Anal\xF3gicos",labelCounters:"Contadores",edgeFalseToTrue:"de falso para verdadeiro (borda de subida)",edgeTrueToFalse:"de verdadeiro para falso (borda de descida)",edgeAny:"qualquer borda",sleepAccel:"Aceler\xF4metro",sleepInputs:"Entradas",sleepCellular:"Celular",sleepInternalPower:"Fonte interna",sleepExternalPower:"Fonte externa",reposoFull:"Repouso completo",gpsOff:"GPS off",reposo:"Repouso",timeUnitSec:"seg",timeUnitMin:"min",timeUnitHrs:"hrs",visual:"Visual",triggerRawPlaceholder:"Express\xE3o raw do disparador (ex: IGN&VL00)",conditionRawPlaceholder:"Express\xE3o raw da condi\xE7\xE3o (ex: IGN&!U00)",moveUp:"Mover para cima",moveDown:"Mover para baixo",permanent:"permanente",volatile:"vol\xE1til",priority:"prioridade",event:"Evento",descOutput:"Sa\xEDda",descVariable:"Vari\xE1vel",descMode:"Modo",counterIncrement:"Incrementar",counterDecrement:"Decrementar",descCounter:"Contador",descGradualCut:"Corte Gradual",descUnknown:"Desconhecido",collapse:"Recolher",expand:"Expandir",confirmDelete:"Excluir?",yes:"Sim",no:"N\xE3o",deleteRule:"Excluir regra",duplicateRule:"Duplicar regra",enableRule:"Habilitar regra",disableRule:"Desabilitar regra",copy:"c\xF3pia",index:"\xCDndice",cancel:"Cancelar",close:"Fechar",undefined:"N\xE3o definido",delete:"Excluir",noResultsFor:'Sem resultados para "{{filter}}"'},allRes:{emptyMessage:"Nenhum recurso configurado. Adicione timers, velocidades, anal\xF3gicos ou outros recursos necess\xE1rios para suas regras.",units:{sec:"seg"},common:{noLimit:"sem lim."},td:{label:"Timers",desc:"Pulso peri\xF3dico por tempo e/ou dist\xE2ncia. Trigger: TD00+",timeout:"Tempo",distance:"Dist\xE2ncia"},dc:{label:"Headings",desc:"Mudan\xE7a de dire\xE7\xE3o GPS. Trigger: DC00+",angle:"\xC2ngulo",disabled:"desabilitado"},vl:{label:"Velocidade",desc:"Limiar de velocidade. Trigger: VL00+, VL01-",speed:"Velocidade",filtered:"Filtrado",filteredOn:"filtrado",filteredOff:"sem filtro",settle:"Sustentado",settleUnit:"d\xE9cimos"},dv:{label:"Acelera\xE7\xE3o",desc:"Frenagem/acelera\xE7\xE3o brusca por delta de velocidade GPS. Trigger: DV00+"},hm:{label:"Manobras",desc:"Manobras bruscas. HM00-01: GPS, HM02-07: aceler\xF4metro. Trigger: HM00+",eventType:"Tipo",eventTypes:{"0":"Acel GPS","1":"Fren GPS","2":"Curva esq","3":"Curva dir","4":"Centr\xEDpeta","5":"Imp.lat","6":"Acel IMU","7":"Fren IMU"},magnitude:"Magnitude",minSpeed:"Vel m\xEDn",hysteresis:"Histerese",timeWindow:"Janela",preset:{fleet:"Frota Comercial","fleet.accel":"Acelera\xE7\xE3o","fleet.brake":"Frenagem","fleet.latImpact":"Impacto lateral","fleet.frontImpact":"Impacto frontal",hazmat:"Ve\xEDculos Perigosos","hazmat.accel":"Acelera\xE7\xE3o suave","hazmat.brake":"Frenagem gradual","hazmat.turnL":"Curva esq suave","hazmat.turnR":"Curva dir suave","hazmat.centripetal":"Centr\xEDpeta","hazmat.latImpact":"Imp. lateral","hazmat.frontImpact":"Imp. frontal","hazmat.rearImpact":"Imp. traseiro",family:"Familiar Padr\xE3o","family.accel":"Acelera\xE7\xE3o","family.brake":"Frenagem","family.turnL":"Curva esq","family.turnR":"Curva dir","family.latImpact":"Imp. lateral","family.frontImpact":"Imp. frontal","family.rearImpact":"Imp. traseiro","family.centripetal":"Centr\xEDpeta"}},ar:{label:"Anal\xF3gicos",desc:"Monitoramento anal\xF3gico: tens\xE3o, ADC ou temperatura. Ativa sinal quando valor est\xE1 na faixa [m\xEDn, m\xE1x). Trigger: AR00+",source:"Origem","source.vbat":"Bateria principal (VBat) \u2014 cV","source.vbu":"Bateria backup (VBU) \u2014 cV","source.adc0":"ADC 0 (AN0) \u2014 cV","source.adc1":"ADC 1 (AN1) \u2014 cV","source.adc2":"ADC 2 (AN2) \u2014 cV","source.adc3":"ADC 3 (AN3) \u2014 cV","source.adc4":"ADC 4 (AN4) \u2014 cV","source.adc5":"ADC 5 (AN5) \u2014 cV","source.tempMcu":"Temperatura MCU \u2014 c\xB0C","source.dallas0":"Temperatura Dallas 0 \u2014 c\xB0C","source.dallas1":"Temperatura Dallas 1 \u2014 c\xB0C","source.dallas2":"Temperatura Dallas 2 \u2014 c\xB0C","source.dallas3":"Temperatura Dallas 3 \u2014 c\xB0C","source.dallas4":"Temperatura Dallas 4 \u2014 c\xB0C","source.dallas5":"Temperatura Dallas 5 \u2014 c\xB0C","source.dallas6":"Temperatura Dallas 6 \u2014 c\xB0C","source.dallas7":"Temperatura Dallas 7 \u2014 c\xB0C",min:"M\xEDn",max:"M\xE1x"},u:{desc:"Flags booleanos SET/CLR a partir de a\xE7\xF5es de regras. U00-U15: vol\xE1teis. U16-U31: permanentes. U32-U47: vol\xE1teis. U48-U63: permanentes. Trigger: U00+",value:"Valor",permanent:"permanente",volatile:"vol\xE1til"},nt:{label:"Contadores",desc:"Contadores com valor m\xE1ximo. Incrementam/decrementam a partir de a\xE7\xF5es. Disparam ao atingir o m\xE1ximo. Trigger: NT00+",maxcount:"M\xE1ximo"},tr:{label:"Hor\xE1rios",desc:"Regras por hor\xE1rio. Dispara em um momento espec\xEDfico ou periodicamente. ** = cada hora/minuto/segundo (wildcard). Padr\xE3o: ****** (cada segundo). Trigger: TR00+",hora:"Hora",minuto:"Minuto",segundo:"Segundo"},mvt:{label:"Vetores",desc:"Vetores de movimento por aceler\xF4metro (limiares XYZ em mg). Triggers: MVXP, MVXN, MVYP, MVYN, MVZP, MVZN"},cxbb:{label:"Caixa preta",desc:"Captura um relat\xF3rio de forma cont\xEDnua e, quando uma regra executa {GBBxxH;@LOG}, envia as amostras passadas e futuras com o evento xx. Uma rajada por vez: outro GBB enquanto a anterior est\xE1 saindo \xE9 ignorado. Com U0-UF a amostra leva s\xF3 o texto do UC, sem posi\xE7\xE3o: inclua-a no SUC. Sem ;@LOG vai para a fila ao vivo e se perde sem cobertura.",reportType:"Relat\xF3rio",sampleRate:"Amostragem",history:"Passadas",future:"Futuras"},cxxb:{label:"Capturador",desc:"Capturador serial externo. Configura porta, timeout, delimitadores. Dispara como XB00+",source:"Fonte","source.disabled":"Desabilitado","source.modem":"Modem",port:"Porta",rxChars:"Fim por caracteres",rxTimeout:"Fim por timeout",header:"Header (in\xEDcio)",footer:"Footer (fim)",displayMode:"Formato sa\xEDda","displayMode.binary":"Bin\xE1rio","displayMode.hex":"Hexadecimal",showHeadFoot:"Incluir H/F na captura"},uv:{label:"Disparadores",desc:"Vari\xE1veis de usu\xE1rio com express\xF5es condicionais. Trigger: UV00+",expression:"Express\xE3o"},uc:{label:"Relat\xF3rios",desc:"Templates de relat\xF3rios personalizados. Gerados a partir de a\xE7\xF5es de regras com GU{slot}.",expression:"Express\xE3o"},drv:{help:{origen:"De onde vem o motorista. iButton: a \xFAltima chave lida. Sess\xE3o IC: o login do Driver Manager (chave, controle RF ou SIC). S\xF3 manual: SDRV/CDRV pela plataforma ou por SMS. Tac\xF3grafo: o cart\xE3o do motorista 1 (barramento CAN). Mudar a origem faz logout.",lista:"Qualquer c\xF3digo: qualquer chave ou cart\xE3o vira motorista. S\xF3 ICL: s\xF3 os c\xF3digos cadastrados na lista do Driver Manager; um de fora n\xE3o entra e dispara DRV03.",retencion:"Segundos com a igni\xE7\xE3o desligada at\xE9 o logout autom\xE1tico. 0 = o motorista fica at\xE9 outro se identificar ou chegar um CDRV.",ventana:"Segundos que o motorista tem para se identificar ao ligar a igni\xE7\xE3o. 0 = n\xE3o exige motorista (sem aviso nem corte). Se vencer sem motorista dispara DRV04 e aplica o corte.",aviso:"Sa\xEDda ligada enquanto corre a janela (buzzer ou luz) para lembrar o motorista de se identificar. N\xE3o pode ser a sa\xEDda do corte.",corte:"O que acontece se a janela vencer sem motorista ou aparecer um c\xF3digo n\xE3o autorizado. Corte por XP: liga essa sa\xEDda. Gradual: usa o corte gradual (GC). Habilita\xE7\xE3o H: a sa\xEDda s\xF3 liga com motorista, ent\xE3o o ve\xEDculo n\xE3o d\xE1 partida sem identifica\xE7\xE3o.",velCorte:"O corte por sa\xEDda espera a velocidade cair abaixo deste valor (km/h), para n\xE3o cortar com o ve\xEDculo em movimento. N\xE3o se aplica ao gradual nem \xE0 habilita\xE7\xE3o.",rptLogin:"Relat\xF3rio em cada login, escrito como a a\xE7\xE3o G sem o G: tipo (2 caracteres), n\xFAmero do evento em hexa e prioridade H, M ou L. Ex. U101H = modelo U1, evento 01, prioridade alta. Vazio = nenhum.",rptLogout:"Relat\xF3rio em cada logout (CDRV, reten\xE7\xE3o vencida ou troca de motorista). Mesmo formato, ex. U102H. Vazio = nenhum.",rptInvalido:"Relat\xF3rio quando aparece um c\xF3digo n\xE3o autorizado (com S\xF3 ICL). Mesmo formato, ex. U103H. Vazio = nenhum.",rptSinChofer:"Relat\xF3rio quando a janela vence sem ningu\xE9m se identificar. Mesmo formato, ex. U104H. Vazio = nenhum.",dst:"Para onde v\xE3o esses relat\xF3rios: GP servidor principal, WI por WiFi, BT Bluetooth, TR porta serial, BGP e BWI backup por celular ou WiFi, LOG s\xF3 a mem\xF3ria, BACK o backup, ALL todos.",xpOk:"Sa\xEDda ligada 2 s em cada login, para confirmar ao motorista que ficou identificado (buzzer ou luz). N\xE3o pode ser a sa\xEDda do corte."},label:"Motorista",desc:"Um s\xF3 motorista por equipamento: vai para Wialon/Traccar (campo iButton), o token DRV, o TRIP e os sinais DRV00 (h\xE1 motorista), DRV01 login, DRV02 logout, DRV03 c\xF3digo n\xE3o autorizado, DRV04 janela vencida.",origen:"Origem",origen0:"Desligado",origen1:"iButton (\xFAltima chave)",origen2:"Sess\xE3o IC",origen3:"S\xF3 manual (SDRV)",origen4:"Tac\xF3grafo (CAN)",lista:"Lista",lista0:"Qualquer c\xF3digo",lista1:"S\xF3 ICL",retencion:"Reten\xE7\xE3o",ventana:"Janela",aviso:"Aviso",ninguna:"Nenhuma",corte:"Corte",sinCorte:"Sem corte",corteXp:"Corte por",corteG:"Corte gradual (GC)",corteH:"Habilita\xE7\xE3o (s\xF3 liga com motorista) por",velCorte:"Vel. corte",rptLogin:"Rel. login",rptLogout:"Rel. logout",rptInvalido:"Rel. inv\xE1lido",rptSinChofer:"Rel. sem motorista",rptPlaceholder:"Ex: U101H (vazio = nenhum)",dst:"Destino rel.",xpOk:"OK login",xpOkXp:"2 s em cada login"},drvb:{help:{slot:"Slot BSW (Bluetooth wildcard) que captura o beacon do motorista. Esse BSW \xE9 configurado \xE0 parte, em Bluetooth, com o filtro do beacon. Desligado = sem motorista por Bluetooth.",modo:"Presen\xE7a: o motorista fica logado enquanto o beacon est\xE1 perto e sai quando o BSW o perde. Bot\xE3o: cada toque no beacon faz login (substitui o motorista atual).",id:"O que vira o c\xF3digo do motorista: o MAC do beacon (12 hex), ou major+minor do iBeacon (8 hex) / a inst\xE2ncia do Eddystone-UID (12 hex).",toggle:"S\xF3 no modo Bot\xE3o: apertar de novo o mesmo beacon faz logout."},label:"Motorista por Bluetooth",desc:"O motorista vem de um beacon (iBeacon ou Eddystone-UID) capturado por um slot BSW. Funciona com origem iButton ou sess\xE3o IC.",slot:"Slot BSW",apagado:"Desligado",modo:"Modo",modoP:"Presen\xE7a",modoB:"Bot\xE3o",id:"C\xF3digo",idI:"Major+minor / inst\xE2ncia",toggle:"Bot\xE3o: 2\xBA = logout"},ic:{desc:"Gest\xE3o de motoristas por c\xF3digo alfanum\xE9rico. IC00: sess\xE3o, IC01: modo, IC02: timeout, IC03: login falhou. ICL: c\xF3digo v\xE1lido.",name:"Nome",namePlaceholder:"Nome do motorista",code:"C\xF3digo",codePlaceholder:"C\xF3digo alfanum\xE9rico"},sm:{label:"Destinos SMS",desc:"N\xFAmeros de telefone para notifica\xE7\xF5es SMS (at\xE9 5 destinos).",phone:"Telefone",phonePlaceholder:"+5491122334455"},cid:{label:"Caller ID",desc:"Recep\xE7\xE3o de chamadas de voz. Detecta caller ID e auto-atende segundo o modo. Usar % como wildcard para qualquer n\xFAmero. Trigger: CID00+",mode:"Modo",mode0:"Apenas detectar (n\xE3o atende)",mode1:"Auto-atender (microfone)",mode2:"Auto-atender (microfone + alto-falante)",cidString:"N\xFAmero",cidPlaceholder:"+5491122334455 ou % para todos"},mc:{label:"Pa\xEDs (MCC)",desc:"Pa\xEDs em que o modem est\xE1 operando, por Mobile Country Code. O sinal MC00 fica ativo enquanto o MCC da rede coincide com o do slot: serve para regras de roaming (cruzamento de fronteira). Ex: 722 Argentina, 724 Brasil, 730 Chile, 736 Bol\xEDvia, 744 Paraguai, 748 Uruguai. Trigger: MC00+",mcc:"MCC",country:"Pa\xEDs",placeholder:"Buscar pa\xEDs ou digitar MCC"},cxtr:{label:"Portas UART",desc:"Velocidade da porta serial principal, a mesma usada para configurar o equipamento: ao envi\xE1-la, o configurador reabre a porta na nova velocidade e a confirma. 38400 e 57600 exigem firmware 1.09.28.T40. N\xE3o se aplica ao ZERO (USB nativo)."},tk:{label:"Inclina\xE7\xE3o",desc:"Detec\xE7\xE3o de capotamento/inclina\xE7\xE3o por aceler\xF4metro. Trigger: TK+",mode:"Modo",stabTime:"Estabiliz.",detectTime:"Detec\xE7\xE3o",angle:"\xC2ngulo"},cxcan:{desc:"Configura\xE7\xE3o do barramento CAN do ve\xEDculo.",protocol:"Protocolo",speed:"Velocidade",format:"Formato",engine:"Motor",gasoline:"Gasolina"},cxow:{desc:"Barramento OneWire para iButton e sensores de temperatura Dallas. Apenas Spider e Smart.",noReset:"N\xE3o reiniciar",every10s:"A cada 10s",every20s:"A cada 20s",every30s:"A cada 30s",useAsKey:"Sensor de temperatura como chave",key:"Chave",tempMode:"Sensores de temperatura",modeTemp:"Somente temperatura",modeKey:"Como chave",modeAuto:"Auto-atribuir DT (TH/TL)",auto:"Auto DT",invKey:"C\xF3digo da chave",invNo:"Como o equipamento l\xEA (fam\xEDlia primeiro)",invYes:"Como est\xE1 gravado na chave (invertido)",invShort:"Invertido"},dt:{desc:"Sensores de temperatura Dallas DS18B20 conectados ao barramento OneWire. Lidos com OW(n) ou MDT(n,f) em express\xF5es.",romPlaceholder:"16 caracteres hex (ex: 28FF1234567890AB)"},gc:{label:"Corte Gradual",desc:"Corte gradual de motor: ativa uma sa\xEDda com pulsos que se alongam progressivamente at\xE9 ficar fixa.",output:"Sa\xEDda (XP)",step:"Passo",interval:"Intervalo",max:"M\xE1ximo",invert:"Inverter",inverted:"invertido",normal:"normal"},cxac:{label:"Aceler\xF4metro",desc:"Limiar do aceler\xF4metro para detec\xE7\xE3o de movimento. 0=desabilitado.",threshold:"Limiar"},cxain:{header:"Curvas de calibra\xE7\xE3o (CXAIN)",intro:"Converte a tens\xE3o crua de cada entrada anal\xF3gica em unidades do sensor (litros, %, \xB0C\u2026) usando 2 pontos. S\xF3 afeta a convers\xE3o: para gerar sinais/eventos use o m\xF3dulo Anal\xF3gicos (AR).",labelField:"Etiqueta",labelPlaceholder:"sensor de combust\xEDvel, temperatura, etc.",unit:"Unidade",calibration:"Calibra\xE7\xE3o",whenReads:"Quando l\xEA",shows:"\u2192 mostra",linearHint:"Entre os dois pontos se interpola uma reta.",advanced:"Avan\xE7ado: limites de sa\xEDda",clampHint:"Corta a sa\xEDda para que n\xE3o passe destes valores mesmo se a curva extrapola fora de faixa.",neverBelow:"Nunca menos de",neverAbove:"Nunca mais de",autoClamp:"Auto",preview:"Pr\xE9-visualiza\xE7\xE3o",testVoltage:"Tens\xE3o de teste",applyPreset:"Aplicar preset",choosePreset:"Escolher preset\u2026",notConfigured:"n\xE3o configurado",errors:{sameVoltage:"As duas tens\xF5es n\xE3o podem ser iguais."}},cxecu:{desc:"Configura\xE7\xE3o custom de PIDs CAN bus. Define como analisar cada sinal do ve\xEDculo.",idx:{"1":"Acelerador %","2":"Combust\xEDvel %","3":"Od\xF4metro total","4":"Litros total","5":"Velocidade","6":"Temp. motor","7":"Press\xE3o \xF3leo","10":"Horas motor","12":"Taxa combust\xEDvel","15":"Vel. rodas","17":"Carga motor %","18":"Runtime motor","19":"Dist. c/MIL","20":"Litros custom","22":"Freio m\xE3o","23":"Pedal freio","24":"Acelerador % custom","25":"Porta motorista","26":"Porta passageiro","27":"Pedal embreagem","28":"Press\xE3o turbo"},startBit:"Bit in\xEDcio",bitLength:"Comprimento",min:"M\xEDnimo",max:"M\xE1ximo",sign:"Sinal"},pk:{desc:"Geocerca din\xE2mica. Ativa com SPKA, dispara como PK00+",radius:"Raio",debounce:"Confirm."},cxbth:{desc:"Configura\xE7\xE3o geral do m\xF3dulo Bluetooth (BLE/NimBLE). O PIN permite autenticar conex\xF5es SPP.",power:"Ligado",name:"Nome",namePlaceholder:"Nome do dispositivo BT (at\xE9 16 chars)",pinPlaceholder:"Vazio ou 4 d\xEDgitos (ex: 1234)",noPin:"sem PIN",timeout:"Timeout login",noLimit:"sem limite"},be:{desc:"Detec\xE7\xE3o de beacons BLE por ID. Trigger: BE00+",idPlaceholder:"16 caracteres hex (8 bytes)",distance:"Dist\xE2ncia"},bs:{label:"Sensores BLE",desc:"Sensores BLE (Escort, MOKO, Teltonika, Technoton) por MAC/ID. Leitura de temperatura, umidade, n\xEDvel de combust\xEDvel, dist\xE2ncia, etc. Trigger: BS00+",idPlaceholder:"MAC ou ID do sensor",sensorType:"Tipo sensor",type:{auto:"Autom\xE1tico"},maxDist:"Dist\xE2ncia max"},bsw:{desc:"Captura BLE wildcard: detecta dispositivos por UUID/Major/Minor com filtros. Trigger: BSW00+",independent:"Independente",independentHint:"N\xE3o injeta nos sensores BS, apenas emite eventos BSW/BSWN",allBs:"Todos os BS",allBsHint:"Injeta a MAC detectada em todos os sensores BS configurados",noBsConfigured:"N\xE3o h\xE1 sensores BS configurados",filterUuid:"Filtro UUID",uuidPlaceholder:"32 hex ou vazio para todos",filterMajor:"Filtro Major",filterMinor:"Filtro Minor",noFilterPlaceholder:"Sem filtro (qualquer)",any:"qualquer",maxDist:"Dist\xE2ncia max"}},ucBuilder:{presets:"Presets",insert:"Inserir",fullTemplates:"Templates completos",inserts:"Insere",systemVars:"Vari\xE1veis do sistema",indexedFunctions:"Fun\xE7\xF5es indexadas",ruleActionHint:"Para usar em regras, adicione a a\xE7\xE3o ",ruleActionHintSuffix:"na regra desejada.",cat:{wialon:"Wialon IPS",fields:"Campos de dados",operators:"Operadores",power:"Alimenta\xE7\xE3o",gps:"GPS",odometer:"Od\xF4metro",status:"Estado",report:"Relat\xF3rio",io:"I/O",modules:"M\xF3dulos",sensors:"Sensores",geo:"Geocercas",can:"CAN / Avan\xE7ado"},snippet:{wialonBase:"Base Wialon pr\xE9-definida",paramInt:"Par\xE2metro inteiro Wialon",paramFloat:"Par\xE2metro float Wialon",paramText:"Par\xE2metro texto Wialon",reportNumber:"N\xFAmero de relat\xF3rio",gpsFullPos:"Posi\xE7\xE3o GPS completa",ioFull:"I/O completo",bufferXB00:"Buffer XB00",counterNT00:"Contador NT00",splitQIO:"Split QIO por delimitador",cmdQuotes:"Comando com aspas",concatComma:"Concatenar (com v\xEDrgula)",concatNoSep:"Concatenar (sem separador)",textLiteral:"Texto literal",slotHex:"Slot hex da regra",addWialonParam:"Adicionar par\xE2metro Wialon"},eval:{mainVoltage:"Tens\xE3o principal (cV)",backupVoltage:"Tens\xE3o backup (cV)",speed:"Velocidade (km/h)",latitude:"Latitude",longitude:"Longitude",heading:"Rumo (graus)",altitude:"Altitude (m)",gpsAge:"Idade GPS (seg)",gpsOn:"GPS ligado (0/1)",totalOdometer:"Od\xF4metro total (m)",partialOdometer:"Od\xF4metro parcial (m)",ignition:"Igni\xE7\xE3o (0/1)",cellSignal:"Sinal celular (CSQ)",parkingActive:"Parking ativo (0/1)",accelActive:"Aceler\xF4metro ativo (0/1)",reportNumber:"N\xFAmero do relat\xF3rio",internalTimestamp:"Timestamp interno"},evalFn:{digitalInput:"Entrada digital n",extOutput:"Sa\xEDda externa n",analogInput:"Entrada anal\xF3gica n (cV)",triggerUV:"Disparador UV n",userFlag:"Flag de usu\xE1rio n",counter:"Contador n",timer:"Timer n",speed:"Velocidade n",analog:"Anal\xF3gico n",angle:"\xC2ngulo n",ruleState:"Estado da regra n",dallasTemp:"Temperatura Dallas n",bleSensor:"Sensor BLE n",bleWildcard:"Wildcard BLE n",bufferXB:"Buffer XB n",circularGeofence:"Geocerca circular n",polygonGeofence:"Geocerca poligonal n",canEcu:"ECU CAN (n,par\xE2metro)",bleSensorField:"Campo sensor BLE (n,campo)",dallasField:"Campo Dallas (n,campo)",counterField:"Campo contador (n,campo)"},preset:{wialonBasic:"Wialon B\xE1sico",wialonBasicDesc:"Tens\xE3o, od\xF4metro, sinal, igni\xE7\xE3o",wialonRNU:"Wialon + RNU",wialonRNUDesc:"Base pr\xE9-definida + n\xFAmero de relat\xF3rio",wialonCAN:"Wialon + CAN",wialonCANDesc:"Tens\xE3o, od\xF4metro, RPM, temp. motor, combust\xEDvel",wialonCANFull:"Wialon + CAN completo",wialonCANFullDesc:"Relat\xF3rio ER completo: RPM, acelerador, combust\xEDvel, velocidade, motor (cN = \xEDndice ECU)",wialonDallas:"Wialon + Dallas",wialonDallasDesc:"Tens\xE3o, od\xF4metro, 2 sensores de temperatura",wialonBLE:"Wialon + BLE",wialonBLEDesc:"Tens\xE3o, temperatura e umidade BLE",traccar:"Traccar",traccarDesc:"Wialon IPS com nomes do Traccar: tens\xE3o, od\xF4metro (m), sinal, igni\xE7\xE3o e c\xF3digo de evento",traccarCAN:"Traccar + CAN",traccarCANDesc:"Traccar com RPM, combust\xEDvel %, temp. motor, horas de motor (ms) e litros consumidos",rcqCounters:"RCQ + Contadores",rcqCountersDesc:"Posi\xE7\xE3o compacta com contadores NT",multiBuffer:"Multi-Buffer",multiBufferDesc:"Combina\xE7\xE3o de campos de m\xFAltiplos buffers",ucGrouper:"UC Agrupador",ucGrouperDesc:"Agrupa sa\xEDdas de outros UC"},validate:{title:"Valida\xE7\xE3o",valid:"Express\xE3o v\xE1lida",errorCount:"{{count}} erro",errorCount_other:"{{count}} erros",warnCount:"{{count}} aviso",warnCount_other:"{{count}} avisos",autofixComma:"Corrigir v\xEDrgulas \u2192 ;",tooLong:"O template excede {{max}} caracteres ({{n}})",unbalancedQuotes:"Aspas simples ' n\xE3o fechadas",tooManyTokens:"Muitas express\xF5es '...': {{n}} (m\xE1x {{max}}), as restantes s\xE3o ignoradas",exprTooLong:"Express\xE3o excede {{max}} caracteres: '{{expr}}'",commaInExpr:"V\xEDrgula dentro de '...': use ';' como separador \u2192 '{{expr}}'",unbalancedParens:"Par\xEAnteses n\xE3o balanceados: '{{expr}}'",unknownToken:"Token EVAL n\xE3o reconhecido: '{{token}}'",noArgsExpected:"'{{token}}' n\xE3o leva argumentos",argsExpected:"'{{token}}' requer {{arity}} argumento(s)",wrongArity:"'{{token}}' espera {{arity}} argumento(s), tem {{got}}"}},uvBuilder:{emptyRange:"Nunca \xE9 ativado: o equipamento dispara com M\xCDN \u2264 valor < M\xC1X, e M\xCDN ({{min}}) n\xE3o \xE9 menor que M\xC1X ({{max}}).",emptyRangeExact:"Nunca \xE9 ativado: o m\xE1ximo n\xE3o \xE9 inclu\xEDdo. Para disparar com {{min}} exato, use M\xC1X = {{exact}}.",expression:"Express\xE3o",examples:"Exemplos",type:"Tipo",min:"M\xEDn",max:"M\xE1x",time:"Tempo",sec:"seg",text:"texto",length:"Compr.",fixedWidth:"largura fixa",rawPlaceholder:"QIO,7,1,1,2",splitByDelimiter:"Separar por delimitador",removeSplit:"Remover split",splitDescription:"Divide a resposta pelo delimitador escolhido e seleciona o campo N (base 0).",other:"Outro",fieldLabel:"Campo",fieldsOf:"Campos de",splitPreview:'separar por "{char}", campo {field}',apply:"Aplicar",fieldN:"campo",by:"por",of:"de",and:"e",triggers:"Dispara",when:"quando",changes:"muda",orLess:"ou menos",orMore:"ou mais",in:"em",conv:{signed:"Signed (com sinal)",unsigned:"Unsigned (sem sinal)",float:"Float (decimal)",hexBE:"HEX Big Endian",hexLE:"HEX Little Endian",ascii:"ASCII (texto)",delta:"Delta (varia\xE7\xE3o)"},cmd:{qio:"Estado de I/O",qcq:"Posi\xE7\xE3o GPS compacta",qcel:"Estado celular",qxb00:"Buffer capturador 00",qxb02:"Buffer capturador 02",qxb04:"Buffer capturador 04",qnt:"Valor do contador",qodo:"Od\xF4metro total/parcial",qssu:"Estado de flag",qbs:"Sensor BLE",qbsw:"Smart Wildcard BLE"},field:{ignition:"Igni\xE7\xE3o (0/1)",digitalInputs:"Entradas digitais (7 bits)",outputs3bit:"Sa\xEDdas (3 bits)",voltage:"Tens\xE3o principal (cV)",backupBattery:"Bateria backup (cV)",reportNum:"N\xFAmero do relat\xF3rio",date:"Data (DDMMAA)",time:"Hora (HHMMSS)",latitude:"Latitude (\xB1LLLLLLLL)",longitude:"Longitude (\xB1XXXXXXXXX)",speedKmh:"Velocidade (km/h)",heading:"Rumo (graus)",inputsHex:"Entradas (hex)",outputsHex:"Sa\xEDdas (hex)",voltageDiv10:"Tens\xE3o (/10)",odometerHex:"Od\xF4metro (hex)",gpsPower:"GPS ligado",fix:"Tipo de fix",satellites:"Sat\xE9lites",index:"\xCDndice",maxValue:"Valor m\xE1ximo",currentValue:"Valor atual",totalOdometer:"Od\xF4metro total",partialOdometer:"Od\xF4metro parcial",flagIndex:"\xCDndice do flag",state:"Estado (00/11)",headerIndex:"Header + \xEDndice",sensorId:"ID do sensor",sensorType:"Tipo do sensor",distance:"Dist\xE2ncia",outputValue:"Valor de sa\xEDda",headerStatus:"Header + status",filterUUID:"Filtro UUID",filterMajor:"Filtro Major",filterMinor:"Filtro Minor",timeoutSec:"Timeout (seg)",maxDistance:"Dist\xE2ncia m\xE1xima"},note:{xb00:"Conte\xFAdo depende da configura\xE7\xE3o de CXXB00",xb02:"Conte\xFAdo depende da configura\xE7\xE3o de CXXB02",xb04:"Conte\xFAdo depende da configura\xE7\xE3o de CXXB04",qbs:"Campos ap\xF3s ';' dependem do tipo de sensor",qbsw:"Detec\xE7\xF5es ativas listadas ap\xF3s a configura\xE7\xE3o"},example:{xb00Split:"Separar por ';'",xb02Split:"Separar por ','",xb04Ascii:"Texto ASCII"},delim:{label:"Delim.",semicolon:"Ponto e v\xEDrgula",comma:"V\xEDrgula",asterisk:"Asterisco",pipe:"Barra vertical",equals:"Igual",space:"Espa\xE7o"},preset:{ignByPos:"IGN por posi\xE7\xE3o",ignByPosDesc:"Campo IGN na resposta QIO por posi\xE7\xE3o fixa",ignBySplit:"IGN por split",ignBySplitDesc:"Campo IGN separando QIO por ';'",digitalInputSplit:"Entrada digital split",digitalInputSplitDesc:"Entradas digitais separando QIO por ';'",speedQCQ:"Velocidade QCQ",speedQCQDesc:"Velocidade na posi\xE7\xE3o fixa de QCQ",satellitesQCQ:"Sat\xE9lites QCQ",satellitesQCQDesc:"Poucos sat\xE9lites na posi\xE7\xE3o fixa de QCQ",fixModeQCQ:"Modo fix QCQ",fixModeQCQDesc:"Fix 3D na posi\xE7\xE3o fixa de QCQ",bufferXB00:"Buffer XB00",bufferXB00Desc:"Primeiro byte do buffer XB00",xb00SplitFloat:"XB00 split float",xb00SplitFloatDesc:"Campo float separando XB00 por ';'",gpsAntennaOk:"Antena GPS OK",gpsAntennaOkDesc:"Texto 'OK' na resposta da antena GPS",gpsAntennaOpen:"Antena GPS aberta",gpsAntennaOpenDesc:"Texto 'OPEN' na resposta da antena GPS",gpsAntennaShort:"Antena GPS curto",gpsAntennaShortDesc:"Texto 'SHORT' na resposta da antena GPS",hardBrake:"Frenagem brusca",hardBrakeDesc:"Delta negativo de velocidade em QCQ",hardAccel:"Acelera\xE7\xE3o brusca",hardAccelDesc:"Delta positivo de velocidade em QCQ",suddenChangeXB:"Varia\xE7\xE3o s\xFAbita XB",suddenChangeXBDesc:"Varia\xE7\xE3o s\xFAbita de valor no buffer XB00"}},fwCompat:{title:"Compatibilidade de firmware",intro:"O equipamento conectado ({{deviceFw}}) n\xE3o suporta tudo o que foi configurado:",ignVbatTh:"Limiares manuais de igni\xE7\xE3o por tens\xE3o",apModeCli:"AP WiFi em modo cliente",blackBox:"Caixa preta (CXBB)",owAutoDt:"Auto-atribui\xE7\xE3o de DT por TH/TL",drv:"Motorista (DRV)",drvHab:"Motorista: habilita\xE7\xE3o (corte H)",drvTaco:"Motorista: origem tac\xF3grafo",drvCorte:"Motorista: janela, aviso e corte",drvRpt:"Motorista: relat\xF3rios autom\xE1ticos e confirma\xE7\xE3o",drvBle:"Motorista por Bluetooth (DRVB)",owInvKey:"C\xF3digo da chave invertido (CXOW)",uartBaud3857:"Porta serial a 38400 ou 57600 bps",zones:"Zonas (cat\xE1logo de geocercas em massa, ZNA/ZNB)",requires:"requer v{{minFw}}",willSkip:"N\xE3o ser\xE1 enviado",willDowngrade:"Ser\xE1 enviado degradado",logSkipped:"FW: {{label}} omitido \u2014 requer v{{minFw}}, equipamento {{deviceFw}}",logDowngraded:"FW: {{label}} degradado \u2014 requer v{{minFw}}, equipamento {{deviceFw}}",continue:"Continuar sem estes comandos",cancel:"Cancelar"},assistantUi:{title:"Assistente",open:"Abrir o assistente (arraste para mover)",close:"Fechar (a conversa \xE9 mantida)",intro:"Assistente de configura\xE7\xE3o.",sessionExpired:"Sua sess\xE3o expirou. Entre novamente.",login:"Entrar",privacy:"A configura\xE7\xE3o e o estado do equipamento s\xE3o enviados a um servi\xE7o de IA externo, com as credenciais mascaradas e sem a posi\xE7\xE3o do ve\xEDculo. As conversas s\xE3o guardadas para melhorar o assistente. Revise o que ele prop\xF5e antes de aplicar ou enviar: o uso \xE9 responsabilidade do usu\xE1rio.",logout:"Sair",clearChat:"Apagar chat",clearChatTitle:"Apagar a conversa",clearAsk:"Apagar a conversa?",clear:"Apagar",no:"N\xE3o",usageTitle:"Conversa: {{pct}} % do m\xE1ximo ({{n}} mensagens)",usageFull:"A conversa est\xE1 cheia. Apague o chat para continuar (a configura\xE7\xE3o n\xE3o \xE9 alterada).",usageWarn:"A conversa est\xE1 em {{pct}} %. Quando encher ser\xE1 preciso apagar o chat para continuar.",writing:"escrevendo\u2026",thinking:"pensando\u2026",placeholder:"O que esta config faz?",send:"Enviar",goTo:"clique para ir",cmdInvalid:"Assim como est\xE1, o configurador n\xE3o aceita: {{motivo}}",sendTitle:"O assistente quer enviar ao equipamento",sendYes:"Enviar ao equipamento",sendPhysical:"Isto ativa uma sa\xEDda f\xEDsica do equipamento. Se estiver ligada a um corte de motor, uma sirene ou uma trava, vai atuar agora.",noChanges:"Sem altera\xE7\xF5es na configura\xE7\xE3o.",whatChanges:"O que muda",pending:"Fica pendente",modeNotice:"Ao aplicar, a configura\xE7\xE3o passa para o modo Avan\xE7ado, igual a importar pelo C\xF3digo.",viewCommands:"Ver os comandos",apply:"Aplicar",applied:"Aplicado. Toque em qualquer mudan\xE7a para ver onde ficou.",description:"Descri\xE7\xE3o da configura\xE7\xE3o",discard:"Descartar",models:"Modelos da configura\xE7\xE3o: {{despues}} (antes: {{antes}})",unspecified:"n\xE3o especificado",nameOf:"Nome de",before:"antes",sugTitle:"Experimente",sugThis:"O que faz isto que tenho selecionado?",sugStatus:"Como est\xE1 o equipamento?",sugCompare:"Compare o que o equipamento tem com esta configura\xE7\xE3o",sugExplain:"Explique esta configura\xE7\xE3o",sugCheck:"O que falta nesta configura\xE7\xE3o para funcionar?",sugSpeed:"Monte um aviso de excesso de velocidade com buzzer",sugWialon:"Quero reportar pelo Wialon",sugInputs:"Reporte quando uma porta abrir ou apertarem o p\xE2nico"}};var UC=(()=>{try{let e=localStorage.getItem("rinho_language");return e?JSON.parse(e):"es"}catch{return"es"}})();pe.use($o).init({resources:{es:{translation:Tp},en:{translation:Rp},pt:{translation:_p}},lng:UC,fallbackLng:"es",interpolation:{escapeValue:!1}});pe.on("languageChanged",e=>{document.documentElement.lang=e,localStorage.setItem("rinho_language",JSON.stringify(e))});var rl=pe;var S=(e,t)=>rl.t(`code.${e}`,t);function WC(e){return/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(e)}function Vo(e,t,r){return!t||!r?null:WC(t)?`>SIP${e}${t}/${r}<`:`>SIP${e}"${t}",${r}<`}var VC="QWD0| $rpt_num:1:'RNU'| $,pwr_ext:2:'V/100',odo:2:'OT:%.0f',csq:1:'CSQ',ign:1:'IGN'",GC="QWD0| $rpt_num:1:'RNU'| $,pwr_ext:2:'V/100',odo:2:'OT:%.0f',csq:1:'CSQ',ign:1:'IGN',c0:1:'ECU(0;0)',c1:1:'ECU(1;0)',c2:1:'ECU(2;0)',c3:2:'ECU(3;0)',c5:1:'ECU(5;0)',c6:1:'ECU(6;0)',c10:1:'ECU(10;0)',c12:2:'ECU(12;0)'";function qC(e){return Op(e)?GC:VC}function Np(e,{loginPassword:t,targetModels:r}={}){let a=[];if(e.mainProtocol!==void 0){let y=e.backEnabled?e.backProtocol:e.mainProtocol;a.push(`>SCXIP${e.mainProtocol}${y}${e.windowSize??1}<`)}if((e.mainProtocol==="W"||e.backEnabled&&e.backProtocol==="W")&&a.push(`>SWL${e.ipsPassword||""}<`),e.mainProtocol==="W"){let y=e.ucConfigs?.[0]?.expression;a.push(`>SUC00 ${y||qC(e)}<`)}a.push(Vo("0",e.ip0Address,e.ip0Port)||">SIP0<");let n=e.ip1Address||e.ip0Address,o=e.ip1Port||e.ip0Port,i=Vo("1",n,o),s=e.backEnabled?Vo("4",e.ip4Address,e.ip4Port):null,l=e.backEnabled?Vo("5",e.ip5Address,e.ip5Port):null;i&&a.push(i),s&&a.push(s),l&&a.push(l);let c=(e.keepAliveMain?"M":"")+(e.keepAliveBack?"B":"");if(c&&a.push(`>SKA${e.keepAlive},${c}<`),e.celEnabled!==void 0&&a.push(e.celEnabled?">SSSCELPWR11<":">SSSCELPWR00<"),e.copsMode!==void 0)if(e.copsMode===1&&e.copsOperator){let y=e.copsAct!==""&&e.copsAct!==void 0?`,${e.copsAct}`:"";a.push(`>SCOPS${e.copsRegMode},2,"${e.copsOperator}"${y}<`)}else a.push(">SCOPS0<");if(e.celEnabled){e.apnName?a.push(`>SCXAPN${e.apnName},${e.apnUser},${e.apnPass}<`):a.push(">SCXAPN,,<");let y=Vd(r);if(e.sim1Enabled&&y?a.push(">SCXSIM1<"):a.push(">SCXSIM0<"),e.sim1Enabled&&y){if(e.sim1CopsMode===1&&e.sim1CopsOperator){let g=e.sim1CopsAct!==""&&e.sim1CopsAct!==void 0?`,${e.sim1CopsAct}`:"";a.push(`>SCOP1${e.sim1CopsRegMode},2,"${e.sim1CopsOperator}"${g}<`)}else a.push(">SCOP10<");e.sim1ApnName?a.push(`>SCXAP1${e.sim1ApnName},${e.sim1ApnUser},${e.sim1ApnPass}<`):a.push(">SCXAP1,,<")}}if(e.smsRetries!==void 0||e.smsTimeout!==void 0){let y=String(e.smsRetries??1).padStart(2,"0"),g=String(e.smsTimeout??0).padStart(5,"0");a.push(`>SCXSMS${y}${g}<`)}if(e.smsWhitelist!==void 0&&a.push(`>SCXSMW${e.smsWhitelist}<`),e.smConfigs)for(let[y,g]of Object.entries(e.smConfigs))a.push(`>SSM${y}${g.phone||""}<`);if(a.push(">STD**D<"),e.mode==="advanced"&&e.timerConfigs&&Object.keys(e.timerConfigs).length>0)for(let[y,g]of Object.entries(e.timerConfigs)){let E=String(y).padStart(2,"0"),_=g.enabled?"E":"D",N=String(g.timeout??0).padStart(5,"0"),B=String(g.distance??0).padStart(5,"0");a.push(`>STD${E}${_}${N}${B}<`)}else a.push(`>STD00E${String(e.td00).padStart(5,"0")}00000<`),a.push(`>STD01E${String(e.td01).padStart(5,"0")}00000<`);if(e.mode==="advanced"&&e.dcConfigs&&Object.keys(e.dcConfigs).length>0)for(let[y,g]of Object.entries(e.dcConfigs))g.enabled&&a.push(`>SDC${String(y).padStart(2,"0")}*${String(g.angle??30).padStart(3,"0")}<`);else a.push(`>SDC00*${String(e.headingAngle).padStart(3,"0")}<`);if(e.udpSourcePort&&a.push(`>SCXUDPSRC${e.udpSourcePort}<`),e.vbuMode!==void 0&&a.push(`>SCXVBU${e.vbuMode}<`),e.rfEnabled!==void 0&&a.push(`>SCXRF${e.rfEnabled}<`),e.vcTimeout!==void 0){let y=String(e.vcTimeout??600).padStart(3,"0"),g=String(e.vcPreamp??6).padStart(2,"0"),E=String(e.vcSpk??5).padStart(2,"0");a.push(`>SCXVC${y}${g}${E}<`)}if(e.gpsMode!==void 0&&a.push(`>SCXGPS${e.gpsMode}<`),e.gpsFixMin!==void 0&&a.push(`>SCXCQ${e.gpsFixMin}${String(e.gpsPdopMax??5).padStart(2,"0")}${String(e.gpsSatsMin??8).padStart(2,"0")}<`),e.ignMode!==void 0){let y=e.ignTon,g=e.ignToff;(y===void 0||y===100)&&(g===void 0||g===100)?a.push(`>SCXIGN${e.ignMode}<`):a.push(`>SCXIGN${e.ignMode},${y??100},${g??100}<`)}if(e.ignVbatManual===!0){let y=(_,N,B)=>Math.min(B,Math.max(N,Math.round(_))),g=y(e.ignVbatOn??133,81,320),E=y(e.ignVbatOff??129,80,g-1);a.push(`>SCXIGNV1,${g},${E}<`)}else e.ignVbatManual===!1&&a.push(">SCXIGNV0<");let u=e.canConfigs?.[0]||null;if(u?u.enabled:e.canEnabled){let y=u?.protocol||e.canProtocol||"OBDII",g=e.canCustom,E=g?`${y}.${g}`:y,_=u?.bps||e.canBps||"500K",N=u?.bits||e.canBits||11,B=u?.fuelTrip??e.canFuelTrip??100,F=u?.fuelEngine??e.canFuelEngine??0,V=N!==11||B!==0||F!==0?`,${N},${B},${F}`:"";a.push(`>SCXCAN1,${_},${E}${V}<`)}if(e.ecuConfigs&&Object.keys(e.ecuConfigs).length>0)for(let[y,g]of Object.entries(e.ecuConfigs)){let E=String(y).padStart(2,"0"),_=g.enabled?"E":"D";a.push(`>SCXECU${E}${_},${g.canId||"0"},${g.startBit??0},${g.bitLength??8},${g.factor||"1.000"},${g.offset||"0.0"},${g.min??0},${g.max??65535},${g.endian||"LE"},${g.sign||"U"}<`)}let f=e.owConfigs?.[0];if(f){let y=parseInt(f.enableValue)||0,g=f.enabled?y>0?y:1:0,E=f.useAsKey??0,_=f.invKey!==void 0&&f.invKey!==null&&f.invKey!==""?`,${parseInt(f.invKey)?1:0}`:"";a.push(`>SCXOW${g},${E}${_}<`)}else e.owEnabled!==void 0&&a.push(`>SCXOW${e.owEnabled?"1":"0"},0<`);if(e.dtConfigs&&Object.keys(e.dtConfigs).length>0)for(let[y,g]of Object.entries(e.dtConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0");a.push(`>SDT${E},${g.enabled?"1":"0"},${g.rom||""}<`)}if(e.wifiEnabled){let y=e.wifiMode??0,g=e.wifiAutoDestiny??(y===0?1:0);a.push(`>SCXWIF1,${y},${g}<`)}else e.wifiEnabled!==void 0&&a.push(">SCXWIF0,0,0<");if(e.wifiEnabled||e.ssid0!==void 0){let y=e.wifiMode??0;for(let g=0;g<10;g++){let E=String(g).padStart(2,"0"),_=e[`ssid${g}`],N=e[`pass${g}`]||"",B=e[`sapw${g}Ip`]||"",F=e[`sapw${g}Mask`]||"",V=e[`sapw${g}Gw`]||"",se=B||F||V?`,${B},${F},${V}`:"";a.push(_?`>SAPW${E}${_},${N}${se}<`:`>SAPW${E},<`)}if(y===1||e.apxSsid){let g=e.apxSsid||"",E=e.apxPass||"",_=e.apxIp||"192.168.1.1",N=e.apxMask||"255.255.255.0",B=e.apxGw||"192.168.1.1";a.push(`>SAPX${g},${E},${_},${N},${B}<`)}if(e.apySsid){let g=e.apySsid||"",E=e.apyPass||"",_=e.apyIp||"192.168.2.1",N=e.apyMask||"255.255.255.0",B=e.apyGw||"192.168.2.1";a.push(`>SAPY${g},${E},${_},${N},${B}<`)}}let h=e.webServer;if(h){let y=h.language??0,g=h.title||"",E=h.pin||"",_=h.console?1:0,N=(h.buttons||[]).map(V=>{if(!V.label)return null;switch(V.type){case"command":return`${V.label}/${V.command||"SRESET"}`;case"code0":return`${V.label}/CODE0`;case"code1":return`${V.label}/CODE1`;case"xb":return`${V.label}/XB${V.xbIndex||"01"}${V.xbVisible||"V"}${V.xbType||"A"}`;default:return null}}).filter(Boolean),F=[h.enabled?"E":"D",y,g,E,_,...N];a.push(`>SWS${F.join(",")}<`)}let v=Array.isArray(r)&&r.length>0,b=v?dn(r):8;for(let y=0;y<=7;y++){if(y>=b&&y!==7)continue;let g=`it${String(y).padStart(2,"0")}`,E=e[g];if(E){let _=String(y).padStart(2,"0"),N=String(E.on).padStart(4,"0"),B=String(E.off).padStart(4,"0");a.push(`>SIT${_}${N}${B}<`)}}let x=v?ea(r):3;for(let y=0;y<=2;y++){if(y>=x)continue;let g=`xp${String(y).padStart(2,"0")}`,E=e[g];if(E){let _=String(y).padStart(2,"0"),N=String(E.duration).padStart(4,"0"),B=String(E.blinkOn).padStart(4,"0"),F=String(E.blinkOff).padStart(4,"0");a.push(`>SCXXP${_}${N}${B}${F}<`)}}if(e.gcConfigs?.[0]){let y=e.gcConfigs[0],g=y.enabled?"E":"D",E=y.invert?`,${y.invert}`:"";a.push(`>SGC${g},${y.xpIndex??0},${y.stepMs??30},${y.intervalS??4},${y.maxS??180}${E}<`)}e.tag!==void 0&&a.push(`>STAG${(e.tag||"").trim()}<`);let C=e.dlEnabled??1,d=e.dlDestiny||"ALL",m=e.dlReint??0,w=e.dlTime??0,A=e.dlMode??0;if(a.push(`>SCXDL${C},${d},${m},${w},${A}<`),a.push(">SVL**D<"),e.vlConfigs&&Object.keys(e.vlConfigs).length>0)for(let[y,g]of Object.entries(e.vlConfigs).sort(([E],[_])=>E-_)){if(!g.enabled)continue;let E=String(y).padStart(2,"0"),_=String(g.speed??120).padStart(4,"0"),N=String(g.filtered??1),B=Number(g.settle)>0?String(Math.min(999,Math.round(Number(g.settle)))).padStart(3,"0"):"";a.push(`>SVL${E}E${_}${N}${B}<`)}if(e.mode!=="advanced"&&a.push(...zC(e)),e.mode==="advanced"&&e.arConfigs&&Object.keys(e.arConfigs).length>0)for(let[y,g]of Object.entries(e.arConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0"),_=g.min??0,N=g.max??9999,B=(_>=0?"+":"-")+String(Math.abs(Math.round(_))).padStart(4,"0"),F=(N>=0?"+":"-")+String(Math.abs(Math.round(N))).padStart(4,"0"),V=g.debounce!==void 0?String(g.debounce).padStart(3,"0"):"",se=String(g.source??6).padStart(2,"0");a.push(`>SAR${E}${se}${B}${F}${V}<`)}else a.push(...XC(e));if(e.mode==="advanced"&&e.pkConfigs&&Object.keys(e.pkConfigs).length>0){let y=e.pkConfigs[0];if(y?.enabled){let g=String(y.radius??50).padStart(4,"0"),E=String(y.debounce??15).padStart(4,"0");a.push(`>SPKE${g}${E}<`)}else a.push(">SPKD<")}else a.push(...KC(e));if(a.push(">SWP**D<"),a.push(...HC(e)),e.dvConfigs&&Object.keys(e.dvConfigs).length>0)for(let[y,g]of Object.entries(e.dvConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0"),_=(g.velDiff??0)<0?"-":"+",N=String(Math.abs(g.velDiff??10)).padStart(3,"0");a.push(`>SDV${E}${_}${N}<`)}if(e.hmConfigs&&Object.keys(e.hmConfigs).length>0)for(let[y,g]of Object.entries(e.hmConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0");a.push(`>SHM${E}E,${g.eventType??0},${g.magnitude??7},${g.minSpeed??5},${g.hysteresis??10},${g.timeWindow??3e3},${g.cooldown??5}<`)}if(a.push(">SUV*55AA<"),e.ntConfigs&&Object.keys(e.ntConfigs).length>0)for(let[y,g]of Object.entries(e.ntConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0"),_=String(g.maxcount??10).padStart(5,"0");a.push(`>SNT${E}${_}<`)}if(e.uConfigs&&Object.keys(e.uConfigs).length>0)for(let[y,g]of Object.entries(e.uConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0"),_=g.value?"11":"00";a.push(`>SSSU${E}${_}<`)}if(e.trConfigs&&Object.keys(e.trConfigs).length>0)for(let[y,g]of Object.entries(e.trConfigs)){let E=String(y).padStart(2,"0"),_=(g.hora??0)<0?"**":String(g.hora??0).padStart(2,"0"),N=(g.minuto??0)<0?"**":String(g.minuto??0).padStart(2,"0"),B=(g.segundo??0)<0?"**":String(g.segundo??0).padStart(2,"0");a.push(`>STR${E}${_}${N}${B}<`)}if(e.mvtConfigs&&Object.keys(e.mvtConfigs).length>0){let y=(g,E)=>String(Math.max(0,Math.min(9999,Math.round(Number(g??E))||0))).padStart(4,"0");for(let[g,E]of Object.entries(e.mvtConfigs))E.enabled&&a.push(`>SMVT${String(g).padStart(2,"0")}${y(E.deltaX,500)}${y(E.deltaY,500)}${y(E.deltaZ,500)}<`)}if(e.cxacConfigs?.[0]){let y=String(e.cxacConfigs[0].threshold??30).padStart(3,"0");a.push(`>SCXAC${y}<`)}if(e.cxainConfigs){let y=E=>{let _=Math.max(-9999,Math.min(9999,Math.round(Number(E)||0)));return(_<0?"-":"+")+String(Math.abs(_)).padStart(4,"0")},g=E=>y(Math.round((Number(E)||0)*100));for(let E of[0,1,2,7]){let _=e.cxainConfigs[E];if(!_?.enabled)continue;let N=String(E).padStart(2,"0");a.push(`>SCXAIN${N}${y(_.min)}${y(_.max)}${g(_.vA)}${g(_.vB)}${y(_.valueA)}${y(_.valueB)}<`)}}let R=e.tkConfigs?.[0]??e.tkConfig;if(R?.enabled?a.push(`>STKE,${R.autoMode??1},${R.stabTime??30},${R.detectTime??10},${R.angleThreshold??15}<`):R&&a.push(">STKD<"),e.cxxbConfigs&&Object.keys(e.cxxbConfigs).length>0)for(let[y,g]of Object.entries(e.cxxbConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0"),_=g.source||"S",N=String(g.idxSource??0),B=String(g.rxChars??0).padStart(3,"0"),F=String(g.rxTimeout??0).padStart(3,"0"),V=g.header||"",se=g.footer||"",Te=g.displayMode||"A",Ue=g.showHeadFoot?"1":"0";a.push(`>SCXXB${E}${_}${N}${B}${F},${V},${se},${Te},${Ue}<`)}if(a.push(">SICL*55AA<"),e.icConfigs&&Object.keys(e.icConfigs).length>0)for(let[y,g]of Object.entries(e.icConfigs))!g.enabled||!g.ibutton||a.push(`>SICL${String(y).padStart(2,"0")} ${g.ibutton}<`);let I=e.drvConfigs?.[0];if(I){let y=(N,B)=>N==null||N===""?B:N,g=N=>N==null?"":String(N),E=N=>N==null?"":String(N).trim().toUpperCase()||"-",_=[y(I.origen,"1"),y(I.lista,0),y(I.retencion,0),g(I.ventana),g(I.aviso),g(I.corte),g(I.velCorte),E(I.rptLogin),E(I.rptLogout),E(I.rptInvalido),E(I.rptSinChofer),g(I.dst),g(I.xpOk)].map(String);for(;_.length>3&&_[_.length-1]==="";)_.pop();a.push(`>SCXDRV${_.join(",")}<`)}let D=e.drvbConfigs?.[0];if(D&&(!r?.length||un(r))){let y=D.slot===void 0||D.slot===null||D.slot===""?"-":String(D.slot);a.push(`>SCXDRVB${y},${D.modo||"P"},${D.id||"M"},${Number(D.toggle)?1:0}<`)}if(e.cidConfigs&&Object.keys(e.cidConfigs).length>0)for(let[y,g]of Object.entries(e.cidConfigs))a.push(`>SCID${y}${g.mode??0}${g.cidString||""}<`);if(e.mcConfigs&&Object.keys(e.mcConfigs).length>0)for(let[y,g]of Object.entries(e.mcConfigs)){let E=parseInt(y,10);if(!Number.isInteger(E)||E<0||E>=nn)continue;let _=g.enabled===!1?0:Number(g.mcc),N=Number.isFinite(_)?Math.min(999,Math.max(0,Math.trunc(_))):0;a.push(`>SMC${String(E).padStart(2,"0")}${String(N).padStart(3,"0")}<`)}if(e.cxtrConfigs&&Object.keys(e.cxtrConfigs).length>0){let y=e.cxtrConfigs[0]||e.cxtrConfigs.M||Object.values(e.cxtrConfigs)[0];y&&y.enabled&&y.baudrate&&a.push(`>SCXTRM${y.baudrate}<`)}if(e.ucConfigs&&Object.keys(e.ucConfigs).length>0){let y=e.mainProtocol==="W";for(let[g,E]of Object.entries(e.ucConfigs)){if(!E.enabled||!E.expression||y&&g==="0")continue;let _=Number(g).toString(16).toUpperCase().padStart(2,"0");a.push(`>SUC${_} ${E.expression}<`)}}let T=e.cxbbConfigs?.[0];if(T&&Po(T.reportType)){let y=(E,_,N)=>{let B=Math.trunc(Number(E));return Number.isFinite(B)?Math.min(_,Math.max(0,B)):N},g=y(T.sampleRate,255,1);a.push(`>SCXBB,${T.reportType},${g},${y(T.future,20,10)},${y(T.history,20,10)}<`)}if(e.uvConfigs&&Object.keys(e.uvConfigs).length>0)for(let[y,g]of Object.entries(e.uvConfigs)){if(!g.enabled||!g.expression)continue;let E=g.convType||"S",_=String(y).padStart(2,"0");a.push(`>SUV${_}${E}${g.expression}<`)}if(e.bthConfigs?.[0]){let y=e.bthConfigs[0];a.push(`>SCXBTH${y.power?"1":"0"},${y.name||""},${y.pincode||""},${y.timeout??0}<`)}else e.bthPower!==void 0&&a.push(e.bthPower?">SSSBTHPWR11<":">SSSBTHPWR00<");if(e.beConfigs&&Object.keys(e.beConfigs).length>0)for(let[y,g]of Object.entries(e.beConfigs)){if(!g.id)continue;let E=String(y).padStart(2,"0");a.push(`>SBE${E}${g.id||""},${g.dist??0},${g.timeout??30}<`)}if(e.bsConfigs&&Object.keys(e.bsConfigs).length>0)for(let[y,g]of Object.entries(e.bsConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0");a.push(`>SBS${E}E,${g.id||""},${g.type??0},${g.timeout??60},${g.dist??0}${g.outval?`,${g.outval}`:""}<`)}if(e.bswConfigs&&Object.keys(e.bswConfigs).length>0)for(let[y,g]of Object.entries(e.bswConfigs)){if(!g.enabled)continue;let E=String(y).padStart(2,"0"),_=g.major===""||g.major===void 0||g.major===null||Number(g.major)<0?"":String(g.major),N=g.minor===""||g.minor===void 0||g.minor===null||Number(g.minor)<0?"":String(g.minor);a.push(`>SBSW${E}E,${g.targets||"FF"},${g.uuid||""},${_},${N},${g.timeout??30},${g.dist??0}<`)}if(a.push(...tx(e)),a.push(">SRG*55AA<"),a.push(...jC(e)),e.newPassword&&e.newPassword!==(t||"")){let y=t||"";a.push(`>SPW${y};${e.newPassword}<`)}return a}function zC(e){let t=e.velAlert;if(!t||!t.enabled)return[];let r=t.resources?.vl||[0,1],a=s=>String(s).padStart(4,"0"),n=String(r[0]).padStart(2,"0"),o=String(r[1]).padStart(2,"0"),i=[];return i.push(`>SVL${n}E${a(t.onSpeed??120)}1<`),t.activateOutput!==!1&&i.push(`>SVL${o}E${a(t.offSpeed??100)}1<`),i}function Op(e){let t=e.canConfigs?.[0]||null;return!!(t?t.enabled:e.canEnabled)}function fr(e,t,r,a){let n;return e.mainProtocol==="W"?n="GU0":Op(e)?n="GER":n="GCQ",`{${n}${t}${r}${a}}`}function XC(e){let t=e.batteryAlert;if(!t||!t.enabled)return[];let r=t.resources?.ar||[0,1,2],a=i=>String(Math.round(i??0)).padStart(4,"0"),n=String(Math.round((t.debounce??5)*10)).padStart(3,"0"),o=i=>String(r[i]).padStart(2,"0");return[`>SAR${o(0)}06+${a(t.lowMin??550)}+${a(t.lowMax??1050)}${n}<`,`>SAR${o(1)}06+${a(t.okMin??1100)}+9999${n}<`,`>SAR${o(2)}06+0000+${a(t.disconnectMax??500)}${n}<`]}function HC(e){return e.waypoints?.length?e.waypoints.map(t=>{let r=String(t.index??0).padStart(2,"0");if(!t.enabled)return`>SWP${r}D<`;let a=t.lat,n=t.lng;if(a==null||a==="")return null;let o=Math.round(Math.abs(Number(a))*1e5),i=Math.round(Math.abs(Number(n))*1e5),s=Number(a)<0?"-":"+",l=Number(n)<0?"-":"+",c=s+String(o).padStart(7,"0"),u=l+String(i).padStart(8,"0"),p=String(Math.round(t.radius||100)).padStart(6,"0");return`>SWP${r}E${c}${u}${p}000000<`}).filter(Boolean):[]}function jC(e){if(!e.regions?.length)return[];let t=[];for(let r of e.regions){if(!r.enabled)continue;let a=(r.vertices||[]).filter(o=>o.lat!==""&&o.lng!=="");if(a.length<3)continue;let n=String(r.index??0).padStart(2,"0");for(let o=0;o<4;o++){let i=a.slice(o*8,o*8+8),l=[...i,...Array(8-i.length).fill(null)].map(c=>{if(!c)return"+0000000+00000000";let u=Math.round(Math.abs(Number(c.lat))*1e5),p=Math.round(Math.abs(Number(c.lng))*1e5),f=Number(c.lat)<0?"-":"+",h=Number(c.lng)<0?"-":"+";return`${f}${String(u).padStart(7,"0")}${h}${String(p).padStart(8,"0")}`}).join(",");t.push(`>SRG${n}${o},${l}<`)}}return t}function KC(e){let t=e.parkingAlert;if(!t||!t.enabled)return[];let r=String(t.radius??50).padStart(4,"0"),a=String(t.debounce??15).padStart(4,"0");return[`>SPKE${r}${a}<`]}function Pp(e){if(!e||e.enabled===!1)return null;if(e.useRaw)return e.raw||null;if(!e.terms?.length)return null;let t=e.terms,r=Go(t[0]);for(let a=1;a<t.length;a++)r+=Go(t[a])+(e.operators?.[a-1]||"&");return r||null}function Go({token:e,index:t,negate:r}){let n=on(e)?e==="RL"?Zr(t??0):String(t??0).padStart(2,"0"):"";return`${e}${n}${r?"!":""}`}function ZC(e,t){if(t.type==="report"){let r=Oe(Wd(t,e.eventLabels)),a=t.dest||(t.log!==!1?"LOG":"BUF"),n={LOG:";@LOG",TRM:";@TRM",BTH:";@BTH",BUF:"",BACK:";@BACK",SM0:";@SM0",SM1:";@SM1",SM2:";@SM2",SM3:";@SM3",SM4:";@SM4"}[a]||"";return t.reportTag?`{${t.reportTag}${r}${t.priority||"H"}${n}}`:fr(e,r,t.priority||"H",n)}if(t.type==="output")return`{SSSXP${String(t.xp??"00").padStart(2,"0")}${t.state||"11"}}`;if(t.type==="userVar")return`{SSSU${String(t.uIdx??0).padStart(2,"0")}${t.state||"11"}}`;if(t.type==="timer_reset"){let r=t.timerCmd||"R",a=String(t.timer??0).padStart(2,"0");if(t.reconfigure&&(r==="E"||r==="R")){let n=String(t.timerTime??0).padStart(5,"0"),o=String(t.timerDistance??0).padStart(5,"0");return`{STD${a}${r}${n}${o}}`}return`{STD${a}${r}}`}if(t.type==="parking")return`{${t.parkCmd||"SPKA"}}`;if(t.type==="gpsMode")return`{SCXGPS${t.gpsMode||"0"}}`;if(t.type==="counter"){let r=String(t.ntIdx??0).padStart(2,"0"),a=t.ntCmd||"S";return`{SNT${r}${a}}`}if(t.type==="sleep"){let r=t.sleepCmd||"SKO-";if(r==="SKO-"||r==="SKO+"||r==="SKOD")return`{${r}}`;if(r==="SKO++"){let a=t.sleepUnit||"",n=String(t.sleepTime??60).padStart(a?3:4,"0"),o=t.sleepAcc?"1":"0",i=t.sleepIo?"1":"0",s=t.sleepCel?"1":"0",l=t.sleepGps?"1":"0",c=t.sleepInt?"1":"0",u=t.sleepExt?"1":"0";return`{SKO++${a}${n}${o}${i}${s}${l}${c}${u}}`}if(r==="SKOE"){let a=String(t.koReposoFull??10).padStart(4,"0"),n=String(t.koGpsOff??50).padStart(4,"0"),o=String(t.koReposo??60).padStart(4,"0");return`{SKOE${a}${n}${o}}`}return`{${r}}`}return t.type==="gradualCut"?`{${t.gcCmd||"SGCA"}}`:t.type==="raw"&&t.cmd?`{${t.cmd}}`:""}function al(e,t){if(!e?.length)return"";let r=Go(e[0]);for(let a=1;a<e.length;a++)r+=Go(e[a])+(t?.[a-1]||"&");return r}function qo(e){let t=[];for(let a of e.rules){if(!a.enabled)continue;let n=Oe(a.eventNum),o=a.priority,i=a.log?";@LOG":"",s=fr(e,n,o,i);a.id===2&&(s=`${fr(e,n,o,i)}{STD00R}{STD01R}`);let l=a.trigger,c=a.condition||null;t.push({_source:"fixed",_id:a.id,_label:a.label,trg:l,cnd:c,acc:s})}t.push(...QC(e)),t.push(...YC(e)),t.push(...JC(e));let r=[...e.customRules||[]].sort((a,n)=>{let o=a.slot??1/0,i=n.slot??1/0;return o-i});for(let a of r){let n=a.trigger||{},o=n.useRaw?n.raw||"":al(n.terms,n.operators),i=n.sense||"+";if(!o)continue;let s=Pp(a.condition),l=(a.actions||[]).map(c=>ZC(e,c)).join("");t.push({_source:"custom",_label:a.label||"",_enabled:a.enabled!==!1,_slot:a.slot,_trig:n,_cnd:a.condition,trg:`${o}${i}`,cnd:s,acc:l})}return t}function QC(e){let t=e.velAlert;if(!t||!t.enabled)return[];let r=[],a=t.output||"00",n=t.resources?.vl||[0,1],o=String(n[0]).padStart(2,"0"),i=String(n[1]).padStart(2,"0"),s=t.log!==!1,l=s?"L":t.priority||"H",c=s?";@LOG":"",u="";t.onEvent!==!1&&(u+=fr(e,Oe(t.eventNum??40),l,c)),t.activateOutput!==!1&&(u+=`{SSSXP${a}11}`);let p=t.ignCond?"IGN":null;r.push({_source:"module:speed",_label:"Exceso de velocidad",trg:`VL${o}+`,cnd:p,acc:u});let f=t.offLog!==!1,h=f?"L":t.offPriority||"L",v=f?";@LOG":"",b="";return t.offEvent!==!1&&(b+=fr(e,Oe(t.offEventNum??41),h,v)),t.activateOutput!==!1&&(b+=`{SSSXP${a}00}`),r.push({_source:"module:speed",_label:"Restablecimiento de velocidad",trg:`VL${i}-`,cnd:null,acc:b}),r}function YC(e){let t=e.batteryAlert;if(!t||!t.enabled)return[];let r=[],a=(c,u,p,f)=>{if(!c)return"";let h=Oe(u);return fr(e,h,p,f?";@LOG":"")},n=t.resources?.ar||[0,1,2],o=c=>String(n[c]).padStart(2,"0"),i=a(t.lowEvent!==!1,t.lowEventNum??37,t.lowPriority||"H",t.lowLog!==!1);i&&r.push({_source:"module:battery",_label:"Bater\xEDa baja",trg:`AR${o(0)}+`,cnd:null,acc:i});let s=a(t.okEvent!==!1,t.okEventNum??38,t.okPriority||"L",t.okLog!==!1);s&&r.push({_source:"module:battery",_label:"Bater\xEDa OK",trg:`AR${o(1)}+`,cnd:null,acc:s});let l=a(t.disconnectEvent!==!1,t.disconnectEventNum??39,t.disconnectPriority||"H",t.disconnectLog!==!1);return l&&r.push({_source:"module:battery",_label:"Bater\xEDa desconectada",trg:`AR${o(2)}+`,cnd:null,acc:l}),r}function JC(e){let t=e.parkingAlert;if(!t||!t.enabled)return[];let r=[],a=String(t.index??0).padStart(2,"0"),n="{SPKA}";if(t.changeGps&&(n+="{SCXGPS1}"),r.push({_source:"module:parking",_label:"Activar parking al apagar IGN",trg:"IGN-",cnd:null,acc:n}),t.event!==!1){let o=Oe(t.eventNum??120),i=t.log!==!1?";@LOG":"",s=fr(e,o,t.priority||"H",i);t.restoreGps&&(s+="{SCXGPS0}"),r.push({_source:"module:parking",_label:"Alerta de movimiento en parking",trg:`PK${a}+`,cnd:"IGN!",acc:s})}return r}function ex(e,t){let r=e._trig,a=e._cnd,n=l=>l&&!l.useRaw&&(l.terms||[]).some(c=>c.token==="RL"&&t.has(c.index));if(!n(r)&&!n(a))return null;let o=l=>(l||[]).map(c=>c.token==="RL"&&t.has(c.index)?{...c,index:t.get(c.index)}:c),i=e.trg;n(r)&&(i=`${al(o(r.terms),r.operators)}${r.sense||"+"}`);let s=e.cnd;return n(a)&&(s=Pp({...a,terms:o(a.terms)})),{trg:i,cnd:s}}function tx(e){let t=[];t.push(">SRL**D<");let r=e.mode==="advanced"?qo({...e,rules:[],velAlert:{enabled:!1},batteryAlert:{enabled:!1},parkingAlert:{enabled:!1}}):qo(e),a=e.mode==="advanced",n=0,o=a?-1:50,i=new Set,s=[],l=new Map;for(let c of r){let u=c._enabled!==!1;!a&&c._source==="custom"&&n<o&&(n=o);let p=n++;for(a&&c._slot!==void 0&&c._slot!==null&&(p=c._slot);i.has(p);)p++;p>=196||(i.add(p),c._source==="custom"&&c._slot!=null&&c._slot!==p&&l.set(c._slot,p),s.push({u:c,assignedSlot:p,ruleEnabled:u}))}for(let{u:c,assignedSlot:u,ruleEnabled:p}of s){let f=c.trg,h=c.cnd;if(c._source==="custom"&&l.size){let x=ex(c,l);x&&(f=x.trg,h=x.cnd)}let b=`>SRL${Zr(u)}${p?"E":"D"};TRG=${f}`;h&&(b+=`;CND=${h}`),c.acc&&(b+=`;ACC=${c.acc}`),b+="<",t.push(b)}return(e.wifiEnabled||e.ssid0!==void 0)&&!a&&t.push(">SRLFFE;TRG=PWR+;ACC={SSSWIFPWR11}<"),t}function rx(e){let t={},r=e.mode==="advanced"?qo({...e,rules:[],velAlert:{enabled:!1},batteryAlert:{enabled:!1},parkingAlert:{enabled:!1}}):qo(e),a=e.mode==="advanced",n=0,o=a?-1:50,i=new Set;for(let s of r){!a&&s._source==="custom"&&n<o&&(n=o);let l=n++;for(a&&s._slot!==void 0&&s._slot!==null&&(l=s._slot);i.has(l);)l++;l>=196||(i.add(l),s._label&&(t[Zr(l)]=s._label))}return t}function oa(e,t){let r=e.slice(1,-1),a={T:"TAIP TCP",P:"TAIP UDP",W:"Wialon IPS"},n={0:S("gpsModeAlways"),1:S("gpsModeIgn"),2:S("gpsModeSpeed")},o={0:S("ignNormal"),1:S("ignManual"),2:S("ignVoltage"),3:S("ignManualLiberaIn07")},i=l=>l<60?`${l}s`:l<3600?`${Math.floor(l/60)}min`:`${Math.floor(l/3600)}h ${Math.floor(l%3600/60)}min`;if(r.startsWith("SWL"))return r.slice(3)?S("ipsPassword",{pw:r.slice(3)}):S("ipsPasswordEmpty");if(r.startsWith("SCXIP")){let l=a[r[5]]||r[5],c=a[r[6]]||r[6],u=r[7];return S("protoMain",{main:l,back:c,win:u})}if(r.startsWith("SIP")){let l=r[3],u={0:S("serverPrimary"),1:S("serverSecondary"),4:S("serverBackPrimary"),5:S("serverBackSecondary")}[l]||`IP${l}`;return r.length<=4?S("serverEmpty",{label:u}):`${u}`}if(r.startsWith("SKA")){let l=r.slice(r.indexOf(",")+1);return S("keepAlive",{secs:t.keepAlive,ch:l})}if(r==="SSSCELPWR11")return S("modemOn");if(r==="SSSCELPWR00")return S("modemOff");if(r.startsWith("SCOPS0"))return S("operatorAuto");if(r.startsWith("SCOPS"))return S("operatorManual",{op:t.copsOperator||"?"});if(r.startsWith("SCXAPN")){let l=r.slice(6).split(",")[0];return l?S("apnSim0",{apn:l}):S("apnCleared")}if(r==="SCXSIM0")return S("simModeSingle");if(r==="SCXSIM1")return S("simModeSwitch");if(r.startsWith("SCOP10"))return S("sim1OperatorAuto");if(r.startsWith("SCOP1"))return S("sim1OperatorManual",{op:t.sim1CopsOperator||"?"});if(r.startsWith("SCXAP1")){let l=r.slice(6).split(",")[0];return l?S("sim1Apn",{apn:l}):S("sim1ApnCleared")}if(r.startsWith("STD00"))return S("timerIgnOn",{time:i(t.td00)});if(r.startsWith("STD01"))return S("timerIgnOff",{time:i(t.td01)});if(r.startsWith("SDC00"))return S("headingChange",{angle:t.headingAngle});if(r.startsWith("SCXGPS"))return S("gpsMode",{mode:n[r.slice(5)]||r.slice(5)});if(r.startsWith("SCXCQ"))return S("gpsQuality",{fix:r[5],pdop:parseInt(r.slice(6,8)),sats:parseInt(r.slice(8,10))});if(r.startsWith("SCXIGNV")){let l=r.slice(7).split(",");return l[0]==="1"&&l[1]&&l[2]?S("ignVbatManual",{on:(parseInt(l[1])/10).toFixed(1),off:(parseInt(l[2])/10).toFixed(1)}):S("ignVbatAuto")}if(r.startsWith("SCXIGN")){let l=r.slice(6).split(","),c=o[l[0]]||l[0];if(l.length>=3){let u=(parseInt(l[1])/10).toFixed(1),p=(parseInt(l[2])/10).toFixed(1);return S("ignitionWithTimes",{mode:c,ton:u,toff:p})}return S("ignition",{mode:c})}if(r.startsWith("STAG"))return r.slice(4)?S("tagDevice",{tag:r.slice(4)}):S("tagEmpty");if(r.startsWith("SPW"))return S("passwordChange");if(r.startsWith("SIT")){let l=parseInt(r.slice(3,5)),c=parseInt(r.slice(5,9)),u=parseInt(r.slice(9,13)),p=`IN${String(l).padStart(2,"0")}`;return S("inputDebounce",{label:p,on:c*100,off:u*100})}if(r.startsWith("SCXXP")){let l=parseInt(r.slice(5,7)),c=parseInt(r.slice(7,11)),u=parseInt(r.slice(11,15)),p=parseInt(r.slice(15,19)),f=`OUT${String(l).padStart(2,"0")}`;if(c===9999&&u===9999)return S("outputDisabled",{label:f});let h=[f];return c>0&&h.push(S("outputDuration",{dur:c*100})),(u>0||p>0)&&h.push(S("outputBlink",{on:u*100,off:p*100})),c===0&&u===0&&h.push(S("outputPersistent")),h.join(", ")}if(r.startsWith("SCXWIF1"))return S("wifiEnabled");if(r.startsWith("SCXWIF0"))return S("wifiDisabled");if(r.startsWith("SAPW")){let l=parseInt(r.slice(4,6)),c=t[`ssid${l}`];return c?S("wifiNetwork",{idx:l,ssid:c}):S("wifiNetworkEmpty",{idx:l})}if(r.startsWith("SCXDL")){let l=r.slice(5).split(","),c=l[1]||"ALL",u=parseInt(l[4])||0,p={ALL:S("datalogDestAll"),GPRS:S("datalogDestGPRS"),WIF:S("datalogDestWIF"),BTH:S("datalogDestBTH"),TRM:S("datalogDestTRM"),BACK:S("datalogDestBACK"),BGP:S("datalogDestBGP"),BWI:S("datalogDestBWI")};return S("datalog",{dest:p[c]||c,mode:u?"LIFO":"FIFO"})}if(r.startsWith("SVL00E"))return S("alertSpeedOn",{speed:parseInt(r.slice(6,10))});if(r.startsWith("SVL01E"))return S("alertSpeedOff",{speed:parseInt(r.slice(6,10))});if(r.startsWith("SAR00"))return S("batteryLow",{min:parseInt(r.slice(8,12))/100,max:parseInt(r.slice(13,17))/100});if(r.startsWith("SAR01"))return S("batteryOk",{min:parseInt(r.slice(8,12))/100});if(r.startsWith("SAR02"))return S("batteryDisconnect",{max:parseInt(r.slice(13,17))/100});if(r.startsWith("SPKE")){let l=parseInt(r.slice(4,6)),c=parseInt(r.slice(6,11)),u=parseInt(r.slice(11,14));return S("parkingConfig",{idx:l,radius:c,deb:u})}if(r==="SRL**D")return S("clearAllRules");if(r.startsWith("SRLFF"))return S("wifiReconnect");if(r.startsWith("SRL")){let l=r.match(/;TRG=([^;]+)/);if(!l)return null;let c=l[1],u=t.velAlert;if(c==="VL00+"&&u?.enabled)return S("speedActivate",{out:u.output||"00",speed:u.onSpeed??120});if(c==="VL01-"&&u?.enabled)return u.activateOutput!==!1?S("speedRestoredOutput",{speed:u.offSpeed??100,out:u.output||"00"}):S("speedRestored",{speed:u.offSpeed??100});let p=t.batteryAlert;if(c==="AR00+"&&p?.enabled)return S("batteryLowDetected",{evt:Oe(p.lowEventNum??37)});if(c==="AR01+"&&p?.enabled)return S("batteryOkRestored",{evt:Oe(p.okEventNum??38)});if(c==="AR02+"&&p?.enabled)return S("batteryDisconnected",{evt:Oe(p.disconnectEventNum??39)});let f=t.parkingAlert;if(c==="IGN-"&&f?.enabled&&r.includes("{SPKA}"))return f.changeGps?S("parkingActivateGps"):S("parkingActivate");let h=String(f?.index??0).padStart(2,"0");if(c===`PK${h}+`&&f?.enabled)return f.restoreGps?S("parkingAlertGps",{evt:Oe(f.eventNum??120)}):S("parkingAlert",{evt:Oe(f.eventNum??120)});let v=t.rules?.find(b=>b.enabled&&b.trigger===c);if(v){let b=v.log?"LOG":"BUF",x={L:S("prioLow"),M:S("prioMedium"),H:S("prioHigh")};return`${/^[a-zA-Z]+\.[a-zA-Z.]+$/.test(v.label||"")?rl.t(v.label,{defaultValue:v.label}):v.label} [${v.trigger}] \u2192 evt:${Oe(v.eventNum)}, prio:${x[v.priority]}, dest:${b}`}if(t.customRules?.length)for(let b of t.customRules){let x=b.trigger||{},C=x.useRaw?x.raw||"":al(x.terms,x.operators),d=x.sense||"+";if(C&&C+d===c){if(b.label)return b.label;let m=r.match(/;CND=([^;{]+)/),w=m?` si ${ks(m[1])}`:"",A=r.match(/;ACC=(.+)$/),I=(A?[...A[1].matchAll(/\{([^}]+)\}/g)].map(T=>T[1]):[]).map(T=>T.match(/^G[A-Z0-9]{2}[0-9A-Fa-f]{2}/)?`evt:${T.slice(3,5).toUpperCase()}`:T.startsWith("SSSXP")?`XP${T.slice(5,7)}=${T.slice(7,9)==="11"?"ON":"OFF"}`:T.startsWith("SSSU")?`U${T.slice(4,6)}=${T.slice(6,8)==="11"?"ON":"OFF"}`:T.startsWith("STD")?`TD${T.slice(3,5)}${T[5]||"R"}`:T==="SPKA"?S("pkActivate"):T==="SPKD"?S("pkDeactivate"):T.startsWith("SCXGPS")?`GPS:${T.slice(6)}`:T).join(", ");return`${ks(c.slice(0,-1))+c.slice(-1)}${w} \u2192 ${I||S("noActions")}`}}}if(r==="SWP**D")return S("clearAllWaypoints");if(r.startsWith("SWP")){let l=parseInt(r.slice(3,5)),c=t.waypoints?.find(h=>h.index===l),u=c?.label?`${c.label} (WP${String(l).padStart(2,"0")})`:`WP${String(l).padStart(2,"0")}`;if(r[5]==="D")return S("waypointDisabled",{label:u});let p=parseInt(r.slice(23,29)),f=p>=1e3?`${(p/1e3).toFixed(1)} km`:`${p} m`;return S("waypointRadius",{label:u,radius:f})}if(r==="SRG*55AA")return S("clearAllRegions");if(r==="SVL**D")return S("clearAllSpeeds");if(r==="STD**D")return S("clearAllTimers");if(r==="SUV*55AA")return S("clearAllUserVars");if(r==="SICL*55AA")return S("clearDriverManager");let s=t.resourceLabels||{};if(r.startsWith("STR")&&r.length>5){let l=parseInt(r.slice(3,5)),c=r.slice(5,7),u=r.slice(7,9),p=r.slice(9,11),f=s.TR?.[l]||`TR${String(l).padStart(2,"0")}`,h=[c==="**"?S("everyHour"):`${c}h`,u==="**"?S("everyMin"):`${u}m`,p==="**"?S("everySec"):`${p}s`].join(":");return`${f}: ${h}`}if(r.startsWith("SDV")){let l=parseInt(r.slice(3,5)),c=r[5],u=parseInt(r.slice(5));return`${s.DV?.[l]||`DV${String(l).padStart(2,"0")}`}: ${S(c==="-"?"braking":"acceleration")} ${Math.abs(u)} km/h`}if(r.startsWith("SHM")&&r.length>5){let l=parseInt(r.slice(3,5)),c=s.HM?.[l]||`HM${String(l).padStart(2,"0")}`,u=[S("hmAcelGps"),S("hmBrakeGps"),S("hmTurnLeft"),S("hmTurnRight"),S("hmCentripetal"),S("hmImpLat"),S("hmImpFront"),S("hmImpRear")],p=r.slice(5).split(","),f=p[0]==="E",h=parseInt(p[1])||0;return`${c}: ${f?u[h]||S("hmType",{type:h}):S("hmDisabled")}`}if(r.startsWith("SMVT")){let l=parseInt(r.slice(4,6)),c=s.MVT?.[l]||`MVT${String(l).padStart(2,"0")}`,u=r.slice(6),[p,f,h]=u.includes(",")?u.split(",").filter(v=>v!==""):[u.slice(0,4),u.slice(4,8),u.slice(8,12)];return`${c}: X=${parseInt(p)||0} Y=${parseInt(f)||0} Z=${parseInt(h)||0} mg`}if(r.startsWith("STKE")){let l=r.slice(4).split(",");return S("tilt",{mode:l[1]==="1"?S("tiltAutoIgn"):S("tiltManual"),stab:l[2],det:l[3],angle:l[4]})}if(r==="STKD")return S("tiltDisabled");if(r.startsWith("SNT")&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5)),c=parseInt(r.slice(5)),u=s.NT?.[l]||`NT${String(l).padStart(2,"0")}`;return S("counterMax",{label:u,max:c})}if(r.startsWith("SSSU")){let l=parseInt(r.slice(4,6)),c=r.slice(6)==="11"?"1 (SET)":"0 (CLR)",u=s.U?.[l]||`U${String(l).padStart(2,"0")}`,p=l>=16&&l<=31||l>=48&&l<=63?` ${S("flagPermanent")}`:` ${S("flagVolatile")}`;return`${u}${p}: ${c}`}if(r.startsWith("SCXXB")){let l=parseInt(r.slice(5,7)),c={S:S("captureSrcSerial"),G:S("captureSrcGps"),M:S("captureSrcModem"),B:S("captureSrcBle"),D:S("captureSrcDebug"),C:S("captureSrcCan"),"-":S("captureSrcOff")},u=s.CXXB?.[l]||`CXXB${String(l).padStart(2,"0")}`;return S("captureSource",{label:u,src:c[r[7]]||r[7],port:r[8]})}if(r.startsWith("SUV")&&r.length>5&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5));return`${s.UV?.[l]||`UV${String(l).padStart(2,"0")}`}: ${r.slice(6)}`}if(r.startsWith("SUC")&&r.length>5&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5));return`${s.UC?.[l]||`UC${String(l).padStart(2,"0")}`}`}if(r.startsWith("SAR")&&r.length>5&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5)),c=s.AR?.[l]||`AR${String(l).padStart(2,"0")}`,u=parseInt(r.slice(5,7));return S("analogSource",{label:c,src:{0:"AN0",1:"AN1",2:"AN2",3:"AN3",4:"AN4",5:"AN5",6:"VBat",7:"VBU",8:"DT0",9:"DT1",10:"MCU"}[u]||`src${u}`})}if(r.startsWith("SCXAIN")&&r.length>=38){let l=parseInt(r.slice(6,8)),c=I=>(r[I]==="-"?-1:1)*(parseInt(r.slice(I+1,I+5))||0),u=c(8),p=c(13),f=c(18)/100,h=c(23)/100,v=c(28),b=c(33),x=t.cxainConfigs?.[l]||{},C=x.unit||"",d=String(l).padStart(2,"0"),m=x.label?`CXAIN${d} \u2014 ${x.label}`:`CXAIN${d}`,w=Math.min(v,b),A=Math.max(v,b),R=u!==w||p!==A?` [clamp ${u}..${p}${C}]`:"";return`${m}: ${f}V \u2192 ${v}${C} / ${h}V \u2192 ${b}${C}${R}`}if(r.startsWith("SDC")&&r.length>5&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5)),c=s.DC?.[l]||`DC${String(l).padStart(2,"0")}`,u=parseInt(r.slice(6));return`${c}: ${u}\xB0`}if(r.startsWith("SVL")&&r.length>5&&/^\d/.test(r[3])&&r[3]!=="*"){let l=parseInt(r.slice(3,5)),c=s.VL?.[l]||`VL${String(l).padStart(2,"0")}`,u=parseInt(r.slice(6,10));return`${c}: ${u} km/h`}if(r.startsWith("SBS")&&!r.startsWith("SBSW")&&r.length>5&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5));return s.BS?.[l]||`BS${String(l).padStart(2,"0")}`}if(r.startsWith("SBSW")&&r.length>6&&/^\d/.test(r[4])){let l=parseInt(r.slice(4,6));return s.BSW?.[l]||`BSW${String(l).padStart(2,"0")}`}if(r.startsWith("SBE")&&r.length>5&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5));return s.BE?.[l]||`BE${String(l).padStart(2,"0")}`}if(r.startsWith("SDT")&&r.length>5&&/^\d/.test(r[3])){let l=parseInt(r.slice(3,5)),c=s.DT?.[l]||`DT${String(l).padStart(2,"0")}`;return S("dallasTemp",{label:c})}if(r.startsWith("SCXECU")&&r.length>8&&/^\d/.test(r[6])){let l=parseInt(r.slice(6,8)),c={0:"RPM",1:S("ecuThrottle"),2:S("ecuFuelPct"),3:S("ecuOdometer"),4:S("ecuLiters"),5:S("ecuSpeed"),6:S("ecuEngineTemp"),7:S("ecuOilPressure"),8:S("ecuFuelTrip"),9:S("ecuFuelTripSoft"),10:S("ecuEngineHours"),11:S("ecuChassis"),12:S("ecuFuelRate"),13:"MAF",14:S("ecuTorque"),15:S("ecuWheelSpeed"),16:"DTC",17:S("ecuEngineLoad"),18:S("ecuRuntime"),19:S("ecuDistMil"),20:S("ecuLitersCustom"),21:S("ecuMlCustom"),22:S("ecuParkingBrake"),23:S("ecuBrakePedal"),24:S("ecuThrottleCustom"),25:S("ecuDriverDoor"),26:S("ecuPassengerDoor"),27:S("ecuClutch"),28:S("ecuTurbo")};return`${s.CXECU?.[l]||c[l]||`ECU${String(l).padStart(2,"0")}`}`}if(r.startsWith("SCXBTH")){let l=r[6]==="1";return S(l?"bluetoothOn":"bluetoothOff")}if(r==="SSSBTHPWR11")return S("bluetoothOn");if(r==="SSSBTHPWR00")return S("bluetoothOff");if(r.startsWith("SCXOW"))return r[5]==="1"?S("onewireEnabled"):S("onewireDisabled");if(r.startsWith("SCXDRVB"))return r[7]==="-"?S("drvBleOff"):S("drvBleOn",{slot:r[7]});if(r.startsWith("SCXDRV"))return S(`drvOrigen${r[6]}`);if(r.startsWith("SCXTR")){let l=parseInt(r.slice(6))||0;return S("uartPortBaudrate",{baudrate:l})}if(r.startsWith("SICL")&&/^SICL\d{2}/.test(r)){let l=r.slice(4,6),c=t.icConfigs?.[parseInt(l)]?.name;return S("driver",{idx:l,name:c||S("driverNoName")})}if(r.startsWith("IC ")||r.startsWith("SIC ")){let l=r.slice(4).split(",");return S("driver",{idx:l[0],name:l[1]||S("driverNoName")})}if(r.startsWith("SRG")){let l=parseInt(r.slice(3,5)),c=parseInt(r[5]),u=t.regions?.find(b=>b.index===l),p=u?.label?`${u.label} (RG${String(l).padStart(2,"0")})`:`RG${String(l).padStart(2,"0")}`,v=r.slice(7).split(",").filter(b=>b!=="+00000000+000000000").length;return v===0?S("regionBlockEmpty",{label:p,block:c}):S("regionBlockVerts",{label:p,block:c,count:v})}return null}var ax={zero:"Zero",spider:"Spider",smart:"Smart",pi:"PI"};function kp(e,t=[]){let r=[];return r.push("//"),r.push(`// ${S("headerGenerated")}`),r.push(`// ${S("headerDate",{date:new Date().toISOString().split("T")[0]})}`),e.tag&&r.push(`// ${S("headerTag",{tag:e.tag})}`),e.description&&r.push(`// ${S("headerDescription",{desc:e.description})}`),t.length>0&&r.push(`// ${S("headerCompatible",{models:t.map(a=>ax[a]||a).join(", ")})}`),r.push("//"),r}function zo(e,t=[],{skipHeader:r=!1,ruleLabels:a=null,cmdLabels:n=null}={}){let o=Np(e,{targetModels:t}),i=[];r||(i.push(...kp(e,t)),i.push(""));let s=[{label:S("sectionTag"),prefix:"STAG"},{label:S("sectionPassword"),prefix:"SPW"},{label:S("sectionIpProtocol"),prefix:"SCXIP"},{label:S("sectionServers"),prefix:"SIP"},{label:"UDP Source Port",prefix:"SCXUDPSRC"},{label:S("sectionKeepAlive"),prefix:"SKA"},{label:S("sectionWialonPassword"),prefix:"SWL"},{label:S("sectionWifi"),prefix:["SCXWIF","SAPW","SAPX","SAPY"]},{label:S("sectionCellular"),prefix:["SSSCELPWR","SCOPS","SCXAPN","SCXSIM","SCOP1","SCXAP1","SCXSMS","SCXSMW"]},{label:S("sectionDatalog"),prefix:"SCXDL"},{label:S("sectionCountry"),prefix:"SMC"},{label:"RF",prefix:"SCXRF"},{label:S("sectionGps"),prefix:["SCXGPS","SCXCQ"]},{label:S("sectionIgnition"),prefix:"SCXIGN"},{label:S("sectionInputDebounce"),prefix:"SIT"},{label:S("sectionCanBus"),prefix:"SCXCAN"},{label:S("sectionEcuCan"),prefix:"SCXECU"},{label:S("sectionOneWire"),prefix:"SCXOW"},{label:S("sectionDallasTemp"),prefix:"SDT"},{label:S("sectionUartPort"),prefix:"SCXTR"},{label:S("sectionDigitalOutputs"),prefix:"SCXXP"},{label:S("sectionGradualCut"),prefix:"SGC"},{label:S("sectionBluetooth"),prefix:["SCXBTH","SSSBTHPWR"]},{label:S("sectionBeaconsBle"),prefix:"SBE"},{label:S("sectionSmartWildcard"),prefix:"SBSW"},{label:S("sectionSensorsBle"),prefix:"SBS"},{label:S("sectionTimers"),prefix:"STD"},{label:S("sectionSchedule"),prefix:"STR"},{label:S("sectionCounters"),prefix:"SNT"},{label:S("sectionHeading"),prefix:"SDC"},{label:S("sectionSpeed"),prefix:"SVL"},{label:S("sectionAcceleration"),prefix:"SDV"},{label:S("sectionManeuvers"),prefix:"SHM"},{label:S("sectionVectors"),prefix:"SMVT"},{label:S("sectionTilt"),prefix:"STK"},{label:S("sectionAccelerometer"),prefix:"SCXAC"},{label:S("sectionAnalogCalibration"),prefix:"SCXAIN"},{label:S("sectionAnalog"),prefix:"SAR"},{label:S("sectionParking"),prefix:"SPK"},{label:S("sectionTriggers"),prefix:"SUV"},{label:S("sectionFlags"),prefix:"SSSU"},{label:S("sectionCapture"),prefix:"SCXXB"},{label:S("sectionReports"),prefix:"SUC"},{label:S("sectionBlackBox"),prefix:"SCXBB"},{label:S("sectionDriverManager"),prefix:["SICL","SIC "]},{label:S("sectionDrv"),prefix:"SCXDRV"},{label:"Web Server",prefix:"SWS"},{label:S("sectionRules"),prefix:"SRL"},{label:S("sectionWaypoints"),prefix:"SWP"},{label:S("sectionRegions"),prefix:"SRG"}],l=new Set;for(let u of s){let p=Array.isArray(u.prefix)?u.prefix:[u.prefix],f=o.filter(h=>{if(l.has(h))return!1;let v=h.slice(1,-1);return p.some(b=>v.startsWith(b))});if(f.length>0){i.push(`// ${u.label}`),i.push("// __"),i.push("");let h=u.prefix==="SRL";for(let v=0;v<f.length;v++){let b=f[v];if(b.match(/^>SPW/)&&(b=`>SPW${"*".repeat(b.slice(4,-1).length)}<`),h&&a){let C=b.match(/^>SRL([0-9A-Fa-f]{2})/)?.[1],d=C&&a[C];d&&(i.push(""),i.push(`// @rule ${C} ${d}`)),i.push(b)}else if(h){let x=oa(b,e);x&&(i.push(""),i.push(`// ${x}`)),i.push(b)}else{let x=b.slice(1,-1);if(n){let d=Object.keys(n).find(m=>x.startsWith(m));if(d){i.push(n[d]);let m=oa(b,e);m&&i.push(`// ${m}`),i.push(b),l.add(b);continue}}let C=oa(b,e);C&&i.push(`// ${C}`),i.push(b)}l.add(b)}i.push("")}}let c=o.filter(u=>!l.has(u));if(c.length>0)for(let u of c){let p=oa(u,e);p&&i.push(`// ${p}`),i.push(u)}return i.join(`
16
+ `)}function Xo(e,t=[]){let r=[];if(r.push(...kp(e,t)),r.push(""),r.push("// @rinho v2"),e.tag&&r.push(`// @rinho tag=${e.tag}`),e.description){let l=e.description.split(`
17
+ `);if(l.length===1)r.push(`// @rinho desc=${l[0]}`);else{r.push("// @rinho desc=");for(let c of l)r.push(`// ${c}`)}}t?.length&&r.push(`// @rinho models=${t.join(",")}`);let a={IN:"SIT",XP:"SCXXP",U:"SSSU"},n={},o=e.resourceLabels||{};for(let[l,c]of Object.entries(o)){let u=a[l]||`S${l}`;for(let[p,f]of Object.entries(c)){let h=String(p).padStart(2,"0");n[`${u}${h}`]=`// @label ${l}${h} ${f}`}}if(e.inputLabels){for(let[l,c]of Object.entries(e.inputLabels))if(c){let u=String(l).padStart(2,"0");n[`SIT${u}`]=`// @label IN${u} ${c}`}}if(e.outputLabels){for(let[l,c]of Object.entries(e.outputLabels))if(c){let u=String(l).padStart(2,"0");n[`SCXXP${u}`]=`// @label XP${u} ${c}`}}for(let l of e.regions||[])if(l?.label&&l.index!=null){let c=String(l.index).padStart(2,"0");n[`SRG${c}0`]=`// @label RG${c} ${l.label}`}for(let l of e.waypoints||[])if(l?.label&&l.index!=null){let c=String(l.index).padStart(2,"0");n[`SWP${c}`]=`// @label WP${c} ${l.label}`}let i=[];if(e.eventLabels){let l=Array.isArray(e.eventOrder)&&e.eventOrder.length>0?e.eventOrder.filter(c=>e.eventLabels[c]):Object.keys(e.eventLabels).filter(c=>e.eventLabels[c]).map(Number).sort((c,u)=>c-u);for(let c of Object.keys(e.eventLabels)){let u=Number(c);e.eventLabels[c]&&!l.includes(u)&&l.push(u)}for(let c of l){let u=e.eventLabels[c];u&&i.push(`// @event ${Oe(c)} ${u}`)}}if(i.length>0&&(r.push(""),r.push(...i)),e.cxainConfigs){let l=[];for(let c of[0,1,2,7]){let u=e.cxainConfigs[c];if(!u?.enabled)continue;let p=[];u.unit&&p.push(`unit=${u.unit}`),u.label&&p.push(`label=${u.label}`),p.length>0&&l.push(`// @cxain ${String(c).padStart(2,"0")} ${p.join(" ")}`)}l.length>0&&(r.push(""),r.push(...l))}let s=rx(e);return r.push(""),r.push(zo(e,t,{skipHeader:!0,ruleLabels:s,cmdLabels:n})),r.join(`
18
+ `)}function nl(){return Math.random().toString(36).slice(2,9)}function nx(e){if(!e)return null;let t=e.match(/RX\s+(.*)/),a=(t?t[1]:e).replace(/^>/,"").replace(/<$/,""),n=a.indexOf(";#");n!==-1&&(a=a.slice(0,n));let o=a.indexOf(";ID=");return o!==-1&&(a=a.slice(0,o)),a=a.replace(/;\*[\dA-Fa-f]{2}$/,""),a.trim()||null}function ox(e){let t=e[3],r=e.slice(4),n={0:["ip0Address","ip0Port"],1:["ip1Address","ip1Port"],4:["ip4Address","ip4Port"],5:["ip5Address","ip5Port"]}[t];if(!n)return null;if(r.startsWith('"')){let o=r.match(/^"([^"]*)",(\d+)/);if(o)return{[n[0]]:o[1],[n[1]]:o[2]}}if(r.includes("/")){let[o,i]=r.split("/");return{[n[0]]:o,[n[1]]:i}}return null}function ix(e){let t=e.slice(5);return t.length>=3?{mainProtocol:t[0],backProtocol:t[1],windowSize:parseInt(t[2])||5}:{mainProtocol:t[0],backProtocol:t[0],windowSize:parseInt(t[1])||5}}function sx(e){let t=e.slice(6).split(",");return{apnName:t[0]||"",apnUser:t[1]||"",apnPass:t[2]||""}}function lx(e){let t=e.slice(6).split(",");return{sim1ApnName:t[0]||"",sim1ApnUser:t[1]||"",sim1ApnPass:t[2]||""}}function cx(e){let t=e.slice(5);if(t==="0"||t.startsWith("0,"))return{copsMode:0};let r=t.match(/^(\d),(\d),"([^"]*)"(?:,(\d+))?/);if(r){let a={copsMode:1,copsRegMode:parseInt(r[1]),copsOperator:r[3]};return r[4]!==void 0&&(a.copsAct=r[4]),a}return null}function ux(e){let t=e.slice(5);if(t==="0"||t.startsWith("0,"))return{sim1CopsMode:0};let r=t.match(/^(\d),(\d),"([^"]*)"(?:,(\d+))?/);if(r){let a={sim1CopsMode:1,sim1CopsRegMode:parseInt(r[1]),sim1CopsOperator:r[3]};return r[4]!==void 0&&(a.sim1CopsAct=r[4]),a}return{}}function dx(e){return{sim1Enabled:e[6]==="1"}}function px(e){let t=parseInt(e.slice(3,5)),r=e[5]==="E",a=parseInt(e.slice(6,11))||0,n=parseInt(e.slice(11,16))||0,o={};return t===0&&(o.td00=a),t===1&&(o.td01=a),o.__timer={index:t,enabled:r,timeout:a,distance:n},o}function fx(e){let t=e.slice(3,5),r=parseInt(t),a=e[5]==="E",n=parseInt(e.slice(6,10)),o=e.slice(10,11),i=o===""?1:parseInt(o)||0,s=e.slice(11,14),l=/^\d{3}$/.test(s)?parseInt(s):0,c={__vl:{index:r,enabled:a,speed:n,filtered:i,settle:l}};return t==="00"&&(c.__velAlert={enabled:a,onSpeed:n}),t==="01"&&(c.__velAlert_off={offSpeed:n,activateOutput:!0}),c}function mx(e){let t=parseInt(e.slice(3,5)),r=e.indexOf("*"),a=parseInt(e.slice(r+1)),n={__dc:{index:t,angle:a}};return t===0&&(n.headingAngle=a),n}function hx(e){return{gpsMode:parseInt(e[6])}}function gx(e){let t=e.slice(5);return{gpsFixMin:parseInt(t[0]),gpsPdopMax:parseInt(t.slice(1,3)),gpsSatsMin:parseInt(t.slice(3,5))}}function vx(e){let t=e.slice(6).split(","),r={ignMode:parseInt(t[0])};return t[1]!==void 0&&t[1]!==""&&(r.ignTon=parseInt(t[1])),t[2]!==void 0&&t[2]!==""&&(r.ignToff=parseInt(t[2])),r}function bx(e){let t=e.slice(7).split(","),r={ignVbatManual:t[0]==="1"};return t[1]&&t[2]&&(r.ignVbatOn=parseInt(t[1]),r.ignVbatOff=parseInt(t[2])),r}function Sx(e){let t=e.slice(6).split(","),r={wifiEnabled:t[0]==="1"};return t[1]!==void 0&&(r.wifiMode=parseInt(t[1])||0),t[2]!==void 0&&t[2]!==""&&(r.wifiAutoDestiny=t[2]==="1"?1:0),r}function Cx(e){let r=e.slice(4).split(","),a={apxSsid:r[0]||"",apxPass:r[1]||""};return r[2]&&(a.apxIp=r[2]),r[3]&&(a.apxMask=r[3]),r[4]&&(a.apxGw=r[4]),a}function xx(e){let r=e.slice(4).split(","),a={apySsid:r[0]||"",apyPass:r[1]||""};return r[2]&&(a.apyIp=r[2]),r[3]&&(a.apyMask=r[3]),r[4]&&(a.apyGw=r[4]),a}function yx(e){if(e.includes("NA")&&!e.startsWith("RWSD,"))return{webServer:{enabled:!1}};let t=e.startsWith("RWSD"),r=e.slice(5);if(t&&!r.includes(","))return{webServer:{enabled:!1}};let a=r.split(","),n={enabled:!t};n.language=parseInt(a[0])||0,n.title=a[1]||"",n.pin=a[2]||"",n.console=a[3]==="1",n.buttons=[];for(let o=4;o<a.length;o++){let i=a[o];if(!i)continue;let s=i.indexOf("/");if(s===-1)continue;let l=i.slice(0,s),c=i.slice(s+1),u={id:Math.random().toString(36).slice(2,9),label:l};c==="CODE0"?u.type="code0":c==="CODE1"?u.type="code1":c.startsWith("XB")?(u.type="xb",u.xbIndex=c.slice(2,4),u.xbVisible=c[4]||"V",u.xbType=c[5]||"A"):(u.type="command",u.command=c),n.buttons.push(u)}return{webServer:n}}function wx(e){let t=parseInt(e.slice(4,6)),a=e.slice(6).split(","),n={};return n[`ssid${t}`]=a[0]||"",n[`pass${t}`]=a[1]||"",a[2]&&(n[`sapw${t}Ip`]=a[2]),a[3]&&(n[`sapw${t}Mask`]=a[3]),a[4]&&(n[`sapw${t}Gw`]=a[4]),n}function Ax(e){let t=e.slice(3,5),r=parseInt(e.slice(5,9)),a=parseInt(e.slice(9,13));return{[`it${t}`]:{on:r,off:a}}}function Ex(e){let t=e.slice(5,7),r=parseInt(e.slice(7,11)),a=parseInt(e.slice(11,15)),n=parseInt(e.slice(15,19));return{[`xp${t}`]:{duration:r,blinkOn:a,blinkOff:n}}}function Dx(e){let t=parseInt(e.slice(3,5));if(!(e[5]==="E"))return{__wp:{index:t,enabled:!1}};let a=e.slice(6,14),n=e.slice(14,23),o=parseInt(e.slice(23,29)),i=parseInt(a)/1e5,s=parseInt(n)/1e5;return{__wp:{index:t,enabled:!0,lat:i,lng:s,radius:o,label:""}}}function Tx(e){let t=parseInt(e.slice(3,5)),r=parseInt(e[5]),a=e.slice(7);a.endsWith(",V")&&(a=a.slice(0,-2));let n=a.split(","),o=[];for(let i of n){let s=i.match(/^([+-]\d{7})([+-]\d{8})$/);if(!s)continue;let l=parseInt(s[1])/1e5,c=parseInt(s[2])/1e5;l===0&&c===0||o.push({lat:l,lng:c})}return{__rg:{index:t,block:r,vertices:o}}}function Rx(e){if(e.includes("**"))return null;let t=Ne(e.slice(3,5));if(t===null)return null;let r=e[5]!=="D",a=e.slice(6),n="",o="",i="",s=a.match(/TRG=([^;]+)/);s&&(n=s[1]);let l=a.match(/CND=([^;{]+)/);l&&(o=l[1]);let c=a.match(/ACC=(.+)$/);c&&(i=c[1]);let u="+",p=n;n&&/[+\-*]$/.test(n)&&(u=n.slice(-1),p=n.slice(0,-1));let f=[],h=i.match(/\{([^}]+)\}/g)||[];for(let v of h){let b=v.slice(1,-1);f.push(b)}return!r&&!n&&!i?{}:{__rule:{slot:t,enabled:r,trgExpr:p,trgRaw:n,sense:u,cndRaw:o,accRaw:i,actions:f}}}function _x(e){let t=e.slice(3,5),r=parseInt(e.slice(5,7))||6,n=e.slice(7).match(/^([+-]\d{4})([+-]\d{4})(\d{3})?$/);if(!n)return null;let o=parseInt(n[1]),i=parseInt(n[2]),s=!!n[3],l=s?parseInt(n[3])/10:5;return r===6&&t==="00"?{__bat00:{lowMin:o,lowMax:i,debounce:l}}:r===6&&t==="01"?{__bat01:{okMin:o,okMax:i,debounce:s?l:void 0}}:r===6&&t==="02"?{__bat02:{disconnectMax:i,debounce:s?l:void 0}}:{__ar:{index:parseInt(t),enabled:!0,source:r,min:o,max:i,debounce:s?l*10:void 0}}}function Ix(e){let r=e[3]==="E";if(!r)return{__parking:{enabled:!1,radius:0,debounce:0}};let a=e.slice(4),n=parseInt(a.slice(0,4))||0,o=parseInt(a.slice(4,8))||0;return{__parking:{enabled:r,radius:n,debounce:o},pkConfigs:{0:{enabled:r,radius:n,debounce:o}}}}function Nx(e){let r=e.slice(3).split(","),a=parseInt(r[0]),n=r[1]||"";return{keepAlive:a,keepAliveMain:n.includes("M"),keepAliveBack:n.includes("B")}}function Ox(e){return{tag:e.slice(4).trim()}}function Px(e){return{ipsPassword:e.replace(/^RWL\s?/,"")}}function kx(e){let t=parseInt(e.slice(3,5)),r=e.slice(5),a=r[0]==="E",n=r.slice(2).split(",");return{__hm:{index:t,enabled:a,eventType:parseInt(n[0])||0,magnitude:parseInt(n[1])||0,minSpeed:parseInt(n[2])||0,hysteresis:parseInt(n[3])||0,timeWindow:parseInt(n[4])||0,cooldown:parseInt(n[5])||0}}}function Mx(e){let t=parseInt(e.slice(3,5)),r=parseInt(e.slice(5,10))||0;return{__nt:{index:t,maxcount:r}}}function Bx(e){let t=parseInt(e.slice(3,5),16),r=e.slice(5).trim();return{__uc:{index:t,enabled:!0,expression:r}}}function Lx(e){let t=parseInt(e.slice(3,5)),r=e.slice(5),a="S",n=r;return r.length>0&&"SUFHhAX ".includes(r[0])&&(a=r[0]===" "?" ":r[0],n=r.slice(1)),a==="S"&&n.startsWith(",")&&(n=n.slice(1)),!n||/^,+$/.test(n)?{}:{__uv:{index:t,enabled:!0,convType:a,expression:n}}}function Fx(e){let t=parseInt(e.slice(3,5)),r=e.slice(5),a=parseInt(r);return{__dv:{index:t,velDiff:a}}}function Ux(e){let t=parseInt(e.slice(6,8))||1,r=parseInt(e.slice(8,13))||0;return{smsRetries:t,smsTimeout:r}}function $x(e){let t=e.slice(6).split(",");if(t.length<3){let p=parseInt(t[0])||0;return{canEnabled:p,canConfigs:{0:{enabled:p}}}}let r=parseInt(t[0])||0,a=t[1]||"500K",n=t[2]||"OBDII",o=n.indexOf("."),i=o>=0?n.slice(0,o):n,s=o>=0&&parseInt(n.slice(o+1))||0,l=parseInt(t[3])||11,c=parseInt(t[4])||0,u=parseInt(t[5])||0;return{canEnabled:r,canBps:a,canProtocol:i,canCustom:s,canBits:l,canFuelTrip:c,canFuelEngine:u,canConfigs:{0:{enabled:r,bps:a,protocol:i,custom:s,bits:l,fuelTrip:c,fuelEngine:u}}}}function Wx(e){let t=e.slice(5).split(","),r=parseInt(t[0])||0,a=t[1]?parseInt(t[1]):0,n=t[2]!==void 0&&t[2]!==""?parseInt(t[2])||0:void 0,o=r>=2?[10,20,30].reduce((i,s)=>Math.abs(s-r)<Math.abs(i-r)?s:i,10):0;return{owEnabled:r>0,owConfigs:{0:{enabled:r>0,enableValue:o,useAsKey:a,...n!==void 0?{invKey:n}:{}}}}}function Vx(e){let t=e.slice(6);if(!/^\d/.test(t))return{};let r=t.split(","),a={enabled:!0,origen:r[0],lista:parseInt(r[1])||0,retencion:parseInt(r[2])||0};if(r.length>=7&&Object.assign(a,{ventana:parseInt(r[3])||0,aviso:r[4],corte:r[5],velCorte:parseInt(r[6])||0}),r.length>=13){let n=o=>o==="-"?"":o;Object.assign(a,{rptLogin:n(r[7]),rptLogout:n(r[8]),rptInvalido:n(r[9]),rptSinChofer:n(r[10]),dst:r[11],xpOk:r[12]})}return{drvConfigs:{0:a}}}function Gx(e){let t=e.slice(7);if(t.startsWith(","))return{};let r=t.split(",");return{drvbConfigs:{0:{enabled:!0,slot:r[0]||"-",modo:r[1]||"P",id:r[2]||"M",toggle:parseInt(r[3])||0}}}}function qx(e){let r=e.slice(3).split(";")[0].split(",");return{__gc:{enabled:r[0]==="E",xpIndex:parseInt(r[1])||0,stepMs:parseInt(r[2])||30,intervalS:parseInt(r[3])||4,maxS:parseInt(r[4])||180,invert:parseInt(r[5])||0}}}function zx(e){let t=parseInt(e.slice(3,5)),r=e.slice(5),a=r[0]==="1",n=r.slice(2).split(",");return{__dt:{index:t,enabled:a,rom:n[0]||""}}}function Xx(e){let t=e.slice(6).split(",");return{__cxbth:{power:t[0]==="1",name:t[1]||"",pincode:t[2]||"",timeout:parseInt(t[3])||0}}}function Hx(e){let t=parseInt(e.slice(3,5)),r=e.slice(5).split(","),a=r[0]||"",n=r[1]||"0",o=parseInt(r[2])||30;return{__be:{index:t,enabled:!0,id:a,dist:n,timeout:o}}}function jx(e){let t=parseInt(e.slice(3,5)),r=e.slice(5),a=r[0]==="E",o=r.slice(2).split(";")[0].split(",");return{__bs:{index:t,enabled:a,id:o[0]||"",type:parseInt(o[1])||0,timeout:o[2]===void 0||o[2]===""?60:parseInt(o[2])||0,dist:parseInt(o[3])||0,...o[4]?{outval:o[4].slice(0,5)}:{}}}}function Kx(e){let t=parseInt(e.slice(4,6)),r=e.slice(6),a=r[0]==="E",o=r.slice(2).split(";")[0].split(",");return{__bsw:{index:t,enabled:a,targets:o[0]||"FF",uuid:o[1]||"",major:o[2]!==""&&o[2]!==void 0?o[2]:"",minor:o[3]!==""&&o[3]!==void 0?o[3]:"",timeout:parseInt(o[4])||30,dist:parseInt(o[5])||0}}}function Zx(e){return{celEnabled:e.slice(9,11)==="11"}}function Qx(e){return{wifiEnabled:e.slice(9,11)==="11"}}function Yx(e){return{__bthPwr:e.slice(9,11)==="11"}}function Jx(e){let t=parseInt(e.slice(3,5)),r=e.slice(5,7),a=e.slice(7,9),n=e.slice(9,11);if(r==="**"&&a==="**"&&n==="**")return{};let o=r==="**"?-1:parseInt(r)||0,i=a==="**"?-1:parseInt(a)||0,s=n==="**"?-1:parseInt(n)||0;return{__tr:{index:t,enabled:!0,hora:o,minuto:i,segundo:s}}}function ey(e){let t=e.slice(3).trim();if(t==="D"||t.startsWith("D"))return{__tk:{enabled:!1}};let r=t.split(",");return{__tk:{enabled:r[0]==="E",autoMode:parseInt(r[1])||0,stabTime:parseInt(r[2])||30,detectTime:parseInt(r[3])||10,angleThreshold:parseFloat(r[4])||15}}}function ty(e){let t=parseInt(e.slice(3,13))||0,r=parseInt(e.slice(13,23))||0;return{__od:{total:t,parcial:r}}}function ry(e){let t=e[3]==="E",r=parseInt(e.slice(4),16)||0;return{__ho:{enabled:t,value:r}}}function ay(e){let t=parseInt(e.slice(4,6)),r=e.slice(6),[a,n,o]=r.includes(",")?r.split(",").filter(i=>i!==""):[r.slice(0,4),r.slice(4,8),r.slice(8,12)];return{__mvt:{index:t,deltaX:parseInt(a)||0,deltaY:parseInt(n)||0,deltaZ:parseInt(o)||0}}}function ny(e){let t=parseInt(e.slice(4,6)),r=e.slice(6,8)==="11"?1:0;return{__uflag:{index:t,value:r}}}function oy(e){let t=e.slice(5).split(",");return{dlEnabled:parseInt(t[0])||0,dlDestiny:t[1]||"ALL",dlReint:parseInt(t[2])||0,dlTime:parseInt(t[3])||0,dlMode:parseInt(t[4])||0}}function iy(e){let t=parseInt(e.slice(6,8)),r=e.slice(8);if(r.includes("NOTCFG")||r.includes("LOCKED"))return null;let a=r[0]==="E",n=r.slice(2).split(",");return n.length<8?null:{__ecu:{index:t,enabled:a,canId:n[0],startBit:parseInt(n[1])||0,bitLength:parseInt(n[2])||8,factor:n[3]||"1.000",offset:n[4]||"0.0",min:parseInt(n[5])||0,max:parseInt(n[6])||65535,endian:n[7]||"LE",sign:n[8]||"U"}}}function sy(e){return{cxacConfigs:{0:{enabled:!0,threshold:parseInt(e.slice(5))||0}}}}function ly(e){let t=e.match(/^RCXBB,([A-Z0-9]{2}),(\d+),(\d+),(\d+)$/);if(!t||!Po(t[1]))return null;let r=parseInt(t[3],10),a=parseInt(t[4],10);return r>20||a>20?null:{cxbbConfigs:{0:{enabled:!0,reportType:t[1],sampleRate:parseInt(t[2],10),future:r,history:a}}}}function cy(e){let t=parseInt(e.slice(6,8),10);if(isNaN(t))return null;let r=u=>{let p=e[u]==="-"?-1:1,f=parseInt(e.slice(u+1,u+5),10);return isNaN(f)?0:p*f},a=r(8),n=r(13),o=r(18),i=r(23),s=r(28),l=r(33);return{__cxain:{index:t,enabled:!(a===-9999&&n===9999&&o===0&&i===1&&s===0&&l===1),min:a,max:n,vA:o/100,vB:i/100,valueA:s,valueB:l}}}function uy(e){let t=e.slice(5),r=parseInt(t.slice(0,2)),a=t[2]||"S",n=parseInt(t[3])||0,o=parseInt(t.slice(4,7))||0,i=parseInt(t.slice(7,10))||0,s=t.slice(10),l=s.startsWith(",")?s.slice(1).split(","):s.split(","),c=l[0]||"",u=l[1]||"",p=l[2]||"A",f=parseInt(l[3])||0;return{__cxxb:{index:r,source:a,idxSource:n,rxChars:o,rxTimeout:i,header:c,footer:u,displayMode:p,showHeadFoot:f}}}function Mp(e){let t=e.match(/^RICL?\s*(\d{2})[\s,](.*)$/);if(!t)return{};let r=parseInt(t[1]),n=t[2].trim().split(","),o=n.length>=2?n[0].trim():"",i=(n.length>=2?n[1]:n[0]).trim();return{__ic:{index:r,name:o,ibutton:i}}}function dy(e){let t=parseInt(e.slice(4,6)),r=parseInt(e.slice(7))||0;return{__fct:{index:t,value:r}}}function py(e){return{__firmware:e.slice(4).trim()}}function fy(e){return{simPin:e.slice(4)||""}}function my(e){return{udpSourcePort:parseInt(e.slice(9))||0}}function Bp(e){let t=e.match(/^RIP([23])"?([^"]*)"?$/);return t?t[1]==="2"?{fotaUrl:t[2]||""}:{fotaUrlBack:t[2]||""}:null}function hy(e){let t=e.slice(5);if(!t||t==="0"||t.startsWith("0,"))return{copsMode:0};let r=t.match(/^(\d),(\d),"([^"]*)"(?:,(\d+))?/);if(r){let a={copsMode:1,copsRegMode:parseInt(r[1]),copsOperator:r[3]};return r[4]!==void 0&&(a.copsAct=r[4]),a}return{}}function gy(e){let t=e.slice(5),r=parseInt(t.slice(0,3))||0,a=parseInt(t.slice(3,5))||0,n=parseInt(t.slice(5,7))||0;return{vcTimeout:r,vcPreamp:a,vcSpk:n}}function vy(e){return{deviceRid:e.slice(3)||""}}function by(e){return{rfEnabled:parseInt(e.slice(5))||0}}function Sy(e){return{smsWhitelist:parseInt(e.slice(6))||0}}function Cy(e){let t=parseInt(e[3]);return isNaN(t)?null:{__sm:{index:t,phone:e.slice(4)||""}}}function xy(e){let t=parseInt(e[4]);if(isNaN(t))return null;let r=parseInt(e[5])||0;return{__cid:{index:t,mode:r,cidString:e.slice(6)||""}}}function yy(e){if(/^RMC\d{3}$/.test(e))return{};let t=e.match(/^RMC(\d{2})(\d{3})$/);if(!t)return null;let r=parseInt(t[1],10);return r>=nn?null:{__mc:{index:r,mcc:parseInt(t[2],10)}}}function wy(e){let t=e[5],r=parseInt(e.slice(6))||115200;return{__cxtr:{port:t,baudrate:r}}}function Ay(e){let t=e.slice(6).split(",");return{ap0Name:t[0]||"",ap0User:t[1]||"",ap0Pass:t[2]||""}}function Ey(e){return{vbuMode:parseInt(e.slice(6))||0}}function Lp(e){return{sleepEnabled:e[3]==="E"}}function Dy(e){return{newPassword:e.slice(3).split(";").filter(n=>n).pop()||""}}var Ty=[{prefix:"RCXXP",fn:Ex},{prefix:"RCXAPN",fn:sx},{prefix:"RCXAP1",fn:lx},{prefix:"RCXAP0",fn:Ay},{prefix:"RCXIGNV",fn:bx},{prefix:"RCXIGN",fn:vx},{prefix:"RCXGPS",fn:hx},{prefix:"RCXWIF",fn:Sx},{prefix:"RCXSIM",fn:dx},{prefix:"RCXCQ",fn:gx},{prefix:"RCXUDPSRC",fn:my},{prefix:"RCXSMW",fn:Sy},{prefix:"RCXIP",fn:ix},{prefix:"RCOPS",fn:cx},{prefix:"RCOP1",fn:ux},{prefix:"RCOP0",fn:hy},{prefix:"RPK",fn:Ix},{prefix:"RAPX",fn:Cx},{prefix:"RAPY",fn:xx},{prefix:"RAPW",fn:wx},{prefix:"RWS",fn:yx},{prefix:"RRL",fn:Rx},{prefix:"RRG",fn:Tx},{prefix:"RWP",fn:Dx},{prefix:"RVL",fn:fx},{prefix:"RTD",fn:px},{prefix:"RDC",fn:mx},{prefix:"RIT",fn:Ax},{prefix:"RAR",fn:_x},{prefix:"RKA",fn:Nx},{prefix:"RIP2",fn:Bp},{prefix:"RIP3",fn:Bp},{prefix:"RIP",fn:ox},{prefix:"RDV",fn:Fx},{prefix:"RCXSMS",fn:Ux},{prefix:"RCXCAN",fn:$x},{prefix:"RGC",fn:qx},{prefix:"RCXOW",fn:Wx},{prefix:"RCXDRVB",fn:Gx},{prefix:"RCXDRV",fn:Vx},{prefix:"RDT",fn:zx},{prefix:"RCXBTH",fn:Xx},{prefix:"RBSW",fn:Kx},{prefix:"RBE",fn:Hx},{prefix:"RBS",fn:jx},{prefix:"RHM",fn:kx},{prefix:"RNT",fn:Mx},{prefix:"RUC",fn:Bx},{prefix:"RUV",fn:Lx},{prefix:"RTR",fn:Jx},{prefix:"RTK",fn:ey},{prefix:"ROD",fn:ty},{prefix:"RHO",fn:ry},{prefix:"RMVT",fn:ay},{prefix:"RMC",fn:yy},{prefix:"RCXTR",fn:wy},{prefix:"RCXVC",fn:gy},{prefix:"RCXRF",fn:by},{prefix:"RCXDL",fn:oy},{prefix:"RCXECU",fn:iy},{prefix:"RCXAIN",fn:cy},{prefix:"RCXAC",fn:sy},{prefix:"RCXBB",fn:ly},{prefix:"RCXXB",fn:uy},{prefix:"RICL",fn:Mp},{prefix:"RCID",fn:xy},{prefix:"RIC",fn:Mp},{prefix:"RFCT",fn:dy},{prefix:"RVR",fn:py},{prefix:"RTAG",fn:Ox},{prefix:"RSSU",fn:ny},{prefix:"RSM",fn:Cy},{prefix:"RSSCELPWR",fn:Zx},{prefix:"RSSWIFPWR",fn:Qx},{prefix:"RSSBTHPWR",fn:Yx},{prefix:"RWL",fn:Px},{prefix:"RCXVBU",fn:Ey},{prefix:"RPIN",fn:fy},{prefix:"RKOE",fn:Lp},{prefix:"RKOD",fn:Lp},{prefix:"RPW",fn:Dy},{prefix:"RID",fn:vy}];function Ct(e){let t=e.match(/^(G[A-Z0-9]{2})([0-9A-Fa-f]{2})([HML])(;@(?:LOG|TRM|BTH|MAIN|BACK|SM[0-4]))?$/);if(t){let i=t[4]||"",l={";@LOG":"LOG",";@TRM":"TRM",";@BTH":"BTH",";@BACK":"BACK",";@SM0":"SM0",";@SM1":"SM1",";@SM2":"SM2",";@SM3":"SM3",";@SM4":"SM4"}[i]||"BUF";return{type:"report",reportTag:t[1],eventNum:wd(t[2])??0,priority:t[3],log:l==="LOG",dest:l}}if(e.startsWith("SSSXP")){let i=e.slice(5,7),s=e.slice(7,9);return{type:"output",xp:i,state:s}}if(e.startsWith("SSSU")){let i=parseInt(e.slice(4,6)),s=e.slice(6,8);return{type:"userVar",uIdx:i,state:s}}if(e.startsWith("STD")){let i=parseInt(e.slice(3,5)),s=e.slice(5),l=s[0]||"R",u=s.slice(1).match(/^(\d{5})(\d{5})?/);return u?{type:"timer_reset",timer:i,timerCmd:l,reconfigure:!0,timerTime:parseInt(u[1])||0,timerDistance:parseInt(u[2]??"0")||0}:{type:"timer_reset",timer:i,timerCmd:l}}if(e==="SPKA"||e==="SPKD")return{type:"parking",parkCmd:e};let r=e.match(/^SCXGPS([012])$/);if(r)return{type:"gpsMode",gpsMode:r[1]};let a=e.match(/^SNT(\d{2})([SRID+\-]\d*)/);if(a)return{type:"counter",ntIdx:parseInt(a[1],10),ntCmd:a[2]};if(e==="SGCA")return{type:"gradualCut",gcCmd:"SGCA"};if(e==="SGCS")return{type:"gradualCut",gcCmd:"SGCS"};if(e==="SGCR")return{type:"gradualCut",gcCmd:"SGCR"};if(e==="SKO-")return{type:"sleep",sleepCmd:"SKO-"};if(e==="SKO+")return{type:"sleep",sleepCmd:"SKO+"};if(e==="SKOD")return{type:"sleep",sleepCmd:"SKOD"};let n=e.match(/^SKOE(\d{4})(\d{4})(\d{4})$/);if(n)return{type:"sleep",sleepCmd:"SKOE",koReposoFull:parseInt(n[1]),koGpsOff:parseInt(n[2]),koReposo:parseInt(n[3])};if(e==="SKOE")return{type:"sleep",sleepCmd:"SKOE"};let o=e.match(/^SKO\+\+([hm]?)(\d{3,4})(\d)(\d)(\d)(\d)(\d)(\d)$/);return o?{type:"sleep",sleepCmd:"SKO++",sleepUnit:o[1],sleepTime:parseInt(o[2]),sleepAcc:parseInt(o[3]),sleepIo:parseInt(o[4]),sleepCel:parseInt(o[5]),sleepGps:parseInt(o[6]),sleepInt:parseInt(o[7]),sleepExt:parseInt(o[8])}:{type:"raw",cmd:e}}function ia(e,{skipClassify:t=!1}={}){let r={},a=[],n=new Map,o=[],i={},s={},l=null,c=null,u=null,p=null,f=[];for(let h of e){let v=nx(h);if(!v)continue;let b=!1;for(let{prefix:x,fn:C}of Ty)if(v.startsWith(x)){try{let d=C(v);if(!d){f.push({line:v,reason:"Parser retorn\xF3 null"}),b=!0;break}if(console.log("[ConfigParser]",x,d),d.__wp)a.push(d.__wp);else if(d.__rg){let{index:m,block:w,vertices:A}=d.__rg;n.has(m)||n.set(m,new Map),n.get(m).set(w,A)}else if(d.__rule)o.push(d.__rule);else if(d.__bat00)Object.assign(i,d.__bat00);else if(d.__bat01)i.okMin=d.__bat01.okMin,i.okMax=d.__bat01.okMax,d.__bat01.debounce!==void 0&&(i.debounce01=d.__bat01.debounce);else if(d.__bat02)i.disconnectMax=d.__bat02.disconnectMax,d.__bat02.debounce!==void 0&&(i.debounce02=d.__bat02.debounce);else if(d.__ar){r.arConfigs||(r.arConfigs={});let m=d.__ar;r.arConfigs[m.index]={enabled:m.enabled,source:m.source,min:m.min,max:m.max,debounce:m.debounce}}else if(d.__velAlert||d.__velAlert_off||d.__vl)d.__vl&&(r.vlConfigs||(r.vlConfigs={}),r.vlConfigs[d.__vl.index]={enabled:d.__vl.enabled,speed:d.__vl.speed,filtered:d.__vl.filtered,...d.__vl.settle?{settle:d.__vl.settle}:{}}),d.__velAlert&&(l=d.__velAlert),d.__velAlert_off&&(c=d.__velAlert_off);else if(d.__dc){r.dcConfigs||(r.dcConfigs={});let m=d.__dc;r.dcConfigs[m.index]={enabled:!0,angle:m.angle}}else if(d.__parking)u=d.__parking;else if(d.__hm){r.hmConfigs||(r.hmConfigs={});let m=d.__hm;(m.enabled||m.magnitude>0)&&(r.hmConfigs[m.index]={enabled:m.enabled,eventType:m.eventType,magnitude:m.magnitude,minSpeed:m.minSpeed,hysteresis:m.hysteresis,timeWindow:m.timeWindow,cooldown:m.cooldown})}else if(d.__nt)r.ntConfigs||(r.ntConfigs={}),d.__nt.maxcount>0&&(r.ntConfigs[d.__nt.index]={enabled:!0,maxcount:d.__nt.maxcount});else if(d.__uc)r.ucConfigs||(r.ucConfigs={}),r.ucConfigs[d.__uc.index]={enabled:!0,expression:d.__uc.expression};else if(d.__uflag){r.uConfigs||(r.uConfigs={});let m=d.__uflag;r.uConfigs[m.index]={enabled:!0,value:m.value}}else if(d.__uv)r.uvConfigs||(r.uvConfigs={}),r.uvConfigs[d.__uv.index]={enabled:!0,convType:d.__uv.convType||"S",expression:d.__uv.expression};else if(d.__tr){r.trConfigs||(r.trConfigs={});let m=d.__tr;m.enabled&&(r.trConfigs[m.index]={enabled:!0,hora:m.hora,minuto:m.minuto,segundo:m.segundo})}else if(d.__tk)r.tkConfigs||(r.tkConfigs={}),r.tkConfigs[0]=d.__tk,r.tkConfig=d.__tk;else if(d.__od)r.odometer=d.__od;else if(d.__ho)r.horometer=d.__ho;else if(d.__mvt){r.mvtConfigs||(r.mvtConfigs={});let m=d.__mvt;r.mvtConfigs[m.index]={enabled:!0,deltaX:m.deltaX,deltaY:m.deltaY,deltaZ:m.deltaZ}}else if(d.__cxain){r.cxainConfigs||(r.cxainConfigs={});let m=d.__cxain,w=r.cxainConfigs[m.index]||{};r.cxainConfigs[m.index]={enabled:m.enabled,label:w.label??"",unit:w.unit??"",vA:m.vA,vB:m.vB,valueA:m.valueA,valueB:m.valueB,min:m.min,max:m.max}}else if(d.__cxxb){r.cxxbConfigs||(r.cxxbConfigs={});let m=d.__cxxb;r.cxxbConfigs[m.index]={enabled:!0,source:m.source,idxSource:m.idxSource,rxChars:m.rxChars,rxTimeout:m.rxTimeout,header:m.header,footer:m.footer,displayMode:m.displayMode,showHeadFoot:m.showHeadFoot}}else if(d.__ecu){r.ecuConfigs||(r.ecuConfigs={});let m=d.__ecu;r.ecuConfigs[m.index]={enabled:m.enabled,canId:m.canId,startBit:m.startBit,bitLength:m.bitLength,factor:m.factor,offset:m.offset,min:m.min,max:m.max,endian:m.endian,sign:m.sign}}else if(d.__ic){r.icConfigs||(r.icConfigs={});let m=d.__ic;(m.name||m.ibutton)&&(r.icConfigs[m.index]={enabled:!0,name:m.name,ibutton:m.ibutton})}else if(d.__sm){r.smConfigs||(r.smConfigs={});let m=d.__sm;m.phone&&(r.smConfigs[m.index]={enabled:!0,phone:m.phone})}else if(d.__cid){r.cidConfigs||(r.cidConfigs={});let m=d.__cid;(m.cidString||m.mode>0)&&(r.cidConfigs[m.index]={enabled:m.mode>0,mode:m.mode,cidString:m.cidString})}else if(d.__mc){r.mcConfigs||(r.mcConfigs={});let m=d.__mc;m.mcc>0&&(r.mcConfigs[m.index]={enabled:!0,mcc:m.mcc})}else if(d.__cxtr){let m=d.__cxtr;m.port==="M"&&(r.cxtrConfigs||(r.cxtrConfigs={}),r.cxtrConfigs[0]={enabled:!0,port:"M",baudrate:m.baudrate})}else if(d.__fct)r.fctConfigs||(r.fctConfigs={}),r.fctConfigs[d.__fct.index]={enabled:!0,value:d.__fct.value};else if(d.__dv){let m=d.__dv;r.dvConfigs||(r.dvConfigs={}),r.dvConfigs[m.index]={enabled:!0,velDiff:m.velDiff}}else if(d.__timer){let m=d.__timer;s[m.index]={enabled:m.enabled,timeout:m.timeout,distance:m.distance},d.td00!==void 0&&(r.td00=d.td00),d.td01!==void 0&&(r.td01=d.td01)}else if(d.__gc){r.gcConfigs||(r.gcConfigs={});let m=d.__gc;r.gcConfigs[0]={enabled:m.enabled,xpIndex:m.xpIndex,stepMs:m.stepMs,intervalS:m.intervalS,maxS:m.maxS,invert:m.invert}}else if(d.__dt){r.dtConfigs||(r.dtConfigs={});let m=d.__dt;(m.enabled||m.rom)&&(r.dtConfigs[m.index]={enabled:m.enabled,rom:m.rom})}else if(d.__bthPwr!==void 0)r.bthConfigs?.[0]?r.bthConfigs[0]={...r.bthConfigs[0],power:d.__bthPwr}:r.bthPower=d.__bthPwr;else if(d.__cxbth){r.bthConfigs||(r.bthConfigs={}),delete r.bthPower;let m=d.__cxbth;r.bthConfigs[0]={enabled:!0,power:m.power,name:m.name,pincode:m.pincode,timeout:m.timeout}}else if(d.__be){r.beConfigs||(r.beConfigs={});let m=d.__be;m.id&&(r.beConfigs[m.index]={enabled:!0,id:m.id,dist:m.dist,timeout:m.timeout})}else if(d.__bs){r.bsConfigs||(r.bsConfigs={});let m=d.__bs;r.bsConfigs[m.index]={enabled:!0,id:m.id,type:m.type,timeout:m.timeout,dist:m.dist,...m.outval?{outval:m.outval}:{}}}else if(d.__bsw){r.bswConfigs||(r.bswConfigs={});let m=d.__bsw;r.bswConfigs[m.index]={enabled:m.enabled,targets:m.targets,uuid:m.uuid,major:m.major,minor:m.minor,timeout:m.timeout,dist:m.dist}}else d.__firmware?p=d.__firmware:Object.assign(r,d)}catch(d){f.push({line:v,reason:`Error: ${d.message}`})}b=!0;break}b||f.push({line:v,reason:"Sin handler"})}if(a.length>0&&(r.waypoints=a.filter(h=>h.enabled).map(h=>({id:nl(),...h}))),n.size>0){let h=[];for(let[v,b]of n){let x=[];for(let C=0;C<4;C++){let d=b.get(C)||[];x.push(...d)}x.length>=3&&h.push({id:nl(),index:v,enabled:!0,label:"",vertices:x.map(C=>({id:nl(),...C}))})}h.length>0&&(r.regions=h)}if(o.length>0){let h=o.filter(v=>!(v.trgExpr==="PWR"&&v.sense==="+"&&v.actions.some(b=>b.includes("WIFPWR"))));if(t){if(r.customRules=h.map(v=>{let{terms:b,operators:x}=bt(v.trgExpr),C={terms:b.length>0?b:[{token:v.trgExpr,index:null,negate:!1}],operators:x,sense:v.sense,useRaw:b.length===0,raw:b.length===0?v.trgRaw:""},d={enabled:!1,terms:[],operators:[],useRaw:!1,raw:""};if(v.cndRaw){let w=bt(v.cndRaw);d=w.terms.length>0?{enabled:!0,terms:w.terms,operators:w.operators,useRaw:!1,raw:""}:{enabled:!0,terms:[],operators:[],useRaw:!0,raw:v.cndRaw}}let m=v.actions.map(w=>{let A=Ct(w);return A.id=Math.random().toString(36).slice(2,9),A});return{id:Math.random().toString(36).slice(2,9),label:"",enabled:v.enabled!==!1,slot:v.slot,trigger:C,condition:d,actions:m}}),r.rules=[],r.velAlert={enabled:!1},r.batteryAlert={enabled:!1},r.parkingAlert={enabled:!1},Object.keys(s).length>0&&(r.timerConfigs=s),r.headingAngle&&(r.dcConfigs||(r.dcConfigs={}),r.dcConfigs[0]={enabled:!0,angle:r.headingAngle}),Object.keys(i).length>0){if(r.arConfigs||(r.arConfigs={}),i.lowMin!==void 0||i.lowMax!==void 0){let v=i.debounce!==void 0?i.debounce*10:void 0;r.arConfigs[0]={enabled:!0,source:6,min:i.lowMin??0,max:i.lowMax??9999,debounce:v}}if(i.okMin!==void 0){let v=i.debounce01!==void 0?i.debounce01*10:i.debounce!==void 0?i.debounce*10:void 0;r.arConfigs[1]={enabled:!0,source:6,min:i.okMin,max:i.okMax??9999,debounce:v}}if(i.disconnectMax!==void 0){let v=i.debounce02!==void 0?i.debounce02*10:i.debounce!==void 0?i.debounce*10:void 0;r.arConfigs[2]={enabled:!0,source:6,min:0,max:i.disconnectMax,debounce:v}}}u&&(r.pkConfigs||(r.pkConfigs={}),r.pkConfigs[0]={enabled:!0,radius:u.radius,debounce:u.debounce})}else{let v={"TD00+":{id:0,cnd:"IGN"},"TD01+":{id:1,cnd:"IGN!"},"DC00+":{id:2},"IGN+":{id:3},"IGN-":{id:4},"IN00+":{id:5},"IN00-":{id:6},"IN01+":{id:7},"IN01-":{id:8},"IN02+":{id:9},"IN02-":{id:10},"IN03+":{id:11},"IN03-":{id:12},"IN04+":{id:13},"IN04-":{id:14},"IN05+":{id:15},"IN05-":{id:16},"IN06+":{id:17},"IN06-":{id:18},"XP00+":{id:19},"XP00-":{id:20},"XP01+":{id:21},"XP01-":{id:22},"XP02+":{id:23},"XP02-":{id:24}},b=[],x=[];for(let d of h){let m=d.trgExpr+d.sense,w=v[m];if(w){let A=d.actions.some(D=>D.includes("SPKA")||D.includes("SPKD")||D.includes("SCXGPS")||D.includes("SSSXP")||D.includes("SSSU")),R=w.id===2,I=!A&&d.actions.every(D=>D.match(/^G[A-Z0-9]{2}\d{2}[HML]/)||D.startsWith("STD"));if(!A&&(R||d.actions.length<=1||I)){let D=d.actions.length>0?Ct(d.actions[0]):null;b.push({ruleId:w.id,enabled:d.enabled,eventNum:D?.eventNum,priority:D?.priority,log:D?.log});continue}}if(d.trgExpr==="VL00"&&d.sense==="+"){let A=d.actions.length>0?Ct(d.actions[0]):null,R={enabled:!0};A&&(R.eventNum=A.eventNum,R.priority=A.priority,R.log=A.log,R.onEvent=!0),d.cndRaw==="IGN"&&(R.ignCond=!0);for(let I of d.actions)I.startsWith("SSSXP")&&(R.output=I.slice(5,7),R.activateOutput=!0);r.__velOn=R;continue}if(d.trgExpr==="VL01"&&d.sense==="-"){let A=d.actions.length>0?Ct(d.actions[0]):null;A&&(r.__velOff={offEventNum:A.eventNum,offPriority:A.priority,offLog:A.log,offEvent:!0});continue}if(/^AR0[012]$/.test(d.trgExpr)&&d.sense==="+"){let A=d.actions.length>0?Ct(d.actions[0]):null;r.__batRules||(r.__batRules={}),d.trgExpr==="AR00"&&A&&(r.__batRules.low={lowEvent:!0,lowEventNum:A.eventNum,lowPriority:A.priority,lowLog:A.log}),d.trgExpr==="AR01"&&A&&(r.__batRules.ok={okEvent:!0,okEventNum:A.eventNum,okPriority:A.priority,okLog:A.log}),d.trgExpr==="AR02"&&A&&(r.__batRules.disc={disconnectEvent:!0,disconnectEventNum:A.eventNum,disconnectPriority:A.priority,disconnectLog:A.log});continue}if(d.trgExpr==="IGN"&&d.sense==="-"&&d.actions.some(A=>A.includes("SPKA"))){r.__parkChangeGps=d.actions.some(A=>A==="SCXGPS1");continue}if(/^PK\d{2}$/.test(d.trgExpr)&&d.sense==="+"){let A=d.actions.length>0?Ct(d.actions[0]):null;A&&(r.__parkEvent={event:!0,eventNum:A.eventNum,priority:A.priority,log:A.log}),r.__parkRestoreGps=d.actions.some(R=>R==="SCXGPS0");continue}x.push(d)}let C=[];for(let d=0;d<=24;d++){let m=b.find(w=>w.ruleId===d);m?C[d]={id:d,enabled:m.enabled,eventNum:m.eventNum,priority:m.priority,log:m.log,_fromDevice:!0}:C[d]={id:d,enabled:!1}}if(r.rules=C,r.__velOn&&(r.velAlert={...r.__velOn,...r.__velOff||{}},l&&(r.velAlert.onSpeed=l.onSpeed),c&&(r.velAlert.offSpeed=c.offSpeed),delete r.__velOn,delete r.__velOff),r.__batRules){let d={enabled:!0,...i};r.__batRules.low&&Object.assign(d,r.__batRules.low),r.__batRules.ok&&Object.assign(d,r.__batRules.ok),r.__batRules.disc&&Object.assign(d,r.__batRules.disc),r.batteryAlert=d,delete r.__batRules}if(u||r.__parkEvent){let d={enabled:!0,...u||{}};r.__parkChangeGps!==void 0&&(d.changeGps=r.__parkChangeGps),r.__parkEvent&&Object.assign(d,r.__parkEvent),r.__parkRestoreGps!==void 0&&(d.restoreGps=r.__parkRestoreGps),r.parkingAlert=d,delete r.__parkChangeGps,delete r.__parkEvent,delete r.__parkRestoreGps}r.customRules=x.map(d=>{let{terms:m,operators:w}=bt(d.trgExpr),A={terms:m.length>0?m:[{token:d.trgExpr,index:null,negate:!1}],operators:w,sense:d.sense,useRaw:m.length===0,raw:m.length===0?d.trgRaw:""},R={enabled:!1,terms:[],operators:[],useRaw:!1,raw:""};if(d.cndRaw){let D=bt(d.cndRaw);R=D.terms.length>0?{enabled:!0,terms:D.terms,operators:D.operators,useRaw:!1,raw:""}:{enabled:!0,terms:[],operators:[],useRaw:!0,raw:d.cndRaw}}let I=d.actions.map(D=>{let T=Ct(D);return T.id=Math.random().toString(36).slice(2,9),T});return{id:Math.random().toString(36).slice(2,9),label:"",enabled:d.enabled!==!1,trigger:A,condition:R,actions:I}}),Object.keys(s).length>0&&(r.timerConfigs=s)}}if(Object.keys(s).length>0&&(r.timerConfigs={...r.timerConfigs||{},...s}),l&&!r.velAlert?.enabled&&(r.velAlert={...r.velAlert||{},onSpeed:l.onSpeed},c&&(r.velAlert.offSpeed=c.offSpeed)),Object.keys(i).length>0&&!r.batteryAlert?.enabled&&(r.batteryAlert={...r.batteryAlert||{},...i}),u&&!r.parkingAlert?.enabled&&(r.parkingAlert={...r.parkingAlert||{},...u}),t&&Object.keys(i).length>0){r.arConfigs||(r.arConfigs={});let h=v=>v!==void 0?Math.round(v*10):void 0;i.lowMin!==void 0&&r.arConfigs[0]===void 0&&(r.arConfigs[0]={enabled:!0,source:6,min:i.lowMin,max:i.lowMax??9999,debounce:h(i.debounce)}),i.okMin!==void 0&&r.arConfigs[1]===void 0&&(r.arConfigs[1]={enabled:!0,source:6,min:i.okMin,max:i.okMax??9999,debounce:h(i.debounce01??i.debounce)}),i.disconnectMax!==void 0&&r.arConfigs[2]===void 0&&(r.arConfigs[2]={enabled:!0,source:6,min:0,max:i.disconnectMax,debounce:h(i.debounce02??i.debounce)})}return r._slotsVersion=2,console.log("[ConfigParser] Final config:",r),console.log("[ConfigParser] RX lines processed:",e.length),f.length>0&&console.warn("[ConfigParser] Unhandled lines:",f),{config:r,meta:{firmware:p},unhandled:f}}function sa(e){let t=[...(e||"").matchAll(/>([SQ][^<]+)</g)].map(i=>">"+i[1]+"<"),r=["**D","*55AA"],a=["SSSCELPWR","SSSXP"],n=[],o=[];for(let i of t){let s=i.slice(1,-1);if(r.some(l=>s.includes(l))||a.some(l=>s.startsWith(l))){o.push(s);continue}if(s.startsWith("S")){let l="R"+s.slice(1),c=s.match(/^SRL([0-9A-Fa-f]{2})([ED].*)$/);c&&(l=`RRL${c[1].toUpperCase()}${c[2]}`),n.push(">"+l+"<")}}return{rxLines:n,totalCmds:t.length,skipped:o}}function Fp(e,t){let r={},a={},n={},o={},i=[],s={},l={},c={},u={},p=(e||"").split(`
19
+ `),f="",h="",v=!1,b=[],x=/^\s*\/\/\s*@rule\s+/m.test(e||"");for(let C of p){let d=C.trim(),m=d.match(/^\/\/\s*@rinho\s+desc=(.*)$/);if(m){v&&b.length>0&&(t.description=b.join(`
20
+ `));let g=m[1];g.length>0?(t.description=g,v=!1,b.length=0):(v=!0,b.length=0),f="";continue}if(v){if(d.startsWith("//")&&!d.startsWith("// @")&&!d.startsWith("// __")){b.push(d.replace(/^\/\/\s?/,"")),f="";continue}b.length>0&&(t.description=b.join(`
21
+ `)),v=!1,b.length=0}let w=d.match(/^\/\/\s*@label\s+([A-Z]+)(\d{2})\s+(.+)/);if(w){let g=w[1],E=parseInt(w[2]),_=w[3].trim();g==="IN"?a[E]=_:g==="XP"?n[E]=_:g==="RG"?l[E]=_:g==="WP"?c[E]=_:(r[g]||(r[g]={}),r[g][E]=_)}let A=d.match(/^\/\/\s*Nombre:\s*(.+?)(?:\s+en el archivo\s+".*")?\s*$/);A&&(h=A[1].trim());let R=d.match(/^\/\/\s*Se[ñn]al:\s*RG(\d{1,2})\s*$/i);if(R&&h){let g=parseInt(R[1]);l[g]===void 0&&(l[g]=h),h=""}let I=d.match(/^\/\/\s*@rule\s+([0-9A-Fa-f]{2})\s+(.+)/);if(I){let g=Ne(I[1].toUpperCase());if(g!==null){let E=(t.customRules||[]).find(_=>_.slot===g);E&&(E.label=I[2].trim())}}let D=d.match(/^\/\/\s*@event\s+([0-9A-Fa-f]{2})\s+(.+)/);if(D){let g=parseInt(D[1],16);!isNaN(g)&&g>=0&&g<256&&(o[g]=D[2].trim(),i.includes(g)||i.push(g))}let T=d.match(/^\/\/\s*@cxain\s+(\d+)\s+(.+)$/);if(T){let g=parseInt(T[1]),E=T[2],_={},N=E.match(/(?:^|\s)unit=(\S+)/);N&&(_.unit=N[1]);let B=E.match(/(?:^|\s)label=(.*)$/);B&&(_.label=B[1].trim()),Object.keys(_).length>0&&(s[g]=_)}let y=d.match(/^>SRL([0-9A-Fa-f]{2})/i);if(y&&f&&!x){let g=Ne(y[1].toUpperCase());g!==null&&(u[g]=f)}d.startsWith("//")&&!d.startsWith("// @")&&!d.startsWith("// __")&&!d.startsWith("// Borrar")&&!d.startsWith("// Configuraci\xF3n")?f=d.replace(/^\/\/\s*/,"").trim():d&&(f="")}v&&b.length>0&&(t.description=b.join(`
22
+ `));for(let C of t.customRules||[])!C.label&&u[C.slot]&&(C.label=u[C.slot]);if(Object.keys(l).length&&Array.isArray(t.regions))for(let C of t.regions){let d=l[C.index];d&&!C.label&&(C.label=d)}if(Object.keys(c).length&&Array.isArray(t.waypoints))for(let C of t.waypoints){let d=c[C.index];d&&!C.label&&(C.label=d)}if(Object.keys(r).length&&(t.resourceLabels={...t.resourceLabels||{},...r}),Object.keys(a).length&&(t.inputLabels={...t.inputLabels||{},...a}),Object.keys(n).length&&(t.outputLabels={...t.outputLabels||{},...n}),Object.keys(o).length&&(t.eventLabels={...t.eventLabels||{},...o},t.eventOrder=i),Object.keys(s).length){t.cxainConfigs={...t.cxainConfigs||{}};for(let[C,d]of Object.entries(s)){let m=Number(C),w=t.cxainConfigs[m]||{};t.cxainConfigs[m]={...w,...d.label!=null?{label:d.label}:{},...d.unit!=null?{unit:d.unit}:{}}}}return t}var Ry=[{prefix:"STD",token:"TD",idxPos:3},{prefix:"STR",token:"TR",idxPos:3},{prefix:"SNT",token:"NT",idxPos:3},{prefix:"SDC",token:"DC",idxPos:3},{prefix:"SVL",token:"VL",idxPos:3},{prefix:"SDV",token:"DV",idxPos:3},{prefix:"SHM",token:"HM",idxPos:3},{prefix:"SMVT",token:"MVT",idxPos:4},{prefix:"SMC",token:"MC",idxPos:3},{prefix:"STK",token:"TK",idxPos:null},{prefix:"SCXAIN",token:"CXAIN",idxPos:6},{prefix:"SCXAC",token:"CXAC",idxPos:null},{prefix:"SCXIGNV",token:"CXIGNV",idxPos:null},{prefix:"SCXIGN",token:"CXIGN",idxPos:null},{prefix:"SCXGPS",token:"CXGPS",idxPos:null},{prefix:"SCXCQ",token:"CXCQ",idxPos:null},{prefix:"SCXWIF",token:"CXWIF",idxPos:null},{prefix:"SCXAPN",token:"CXAPN",idxPos:null},{prefix:"SCXIP",token:"CXIP",idxPos:null},{prefix:"SIP",token:"IP",idxPos:3},{prefix:"SWS",token:"WS",idxPos:null},{prefix:"SCXSMW",token:"CXSMW",idxPos:null},{prefix:"SSSCELPWR",token:"CELPWR",idxPos:null},{prefix:"SCOPS",token:"COPS",idxPos:null},{prefix:"SCOP1",token:"COP1",idxPos:null},{prefix:"SCXSIM",token:"CXSIM",idxPos:null},{prefix:"SCXAP1",token:"CXAP1",idxPos:null},{prefix:"SCXSMS",token:"CXSMS",idxPos:null},{prefix:"SCXRF",token:"CXRF",idxPos:null},{prefix:"SKA",token:"KA",idxPos:null},{prefix:"STAG",token:"TAG",idxPos:null},{prefix:"SCXECU",token:"CXECU",idxPos:6},{prefix:"SCXBTH",token:"CXBTH",idxPos:null},{prefix:"SCXCAN",token:"CXCAN",idxPos:null},{prefix:"SCXOW",token:"CXOW",idxPos:null},{prefix:"SCXDRVB",token:"DRVB",idxPos:null},{prefix:"SCXDRV",token:"DRV",idxPos:null},{prefix:"SCXTR",token:"CXTR",idxPos:null},{prefix:"SAR",token:"AR",idxPos:3},{prefix:"SPK",token:"PK",idxPos:null},{prefix:"SUV",token:"UV",idxPos:3},{prefix:"SSSU",token:"U",idxPos:4},{prefix:"SCXBB",token:"CXBB",idxPos:null},{prefix:"SCXXB",token:"CXXB",idxPos:5},{prefix:"SUC",token:"UC",idxPos:3},{prefix:"SICL",token:"IC",idxPos:4},{prefix:"SIC ",token:"IC",idxPos:4},{prefix:"SSM",token:"SM",idxPos:3},{prefix:"SCID",token:"CID",idxPos:4},{prefix:"SBSW",token:"BSW",idxPos:4},{prefix:"SBS",token:"BS",idxPos:3},{prefix:"SBE",token:"BE",idxPos:3},{prefix:"SDT",token:"DT",idxPos:3},{prefix:"SCXXP",token:"XP",idxPos:5},{prefix:"SGC",token:"GC",idxPos:null},{prefix:"SIT",token:"IN",idxPos:3},{prefix:"SWP",token:"WP",idxPos:3},{prefix:"SRG",token:"RG",idxPos:3},{prefix:"SRL",token:"RL",idxPos:3}];function Ho(e){let t=e.match(/^>([A-Z][A-Za-z0-9* ]+)/);if(!t)return null;let r=t[1];for(let a of Ry)if(r.startsWith(a.prefix)){if(a.idxPos===null)return{token:a.token,index:0};let n=r.slice(a.idxPos,a.idxPos+2);if(a.token==="RL")return{token:"RL",index:Ne(n.toUpperCase())??0};if(a.token==="UC"){let i=parseInt(n,16);return{token:"UC",index:isNaN(i)?0:i}}let o=parseInt(n,10);return isNaN(o)?{token:a.token,index:0}:{token:a.token,index:o}}return null}var Up=[{country:"AR",countryName:"Argentina",operator:"Claro",apn:"igprs.claro.com.ar",user:"clarogprs",pass:"clarogprs999",mccmnc:"722310"},{country:"AR",countryName:"Argentina",operator:"Claro (alt)",apn:"internet.ctimovil.com.ar",user:"",pass:"",mccmnc:"722310"},{country:"AR",countryName:"Argentina",operator:"Movistar",apn:"wap.gprs.unifon.com.ar",user:"wap",pass:"wap",mccmnc:"72207"},{country:"AR",countryName:"Argentina",operator:"Movistar M2M",apn:"m2m.movistar",user:"movistar",pass:"movistar",mccmnc:"72207"},{country:"AR",countryName:"Argentina",operator:"Personal",apn:"internet.personal.com",user:"gprs",pass:"adgb",mccmnc:"72234"},{country:"AR",countryName:"Argentina",operator:"Personal (datos)",apn:"datos.personal.com",user:"datos",pass:"datos",mccmnc:"72234"},{country:"AR",countryName:"Argentina",operator:"Personal M2M",apn:"m2m.personal.com",user:"",pass:"",mccmnc:"72234"},{country:"AR",countryName:"Argentina",operator:"Tuenti",apn:"internet.tuenti",user:"internet",pass:"internet",mccmnc:"72207"},{country:"BR",countryName:"Brasil",operator:"Claro",apn:"claro.com.br",user:"claro",pass:"claro",mccmnc:"72405"},{country:"BR",countryName:"Brasil",operator:"Vivo",apn:"zap.vivo.com.br",user:"vivo",pass:"vivo",mccmnc:"72411"},{country:"BR",countryName:"Brasil",operator:"TIM",apn:"timbrasil.br",user:"tim",pass:"tim",mccmnc:"72402"},{country:"BR",countryName:"Brasil",operator:"Oi",apn:"gprs.oi.com.br",user:"oi",pass:"oi",mccmnc:"72431"},{country:"PY",countryName:"Paraguay",operator:"Tigo",apn:"internet.tigo.py",user:"tigo",pass:"tigo",mccmnc:"74404"},{country:"PY",countryName:"Paraguay",operator:"Tigo M2M",apn:"m2mpy.tigo.com",user:"",pass:"",mccmnc:"74404"},{country:"PY",countryName:"Paraguay",operator:"Personal",apn:"internet",user:"personal",pass:"personal",mccmnc:"74405"},{country:"PY",countryName:"Paraguay",operator:"Claro",apn:"internet.ctimovil.com.py",user:"ctigprs",pass:"ctigprs999",mccmnc:"74402"},{country:"PY",countryName:"Paraguay",operator:"Vox",apn:"vox.internet",user:"",pass:"",mccmnc:"74401"},{country:"UY",countryName:"Uruguay",operator:"Antel",apn:"antel.lte",user:"",pass:"",mccmnc:"74801"},{country:"UY",countryName:"Uruguay",operator:"Movistar",apn:"webapn.movistar.com.uy",user:"movistar",pass:"movistar",mccmnc:"74807"},{country:"UY",countryName:"Uruguay",operator:"Claro",apn:"igprs.claro.com.uy",user:"",pass:"",mccmnc:"74810"},{country:"CL",countryName:"Chile",operator:"Entel",apn:"bam.entelpcs.cl",user:"entelpcs",pass:"entelpcs",mccmnc:"73001"},{country:"CL",countryName:"Chile",operator:"Movistar",apn:"web.tmovil.cl",user:"web",pass:"web",mccmnc:"73002"},{country:"CL",countryName:"Chile",operator:"Claro",apn:"bam.clarochile.cl",user:"clarochile",pass:"clarochile",mccmnc:"73003"},{country:"CL",countryName:"Chile",operator:"WOM",apn:"internet",user:"",pass:"",mccmnc:"73009"},{country:"CO",countryName:"Colombia",operator:"Claro",apn:"internet.comcel.com.co",user:"comcel",pass:"comcel",mccmnc:"732101"},{country:"CO",countryName:"Colombia",operator:"Movistar",apn:"internet.movistar.com.co",user:"movistar",pass:"movistar",mccmnc:"732123"},{country:"CO",countryName:"Colombia",operator:"Tigo",apn:"web.colombiamovil.com.co",user:"",pass:"",mccmnc:"732103"},{country:"MX",countryName:"M\xE9xico",operator:"Telcel",apn:"internet.itelcel.com",user:"webgprs",pass:"webgprs2002",mccmnc:"334020"},{country:"MX",countryName:"M\xE9xico",operator:"AT&T",apn:"modem.nexteldata.com.mx",user:"",pass:"",mccmnc:"334090"},{country:"MX",countryName:"M\xE9xico",operator:"Movistar",apn:"internet.movistar.mx",user:"movistar",pass:"movistar",mccmnc:"334030"},{country:"PE",countryName:"Per\xFA",operator:"Claro",apn:"claro.pe",user:"claro",pass:"claro",mccmnc:"71610"},{country:"PE",countryName:"Per\xFA",operator:"Movistar",apn:"internet.movistar.pe",user:"",pass:"",mccmnc:"71606"},{country:"PE",countryName:"Per\xFA",operator:"Entel",apn:"entel.pe",user:"",pass:"",mccmnc:"71617"},{country:"PE",countryName:"Per\xFA",operator:"Bitel",apn:"bitel.pe",user:"",pass:"",mccmnc:"71615"},{country:"BO",countryName:"Bolivia",operator:"Tigo",apn:"internet.tigo.bo",user:"",pass:"",mccmnc:"73603"},{country:"BO",countryName:"Bolivia",operator:"Entel",apn:"4g.entel",user:"",pass:"",mccmnc:"73602"},{country:"BO",countryName:"Bolivia",operator:"Viva",apn:"internet.nuevatel.com",user:"",pass:"",mccmnc:"73601"},{country:"EC",countryName:"Ecuador",operator:"Claro",apn:"internet.claro.com.ec",user:"",pass:"",mccmnc:"74001"},{country:"EC",countryName:"Ecuador",operator:"Movistar",apn:"internet.movistar.com.ec",user:"movistar",pass:"movistar",mccmnc:"74000"},{country:"EC",countryName:"Ecuador",operator:"CNT",apn:"internet.cnt.net.ec",user:"",pass:"",mccmnc:"74002"},{country:"US",countryName:"Estados Unidos",operator:"AT&T",apn:"phone",user:"",pass:"",mccmnc:"310410"},{country:"US",countryName:"Estados Unidos",operator:"AT&T IoT",apn:"m2m.com.attz",user:"",pass:"",mccmnc:"310410"},{country:"US",countryName:"Estados Unidos",operator:"T-Mobile",apn:"fast.t-mobile.com",user:"",pass:"",mccmnc:"310260"},{country:"US",countryName:"Estados Unidos",operator:"Verizon",apn:"vzwinternet",user:"",pass:"",mccmnc:"311480"},{country:"ES",countryName:"Espa\xF1a",operator:"Movistar",apn:"movistar.es",user:"MOVISTAR",pass:"MOVISTAR",mccmnc:"21407"},{country:"ES",countryName:"Espa\xF1a",operator:"Vodafone",apn:"airtelnet.es",user:"wap@wap",pass:"wap125",mccmnc:"21401"},{country:"ES",countryName:"Espa\xF1a",operator:"Orange",apn:"orangeworld",user:"orange",pass:"orange",mccmnc:"21403"}],D_=[...new Map(Up.map(e=>[e.country,{code:e.country,name:e.countryName}])).values()],$p=new Map(Up.map(e=>[e.mccmnc.slice(0,3),e.countryName]));function Wp(e){let t=Number(e);return!Number.isInteger(t)||t<0||t>999?null:$p.get(String(t).padStart(3,"0"))??null}var Vp=[...$p.entries()].map(([e,t])=>({mcc:Number(e),name:t})).sort((e,t)=>e.name.localeCompare(t.name,"es")||e.mcc-t.mcc);var Gp=[4800,9600,19200,38400,57600,115200,230400,460800,921600],qp=115200;var _y=["GP","WI","BT","TR","BGP","BWI","LOG","BACK","ALL"],Iy=e=>[{token:"TD",label:e("allRes.td.label","Timers"),max:32,configKey:"timerConfigs",desc:e("allRes.td.desc","Pulso peri\xF3dico por tiempo y/o distancia. Trigger: TD00+"),fields:[{key:"timeout",label:e("allRes.td.timeout","Tiempo"),unit:e("allRes.units.sec","seg"),min:0,max:7200,inputMax:99999,step:5,default:30,summary:t=>t?t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m`:`${Math.floor(t/3600)}h${Math.floor(t%3600/60)?Math.floor(t%3600/60)+"m":""}`:""},{key:"distance",label:e("allRes.td.distance","Distancia"),unit:"m",min:0,max:5e3,inputMax:99999,step:50,default:0,summary:t=>t?`${t}m`:""}]},{token:"DC",label:e("allRes.dc.label","Headings"),max:3,configKey:"dcConfigs",desc:e("allRes.dc.desc","Cambio de direcci\xF3n GPS. Trigger: DC00+"),fields:[{key:"angle",label:e("allRes.dc.angle","\xC1ngulo"),unit:"\xB0",min:0,max:359,step:1,default:30,summary:t=>t===0?e("allRes.dc.disabled","deshabilitado"):`${t}\xB0`}]},{token:"VL",label:e("allRes.vl.label","Velocidad"),max:16,configKey:"vlConfigs",desc:e("allRes.vl.desc","Umbral de velocidad. Trigger: VL00+, VL01-"),fields:[{key:"speed",label:e("allRes.vl.speed","Velocidad"),unit:"km/h",min:1,max:250,step:5,default:120,summary:t=>`${t} km/h`},{key:"filtered",label:e("allRes.vl.filtered","Filtrado"),unit:"",min:0,max:1,default:1,isToggle:!0,summary:t=>t?e("allRes.vl.filteredOn","filtrado"):e("allRes.vl.filteredOff","sin filtro")},{key:"settle",label:e("allRes.vl.settle","Sostenido"),unit:e("allRes.vl.settleUnit","d\xE9cimas"),min:0,max:999,step:1,default:0,summary:t=>t?`${t/10} s`:""}]},{token:"DV",label:e("allRes.dv.label","Aceleraci\xF3n"),max:4,configKey:"dvConfigs",desc:e("allRes.dv.desc","Frenada/aceleraci\xF3n brusca por delta de velocidad GPS. Trigger: DV00+"),fields:[{key:"velDiff",label:"Delta",unit:"km/h",min:-50,max:50,step:1,default:10,summary:t=>`${t} km/h`}]},{token:"HM",label:e("allRes.hm.label","Maniobras"),max:8,configKey:"hmConfigs",desc:e("allRes.hm.desc","Maniobras bruscas. HM00-01: GPS, HM02-07: aceler\xF3metro. Trigger: HM00+"),fields:[{key:"eventType",label:e("allRes.hm.eventType","Tipo"),unit:"",min:0,max:7,slider:!1,default:0,summary:t=>[e("allRes.hm.eventTypes.0","Acel GPS"),e("allRes.hm.eventTypes.1","Fren GPS"),e("allRes.hm.eventTypes.2","Giro izq"),e("allRes.hm.eventTypes.3","Giro der"),e("allRes.hm.eventTypes.4","Centr\xEDpeta"),e("allRes.hm.eventTypes.5","Imp.lat"),e("allRes.hm.eventTypes.6","Acel IMU"),e("allRes.hm.eventTypes.7","Fren IMU")][t]||`T${t}`},{key:"magnitude",label:e("allRes.hm.magnitude","Magnitud"),unit:"",min:1,max:5e3,step:10,default:7,summary:t=>`mag:${t}`},{key:"minSpeed",label:e("allRes.hm.minSpeed","Vel m\xEDn"),unit:"km/h",min:0,max:255,step:5,default:5},{key:"hysteresis",label:e("allRes.hm.hysteresis","Hist\xE9resis"),unit:"%",min:0,max:100,step:5,default:10},{key:"timeWindow",label:e("allRes.hm.timeWindow","Ventana"),unit:"ms",min:0,max:5e3,step:100,default:3e3,summary:t=>t>=1e3?`${(t/1e3).toFixed(1)}s`:`${t}ms`},{key:"cooldown",label:"Cooldown",unit:e("allRes.units.sec","seg"),min:0,max:60,step:1,default:5,summary:t=>`${t}s`}],presets:[{id:"fleet",label:e("allRes.hm.preset.fleet","Flota Comercial"),icon:"\u{1F69B}",data:{0:{enabled:!0,eventType:0,magnitude:5,minSpeed:3,hysteresis:20,timeWindow:4e3,cooldown:10},1:{enabled:!0,eventType:1,magnitude:8,minSpeed:8,hysteresis:15,timeWindow:3e3,cooldown:8},2:{enabled:!0,eventType:5,magnitude:1500,minSpeed:0,hysteresis:10,timeWindow:0,cooldown:45},3:{enabled:!0,eventType:6,magnitude:1500,minSpeed:0,hysteresis:10,timeWindow:0,cooldown:45}},labels:{0:e("allRes.hm.preset.fleet.accel","Aceleraci\xF3n"),1:e("allRes.hm.preset.fleet.brake","Frenado"),2:e("allRes.hm.preset.fleet.latImpact","Impacto lateral"),3:e("allRes.hm.preset.fleet.frontImpact","Impacto frontal")}},{id:"hazmat",label:e("allRes.hm.preset.hazmat","Veh\xEDculos Peligrosos"),icon:"\u26FD",data:{0:{enabled:!0,eventType:0,magnitude:4,minSpeed:3,hysteresis:25,timeWindow:5e3,cooldown:15},1:{enabled:!0,eventType:1,magnitude:6,minSpeed:5,hysteresis:20,timeWindow:4e3,cooldown:12},2:{enabled:!0,eventType:2,magnitude:200,minSpeed:10,hysteresis:15,timeWindow:3e3,cooldown:8},3:{enabled:!0,eventType:3,magnitude:200,minSpeed:10,hysteresis:15,timeWindow:3e3,cooldown:8},4:{enabled:!0,eventType:4,magnitude:220,minSpeed:15,hysteresis:12,timeWindow:4e3,cooldown:10},5:{enabled:!0,eventType:5,magnitude:1200,minSpeed:0,hysteresis:10,timeWindow:100,cooldown:45},6:{enabled:!0,eventType:6,magnitude:1200,minSpeed:0,hysteresis:10,timeWindow:100,cooldown:45},7:{enabled:!0,eventType:7,magnitude:1200,minSpeed:0,hysteresis:10,timeWindow:100,cooldown:45}},labels:{0:e("allRes.hm.preset.hazmat.accel","Aceleraci\xF3n suave"),1:e("allRes.hm.preset.hazmat.brake","Frenado gradual"),2:e("allRes.hm.preset.hazmat.turnL","Giro izq suave"),3:e("allRes.hm.preset.hazmat.turnR","Giro der suave"),4:e("allRes.hm.preset.hazmat.centripetal","Centr\xEDpeta"),5:e("allRes.hm.preset.hazmat.latImpact","Imp. lateral"),6:e("allRes.hm.preset.hazmat.frontImpact","Imp. frontal"),7:e("allRes.hm.preset.hazmat.rearImpact","Imp. posterior")}},{id:"family",label:e("allRes.hm.preset.family","Familiar Est\xE1ndar"),icon:"\u{1F697}",data:{0:{enabled:!0,eventType:0,magnitude:7,minSpeed:5,hysteresis:15,timeWindow:3e3,cooldown:5},1:{enabled:!0,eventType:1,magnitude:10,minSpeed:10,hysteresis:10,timeWindow:2e3,cooldown:5},2:{enabled:!0,eventType:2,magnitude:330,minSpeed:15,hysteresis:10,timeWindow:2e3,cooldown:3},3:{enabled:!0,eventType:3,magnitude:330,minSpeed:15,hysteresis:10,timeWindow:2e3,cooldown:3},4:{enabled:!0,eventType:5,magnitude:2e3,minSpeed:0,hysteresis:5,timeWindow:0,cooldown:30},5:{enabled:!0,eventType:6,magnitude:2e3,minSpeed:0,hysteresis:5,timeWindow:0,cooldown:30},6:{enabled:!0,eventType:7,magnitude:2e3,minSpeed:0,hysteresis:5,timeWindow:0,cooldown:30},7:{enabled:!0,eventType:4,magnitude:330,minSpeed:20,hysteresis:10,timeWindow:2e3,cooldown:5}},labels:{0:e("allRes.hm.preset.family.accel","Aceleraci\xF3n"),1:e("allRes.hm.preset.family.brake","Frenado"),2:e("allRes.hm.preset.family.turnL","Giro izq"),3:e("allRes.hm.preset.family.turnR","Giro der"),4:e("allRes.hm.preset.family.latImpact","Imp. lateral"),5:e("allRes.hm.preset.family.frontImpact","Imp. frontal"),6:e("allRes.hm.preset.family.rearImpact","Imp. posterior"),7:e("allRes.hm.preset.family.centripetal","Centr\xEDpeta")}}]},{token:"AR",label:e("allRes.ar.label","Anal\xF3gicos"),max:12,configKey:"arConfigs",desc:e("allRes.ar.desc","Monitoreo anal\xF3gico: voltaje, ADC o temperatura. Activa se\xF1al cuando valor est\xE1 en rango [m\xEDn, m\xE1x). Trigger: AR00+"),fields:[{key:"source",label:e("allRes.ar.source","Origen"),unit:"",default:6,isSelect:!0,options:[{value:6,label:e("allRes.ar.source.vbat","Bater\xEDa principal (VBat) \u2014 cV")},{value:7,label:e("allRes.ar.source.vbu","Bater\xEDa backup (VBU) \u2014 cV")},{value:0,label:e("allRes.ar.source.adc0","ADC 0 (AN0) \u2014 cV")},{value:1,label:e("allRes.ar.source.adc1","ADC 1 (AN1) \u2014 cV")},{value:2,label:e("allRes.ar.source.adc2","ADC 2 (AN2) \u2014 cV")},{value:3,label:e("allRes.ar.source.adc3","ADC 3 (AN3) \u2014 cV")},{value:4,label:e("allRes.ar.source.adc4","ADC 4 (AN4) \u2014 cV")},{value:5,label:e("allRes.ar.source.adc5","ADC 5 (AN5) \u2014 cV")},{value:10,label:e("allRes.ar.source.tempMcu","Temperatura MCU \u2014 c\xB0C")},{value:8,label:e("allRes.ar.source.dallas0","Temperatura Dallas 0 \u2014 c\xB0C")},{value:9,label:e("allRes.ar.source.dallas1","Temperatura Dallas 1 \u2014 c\xB0C")},{value:11,label:e("allRes.ar.source.dallas2","Temperatura Dallas 2 \u2014 c\xB0C")},{value:12,label:e("allRes.ar.source.dallas3","Temperatura Dallas 3 \u2014 c\xB0C")},{value:13,label:e("allRes.ar.source.dallas4","Temperatura Dallas 4 \u2014 c\xB0C")},{value:14,label:e("allRes.ar.source.dallas5","Temperatura Dallas 5 \u2014 c\xB0C")},{value:15,label:e("allRes.ar.source.dallas6","Temperatura Dallas 6 \u2014 c\xB0C")},{value:16,label:e("allRes.ar.source.dallas7","Temperatura Dallas 7 \u2014 c\xB0C")}],summary:t=>({0:"AN0",1:"AN1",2:"AN2",3:"AN3",4:"AN4",5:"AN5",6:"VBat",7:"VBU",8:"DT0",9:"DT1",10:"MCU",11:"DT2",12:"DT3",13:"DT4",14:"DT5",15:"DT6",16:"DT7"})[t]||`src${t}`},{key:"min",label:e("allRes.ar.min","M\xEDn"),unit:"",min:-9999,max:9999,step:10,default:0,summary:(t,r)=>{let a=r?.source??6;return a>=8||a===10?`${(t/100).toFixed(1)}\xB0C`:`${(t/100).toFixed(1)}V`},dynamicUnit:t=>{let r=t?.source??6;return r>=8||r===10?"c\xB0C":"cV"}},{key:"max",label:e("allRes.ar.max","M\xE1x"),unit:"",min:-9999,max:9999,step:10,default:9999,summary:(t,r)=>{let a=r?.source??6;return a>=8||a===10?`${(t/100).toFixed(1)}\xB0C`:`${(t/100).toFixed(1)}V`},dynamicUnit:t=>{let r=t?.source??6;return r>=8||r===10?"c\xB0C":"cV"}},{key:"debounce",label:"Debounce",unit:"ds",min:0,max:999,step:5,default:50,summary:t=>`${(t/10).toFixed(1)}s`}]},{token:"U",label:"Flags",max:64,configKey:"uConfigs",desc:e("allRes.u.desc","Flags booleanos SET/CLR desde acciones de reglas. U00-U15: vol\xE1tiles. U16-U31: permanentes. U32-U47: vol\xE1tiles. U48-U63: permanentes. Trigger: U00+"),fields:[{key:"value",label:e("allRes.u.value","Valor"),unit:"",min:0,max:1,default:0,isButtons:!0,buttons:[{value:0,label:"0",color:"var(--rinho-border)"},{value:1,label:"1",color:"var(--rinho-500)"}],summary:t=>t?"SET (1)":"CLR (0)"}],indexHint:t=>t>=16&&t<=31||t>=48&&t<=63?e("allRes.u.permanent","permanente"):e("allRes.u.volatile","vol\xE1til")},{token:"NT",label:e("allRes.nt.label","Contadores"),max:32,configKey:"ntConfigs",desc:e("allRes.nt.desc","Contadores con valor m\xE1ximo. Se incrementan/decrementan desde acciones. Dispara al llegar al m\xE1ximo. Trigger: NT00+"),fields:[{key:"maxcount",label:e("allRes.nt.maxcount","M\xE1ximo"),unit:"",min:1,max:65535,step:1,default:10,summary:t=>`max:${t}`}]},{token:"TR",label:e("allRes.tr.label","Horarios"),max:8,configKey:"trConfigs",noToggle:!0,desc:e("allRes.tr.desc","Reglas por horario. Dispara en un momento espec\xEDfico o peri\xF3dicamente. ** = cada hora/minuto/segundo (wildcard). Default: ****** (cada segundo). Trigger: TR00+"),fields:[{key:"hora",label:e("allRes.tr.hora","Hora"),unit:"h",min:-1,max:23,slider:!0,step:1,default:0,summary:t=>t<0?"**h":`${String(t).padStart(2,"0")}h`,wildcard:!0},{key:"minuto",label:e("allRes.tr.minuto","Minuto"),unit:"m",min:-1,max:59,slider:!0,step:1,default:0,summary:t=>t<0?"**m":`${String(t).padStart(2,"0")}m`,wildcard:!0},{key:"segundo",label:e("allRes.tr.segundo","Segundo"),unit:"s",min:-1,max:59,slider:!0,step:1,default:0,summary:t=>t<0?"**s":`${String(t).padStart(2,"0")}s`,wildcard:!0}]},{token:"MVT",label:e("allRes.mvt.label","Vectores"),max:4,configKey:"mvtConfigs",desc:e("allRes.mvt.desc","Vectores de movimiento por aceler\xF3metro (umbrales XYZ en mg). Triggers: MVXP, MVXN, MVYP, MVYN, MVZP, MVZN"),fields:[{key:"deltaX",label:"Delta X",unit:"mg",min:0,max:9999,step:10,default:500,summary:t=>`X:${t}`},{key:"deltaY",label:"Delta Y",unit:"mg",min:0,max:9999,step:10,default:500,summary:t=>`Y:${t}`},{key:"deltaZ",label:"Delta Z",unit:"mg",min:0,max:9999,step:10,default:500,summary:t=>`Z:${t}`}]},{token:"CXXB",label:e("allRes.cxxb.label","Capturador"),max:8,configKey:"cxxbConfigs",group:"procesamiento",desc:e("allRes.cxxb.desc","Capturador serial externo. Configura puerto, timeout, delimitadores. Dispara como XB00+"),fields:[{key:"source",label:e("allRes.cxxb.source","Fuente"),unit:"",default:"S",isSelect:!0,options:[{value:"-",label:e("allRes.cxxb.source.disabled","Deshabilitado")},{value:"S",label:"Serial"},{value:"G",label:"GPS"},{value:"M",label:e("allRes.cxxb.source.modem","M\xF3dem")},{value:"B",label:"BLE"},{value:"D",label:"Debug"},{value:"C",label:"CAN"}],summary:t=>({"-":"OFF",S:"Serial",G:"GPS",M:"Modem",B:"BLE",D:"Debug",C:"CAN"})[t]||t},{key:"idxSource",label:e("allRes.cxxb.port","Puerto"),unit:"",min:0,max:7,slider:!1,default:0,summary:t=>`P${t}`},{key:"rxChars",label:e("allRes.cxxb.rxChars","Fin por caracteres"),unit:"chars",min:0,max:255,slider:!0,default:0,summary:t=>t>0?`${t}ch`:"no"},{key:"rxTimeout",label:e("allRes.cxxb.rxTimeout","Fin por timeout"),unit:"\xD710ms",min:0,max:999,slider:!0,step:5,default:0,summary:t=>t>0?`${t*10}ms`:"no"},{key:"header",label:e("allRes.cxxb.header","Header (inicio)"),unit:"",isText:!0,default:"",placeholder:"Ej: $GPRMC",summary:t=>t?`H:"${t}"`:""},{key:"footer",label:e("allRes.cxxb.footer","Footer (fin)"),unit:"",isText:!0,default:"",placeholder:"Ej: \\r\\n",summary:t=>t?`F:"${t}"`:""},{key:"displayMode",label:e("allRes.cxxb.displayMode","Formato salida"),unit:"",default:"A",isSelect:!0,options:[{value:"A",label:"ASCII"},{value:"B",label:e("allRes.cxxb.displayMode.binary","Binario")},{value:"H",label:e("allRes.cxxb.displayMode.hex","Hexadecimal")}],summary:t=>t==="B"?"BIN":t==="H"?"HEX":"ASCII"},{key:"showHeadFoot",label:e("allRes.cxxb.showHeadFoot","Incluir H/F en captura"),unit:"",min:0,max:1,slider:!1,default:0,isToggle:!0,summary:t=>t?"+H/F":""}]},{token:"UV",label:e("allRes.uv.label","Disparadores"),max:48,configKey:"uvConfigs",group:"procesamiento",desc:e("allRes.uv.desc","Variables de usuario con expresiones condicionales. Trigger: UV00+"),noToggle:!0,fields:[{key:"expression",label:e("allRes.uv.expression","Expresi\xF3n"),unit:"",isUvExpression:!0,default:"",summary:t=>t||""}]},{token:"UC",label:e("allRes.uc.label","Reportes"),max:16,configKey:"ucConfigs",group:"procesamiento",desc:e("allRes.uc.desc","Templates de reportes personalizados. Se generan desde acciones de reglas con GU{slot}."),noToggle:!0,fields:[{key:"expression",label:e("allRes.uc.expression","Expresi\xF3n"),unit:"",isUcExpression:!0,default:"",summary:t=>t||""}]},{token:"CXBB",label:e("allRes.cxbb.label","Caja negra"),max:1,configKey:"cxbbConfigs",singleInstance:!0,group:"procesamiento",desc:e("allRes.cxbb.desc","Captura un reporte en forma continua y, cuando una regla ejecuta {GBBxxH;@LOG}, emite las muestras pasadas y futuras con el evento xx. Una r\xE1faga por vez: otro GBB mientras sale la anterior se ignora. Con U0-UF la muestra lleva solo el texto del UC, sin posici\xF3n: incluila en el SUC. Sin ;@LOG va a la cola viva y se pierde sin cobertura."),noToggle:!0,noLabel:!0,fields:[{key:"reportType",label:e("allRes.cxbb.reportType","Reporte"),unit:"",default:"CQ",isSelect:!0,options:Hs.map(t=>({value:t,label:t})),summary:t=>t},{key:"sampleRate",label:e("allRes.cxbb.sampleRate","Muestreo"),unit:e("allRes.units.sec","seg"),min:0,max:60,step:1,slider:!0,default:1,summary:t=>t===0?"0,5s":`${t}s`},{key:"history",label:e("allRes.cxbb.history","Pasadas"),unit:"",min:0,max:20,step:1,slider:!0,default:10,summary:t=>`-${t}`},{key:"future",label:e("allRes.cxbb.future","Futuras"),unit:"",min:0,max:20,step:1,slider:!0,default:10,summary:t=>`+${t}`}]},{token:"IC",label:"Driver Manager",max:100,configKey:"icConfigs",group:"identificacion",desc:e("allRes.ic.desc","Gesti\xF3n de conductores por c\xF3digo alfanum\xE9rico. Se\xF1ales: IC00 sesi\xF3n, IC01 modo, IC02 timeout, IC03 login fallido. ICL: c\xF3digo v\xE1lido detectado."),noToggle:!0,noLabel:!0,fields:[{key:"name",label:e("allRes.ic.name","Nombre"),unit:"",isText:!0,default:"",placeholder:e("allRes.ic.namePlaceholder","Nombre del conductor")},{key:"ibutton",label:e("allRes.ic.code","C\xF3digo"),unit:"",isText:!0,default:"",placeholder:e("allRes.ic.codePlaceholder","C\xF3digo alfanum\xE9rico")}]},{token:"DRV",label:e("allRes.drv.label","Chofer"),max:1,configKey:"drvConfigs",singleInstance:!0,group:"identificacion",noToggle:!0,noLabel:!0,desc:e("allRes.drv.desc","Un solo chofer por equipo: va a Wialon/Traccar (campo iButton), al token DRV, al TRIP y a las se\xF1ales DRV00 (hay chofer), DRV01 login, DRV02 logout, DRV03 c\xF3digo no autorizado, DRV04 venci\xF3 la ventana."),fields:[{key:"origen",help:e("allRes.drv.help.origen","De d\xF3nde sale el chofer. iButton: la \xFAltima llave le\xEDda. Sesi\xF3n IC: el login del Driver Manager (llave, control RF o SIC). Solo manual: SDRV/CDRV desde la plataforma o por SMS. Tac\xF3grafo: la tarjeta del chofer 1 (bus CAN). Cambiar el origen hace logout."),label:e("allRes.drv.origen","Origen"),unit:"",default:"1",isSelect:!0,options:[{value:"0",label:e("allRes.drv.origen0","Apagado")},{value:"1",label:e("allRes.drv.origen1","iButton (\xFAltima llave)")},{value:"2",label:e("allRes.drv.origen2","Sesi\xF3n IC")},{value:"3",label:e("allRes.drv.origen3","Solo manual (SDRV)")},{value:"4",label:e("allRes.drv.origen4","Tac\xF3grafo (CAN)")}],summary:t=>["OFF","iButton","IC","SDRV","TACO"][Number(t)]??String(t)},{key:"lista",help:e("allRes.drv.help.lista","Cualquier c\xF3digo: cualquier llave o tarjeta queda como chofer. Solo ICL: solo los c\xF3digos cargados en el listado del Driver Manager; uno de afuera no entra y dispara DRV03."),label:e("allRes.drv.lista","Listado"),unit:"",default:0,isButtons:!0,buttons:[{value:0,label:e("allRes.drv.lista0","Cualquier c\xF3digo")},{value:1,label:e("allRes.drv.lista1","Solo ICL")}],summary:t=>Number(t)?"ICL":""},{key:"retencion",help:e("allRes.drv.help.retencion","Segundos con la ignici\xF3n apagada hasta el logout autom\xE1tico. 0 = el chofer queda hasta que se identifique otro o llegue un CDRV."),label:e("allRes.drv.retencion","Retenci\xF3n"),unit:e("allRes.units.sec","seg"),min:0,max:3600,inputMax:65535,step:30,slider:!0,default:0,summary:t=>Number(t)?`ret ${t}s`:""},{key:"ventana",help:e("allRes.drv.help.ventana","Segundos que tiene el chofer para identificarse al dar contacto. 0 = no se exige chofer (sin aviso ni corte). Si vence sin chofer dispara DRV04 y aplica el corte."),label:e("allRes.drv.ventana","Ventana"),unit:e("allRes.units.sec","seg"),min:0,max:3600,step:10,slider:!0,default:0,summary:t=>Number(t)?`vent ${t}s`:""},{key:"aviso",help:e("allRes.drv.help.aviso","Salida que se activa mientras corre la ventana (buzzer o luz) para recordarle al chofer que se identifique. No puede ser la salida del corte."),label:e("allRes.drv.aviso","Aviso"),unit:"",default:"-",isSelect:!0,options:[{value:"-",label:e("allRes.drv.ninguna","Ninguna")},...[0,1,2].map(t=>({value:String(t),label:`XP${String(t).padStart(2,"0")}`}))],summary:t=>t&&t!=="-"?`aviso XP0${t}`:""},{key:"corte",help:e("allRes.drv.help.corte","Qu\xE9 pasa si vence la ventana sin chofer o se presenta un c\xF3digo no autorizado. Corte por XP: activa esa salida. Gradual: usa el corte gradual (GC). Habilitaci\xF3n H: la salida se activa solo con chofer, as\xED que el veh\xEDculo no arranca sin identificarse."),label:e("allRes.drv.corte","Corte"),unit:"",default:"-",isSelect:!0,options:[{value:"-",label:e("allRes.drv.sinCorte","Sin corte")},...[0,1,2].map(t=>({value:String(t),label:`${e("allRes.drv.corteXp","Corte por")} XP${String(t).padStart(2,"0")}`})),{value:"G",label:e("allRes.drv.corteG","Corte gradual (GC)")},...[0,1,2].map(t=>({value:`H${t}`,label:`${e("allRes.drv.corteH","Habilitaci\xF3n (solo arranca con chofer) por")} XP${String(t).padStart(2,"0")}`}))],summary:t=>t&&t!=="-"?`corte ${t}`:""},{key:"velCorte",help:e("allRes.drv.help.velCorte","El corte por salida espera a que la velocidad baje de este valor (km/h), para no cortar con el veh\xEDculo en marcha. No aplica al gradual ni a la habilitaci\xF3n."),label:e("allRes.drv.velCorte","Vel. corte"),unit:"km/h",min:0,max:255,step:1,slider:!0,default:3,summary:(t,r)=>/^\d$/.test(String(r?.corte??""))?`<${t} km/h`:""},{key:"rptLogin",help:e("allRes.drv.help.rptLogin","Reporte en cada login, escrito como la acci\xF3n G sin la G: tipo (2 caracteres), n\xFAmero de evento en hexa y prioridad H, M o L. Ej. U101H = plantilla U1, evento 01, prioridad alta. Vac\xEDo = ninguno."),label:e("allRes.drv.rptLogin","Rpt login"),unit:"",isText:!0,default:"",placeholder:e("allRes.drv.rptPlaceholder","Ej: U101H (vac\xEDo = ninguno)"),summary:t=>t||""},{key:"rptLogout",help:e("allRes.drv.help.rptLogout","Reporte en cada logout (CDRV, retenci\xF3n vencida o cambio de chofer). Mismo formato, ej. U102H. Vac\xEDo = ninguno."),label:e("allRes.drv.rptLogout","Rpt logout"),unit:"",isText:!0,default:"",placeholder:e("allRes.drv.rptPlaceholder","Ej: U101H (vac\xEDo = ninguno)"),summary:t=>t||""},{key:"rptInvalido",help:e("allRes.drv.help.rptInvalido","Reporte cuando se presenta un c\xF3digo no autorizado (con Solo ICL). Mismo formato, ej. U103H. Vac\xEDo = ninguno."),label:e("allRes.drv.rptInvalido","Rpt inv\xE1lido"),unit:"",isText:!0,default:"",placeholder:e("allRes.drv.rptPlaceholder","Ej: U101H (vac\xEDo = ninguno)"),summary:t=>t||""},{key:"rptSinChofer",help:e("allRes.drv.help.rptSinChofer","Reporte cuando vence la ventana sin que nadie se identifique. Mismo formato, ej. U104H. Vac\xEDo = ninguno."),label:e("allRes.drv.rptSinChofer","Rpt sin chofer"),unit:"",isText:!0,default:"",placeholder:e("allRes.drv.rptPlaceholder","Ej: U101H (vac\xEDo = ninguno)"),summary:t=>t||""},{key:"dst",help:e("allRes.drv.help.dst","Ad\xF3nde van esos reportes: GP servidor principal, WI por WiFi, BT Bluetooth, TR puerto serie, BGP y BWI backup por celular o WiFi, LOG solo la memoria, BACK el backup, ALL todos."),label:e("allRes.drv.dst","Destino rpt"),unit:"",default:"GP",isSelect:!0,options:_y.map(t=>({value:t,label:t})),summary:(t,r)=>["rptLogin","rptLogout","rptInvalido","rptSinChofer"].some(a=>r?.[a])?`@${t}`:""},{key:"xpOk",help:e("allRes.drv.help.xpOk","Salida que se activa 2 s en cada login, para confirmarle al chofer que qued\xF3 identificado (buzzer o luz). No puede ser la salida del corte."),label:e("allRes.drv.xpOk","OK login"),unit:"",default:"-",isSelect:!0,options:[{value:"-",label:e("allRes.drv.ninguna","Ninguna")},...[0,1,2].map(t=>({value:String(t),label:`XP${String(t).padStart(2,"0")} ${e("allRes.drv.xpOkXp","2 s en cada login")}`}))],summary:t=>t&&t!=="-"?`ok XP0${t}`:""}]},{token:"DRVB",label:e("allRes.drvb.label","Chofer por Bluetooth"),max:1,configKey:"drvbConfigs",singleInstance:!0,group:"identificacion",noToggle:!0,noLabel:!0,desc:e("allRes.drvb.desc","El chofer sale de un beacon (iBeacon o Eddystone-UID) enganchado por un slot BSW. Funciona con origen iButton o sesi\xF3n IC."),fields:[{key:"slot",help:e("allRes.drvb.help.slot","Slot BSW (Bluetooth wildcard) que engancha el beacon del chofer. Ese BSW se configura aparte, en Bluetooth, con el filtro del beacon. Apagado = sin chofer por Bluetooth."),label:e("allRes.drvb.slot","Slot BSW"),unit:"",default:"-",isSelect:!0,options:[{value:"-",label:e("allRes.drvb.apagado","Apagado")},...[0,1,2,3].map(t=>({value:String(t),label:`BSW${String(t).padStart(2,"0")}`}))],summary:t=>t&&t!=="-"?`BSW0${t}`:"OFF"},{key:"modo",help:e("allRes.drvb.help.modo","Presencia: el chofer queda logueado mientras el beacon est\xE1 cerca y sale cuando el BSW lo pierde. Bot\xF3n: cada pulsaci\xF3n del beacon hace login (reemplaza al chofer actual)."),label:e("allRes.drvb.modo","Modo"),unit:"",default:"P",isButtons:!0,buttons:[{value:"P",label:e("allRes.drvb.modoP","Presencia")},{value:"B",label:e("allRes.drvb.modoB","Bot\xF3n")}],summary:t=>t},{key:"id",help:e("allRes.drvb.help.id","Qu\xE9 se toma como c\xF3digo del chofer: la MAC del beacon (12 hex), o el major+minor del iBeacon (8 hex) / la instancia del Eddystone-UID (12 hex)."),label:e("allRes.drvb.id","C\xF3digo"),unit:"",default:"M",isButtons:!0,buttons:[{value:"M",label:"MAC"},{value:"I",label:e("allRes.drvb.idI","Major+minor / instancia")}],summary:t=>t},{key:"toggle",help:e("allRes.drvb.help.toggle","Solo en modo Bot\xF3n: volver a apretar el mismo beacon hace logout."),label:e("allRes.drvb.toggle","Bot\xF3n: 2\xAA = logout"),unit:"",default:0,isToggle:!0}]},{token:"TK",label:e("allRes.tk.label","Inclinaci\xF3n"),max:1,configKey:"tkConfigs",singleInstance:!0,desc:e("allRes.tk.desc","Detecci\xF3n de vuelco/inclinaci\xF3n por aceler\xF3metro. Trigger: TK+"),fields:[{key:"autoMode",label:e("allRes.tk.mode","Modo"),unit:"",min:0,max:1,default:1,isButtons:!0,buttons:[{value:0,label:"Manual"},{value:1,label:"Auto IGN"}],summary:t=>t?"Auto IGN":"Manual"},{key:"stabTime",label:e("allRes.tk.stabTime","Estabiliz."),unit:e("allRes.units.sec","seg"),min:1,max:300,step:5,slider:!0,default:30,summary:t=>`${t}s`},{key:"detectTime",label:e("allRes.tk.detectTime","Detecci\xF3n"),unit:e("allRes.units.sec","seg"),min:1,max:60,step:1,slider:!0,default:10,summary:t=>`${t}s`},{key:"angleThreshold",label:e("allRes.tk.angle","\xC1ngulo"),unit:"\xB0",min:1,max:90,step:1,slider:!0,default:15,summary:t=>`${t}\xB0`}]},{token:"CXCAN",label:"CAN bus",max:1,configKey:"canConfigs",singleInstance:!0,noDeletion:!0,noLabel:!0,hideFromAll:!0,desc:e("allRes.cxcan.desc","Configuraci\xF3n del bus CAN del veh\xEDculo."),fields:[{key:"protocol",label:e("allRes.cxcan.protocol","Protocolo"),unit:"",default:"OBDII",isSelect:!0,options:[{value:"OBDII",label:"OBD-II"},{value:"J1939",label:"J1939"},{value:"IESCAN",label:"IESCAN"},{value:"LISTEN",label:"Listen"},{value:"PLAIN",label:"Plain"}],summary:t=>t},{key:"bps",label:e("allRes.cxcan.speed","Velocidad"),unit:"",default:"500K",isSelect:!0,options:[{value:"25K",label:"25K"},{value:"50K",label:"50K"},{value:"100K",label:"100K"},{value:"125K",label:"125K"},{value:"250K",label:"250K"},{value:"500K",label:"500K"},{value:"800K",label:"800K"},{value:"1M",label:"1M"}],summary:t=>t},{key:"bits",label:e("allRes.cxcan.format","Formato"),unit:"",default:11,isButtons:!0,buttons:[{value:11,label:"11 bits"},{value:29,label:"29 bits"}],summary:t=>`${t}b`},{key:"fuelTrip",label:"Fuel Trip (Soft)",unit:"",default:100,isToggle:!0,onValue:100,offValue:0,summary:()=>""},{key:"fuelEngine",label:e("allRes.cxcan.engine","Motor"),unit:"",default:0,isSelect:!0,enabledIf:"fuelTrip",options:[{value:0,label:e("allRes.cxcan.gasoline","Gasolina")},{value:1,label:"Diesel"}],summary:(t,r)=>r?.fuelTrip?String(t)==="1"?"Diesel":e("allRes.cxcan.gasoline","Gasolina"):""}]},{token:"CXOW",label:"One Wire",max:1,configKey:"owConfigs",singleInstance:!0,noDeletion:!0,noLabel:!0,hideFromAll:!0,desc:e("allRes.cxow.desc","Bus OneWire para iButton y sensores de temperatura Dallas. Solo Spider y Smart."),fields:[{key:"enableValue",label:"Reset VDD",unit:"",default:0,isSelect:!0,options:[{value:0,label:e("allRes.cxow.noReset","No reiniciar")},{value:10,label:e("allRes.cxow.every10s","Cada 10s")},{value:20,label:e("allRes.cxow.every20s","Cada 20s")},{value:30,label:e("allRes.cxow.every30s","Cada 30s")}],summary:(t,r)=>r?.enabled&&t>0?`Reset ${t}s`:""},{key:"useAsKey",label:e("allRes.cxow.tempMode","Sensores de temperatura"),unit:"",default:0,isSelect:!0,options:[{value:0,label:e("allRes.cxow.modeTemp","Solo temperatura")},{value:1,label:e("allRes.cxow.modeKey","Como llave")},{value:2,label:e("allRes.cxow.modeAuto","Auto-asignar DT (TH/TL)")}],summary:t=>String(t)==="1"?e("allRes.cxow.key","Llave"):String(t)==="2"?e("allRes.cxow.auto","Auto DT"):""},{key:"invKey",label:e("allRes.cxow.invKey","C\xF3digo de la llave"),unit:"",default:0,isSelect:!0,options:[{value:0,label:e("allRes.cxow.invNo","Como lo lee el equipo (familia primero)")},{value:1,label:e("allRes.cxow.invYes","Como est\xE1 grabado en la llave (invertido)")}],summary:t=>String(t)==="1"?e("allRes.cxow.invShort","Invertido"):""}]},{token:"DT",label:"Dallas Temp",max:8,configKey:"dtConfigs",hideFromAll:!0,desc:e("allRes.dt.desc","Sensores de temperatura Dallas DS18B20 conectados al bus OneWire. Se leen con OW(n) o MDT(n,f) en expresiones."),fields:[{key:"rom",label:"ROM ID",unit:"",isText:!0,default:"",placeholder:e("allRes.dt.romPlaceholder","16 caracteres hex (ej: 28FF1234567890AB)"),summary:t=>t?t.slice(0,8)+"...":"auto"}]},{token:"GC",label:e("allRes.gc.label","Corte Gradual"),max:1,configKey:"gcConfigs",singleInstance:!0,noDeletion:!0,noLabel:!0,hideFromAll:!0,desc:e("allRes.gc.desc","Corte gradual de motor: activa una salida con pulsos que se alargan progresivamente hasta quedar fija."),fields:[{key:"xpIndex",label:e("allRes.gc.output","Salida (XP)"),unit:"",default:0,isOutputSelect:!0,summary:t=>`XP${String(t).padStart(2,"0")}`},{key:"stepMs",label:e("allRes.gc.step","Paso"),unit:"ms",min:1,max:9999,step:10,slider:!0,default:30,summary:t=>`${t}ms`},{key:"intervalS",label:e("allRes.gc.interval","Intervalo"),unit:e("allRes.units.sec","seg"),min:1,max:9999,step:1,slider:!0,default:4,summary:t=>`${t}s`},{key:"maxS",label:e("allRes.gc.max","Maximo"),unit:e("allRes.units.sec","seg"),min:1,max:9999,step:5,slider:!0,default:180,summary:t=>t>=60?`${Math.floor(t/60)}m${t%60?t%60+"s":""}`:`${t}s`},{key:"invert",label:e("allRes.gc.invert","Invertir"),unit:"",min:0,max:1,default:0,isToggle:!0,summary:t=>t?e("allRes.gc.inverted","invertido"):e("allRes.gc.normal","normal")}]},{token:"CXAC",label:e("allRes.cxac.label","Aceler\xF3metro"),max:1,configKey:"cxacConfigs",singleInstance:!0,noDeletion:!0,noLabel:!0,hideFromAll:!0,desc:e("allRes.cxac.desc","Umbral del aceler\xF3metro para detecci\xF3n de movimiento. 0=deshabilitado."),fields:[{key:"threshold",label:e("allRes.cxac.threshold","Umbral"),unit:"",min:0,max:127,slider:!0,step:1,default:30,summary:t=>t===0?"OFF":`${t}`}]},{token:"CXECU",label:"Custom CAN",max:29,configKey:"ecuConfigs",desc:e("allRes.cxecu.desc","Configuraci\xF3n custom de PIDs CAN bus. Define c\xF3mo parsear cada se\xF1al del veh\xEDculo."),indexLabels:{0:"RPM",1:e("allRes.cxecu.idx.1","Acelerador %"),2:e("allRes.cxecu.idx.2","Combustible %"),3:e("allRes.cxecu.idx.3","Od\xF3metro total"),4:e("allRes.cxecu.idx.4","Litros total"),5:e("allRes.cxecu.idx.5","Velocidad"),6:e("allRes.cxecu.idx.6","Temp. motor"),7:e("allRes.cxecu.idx.7","Presi\xF3n aceite"),8:"Fuel trip",9:"Fuel trip soft",10:e("allRes.cxecu.idx.10","Horas motor"),11:"Chassis code",12:e("allRes.cxecu.idx.12","Tasa combustible"),13:"Sensor MAF",14:"Torque %",15:e("allRes.cxecu.idx.15","Vel. ruedas"),16:"Status DTC",17:e("allRes.cxecu.idx.17","Carga motor %"),18:e("allRes.cxecu.idx.18","Runtime motor"),19:e("allRes.cxecu.idx.19","Dist. c/MIL"),20:e("allRes.cxecu.idx.20","Litros custom"),21:"mL custom",22:e("allRes.cxecu.idx.22","Freno mano"),23:e("allRes.cxecu.idx.23","Pedal freno"),24:e("allRes.cxecu.idx.24","Acelerador % custom"),25:e("allRes.cxecu.idx.25","Puerta conductor"),26:e("allRes.cxecu.idx.26","Puerta acompa\xF1ante"),27:e("allRes.cxecu.idx.27","Pedal embrague"),28:e("allRes.cxecu.idx.28","Presi\xF3n turbo")},fields:[{key:"canId",label:"CAN ID",unit:"",isText:!0,default:"",placeholder:"Ej: 1FFFFE8 (hex)",summary:t=>t?`0x${t}`:""},{key:"startBit",label:e("allRes.cxecu.startBit","Bit inicio"),unit:"",min:0,max:63,slider:!1,default:0,summary:t=>`b${t}`},{key:"bitLength",label:e("allRes.cxecu.bitLength","Longitud"),unit:"bits",min:1,max:64,slider:!1,default:8,summary:t=>`${t}b`},{key:"factor",label:"Factor",unit:"",isText:!0,default:"1.000",placeholder:"1.000"},{key:"offset",label:"Offset",unit:"",isText:!0,default:"0.0",placeholder:"0.0"},{key:"min",label:e("allRes.cxecu.min","M\xEDnimo"),unit:"",min:-2147483648,max:2147483647,slider:!1,default:0},{key:"max",label:e("allRes.cxecu.max","M\xE1ximo"),unit:"",min:-2147483648,max:2147483647,slider:!1,default:65535},{key:"endian",label:"Byte order",unit:"",default:"LE",isSelect:!0,options:[{value:"LE",label:"Little Endian"},{value:"BE",label:"Big Endian"}],summary:t=>t},{key:"sign",label:e("allRes.cxecu.sign","Signo"),unit:"",default:"U",isButtons:!0,buttons:[{value:"U",label:"Unsigned"},{value:"S",label:"Signed"}],summary:t=>t},{key:"_ecuHelp",isEcuHelper:!0}]},{token:"PK",label:"Parking",max:1,configKey:"pkConfigs",singleInstance:!0,desc:e("allRes.pk.desc","Geocerca din\xE1mica. Se activa con SPKA, dispara como PK00+"),fields:[{key:"radius",label:e("allRes.pk.radius","Radio"),unit:"m",min:1,max:500,step:5,default:50,summary:t=>`${t}m`},{key:"debounce",label:e("allRes.pk.debounce","Confirm."),unit:e("allRes.units.sec","seg"),min:0,max:60,step:1,default:15,summary:t=>`${t}s`}]},{token:"CXBTH",label:"Bluetooth",max:1,configKey:"bthConfigs",singleInstance:!0,noToggle:!0,noDeletion:!0,noLabel:!0,hideFromAll:!0,desc:e("allRes.cxbth.desc","Configuraci\xF3n general del m\xF3dulo Bluetooth (BLE/NimBLE). El PIN permite autenticar conexiones SPP."),fields:[{key:"power",label:e("allRes.cxbth.power","Encendido"),unit:"",min:0,max:1,default:0,isToggle:!0,summary:t=>t?"ON":"OFF"},{key:"pincode",label:"PIN",unit:"",isText:!0,default:"",placeholder:e("allRes.cxbth.pinPlaceholder","Vacio o 4 digitos (ej: 1234)"),summary:t=>t?"****":e("allRes.cxbth.noPin","sin PIN")},{key:"timeout",label:e("allRes.cxbth.timeout","Timeout login"),unit:e("allRes.units.sec","seg"),min:0,max:255,step:1,slider:!0,default:0,summary:t=>t>0?`${t}s`:e("allRes.cxbth.noLimit","sin limite")}]},{token:"BE",label:"Beacons",max:5,configKey:"beConfigs",group:"ble",noToggle:!0,desc:e("allRes.be.desc","Detecci\xF3n de beacons BLE por ID. Trigger: BE00+"),fields:[{key:"id",label:"ID",unit:"",isText:!0,default:"",placeholder:e("allRes.be.idPlaceholder","16 caracteres hex (8 bytes)"),summary:t=>t?t.slice(0,8)+"...":""},{key:"dist",label:e("allRes.be.distance","Distancia"),unit:"m",isText:!0,default:"0",placeholder:"Ej: 1.50",summary:t=>t&&t!=="0"?`${t}m`:e("allRes.common.noLimit","sin lim.")},{key:"timeout",label:"Timeout",unit:e("allRes.units.sec","seg"),min:0,max:999,step:5,slider:!0,default:30,summary:t=>`${t}s`}]},{token:"BS",label:e("allRes.bs.label","Sensores BLE"),max:4,configKey:"bsConfigs",group:"ble",desc:e("allRes.bs.desc","Sensores BLE (Escort, MOKO, Teltonika, Technoton) por MAC/ID. Lectura de temperatura, humedad, nivel de combustible, distancia, etc. Trigger: BS00+"),fields:[{key:"id",label:"ID / MAC",unit:"",isText:!0,default:"",placeholder:e("allRes.bs.idPlaceholder","MAC o ID del sensor")},{key:"type",label:e("allRes.bs.sensorType","Tipo sensor"),unit:"",default:0,isSelect:!0,options:[{value:0,label:e("allRes.bs.type.auto","Automatico")},{value:1,label:"iBeacon"},{value:2,label:"Eddystone UID"},{value:3,label:"Eddystone TLM"},{value:4,label:"MOKO 3-Axis Acc"},{value:5,label:"MOKO Device Info"},{value:6,label:"MOKO Button"},{value:7,label:"MOKO T&H"},{value:8,label:"MOKO PIR"},{value:9,label:"MOKO Door"},{value:10,label:"MOKO Sensor Info"},{value:11,label:"MOKO ToF (S02R)"},{value:30,label:"Escort TD (Fuel)"},{value:31,label:"Escort TT (Temp)"},{value:32,label:"Escort TL (Temp+Lux)"},{value:33,label:"Escort DU (Angle)"},{value:34,label:"Escort TH (T+H+Lux)"},{value:35,label:"Escort TH+Dis"},{value:40,label:"Teltonika EYE (BTSMP1)"},{value:50,label:"Technoton DUT-E S7"}],summary:t=>({0:"Auto",1:"iBeacon",2:"Eddy-UID",3:"Eddy-TLM",4:"MKO-Acc",5:"MKO-Info",6:"MKO-Btn",7:"MKO-TH",8:"MKO-PIR",9:"MKO-Door",10:"MKO-SI",30:"Esc-TD",31:"Esc-TT",32:"Esc-TL",33:"Esc-DU",34:"Esc-TH",35:"Esc-THD",11:"MKO-ToF",40:"TLT-EYE",50:"TCN-Fuel"})[t]||`T${t}`,sensorFields:{1:"distance, tx_power, major, minor, uuid, rssi, type, age",2:"namespace, instance, rssi, type, age",3:"batt, temp, adv_cnt, sec_cnt, type, age",4:"x, y, z, batt, ranging_data, adv_int, sr, full_scale, mt, rssi, type, age",5:"battery, adv_int, ranging_data, dv_prop_ind, switch_s_ind, fwt, fw, rssi, type, age",6:"accX, accY, accZ, batt, triggerStatus, triggerCount, deviceId, rssi, type, age",7:"temp, hum, battery, ranging_data, adv_int, device_type, rssi, type, age",8:"door_status, battery, delay_response_status, sensor_sensitivity, detection_status, major, minor, rssi, type, age",9:"door_status, delay_response, sensor_sensitivity, detection_status, batt, major, minor, rssi, type, age",10:"mag_st, mot_st, mag_cnt, mot_cnt, x, y, z, temp, hum, batt, tag, rssi, type, age",11:"dist, batt, rssi, type, age",30:"fuel_lvl, batt, temp, fw, opmode, rssi, type, age",31:"temp, batt, fw, rssi, type, age",32:"temp, lum, batt, fw, rssi, type, age",33:"mode, event, tilt, roll, pitch, batt, fw, rssi, type, age",34:"temp, lum, hum, press, mode, batt, fw, rssi, type, age",35:"temp, lum, hum, di, mode, batt, fw, rssi, type, age",40:"temp, hum, mag, mov, mcnt, pitch, roll, batt, lowbat, rssi, type, age",50:"freq, temp, dtc, lvl, vol, fw, rssi, type, age"}},{key:"timeout",label:"Timeout",unit:e("allRes.units.sec","seg"),min:0,max:999,step:5,slider:!0,default:60,summary:t=>`${t}s`},{key:"dist",label:e("allRes.bs.maxDist","Distancia max"),unit:"m",min:0,max:100,step:1,slider:!0,default:0,summary:t=>t>0?`${t}m`:e("allRes.common.noLimit","sin lim.")}]},{token:"BSW",label:"Smart Wildcard",max:4,configKey:"bswConfigs",group:"ble",desc:e("allRes.bsw.desc","Captura BLE wildcard: detecta dispositivos por UUID/Major/Minor con filtros. Trigger: BSW00+"),fields:[{key:"targets",label:"Targets",unit:"",isBswTargets:!0,default:"FF",summary:t=>{let r=String(t??"FF").toUpperCase();return r==="FF"?e("allRes.bsw.independent","Independiente"):r==="ALL"?e("allRes.bsw.allBs","Todos los BS"):t||"FF"}},{key:"uuid",label:e("allRes.bsw.filterUuid","Filtro UUID"),unit:"",isText:!0,default:"",placeholder:e("allRes.bsw.uuidPlaceholder","32 hex o vac\xEDo para todos")},{key:"major",label:e("allRes.bsw.filterMajor","Filtro Major"),unit:"",isText:!0,default:"",placeholder:e("allRes.bsw.noFilterPlaceholder","Sin filtro (cualquiera)"),summary:t=>t===""||t===void 0||t===null||Number(t)<0?e("allRes.bsw.any","cualquiera"):`Mj:${t}`},{key:"minor",label:e("allRes.bsw.filterMinor","Filtro Minor"),unit:"",isText:!0,default:"",placeholder:e("allRes.bsw.noFilterPlaceholder","Sin filtro (cualquiera)"),summary:t=>t===""||t===void 0||t===null||Number(t)<0?e("allRes.bsw.any","cualquiera"):`Mn:${t}`},{key:"timeout",label:"Timeout",unit:e("allRes.units.sec","seg"),min:0,max:999,step:5,slider:!0,default:30,summary:t=>`${t}s`},{key:"dist",label:e("allRes.bsw.maxDist","Distancia max"),unit:"m",min:0,max:100,step:1,slider:!0,default:0,summary:t=>t>0?`${t}m`:e("allRes.common.noLimit","sin lim.")},{key:"_fields",isSensorFieldsFixed:!0,fixedFields:"connected, major, minor, distance, rssi, age",queryPrefix:"QBSW",evalPrefix:"MBSW"}]},{token:"SM",label:e("allRes.sm.label","Destinos SMS"),max:5,configKey:"smConfigs",group:"comunicacion",desc:e("allRes.sm.desc","Numeros de telefono para notificaciones SMS (hasta 5 destinos)."),noToggle:!0,fields:[{key:"phone",label:e("allRes.sm.phone","Telefono"),unit:"",isText:!0,default:"",placeholder:"+5491122334455",summary:t=>t||""}]},{token:"CID",label:e("allRes.cid.label","Caller ID"),max:10,configKey:"cidConfigs",group:"identificacion",desc:e("allRes.cid.desc","Recepcion de llamadas de voz. Detecta caller ID entrante y auto-contesta segun modo. Usar % como wildcard para cualquier numero. Trigger: CID00+"),noToggle:!0,fields:[{key:"mode",label:e("allRes.cid.mode","Modo"),unit:"",default:0,isSelect:!0,options:[{value:0,label:e("allRes.cid.mode0","Solo detectar (no contesta)")},{value:1,label:e("allRes.cid.mode1","Auto-contestar (microfono)")},{value:2,label:e("allRes.cid.mode2","Auto-contestar (microfono + parlante)")}],summary:t=>["DET","MIC","MIC+SPK"][t]||`M${t}`},{key:"cidString",label:e("allRes.cid.cidString","Numero"),unit:"",isText:!0,default:"",placeholder:e("allRes.cid.cidPlaceholder","+5491122334455 o % para todos"),summary:t=>t||""}]},{token:"MC",label:e("allRes.mc.label","Pa\xEDs (MCC)"),max:8,configKey:"mcConfigs",group:"comunicacion",desc:e("allRes.mc.desc","Pa\xEDs en el que est\xE1 operando el m\xF3dem, por Mobile Country Code. La se\xF1al MC00 est\xE1 activa mientras el MCC de la red coincide con el del slot: sirve para reglas de roaming (cruce de frontera). Ej: 722 Argentina, 724 Brasil, 730 Chile, 736 Bolivia, 744 Paraguay, 748 Uruguay. Trigger: MC00+"),noToggle:!0,fields:[{key:"mcc",label:e("allRes.mc.country","Pa\xEDs"),unit:"",default:722,isSearchSelect:!0,options:Vp.map(t=>({value:t.mcc,label:t.name})),placeholder:e("allRes.mc.placeholder","Buscar pa\xEDs o escribir MCC"),summary:t=>{let r=Wp(t);return r?`${t} ${r}`:String(t)}}]},{token:"CXTR",label:e("allRes.cxtr.label","Puerto UART"),max:1,configKey:"cxtrConfigs",singleInstance:!0,group:"comunicacion",noDeletion:!0,noLabel:!0,hideFromAll:!0,desc:e("allRes.cxtr.desc","Velocidad del puerto serie principal, el mismo por el que se configura el equipo: al enviarla, el configurador reabre el puerto a la velocidad nueva y la confirma. 38400 y 57600 requieren firmware 1.09.28.T40. No aplica al ZERO (USB nativo)."),fields:[{key:"baudrate",label:"Baudrate",unit:"bps",default:qp,isSelect:!0,options:Gp.map(t=>({value:t,label:String(t)})),summary:t=>`${t}`}]}];var jo=Iy((e,t)=>t||e);var zp={TD:{token:"TD",label:"Timers",description:"Temporizadores configurables con tiempo y/o distancia",instances:32,fields:{enabled:{type:"boolean",default:!1,label:"Habilitado"},timeout:{type:"number",range:{min:0,max:99999},slider:{min:0,max:7200,step:5},default:0,unit:"s",label:"Tiempo"},distance:{type:"number",range:{min:0,max:99999},slider:{min:0,max:5e3,step:50},default:0,unit:"m",label:"Distancia"}}},VL:{token:"VL",label:"Velocidad",description:"Umbrales de velocidad para reportes y sirena",instances:16,fields:{enabled:{type:"boolean",default:!1,label:"Habilitado"},speed:{type:"number",range:{min:1,max:250},slider:{min:1,max:250,step:1},default:80,unit:"km/h",label:"Velocidad"},filtered:{type:"number",range:{min:0,max:1},default:1,label:"Filtrado"},settle:{type:"number",range:{min:0,max:999},slider:{min:0,max:999,step:1},default:0,unit:"d\xE9cimas",label:"Sostenido"}}}};function ol(e,t){let{rxLines:r}=sa(t),{config:a}=ia(r,{skipClassify:!0});return Fp(t,a),{...structuredClone(e??{}),...a,mode:"advanced"}}function Xp(e){if(typeof e!="string")return null;let t=e.trim().replace(/^>/,"").replace(/<$/,"");if(/^[SR]RL[0-9A-F]{2}[ED]/i.test(t)&&(t=t.slice(1)),!/^RL/i.test(t))return null;let r=t.slice(2,4).toUpperCase(),a=Ne(r);if(a===null)return null;let n=t[4]!=="D"&&t[4]!=="d",o=t.slice(5),i="",s="",l="",c=o.match(/TRG=([^;]+)/i);c&&(i=c[1]);let u=o.match(/CND=([^;{]+)/i);u&&(s=u[1]);let p=o.match(/ACC=(.+)$/i);p&&(l=p[1]);let f="+",h=i;i&&/[+\-*]$/.test(i)&&(f=i.slice(-1),h=i.slice(0,-1));let v=bt(h),b=bt(s),x=(l.match(/\{([^}]+)\}/g)||[]).map(C=>C.slice(1,-1));return{slot:a,slotStr:r,enabled:n,raw:e,trg:{terms:v.terms,operators:v.operators,sense:f,raw:i,expr:h},cnd:{terms:b.terms,operators:b.operators,raw:s},acc:x}}var Hp=[{value:"GCY",label:"CY",desc:"Standard completo"},{value:"GGP",label:"GP",desc:"Posicion general"},{value:"GCP",label:"CP",desc:"Compacto + odometro ext."},{value:"GCQ",label:"CQ",desc:"Compacto + odo + filtrado"},{value:"GCR",label:"CR",desc:"Compacto + odo + temp + filtrado"},{value:"GCT",label:"CT",desc:"Compacto + odo + ID chofer"},{value:"GCU",label:"CU",desc:"Compacto + odo + iButton"},{value:"GCV",label:"CV",desc:"Compacto + odo + 2 temp + filtrado"},{value:"GCW",label:"CW",desc:"Extendido + 2 temp + odo extendido"},{value:"GBQ",label:"BQ",desc:"Compacto + bateria + odo + filtrado"},{value:"GBR",label:"BR",desc:"Compacto + bat + odo + temp"},{value:"GBV",label:"BV",desc:"Compacto + bat + odo + 2 temp"},{value:"GHQ",label:"HQ",desc:"Compacto + bat + horometro + odo"},{value:"GHR",label:"HR",desc:"Compacto + bat + horo + odo + temp"},{value:"GHV",label:"HV",desc:"Compacto + bat + horo + odo + 2 temp"},{value:"GER",label:"ER",desc:"Extendido + filtrado + CAN00"},{value:"GEQ",label:"EQ",desc:"Extendido + filtrado + CAN01"},{value:"GAD",label:"AD",desc:"Analogico"},{value:"GAE",label:"AE",desc:"Analogico con signo"},{value:"GBP",label:"BP",desc:"Binario"},{value:"GHT",label:"HT",desc:"Link a mapas"},{value:"GIB",label:"IB",desc:"GP + iButton + temperatura"},{value:"GLC",label:"LC",desc:"Modo Locator"},{value:"GMV",label:"MV",desc:"Estado dinamico"},{value:"GSC",label:"SC",desc:"Caudalimetro"},{value:"GTX",label:"TX",desc:"Texto"},{value:"GTY",label:"TY",desc:"Texto (pasarela)"},{value:"GBB",label:"BB",desc:"Caja negra: r\xE1faga CXBB (pasadas + futuras)"},{value:"GU0",label:"U0",desc:"Reporte de usuario 0"},{value:"GU1",label:"U1",desc:"Reporte de usuario 1"},{value:"GU2",label:"U2",desc:"Reporte de usuario 2"},{value:"GU3",label:"U3",desc:"Reporte de usuario 3"},{value:"GU4",label:"U4",desc:"Reporte de usuario 4"},{value:"GU5",label:"U5",desc:"Reporte de usuario 5"},{value:"GU6",label:"U6",desc:"Reporte de usuario 6"},{value:"GU7",label:"U7",desc:"Reporte de usuario 7"},{value:"GU8",label:"U8",desc:"Reporte de usuario 8"},{value:"GU9",label:"U9",desc:"Reporte de usuario 9"},{value:"GUA",label:"UA",desc:"Reporte de usuario A"},{value:"GUB",label:"UB",desc:"Reporte de usuario B"},{value:"GUC",label:"UC",desc:"Reporte de usuario C"},{value:"GUD",label:"UD",desc:"Reporte de usuario D"},{value:"GUE",label:"UE",desc:"Reporte de usuario E"},{value:"GUF",label:"UF",desc:"Reporte de usuario F"}];var Ny=73,Zp=e=>String(e??"").replace(/\{STD(\d{2})([EDRC])(\d{5})\}/g,"{STD$1$2$300000}"),Oy=new Map(Eo.map(e=>[e.token,e])),Py=new Set(Ps.map(e=>e.token)),ky=["SAPW","SAPX","SAPY","SAR","SAT","SAU","SAX","SBE","SBLEKICK","SBS","SBSW","SCAL","SCAN","SCFW","SCID","SCOP","SCRM","SDA","SDB","SDC","SDL","SDS","SDT","SDV","SECU","SFC","SFCT","SFM","SFRM","SFTP","SGC","SGPRSH","SHM","SHO","SIC","SID","SIP","SIT","SKA","SKO","SLAT","SLC","SLON","SMC","SMVT","SNT","SOD","SPB","SPC","SPIN","SPK","SPW","SREGISTER","SRESET","SRG","SRPT","SRTC","SSC","SSG","SSIM","SSM","SSXP","STAG","STD","STK","STP","STR","STX","STY","SUC","SUNLOCK","SUV","SVCC","SVCH","SVEL","SVL","SWL","SWP","SWS","SXB","SZFRAC","SZMODE","SZONES"],My=[/^SU\d/,/^SSS[A-Z]{2,}/,/^SCX[A-Z]{2,}/],jp=new Set(["CY","CC","CO","TX","CP","CQ","BP","AD","AE","SC","HT","GP","IB","CR","CT","CU","CV","BQ","BR","BV","HQ","HR","HV","LC","TZ","ER","EQ","MV","CW","BB","PH","B3","B9","DF",..."0123456789ABCDEF".split("").map(e=>`U${e}`),...Hp.map(e=>e.value.slice(1))]),By=new Set(["LOG","TRM","TR0","TR1","TR2","GP","GPRS","WI","WIF","WIFI","BT","BTH","BGP","BWI","MAIN","BACK","ALL","SM0","SM1","SM2","SM3","SM4","XB0","XB1","XB2","XB3","XB4","XB5","XB6","XB7"]),xt=e=>String(e).padStart(2,"0");function Kp(e,t,r,a,n,o){let i=String(t??"").trim();if(!i)return;if(i.startsWith("!")){n.push(`${e}: la negaci\xF3n va despu\xE9s de la se\xF1al (UV02!, no !UV02). Con el ! adelante el firmware toma la condici\xF3n como vac\xEDa.`);return}let{terms:s,operators:l}=r,c=!0;for(let u of s){let p=Oy.get(u.token);if(p){if(u.index==null){n.push(`${e}: "${u.token}" necesita \xEDndice de dos d\xEDgitos (${u.token}${xt(p.minIdx)} a ${u.token}${xt(p.maxIdx)}).`),c=!1;continue}if(u.index<p.minIdx||u.index>p.maxIdx){n.push(`${e}: ${u.token}${xt(u.index)} no existe. ${u.token} va de ${xt(p.minIdx)} a ${xt(p.maxIdx)}.`);continue}u.token==="XP"&&a.length&&u.index>=ea(a)&&n.push(`${e}: XP${xt(u.index)} no existe: ${Qp(a)}.`),u.token==="IN"&&u.index!==7&&a.length&&u.index>=dn(a)&&o.push(`${e}: IN${xt(u.index)} no es una entrada f\xEDsica: ${Fy(a)}. Confirm\xE1 que sea la que quer\xE9s.`)}else Py.has(u.token)?u.index!=null&&(n.push(`${e}: "${u.token}" no lleva \xEDndice.`),c=!1):(c=!1,n.push(`${e}: Se\xF1al desconocida "${u.token}". Una se\xF1al es un m\xF3dulo con \xEDndice (VL00, TD02, IN00, UV05) o un estado (IGN, PWR, GPS). No se comparan valores en la regla: el umbral se configura en el m\xF3dulo (velocidad \u2192 VL, anal\xF3gico \u2192 AR, otro dato \u2192 UV).`))}if(c&&Dd(s,l)!==i){let u=s.length>1&&l.length<s.length-1;n.push(u?`${e}: "${i}" tiene ${s.length} se\xF1ales y le falta un operador. Va en notaci\xF3n postfija: IN00IN01& (AND), IN00IN01| (OR).`:`${e}: "${i}" no se entiende como expresi\xF3n de se\xF1ales. Formato: se\xF1ales de dos d\xEDgitos y operadores postfijos (IN00IN01&, UV02!). No admite comparaciones ni par\xE9ntesis.`)}}var Ly=e=>{let t=ea(e);return`tiene ${t} salida${t===1?"":"s"} (XP00${t>1?` a XP${xt(t-1)}`:""})`},Qp=e=>{let t=zs(e,qd),r=e.length>t.length?`; si el equipo no es ${St(t)}, sacalo de los modelos con cambiar_modelos`:"";return`${St(t)} ${Ly(t)}${r}`},Fy=e=>{let t=zs(e,Gd),r=dn(e),a=e.length>t.length?`; si el equipo no es ${St(t)}, sacalo de los modelos con cambiar_modelos`:"";return`${St(t)} tiene ${r} entrada${r===1?"":"s"} (IN00${r>1?` a IN${xt(r-1)}`:""})${a}`};function Uy(e,t,r){let a=String(e??"").trim();if(/^G/i.test(a)){let i=a.match(/^G([A-Z0-9]{2})([0-9A-Fa-f]{2})([HML])(?:;@([A-Z0-9]+))?$/);if(!i){let l=a.slice(1,3).toUpperCase();l.length===2&&!jp.has(l)?r.push(`ACC: {${a}} \u2014 G${l} no es un tipo de reporte. Us\xE1 GCQ (o GU0..GUF para reportes de usuario).`):r.push(`ACC: {${a}} es un reporte mal formado. Formato: tipo de 3 letras + evento de 2 d\xEDgitos + prioridad H/M/L, y opcional ;@destino. Ej: {GCQ14L;@LOG}.`);return}jp.has(i[1])||r.push(`ACC: {${a}} \u2014 G${i[1]} no es un tipo de reporte. Us\xE1 GCQ (o GU0..GUF para reportes de usuario).`);let s=i[4]?.match(/^(XB|SM)(\d)\d+$/);s?r.push(`ACC: {${a}} \u2014 el destino ${s[1]} lleva UN d\xEDgito: @${s[1]}${s[2]}. Con @${i[4]} el equipo usa s\xF3lo el primero (@${s[1]}${s[2]}), sin avisar.`):i[4]&&!By.has(i[4])&&r.push(`ACC: {${a}} \u2014 @${i[4]} no es un destino. Destinos: @LOG, @TRM, @BTH, @BACK, @SM0 a @SM4, @XB0 a @XB7.`);return}let n=a.match(/^SSSXP(.*)$/);if(n){let i=n[1].match(/^0(\d)(\d\d)$/);if(!i)return void r.push(`ACC: {${a}} mal formado. Formato: SSSXP + salida de 2 d\xEDgitos + 11 (activar) o 00 (desactivar). Ej: {SSSXP0011}.`);if(i[2]!=="11"&&i[2]!=="00")return void r.push(`ACC: {${a}} \u2014 el estado de una salida es 11 (activar) o 00 (desactivar), nada m\xE1s.`);let s=Number(i[1]);if(s>2)return void r.push(`ACC: {${a}} \u2014 la salida XP0${s} no existe (XP00 a XP02).`);t.length&&s>=ea(t)&&r.push(`ACC: {${a}} \u2014 XP0${s} no existe: ${Qp(t)}.`);return}if(n=a.match(/^SSSU(.*)$/),n&&!/^SSSU[A-Z]/.test(a)){let i=n[1].match(/^(\d\d)(\d\d)$/);if(!i)return void r.push(`ACC: {${a}} mal formado. Formato: SSSU + flag de 2 d\xEDgitos + 11 o 00. Ej: {SSSU0511}.`);if(Number(i[1])>63)return void r.push(`ACC: {${a}} \u2014 el flag U${i[1]} no existe (U00 a U63).`);i[2]!=="11"&&i[2]!=="00"&&r.push(`ACC: {${a}} \u2014 el estado de un flag es 11 o 00.`);return}if(n=a.match(/^STD(\d\d)?/),n){if(!n[1])return void r.push(`ACC: {${a}} mal formado. Formato: STD + timer de 2 d\xEDgitos + E/D/R/C + segundos (5 d\xEDgitos). Ej: {STD02R00030}, {STD02C}.`);if(Number(n[1])>31)return void r.push(`ACC: {${a}} \u2014 el timer TD${n[1]} no existe (TD00 a TD31).`);/^STD\d\d[EDRC](\d{5}(\d{5})?)?$/.test(a)||r.push(`ACC: {${a}} mal formado. Despu\xE9s del timer va E/D/R/C y, si lleva tiempo, 5 d\xEDgitos de segundos (y opcional 5 de metros). Ej: {STD02R00030}.`);return}if(n=a.match(/^SNT(\d\d)/),n){Number(n[1])>31&&r.push(`ACC: {${a}} \u2014 el contador NT${n[1]} no existe (NT00 a NT31).`);return}if(Ct(a)?.type!=="raw")return;let o=a.toUpperCase();ky.some(i=>o.startsWith(i))||My.some(i=>i.test(o))||r.push(`ACC: {${a}} no existe como comando del firmware. Una acci\xF3n es un comando real: reporte {GCQ14L;@LOG}, salida {SSSXP0011}, flag {SSSU0511}, timer {STD02R00030}/{STD02C}, contador {SNT03I}, dormir {SKO...}. Si no sab\xE9s cu\xE1l es, buscalo con buscar_doc.`)}function Ko(e,t=[]){let r=Array.isArray(t)?t:[],a=[],n=[],o=Xp(e);if(!o)return{errores:["No es una regla: el formato es >SRLxxE;TRG=...;CND=...;ACC={...}<."],avisos:n};o.trg.expr.trim()||a.push("TRG: la regla no tiene disparador."),Kp("TRG",o.trg.expr,o.trg,r,a,n),Kp("CND",o.cnd.raw,o.cnd,r,a,n);for(let l of o.acc)Uy(l,r,a);let i=o.acc.reduce((l,c)=>l+c.length+2,0),s=2+(2+o.trg.terms.length*4)+(1+o.cnd.terms.length*4)+(i?i+1:1);return s>Ny&&a.push(`La regla ocupa ${s} bytes y el m\xE1ximo es 73 bytes. Partila en dos reglas con el mismo disparador.`),{errores:a,avisos:n}}function $y(e){let t=String(e??"").trim(),r=/^[<>]?\s*([SQ][^<>]*?)\s*[<>]?$/.exec(t);return!r||!/^[SQ][A-Z]/.test(r[1])?t:`>${r[1]}<`}function Wy(e){return String(e??"").replace(/^>STD(\d\d)([EDRC])(\d{5})<$/,">STD$1$2$300000<")}function Vt(e){return Wy($y(e))}function Vy(e){let t=[],r=String(e??"");for(;;){let a=r.indexOf("|");if(a<0){t.push(r);break}t.push(r.slice(0,a)),r=r.slice(a+1),r[0]===" "&&(r=r.slice(1))}return t}function Yp(e){let t=[];for(let r of Vy(e)){if(!r||r[0]==="#"||r[0]==="$")continue;if(r[0]==="'"){t.push(`El tramo \`${r}\` va sin \`$\`: una expresi\xF3n entre comillas simples s\xF3lo se eval\xFAa dentro de un texto \`$\`. As\xED el equipo la toma como comando, no existe, y el reporte sale cortado justo antes. Escrib\xED \`$${r}\` (o sumala al texto anterior: \`$,csq:1:'CSQ'\`).`);continue}let a=r[0]==='"',n=a?r.slice(1).split('"')[0]:r.split(",")[0];if(!/^Q[A-Z]/.test(n)){t.push(`El tramo \`${r}\` no es ni \`$texto\`, ni \`#\`, ni una consulta (\`QCQ,5,100\`): el equipo lo ejecuta como comando, falla y el reporte sale cortado justo antes. Si es texto, va con \`$\` adelante.`);continue}let o=r.split(",");if(a){let i=r.slice(r.indexOf('"',1)+1).replace(/^,/,"");o=[n,...i?i.split(","):[]]}o.length>4?t.push(`La consulta \`${r}\` tiene ${o.length} campos: el equipo acepta consulta, desde y largo (con un separador \`\\XXn\` delante si hace falta). Con m\xE1s, ese tramo sale vac\xEDo.`):o.length===4&&!/^\\[0-9A-Fa-f]{2}\d*$/.test(o[1])&&t.push(`La consulta \`${r}\` tiene 4 campos y el segundo no es un separador \`\\XXn\` (hexa del car\xE1cter + n\xFAmero de campo, ej. \`\\3B1\`): ese tramo sale vac\xEDo.`)}return t}var Gy=new Map(jo.map(e=>[e.token,e])),qy=e=>String(e).padStart(2,"0"),Jp=(e,t)=>e.singleInstance?e.token:`${e.token}${e.token==="UC"?Number(t).toString(16).toUpperCase().padStart(2,"0"):qy(t)}`,ef=" Es un l\xEDmite del equipo: cambiar el formato no lo arregla. Us\xE1 un valor v\xE1lido o decile al usuario cu\xE1l es el l\xEDmite.",tf=e=>String(e??"").split(/\r?\n/).map(t=>t.trim()).filter(t=>t.startsWith(">")),zy=/^>S(CXCAN|CXOW)/i,Xy=/^>S(CXWIF|APW|APX|CXBTH|SSWIFPWR|SSBTHPWR)/i;function Hy(e,t){let r=zp[e.token]?.fields?.[t.key]?.range;if(r)return r;if(typeof t.min!="number")return null;let a=t.inputMax??t.max;return typeof a=="number"?{min:t.min,max:a}:null}function rf(e,t,r){let a=[],n=Jp(e,t);if(!e.singleInstance&&Number(t)>=e.max)return a.push(`${n} no existe: ${e.label} va de ${e.token}00 a ${Jp(e,e.max-1)}.`),a;for(let o of e.fields||[]){let i=r?.[o.key];if(i==null||i==="")continue;let s=o.isSelect?o.options:o.isButtons?o.buttons:null;if(s?.length){s.some(c=>String(c.value)===String(i))||a.push(`${n} \u2014 ${o.label}: ${i} no es una opci\xF3n. Opciones: ${s.map(c=>`${c.value} (${c.label})`).join(", ")}.`);continue}if(typeof i!="number"||o.wildcard&&i===-1)continue;let l=Hy(e,o);l&&(i<l.min||i>l.max)&&a.push(`${n} \u2014 ${o.label}: ${i} est\xE1 fuera de ${l.min} a ${l.max}${o.unit?` ${o.unit}`:""}.`)}return a}function la(e){let t=e.slice(1,-1),r=t.match(/^SRL([0-9A-Fa-f]{2})/);if(r)return`SRL${r[1].toUpperCase()}`;let a=t.match(/^(S[A-Z]+)(\d{2}|\d(?=\D|$))?/);return a?`${a[1]}${a[2]??""}`:t}function jy(e){if(!e.startsWith(">")||!e.endsWith("<"))return"No es un comando: van entre > y <.";let{rxLines:t,skipped:r}=sa(e);if(r.length)return"No es configuraci\xF3n persistente (el configurador la omite al importar).";if(!t.length)return"No es un comando.";try{let a=ia(t,{skipClassify:!0});return a?.unhandled?.length?`El configurador no lo entiende (${a.unhandled[0].reason}).`:null}catch{return"El configurador no lo entiende."}}function Ky(e,t){let r=[...e],a=la(t),n=r.findIndex(o=>o.trim().startsWith(">")&&la(o.trim())===a);return n>=0?r[n]=t:r.push(t),r}function Zy(e,t,r=[],a=null){let n=Vt(t),o=Array.isArray(r)?r:[],i=jy(n);if(i)return{ok:!1,motivo:i};if(/^>SRL/i.test(n)){let{errores:b}=Ko(n,o);if(b.length)return{ok:!1,motivo:b.join(" | ")}}let s=n.match(/^>SUC[0-9A-Fa-f]{2} (.*)<$/);if(s){let b=Yp(s[1]);if(b.length)return{ok:!1,motivo:b.join(" | ")}}if(o.length){let b=Xs(o,Oo),x=Xs(o,un),C=d=>o.length>d.length?` Si el equipo no es ${St(d)}, sacalo de los modelos con cambiar_modelos y volv\xE9 a mandar la l\xEDnea.`:"";if(zy.test(n)&&!Oo(o))return{ok:!1,motivo:`${St(b)} no tiene CAN ni OneWire, y est\xE1 entre los modelos de la config:${C(b)} Si el equipo s\xED es \xE9se: el configurador no le manda nada de CAN, no hay nada que configurar ni que deshabilitar, y lo que puede sobrar son los recursos que lo usaban (un UV o un reporte sobre CAN): quitalos con quitar_recurso.`};if(Xy.test(n)&&!un(o))return{ok:!1,motivo:`${St(x)} no tiene WiFi ni Bluetooth, y est\xE1 entre los modelos de la config:${C(x)} Si el equipo s\xED es \xE9se: el configurador no le manda nada de WiFi ni Bluetooth, y lo que puede sobrar son los recursos que lo usaban (un capturador o un UV sobre Bluetooth): quitalos con quitar_recurso.`}}let l=Ho(n),c=l&&Gy.get(l.token);if(c&&!c.singleInstance&&l.index>=c.max)return{ok:!1,motivo:rf(c,l.index,{})[0]+ef};let u=Xo(e??{},o).split(`
23
+ `),p=a??tf(zo(ol(e,u.join(`
24
+ `)),o)),f=ol(e,Ky(u,n).join(`
25
+ `)),h=tf(zo(f,o)),v=new Set(h);if(!v.has(n)&&!v.has(Zp(n))){let b=new Set(p),x=h.filter(d=>!b.has(d)),C=p.filter(d=>!v.has(d));return!x.length&&C.length?{ok:!0,draft:f,quitadas:C,lineas:h}:{ok:!1,motivo:x.length?`El configurador no la guarda as\xED: se interpreta como ${x.slice(0,3).join(" ")}. Si eso es lo que quer\xE9s, mand\xE1 exactamente esa l\xEDnea; si no, correg\xED el formato (los campos son de ancho fijo).`:`El configurador no lo conserva: no cambia nada de lo que se manda al equipo (eso ya est\xE1 as\xED, o es algo que no modela o que ${o.length?o.join(", "):"el modelo"} no tiene). No insistas con otro formato.`}}if(c){let b=rf(c,l.index,f?.[c.configKey]?.[l.index]);if(b.length)return{ok:!1,motivo:b.join(" | ")+ef}}return{ok:!0,draft:f,lineas:h}}function Zo(e,t,r=[]){let a=structuredClone(e??{}),n=[],o=[],i=null;for(let s of t??[]){let l=Vt(s),c=Zy(a,l,r,i);c.ok?(a=c.draft,i=c.lineas??null,n.push(l)):o.push({linea:l,motivo:c.motivo})}return{draft:a,applied:n,unhandled:o}}var Qo=be(Pe(),1);var Yo={mode:"entry",description:"",tag:"",newPassword:"",mainProtocol:"P",backProtocol:"P",backEnabled:!0,windowSize:5,ipsPassword:"",ip0Address:"",ip0Port:"",ip1Address:"",ip1Port:"",ip4Address:"dm.rinho.com.ar",ip4Port:"4031",ip5Address:"dm.rinho.com.ar",ip5Port:"4031",keepAlive:120,keepAliveMain:!1,keepAliveBack:!0,celEnabled:!0,copsMode:0,copsRegMode:4,copsAct:"",apnName:"",apnUser:"",apnPass:"",sim1Enabled:!1,sim1CopsMode:0,sim1CopsRegMode:4,sim1CopsAct:"",sim1CopsOperator:"",sim1ApnName:"",sim1ApnUser:"",sim1ApnPass:"",smsRetries:1,smsTimeout:0,dlEnabled:1,dlDestiny:"ALL",dlReint:0,dlTime:0,td00:30,td01:1800,headingAngle:30,gpsMode:0,gpsFixMin:3,gpsPdopMax:1,gpsSatsMin:5,ignMode:0,canEnabled:0,canBps:"500K",canProtocol:"OBDII",canCustom:0,canBits:11,canFuelTrip:100,canFuelEngine:0,owEnabled:!1,it00:{on:1,off:1},it01:{on:1,off:1},it02:{on:1,off:1},it03:{on:1,off:1},it04:{on:1,off:1},it05:{on:1,off:1},it06:{on:1,off:1},it07:{on:1,off:1},xp00:{duration:0,blinkOn:0,blinkOff:0},xp01:{duration:9999,blinkOn:9999,blinkOff:9999},xp02:{duration:9999,blinkOn:9999,blinkOff:9999},wifiEnabled:!0,ssid1:"",pass1:"",ssid2:"",pass2:"",parkingAlert:{enabled:!1,index:0,radius:50,debounce:15,changeGps:!0,restoreGps:!0,event:!0,eventNum:120,priority:"H",log:!1,resources:{pk:[0]}},batteryAlert:{enabled:!0,disconnectMax:500,lowMin:550,lowMax:1050,okMin:1100,debounce:5,disconnectEvent:!0,disconnectEventNum:39,disconnectPriority:"H",disconnectLog:!1,lowEvent:!0,lowEventNum:37,lowPriority:"H",lowLog:!1,okEvent:!0,okEventNum:38,okPriority:"L",okLog:!0,resources:{ar:[0,1,2]}},velAlert:{enabled:!1,onSpeed:120,offSpeed:100,activateOutput:!0,output:"00",ignCond:!0,onEvent:!0,eventNum:40,priority:"H",log:!0,offEvent:!0,offEventNum:41,offPriority:"L",offLog:!0,resources:{vl:[0,1]}},waypoints:[],regions:[],resourceLabels:{},timerConfigs:{},vlConfigs:{},arConfigs:{},dcConfigs:{},dvConfigs:{},hmConfigs:{},uvConfigs:{},uConfigs:{},ntConfigs:{},ucConfigs:{},pkConfigs:{},trConfigs:{},mvtConfigs:{},cxxbConfigs:{},cxbbConfigs:{},icConfigs:{},drvConfigs:{},drvbConfigs:{},fctConfigs:{},tkConfigs:{},tkConfig:null,canConfigs:{},owConfigs:{},cxacConfigs:{},cxainConfigs:{},ecuConfigs:{},odometer:null,horometer:null,customRules:[],rules:[{id:0,label:"zeroConfig.periodicIgnOn",trigger:"TD00+",condition:"IGN",enabled:!0,eventNum:0,priority:"L",log:!0},{id:1,label:"zeroConfig.periodicIgnOff",trigger:"TD01+",condition:"IGN!",enabled:!0,eventNum:1,priority:"M",log:!0},{id:2,label:"zeroConfig.headingChange",trigger:"DC00+",condition:"IGN",enabled:!0,eventNum:2,priority:"M",log:!0},{id:3,label:"zeroConfig.ignitionOn",trigger:"IGN+",condition:null,enabled:!0,eventNum:3,priority:"H",log:!0},{id:4,label:"zeroConfig.ignitionOff",trigger:"IGN-",condition:null,enabled:!0,eventNum:4,priority:"H",log:!0},{id:5,label:"zeroConfig.inputActivation",trigger:"IN00+",condition:null,enabled:!1,eventNum:5,priority:"H",log:!0},{id:6,label:"zeroConfig.inputDeactivation",trigger:"IN00-",condition:null,enabled:!1,eventNum:6,priority:"H",log:!0},{id:7,label:"zeroConfig.inputActivation",trigger:"IN01+",condition:null,enabled:!1,eventNum:7,priority:"H",log:!0},{id:8,label:"zeroConfig.inputDeactivation",trigger:"IN01-",condition:null,enabled:!1,eventNum:8,priority:"H",log:!0},{id:9,label:"zeroConfig.inputActivation",trigger:"IN02+",condition:null,enabled:!1,eventNum:9,priority:"H",log:!0},{id:10,label:"zeroConfig.inputDeactivation",trigger:"IN02-",condition:null,enabled:!1,eventNum:16,priority:"H",log:!0},{id:11,label:"zeroConfig.inputActivation",trigger:"IN03+",condition:null,enabled:!1,eventNum:17,priority:"H",log:!0},{id:12,label:"zeroConfig.inputDeactivation",trigger:"IN03-",condition:null,enabled:!1,eventNum:18,priority:"H",log:!0},{id:13,label:"zeroConfig.inputActivation",trigger:"IN04+",condition:null,enabled:!1,eventNum:19,priority:"H",log:!0},{id:14,label:"zeroConfig.inputDeactivation",trigger:"IN04-",condition:null,enabled:!1,eventNum:20,priority:"H",log:!0},{id:15,label:"zeroConfig.inputActivation",trigger:"IN05+",condition:null,enabled:!1,eventNum:21,priority:"H",log:!0},{id:16,label:"zeroConfig.inputDeactivation",trigger:"IN05-",condition:null,enabled:!1,eventNum:22,priority:"H",log:!0},{id:17,label:"zeroConfig.inputActivation",trigger:"IN06+",condition:null,enabled:!1,eventNum:23,priority:"H",log:!0},{id:18,label:"zeroConfig.inputDeactivation",trigger:"IN06-",condition:null,enabled:!1,eventNum:24,priority:"H",log:!0},{id:19,label:"zeroConfig.outputActivation",trigger:"XP00+",condition:null,enabled:!1,eventNum:25,priority:"H",log:!0},{id:20,label:"zeroConfig.outputDeactivation",trigger:"XP00-",condition:null,enabled:!1,eventNum:32,priority:"H",log:!0},{id:21,label:"zeroConfig.outputActivation",trigger:"XP01+",condition:null,enabled:!1,eventNum:33,priority:"H",log:!0},{id:22,label:"zeroConfig.outputDeactivation",trigger:"XP01-",condition:null,enabled:!1,eventNum:34,priority:"H",log:!0},{id:23,label:"zeroConfig.outputActivation",trigger:"XP02+",condition:null,enabled:!1,eventNum:35,priority:"H",log:!0},{id:24,label:"zeroConfig.outputDeactivation",trigger:"XP02-",condition:null,enabled:!1,eventNum:36,priority:"H",log:!0}]};var Qy=["zero","spider","smart","pi"],Yy=["zero","spider","smart"];function Jy(e){let t=String(e??"").trim();if(!t||t.startsWith("//"))return null;let r=t.indexOf("//",t.lastIndexOf("<")+1);return(r>0?t.slice(0,r):t).trim()||null}function af(e,t){let r=Array.isArray(t)?[...new Set(t.filter(l=>Qy.includes(l)))]:[],a=r.length?r:Yy,n=(Array.isArray(e)?e:[]).map(Jy).filter(Boolean),o=structuredClone({...Yo,mode:"advanced",customRules:[]}),{applied:i,unhandled:s}=Zo(o,n,a);return{validas:i,rechazadas:s,modelos:a}}var Ce=e=>String(parseInt(e,10));function e2(e){let t=String(e??"").trim(),r=t.match(/^([A-Z]+)(\d*)([+\-*]?)$/);if(!r)return t?`se activa ${t}`:"";let[,a,n,o]=r,i=o==="-";if(o==="*")return`cambia ${a}${n}`;switch(a){case"IGN":return i?"se saca la ignici\xF3n":"se pone la ignici\xF3n";case"VL":return i?`baja del l\xEDmite de velocidad ${Ce(n)}`:`se supera el l\xEDmite de velocidad ${Ce(n)}`;case"TD":return`vence el timer ${Ce(n)}`;case"IN":return i?`se desactiva la entrada ${Ce(n)}`:`se activa la entrada ${Ce(n)}`;case"XP":return i?`se apaga la salida ${Ce(n)}`:`se prende la salida ${Ce(n)}`;case"PWR":return"arranca el equipo";case"AR":return i?`baja el anal\xF3gico ${Ce(n)}`:`sube el anal\xF3gico ${Ce(n)}`;case"JAM":return"hay inhibici\xF3n de se\xF1al";case"ZNA":case"ZNB":return i?`sale de la zona ${a}${n}`:`entra a la zona ${a}${n}`;default:return i?`se desactiva ${a}${n}`:`se activa ${a}${n}`}}function t2(e){let t=String(e??"").trim();if(!t)return null;let r=t.endsWith("!"),a=r?t.slice(0,-1):t,n=a.match(/^([A-Z]+)(\d*)$/);if(!n)return`se cumple ${t}`;let[,o,i]=n;switch(o){case"IGN":return r?"la ignici\xF3n est\xE1 cortada":"la ignici\xF3n est\xE1 puesta";case"IN":return r?`la entrada ${Ce(i)} est\xE1 apagada`:`la entrada ${Ce(i)} est\xE1 activa`;case"XP":return r?`la salida ${Ce(i)} est\xE1 apagada`:`la salida ${Ce(i)} est\xE1 prendida`;default:return r?`no se cumple ${a}`:`se cumple ${a}`}}function r2(e){let t=String(e??"").trim(),r=t.match(/^G([A-Z0-9]{2})([0-9A-Fa-f]{2})[HML]/);if(r){let a=r[2].toUpperCase();return r[1]==="CQ"?`reporta el evento ${a}`:`reporta el evento ${a} (${r[1][0]==="U"?`reporte de usuario ${r[1][1]}`:`reporte ${r[1]}`})`}return r=t.match(/^SSSXP0?(\d)(\d)(\d)/),r?r[2]==="1"?`prende la salida ${r[1]}`:`apaga la salida ${r[1]}`:(r=t.match(/^STD(\d{2})\s*([ERC])/),r?r[2]==="C"?`frena el timer ${Ce(r[1])}`:`arranca el timer ${Ce(r[1])}`:(r=t.match(/^SSSU(\d{2})(\d)/),r?`${r[2]==="1"?"prende":"apaga"} la bandera ${Ce(r[1])}`:t))}function nf(e){let t=String(e??"").trim().match(/^>SRL([0-9A-Fa-f]{2})([ED]);(.*)<$/);if(!t)return null;let r=t[3],a=i=>r.match(new RegExp(`${i}=([^;]*)`))?.[1]??"",o=(r.match(/ACC=\{(.*)\}/)?.[1]??"").split("}{").map(i=>r2(i.replace(/[{}]/g,""))).filter(Boolean);return{cuando:e2(a("TRG")),si:t2(a("CND")),entonces:o.join(" y ")}}var a2=new Map(jo.map(e=>[e.token,e])),n2=e=>e===!0?"s\xED":e===!1?"no":e;function o2(e,t){let r=[];for(let a of e.fields||[]){let n=t?.[a.key];if(n==null||n==="")continue;let i=(a.isSelect?a.options:a.isButtons?a.buttons:null)?.find(s=>String(s.value)===String(n));r.push({campo:a.label,valor:n2(n),...a.unit?{unidad:a.unit}:{},...i?{significa:i.label}:{},...a.isToggle?{significa:n?"activado":"desactivado"}:{}})}return r}function i2(e,t){let r=e.match(/^>SRL([0-9A-Fa-f]{2})([ED]);(.*)<$/);if(!r)return{error:"Regla mal formada. Forma: >SRL<slot><E|D>;TRG=\u2026;CND=\u2026;ACC={\u2026}<"};let a=r[3],n=c=>a.match(new RegExp(`(?:^|;)${c}=([^;]*)`))?.[1],o=a.match(/ACC=(\{.*\})/)?.[1],i=Ne(r[1].toUpperCase()),{errores:s,avisos:l}=Ko(e,t);return{comando:"SRL (regla)",campos:[{campo:"Slot",valor:r[1].toUpperCase(),...i==null?{significa:"no existe: los slots van de 00 a 99 y de A0 a FF"}:{}},{campo:"Estado",valor:r[2],significa:r[2]==="E"?"habilitada":"deshabilitada"},{campo:"TRG (disparador)",valor:n("TRG")??"(falta)"},...n("CND")?[{campo:"CND (condici\xF3n)",valor:n("CND")}]:[],...o?[{campo:"ACC (acciones)",valor:o}]:[]],en_palabras:nf(e),...s.length?{errores:s}:{},...l.length?{avisos:l}:{},nota:"TRG y CND van en notaci\xF3n postfija: dos se\xF1ales llevan & (y) o | (o) despu\xE9s; ! niega la se\xF1al que tiene delante."}}var of={S:"decimal con signo"," ":"decimal con signo",U:"decimal sin signo",F:"punto flotante",H:"hexadecimal big endian",h:"hexadecimal little endian",A:"texto (compara la cadena)",X:"delta: cambio en una ventana de tiempo"};function sf(e){let t=e.match(/^>SUV(\d{2})(.)(.*)<$/);if(!t||!of[t[2]]||t[3].includes("\\"))return null;let r=t[3].split(",");if(r.length!==5)return null;let[a,n,o,i,s]=r,l=t[2]==="X";return[{campo:"Tipo",valor:t[2],significa:of[t[2]]},{campo:"Consulta que mira",valor:a},{campo:"Desde (car\xE1cter de la respuesta)",valor:n},{campo:"Largo (caracteres)",valor:o},{campo:l?"Ventana de tiempo":"M\xEDnimo (se activa desde)",valor:i,...l?{unidad:"s"}:{}},{campo:l?"Umbral del cambio":"M\xE1ximo (hasta, sin incluir)",valor:s}]}function lf(e,t=["zero","spider","smart"]){let r=Vt(e);if(!/^>[SQG][A-Z]/.test(r)||!r.endsWith("<"))return{error:"No es un comando: van entre > y <, y empiezan con S (configurar), Q (consultar) o G (generar un reporte)."};if(/^>SRL/i.test(r))return{linea:r,...i2(r,t)};let{rxLines:a,skipped:n}=sa(r),o=null,i=!1;try{if(a.length&&!n.length){let x=ia(a,{skipClassify:!0});i=!x?.unhandled?.length,o=x?.config??null}}catch{i=!1}let s=r.slice(1).match(/^[A-Z]+/)?.[0]??"";if(!i)return{linea:r,comando:s,entiende:!1,nota:r.startsWith(">Q")||r.startsWith(">G")?"Es una consulta o una orden inmediata, no configuraci\xF3n: el configurador no la interpreta. Busc\xE1 su sintaxis con buscar_doc antes de explicarla.":"El configurador no interpreta este comando (orden de terminal o comando que no modela). Busc\xE1 su sintaxis con buscar_doc antes de explicarlo; no deduzcas los campos contando caracteres."};let l=Ho(r),c=l&&a2.get(l.token),u=c?c.singleInstance?o?.[c.configKey]?.[0]:o?.[c.configKey]?.[l.index]:null,p=c?c.singleInstance?c.token:`${c.token}${c.token==="UC"?l.index.toString(16).toUpperCase().padStart(2,"0"):String(l.index).padStart(2,"0")}`:s,f=null;try{let x=Zo(structuredClone({...Yo,mode:"advanced",customRules:[]}),[r],t);x.unhandled.length&&(f=x.unhandled[0].motivo)}catch{}let h="";try{h=oa(r,{})||""}catch{h=""}let v=!c&&o?Object.fromEntries(Object.entries(o).filter(([x,C])=>!x.startsWith("_")&&C!==void 0&&typeof C!="object")):null,b=c&&u&&c.token!=="UV"?(c.fields||[]).filter(x=>{let C=u[x.key];return C==null||C===""}).map(x=>x.label):[];return{linea:r,comando:s,...c?{modulo:c.label,recurso:p}:{},entiende:!0,...h?{descripcion:h}:{},...c?.token==="UV"&&sf(r)?{campos:sf(r)}:c&&u?{campos:o2(c,u)}:{},...b.length?{no_vienen:b,nota_no_vienen:"La l\xEDnea termina antes de estos campos: no vienen, no los busques en los d\xEDgitos que s\xED est\xE1n."}:{},...v&&Object.keys(v).length?{valores:v}:{},...f?{validacion:f}:{validacion:"La validaci\xF3n del configurador la acepta tal cual."}}}function Jo(e){if(!e)return null;let t=String(e).match(/v(\d+)\.(\d+)\.(\d+)(?:\.T(\d+))?/i);return t?[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10),t[4]!==void 0?parseInt(t[4],10):1/0]:null}function il(e,t){let r=Jo(e);if(!r)return!0;let a=String(t).match(/^(\d+)\.(\d+)\.(\d+)(?:\.T(\d+))?$/);if(!a)return!0;let n=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),a[4]!==void 0?parseInt(a[4],10):1/0];for(let o=0;o<4;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!0}var ei=[{id:"owAutoDt",minFw:"1.09.28.T16",labelKey:"fwCompat.owAutoDt",match:e=>/^SCXOW\d+,2\b/.test(e),transform:e=>e.replace(/^(SCXOW\d+),2\b/,"$1,0")},{id:"owInvKey",minFw:"1.09.28.T61",labelKey:"fwCompat.owInvKey",match:e=>/^SCXOW\d+,\d+,1\b/.test(e),transform:e=>e.replace(/^(SCXOW\d+,\d+),1\b/,"$1")},{id:"drv",minFw:"1.09.28.T53",labelKey:"fwCompat.drv",match:e=>/^SCXDRV(?![BT])/.test(e),queryMatch:e=>e==="QCXDRV"},{id:"drvHab",minFw:"1.09.28.T60",labelKey:"fwCompat.drvHab",match:e=>/^SCXDRV(?![BT])/.test(e)&&/^[Hh]\d$/.test(e.slice(6).split(",")[5]??"")},{id:"drvTaco",minFw:"1.09.28.T58",labelKey:"fwCompat.drvTaco",match:e=>/^SCXDRV4(,|$)/.test(e)},{id:"drvCorte",minFw:"1.09.28.T54",labelKey:"fwCompat.drvCorte",match:e=>/^SCXDRV(?![BT])/.test(e)&&e.split(",").length>3,transform:e=>cf(e,3)},{id:"drvRpt",minFw:"1.09.28.T56",labelKey:"fwCompat.drvRpt",match:e=>/^SCXDRV(?![BT])/.test(e)&&e.split(",").length>7,transform:e=>cf(e,7)},{id:"drvBle",minFw:"1.09.28.T57",labelKey:"fwCompat.drvBle",match:e=>e.startsWith("SCXDRVB"),queryMatch:e=>e==="QCXDRVB"},{id:"ignVbatTh",minFw:"1.09.26.T15",labelKey:"fwCompat.ignVbatTh",match:e=>e.startsWith("SCXIGNV"),queryMatch:e=>e.startsWith("QCXIGNV")},{id:"apModeCli",minFw:"1.09.20",labelKey:"fwCompat.apModeCli",match:e=>e.startsWith("SAPY")||/^SCXWIF1,2,/.test(e),transform:e=>/^SCXWIF1,2,/.test(e)?e.replace(/^SCXWIF1,2,/,"SCXWIF1,1,"):null},{id:"blackBox",minFw:"1.09.15",labelKey:"fwCompat.blackBox",match:e=>e.startsWith("SCXBB"),queryMatch:e=>e.startsWith("QCXBB")},{id:"zones",minFw:"1.09.21",labelKey:"fwCompat.zones",match:e=>/^S(ZONES|ZMODE|ZFRAC)/.test(e)||/^SRL/.test(e)&&/\bZN[AB]\d{2}/.test(e),queryMatch:e=>/^Q(ZONES|ZMODE|ZFRAC)$/.test(e)},{id:"uartBaud3857",minFw:"1.09.28.T40",labelKey:"fwCompat.uartBaud3857",match:e=>/^SCXTR[M0](38400|57600)$/.test(e)}];function cf(e,t){let r=e.split(",").slice(0,t);for(;r.length>1&&r[r.length-1]==="";)r.pop();return r.join(",")}var s2=e=>e.replace(/^>/,"").replace(/<$/,"");function l2(e){let t=String(e||"").match(/v\d+\.\d+\.\d+(?:\.T\d+)?/i);return t?t[0]:String(e||"")}function uf(e,t){if(!Jo(t))return{commands:e,notices:[]};let r=ei.filter(o=>!il(t,o.minFw));if(r.length===0)return{commands:e,notices:[]};let a=new Map,n=[];for(let o of e){let i=s2(o),s=r.find(u=>u.match(i));if(!s){n.push(o);continue}a.has(s.id)||a.set(s.id,{id:s.id,labelKey:s.labelKey,minFw:s.minFw,deviceFw:l2(t),skipped:[],downgraded:[]});let l=a.get(s.id),c=s.transform?s.transform(i):null;c?(n.push(`>${c}<`),l.downgraded.push(o)):l.skipped.push(o)}return{commands:n,notices:[...a.values()]}}var df=["zero","spider","smart","pi"],gf=["zero","spider","smart"],pf=64*1024,ff=2e3,mf=/>[SQ][^<]+</,c2=/^[<>]?\s*[SQGC][A-Z]{1,8}/,u2=[[/Parser retornó null/i,"NOT_UNDERSTOOD"],[/Sin handler/i,"NO_HANDLER"],[/no es configuración persistente|omite al importar/i,"NOT_PERSISTENT"],[/^No es un comando: van entre/i,"NOT_FRAMED"],[/^No es un comando/i,"NOT_A_CONFIG_COMMAND"],[/\b(TRG|CND|ACC)\b|operador|flanco|disparador/i,"RULE_INVALID"],[/^(Zero|Spider|Smart|Pi|El modelo|Los modelos)\b.*no tiene|no tiene (CAN|WiFi|Bluetooth|OneWire|1-Wire|esa salida|esa entrada|salida|entrada)/i,"NOT_SUPPORTED_BY_MODEL"],[/no existe/i,"RESOURCE_OUT_OF_RANGE"],[/fuera de rango|entre .* y |máximo|mínimo|no es una opción/i,"VALUE_OUT_OF_RANGE"]],d2=/^>(SCXDLE|SRL(\*\*|[0-9A-Fa-f]{2})D|SZONES|SZMODE|SZFRAC|SRESET|SPKA|SGC[ASR]\b|STP,|CBU|SDLC|SDLF|GGP|G[A-Z]{2}[0-9A-F]{2}[HML]\b|SSSU\d{4}$|SSSXP\d{4}$|SKO\+\+)/i,p2=/^>(SPW|QPW|SFACTORY|SCFW|SFRM|SFTP|SUNLOCK|SREGISTER|SID\b|SCRASH|SCAL|SDA\b|SEVGN)/i,f2="Es una acci\xF3n, no configuraci\xF3n: el equipo la ejecuta en el momento y el importador del modo C\xF3digo no la guarda. Se manda aparte, una por vez, desde el monitor/terminal del configurador o desde la plataforma; dentro de una regla va en ACC={...}.",m2="Comando de seguridad, identidad, f\xE1brica o firmware: no se genera desde el skill ni se incluye en un bloque. Lo gestiona soporte Rinho (https://www.rinho.com.ar/contacto/).";function vf(e){return p2.test(e)?{code:"SECURITY_COMMAND",reason:m2}:d2.test(e)?{code:"ACTION_NOT_CONFIG",reason:f2}:null}function bf(e){return String(e??"").replace(/:?\s*quitalos con [a-z]+_[a-z_]+\.?/gi,".").replace(/\s+(con|usá|usando)\s+`?[a-z]+_[a-z_]+`?/gi," en la documentaci\xF3n (docs.rinho.com.ar)").replace(/Buscá su sintaxis en la documentación \(docs\.rinho\.com\.ar\) antes de explicarl[ao]/g,"Busc\xE1 su sintaxis en la documentaci\xF3n (docs.rinho.com.ar) antes de explicarla").replace(/\s{2,}/g," ").replace(/\.\./g,".").trim()}var hf={owAutoDt:"1-Wire: automatic DT assignment by TH/TL (SCXOW mode 2)",owInvKey:"1-Wire: inverted key code notation (SCXOW 3rd field)",drv:"Driver module (SCXDRV)",drvHab:"Driver: start enable cut (H output)",drvTaco:"Driver: tachograph source",drvCorte:"Driver: window, warning and cut fields",drvRpt:"Driver: automatic reports and confirmation",drvBle:"Driver over Bluetooth (SCXDRVB)",ignVbatTh:"Ignition by voltage with manual thresholds (SCXIGNV)",apModeCli:"WiFi AP in client mode",blackBox:"Black box (SCXBB)",uartBaud3857:"Serial port at 38400 or 57600 bps",zones:"Zones module (SZONES/SZMODE/SZFRAC, ZNA/ZNB signals in rules)"},BI=ei.map(e=>e.id),h2='Update the device firmware: config.rinho.com.ar \u2192 Firmware \u2192 "Por cable" (USB/serial; the configurator detects whether the device supports it), or ask Rinho support for an update over the air (FOTA).';function g2(e){if(e==null||e==="")return null;let t=String(e).trim(),r=/v\d/i.test(t)?t:`v${t}`;return Jo(r)?r:void 0}function v2(e,t){let{notices:r}=uf(e.map(a=>a.normalized),t);return r.map(a=>{let n=a.skipped.length>0;return{code:"FIRMWARE_TOO_OLD",feature:hf[a.id]??a.id,requires:a.minFw,device:String(a.deviceFw).replace(/^v/i,""),effect:n?"not_sent":"reduced",lines:e.filter(o=>a.skipped.includes(o.normalized)||a.downgraded.includes(o.normalized)).map(o=>o.line),message:`${hf[a.id]??a.id} needs firmware ${a.minFw} or later; the device has ${String(a.deviceFw).replace(/^v/i,"")}. `+(n?"The configurator will NOT send these lines to this device.":"The configurator will send a reduced version of these lines.")+" "+h2}})}function b2(e){let t=String(e??"");for(let[r,a]of u2)if(r.test(t))return a;return"REJECTED"}function Sf(e){let t=(Array.isArray(e)?e:String(e??"").split(",")).map(n=>String(n).trim().toLowerCase()).filter(Boolean),r=[...new Set(t.filter(n=>df.includes(n)))],a=[...new Set(t.filter(n=>!df.includes(n)))];return{models:r.length?r:gf,unknown:a}}function S2(e){let t=String(e??"").trim();if(!t)return{command:null,comment:null};if(t.startsWith("//")||t.startsWith("#"))return{command:null,comment:t};let r=t.startsWith(">")?t.indexOf("<",1):-1,a=t.indexOf("//",r>=0?r+1:0);return a>0?{command:t.slice(0,a).trim(),comment:t.slice(a)}:{command:t,comment:null}}function ti(e,t={}){let r=String(e??"");if(r.length>pf)return{ok:!1,error:"TEXT_TOO_LONG",message:`Max ${pf} characters per validation.`};let{models:a,unknown:n}=Sf(t.models),o=g2(t.fw),i=r.split(/\r?\n/);if(i.length>ff)return{ok:!1,error:"TOO_MANY_LINES",message:`Max ${ff} lines per validation.`};let s=[];n.length&&s.push({code:"UNKNOWN_MODEL",message:`Unknown model(s) ignored: ${n.join(", ")}. Valid: ${gf.join(", ")}.`}),o===void 0&&s.push({code:"INVALID_FIRMWARE_VERSION",message:`Could not read firmware version "${t.fw}". Use the format 1.09.28.T50 (from the >QVR< reply). Firmware checks skipped.`});let l=[];i.forEach((d,m)=>{let w=m+1,{command:A,comment:R}=S2(d);if(R&&mf.test(R)&&s.push({line:w,code:"FRAMED_COMMAND_IN_COMMENT",message:"This comment contains a framed command (>...<). The Code-mode importer picks it up as a real command. Write commands inside comments without > and <."}),!!A){if(!c2.test(A)&&!mf.test(A)){s.push({line:w,code:"NOT_A_COMMAND_OR_COMMENT",message:"Line is neither a command nor a // comment. Prefix free text with //."});return}l.push({line:w,raw:A,normalized:Vt(A)})}});let c=new Map;for(let d of l){if(!d.normalized.startsWith(">S"))continue;let m=la(d.normalized);c.has(m)&&s.push({line:d.line,code:"DUPLICATE_RESOURCE",message:`${m} was already set on line ${c.get(m)}. Only the last one stays on the device: if they are different features, use a free slot.`}),c.set(m,d.line)}o&&(s.push(...v2(l,o)),!/\.T\d+/i.test(o)&&ei.some(d=>d.minFw.startsWith(`${o.replace(/^v/i,"")}.T`))&&s.push({code:"FIRMWARE_VERSION_WITHOUT_BUILD",message:`"${o.replace(/^v/i,"")}" has no build (.Tnn): it is treated as the final release, newer than any T build. Some features of that release depend on the T build; pass the full version from >QVR< (e.g. ${o.replace(/^v/i,"")}.T50) to check them.`}));let u=[],p=[];for(let d of l){let m=vf(d.normalized);m?u.push({line:d.line,command:d.raw,...m}):p.push(d)}let{validas:f,rechazadas:h}=af(p.map(d=>d.raw),a),v=new Set,b=d=>{let m=l.find(w=>!v.has(w)&&(w.normalized===d||w.raw===d));return m?(v.add(m),m.line):null},x=[...u,...h.map(d=>({line:b(d.linea),command:d.linea,code:b2(d.motivo),reason:bf(d.motivo)}))].sort((d,m)=>(d.line??0)-(m.line??0)),C=f.map(d=>({line:b(d),command:d}));return{ok:x.length===0,models:a,firmware:o?o.match(/v(\d+\.\d+\.\d+(?:\.T\d+)?)/i)?.[1]??null:null,summary:{commands:l.length,accepted:C.length,rejected:x.length,warnings:s.length},rejected:x,warnings:s,accepted:C,note:`Validated with the same interpreter as the Code mode of config.rinho.com.ar, against an empty Advanced-mode config: it cannot see slots already used on the customer's device.${t.models?"":" No model given: validated for zero, spider and smart at once, so CAN/1-Wire lines are rejected; pass --model."} Firmware checks run only when a firmware version is given. "reason" texts are in Spanish; translate them for the user.`}}function Cf(e,t={}){let{models:r}=Sf(t.models),a=Vt(String(e??"")),n=vf(a);if(n)return{linea:a,comando:a.slice(1).match(/^[A-Z]+/)?.[0]??"",entiende:!1,code:n.code,nota:n.reason};let o=lf(String(e??""),r);for(let i of["nota","validacion","error"])typeof o?.[i]=="string"&&(o[i]=bf(o[i]));return o}function sl(e){return Math.round(e*1e5)}function xf(e){if(e.length===0)return{baseLat:0,baseLon:0,scalePow2:10};let t=1/0,r=-1/0,a=1/0,n=-1/0;for(let u of e)u.latMin<t&&(t=u.latMin),u.latMax>r&&(r=u.latMax),u.lonMin<a&&(a=u.lonMin),u.lonMax>n&&(n=u.lonMax);let o=Math.round((t+r)/2),i=Math.round((a+n)/2),s=Math.max(r-o,o-t,n-i,i-a),l=32767,c=0;for(;s>>c>l;)c++;return{baseLat:o,baseLon:i,scalePow2:c}}function ll(e,t){let r=t.scalePow2;return{latMin:Math.max(-32768,Math.min(32767,e.latMin-t.baseLat>>r)),latMax:Math.max(-32768,Math.min(32767,e.latMax-t.baseLat>>r)),lonMin:Math.max(-32768,Math.min(32767,e.lonMin-t.baseLon>>r)),lonMax:Math.max(-32768,Math.min(32767,e.lonMax-t.baseLon>>r))}}function yf(e){let t=1/0,r=-1/0,a=1/0,n=-1/0;for(let[o,i]of e)o<t&&(t=o),o>r&&(r=o),i<a&&(a=i),i>n&&(n=i);return{latMin:t,latMax:r,lonMin:a,lonMax:n}}function cl(e,t){let r=Math.round(t);return{latMin:e.latMin-r,latMax:e.latMax+r,lonMin:e.lonMin-r,lonMax:e.lonMax+r}}function Af(e,t=()=>{}){let a=new DOMParser().parseFromString(e,"application/xml"),n=typeof a.querySelector=="function"?a.querySelector("parsererror"):a.getElementsByTagName("parsererror")[0];if(n)throw new Error("KML parse error: "+n.textContent.trim());let o=Array.from(a.getElementsByTagName("*")).filter(l=>Gt(l)==="Placemark"),i=[],s=0;for(let l of o){let c=vn(l,"name")||`Placemark#${i.length}`,u=x2(l),p=u.zones,f=p?w2(p,c):[],h=y2(l);if(!h){t(`[WARN] "${c}": no supported geometry \u2014 skipped`);continue}let v=(u.type||"").toUpperCase(),b=v?{WP:0,POLY:1,ROUTE:2}[v]:h.inferredType;if(b===void 0){t(`[WARN] "${c}": unknown type "${v}" \u2014 skipped`);continue}let x=h.points,C=0,d=0;if(b===0){if(x.length!==1){t(`[ERROR] "${c}": WP expects 1 point, got ${x.length} \u2014 skipped`);continue}C=wf(u.radius_m,100)}else if(b===1){if(x.length<3){t(`[ERROR] "${c}": POLY needs \u22653 vertices, got ${x.length} \u2014 skipped`);continue}let[w,A]=x[0],[R,I]=x[x.length-1];(w!==R||A!==I)&&(x=[...x,x[0]],s++,t(`[INFO] "${c}": polygon auto-closed (${x.length-1} \u2192 ${x.length} vtx)`))}else if(b===2){if(x.length<2){t(`[ERROR] "${c}": ROUTE needs \u22652 vertices, got ${x.length} \u2014 skipped`);continue}d=wf(u.buffer_m,50)}let m=yf(x);b===0&&(m=cl(m,C)),b===2&&(m=cl(m,d)),i.push({name:c,type:b,zones:f,radiusM:C,bufferM:d,points:x,aabbI32:m})}return{features:i,autoClosedCount:s}}function Gt(e){return e.localName||e.nodeName.replace(/^.*:/,"")}function vn(e,t){for(let r of e.children)if(Gt(r)===t)return(r.textContent||"").trim();return null}function x2(e){let t={};for(let r of e.getElementsByTagName("*")){if(Gt(r)!=="Data")continue;let a=r.getAttribute("name");if(!a)continue;let n=vn(r,"value");n!==null&&(t[a.toLowerCase()]=n)}return t}function y2(e){let t=Array.from(e.getElementsByTagName("*")),r=t.find(o=>Gt(o)==="Polygon");if(r){let o=Array.from(r.getElementsByTagName("*")).find(i=>Gt(i)==="outerBoundaryIs");if(o){let i=Array.from(o.getElementsByTagName("*")).find(s=>Gt(s)==="LinearRing");if(i){let s=ul(vn(i,"coordinates")||"");if(s.length>0)return{points:s,inferredType:1}}}}let a=t.find(o=>Gt(o)==="LineString");if(a){let o=ul(vn(a,"coordinates")||"");if(o.length>0)return{points:o,inferredType:2}}let n=t.find(o=>Gt(o)==="Point");if(n){let o=ul(vn(n,"coordinates")||"");if(o.length>0)return{points:o,inferredType:0}}return null}function ul(e){let t=[],r=e.trim().split(/\s+/);for(let a of r){if(!a)continue;let n=a.split(",");if(n.length<2)continue;let o=parseFloat(n[0]),i=parseFloat(n[1]);!Number.isFinite(i)||!Number.isFinite(o)||t.push([sl(i),sl(o)])}return t}function w2(e,t){let r=[];for(let a of e.split(/[,\s]+/)){if(!a)continue;let n=parseInt(a,10);if(!Number.isInteger(n)||n<0||n>511)throw new Error(`"${t}": invalid zone id "${a}" (must be ${0}..${511})`);r.includes(n)||r.push(n)}if(r.length===0)throw new Error(`"${t}": empty zones list`);return r}function wf(e,t){if(e==null)return t;let r=parseInt(String(e),10);return Number.isInteger(r)&&r>0?r:t}function Df(e,t){let r=Math.sqrt(64)|0,a=e.map((s,l)=>({f:s,i:l,centerLat:(s.aabbI32.latMin+s.aabbI32.latMax)/2,centerLon:(s.aabbI32.lonMin+s.aabbI32.lonMax)/2}));a.sort((s,l)=>s.centerLat-l.centerLat);let n=Ef(a,r),o=[];for(let s of n){s.sort((c,u)=>c.centerLon-u.centerLon);let l=Ef(s,r);for(let c of l)o.push(c.map(u=>u.f))}let i=[];for(let s of o)if(s.length<=t)i.push(s);else for(let l=0;l<s.length;l+=t)i.push(s.slice(l,l+t));for(;i.length<64;)i.push([]);return i}function Ef(e,t){let r=[],a=e.length;for(let n=0;n<t;n++){let o=Math.floor(n*a/t),i=Math.floor((n+1)*a/t);r.push(e.slice(o,i))}return r}var A2=(()=>{let e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let a=0;a<8;a++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r>>>0}return e})();function ri(e,t=0,r=e.length){let a=4294967295;for(let n=t;n<r;n++)a=A2[(a^e[n])&255]^a>>>8;return(a^4294967295)>>>0}function Tf(e,t,r){let a=t.map(D2),n=new Array(t.length),o=1312;for(let p=0;p<t.length;p++)n[p]=o,o+=a[p];let i=o+4,s=new ArrayBuffer(i),l=new DataView(s),c=new Uint8Array(s);l.setUint32(0,827218514,!0),l.setUint16(4,1,!0),l.setUint16(6,0,!0),l.setUint32(8,i,!0),l.setUint32(12,0,!0),l.setUint16(16,e.length,!0),l.setUint8(18,t.length),l.setUint8(19,0),l.setInt32(20,r.baseLat,!0),l.setInt32(24,r.baseLon,!0),l.setUint8(28,r.scalePow2),l.setUint8(29,0),l.setUint16(30,0,!0);for(let p=0;p<64;p++){let f=32+p*20;if(p<t.length&&t[p].length>0){let h=R2(t[p]),v=ll(h,r);l.setInt16(f+0,v.latMin,!0),l.setInt16(f+2,v.latMax,!0),l.setInt16(f+4,v.lonMin,!0),l.setInt16(f+6,v.lonMax,!0),l.setUint32(f+8,n[p],!0),l.setUint8(f+12,t[p].length)}else l.setInt16(f+0,32767,!0),l.setInt16(f+2,-32768,!0),l.setInt16(f+4,32767,!0),l.setInt16(f+6,-32768,!0),l.setUint32(f+8,0,!0),l.setUint8(f+12,0)}for(let p=0;p<t.length;p++){let f=t[p];if(f.length===0)continue;let h=n[p];l.setUint16(h+0,52753,!0),l.setUint8(h+2,f.length),l.setUint8(h+3,0);let v=h+4,b=v+20*f.length;for(let x=0;x<f.length;x++){let C=f[x],d=v+x*20,m=ll(C.aabbI32,r);l.setInt16(d+0,m.latMin,!0),l.setInt16(d+2,m.latMax,!0),l.setInt16(d+4,m.lonMin,!0),l.setInt16(d+6,m.lonMax,!0),l.setUint32(d+8,b,!0),l.setUint8(d+12,C.type),l.setUint8(d+13,0),l.setUint8(d+14,C.zones.length),l.setUint8(d+15,0),l.setUint16(d+16,C.points.length,!0),l.setUint16(d+18,0,!0);let w=b;for(let A of C.zones)l.setUint16(w,A,!0),w+=2;if(C.type===0){let[A,R]=C.points[0];l.setInt32(w,A,!0),w+=4,l.setInt32(w,R,!0),w+=4,l.setUint32(w,C.radiusM,!0),w+=4}else if(C.type===1)for(let[A,R]of C.points)l.setInt32(w,A,!0),w+=4,l.setInt32(w,R,!0),w+=4;else if(C.type===2){for(let[A,R]of C.points)l.setInt32(w,A,!0),w+=4,l.setInt32(w,R,!0),w+=4;l.setUint16(w,C.bufferM,!0),w+=2,l.setUint16(w,0,!0),w+=2}w=w+3&-4,b=w}}let u=ri(c,0,i-4);return l.setUint32(12,u,!0),l.setUint32(i-4,u,!0),s}function D2(e){if(e.length===0)return 0;let t=4+20*e.length;for(let r of e)t+=T2(r);return t}function T2(e){let t=2*e.zones.length;return e.type===0?t+=12:e.type===1?t+=8*e.points.length:e.type===2&&(t+=8*e.points.length+4),t+3&-4}function R2(e){let t=1/0,r=-1/0,a=1/0,n=-1/0;for(let o of e)o.aabbI32.latMin<t&&(t=o.aabbI32.latMin),o.aabbI32.latMax>r&&(r=o.aabbI32.latMax),o.aabbI32.lonMin<a&&(a=o.aabbI32.lonMin),o.aabbI32.lonMax>n&&(n=o.aabbI32.lonMax);return{latMin:t,latMax:r,lonMin:a,lonMax:n}}function Rf(e,t={},r=()=>{}){let{features:a,autoClosedCount:n}=Af(e,r),o={total:a.length,byType:{WP:0,POLY:0,ROUTE:0},autoClosedCount:n};for(let i of a){let s=i.type===0?"WP":i.type===1?"POLY":"ROUTE";o.byType[s]++}return r(`Parsed ${o.total} features (${o.byType.WP} WP, ${o.byType.POLY} POLY, ${o.byType.ROUTE} ROUTE)`),n>0&&r(`Auto-closed ${n} polygon(s)`),_2(a,t,r)}function _2(e,t={},r=()=>{}){let a=t.maxElements??4096,n=t.pageSize??64;if(e.length===0)throw new Error("No features to emit");if(e.length>a)throw new Error(`Too many elements: ${e.length} > MAX_ELEMENTS=${a}`);let o=xf(e.map(f=>f.aabbI32));r(`Base lat=${o.baseLat} lon=${o.baseLon} scale=2^${o.scalePow2}`);let i=Df(e,n);if(i.length>64)throw new Error(`Bucketing produced ${i.length} pages > PAGE_COUNT=${64}`);let s=i.filter(f=>f.length>0).length,l=i.map(f=>f.length),c=Math.max(...l),u=e.length/Math.max(1,s);r(`Bucketed into ${s}/${64} populated pages (max=${c}, avg=${u.toFixed(1)})`);let p=Tf(e,i,o);return r(`Emitted ${p.byteLength} bytes`),{buffer:p,stats:{...I2(e),populatedPages:s,maxPageSize:c}}}function I2(e){let t=new Map,r=new Map,a=0,n={WP:0,POLY:0,ROUTE:0};for(let o of e){let i=o.type===0?"WP":o.type===1?"POLY":"ROUTE";n[i]++,a+=o.points.length;for(let s of o.zones){let l=s<256?t:r,c=s<256?s:s-256;l.set(c,(l.get(c)||0)+1)}}return{total:e.length,byType:n,pointTotal:a,zoneHistA:t,zoneHistB:r}}function fl(e){let t=new DataView(e),r=new Uint8Array(e),a=e.byteLength,n=t.getUint32(0,!0);if(n!==827218514)throw new Error(`Bad magic: 0x${n.toString(16)} (expected 0x${827218514 .toString(16)} "RZN1")`);let o=t.getUint16(4,!0),i=t.getUint16(6,!0),s=t.getUint32(8,!0),l=t.getUint32(12,!0),c=t.getUint16(16,!0),u=t.getUint8(18),p=t.getInt32(20,!0),f=t.getInt32(24,!0),h=t.getUint8(28);if(s!==a)throw new Error(`Size mismatch: header=${s}, actual=${a}`);let v=new Uint8Array(e.slice(0));v[12]=v[13]=v[14]=v[15]=0;let b=ri(v,0,a-4),x=b===l,d=t.getUint32(a-4,!0)===l,m=[],w=0,A=0,R=new Set;for(let T=0;T<64;T++){let y=32+T*20,g=t.getUint32(y+8,!0),E=t.getUint8(y+12);if(E===0||g===0){m.push({index:T,elements:0,size:0});continue}let _=t.getUint16(g,!0);if(_!==52753)throw new Error(`Page ${T}: bad magic 0x${_.toString(16)} at offset ${g}`);let N=t.getUint8(g+2);if(N!==E)throw new Error(`Page ${T}: count mismatch (table=${E}, prefix=${N})`);let B=g+4,F=[];for(let Te=0;Te<E;Te++){let Ue=B+Te*20,k=t.getUint32(Ue+8,!0),te=t.getUint8(Ue+12),$e=t.getUint8(Ue+14),et=t.getUint16(Ue+16,!0),mu=[];for(let us=0;us<$e;us++){let hu=t.getUint16(k+2*us,!0);mu.push(hu),R.add(hu)}F.push({type:O2(te),pointCount:et,zones:mu}),w++,A+=et}let V=N2(t,T),se=(V===0?a-4:V)-g;m.push({index:T,elements:E,size:se,items:F})}let I=[...R].filter(T=>T<256).sort((T,y)=>T-y),D=[...R].filter(T=>T>=256).sort((T,y)=>T-y).map(T=>T-256);return{magic:"RZN1",version:o,flags:i,fileSize:a,declaredCrc:l,actualCrc:b,crcValid:x,footerValid:d,elemCount:c,totalElements:w,totalPoints:A,pageCount:u,baseLat:p,baseLon:f,scalePow2:h,zonesA:I,zonesB:D,pages:m}}function N2(e,t){for(let r=t+1;r<64;r++){let a=32+r*20,n=e.getUint32(a+8,!0);if(n!==0)return n}return 0}function O2(e){return e===0?"WP":e===1?"POLY":e===2?"ROUTE":`?(${e})`}var Gv=be($v(),1);var pD="http://www.opengis.net/kml/2.2",Qi=65535;function nu(e){let t=e<256?"ZNA":"ZNB",r=e<256?e:e-256;return r<=99?`${t}${String(r).padStart(2,"0")}`:null}function qv(e){let t=nu(e),r=e<256?"ZNA":"ZNB",a=e<256?e:e-256;return t?`rules use ${t}`:`geofence only, read with EVAL ${r}(${a})`}function zv(e){let t=[];for(let r of String(e??"").split(/[,;\s]+/)){let a=r.trim();if(a){if(!/^\d+$/.test(a)||Number(a)<0||Number(a)>511)throw new Error(`invalid zone id '${a}' (must be ${0}..${511})`);t.push(Number(a))}}return[...new Set(t)].sort((r,a)=>r-a)}var Wv=e=>String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),fD={nombre:"name",nome:"name",descripcion:"name",descripci\u00F3n:"name",latitud:"lat",latitude:"lat",longitud:"lon",longitude:"lon",lng:"lon",long:"lon",radio:"radius_m",radio_m:"radius_m",raio:"radius_m",radius:"radius_m",zonas:"zones",zona:"zones",zone:"zones"};function Xv(e){let t=String(e??"").replace(/^\uFEFF/,"").split(/\r?\n/,1)[0];return t.includes(";")?";":t.includes(" ")?" ":","}function mD(e){let t=String(e??"").replace(/^\uFEFF/,""),r=Xv(t),a=[],n=[],o="",i=!1;for(let s=0;s<t.length;s++){let l=t[s];i?l==='"'&&t[s+1]==='"'?(o+='"',s++):l==='"'?i=!1:o+=l:l==='"'?i=!0:l===r?(n.push(o),o=""):l===`
26
+ `||l==="\r"?(l==="\r"&&t[s+1]===`
27
+ `&&s++,n.push(o),a.push(n),n=[],o=""):o+=l}return(o!==""||n.length)&&(n.push(o),a.push(n)),a.filter(s=>s.some(l=>l.trim()!==""))}function Hv(e,t={}){let r=t.radius??100,a=t.zone??null;if(a!==null&&(a<0||a>511))throw new Error(`--zone must be ${0}..${511}`);let n=mD(e),o=Xv(e);if(n.length<2)throw new Error("CSV needs a header row and at least one place");let i={};n[0].forEach((u,p)=>{let f=fD[u.trim().toLowerCase()]??u.trim().toLowerCase();f in i||(i[f]=p)});for(let u of["name","lat","lon"])if(!(u in i))throw new Error(`missing column '${u}'. Found: ${Object.keys(i).join(", ")||"none"}`);let s=[];if(n.slice(1).forEach((u,p)=>{let f=p+2;if(u.length!==n[0].length)throw new Error(`row ${f}: ${u.length} fields, the header has ${n[0].length}`+(o===","&&u.length>n[0].length?" (decimal comma in a ',' CSV? save with ';' or use a decimal point)":""));let h=d=>d in i?(u[i[d]]??"").trim():"",v=parseFloat(h("lat").replace(",",".")),b=parseFloat(h("lon").replace(",","."));if(!Number.isFinite(v)||!Number.isFinite(b))throw new Error(`row ${f}: lat/lon must be decimal degrees`);if(Math.abs(v)>90||Math.abs(b)>180)throw new Error(`row ${f}: lat/lon out of range (${v}, ${b}). Are columns swapped?`);let x=h("radius_m")||String(r);if(!/^\d+$/.test(x)||Number(x)<=0||Number(x)>Qi)throw new Error(`row ${f}: radius_m must be an integer 1..${Qi} (meters, no decimals)`);let C;try{C=h("zones")?zv(h("zones")):a!==null?[a]:[]}catch(d){throw new Error(`row ${f}: ${d.message}`)}if(!C.length)throw new Error(`row ${f}: no zone. Add a 'zones' column or pass --zone`);s.push({name:h("name")||`place ${f-1}`,lat:v,lon:b,radius:Number(x),zones:C})}),s.length>4096)throw new Error(`${s.length} places; the device supports ${4096} per zones file`);let l=['<?xml version="1.0" encoding="UTF-8"?>',`<kml xmlns="${pD}"><Document>`,`<name>${Wv(t.title??"Rinho zones")}</name>`];for(let u of s)l.push(`<Placemark><name>${Wv(u.name)}</name><ExtendedData><Data name="type"><value>WP</value></Data><Data name="zones"><value>${u.zones.join(",")}</value></Data><Data name="radius_m"><value>${u.radius}</value></Data></ExtendedData><Point><coordinates>${u.lon.toFixed(6)},${u.lat.toFixed(6)},0</coordinates></Point></Placemark>`);l.push("</Document></kml>");let c=[...new Set(s.flatMap(u=>u.zones))].sort((u,p)=>u-p);return{kml:l.join(`
28
+ `)+`
29
+ `,places:s.length,zones:c,log:c.map(u=>`zone ${u}: ${qv(u)}`)}}var hD=e=>e.length>=4&&e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4;async function Ji(e){let t=e instanceof Uint8Array?e:new Uint8Array(e);if(!hD(t))return new TextDecoder("utf-8").decode(t);let r=await Gv.default.loadAsync(t),a=Object.keys(r.files).filter(n=>/\.kml$/i.test(n)&&!r.files[n].dir);if(!a.length)throw new Error("the KMZ has no .kml inside");if(a.length>1&&!a.includes("doc.kml"))throw new Error(`the KMZ has ${a.length} .kml files and no doc.kml: ${a.join(", ")}. Unzip it and pass the one you want`);return r.file(a.includes("doc.kml")?"doc.kml":a[0]).async("string")}var gD=new Set(["Point","LineString","Polygon"]),ro=e=>e.localName||e.nodeName.replace(/^.*:/,""),es=e=>Array.from(e.childNodes??[]).filter(t=>t.nodeType===1),Rr=(e,t)=>es(e).find(r=>ro(r)===t)??null;function au(e){let t=new Set(Array.from(e.getElementsByTagName("*")).map(ro).filter(r=>gD.has(r)));return t.has("Polygon")?"POLY":t.has("LineString")?"ROUTE":t.has("Point")?"WP":null}function Zi(e,t){let r=Rr(e,"ExtendedData");if(!r)return null;for(let a of es(r))if(ro(a)==="Data"&&a.getAttribute("name")===t){let n=Rr(a,"value");return n?(n.textContent||"").trim():""}return null}function Vv(e,t,r,a){let n=t.namespaceURI,o=c=>n?e.createElementNS(n,c):e.createElement(c),i=Rr(t,"ExtendedData");i||(i=o("ExtendedData"),t.appendChild(i));for(let c of es(i))if(ro(c)==="Data"&&c.getAttribute("name")===r){let u=Rr(c,"value");u||(u=o("value"),c.appendChild(u)),u.textContent=a;return}let s=o("Data");s.setAttribute("name",r);let l=o("value");l.textContent=a,s.appendChild(l),i.appendChild(s)}function*Yi(e,t=null){for(let r of es(e)){let a=ro(r);if(a==="Folder"){let n=Rr(r,"name");yield*Yi(r,(n?.textContent||"").trim()||"(unnamed folder)")}else a==="Placemark"?yield{pm:r,folder:t}:yield*Yi(r,t)}}function ou(e,t){let r=new t().parseFromString(e,"application/xml");return[...Yi(r.documentElement)].map(({pm:a,folder:n})=>({name:(Rr(a,"name")?.textContent||"").trim()||"(no name)",type:au(a),folder:n,zones:Zi(a,"zones")}))}function jv(e,t,r,a){let{zone:n=null,byFolder:o=!1,start:i=0,radius:s=null,overwrite:l=!1}=t;if(n!==null&&(n<0||n>511))throw new Error(`--zone must be ${0}..${511}`);if(n!==null&&o)throw new Error("--zone and --by-folder are exclusive: one zone for all, or one zone per folder");if(s!==null&&(s<1||s>Qi))throw new Error(`--radius must be 1..${Qi} meters`);let c=new r().parseFromString(e,"application/xml"),u=[...Yi(c.documentElement)];if(!u.length)throw new Error("no <Placemark> in the file");let p={};if(o){for(let{pm:d,folder:m}of u){if(!au(d)||Zi(d,"zones")&&!l)continue;let w=m??"(no folder)";w in p||(p[w]=i+Object.keys(p).length)}if(Object.keys(p).length&&Math.max(...Object.values(p))>511)throw new Error(`too many folders for zone ids starting at ${i}`)}let f=[],h={},v=0,b=0;for(let{pm:d,folder:m}of u){let w=(Rr(d,"name")?.textContent||"").trim()||"(no name)",A=au(d);if(!A){f.push(w);continue}b++;let R=Zi(d,"zones"),I;if(R&&!l)I=R;else if(o)I=String(p[m??"(no folder)"]);else if(n!==null)I=String(n);else{v++;continue}Vv(c,d,"zones",I),A==="WP"&&s&&Zi(d,"radius_m")===null&&Vv(c,d,"radius_m",String(s));for(let D of zv(I))h[D]=(h[D]??0)+1}if(v)throw new Error(`${v} Placemark(s) have no zones. Pass --zone N or --by-folder`);let x=[];for(let[d,m]of Object.entries(p))x.push(`folder '${d}' -> zone ${m}`);for(let d of Object.keys(h).map(Number).sort((m,w)=>m-w))x.push(`zone ${d}: ${h[d]} shape(s), ${qv(d)}`);let C=new a().serializeToString(c);return{kml:(C.startsWith("<?xml")?C:`<?xml version="1.0" encoding="UTF-8"?>
30
+ `+C)+`
31
+ `,shapes:b,ignored:f,folders:p,used:h,log:x}}import ao from"node:fs";import ts from"node:path";var iu=e=>{let t=0;for(let a=0;a<e.length;a++)t=t^e.charCodeAt(a);let r=t.toString(16).toUpperCase();return r.length<2&&(r=("00"+r).slice(-2)),r},Kv=(e,t,r)=>{let a=">"+e;return r&&r!==""&&(a+=";#"+t.toString(16).toUpperCase(),a+=";ID="+r+";*",a+=iu(a)),a+="<",a};var vD=115200,lu=4e3,cu=1e4,bD=3e3,SD=18e4,Zv=6e4,Qv="1.09.21",CD={ZE:"zero",SP:"spider",SM:"smart"},uu="This copy of rinho.mjs has no serial driver. Run the same command with the rinho-serial package: `npx -y rinho-serial <same arguments>` (Node.js 18+, downloads the driver once), or install it: `npm install -g rinho-serial` and then `rinho-serial <same arguments>`.",xD=[[/^QBUS/,"dumps every queued report over the serial port"],[/^QDL[+\-C]/,"streams or cancels the datalog download"],[/^QWIFN/,"active WiFi scan: it blocks the channel for seconds"],[/^QMEM/,"private diagnostic command (Rinho support only)"],[/^QPW/,"the password login is done by this tool from RINHO_PASSWORD; it is never sent or printed on request"]],yD=[[/^[SQ]PW/i,"password command"],[/^SFACTORY/i,"factory reset"],[/^SRL(\*\*|[0-9A-F]{2})D\b/i,"erases rules"],[/^SRESET/i,"reboots the device"],[/^SCRM/i,"changes the modem state"],[/^S(CFW|FRM|FTP|FOTA|OTA)/i,"firmware update"],[/^(AT|AX|DB)\b/i,"private diagnostic command"],[/^SSS(XP|GC|CELPWR|GPSPWR|WIFIPWR|BTHPWR)/i,"momentary action (output or power switch): not configuration"],[/^SGC\d/i,"engine-cut action"],[/^(CBU|SDLC|SDLF|SZONESD|SZONES\*\*D)/i,"deletes queued data or the zones file"]],wD=/^([SQ]PW|SFACTORY|S(CFW|FRM|FTP|FOTA|OTA)|AT\b|AX\b|DB\b)/i,AD=/SSSXP\d{2}|SCXXP\d{2}|SGC[ED],|\{SGC|SSSGC/i;function oe(e){return String(e??"").replace(/([RS]CXAP[N\d]\s*[^,;<]*,[^,;<]*,)[^;<]*/g,"$1****").replace(/([RS]WL)\s*[^;<\s][^;<]*/g,"$1 ****").replace(/([QSR]PW)(?!OK\b|ERR\b)[^;<]*/g,"$1****")}var Yv=e=>e.toString(16).toUpperCase().padStart(4,"0"),_r=e=>String(e??"").trim().replace(/^>/,"").replace(/<$/,""),du=e=>/^[SQ]([A-Z]+)/.exec(e)?.[1]??"";function su(e){let t=String(e??"").trim(),r=/^>(.*?)(?:;#([0-9A-Fa-f]{4}))?(?:;ID=([^;<]*))?(?:;\*([0-9A-Fa-f]{2}))?<$/s.exec(t);if(!r)return null;let[,a,n,o,i]=r,s=null;return i&&(s=iu(t.slice(0,t.lastIndexOf(";*")+2))===i.toUpperCase()),{raw:t,answer:a,msg:n?n.toUpperCase():null,id:o??null,checksumOk:s}}function ED(e){let t=_r(e);if(!/^S[A-Z]/.test(t))return null;let r=la(`>${t}<`);return!r||r===t||!r.startsWith("S")?null:"Q"+r.slice(1)}function DD(e){for(let[t,r]of xD)if(t.test(e))return r;return null}function TD(e){for(let[t,r]of yD)if(t.test(e))return r;return null}var no=e=>new Promise((t,r)=>e((a,n)=>a?r(a instanceof Error?a:new Error(String(a))):t(n))),rr=e=>new Promise(t=>setTimeout(t,e));async function e0(e,t,{baudRate:r=vD}={}){let a=new e({path:t,baudRate:r,dataBits:8,stopBits:1,parity:"none",autoOpen:!1,hupcl:!1});await no(n=>a.open(n));try{await no(n=>a.set({dtr:!1,rts:!1},n))}catch{}return a}async function rs(e){if(!(!e||e.isOpen===!1))try{await no(t=>e.close(t))}catch{}}var as=class{constructor(t,{log:r=()=>{}}={}){this.port=t,this.log=r,this.buf="",this.waiters=new Set,this.unsolicited=[],this.id=null,this.msg=32768,t.on("data",a=>this.#t(a))}#t(t){this.buf+=Buffer.isBuffer(t)?t.toString("utf8"):String(t);let r;for(;r=/\r?\n/.exec(this.buf);){let a=this.buf.slice(0,r.index);this.buf=this.buf.slice(r.index+r[0].length),a.trim()&&this.#e(a.trim())}if(/^>[^<]*<$/.test(this.buf.trim())){let a=this.buf.trim();this.buf="",this.#e(a)}}#e(t){this.log("RX",t);let r=su(t);for(let a of[...this.waiters])if(a.match(t,r)){this.waiters.delete(a),a.resolve({line:t,reply:r});return}this.unsolicited.push(t)}waitFor(t,r){return new Promise(a=>{let n={match:t,resolve:i=>{clearTimeout(o),a(i)}},o=setTimeout(()=>{this.waiters.delete(n),a(null)},r);this.waiters.add(n)})}async write(t){await no(r=>this.port.write(t,r)),typeof this.port.drain=="function"&&await no(r=>this.port.drain(r))}async exchange(t,{timeout:r=lu,numbered:a=!0}={}){let n=this.id&&a?this.msg:null;n!=null&&(this.msg=this.msg>=65535?32768:this.msg+1);let o=n!=null?Kv(t,n,this.id):`>${t}<`,i=du(t),s=n!=null?(h,v)=>v&&v.msg===Yv(n):(h,v)=>v&&v.answer.startsWith("R"+i),l=this.unsolicited.length,c=Date.now(),u=this.waitFor(s,r);this.log("TX",o),await this.write(o+`\r
32
+ `);let p=await u,f=!!p;if(!p){let h=this.unsolicited.slice(l).findIndex(v=>/^>R/.test(v)&&su(v));if(h>=0){let v=this.unsolicited.splice(l+h,1)[0];p={line:v,reply:su(v)},f=!1}}return p?.reply?.id&&!this.id&&(this.id=p.reply.id),{frame:o,sent:t,msg:n!=null?Yv(n):null,reply:p?.reply??null,line:p?.line??null,matched:f,elapsedMs:Date.now()-c}}waitMsg(t,r){return this.waitFor((a,n)=>n&&n.msg===t,r)}};async function t0(e,{password:t=process.env.RINHO_PASSWORD,timeout:r=bD}={}){let a=await e.exchange("QVR",{timeout:r,numbered:!1});if(a.reply||(a=await e.exchange("QVR",{timeout:r,numbered:!1})),!a.reply&&t){let s=await e.exchange(`QPW${t}`,{timeout:r,numbered:!1});if(!s.reply||!/^RPWOK/.test(s.reply.answer))return{ok:!1,error:"WRONG_PASSWORD",message:"The device did not accept the password in RINHO_PASSWORD (no RPWOK). Check it with the user; never ask them to paste it in the chat."};a=await e.exchange("QVR",{timeout:r,numbered:!1})}if(!a.reply)return{ok:!1,error:"NO_REPLY",message:`No answer to >QVR< on this port after ${r} ms x2. Check: the port name is the device's (ask the user, do not try others), the cable carries data, nothing else has the port open (close the configurator's monitor), 115200 bps. If the device has a password, the user must set it in the RINHO_PASSWORD environment variable: this tool sends the login itself and never prints it.`,unsolicited:e.unsolicited.slice(-5).map(oe)};let n=a.reply.answer,o=/\b(ZE|SP|SM)\b/.exec(n)?.[1]??null,i=/v(\d+\.\d+\.\d+(?:\.T\d+)?)/i.exec(n)?.[1]??null;return{ok:!0,id:e.id??a.reply.id??null,rvr:n,model:CD[o]??null,modelCode:o,firmware:i}}function RD(e,t){ao.mkdirSync(e,{recursive:!0});let r=ts.join(e,t),a=[];return ao.writeFileSync(r,`# rinho serial log ${new Date().toISOString()} (passwords masked)
33
+ `),{file:r,log:(o,i)=>{let s=`${new Date().toISOString()} ${o} ${oe(i)}`;a.push(s),ao.appendFileSync(r,s+`
34
+ `)},lines:a}}var La=()=>new Date().toISOString().replace(/[:.]/g,"-").slice(0,19);async function ns({PortImpl:e,port:t,baudRate:r,logDir:a,logName:n,password:o,handshakeTimeout:i,fn:s}){if(!e)return{ok:!1,error:"SERIAL_UNAVAILABLE",message:uu};if(!t)return{ok:!1,error:"USAGE",message:"A serial port is required (COM4, /dev/ttyUSB0, /dev/tty.usbserial-...). Ask the user which one the Rinho is on; never try other ports."};let{file:l,log:c}=RD(a??process.cwd(),n??`rinho-serial-${La()}.log`),u;try{u=await e0(e,t,{baudRate:r})}catch(f){return{ok:!1,error:"PORT_OPEN_FAILED",port:t,message:`Could not open ${t}: ${f.message}. Check the name (the user's, not another one), that it is plugged in, and that no other program (the configurator, a monitor) has it open.`,log:l}}let p=new as(u,{log:c});try{let f=await t0(p,{password:o,timeout:i});if(!f.ok)return{...f,port:t,log:l};let h={id:f.id,model:f.model,modelCode:f.modelCode,firmware:f.firmware,rvr:f.rvr},v=await s(p,h);return{port:t,device:h,...v,unsolicited:p.unsolicited.slice(-20).map(oe),log:l}}catch(f){return{ok:!1,error:"SERIAL_ERROR",port:t,message:String(f?.message??f),log:l}}finally{await rs(u)}}var os=e=>e.reply?{reply:oe(e.reply.answer),raw:oe(e.line),matched:e.matched,checksumOk:e.reply.checksumOk,elapsedMs:e.elapsedMs}:{reply:null,status:"no_reply",elapsedMs:e.elapsedMs};async function r0({commands:e,timeout:t=lu,...r}){let a=(e??[]).map(_r).filter(Boolean);if(!a.length)return{ok:!1,error:"USAGE",message:"Give at least one query, e.g. QVR QCEL QBU (with or without > <)."};let n=a.map(o=>{if(!/^Q[A-Z]/.test(o))return{command:o,reason:o.startsWith("S")||o.startsWith("C")||o.startsWith("G")?"not a query: configuration goes through `send` with a validated file; actions are not sent by this tool":"queries start with Q followed by upper-case letters"};let i=DD(o);return i?{command:o,reason:i}:null}).filter(Boolean);return n.length?{ok:!1,error:"QUERY_NOT_ALLOWED",commands:n,message:"Nothing was sent. Remove those commands and run again."}:ns({...r,logName:`rinho-query-${La()}.log`,fn:async o=>{let i=[];for(let s of a){let l=await o.exchange(s,{timeout:t});i.push({command:`>${s}<`,...os(l)}),await rr(50)}return{ok:i.every(s=>s.reply!==null),results:i}}})}async function a0({text:e,file:t=null,outputsConfirmed:r=!1,backupDir:a=null,timeout:n=cu,queryTimeout:o=lu,...i}){if(typeof e!="string"||!e.trim())return{ok:!1,error:"USAGE",message:"send needs the configuration file to send (the block you validated)."};let s=[];return e.split(/\r?\n/).forEach((l,c)=>{let u=_r(l.split("//")[0]);if(!u||!u.startsWith("S")&&!/^(AT|AX|DB)\b/i.test(u))return;let p=TD(u);p&&s.push({line:c+1,command:oe(l.trim()),reason:p})}),s.length?{ok:!1,error:"BLOCKED_COMMAND",blocked:s,message:"Nothing was sent. These lines are never sent by this tool: remove them (actions are sent one at a time by the user from the configurator or their platform; security commands are Rinho support)."}:ns({...i,logName:`rinho-send-${La()}.log`,fn:async(l,c)=>{let u=ti(e,{models:c.model?[c.model]:void 0,fw:c.rvr});if(u.error)return{ok:!1,error:u.error,message:u.message};let p=u.warnings.filter(D=>D.code==="FIRMWARE_TOO_OLD"),f={models:u.models,firmware:u.firmware,summary:u.summary,rejected:u.rejected,warnings:u.warnings};if(u.rejected.length)return{ok:!1,error:"VALIDATION_FAILED",validation:f,message:"Nothing was sent: the device would not accept (or the configurator would not keep) those lines. Fix them and run again."};if(p.length)return{ok:!1,error:"FIRMWARE_TOO_OLD",validation:f,message:`Nothing was sent: the device runs ${c.firmware} and some lines need a newer firmware (see warnings). Remove them, or update the firmware first (config.rinho.com.ar \u2192 Firmware \u2192 "Por cable", or Rinho support).`};let h=u.accepted.map(D=>({line:D.line,command:D.command}));if(!h.length)return{ok:!1,error:"NOTHING_TO_SEND",validation:f,message:"The file has no configuration lines."};let v=h.filter(D=>AD.test(D.command));if(v.length&&!r)return{ok:!1,error:"OUTPUTS_NEED_CONFIRMATION",lines:v,validation:f,message:"Nothing was sent. These lines drive a physical output (engine cut, siren, buzzer, relay). Tell the user exactly what each one switches and under which condition, get their explicit yes with the vehicle stopped, and run again with --outputs-confirmed."};let b=[...new Set(h.map(D=>ED(D.command)).filter(Boolean))],x={};for(let D of b)x[D]=await l.exchange(D,{timeout:o}),await rr(50);let C=a??process.cwd();ao.mkdirSync(C,{recursive:!0});let d=ts.join(C,`rinho-backup-${c.id??"device"}-${La()}.txt`);ao.writeFileSync(d,[`// Rinho backup before sending ${t??"the block"} - device ${c.id??"?"} (${c.model??"?"} ${c.firmware??"?"}) - ${new Date().toISOString()}`,"// Replies exactly as the device returned them. To restore a resource, turn its R into S, validate (rinho.mjs validate) and send.",...b.map(D=>x[D].reply?oe(x[D].line):`// >${D}<: no reply`),""].join(`
35
+ `));let m=[],w=null;for(let D=0;D<h.length;D++){let T=h[D],y=await l.exchange(_r(T.command),{timeout:n}),g={line:T.line,command:oe(T.command),...os(y)},E=y.reply?.answer??"";if(!y.reply){g.status="no_reply",m.push(g),w={line:T.line,reason:"no_reply",message:"The device did not answer: it rejected the line (CMDERR is silent) or stopped responding. Nothing after it was sent."};break}if(new RegExp(`^R${du(_r(T.command))}\\d*,?ERR`).test(E)||/^(RERR|ERROR)/.test(E)){g.status="error",m.push(g),w={line:T.line,reason:"error",reply:oe(E),message:"The device answered with an error. Nothing after it was sent."};break}g.status="ok",g.echoMatches=E.slice(1).startsWith(_r(T.command).slice(1).split(/[;,\s"]/)[0]),m.push(g),await rr(50)}let A=h.slice(m.length).map(D=>({line:D.line,command:oe(D.command)})),R=[];for(let D of b){let T=await l.exchange(D,{timeout:o});await rr(50),R.push({query:`>${D}<`,before:x[D].reply?oe(x[D].reply.answer):null,after:T.reply?oe(T.reply.answer):null,changed:(x[D].reply?.answer??null)!==(T.reply?.answer??null)})}let I=!w;return{ok:I,file:t,validation:{models:f.models,firmware:f.firmware,summary:f.summary,warnings:f.warnings},backup:d,sent:m,notSent:A,stoppedAt:w,readback:R,message:I?`${m.length} line(s) sent and answered. Compare before/after in readback; the backup of the previous values is in ${ts.basename(d)}.`:`Stopped at line ${w.line} (${w.reason}): ${m.length-1} line(s) were written before it and ${A.length} were not sent. The device keeps what was written; the previous values are in ${ts.basename(d)}.`}}})}async function n0({commands:e=[],text:t=null,confirmed:r=!1,unsafe:a=!1,timeout:n=cu,...o}){let s=[...t?t.split(/\r?\n/).map(u=>u.split("//")[0].trim()).filter(u=>/^>.*<$/.test(u)):[],...e].map(_r).filter(Boolean);if(!s.length)return{ok:!1,error:"USAGE",message:"run needs at least one command (quoted, with or without > <) or --file with framed lines."};let l=s.filter(u=>!/^[A-Za-z]/.test(u));if(l.length)return{ok:!1,error:"USAGE",message:`Not a command: ${l.join(", ")}`};let c=s.filter(u=>wD.test(u));return c.length&&!a?{ok:!1,error:"UNSAFE_COMMAND",commands:c.map(oe),message:"Nothing was sent. Password, factory-reset and firmware commands can lock or wipe the device: they are only sent with --unsafe, which the user themselves must ask for after you told them what it does. The skills never produce them."}:r?ns({...o,logName:`rinho-run-${La()}.log`,fn:async u=>{let p=[],f=null;for(let v=0;v<s.length;v++){let b=s[v],x=await u.exchange(b,{timeout:n}),C={command:oe(`>${b}<`),...os(x)},d=x.reply?.answer??"";if(!x.reply){C.status="no_reply",p.push(C),f={index:v,command:C.command,reason:"no_reply",message:"No answer: the device rejected it (CMDERR is silent), it is rebooting, or the command answers elsewhere. Nothing after it was sent."};break}if(new RegExp(`^R${du(b)}\\d*,?ERR`).test(d)||/^(RERR|ERROR)/.test(d)){C.status="error",p.push(C),f={index:v,command:C.command,reason:"error",reply:oe(d),message:"The device answered with an error. Nothing after it was sent."};break}C.status="ok",p.push(C),await rr(50)}let h=s.slice(p.length).map(v=>oe(`>${v}<`));return{ok:!f,sent:p,notSent:h,stoppedAt:f,message:f?`Stopped at ${f.command} (${f.reason}); ${h.length} command(s) not sent.`:`${p.length} command(s) sent and answered.`}}}):{ok:!1,error:"CONFIRMATION_REQUIRED",commands:s.map(u=>oe(`>${u}<`)),message:"Nothing was sent. run sends commands as they are, without validation or backup. Show the user exactly this list and what each command does on the device, get their explicit yes, and run again with --confirmed."}}var Jv=e=>{let t=/^RZMODE,(\d+),(\d+),(\d+),(\d+)/.exec(e??"");return t?{enabled:t[1]==="1",fraction:+t[2],logSectors:+t[3],zoneSectors:+t[4]}:null},_D=e=>{let t=/^RDLOK(\d+)\s+(\d+)/.exec(e??"");return t?{total:+t[1],pending:+t[2]}:null};async function o0({url:e,fraction:t=null,enable:r=!1,forceLoseLog:a=!1,timeout:n=SD,...o}){if(!/^http:\/\/\S+$/i.test(e??""))return{ok:!1,error:"ZONES_URL_MUST_BE_HTTP",message:"The device downloads over plain HTTP (no https, no redirects). Give the full http://host/path/zones.bin URL."};if(t!=null&&![2,4,8,16].includes(Number(t)))return{ok:!1,error:"USAGE",message:"--fraction must be 2, 4, 8 or 16."};let i=[],s=(l,c)=>(i.push({step:l,...os(c)}),c);return ns({...o,logName:`rinho-zones-${La()}.log`,fn:async(l,c)=>{let u=l;try{return await p()}finally{u!==l&&await rs(u.port)}async function p(){if(c.firmware&&!il(`v${c.firmware}`,Qv))return{ok:!1,error:"FIRMWARE_TOO_OLD",steps:i,message:`Zones need firmware ${Qv} or later; the device runs ${c.firmware}. Update it first (config.rinho.com.ar \u2192 Firmware \u2192 "Por cable", or Rinho support).`};let f=Jv(s("QZMODE",await u.exchange("QZMODE")).reply?.answer);if(!f)return{ok:!1,error:"NO_ZONES_SUPPORT",steps:i,message:"QZMODE got no valid answer: this firmware has no zones module."};if(f.enabled){if(t!=null&&Number(t)!==f.fraction)return{ok:!1,error:"FRACTION_CHANGE_NEEDS_TWO_REBOOTS",state:f,steps:i,message:`Zones are already on with fraction ${f.fraction}. Changing it means SZFRAC${t}, SZMODE0 and SZMODE1 (two reboots): do it with the user from the configurator, or run again without --fraction to load with the current one.`}}else{if(!r)return{ok:!1,error:"ZONES_DISABLED",state:f,steps:i,message:"Zones are off on this device. Enabling them (SZMODE1) REBOOTS the device and needs the internal log drained. Explain that to the user and, with their ok, run again with --enable (and --fraction N to reserve memory: 16 < 50 KB, 8 < 200 KB, 4 < 500 KB, 2 bigger)."};let d=_D(s("QDL",await u.exchange("QDL")).reply?.answer);if(d&&d.pending>0&&!a)return{ok:!1,error:"LOG_NOT_EMPTY",state:f,pendingRecords:d.pending,steps:i,message:`The internal log still has ${d.pending} record(s) not sent. Enabling zones now would discard them. Wait until the device delivers them (QDL second number 0), or, only if the user accepts losing them, run again with --force-lose-log.`};if(t!=null){let A=s(`SZFRAC${t}`,await u.exchange(`SZFRAC${t}`));if(!A.reply||!/^RZFRAC/.test(A.reply.answer))return{ok:!1,error:"SZFRAC_FAILED",steps:i,message:"SZFRAC was not acknowledged. Stopped before enabling zones."}}let m=`SZMODE1${d&&d.pending>0?"F":""}`,w=s(m,await u.exchange(m));if(!w.reply||!/^RZMODE1/.test(w.reply.answer))return{ok:!1,error:"SZMODE_FAILED",steps:i,message:`SZMODE1 was not accepted (${oe(w.reply?.answer??"no reply")}). Zones stay off.`};if(/REBOOT/.test(w.reply.answer)){await rs(u.port);let A=Date.now()+Zv,R=null;for(await rr(5e3);Date.now()<A&&!R;)try{let I=await e0(o.PortImpl,o.port,{baudRate:o.baudRate}),D=new as(I,{log:u.log});D.id=null,(await t0(D,{password:o.password,timeout:o.handshakeTimeout})).ok?R=D:(await rs(I),await rr(2e3))}catch{await rr(2e3)}if(!R)return{ok:!1,error:"DEVICE_DID_NOT_COME_BACK",steps:i,message:`The device rebooted to enable zones but did not answer on ${o.port} within ${Zv/1e3} s. Check the port name (native USB ports can change) and run again without --enable.`};if(u=R,i.push({step:"reboot",reply:"device back online"}),f=Jv(s("QZMODE",await u.exchange("QZMODE")).reply?.answer),!f?.enabled)return{ok:!1,error:"ZONES_STILL_DISABLED",state:f,steps:i,message:"After the reboot QZMODE still says zones are off."}}}let h=s(`SZONES"${e}"`,await u.exchange(`SZONES"${e}"`,{timeout:cu}));if(!h.reply)return{ok:!1,error:"NO_REPLY",state:f,steps:i,message:"SZONES got no answer."};if(!/^RZONES,START/.test(h.reply.answer))return{ok:!1,error:"ZONES_DOWNLOAD_REFUSED",state:f,steps:i,reply:oe(h.reply.answer),message:"The device refused to start the download (busy_or_nomem = not enough space: smaller --fraction; bad_url_format = check the URL; mode_off = zones are off)."};let v=h.msg?await u.waitMsg(h.msg,n):await u.waitFor((d,m)=>m&&/^RZONES,(OK|ERR|CANCELED)/.test(m.answer),n);if(i.push({step:"download",reply:v?oe(v.reply.answer):null,...v?{}:{status:"no_reply"}}),!v)return{ok:!1,error:"ZONES_DOWNLOAD_TIMEOUT",state:f,steps:i,message:`No RZONES,OK within ${n/1e3} s. Check that the URL answers 200 over plain HTTP from the internet (curl -I) and that the device has data (QCEL, QBU), then query >QZONES<.`};let b=/^RZONES,OK/.test(v.reply.answer),x=s("QZONES",await u.exchange("QZONES")),C=/elem=(\d+)/.exec(v.reply.answer)?.[1];return{ok:b,state:f,steps:i,loaded:x.reply?oe(x.reply.answer):null,elements:C?Number(C):null,message:b?`Zones file loaded: ${C??"?"} shape(s). Compare with the number of shapes in zones.bin (rinho.mjs zones inspect).`:`Download failed: ${oe(v.reply.answer)}.`}}}})}var ss="fe00d56c1440",fu="https://config.rinho.com.ar/skills/version.json",ID="https://config.rinho.com.ar/skills/index.html",je=["Usage:"," node rinho.mjs validate <file.txt | -> [--model zero,spider,smart] [--fw 1.09.28.T50] [--offline]",' node rinho.mjs explain "<command>" [--model zero]',' node rinho.mjs zones from-csv <places.csv> -o zones.kml [--zone N] [--radius 100] [--title "..."]'," node rinho.mjs zones assign <in.kml|in.kmz> -o zones.kml (--zone N | --by-folder [--start N]) [--radius N] [--overwrite]"," node rinho.mjs zones list <in.kml|in.kmz>"," node rinho.mjs zones build <zones.kml> -o zones.bin"," node rinho.mjs zones inspect <zones.bin>"," node rinho.mjs version","Serial port (the port the user names, 115200 8N1; needs the serialport driver: npx -y rinho-serial ...):"," node rinho.mjs ports list serial ports (opens none)"," node rinho.mjs query <port> <Q...> [<Q...> ...] read-only queries, e.g. query COM4 QVR QCEL QBU"," node rinho.mjs send <port> <config.txt> [--outputs-confirmed] [--backup-dir DIR] [--timeout ms]",' node rinho.mjs run <port> "<cmd>" ["<cmd>" ...] [--file cmds.txt] --confirmed [--unsafe] any command as is (actions, erasers)'," node rinho.mjs zones load <port> --url http://host/zones.bin [--enable] [--fraction 2|4|8|16] [--force-lose-log]"].join(`
36
+ `),i0={"--model":"model","--models":"model","--fw":"fw","-o":"output","--output":"output","--zone":"zone","--radius":"radius","--title":"title","--start":"start","--url":"url","--fraction":"fraction","--backup-dir":"backupDir","--timeout":"timeout","--baud":"baud","--file":"file"},s0={"--offline":"offline","--by-folder":"byFolder","--overwrite":"overwrite","--outputs-confirmed":"outputsConfirmed","--enable":"enable","--force-lose-log":"forceLoseLog","--confirmed":"confirmed","--unsafe":"unsafe","-h":"help","--help":"help"};function ND(e){let t={_:[],offline:!1};for(let r=0;r<e.length;r++){let a=e[r];if(a in s0){t[s0[a]]=!0;continue}let n=a.startsWith("--")&&a.includes("=")?a.split(/=(.*)/s):null,o=n?n[0]:a;if(o in i0){let i=n?n[1]:e[++r];if(i===void 0||i.startsWith("-")&&i!=="-")throw new Error(`${o} needs a value`);t[i0[o]]=i;continue}if(a.startsWith("-")&&a!=="-")throw new Error(`unknown option ${a}`);t._.push(a)}return t}async function ls({offline:e=!1,build:t=ss,url:r=fu,fetchImpl:a=globalThis.fetch}={}){if(e||process.env.RINHO_SKILL_OFFLINE==="1"||t==="dev"||typeof a!="function")return null;try{let n=await a(r,{signal:AbortSignal.timeout(1500)});if(!n.ok)return null;let o=await n.json(),i=o?.cli?.build??o?.validator?.build,s=typeof o?.install=="string"&&o.install.startsWith("https://config.rinho.com.ar/")?o.install:ID;if(typeof i=="string"&&i&&i!==t)return`This rinho CLI (build ${t}) is outdated: the configurator now uses build ${i}. Tell the user that a newer skill is available at ${s}. Do not download or replace files yourself.`}catch{}return null}async function OD(e){if(e.offline||process.env.RINHO_SKILL_OFFLINE==="1"||ss==="dev")return{checked:!1,reason:"offline"};try{let t=await fetch(fu,{signal:AbortSignal.timeout(1500)});if(!t.ok)return{checked:!1,reason:`HTTP ${t.status}`};let r=await t.json();return{checked:!0,latest:r?.cli?.build??r?.validator?.build??null,notice:await ls(e)}}catch{return{checked:!1,reason:"unreachable"}}}function l0(e){let t={log:console.log,warn:console.warn,info:console.info,debug:console.debug};console.log=console.warn=console.info=console.debug=()=>{};try{return e()}finally{Object.assign(console,t)}}var Ir=(e,t,{min:r=-1/0,max:a=1/0,allowNull:n=!1}={})=>{if(e==null||e===""){if(n)return null;throw new Error(`${t} is required`)}let o=Number(e);if(!Number.isInteger(o)||o<r||o>a)throw new Error(`${t} must be an integer${r!==-1/0?` ${r}..${a}`:""}`);return o},is=e=>e==="-"?Fa.readFileSync(0):Fa.readFileSync(e),cs=e=>is(e).toString("utf8");async function PD(e,t,r){if(e==="load")return d0("zones load",t,r);let[a]=t._;if(!e||!a)return process.stderr.write(je+`
37
+ `),2;switch(e){case"from-csv":{let n=Hv(cs(a),{radius:Ir(t.radius??100,"--radius",{min:1}),zone:Ir(t.zone,"--zone",{min:0,max:511,allowNull:!0}),title:t.title}),o=t.output??"zones.kml";return Fa.writeFileSync(o,n.kml),r({ok:!0,output:o,places:n.places,zones:n.zones.map(pu),log:n.log}),0}case"list":{let n=ou(await Ji(is(a)),Nr.DOMParser);return r({ok:!0,placemarks:n.length,items:n}),0}case"assign":{let n=jv(await Ji(is(a)),{zone:Ir(t.zone,"--zone",{min:0,max:511,allowNull:!0}),byFolder:!!t.byFolder,start:Ir(t.start??0,"--start",{min:0,max:511}),radius:Ir(t.radius,"--radius",{min:1,allowNull:!0}),overwrite:!!t.overwrite},Nr.DOMParser,Nr.XMLSerializer),o=t.output??"zones.kml";return Fa.writeFileSync(o,n.kml),r({ok:!0,output:o,shapes:n.shapes,ignored:n.ignored,folders:n.folders,zones:Object.keys(n.used).map(Number).sort((i,s)=>i-s).map(i=>({...pu(i),shapes:n.used[i]})),log:n.log}),0}case"build":{let n=[];globalThis.DOMParser=globalThis.DOMParser??Nr.DOMParser;let o=await Ji(is(a)),i=ou(o,Nr.DOMParser).filter(f=>f.type&&!f.zones);if(i.length)throw new Error(`${i.length} shape(s) without zones: ${i.slice(0,5).map(f=>f.name).join(", ")}${i.length>5?", ...":""}. Assign them first: rinho.mjs zones assign <file> -o zones.kml --zone N | --by-folder`);let{buffer:s,stats:l}=Rf(o,{maxElements:4096,pageSize:64},f=>n.push(f)),c=t.output??"zones.bin";Fa.writeFileSync(c,Buffer.from(s));let u=fl(s),p=u0(u);if(!l.total||!p.length)throw new Error("the file has no usable shapes with zones");return r({ok:u.crcValid&&u.footerValid,output:c,bytes:s.byteLength,elements:l.total,byType:l.byType,crc:c0(u.declaredCrc),zones:p,log:n}),u.crcValid&&u.footerValid?0:1}case"inspect":{let n=Fa.readFileSync(a),o=fl(n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)),i=o.crcValid&&o.footerValid,s=(o.pages??[]).flatMap(l=>l.items??[]).map(l=>({name:l.name,type:l.type,zones:l.zones,points:l.pointCount??l.points}));return r({ok:i,bytes:n.length,magic:o.magic,version:o.version,elements:o.elemCount,pages:o.pageCount,crc:c0(o.declaredCrc),crcValid:i,zones:u0(o),shapes:s}),i?0:1}default:return process.stderr.write(je+`
38
+ `),2}}var pu=e=>({id:e,ruleToken:nu(e),eval:`${e<256?"ZNA":"ZNB"}(${e<256?e:e-256})`}),c0=e=>"0x"+(e>>>0).toString(16).toUpperCase().padStart(8,"0");function u0(e){return[...e.zonesA??[],...(e.zonesB??[]).map(r=>r+256)].sort((r,a)=>r-a).map(pu)}var kD=["from-csv","assign","list","build","inspect"];async function MD(e=t=>import(t)){try{return(await e("serialport")).SerialPort??null}catch{return null}}async function d0(e,t,r){let a=await MD();if(!a)return r({ok:!1,error:"SERIAL_UNAVAILABLE",message:uu}),1;let n={PortImpl:a,port:t._[0],baudRate:t.baud?Ir(t.baud,"--baud",{min:300}):void 0},o=t.timeout?Ir(t.timeout,"--timeout",{min:100}):void 0,i;if(e==="ports"){let l;try{l=await a.list()}catch(c){return r({ok:!1,error:"PORT_LIST_FAILED",message:`Could not list serial ports (${c.message}). Ask the user for the port name (Device Manager on Windows, ls /dev/tty* on Linux/macOS) and use it directly.`}),1}i={ok:!0,ports:l.map(c=>({path:c.path,manufacturer:c.manufacturer,serialNumber:c.serialNumber,vendorId:c.vendorId,productId:c.productId})),note:"Listing opens no port. Ask the user which one the Rinho is on and use only that one."}}else if(e==="query"){if(t._.length<2)return r({ok:!1,error:"USAGE",message:"query needs the port and at least one query: query COM4 QVR QCEL QBU",usage:je}),2;i=await r0({...n,commands:t._.slice(1),timeout:o})}else if(e==="send"){if(t._.length!==2)return r({ok:!1,error:"USAGE",message:"send needs the port and one file: send COM4 config.txt",usage:je}),2;i=await a0({...n,file:t._[1],text:cs(t._[1]),outputsConfirmed:!!t.outputsConfirmed,backupDir:t.backupDir??null,timeout:o})}else if(e==="run"){if(t._.length<1||t._.length<2&&!t.file)return r({ok:!1,error:"USAGE",message:'run needs the port and at least one command (quoted) or --file: run COM4 ">SSSXP0011<" --confirmed',usage:je}),2;i=await n0({...n,commands:t._.slice(1),text:t.file?cs(t.file):null,confirmed:!!t.confirmed,unsafe:!!t.unsafe,timeout:o})}else{if(t._.length!==1||!t.url)return r({ok:!1,error:"USAGE",message:"zones load needs the port and --url http://host/zones.bin",usage:je}),2;i=await o0({...n,url:t.url,fraction:t.fraction??null,enable:!!t.enable,forceLoseLog:!!t.forceLoseLog,timeout:o})}let s=await ls(t);return r(s?{...i,notice:s}:i),i.error==="USAGE"?2:i.ok?0:1}async function p0(e=process.argv.slice(2)){let t=o=>process.stdout.write(JSON.stringify(o,null,2)+`
39
+ `),r;try{r=ND(e)}catch(o){return t({ok:!1,error:"USAGE",message:o.message,usage:je}),2}if(r.help)return process.stdout.write(je+`
40
+ `),0;if(!r._.length)return process.stderr.write(je+`
41
+ `),2;let[a,...n]=r._;if(kD.includes(a))return t({ok:!1,error:"USAGE",message:`'${a}' is a zones subcommand: node rinho.mjs zones ${a} ...`,usage:je}),2;["validate","explain","zones","version","ports","query","send","run"].includes(a)||(n=[a,...n],a="validate");try{if(a==="version")return t({build:ss,manifest:fu,...await OD(r)}),0;if(a==="explain"){if(n.length!==1)return t({ok:!1,error:"USAGE",message:n.length?"explain takes exactly one command, quoted":"explain needs a command",usage:je}),2;let c=n[0],u=l0(()=>Cf(c,{models:r.model})),p=await ls(r);return t(p?{...u,notice:p}:u),u?.error?1:0}if(a==="zones"){let[c,...u]=n;return await PD(c,{...r,_:u},t)}if(a==="ports"||a==="query"||a==="send"||a==="run")return await d0(a,{...r,_:n},t);let[o]=n;if(!o)return process.stderr.write(je+`
42
+ `),2;let i=cs(o),s=l0(()=>ti(i,{models:r.model,fw:r.fw})),l=await ls(r);return t({...s,build:ss,...l?{notice:l}:{}}),s.error?2:s.ok?0:1}catch(o){return t({ok:!1,error:"INPUT_ERROR",message:String(o?.message??o)}),2}}p0().then(e=>{process.exitCode=e});