UNPKG

opcua-commander

Version:
1,070 lines (1,054 loc) 5.68 MB
var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty; var __esm = (fn, res) => function() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; var __commonJS = (cb, mod) => function() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: !0 }); }, __copyProps = (to, from, except, desc) => { if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target, mod )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod); // node_modules/node-opcua-assert/dist/index.js var require_dist = __commonJS({ "node_modules/node-opcua-assert/dist/index.js"(exports2) { "use strict"; var __importDefault3 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.renderError = exports2.assert = void 0; var chalk_1 = __importDefault3(require("chalk")), displayAssert = typeof process == "object" ? !!process.env.DISPLAY_ASSERT : !1; function assert2(cond, message) { if (!cond) { let err = new Error(message); throw displayAssert && (console.log(chalk_1.default.whiteBright.bgRed("-----------------------------------------------------------")), console.log(chalk_1.default.whiteBright.bgRed(message)), console.log(chalk_1.default.whiteBright.bgRed("-----------------------------------------------------------"))), err; } } exports2.assert = assert2; exports2.default = assert2; function renderError(err) { return err; } exports2.renderError = renderError; } }); // node_modules/node-opcua-debug/dist/remove_decoration.js var require_remove_decoration = __commonJS({ "node_modules/node-opcua-debug/dist/remove_decoration.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.removeDecoration = removeDecoration; var nonTextReg = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; function removeDecoration(str) { return str.replace(nonTextReg, ""); } } }); // node_modules/node-opcua-debug/dist/display_trace.js var require_display_trace = __commonJS({ "node_modules/node-opcua-debug/dist/display_trace.js"(exports2) { "use strict"; var __importDefault3 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.traceFromThisProjectOnly = traceFromThisProjectOnly; exports2.displayTraceFromThisProjectOnly = displayTraceFromThisProjectOnly; var chalk_1 = __importDefault3(require("chalk")); function traceFromThisProjectOnly(err) { let str = []; str.push(chalk_1.default.cyan.bold(" display_trace_from_this_project_only = ")), err && str.push(err.message), err = err || new Error("Error used to extract stack trace"); let stack = err.stack; return stack ? (stack = stack.split(` `).filter((el) => el.match(/node-opcua/) && !el.match(/node_modules/)), str.push(chalk_1.default.yellow(stack.join(` `)))) : str.push(chalk_1.default.red(" NO STACK TO TRACE !!!!")), str.join(` `); } function displayTraceFromThisProjectOnly(err) { console.log(traceFromThisProjectOnly(err)); } } }); // node_modules/node-opcua-debug/dist/make_loggers.js var require_make_loggers = __commonJS({ "node_modules/node-opcua-debug/dist/make_loggers.js"(exports2) { "use strict"; var __importDefault3 = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { default: mod }; }; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.messageLogger = exports2.MessageLogger = exports2.LogLevel = void 0; exports2.setLogLevel = setLogLevel; exports2.setDebugLogger = setDebugLogger; exports2.setWarningLogger = setWarningLogger; exports2.setErrorLogger = setErrorLogger; exports2.setTraceLogger = setTraceLogger; exports2.setDebugFlag = setDebugFlag; exports2.checkDebugFlag = checkDebugFlag; exports2.make_debugLog = make_debugLog; exports2.make_errorLog = make_errorLog; exports2.make_warningLog = make_warningLog; exports2.make_traceLog = make_traceLog; var events_1 = require("events"), util_1 = require("util"), chalk_1 = __importDefault3(require("chalk")), debugFlags = {}, _process = typeof process == "object" ? process : { env: {} }, sTraceFlag = _process.env && _process.env.DEBUG, LogLevel; (function(LogLevel2) { LogLevel2[LogLevel2.Emergency = 0] = "Emergency", LogLevel2[LogLevel2.Alert = 1] = "Alert", LogLevel2[LogLevel2.Critic = 2] = "Critic", LogLevel2[LogLevel2.Error = 3] = "Error", LogLevel2[LogLevel2.Warning = 4] = "Warning", LogLevel2[LogLevel2.Notice = 5] = "Notice", LogLevel2[LogLevel2.Info = 6] = "Info", LogLevel2[LogLevel2.Debug = 7] = "Debug"; })(LogLevel || (exports2.LogLevel = LogLevel = {})); _process.env; var maxLines = _process.env && _process.env.NODEOPCUA_DEBUG_MAXLINE_PER_MESSAGE ? parseInt(_process.env.NODEOPCUA_DEBUG_MAXLINE_PER_MESSAGE, 10) : 25, g_logLevel = process.env.NODEOPCUA_LOG_LEVEL ? parseInt(process.env.NODEOPCUA_LOG_LEVEL) : LogLevel.Warning; function setLogLevel(level) { g_logLevel = level; } function extractBasename(name) { return name ? name.replace(/(.*[\\|/])?/g, "").replace(/\.(js|ts)$/, "") : ""; } function w3(str, l) { return str.padEnd(l, " ").substring(0, l); } var contextCounter = {}, increaseCounter = (context) => { let { filename, callerline } = context, key = `${filename}:${callerline}};`; return contextCounter[key] ? (contextCounter[key] = contextCounter[key] + 1, contextCounter[key]) : (contextCounter[key] = 1, 1); }, threshold = 100, loggers = { errorLogger: (context, ...args) => { let occurrenceCount = increaseCounter(context); if (occurrenceCount > threshold) return; let output = dump(context, "E", args); if (exports2.messageLogger.emit("errorMessage", output), occurrenceCount === threshold) { dump(context, "E", [`This error occurred more than ${threshold} times, no more error will be logged for this context`]); return; } }, warningLogger: (context, ...args) => { let occurrenceCount = increaseCounter(context); if (occurrenceCount > threshold) return; let output = dump(context, "W", args); if (exports2.messageLogger.emit("warningMessage", output), occurrenceCount === threshold) { dump(context, "W", [ `This warning occurred more than ${threshold} times, no more warning will be logged for this context` ]); return; } }, traceLogger: (context, ...args) => { let output = dump(context, "T", args); }, debugLogger: (context, ...args) => { let output = dump(context, "D", args); } }; function setDebugLogger(log) { loggers.debugLogger = log; } function setWarningLogger(log) { loggers.warningLogger = log; } function setErrorLogger(log) { loggers.errorLogger = log; } function setTraceLogger(log) { loggers.traceLogger = log; } function setDebugFlag(scriptFullPath, flag) { let filename = extractBasename(scriptFullPath); if (sTraceFlag && sTraceFlag.length > 1 && flag) { let decoratedFilename = chalk_1.default.yellow(w3(filename, 60)); loggers.debugLogger({ filename: __filename, callerline: -1 }, " Setting debug for ", decoratedFilename, " to ", (flag ? chalk_1.default.cyan : chalk_1.default.red)(flag.toString(), sTraceFlag)), g_logLevel = LogLevel.Debug; } debugFlags[filename] = flag; } function checkDebugFlag(scriptFullPath) { let filename = extractBasename(scriptFullPath), doDebug = debugFlags[filename]; return sTraceFlag && !Object.prototype.hasOwnProperty.call(debugFlags, filename) && (doDebug = sTraceFlag.indexOf(filename) >= 0 || sTraceFlag.indexOf("ALL") >= 0, setDebugFlag(filename, doDebug)), doDebug; } function file_line(mode, filename, callerLine) { let d = (/* @__PURE__ */ new Date()).toISOString().substring(11); return mode === "T" ? chalk_1.default.bgGreenBright.white(w3(d, 14) + ":" + w3(filename, 30) + ":" + w3(callerLine.toString(), 5)) : mode === "W" ? chalk_1.default.bgCyan.white(w3(d, 14) + ":" + w3(filename, 30) + ":" + w3(callerLine.toString(), 5)) : mode === "D" ? chalk_1.default.bgWhite.cyan(w3(d, 14) + ":" + w3(filename, 30) + ":" + w3(callerLine.toString(), 5)) : chalk_1.default.bgRed.white(w3(d, 14) + ":" + w3(filename, 30) + ":" + w3(callerLine.toString(), 5)); } var continuation = w3(" ... ", 51); function getCallerContext(level) { let l = (new Error("").stack || "").split(` `)[level].split(":"), callerline = parseInt(l[l.length - 2], 10); return { filename: extractBasename(l[l.length - 3]), callerline }; } function dump(ctx, mode, args1) { let a2 = Object.values(args1), output = (0, util_1.format)(...a2), { filename, callerline } = ctx, a1 = [file_line(mode, filename, callerline)], i = 0; for (let line of output.split(` `)) { let lineArguments = [].concat(a1, [line]); if (console.log(...lineArguments), a1 = [continuation], i = i + 1, i > maxLines) { let a3 = a1.concat([` .... TRUNCATED ..... (NODEOPCUA_DEBUG_MAXLINE_PER_MESSAGE=${maxLines}`]); console.log(...a3); break; } } return output; } var MessageLogger = class extends events_1.EventEmitter { constructor() { super(); } on(eventName, eventHandler) { return super.on(eventName, eventHandler); } }; exports2.MessageLogger = MessageLogger; exports2.messageLogger = new MessageLogger(); function make_debugLog(scriptFullPath) { let filename = extractBasename(scriptFullPath); function debugLogFunc(...args) { if (debugFlags[filename] && g_logLevel >= LogLevel.Debug) { let ctxt = getCallerContext(3); loggers.debugLogger(ctxt, ...args); } } return debugLogFunc; } function errorLogFunc(...args) { if (g_logLevel >= LogLevel.Error) { let ctxt = getCallerContext(3); loggers.errorLogger(ctxt, ...args); } } function make_errorLog(context) { return errorLogFunc; } function warningLogFunc(...args) { if (g_logLevel >= LogLevel.Warning) { let ctxt = getCallerContext(3); loggers.warningLogger(ctxt, ...args); } } function make_warningLog(context) { return warningLogFunc; } function traceLogFunc(...args) { let ctxt = getCallerContext(3); loggers.traceLogger(ctxt, ...args); } function make_traceLog(context) { return traceLogFunc; } } }); // node_modules/node-opcua-buffer-utils/dist/buffer_utils.js var require_buffer_utils = __commonJS({ "node_modules/node-opcua-buffer-utils/dist/buffer_utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.createFastUninitializedBuffer = void 0; exports2.makeBuffer = makeBuffer; exports2.clone_buffer = clone_buffer; exports2.createFastUninitializedBuffer = Buffer.allocUnsafe; function makeBuffer(listOfBytes) { let l = listOfBytes.split(" "), b = exports2.createFastUninitializedBuffer(l.length), i = 0; return l.forEach((value) => { b.writeUInt8(parseInt(value, 16), i), i += 1; }), b; } function clone_buffer(buffer) { let clone = exports2.createFastUninitializedBuffer(buffer.length); return buffer.copy(clone, 0, 0), clone; } } }); // node_modules/node-opcua-buffer-utils/dist/index.js var require_dist2 = __commonJS({ "node_modules/node-opcua-buffer-utils/dist/index.js"(exports2) { "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { k2 === void 0 && (k2 = k); var desc = Object.getOwnPropertyDescriptor(m, k); (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() { return m[k]; } }), Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { k2 === void 0 && (k2 = k), o[k2] = m[k]; }), __exportStar3 = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p) && __createBinding3(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: !0 }); __exportStar3(require_buffer_utils(), exports2); } }); // node_modules/node-opcua-debug/dist/make_buffer_from_trace.js var require_make_buffer_from_trace = __commonJS({ "node_modules/node-opcua-debug/dist/make_buffer_from_trace.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.inlineText = inlineText; exports2.makeBufferFromTrace = makeBufferFromTrace; var node_opcua_buffer_utils_1 = require_dist2(); function inlineText(f2) { let k = f2.toString().replace(/^[^/]+\/\*!?/, "").replace(/\*\/[^/]+$/, ""); return k = k.split(` `).map((t) => t.trim()).join(` `), k; } function hexString(str) { let hexLine = "", lines = str.split(` `); if (lines.length === 0) return hexLine; for (; lines.length && lines[0].length === 0; ) lines = lines.splice(1); let m = lines[0].match(/[0-9a-fA-F:]* +/); if (!m) return hexLine; let prefixLength = m[0].length; for (let line of lines) line = line.trim(), line.length > 80 ? (line = line.substring(10, 108).trim(), hexLine = hexLine ? hexLine + " " + line : line) : line.length > 60 ? (line = line.substring(7, 55).trim(), hexLine = hexLine ? hexLine + " " + line : line) : line.length > prefixLength && (line = line.substring(prefixLength, prefixLength + 48).trim(), hexLine = hexLine ? hexLine + " " + line : line); return hexLine; } function makeBufferFromTrace(func) { return typeof func == "string" ? (0, node_opcua_buffer_utils_1.makeBuffer)(hexString(func)) : (0, node_opcua_buffer_utils_1.makeBuffer)(hexString(inlineText(func))); } } }); // node_modules/hexy/hexy.js var require_hexy = __commonJS({ "node_modules/hexy/hexy.js"(exports2) { "use strict"; (function(arg) { var hexy = function(buffer, config) { return new Hexy(buffer, config).toString(); }, Hexy = function(buffer, config) { let self2 = this, MAX_ADDRESS_LENGTH = 8; switch (typeof Buffer < "u" && (buffer = Buffer.isBuffer(buffer) && buffer || typeof buffer == "string" && Buffer.from(buffer) || buffer && buffer.constructor === Array && Buffer.from(buffer) || Buffer.alloc(0)), buffer = buffer || [], config = config || {}, self2.buffer = buffer, self2.bytes_per_line = parseInt(config.width) || 16, self2.numbering = config.numbering == "none" ? "none" : "hex_bytes", self2.bytes_per_group = 2, config.format) { case "none": self2.bytes_per_group = 0; break; case "twos": self2.bytes_per_group = 1; break; case "eights": self2.bytes_per_group = 4; break; case "sixteens": self2.bytes_per_group = 8; break; } switch (self2.littleEndian = config.littleEndian || !1, self2.radix = config.radix || 16, self2.caps = config.caps == "upper" ? "upper" : "lower", self2.annotate = config.annotate == "none" ? "none" : "ascii", self2.prefix = config.prefix || "", self2.indent = config.indent || 0, self2.html = config.html || !1, self2.offset = config.offset || 0, self2.length = config.length || -1, self2.extendedChs = config.extendedChs || !1, self2.display_offset = config.display_offset || 0, self2.offset && self2.offset < self2.buffer.length && (self2.buffer = self2.buffer.slice(self2.offset)), self2.length !== -1 && self2.length <= self2.buffer.length && (self2.buffer = self2.buffer.slice(0, self2.length)), self2.prefix = (self2.html ? "&nbsp;" : " ").repeat(self2.indent) + self2.prefix, self2.hex_line_length = maxnumberlen(self2.bytes_per_group, self2.radix) * self2.bytes_per_line / Math.max(self2.bytes_per_group, 1), self2.bytes_per_group) { // the original code (now documented in the tests), case 8: // some modes had mode-dependent number of extra spaces at the end of the line case 4: case 2: self2.hex_line_length += Math.floor(self2.bytes_per_line / self2.bytes_per_group); break; case 1: self2.hex_line_length += self2.bytes_per_line + 3; break; case 0: self2.hex_line_length += 2; break; } self2.bytes_per_group = Math.min(self2.bytes_per_group, self2.bytes_per_line), this.toString = function() { var str = "", addr = self2.offset + self2.display_offset, odd = !1; self2.html && (str += `<div class='hexy'> `); for (var start = 0; start < self2.buffer.length; start += self2.bytes_per_line) { let end = Math.min(start + self2.bytes_per_line, self2.buffer.length), slice = self2.buffer.slice(start, end); if (self2.html && (str += "<div class='" + num2str(addr, MAX_ADDRESS_LENGTH, 16) + (odd ? " odd" : " even") + "'>", odd = !odd), str += self2.prefix, self2.numbering === "hex_bytes" && (str += num2str(addr, MAX_ADDRESS_LENGTH, 16) + ": "), str += hex(slice, self2.bytes_per_line, self2.bytes_per_group, self2.radix, self2.littleEndian), self2.annotate === "ascii") { var text = ""; switch (slice.constructor) { case Array: text = String.fromCharCode.apply(self2, slice); break; case Uint8Array: slice.forEach((ch) => text += String.fromCharCode(ch)); break; default: text = slice.toString("latin1"); } str += " " + (self2.html ? html_escape(text) : ascii_escape(text)); } str += self2.html ? `</div> ` : ` `, addr += self2.bytes_per_line; } return self2.html && (str += `</div> `), str; }; var hex = function(buffer2, bytes_per_line, bytes_per_group, radix, littleEndian) { var str = ""; let delimiter = bytes_per_group == 0 ? "" : " ", group_len = maxnumberlen(bytes_per_group, radix), padlen2 = (bytes_per_line - buffer2.length) * (bytes_per_group == 0 ? group_len : (group_len + 1) / bytes_per_group); bytes_per_group == 0 && (bytes_per_group = 1); let start = littleEndian ? bytes_per_group - 1 : 0, end = littleEndian ? -1 : bytes_per_group, step = littleEndian ? -1 : 1; for (var group = 0; group < buffer2.length / bytes_per_group; ++group) { for (var val = bytes_per_group < 4 ? 0 : BigInt(0), ii = start; ii != end; ii += step) { let i = group * bytes_per_group + ii; if (i >= buffer2.length) break; bytes_per_group < 4 ? val = val * 256 + ((buffer2.constructor == String ? buffer2.codePointAt(i) : buffer2[i]) & 255) : val = BigInt(val) * BigInt(256) + BigInt((buffer2.constructor == String ? buffer2.codePointAt(i) : buffer2[i]) & 255); } let text = val.toString(radix); for (var c = 0; c < group_len - text.length; c++) str += "0"; str += text, str += delimiter, self2.caps === "upper" && (str = str.toUpperCase()); } return buffer2.length < bytes_per_line && (str += (self2.html ? "&nbsp;" : " ").repeat(padlen2)), str = rpad(str, self2.hex_line_length), str; }, num2str = function(b, len, radix) { let s = b.toString(radix); return "0".repeat(len - s.length) + s; }, rpad = function(s, len) { let to_add = len - s.length - 1; return to_add > 0 && (s += (self2.html ? "&nbsp;" : " ").repeat(to_add)), s; }; let ALL_EXCEPT_PRINTABLE_LATIN = /[^\x20-\x7f]/g, CONTROL_CHARACTERS_ONLY = /[\x00-\x1f]/g; var ascii_escape = function(str) { return str.replace(self2.extendedChs ? CONTROL_CHARACTERS_ONLY : ALL_EXCEPT_PRINTABLE_LATIN, "."); }, html_escape = function(str) { return str = str.replace(/&/g, "&amp;"), str = str.replace(/</g, "&lt;"), str = str.replace(/>/g, "&gt;"), self2.extendedChs ? (str = str.replace(/\'/g, "&apos;"), str = str.replace(/\"/g, "&quot;"), str = str.replace(ALL_EXCEPT_PRINTABLE_LATIN, function(ch) { return ch = ch.codePointAt(0), "&#x" + ch.toString(16) + ";"; })) : str = str.replace(ALL_EXCEPT_PRINTABLE_LATIN, "."), str; }; }; Hexy.VERSION = "0.3.4"; var maxnumberlen = function(bytes, radix) { var result2 = 2; switch (bytes == 0 && (bytes = 1), radix) { case 2: result2 = bytes * 8; break; case 8: switch (bytes) { case 1: result2 = 3; break; case 2: result2 = 6; break; case 4: result2 = 11; break; case 8: result2 = 22; break; } break; case 10: switch (bytes) { case 1: result2 = 3; break; case 2: result2 = 6; break; case 4: result2 = 10; break; case 8: result2 = 20; break; } break; case 16: result2 = 2 * bytes; break; } return result2; }, _exp; typeof exports2 < "u" ? _exp = exports2 : arg === window ? _exp = window : _exp = arg, _exp.hexy = hexy, _exp.Hexy = Hexy, _exp.maxnumberlen = maxnumberlen; })(exports2); } }); // node_modules/node-opcua-debug/dist/hexDump.js var require_hexDump = __commonJS({ "node_modules/node-opcua-debug/dist/hexDump.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.hexDump = hexDump; var hexy = require_hexy(); function hexDump(buffer, width = 32, maxSize = 1024) { return buffer ? (width = width || 32, buffer.length > maxSize ? hexy.hexy(buffer.subarray(0, maxSize), { width, format: "twos" }) + ` .... ( ` + buffer.length + ")" : hexy.hexy(buffer, { width, format: "twos" })) : "<>"; } } }); // node_modules/node-opcua-debug/dist/dump_if.js var require_dump_if = __commonJS({ "node_modules/node-opcua-debug/dist/dump_if.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.dump = dump; exports2.dumpIf = dumpIf; var util_1 = require("util"); function dump(obj) { console.log(` `, (0, util_1.inspect)(JSON.parse(JSON.stringify(obj)), { colors: !0, depth: 10 })); } function dumpIf(condition, obj) { condition && dump(obj); } } }); // node_modules/node-opcua-debug/dist/index.js var require_dist3 = __commonJS({ "node_modules/node-opcua-debug/dist/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.setTraceLogger = exports2.setErrorLogger = exports2.setWarningLogger = exports2.setDebugLogger = exports2.setLogLevel = exports2.LogLevel = exports2.dumpIf = exports2.dump = exports2.hexDump = exports2.inlineText = exports2.makeBufferFromTrace = exports2.messageLogger = exports2.make_traceLog = exports2.make_warningLog = exports2.make_errorLog = exports2.make_debugLog = exports2.setDebugFlag = exports2.checkDebugFlag = exports2.displayTraceFromThisProjectOnly = exports2.traceFromThisProjectOnly = exports2.removeDecoration = void 0; var remove_decoration_1 = require_remove_decoration(); Object.defineProperty(exports2, "removeDecoration", { enumerable: !0, get: function() { return remove_decoration_1.removeDecoration; } }); var display_trace_1 = require_display_trace(); Object.defineProperty(exports2, "traceFromThisProjectOnly", { enumerable: !0, get: function() { return display_trace_1.traceFromThisProjectOnly; } }); Object.defineProperty(exports2, "displayTraceFromThisProjectOnly", { enumerable: !0, get: function() { return display_trace_1.displayTraceFromThisProjectOnly; } }); var make_loggers_1 = require_make_loggers(); Object.defineProperty(exports2, "checkDebugFlag", { enumerable: !0, get: function() { return make_loggers_1.checkDebugFlag; } }); Object.defineProperty(exports2, "setDebugFlag", { enumerable: !0, get: function() { return make_loggers_1.setDebugFlag; } }); Object.defineProperty(exports2, "make_debugLog", { enumerable: !0, get: function() { return make_loggers_1.make_debugLog; } }); Object.defineProperty(exports2, "make_errorLog", { enumerable: !0, get: function() { return make_loggers_1.make_errorLog; } }); Object.defineProperty(exports2, "make_warningLog", { enumerable: !0, get: function() { return make_loggers_1.make_warningLog; } }); Object.defineProperty(exports2, "make_traceLog", { enumerable: !0, get: function() { return make_loggers_1.make_traceLog; } }); Object.defineProperty(exports2, "messageLogger", { enumerable: !0, get: function() { return make_loggers_1.messageLogger; } }); var make_buffer_from_trace_1 = require_make_buffer_from_trace(); Object.defineProperty(exports2, "makeBufferFromTrace", { enumerable: !0, get: function() { return make_buffer_from_trace_1.makeBufferFromTrace; } }); Object.defineProperty(exports2, "inlineText", { enumerable: !0, get: function() { return make_buffer_from_trace_1.inlineText; } }); var hexDump_1 = require_hexDump(); Object.defineProperty(exports2, "hexDump", { enumerable: !0, get: function() { return hexDump_1.hexDump; } }); var dump_if_1 = require_dump_if(); Object.defineProperty(exports2, "dump", { enumerable: !0, get: function() { return dump_if_1.dump; } }); Object.defineProperty(exports2, "dumpIf", { enumerable: !0, get: function() { return dump_if_1.dumpIf; } }); var make_loggers_2 = require_make_loggers(); Object.defineProperty(exports2, "LogLevel", { enumerable: !0, get: function() { return make_loggers_2.LogLevel; } }); Object.defineProperty(exports2, "setLogLevel", { enumerable: !0, get: function() { return make_loggers_2.setLogLevel; } }); Object.defineProperty(exports2, "setDebugLogger", { enumerable: !0, get: function() { return make_loggers_2.setDebugLogger; } }); Object.defineProperty(exports2, "setWarningLogger", { enumerable: !0, get: function() { return make_loggers_2.setWarningLogger; } }); Object.defineProperty(exports2, "setErrorLogger", { enumerable: !0, get: function() { return make_loggers_2.setErrorLogger; } }); Object.defineProperty(exports2, "setTraceLogger", { enumerable: !0, get: function() { return make_loggers_2.setTraceLogger; } }); } }); // node_modules/node-opcua-object-registry/dist/objectRegistry.js var require_objectRegistry = __commonJS({ "node_modules/node-opcua-object-registry/dist/objectRegistry.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.ObjectRegistry = void 0; var node_opcua_assert_1 = require_dist(), node_opcua_debug_1 = require_dist3(), gRegistries = [], hashCounter = 1, ObjectRegistry = class _ObjectRegistry { constructor() { this._cache = {}, gRegistries.push(this); } getClassName() { return this._objectTypeName ? this._objectTypeName : "<???>"; } register(obj) { this._objectTypeName || (this._objectTypeName = obj.constructor.name), obj._____hash || (obj._____hash = hashCounter, hashCounter += 1, this._cache[obj._____hash] = obj), _ObjectRegistry.doDebug && (obj._____trace = (0, node_opcua_debug_1.traceFromThisProjectOnly)()); } unregister(obj) { this._cache[obj._____hash] = null, obj._____trace = null, delete this._cache[obj._____hash]; } count() { return Object.keys(this._cache).length; } toString() { let str = " className :" + this.getClassName() + " found => " + this.count() + ` object leaking `; for (let obj of Object.values(this._cache)) str += obj.constructor.name + " " + obj.toString() + ` `; if (_ObjectRegistry.doDebug) for (let [key, cachedObject] of Object.entries(this._cache)) (0, node_opcua_assert_1.assert)(Object.prototype.hasOwnProperty.call(cachedObject, "_____trace")), str += " " + key + cachedObject._____trace + ` `; return str; } }; exports2.ObjectRegistry = ObjectRegistry; ObjectRegistry.doDebug = !1; ObjectRegistry.registries = gRegistries; ObjectRegistry.doDebug = typeof process == "object" ? !!process?.env?.NODEOPCUA_REGISTRY?.match(/DEBUG/) : !1; ObjectRegistry.doDebug && console.log("ObjectRegistry.doDebug = ", ObjectRegistry.doDebug); } }); // node_modules/node-opcua-object-registry/dist/index.js var require_dist4 = __commonJS({ "node_modules/node-opcua-object-registry/dist/index.js"(exports2) { "use strict"; var __createBinding3 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { k2 === void 0 && (k2 = k); var desc = Object.getOwnPropertyDescriptor(m, k); (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) && (desc = { enumerable: !0, get: function() { return m[k]; } }), Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { k2 === void 0 && (k2 = k), o[k2] = m[k]; }), __exportStar3 = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p) && __createBinding3(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: !0 }); __exportStar3(require_objectRegistry(), exports2); } }); // node_modules/node-opcua-client/dist/client_base.js var require_client_base = __commonJS({ "node_modules/node-opcua-client/dist/client_base.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: !0 }); exports2.OPCUAClientBase = void 0; var node_opcua_object_registry_1 = require_dist4(), OPCUAClientBase = class { static create(options2) { throw new Error("Not Implemented"); } }; exports2.OPCUAClientBase = OPCUAClientBase; OPCUAClientBase.registry = new node_opcua_object_registry_1.ObjectRegistry(); OPCUAClientBase.retryDelay = 1e3 * 5; } }); // node_modules/jsrsasign/lib/jsrsasign.js var require_jsrsasign = __commonJS({ "node_modules/jsrsasign/lib/jsrsasign.js"(exports2) { var navigator2 = {}; navigator2.userAgent = !1; var window2 = {}, VERSION = "11.1.0", VERSION_FULL = "jsrsasign(all) 11.1.0 (2024-02-01) (c) 2010-2023 Kenji Urushima | kjur.github.io/jsrsasign/license"; var CryptoJS = CryptoJS || function(e, g) { var a = {}, b = a.lib = {}, j = b.Base = /* @__PURE__ */ function() { function n() { } return { extend: function(p) { n.prototype = this; var o = new n(); return p && o.mixIn(p), o.hasOwnProperty("init") || (o.init = function() { o.$super.init.apply(this, arguments); }), o.init.prototype = o, o.$super = this, o; }, create: function() { var o = this.extend(); return o.init.apply(o, arguments), o; }, init: function() { }, mixIn: function(p) { for (var o in p) p.hasOwnProperty(o) && (this[o] = p[o]); p.hasOwnProperty("toString") && (this.toString = p.toString); }, clone: function() { return this.init.prototype.extend(this); } }; }(), l = b.WordArray = j.extend({ init: function(o, n) { o = this.words = o || [], n != g ? this.sigBytes = n : this.sigBytes = o.length * 4; }, toString: function(n) { return (n || h).stringify(this); }, concat: function(t2) { var q2 = this.words, p = t2.words, n = this.sigBytes, s = t2.sigBytes; if (this.clamp(), n % 4) for (var r = 0; r < s; r++) { var o = p[r >>> 2] >>> 24 - r % 4 * 8 & 255; q2[n + r >>> 2] |= o << 24 - (n + r) % 4 * 8; } else for (var r = 0; r < s; r += 4) q2[n + r >>> 2] = p[r >>> 2]; return this.sigBytes += s, this; }, clamp: function() { var o = this.words, n = this.sigBytes; o[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, o.length = e.ceil(n / 4); }, clone: function() { var n = j.clone.call(this); return n.words = this.words.slice(0), n; }, random: function(p) { for (var o = [], n = 0; n < p; n += 4) o.push(e.random() * 4294967296 | 0); return new l.init(o, p); } }), m = a.enc = {}, h = m.Hex = { stringify: function(p) { for (var r = p.words, o = p.sigBytes, q2 = [], n = 0; n < o; n++) { var s = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; q2.push((s >>> 4).toString(16)), q2.push((s & 15).toString(16)); } return q2.join(""); }, parse: function(p) { for (var n = p.length, q2 = [], o = 0; o < n; o += 2) q2[o >>> 3] |= parseInt(p.substr(o, 2), 16) << 24 - o % 8 * 4; return new l.init(q2, n / 2); } }, d = m.Latin1 = { stringify: function(q2) { for (var r = q2.words, p = q2.sigBytes, n = [], o = 0; o < p; o++) { var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255; n.push(String.fromCharCode(s)); } return n.join(""); }, parse: function(p) { for (var n = p.length, q2 = [], o = 0; o < n; o++) q2[o >>> 2] |= (p.charCodeAt(o) & 255) << 24 - o % 4 * 8; return new l.init(q2, n); } }, c = m.Utf8 = { stringify: function(n) { try { return decodeURIComponent(escape(d.stringify(n))); } catch { throw new Error("Malformed UTF-8 data"); } }, parse: function(n) { return d.parse(unescape(encodeURIComponent(n))); } }, i = b.BufferedBlockAlgorithm = j.extend({ reset: function() { this._data = new l.init(), this._nDataBytes = 0; }, _append: function(n) { typeof n == "string" && (n = c.parse(n)), this._data.concat(n), this._nDataBytes += n.sigBytes; }, _process: function(w3) { var q2 = this._data, x = q2.words, n = q2.sigBytes, t2 = this.blockSize, v = t2 * 4, u = n / v; w3 ? u = e.ceil(u) : u = e.max((u | 0) - this._minBufferSize, 0); var s = u * t2, r = e.min(s * 4, n); if (s) { for (var p = 0; p < s; p += t2) this._doProcessBlock(x, p); var o = x.splice(0, s); q2.sigBytes -= r; } return new l.init(o, r); }, clone: function() { var n = j.clone.call(this); return n._data = this._data.clone(), n; }, _minBufferSize: 0 }), f2 = b.Hasher = i.extend({ cfg: j.extend(), init: function(n) { this.cfg = this.cfg.extend(n), this.reset(); }, reset: function() { i.reset.call(this), this._doReset(); }, update: function(n) { return this._append(n), this._process(), this; }, finalize: function(n) { n && this._append(n); var o = this._doFinalize(); return o; }, blockSize: 512 / 32, _createHelper: function(n) { return function(p, o) { return new n.init(o).finalize(p); }; }, _createHmacHelper: function(n) { return function(p, o) { return new k.HMAC.init(n, o).finalize(p); }; } }), k = a.algo = {}; return a; }(Math); (function(g) { var a = CryptoJS, f2 = a.lib, e = f2.Base, h = f2.WordArray, a = a.x64 = {}; a.Word = e.extend({ init: function(b, c) { this.high = b, this.low = c; } }), a.WordArray = e.extend({ init: function(b, c) { b = this.words = b || [], this.sigBytes = c != g ? c : 8 * b.length; }, toX32: function() { for (var b = this.words, c = b.length, a2 = [], d = 0; d < c; d++) { var e2 = b[d]; a2.push(e2.high), a2.push(e2.low); } return h.create(a2, this.sigBytes); }, clone: function() { for (var b = e.clone.call(this), c = b.words = this.words.slice(0), a2 = c.length, d = 0; d < a2; d++) c[d] = c[d].clone(); return b; } }); })(); CryptoJS.lib.Cipher || function(u) { var g = CryptoJS, f2 = g.lib, k = f2.Base, l = f2.WordArray, q2 = f2.BufferedBlockAlgorithm, r = g.enc.Base64, v = g.algo.EvpKDF, n = f2.Cipher = q2.extend({ cfg: k.extend(), createEncryptor: function(a, b) { return this.create(this._ENC_XFORM_MODE, a, b); }, createDecryptor: function(a, b) { return this.create(this._DEC_XFORM_MODE, a, b); }, init: function(a, b, c) { this.cfg = this.cfg.extend(c), this._xformMode = a, this._key = b, this.reset(); }, reset: function() { q2.reset.call(this), this._doReset(); }, process: function(a) { return this._append(a), this._process(); }, finalize: function(a) { return a && this._append(a), this._doFinalize(); }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function(a) { return { encrypt: function(b, c, d) { return (typeof c == "string" ? s : j).encrypt(a, b, c, d); }, decrypt: function(b, c, d) { return (typeof c == "string" ? s : j).decrypt(a, b, c, d); } }; } }); f2.StreamCipher = n.extend({ _doFinalize: function() { return this._process(!0); }, blockSize: 1 }); var m = g.mode = {}, t2 = function(a, b, c) { var d = this._iv; d ? this._iv = u : d = this._prevBlock; for (var e = 0; e < c; e++) a[b + e] ^= d[e]; }, h = (f2.BlockCipherMode = k.extend({ createEncryptor: function(a, b) { return this.Encryptor.create(a, b); }, createDecryptor: function(a, b) { return this.Decryptor.create(a, b); }, init: function(a, b) { this._cipher = a, this._iv = b; } })).extend(); h.Encryptor = h.extend({ processBlock: function(a, b) { var c = this._cipher, d = c.blockSize; t2.call(this, a, b, d), c.encryptBlock(a, b), this._prevBlock = a.slice(b, b + d); } }), h.Decryptor = h.extend({ processBlock: function(a, b) { var c = this._cipher, d = c.blockSize, e = a.slice(b, b + d); c.decryptBlock( a, b ), t2.call(this, a, b, d), this._prevBlock = e; } }), m = m.CBC = h, h = (g.pad = {}).Pkcs7 = { pad: function(a, b) { for (var c = 4 * b, c = c - a.sigBytes % c, d = c << 24 | c << 16 | c << 8 | c, e = [], f3 = 0; f3 < c; f3 += 4) e.push(d); c = l.create(e, c), a.concat(c); }, unpad: function(a) { a.sigBytes -= a.words[a.sigBytes - 1 >>> 2] & 255; } }, f2.BlockCipher = n.extend({ cfg: n.cfg.extend({ mode: m, padding: h }), reset: function() { n.reset.call(this); var a = this.cfg, b = a.iv, a = a.mode; if (this._xformMode == this._ENC_XFORM_MODE) var c = a.createEncryptor; else c = a.createDecryptor, this._minBufferSize = 1; this._mode = c.call(a, this, b && b.words); }, _doProcessBlock: function(a, b) { this._mode.processBlock(a, b); }, _doFinalize: function() { var a = this.cfg.padding; if (this._xformMode == this._ENC_XFORM_MODE) { a.pad(this._data, this.blockSize); var b = this._process(!0); } else b = this._process(!0), a.unpad(b); return b; }, blockSize: 4 }); var p = f2.CipherParams = k.extend({ init: function(a) { this.mixIn(a); }, toString: function(a) { return (a || this.formatter).stringify(this); } }), m = (g.format = {}).OpenSSL = { stringify: function(a) { var b = a.ciphertext; return a = a.salt, (a ? l.create([1398893684, 1701076831]).concat(a).concat(b) : b).toString(r); }, parse: function(a) { a = r.parse(a); var b = a.words; if (b[0] == 1398893684 && b[1] == 1701076831) { var c = l.create(b.slice(2, 4)); b.splice(0, 4), a.sigBytes -= 16; } return p.create({ ciphertext: a, salt: c }); } }, j = f2.SerializableCipher = k.extend({ cfg: k.extend({ format: m }), encrypt: function(a, b, c, d) { d = this.cfg.extend(d); var e = a.createEncryptor(c, d); return b = e.finalize(b), e = e.cfg, p.create({ ciphertext: b, key: c, iv: e.iv, algorithm: a, mode: e.mode, padding: e.padding, blockSize: a.blockSize, formatter: d.format }); }, decrypt: function(a, b, c, d) { return d = this.cfg.extend(d), b = this._parse(b, d.format), a.createDecryptor(c, d).finalize(b.ciphertext); }, _parse: function(a, b) { return typeof a == "string" ? b.parse(a, this) : a; } }), g = (g.kdf = {}).OpenSSL = { execute: function(a, b, c, d) { return d || (d = l.random(8)), a = v.create({ keySize: b + c }).compute(a, d), c = l.create(a.words.slice(b), 4 * c), a.sigBytes = 4 * b, p.create({ key: a, iv: c, salt: d }); } }, s = f2.PasswordBasedCipher = j.extend({ cfg: j.cfg.extend({ kdf: g }), encrypt: function(a, b, c, d) { return d = this.cfg.extend(d), c = d.kdf.execute(c, a.keySize, a.ivSize), d.iv = c.iv, a = j.encrypt.call(this, a, b, c.key, d), a.mixIn(c), a; }, decrypt: function(a, b, c, d) { return d = this.cfg.extend(d), b = this._parse(b, d.format), c = d.kdf.execute(c, a.keySize, a.ivSize, b.salt), d.iv = c.iv, j.decrypt.call(this, a, b, c.key, d); } }); }(); (function() { for (var q2 = CryptoJS, x = q2.lib.BlockCipher, r = q2.algo, j = [], y = [], z2 = [], A = [], B = [], C = [], s = [], u = [], v = [], w3 = [], g = [], k = 0; 256 > k; k++) g[k] = 128 > k ? k << 1 : k << 1 ^ 283; for (var n = 0, l = 0, k = 0; 256 > k; k++) { var f2 = l ^ l << 1 ^ l << 2 ^ l << 3 ^ l << 4, f2 = f2 >>> 8 ^ f2 & 255 ^ 99; j[n] = f2, y[f2] = n; var t2 = g[n], D = g[t2], E = g[D], b = 257 * g[f2] ^ 16843008 * f2; z2[n] = b << 24 | b >>> 8, A[n] = b << 16 | b >>> 16, B[n] = b << 8 | b >>> 24, C[n] = b, b = 16843009 * E ^ 65537 * D ^ 257 * t2 ^ 16843008 * n, s[f2] = b << 24 | b >>> 8, u[f2] = b << 16 | b >>> 16, v[f2] = b << 8 | b >>> 24, w3[f2] = b, n ? (n = t2 ^ g[g[g[E ^ t2]]], l ^= g[g[l]]) : n = l = 1; } var F = [ 0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54 ], r = r.AES = x.extend({ _doReset: function() { for (var c = this._key, e = c.words, a = c.sigBytes / 4, c = 4 * ((this._nRounds = a + 6) + 1), b2 = this._keySchedule = [], h = 0; h < c; h++) if (h < a) b2[h] = e[h]; else { var d = b2[h - 1]; h % a ? 6 < a && h % a == 4 && (d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255]) : (d = d << 8 | d >>> 24, d = j[d >>> 24] << 24 | j[d >>> 16 & 255] << 16 | j[d >>> 8 & 255] << 8 | j[d & 255], d ^= F[h / a | 0] << 24), b2[h] = b2[h - a] ^ d; } for (e = this._invKeySchedule = [], a = 0; a < c; a++) h = c - a, d = a % 4 ? b2[h] : b2[h - 4], e[a] = 4 > a || 4 >= h ? d : s[j[d >>> 24]] ^ u[j[d >>> 16 & 255]] ^ v[j[d >>> 8 & 255]] ^ w3[j[d & 255]]; }, encryptBlock: function(c, e) { this._doCryptBlock(c, e, this._keySchedule, z2, A, B, C, j); }, decryptBlock: function(c, e) { var a = c[e + 1]; c[e + 1] = c[e + 3], c[e + 3] = a, this._doCryptBlock(c, e, this._invKeySchedule, s, u, v, w3, y), a = c[e + 1], c[e + 1] = c[e + 3], c[e + 3] = a; }, _doCryptBlock: function(c, e, a, b2, h, d, j2, m) { for (var n2 = this._nRounds, f3 = c[e] ^ a[0], g2 = c[e + 1] ^ a[1], k2 = c[e + 2] ^ a[2], p = c[e + 3] ^ a[3], l2 = 4, t3 = 1; t3 < n2; t3++) var q3 = b2[f3 >>> 24] ^ h[g2 >>> 16 & 255] ^ d[k2 >>> 8 & 255] ^ j2[p & 255] ^ a[l2++], r2 = b2[g2 >>> 24] ^ h[k2 >>> 16 & 255] ^ d[p >>> 8 & 255] ^ j2[f3 & 255] ^ a[l2++], s2 = b2[k2 >>> 24] ^ h[p >>> 16 & 255] ^ d[f3 >>> 8 & 255] ^ j2[g2 & 255] ^ a[l2++], p = b2[p >>> 24] ^ h[f3 >>> 16 & 255] ^ d[g2 >>> 8 & 255] ^ j2[k2 & 255] ^ a[l2++], f3 = q3, g2 = r2, k2 = s2; q3 = (m[f3 >>> 24] << 24 | m[g2 >>> 16 & 255] << 16 | m[k2 >>> 8 & 255] << 8 | m[p & 255]) ^ a[l2++], r2 = (m[g2 >>> 24] << 24 | m[k2 >>> 16 & 255] << 16 | m[p >>> 8 & 255] << 8 | m[f3 & 255]) ^ a[l2++], s2 = (m[k2 >>> 24] << 24 | m[p >>> 16 & 255] << 16 | m[f3 >>> 8 & 255] << 8 | m[g2 & 255]) ^ a[l2++], p = (m[p >>> 24] << 24 | m[f3 >>> 16 & 255] << 16 | m[g2 >>> 8 & 255] << 8 | m[k2 & 255]) ^ a[l2++], c[e] = q3, c[e + 1] = r2, c[e + 2] = s2, c[e + 3] = p; }, keySize: 8 }); q2.AES = x._createHelper(r); })(); (function() { function j(b, c) { var a = (this._lBlock >>> b ^ this._rBlock) & c; this._rBlock ^= a, this._lBlock ^= a << b; } function l(b, c) { var a = (this._rBlock >>> b ^ this._lBlock) & c; this._lBlock ^= a, this._rBlock ^= a << b; } var h = CryptoJS, e = h.lib, n = e.WordArray, e = e.BlockCipher, g = h.algo, q2 = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], p = [ 14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32 ], r = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], s = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282,