UNPKG

@w2a-iiot/raw-javascript-parsers

Version:

This packages contain the raw built javascript parsers for WIKA's IIoT devices.

1 lines 56.4 kB
function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t,n){return t=o(t),function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],o(e).constructor):t.apply(e,n))}function n(e,t,r){return n=m()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o},n.apply(null,arguments)}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],s=!0,i=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||f(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||f(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function f(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}function p(e){var t="function"==typeof Map?new Map:void 0;return p=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return n(e,arguments,o(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),u(a,e)},p(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}var y=Object.getOwnPropertyNames,h=function(e,t){return function(){return t||(0,e[y(e)[0]])((t={exports:{}}).exports,t),t.exports}},b=h({"../../node_modules/.pnpm/es7-array.prototype.includes@3.0.0/node_modules/es7-array.prototype.includes/index.js":function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var o,a,s=0|t,i=Math.max(s>=0?s:r-Math.abs(s),0);for(;i<r;){if((o=n[i])===(a=e)||"number"==typeof o&&"number"==typeof a&&isNaN(o)&&isNaN(a))return!0;i++}return!1}})}}),v=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-integer/is-implemented.js":function(e,t){t.exports=function(){var e=Number.isInteger;return"function"==typeof e&&(!e("23")&&e(34)&&!e(32.34))}}}),g=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-integer/shim.js":function(e,t){t.exports=function(e){return"number"==typeof e&&e%1==0}}}),_=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-integer/implement.js":function(){v()()||Object.defineProperty(Number,"isInteger",{value:g(),configurable:!0,enumerable:!1,writable:!0})}}),x=h({"../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/is-implemented.js":function(e,t){t.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":d(globalThis))&&(!!globalThis&&globalThis.Array===Array)}}}),j=h({"../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/implementation.js":function(e,t){var n=function(){if("object"===("undefined"==typeof self?"undefined":d(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":d(window))&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()}}),w=h({"../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/index.js":function(e,t){t.exports=x()()?globalThis:j()}}),O=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-implemented.js":function(e,t){var n=w(),r={object:!0,symbol:!0};t.exports=function(){var e,t=n.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!r[d(t.iterator)]&&(!!r[d(t.toPrimitive)]&&!!r[d(t.toStringTag)])}}}),S=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/value/is.js":function(e,t){t.exports=function(e){return null!=e}}}),T=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/object/is.js":function(e,t){var n=S(),r={object:!0,function:!0,undefined:!0};t.exports=function(e){return!!n(e)&&hasOwnProperty.call(r,void 0===e?"undefined":d(e))}}}),I=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/prototype/is.js":function(e,t){var n=T();t.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}}}),P=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/function/is.js":function(e,t){var n=I();t.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}}}),A=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/is.js":function(e,t){var n=P(),r=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(e){return!!n(e)&&!r.test(o.call(e))}}}),k=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/is-implemented.js":function(e,t){t.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}}}),D=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/is-implemented.js":function(e,t){t.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}}}),E=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/noop.js":function(e,t){t.exports=function(){}}}),N=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-value.js":function(e,t){var n=E()();t.exports=function(e){return e!==n&&null!==e}}}),W=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/shim.js":function(e,t){var n=N(),r=Object.keys;t.exports=function(e){return r(n(e)?Object(e):e)}}}),C=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/index.js":function(e,t){t.exports=D()()?Object.keys:W()}}),F=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-value.js":function(e,t){var n=N();t.exports=function(e){if(!n(e))throw new TypeError("Cannot use null or undefined");return e}}}),M=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/shim.js":function(e,t){var n=C(),r=F(),o=Math.max;t.exports=function(e,t){var a,s,i,u=o(arguments.length,2);for(e=Object(r(e)),i=function(n){try{e[n]=t[n]}catch(e){a||(a=e)}},s=1;s<u;++s)n(t=arguments[s]).forEach(i);if(void 0!==a)throw a;return e}}}),R=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/index.js":function(e,t){t.exports=k()()?Object.assign:M()}}),U=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/normalize-options.js":function(e,t){var n=N(),r=Array.prototype.forEach,o=Object.create;t.exports=function(e){var t=o(null);return r.call(arguments,(function(e){n(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)})),t}}}),q=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/is-implemented.js":function(e,t){var n="razdwatrzy";t.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}}}),B=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/shim.js":function(e,t){var n=String.prototype.indexOf;t.exports=function(e){return n.call(this,e,arguments[1])>-1}}}),V=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/index.js":function(e,t){t.exports=q()()?String.prototype.contains:B()}}),z=h({"../../node_modules/.pnpm/d@1.0.2/node_modules/d/index.js":function(e,t){var n=S(),r=A(),o=R(),a=U(),s=V(),i=t.exports=function(e,t){var r,i,u,l,c;return arguments.length<2||"string"!=typeof e?(l=t,t=e,e=null):l=arguments[2],n(e)?(r=s.call(e,"c"),i=s.call(e,"e"),u=s.call(e,"w")):(r=u=!0,i=!1),c={value:t,configurable:r,enumerable:i,writable:u},l?o(a(l),c):c};i.gs=function(e,t,i){var u,l,c,d;return"string"!=typeof e?(c=i,i=t,t=e,e=null):c=arguments[3],n(t)?r(t)?n(i)?r(i)||(c=i,i=void 0):i=void 0:(c=t,t=i=void 0):t=void 0,n(e)?(u=s.call(e,"c"),l=s.call(e,"e")):(u=!0,l=!1),d={get:t,set:i,configurable:u,enumerable:l},c?o(a(c),d):d}}}),J=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-symbol.js":function(e,t){t.exports=function(e){return!!e&&("symbol"===(void 0===e?"undefined":d(e))||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}}}),H=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/validate-symbol.js":function(e,t){var n=J();t.exports=function(e){if(!n(e))throw new TypeError(e+" is not a symbol");return e}}}),K=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/generate-name.js":function(e,t){var n=z(),r=Object.create,o=Object.defineProperty,a=Object.prototype,s=r(null);t.exports=function(e){for(var t,r,i=0;s[e+(i||"")];)++i;return s[e+=i||""]=!0,o(a,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}}}),$=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/standard-symbols.js":function(e,t){var n=z(),r=w().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",r&&r.hasInstance||e("hasInstance")),isConcatSpreadable:n("",r&&r.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",r&&r.iterator||e("iterator")),match:n("",r&&r.match||e("match")),replace:n("",r&&r.replace||e("replace")),search:n("",r&&r.search||e("search")),species:n("",r&&r.species||e("species")),split:n("",r&&r.split||e("split")),toPrimitive:n("",r&&r.toPrimitive||e("toPrimitive")),toStringTag:n("",r&&r.toStringTag||e("toStringTag")),unscopables:n("",r&&r.unscopables||e("unscopables"))})}}}),L=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/symbol-registry.js":function(e,t){var n=z(),r=H(),o=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in r(e),o)if(o[t]===e)return t}))})}}}),Z=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/polyfill.js":function(e,t){var n,r,o,s=z(),i=H(),u=w().Symbol,l=K(),c=$(),f=L(),p=Object.create,m=Object.defineProperties,y=Object.defineProperty;if("function"==typeof u)try{String(u()),o=!0}catch(e){}else u=null;r=function(e){if(a(this,r))throw new TypeError("Symbol is not a constructor");return n(e)},t.exports=n=function e(t){var n;if(a(this,e))throw new TypeError("Symbol is not a constructor");return o?u(t):(n=p(r.prototype),t=void 0===t?"":String(t),m(n,{__description__:s("",t),__name__:s("",l(t))}))},c(n),f(n),m(r.prototype,{constructor:s(n),toString:s("",(function(){return this.__name__}))}),m(n.prototype,{toString:s((function(){return"Symbol ("+i(this).__description__+")"})),valueOf:s((function(){return i(this)}))}),y(n.prototype,n.toPrimitive,s("",(function(){var e=i(this);return"symbol"===(void 0===e?"undefined":d(e))?e:e.toString()}))),y(n.prototype,n.toStringTag,s("c","Symbol")),y(r.prototype,n.toStringTag,s("c",n.prototype[n.toStringTag])),y(r.prototype,n.toPrimitive,s("c",n.prototype[n.toPrimitive]))}}),G=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/index.js":function(e,t){t.exports=O()()?w().Symbol:Z()}}),Q=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/@@iterator/is-implemented.js":function(e,t){var n=G().iterator;t.exports=function(){var e,t,r=["foo",1];return"function"==typeof r[n]&&(!!(e=r[n]())&&("function"==typeof e.next&&(!!(t=e.next())&&("foo"===t.value&&!1===t.done))))}}}),X=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/set-prototype-of/is-implemented.js":function(e,t){var n=Object.create,r=Object.getPrototypeOf,o={};t.exports=function(){var e=Object.setPrototypeOf;return"function"==typeof e&&r(e((arguments[0]||n)(null),o))===o}}}),Y=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-object.js":function(e,t){var n=N(),r={function:!0,object:!0};t.exports=function(e){return n(e)&&r[void 0===e?"undefined":d(e)]||!1}}}),ee=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/create.js":function(e,t){var n,r,o,a,s=Object.create;X()()||(n=te()),t.exports=n?1!==n.level?s:(r={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach((function(e){o[e]="__proto__"!==e?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}})),Object.defineProperties(r,o),Object.defineProperty(n,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:r}),function(e,t){return s(null===e?r:e,t)}):s}}),te=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/set-prototype-of/shim.js":function(e,t){var n,r,o,a,s=Y(),i=F(),u=Object.prototype.isPrototypeOf,l=Object.defineProperty,c={configurable:!0,enumerable:!1,writable:!0,value:void 0};n=function(e,t){if(i(e),null===t||s(t))return e;throw new TypeError("Prototype must be null or an object")},t.exports=(r=function(){var e,t=Object.create(null),n={},r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(r){try{(e=r.set).call(t,n)}catch(e){}if(Object.getPrototypeOf(t)===n)return{set:e,level:2}}return t.__proto__=n,Object.getPrototypeOf(t)===n?{level:2}:((t={}).__proto__=n,Object.getPrototypeOf(t)===n&&{level:1})}(),r?(2===r.level?r.set?(a=r.set,o=function(e,t){return a.call(n(e,t),t),e}):o=function(e,t){return n(e,t).__proto__=t,e}:o=function e(t,r){var o;return n(t,r),(o=u.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===r&&(r=e.nullPolyfill),t.__proto__=r,o&&l(e.nullPolyfill,"__proto__",c),t},Object.defineProperty(o,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null),ee()}}),ne=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/set-prototype-of/index.js":function(e,t){t.exports=X()()?Object.setPrototypeOf:te()}}),re=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/clear.js":function(e,t){var n=F();t.exports=function(){return n(this).length=0,this}}}),oe=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-callable.js":function(e,t){t.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}}),ae=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/string/coerce.js":function(e,t){var n=S(),r=T(),o=Object.prototype.toString;t.exports=function(e){if(!n(e))return null;if(r(e)){var t=e.toString;if("function"!=typeof t)return null;if(t===o)return null}try{return""+e}catch(e){return null}}}}),se=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/lib/safe-to-string.js":function(e,t){t.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(e){return null}}}}}),ie=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/lib/to-short-string.js":function(e,t){var n=se(),r=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=n(e);return null===t?"<Non-coercible to string value>":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(r,(function(e){switch(e){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}}}),ue=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/lib/resolve-error-message.js":function(e,t){var n=ae(),r=ie();t.exports=function(e,t,o){o&&o.errorMessage&&(e=n(o.errorMessage));var a=e.indexOf("%v"),s=a>-1?r(t):null;if(o&&o.name){var i,u,l,c,d=e.indexOf("%n");if(d>-1)return a>-1?(d>a?(i=s,l=a,u=o.name,c=d):(i=o.name,l=d,u=s,c=a),e.slice(0,l)+i+e.slice(l+2,c)+u+e.slice(c+2)):e.slice(0,d)+o.name+e.slice(d+2)}return a>-1?e.slice(0,a)+s+e.slice(a+2):e}}}),le=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/lib/resolve-exception.js":function(e,t){var n=S(),r=ue();t.exports=function(e,t,o){if(o&&!n(e)){if("default"in o)return o.default;if(o.isOptional)return null}var a=new(o&&o.Error||TypeError)(r(t,e,o));throw o&&o.errorCode&&(a.code=o.errorCode),a}}}),ce=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/value/ensure.js":function(e,t){var n=le(),r=S();t.exports=function(e){if(r(e))return e;var t=arguments[1],o=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return n(e,o,t)}}}),de=h({"../../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/ensure.js":function(e,t){var n=le(),r=A();t.exports=function(e){if(r(e))return e;var t=arguments[1],o=t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return n(e,o,t)}}}),fe=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/is-implemented.js":function(e,t){t.exports=function(){var e,t,n=Array.from;return"function"==typeof n&&(t=n(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}}}),pe=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-arguments.js":function(e,t){var n=Object.prototype.toString,r=n.call(function(){return arguments}());t.exports=function(e){return n.call(e)===r}}}),me=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-function.js":function(e,t){var n=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&r(n.call(e))}}}),ye=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/is-implemented.js":function(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}}}),he=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/shim.js":function(e,t){t.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}}}),be=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/index.js":function(e,t){t.exports=ye()()?Math.sign:he()}}),ve=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-integer.js":function(e,t){var n=be(),r=Math.abs,o=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(r(e)):e}}}),ge=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-pos-integer.js":function(e,t){var n=ve(),r=Math.max;t.exports=function(e){return r(0,n(e))}}}),_e=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/is-string.js":function(e,t){var n=Object.prototype.toString,r=n.call("");t.exports=function(e){return"string"==typeof e||e&&"object"===(void 0===e?"undefined":d(e))&&(a(e,String)||n.call(e)===r)||!1}}}),xe=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/shim.js":function(e,t){var n=G().iterator,r=pe(),o=me(),a=ge(),s=oe(),i=F(),u=N(),l=_e(),c=Array.isArray,d=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;t.exports=function(e){var t,m,y,h,b,v,g,_,x,j,w=arguments[1],O=arguments[2];if(e=Object(i(e)),u(w)&&s(w),this&&this!==Array&&o(this))t=this;else{if(!w){if(r(e))return 1!==(b=e.length)?Array.apply(null,e):((h=new Array(1))[0]=e[0],h);if(c(e)){for(h=new Array(b=e.length),m=0;m<b;++m)h[m]=e[m];return h}}h=[]}if(!c(e))if(void 0!==(x=e[n])){for(g=s(x).call(e),t&&(h=new t),_=g.next(),m=0;!_.done;)j=w?d.call(w,O,_.value,m):_.value,t?(f.value=j,p(h,m,f)):h[m]=j,_=g.next(),++m;b=m}else if(l(e)){for(b=e.length,t&&(h=new t),m=0,y=0;m<b;++m)j=e[m],m+1<b&&(v=j.charCodeAt(0))>=55296&&v<=56319&&(j+=e[++m]),j=w?d.call(w,O,j,y):j,t?(f.value=j,p(h,y,f)):h[y]=j,++y;b=y}if(void 0===b)for(b=a(e.length),t&&(h=new t(b)),m=0;m<b;++m)j=w?d.call(w,O,e[m],m):e[m],t?(f.value=j,p(h,m,f)):h[m]=j;return t&&(f.value=null,h.length=b),h}}}),je=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/index.js":function(e,t){t.exports=fe()()?Array.from:xe()}}),we=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/copy.js":function(e,t){var n=je(),r=R(),o=F();t.exports=function(e){var t=Object(o(e)),a=arguments[1],s=Object(arguments[2]);if(t!==e&&!a)return t;var i={};return a?n(a,(function(t){(s.ensure||t in e)&&(i[t]=e[t])})):r(i,e),i}}}),Oe=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/_iterate.js":function(e,t){var n=oe(),r=F(),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,i=Object.prototype.propertyIsEnumerable;t.exports=function(e,t){return function(u,l){var c,d=arguments[2],f=arguments[3];return u=Object(r(u)),n(l),c=s(u),f&&c.sort("function"==typeof f?o.call(f,u):void 0),"function"!=typeof e&&(e=c[e]),a.call(e,c,(function(e,n){return i.call(u,e)?a.call(l,d,u[e],e,u,n):t}))}}}}),Se=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/for-each.js":function(e,t){t.exports=Oe()("forEach")}}),Te=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/map.js":function(e,t){var n=oe(),r=Se(),o=Function.prototype.call;t.exports=function(e,t){var a={},s=arguments[2];return n(t),r(e,(function(e,n,r,i){a[n]=o.call(t,s,e,n,r,i)})),a}}}),Ie=h({"../../node_modules/.pnpm/d@1.0.2/node_modules/d/auto-bind.js":function(e,t){var n,r=S(),o=ce(),a=de(),s=we(),i=U(),u=Te(),l=Function.prototype.bind,c=Object.defineProperty,d=Object.prototype.hasOwnProperty;n=function(e,t,n){var r,i=o(t)&&a(t.value);return delete(r=s(t)).writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&d.call(this,e)?i:(t.value=l.call(i,n.resolveContext?n.resolveContext(this):this),c(this,e,t),this[e])},r},t.exports=function(e){var t=i(arguments[1]);return r(t.resolveContext)&&a(t.resolveContext),u(e,(function(e,r){return n(r,e,t)}))}}}),Pe=h({"../../node_modules/.pnpm/es6-iterator@2.0.3/node_modules/es6-iterator/index.js":function(e,t){var n,r=re(),o=R(),s=oe(),i=F(),u=z(),l=Ie(),c=G(),d=Object.defineProperty,f=Object.defineProperties;t.exports=n=function(e,t){if(!a(this,n))throw new TypeError("Constructor requires 'new'");f(this,{__list__:u("w",i(e)),__context__:u("w",t),__nextIndex__:u("w",0)}),t&&(s(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))},delete n.prototype.constructor,f(n.prototype,o({_next:u((function(){var e;if(this.__list__)return this.__redo__&&void 0!==(e=this.__redo__.shift())?e:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()})),next:u((function(){return this._createResult(this._next())})),_createResult:u((function(e){return void 0===e?{done:!0,value:void 0}:{done:!1,value:this._resolve(e)}})),_resolve:u((function(e){return this.__list__[e]})),_unBind:u((function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)})),toString:u((function(){return"[object "+(this[c.toStringTag]||"Object")+"]"}))},l({_onAdd:u((function(e){e>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(t,n){t>=e&&(this.__redo__[n]=++t)}),this),this.__redo__.push(e)):d(this,"__redo__",u("c",[e])))})),_onDelete:u((function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach((function(t,n){t>e&&(this.__redo__[n]=--t)}),this)))})),_onClear:u((function(){this.__redo__&&r.call(this.__redo__),this.__nextIndex__=0}))}))),d(n.prototype,c.iterator,u((function(){return this})))}}),Ae=h({"../../node_modules/.pnpm/es6-iterator@2.0.3/node_modules/es6-iterator/array.js":function(e,t){var n,r=ne(),o=V(),s=z(),i=G(),u=Pe(),l=Object.defineProperty;n=t.exports=function(e,t){if(!a(this,n))throw new TypeError("Constructor requires 'new'");u.call(this,e),t=t?o.call(t,"key+value")?"key+value":o.call(t,"key")?"key":"value":"value",l(this,"__kind__",s("",t))},r&&r(n,u),delete n.prototype.constructor,n.prototype=Object.create(u.prototype,{_resolve:s((function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e}))}),l(n.prototype,i.toStringTag,s("c","Array Iterator"))}}),ke=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/values/shim.js":function(e,t){var n=Ae();t.exports=function(){return new n(this,"value")}}}),De=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/@@iterator/shim.js":function(e,t){t.exports=ke()}}),Ee=h({"../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/@@iterator/implement.js":function(){Q()()||Object.defineProperty(Array.prototype,G().iterator,{value:De(),configurable:!0,enumerable:!1,writable:!0})}}),Ne=h({"../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/implement.js":function(){O()()||Object.defineProperty(w(),"Symbol",{value:Z(),configurable:!0,enumerable:!1,writable:!0})}});function We(e){return{lang:void 0,message:null==e?void 0:e.message,abortEarly:void 0,abortPipeEarly:void 0}}function Ce(e){var t,n,r,o=void 0===e?"undefined":d(e);return"string"===o?'"'.concat(e,'"'):"number"===o||"bigint"===o||"boolean"===o?"".concat(e):"object"===o||"function"===o?null!==(r=e&&(null===(n=Object.getPrototypeOf(e))||void 0===n||null===(t=n.constructor)||void 0===t?void 0:t.name))&&void 0!==r?r:"null":o}function Fe(e,t,n,r,o){var a,s,i,u,l,c,d,f,p=o&&"input"in o?o.input:n.value,m=null!==(s=null!==(a=null==o?void 0:o.expected)&&void 0!==a?a:e.expects)&&void 0!==s?s:null,y=null!==(i=null==o?void 0:o.received)&&void 0!==i?i:Ce(p),h={kind:e.kind,type:e.type,input:p,expected:m,received:y,message:"Invalid ".concat(t,": ").concat(m?"Expected ".concat(m," but r"):"R","eceived ").concat(y),requirement:e.requirement,path:null==o?void 0:o.path,issues:null==o?void 0:o.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},b="schema"===e.kind,v=null!==(f=null!==(d=null!==(c=null!==(l=null!==(u=null==o?void 0:o.message)&&void 0!==u?u:e.message)&&void 0!==l?l:(e.reference,void h.lang))&&void 0!==c?c:b?void h.lang:null)&&void 0!==d?d:r.message)&&void 0!==f?f:void h.lang;void 0!==v&&(h.message="function"==typeof v?v(h):v),b&&(n.typed=!1),n.issues?n.issues.push(h):n.issues=[h]}function Me(e){return{version:1,vendor:"valibot",validate:function(t){return e["~run"]({value:t},We())}}}function Re(e,t){var n,r=c(new Set(e));return r.length>1?"(".concat(r.join(" ".concat(t," ")),")"):null!==(n=r[0])&&void 0!==n?n:"never"}var Ue=function(){function e(n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(r=t(this,e,[n[0].message])).name="ValiError",r.issues=n,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(e,p(Error)),e}(),qe=RegExp("^(?:0[hx])?[\\da-fA-F]+$","u");function Be(e){return{kind:"validation",type:"hexadecimal",reference:Be,async:!1,expects:null,requirement:qe,message:e,"~run":function(e,t){return e.typed&&!this.requirement.test(e.value)&&Fe(this,"hexadecimal",e,t),e}}}function Ve(e){return{kind:"validation",type:"integer",reference:Ve,async:!1,expects:null,requirement:Number.isInteger,message:e,"~run":function(e,t){return e.typed&&!this.requirement(e.value)&&Fe(this,"integer",e,t),e}}}function ze(e,t){return{kind:"validation",type:"max_value",reference:ze,async:!1,expects:"<=".concat(a(e,Date)?e.toJSON():Ce(e)),requirement:e,message:t,"~run":function(e,t){return!e.typed||e.value<=this.requirement||Fe(this,"value",e,t,{received:a(e.value,Date)?e.value.toJSON():Ce(e.value)}),e}}}function Je(e,t){return{kind:"validation",type:"min_value",reference:Je,async:!1,expects:">=".concat(a(e,Date)?e.toJSON():Ce(e)),requirement:e,message:t,"~run":function(e,t){return!e.typed||e.value>=this.requirement||Fe(this,"value",e,t,{received:a(e.value,Date)?e.value.toJSON():Ce(e.value)}),e}}}function He(e,t,n){return"function"==typeof e.fallback?e.fallback(t,n):e.fallback}function Ke(e,t){return i(s({},e),{fallback:t,get"~standard"(){return Me(this)},"~run":function(t,n){var r=e["~run"](t,n);return r.issues?{typed:!0,value:He(this,r,n)}:r}})}function $e(e,t,n){return"function"==typeof e.default?e.default(t,n):e.default}function Le(e,t){return{kind:"schema",type:"array",reference:Le,expects:"Array",async:!1,item:e,message:t,get"~standard"(){return Me(this)},"~run":function(e,t){var n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(var r=0;r<n.length;r++){var o=n[r],a=this.item["~run"]({value:o},t);if(a.issues){var s={type:"array",origin:"value",input:n,key:r,value:o},i=!0,u=!1,l=void 0;try{for(var c,d=a.issues[Symbol.iterator]();!(i=(c=d.next()).done);i=!0){var f,p=c.value;p.path?p.path.unshift(s):p.path=[s],null===(f=e.issues)||void 0===f||f.push(p)}}catch(e){u=!0,l=e}finally{try{i||null==d.return||d.return()}finally{if(u)throw l}}if(e.issues||(e.issues=a.issues),t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else Fe(this,"type",e,t);return e}}}function Ze(e,t){return{kind:"schema",type:"literal",reference:Ze,expects:Ce(e),async:!1,literal:e,message:t,get"~standard"(){return Me(this)},"~run":function(e,t){return e.value===this.literal?e.typed=!0:Fe(this,"type",e,t),e}}}function Ge(e){return{kind:"schema",type:"number",reference:Ge,expects:"number",async:!1,message:e,get"~standard"(){return Me(this)},"~run":function(e,t){return"number"!=typeof e.value||isNaN(e.value)?Fe(this,"type",e,t):e.typed=!0,e}}}function Qe(e,t){return{kind:"schema",type:"object",reference:Qe,expects:"Object",async:!1,entries:e,message:t,get"~standard"(){return Me(this)},"~run":function(e,t){var n=e.value;if(n&&"object"===(void 0===n?"undefined":d(n)))for(var r in e.typed=!0,e.value={},this.entries){var o=this.entries[r];if(r in n||("exact_optional"===o.type||"optional"===o.type||"nullish"===o.type)&&void 0!==o.default){var a=r in n?n[r]:$e(o),s=o["~run"]({value:a},t);if(s.issues){var i={type:"object",origin:"value",input:n,key:r,value:a},u=!0,l=!1,c=void 0;try{for(var f,p=s.issues[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var m,y=f.value;y.path?y.path.unshift(i):y.path=[i],null===(m=e.issues)||void 0===m||m.push(y)}}catch(e){l=!0,c=e}finally{try{u||null==p.return||p.return()}finally{if(l)throw c}}if(e.issues||(e.issues=s.issues),t.abortEarly){e.typed=!1;break}}s.typed||(e.typed=!1),e.value[r]=s.value}else if(void 0!==o.fallback)e.value[r]=He(o);else if("exact_optional"!==o.type&&"optional"!==o.type&&"nullish"!==o.type&&(Fe(this,"key",e,t,{input:void 0,expected:'"'.concat(r,'"'),path:[{type:"object",origin:"key",input:n,key:r,value:n[r]}]}),t.abortEarly))break}else Fe(this,"type",e,t);return e}}}function Xe(e,t){return{kind:"schema",type:"optional",reference:Xe,expects:"(".concat(e.expects," | undefined)"),async:!1,wrapped:e,default:t,get"~standard"(){return Me(this)},"~run":function(e,t){return void 0===e.value&&(void 0!==this.default&&(e.value=$e(this,e,t)),void 0===e.value)?(e.typed=!0,e):this.wrapped["~run"](e,t)}}}function Ye(e){return{kind:"schema",type:"string",reference:Ye,expects:"string",async:!1,message:e,get"~standard"(){return Me(this)},"~run":function(e,t){return"string"==typeof e.value?e.typed=!0:Fe(this,"type",e,t),e}}}function et(e){var t;if(e){var n=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var i,u=a.value;if(t)(i=t).push.apply(i,c(u.issues));else t=u.issues}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}}return t}function tt(e,t){return{kind:"schema",type:"union",reference:tt,expects:Re(e.map((function(e){return e.expects})),"|"),async:!1,options:e,message:t,get"~standard"(){return Me(this)},"~run":function(e,t){var n,r,o,a=!0,s=!1,i=void 0;try{for(var u,l=this.options[Symbol.iterator]();!(a=(u=l.next()).done);a=!0){var c=u.value["~run"]({value:e.value},t);if(c.typed){if(!c.issues){n=c;break}r?r.push(c):r=[c]}else o?o.push(c):o=[c]}}catch(e){s=!0,i=e}finally{try{a||null==l.return||l.return()}finally{if(s)throw i}}if(n)return n;if(r){if(1===r.length)return r[0];Fe(this,"type",e,t,{issues:et(r)}),e.typed=!0}else{if(1===(null==o?void 0:o.length))return o[0];Fe(this,"type",e,t,{issues:et(o)})}return e}}}function nt(){return{kind:"schema",type:"unknown",reference:nt,expects:"unknown",async:!1,get"~standard"(){return Me(this)},"~run":function(e){return e.typed=!0,e}}}function rt(e,t,n){return{kind:"schema",type:"variant",reference:rt,expects:"Object",async:!1,key:e,options:t,message:n,get"~standard"(){return Me(this)},"~run":function(e,t){var n=e.value;if(n&&"object"===(void 0===n?"undefined":d(n))){var r,o=0,a=this.key,s=[],i=function(e,u){var l=!0,c=!1,d=void 0;try{for(var f,p=e.options[Symbol.iterator]();!(l=(f=p.next()).done);l=!0){var m=f.value;if("variant"===m.type)i(m,new Set(u).add(m.key));else{var y=!0,h=0,b=!0,v=!1,g=void 0;try{for(var _,x=u[Symbol.iterator]();!(b=(_=x.next()).done);b=!0){var j=_.value,w=m.entries[j];if(j in n?w["~run"]({typed:!1,value:n[j]},{abortEarly:!0}).issues:"exact_optional"!==w.type&&"optional"!==w.type&&"nullish"!==w.type){y=!1,a!==j&&(o<h||o===h&&j in n&&!(a in n))&&(o=h,a=j,s=[]),a===j&&s.push(m.entries[j].expects);break}h++}}catch(e){v=!0,g=e}finally{try{b||null==x.return||x.return()}finally{if(v)throw g}}if(y){var O=m["~run"]({value:n},t);(!r||!r.typed&&O.typed)&&(r=O)}}if(r&&!r.issues)break}}catch(e){c=!0,d=e}finally{try{l||null==p.return||p.return()}finally{if(c)throw d}}};if(i(this,new Set([this.key])),r)return r;Fe(this,"type",e,t,{input:n[a],expected:Re(s,"|"),path:[{type:"object",origin:"value",input:n,key:a,value:n[a]}]})}else Fe(this,"type",e,t);return e}}}function ot(e,t,n){var r=e["~run"]({value:t},We(n));if(r.issues)throw new Ue(r.issues);return r.value}function at(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(s({},t[0]),{pipe:t,get"~standard"(){return Me(this)},"~run":function(e,n){var r=!0,o=!1,a=void 0;try{for(var s,i=t[Symbol.iterator]();!(r=(s=i.next()).done);r=!0){var u=s.value;if("metadata"!==u.kind){if(e.issues&&("schema"===u.kind||"transformation"===u.kind)){e.typed=!1;break}e.issues&&(n.abortEarly||n.abortPipeEarly)||(e=u["~run"](e,n))}}}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return e}})}function st(e,t,n){var r=e["~run"]({value:t},We(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}function it(e,t){for(var n=e.toString(16).padStart(2*t,"0"),r=Array.from({length:t}),o=0,a=0;o<n.length;)r[a]=Number.parseInt(n.slice(o,o+2),16),o+=2,a++;return r}var ut=["triggered","disappeared"],lt=["low threshold","high threshold","falling slope","rising slope","low threshold with delay","high threshold with delay"],ct=["no alarm","open condition","short condition","saturated low","saturated high","ADC communication error"],dt={32:"configuration successful",48:"configuration rejected",96:"command successful",112:"command failed"};b(),_(),Ee(),Ne();var ft=function(){var e=function(e){var t=e.deviceName,n=at(Ge(),Ve(),Je(0)),r=ot(Ke(n,4),e.roundingDecimals);function o(e){var t=Math.pow(10,r);return Math.round(e*t)/t}function a(e){return{errors:e.map((function(e){return"".concat(t," (JS): ").concat(e)}))}}var s=e.channels.map((function(e){return{name:e.name,start:e.start,end:e.end,span:e.end-e.start}}));function i(e){var t=s[e];return t||"Channel ".concat(t," is not defined in the configuration")}function u(e,t){var n=i(e);return"string"==typeof n?n:o((t-2500)/1e4*n.span+n.start)}return{validateUplinkInput:function(e){var t=st(Qe({bytes:Le(at(Ge(),Ve(),Je(0),ze(255))),fPort:at(Ge(),Ve(),Je(1),ze(255)),recvTime:Xe(Ye())}),e);return t.success?t.output:a(t.issues.map((function(e){return e.message})))},adjustRoundingDecimals:function(e){r=ot(Ke(n,r),e)},createErrorMessage:a,addWarningMessages:function(e,n){n.forEach((function(n){e.push("".concat(t," (JS): ").concat(n))}))},createChannelData:function(e,t){var n=u(e,t);return"string"==typeof n?n:{channelId:e,value:n,channelName:i(e).name}},checkSemVerVersions:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var i=a.value,u=i.split(".");if(3!==u.length)return t.push("Invalid semantic version format: ".concat(i)),t;var c=l(u,3),d=c[0],f=c[1],p=c[2],m=Number.parseInt(d),y=Number.parseInt(f),h=Number.parseInt(p);if(m.toString()!==d||y.toString()!==f||h.toString()!==p)return t.push("Semantic version contains non-integer value: ".concat(i)),t;(m<0||m>16)&&t.push("Major version ".concat(m," is out of range for semver ").concat(i)),(y<0||y>16)&&t.push("Minor version ".concat(y," is out of range for semver ").concat(i)),(h<0||h>255)&&t.push("Patch version ".concat(h," is out of range for semver ").concat(i))}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return t.length>0?t:null},getRealSlopeValue:function(e,t){var n=i(e);return"string"==typeof n?n:o(t/1e4*n.span)},getRealMeasurementValue:u,adjustMeasurementRange:function(e,t){var n=i(e);if("string"==typeof n)return n;n.start=t.start,n.end=t.end,n.span=t.end-t.start}}}({deviceName:"NETRIS2",channels:[{start:4,end:20,name:"Electrical current"},{start:4,end:20,name:"Electrical current"}]}),t=e.validateUplinkInput,n=e.createErrorMessage,r=e.addWarningMessages,o=e.createChannelData,a=e.checkSemVerVersions,u=e.getRealSlopeValue,d=e.getRealMeasurementValue,f=e.adjustRoundingDecimals;function p(e){return function(e){var o=t(e);if("errors"in o)return o;e=o;var s=e.bytes[0];switch(s){case 1:case 2:return m(e);case 3:return function(e){var t=6;if(e.bytes.length<t)return n(["Process alarm message must contain at least ".concat(t," bytes. Contains ").concat(e.bytes.length," bytes.")]);if(e.bytes.length%3!=0)return n(["Process alarm message must contain a multiple of 3 bytes."]);for(var r=e.bytes[0],o=e.bytes[1],a=[],s=3;s<e.bytes.length;s+=3){var i=h(e.bytes[s]);if("errors"in i)return i;var u=b(e.bytes[s+1],e.bytes[s+2],i.channelId,i.alarmType);if("string"==typeof u)return n([u]);a.push({channelId:i.channelId,channelName:"Electrical current",alarmType:i.alarmType,alarmTypeName:lt[i.alarmType],event:i.sense,eventName:ut[i.sense],value:u})}return{data:{messageType:r,configurationId:o,processAlarms:a}}}(e);case 4:return function(e){var t=4,o=5,a=[];if(e.bytes.length<t)return n(["Technical alarm message must contain at least ".concat(t," bytes")]);e.bytes.length>o&&r(a,["Technical alarm message contains more than ".concat(o," bytes. Data might been decoded incorrectly. Contains ").concat(e.bytes.length," bytes.")]);var s=e.bytes[0],i=e.bytes[1],u=e.bytes[2];if(![1,2,3].includes(u))return n(["Technical alarm message contains an invalid bit mask: ".concat(u,", expected 0x01, 0x02 or 0x03")]);var l=3===u?5:4;if(e.bytes.length<l)return n(["Technical alarm message with bit mask ".concat(u," must contain atleast ").concat(l," bytes. Contains ").concat(e.bytes.length," bytes.")]);e.bytes.length>l&&r(a,["Technical alarm message with bit mask ".concat(u," contains more than ").concat(l," bytes. Data might been decoded incorrectly. Contains ").concat(e.bytes.length," bytes.")]);var c=[];switch(u){case 1:var d=y(e.bytes[3]);if("errors"in d)return d;c.push({channelId:0,channelName:"Electrical current",event:d.sense,eventName:ut[d.sense],causeOfFailure:d.causeOfFailure,causeOfFailureName:ct[d.causeOfFailure]});break;case 2:var f=y(e.bytes[3]);if("errors"in f)return f;c.push({channelId:1,channelName:"Electrical current",event:f.sense,eventName:ut[f.sense],causeOfFailure:f.causeOfFailure,causeOfFailureName:ct[f.causeOfFailure]});break;case 3:var p=y(e.bytes[3]);if("errors"in p)return p;var m=y(e.bytes[4]);if("errors"in m)return m;c.push({channelId:0,channelName:"Electrical current",event:p.sense,eventName:ut[p.sense],causeOfFailure:p.causeOfFailure,causeOfFailureName:ct[p.causeOfFailure]},{channelId:1,channelName:"Electrical current",event:m.sense,eventName:ut[m.sense],causeOfFailure:m.causeOfFailure,causeOfFailureName:ct[m.causeOfFailure]})}var h={data:{messageType:s,configurationId:i,technicalAlarms:c}};a.length>0&&(h.warnings=a);return h}(e);case 6:return function(e){var t=3,o=[32,48,96,112],a=[];if(e.bytes.length<t)return n(["Configuration status message must contain at least ".concat(t," bytes. Contains ").concat(e.bytes.length," bytes.")]);e.bytes.length>t&&r(a,["Configuration status message contains more than ".concat(t," bytes. Data might been decoded incorrectly. Contains ").concat(e.bytes.length," bytes.")]);var s=e.bytes[0],i=e.bytes[1],u=e.bytes[2];if(!o.includes(u))return n(["Configuration status message contains an invalid status: ".concat(u)]);var l={data:{messageType:s,configurationStatus:{configurationId:i,statusId:u,status:dt[u]}}};a.length>0&&(l.warnings=a);return l}(e);case 7:return function(e){var t=24,o=[];if(e.bytes.length<t)return n(["Radio unit identification message must contain at least ".concat(t," bytes. Contains ").concat(e.bytes.length," bytes.")]);e.bytes.length>t&&r(o,["Radio unit identification message contains more than ".concat(t," bytes. Data might been decoded incorrectly. Contains ").concat(e.bytes.length," bytes.")]);var s=e.bytes[0],i=e.bytes[1],u=e.bytes[2];if(14!==u)return n(["Radio unit identification message contains an invalid product ID: ".concat(u,", expected 0x0e (14).")]);var l=e.bytes[3];if(0!==l)return n(["Radio unit identification message contains an invalid product sub ID: ".concat(l,", expected 0x00 (0).")]);var c="".concat(e.bytes[4]>>4,".").concat(15&e.bytes[4],".").concat(e.bytes[5]),d="".concat(e.bytes[6]>>4,".").concat(15&e.bytes[6],".").concat(e.bytes[7]),f="".concat(e.bytes[8]>>4,".").concat(15&e.bytes[8],".").concat(e.bytes[9]),p="".concat(e.bytes[10]>>4,".").concat(15&e.bytes[10],".").concat(e.bytes[11]),m=a([c,d,f,p]);m&&r(o,m);var y=e.bytes.slice(12,23).map((function(e){return String.fromCharCode(e)})).join(""),h={data:{messageType:s,configurationId:i,radioUnitIdentification:{productId:u,productSubId:l,radioUnitModemFirmwareVersion:c,radioUnitModemHardwareVersion:d,radioUnitFirmwareVersion:f,radioUnitHardwareVersion:p,serialNumber:y}}};o.length>0&&(h.warnings=o);return h}(e);case 8:return function(e){var t=12,o=[];if(e.bytes.length!==t)return n(["Keep alive message must contain at least ".concat(t," bytes. Contains ").concat(e.bytes.length," bytes.")]);e.bytes.length>t&&r(o,["Keep alive message contains more than ".concat(t," bytes. Data might been decoded incorrectly. Contains ").concat(e.bytes.length," bytes.")]);var a=e.bytes[0],s=e.bytes[1],i=e.bytes[2]<<24|e.bytes[3]<<16|e.bytes[4]<<8|e.bytes[5],u=e.bytes[6]<<24|e.bytes[7]<<16|e.bytes[8]<<8|e.bytes[9],l=!!(128&e.bytes[10]),c=127&e.bytes[10],d=127===c,f=e.bytes[11],p={data:{messageType:a,configurationId:s,deviceStatistic:{numberOfMeasurements:i,numberOfTransmissions:u,batteryResetSinceLastKeepAlive:l,estimatedBatteryPercent:c,batteryCalculationError:d,radioUnitTemperatureLevel_C:f}}};o.length>0&&(p.warnings=o);return p}(e);default:return n(["Data message type ".concat(s," is not supported")])}}(e)}function m(e){var t=[],a=[e.bytes.length>=5,e.bytes.length>=7,e.bytes.length>7],s=a[0],i=a[1],u=a[2];if(!s)return n(["Data message".concat(e.bytes[0]?" ".concat(e.bytes[0]):""," must contain at least ").concat(5," bytes. Contains ").concat(e.bytes.length," bytes.")]);u&&r(t,["Data message contains more than ".concat(7," bytes. Data might been decoded incorrectly. Contains ").concat(e.bytes.length," bytes.")]);var l=e.bytes[0],c=e.bytes[1],d=e.bytes[2];if(![0,1,2,3].includes(d))return n(["Data message contains an invalid channel mask: ".concat(d,", expected 0x00, 0x01, 0x02 or 0x03")]);var f=[1&d,2&d],p=f[1],m=[];if(s&&f[0]){var y=e.bytes[3]<<8|e.bytes[4],h=o(0,y);if("string"==typeof h)return n([h]);m.push(h)}if(i&&p){var b=e.bytes[5]<<8|e.bytes[6],v=o(1,b);if("string"==typeof v)return n([v]);m.push(v)}if(1!==m.length&&2!==m.length)return n(["Invalid number of channels: ".concat(m.length)]);var g={data:{messageType:l,configurationId:c,measurements:{channels:m}}};return t.length>0&&(g.warnings=t),g}function y(e){var t={sense:(128&e)>>7,causeOfFailure:7&e};return[0,1,2,3,4,5].includes(t.causeOfFailure)?t:n(["Invalid causeOfFailure in technical alarm: ".concat(t.causeOfFailure)])}function h(e){var t={sense:(128&e)>>7,channelId:(120&e)>>3,alarmType:7&e};return 0!==t.channelId&&1!==t.channelId?n(["Invalid channelId in process alarm: ".concat(t.channelId)]):[0,1,2,3,4,5].includes(t.alarmType)?t:n(["Invalid alarmType in process alarm: ".concat(t.alarmType)])}function b(e,t,n,r){var o=e<<8|t;switch(r){case 2:case 3:return u(n,o);case 0:case 1:case 4:case 5:return d(n,o)}}var v=10,g=Xe(at(Ge("configurationId needs to be a number"),Ve("configurationId needs to be a number"),Je(1,"configurationId needs to be at least 1"),ze(31,"configurationId needs to be at most 31")),1),_=Qe({deviceAction:Ze("resetToFactory")}),x=Qe({configurationId:g,deviceAction:Ze("resetBatteryIndicator")}),j=Qe({configurationId:g,deviceAction:Ze("disableChannel"),configuration:Qe({channel0:Xe(Qe({disable:Ze(!0)})),channel1:Xe(Qe({disable:Ze(!0)}))})}),w=Qe({configurationId:g,deviceAction:Ze("setMainConfiguration"),configuration:Qe({measuringRateWhenNoAlarm:at(Ge("measuringRateWhenNoAlarm needs to be a number"),Ve("measuringRateWhenNoAlarm needs to be an integer"),Je(60,"measuringRateWhenNoAlarm needs to be at least 60"),ze(86400,"measuringRateWhenNoAlarm needs to be at most 86,400")),publicationFactorWhenNoAlarm:at(Ge("publicationFactorWhenNoAlarm needs to be a number"),Ve("publicationFactorWhenNoAlarm needs to be an integer"),Je(1,"publicationFactorWhenNoAlarm needs to be at least 1"),ze(2880,"publicationFactorWhenNoAlarm needs to be at most 2,880")),measuringRateWhenAlarm:at(Ge("measuringRateWhenAlarm needs to be a number"),Ve("measuringRateWhenAlarm needs to be an integer"),Je(60,"measuringRateWhenAlarm needs to be at least 60"),ze(86400,"measuringRateWhenAlarm needs to be at most 86,400")),publicationFactorWhenAlarm:at(Ge("publicationFactorWhenAlarm needs to be a number"),Ve("publicationFactorWhenAlarm needs to be an integer"),Je(1,"publicationFactorWhenAlarm needs to be at least 1"),ze(2880,"publicationFactorWhenAlarm needs to be at most 2,880"))})}),O=Qe({deadBand:at(Ge("deadBand needs to be a number"),Je(0,"deadBand needs to be at least 0"),ze(20,"deadBand needs to be at most 20")),alarms:Xe(Qe({lowThreshold:Xe(at(Ge("lowThreshold needs to be a number"),Je(0,"lowThreshold needs to be at least 0"),ze(100,"lowThreshold needs to be at most 100"))),highThreshold:Xe(at(Ge("highThreshold needs to be a number"),Je(0,"highThreshold needs to be at least 0"),ze(100,"highThreshold needs to be at most 100"))),lowThresholdWithDelay:Xe(Qe({value:at(Ge("value of lowThresholdWithDelay needs to be a number"),Je(0,"value of lowThresholdWithDelay needs to be at least 0"),ze(100,"value of lowThresholdWithDelay needs to be at most 100")),delay:at(Ge("delay of lowThresholdWithDelay needs to be a number"),Ve("delay of lowThresholdWithDelay needs to be an integer"),Je(0,"delay of lowThresholdWithDelay needs to be at least 0"),ze(65535,"delay of lowThresholdWithDelay needs to be at most 65,535"))})),highThresholdWithDelay:Xe(Qe({value:at(Ge("value of highThresholdWithDelay needs to be a number"),Je(0,"value of highThresholdWithDelay needs to be at least 0"),ze(100,"value of highThresholdWithDelay needs to be at most 100")),delay:at(Ge("delay of highThresholdWi