@nsshunt/stsuxvue 1.0.56 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stsuxvue.mjs +84 -589
- package/dist/stsuxvue.mjs.map +1 -1
- package/dist/stsuxvue.umd.js +86 -586
- package/dist/stsuxvue.umd.js.map +1 -1
- package/package.json +4 -4
package/dist/stsuxvue.mjs
CHANGED
|
@@ -4,11 +4,6 @@ import { defineComponent, defineAsyncComponent, ref, createElementBlock, openBlo
|
|
|
4
4
|
import { Gauge, ObservabilitySocketIOSubscriber, ObservabilityRESTAPISubscriber, ObservabilitySubscriptionManager, SubscriptionTopic } from "@nsshunt/stsobservability";
|
|
5
5
|
import { defaultLogger } from "@nsshunt/stsutils";
|
|
6
6
|
import { io } from "socket.io-client";
|
|
7
|
-
import "socket.io";
|
|
8
|
-
import "ioredis";
|
|
9
|
-
import require$$0$2 from "node:cluster";
|
|
10
|
-
import require$$1$2 from "socket.io-adapter";
|
|
11
|
-
import "@socket.io/redis-streams-adapter";
|
|
12
7
|
var _estate = /* @__PURE__ */ ((_estate2) => {
|
|
13
8
|
_estate2["IDLE"] = "idle";
|
|
14
9
|
_estate2["STARTING"] = "starting";
|
|
@@ -6013,9 +6008,9 @@ function createDOMPurify() {
|
|
|
6013
6008
|
return DOMPurify;
|
|
6014
6009
|
}
|
|
6015
6010
|
let {
|
|
6016
|
-
document
|
|
6011
|
+
document
|
|
6017
6012
|
} = window2;
|
|
6018
|
-
const originalDocument =
|
|
6013
|
+
const originalDocument = document;
|
|
6019
6014
|
const currentScript = originalDocument.currentScript;
|
|
6020
6015
|
const {
|
|
6021
6016
|
DocumentFragment,
|
|
@@ -6035,9 +6030,9 @@ function createDOMPurify() {
|
|
|
6035
6030
|
const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
|
|
6036
6031
|
const getParentNode = lookupGetter(ElementPrototype, "parentNode");
|
|
6037
6032
|
if (typeof HTMLTemplateElement === "function") {
|
|
6038
|
-
const template =
|
|
6033
|
+
const template = document.createElement("template");
|
|
6039
6034
|
if (template.content && template.content.ownerDocument) {
|
|
6040
|
-
|
|
6035
|
+
document = template.content.ownerDocument;
|
|
6041
6036
|
}
|
|
6042
6037
|
}
|
|
6043
6038
|
let trustedTypesPolicy;
|
|
@@ -6047,7 +6042,7 @@ function createDOMPurify() {
|
|
|
6047
6042
|
createNodeIterator,
|
|
6048
6043
|
createDocumentFragment,
|
|
6049
6044
|
getElementsByTagName
|
|
6050
|
-
} =
|
|
6045
|
+
} = document;
|
|
6051
6046
|
const {
|
|
6052
6047
|
importNode
|
|
6053
6048
|
} = originalDocument;
|
|
@@ -6145,7 +6140,7 @@ function createDOMPurify() {
|
|
|
6145
6140
|
const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
|
|
6146
6141
|
let transformCaseFunc = null;
|
|
6147
6142
|
let CONFIG = null;
|
|
6148
|
-
const formElement =
|
|
6143
|
+
const formElement = document.createElement("form");
|
|
6149
6144
|
const isRegexOrFunction = function isRegexOrFunction2(testValue) {
|
|
6150
6145
|
return testValue instanceof RegExp || testValue instanceof Function;
|
|
6151
6146
|
};
|
|
@@ -6407,7 +6402,7 @@ function createDOMPurify() {
|
|
|
6407
6402
|
}
|
|
6408
6403
|
const body = doc.body || doc.documentElement;
|
|
6409
6404
|
if (dirty && leadingWhitespace) {
|
|
6410
|
-
body.insertBefore(
|
|
6405
|
+
body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
|
|
6411
6406
|
}
|
|
6412
6407
|
if (NAMESPACE === HTML_NAMESPACE) {
|
|
6413
6408
|
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
|
|
@@ -6506,7 +6501,7 @@ function createDOMPurify() {
|
|
|
6506
6501
|
return false;
|
|
6507
6502
|
};
|
|
6508
6503
|
const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
|
|
6509
|
-
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in
|
|
6504
|
+
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) {
|
|
6510
6505
|
return false;
|
|
6511
6506
|
}
|
|
6512
6507
|
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
|
|
@@ -6895,8 +6890,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
6895
6890
|
return retVal;
|
|
6896
6891
|
}, "") + "]";
|
|
6897
6892
|
};
|
|
6898
|
-
const convertMS = function(
|
|
6899
|
-
let s = Math.floor(
|
|
6893
|
+
const convertMS = function(ms) {
|
|
6894
|
+
let s = Math.floor(ms / 1e3);
|
|
6900
6895
|
let m = Math.floor(s / 60);
|
|
6901
6896
|
s = s % 60;
|
|
6902
6897
|
let h = Math.floor(m / 60);
|
|
@@ -8342,16 +8337,16 @@ function requireAnsiStyles() {
|
|
|
8342
8337
|
})(ansiStyles);
|
|
8343
8338
|
return ansiStyles.exports;
|
|
8344
8339
|
}
|
|
8345
|
-
var browser
|
|
8346
|
-
var hasRequiredBrowser
|
|
8347
|
-
function requireBrowser
|
|
8348
|
-
if (hasRequiredBrowser
|
|
8349
|
-
hasRequiredBrowser
|
|
8350
|
-
browser
|
|
8340
|
+
var browser;
|
|
8341
|
+
var hasRequiredBrowser;
|
|
8342
|
+
function requireBrowser() {
|
|
8343
|
+
if (hasRequiredBrowser) return browser;
|
|
8344
|
+
hasRequiredBrowser = 1;
|
|
8345
|
+
browser = {
|
|
8351
8346
|
stdout: false,
|
|
8352
8347
|
stderr: false
|
|
8353
8348
|
};
|
|
8354
|
-
return browser
|
|
8349
|
+
return browser;
|
|
8355
8350
|
}
|
|
8356
8351
|
var util;
|
|
8357
8352
|
var hasRequiredUtil;
|
|
@@ -8512,7 +8507,7 @@ function requireSource() {
|
|
|
8512
8507
|
if (hasRequiredSource) return source;
|
|
8513
8508
|
hasRequiredSource = 1;
|
|
8514
8509
|
const ansiStyles2 = requireAnsiStyles();
|
|
8515
|
-
const { stdout: stdoutColor, stderr: stderrColor } = requireBrowser
|
|
8510
|
+
const { stdout: stdoutColor, stderr: stderrColor } = requireBrowser();
|
|
8516
8511
|
const {
|
|
8517
8512
|
stringReplaceAll,
|
|
8518
8513
|
stringEncaseCRLFWithFirstIndex
|
|
@@ -8823,8 +8818,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8823
8818
|
return "";
|
|
8824
8819
|
}
|
|
8825
8820
|
};
|
|
8826
|
-
const convertMS = function(
|
|
8827
|
-
let s = Math.floor(
|
|
8821
|
+
const convertMS = function(ms) {
|
|
8822
|
+
let s = Math.floor(ms / 1e3);
|
|
8828
8823
|
let m = Math.floor(s / 60);
|
|
8829
8824
|
s = s % 60;
|
|
8830
8825
|
let h = Math.floor(m / 60);
|
|
@@ -9995,8 +9990,62 @@ function v4(options, buf, offset) {
|
|
|
9995
9990
|
}
|
|
9996
9991
|
return _v4(options);
|
|
9997
9992
|
}
|
|
9993
|
+
var tinyEmitter$1 = { exports: {} };
|
|
9994
|
+
var hasRequiredTinyEmitter$1;
|
|
9995
|
+
function requireTinyEmitter$1() {
|
|
9996
|
+
if (hasRequiredTinyEmitter$1) return tinyEmitter$1.exports;
|
|
9997
|
+
hasRequiredTinyEmitter$1 = 1;
|
|
9998
|
+
function E() {
|
|
9999
|
+
}
|
|
10000
|
+
E.prototype = {
|
|
10001
|
+
on: function(name, callback, ctx) {
|
|
10002
|
+
var e = this.e || (this.e = {});
|
|
10003
|
+
(e[name] || (e[name] = [])).push({
|
|
10004
|
+
fn: callback,
|
|
10005
|
+
ctx
|
|
10006
|
+
});
|
|
10007
|
+
return this;
|
|
10008
|
+
},
|
|
10009
|
+
once: function(name, callback, ctx) {
|
|
10010
|
+
var self = this;
|
|
10011
|
+
function listener() {
|
|
10012
|
+
self.off(name, listener);
|
|
10013
|
+
callback.apply(ctx, arguments);
|
|
10014
|
+
}
|
|
10015
|
+
listener._ = callback;
|
|
10016
|
+
return this.on(name, listener, ctx);
|
|
10017
|
+
},
|
|
10018
|
+
emit: function(name) {
|
|
10019
|
+
var data = [].slice.call(arguments, 1);
|
|
10020
|
+
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
|
|
10021
|
+
var i = 0;
|
|
10022
|
+
var len = evtArr.length;
|
|
10023
|
+
for (i; i < len; i++) {
|
|
10024
|
+
evtArr[i].fn.apply(evtArr[i].ctx, data);
|
|
10025
|
+
}
|
|
10026
|
+
return this;
|
|
10027
|
+
},
|
|
10028
|
+
off: function(name, callback) {
|
|
10029
|
+
var e = this.e || (this.e = {});
|
|
10030
|
+
var evts = e[name];
|
|
10031
|
+
var liveEvents = [];
|
|
10032
|
+
if (evts && callback) {
|
|
10033
|
+
for (var i = 0, len = evts.length; i < len; i++) {
|
|
10034
|
+
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
|
|
10035
|
+
liveEvents.push(evts[i]);
|
|
10036
|
+
}
|
|
10037
|
+
}
|
|
10038
|
+
liveEvents.length ? e[name] = liveEvents : delete e[name];
|
|
10039
|
+
return this;
|
|
10040
|
+
}
|
|
10041
|
+
};
|
|
10042
|
+
tinyEmitter$1.exports = E;
|
|
10043
|
+
tinyEmitter$1.exports.TinyEmitter = E;
|
|
10044
|
+
return tinyEmitter$1.exports;
|
|
10045
|
+
}
|
|
10046
|
+
var tinyEmitterExports$1 = requireTinyEmitter$1();
|
|
9998
10047
|
const isNode = Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
|
|
9999
|
-
class SocketIoClient {
|
|
10048
|
+
class SocketIoClient extends tinyEmitterExports$1.TinyEmitter {
|
|
10000
10049
|
#agentManager;
|
|
10001
10050
|
#logger;
|
|
10002
10051
|
#name;
|
|
@@ -10005,6 +10054,7 @@ class SocketIoClient {
|
|
|
10005
10054
|
#authToken;
|
|
10006
10055
|
#socket;
|
|
10007
10056
|
constructor(name) {
|
|
10057
|
+
super();
|
|
10008
10058
|
this.#name = name;
|
|
10009
10059
|
}
|
|
10010
10060
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -10072,13 +10122,15 @@ class SocketIoClient {
|
|
|
10072
10122
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10073
10123
|
ErrorCallBack(error) {
|
|
10074
10124
|
}
|
|
10075
|
-
|
|
10076
|
-
|
|
10077
|
-
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10125
|
+
/*
|
|
10126
|
+
emit<Ev extends EventNames<ClientToServerEvents>>(ev: Ev, ...args: EventParams<ClientToServerEvents, Ev>): Socket<ServerToClientEvents, ClientToServerEvents> {
|
|
10127
|
+
if (this.#socket) {
|
|
10128
|
+
return this.#socket!.emit(ev, ...args);
|
|
10129
|
+
} else {
|
|
10130
|
+
throw new Error('SocketIoClient:emit(): Error: [socket instance not defined.]');
|
|
10131
|
+
}
|
|
10081
10132
|
}
|
|
10133
|
+
*/
|
|
10082
10134
|
#EstablishSocketConnect() {
|
|
10083
10135
|
if (this.#socket !== void 0) {
|
|
10084
10136
|
if (this.#socket.connected === true) {
|
|
@@ -10190,563 +10242,6 @@ class SocketIoClient {
|
|
|
10190
10242
|
});
|
|
10191
10243
|
}
|
|
10192
10244
|
}
|
|
10193
|
-
var dist = {};
|
|
10194
|
-
var browser = { exports: {} };
|
|
10195
|
-
var ms;
|
|
10196
|
-
var hasRequiredMs;
|
|
10197
|
-
function requireMs() {
|
|
10198
|
-
if (hasRequiredMs) return ms;
|
|
10199
|
-
hasRequiredMs = 1;
|
|
10200
|
-
var s = 1e3;
|
|
10201
|
-
var m = s * 60;
|
|
10202
|
-
var h = m * 60;
|
|
10203
|
-
var d = h * 24;
|
|
10204
|
-
var w = d * 7;
|
|
10205
|
-
var y = d * 365.25;
|
|
10206
|
-
ms = function(val, options) {
|
|
10207
|
-
options = options || {};
|
|
10208
|
-
var type = typeof val;
|
|
10209
|
-
if (type === "string" && val.length > 0) {
|
|
10210
|
-
return parse(val);
|
|
10211
|
-
} else if (type === "number" && isFinite(val)) {
|
|
10212
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
10213
|
-
}
|
|
10214
|
-
throw new Error(
|
|
10215
|
-
"val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
|
|
10216
|
-
);
|
|
10217
|
-
};
|
|
10218
|
-
function parse(str) {
|
|
10219
|
-
str = String(str);
|
|
10220
|
-
if (str.length > 100) {
|
|
10221
|
-
return;
|
|
10222
|
-
}
|
|
10223
|
-
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
10224
|
-
str
|
|
10225
|
-
);
|
|
10226
|
-
if (!match) {
|
|
10227
|
-
return;
|
|
10228
|
-
}
|
|
10229
|
-
var n = parseFloat(match[1]);
|
|
10230
|
-
var type = (match[2] || "ms").toLowerCase();
|
|
10231
|
-
switch (type) {
|
|
10232
|
-
case "years":
|
|
10233
|
-
case "year":
|
|
10234
|
-
case "yrs":
|
|
10235
|
-
case "yr":
|
|
10236
|
-
case "y":
|
|
10237
|
-
return n * y;
|
|
10238
|
-
case "weeks":
|
|
10239
|
-
case "week":
|
|
10240
|
-
case "w":
|
|
10241
|
-
return n * w;
|
|
10242
|
-
case "days":
|
|
10243
|
-
case "day":
|
|
10244
|
-
case "d":
|
|
10245
|
-
return n * d;
|
|
10246
|
-
case "hours":
|
|
10247
|
-
case "hour":
|
|
10248
|
-
case "hrs":
|
|
10249
|
-
case "hr":
|
|
10250
|
-
case "h":
|
|
10251
|
-
return n * h;
|
|
10252
|
-
case "minutes":
|
|
10253
|
-
case "minute":
|
|
10254
|
-
case "mins":
|
|
10255
|
-
case "min":
|
|
10256
|
-
case "m":
|
|
10257
|
-
return n * m;
|
|
10258
|
-
case "seconds":
|
|
10259
|
-
case "second":
|
|
10260
|
-
case "secs":
|
|
10261
|
-
case "sec":
|
|
10262
|
-
case "s":
|
|
10263
|
-
return n * s;
|
|
10264
|
-
case "milliseconds":
|
|
10265
|
-
case "millisecond":
|
|
10266
|
-
case "msecs":
|
|
10267
|
-
case "msec":
|
|
10268
|
-
case "ms":
|
|
10269
|
-
return n;
|
|
10270
|
-
default:
|
|
10271
|
-
return void 0;
|
|
10272
|
-
}
|
|
10273
|
-
}
|
|
10274
|
-
function fmtShort(ms2) {
|
|
10275
|
-
var msAbs = Math.abs(ms2);
|
|
10276
|
-
if (msAbs >= d) {
|
|
10277
|
-
return Math.round(ms2 / d) + "d";
|
|
10278
|
-
}
|
|
10279
|
-
if (msAbs >= h) {
|
|
10280
|
-
return Math.round(ms2 / h) + "h";
|
|
10281
|
-
}
|
|
10282
|
-
if (msAbs >= m) {
|
|
10283
|
-
return Math.round(ms2 / m) + "m";
|
|
10284
|
-
}
|
|
10285
|
-
if (msAbs >= s) {
|
|
10286
|
-
return Math.round(ms2 / s) + "s";
|
|
10287
|
-
}
|
|
10288
|
-
return ms2 + "ms";
|
|
10289
|
-
}
|
|
10290
|
-
function fmtLong(ms2) {
|
|
10291
|
-
var msAbs = Math.abs(ms2);
|
|
10292
|
-
if (msAbs >= d) {
|
|
10293
|
-
return plural(ms2, msAbs, d, "day");
|
|
10294
|
-
}
|
|
10295
|
-
if (msAbs >= h) {
|
|
10296
|
-
return plural(ms2, msAbs, h, "hour");
|
|
10297
|
-
}
|
|
10298
|
-
if (msAbs >= m) {
|
|
10299
|
-
return plural(ms2, msAbs, m, "minute");
|
|
10300
|
-
}
|
|
10301
|
-
if (msAbs >= s) {
|
|
10302
|
-
return plural(ms2, msAbs, s, "second");
|
|
10303
|
-
}
|
|
10304
|
-
return ms2 + " ms";
|
|
10305
|
-
}
|
|
10306
|
-
function plural(ms2, msAbs, n, name) {
|
|
10307
|
-
var isPlural = msAbs >= n * 1.5;
|
|
10308
|
-
return Math.round(ms2 / n) + " " + name + (isPlural ? "s" : "");
|
|
10309
|
-
}
|
|
10310
|
-
return ms;
|
|
10311
|
-
}
|
|
10312
|
-
var common;
|
|
10313
|
-
var hasRequiredCommon;
|
|
10314
|
-
function requireCommon() {
|
|
10315
|
-
if (hasRequiredCommon) return common;
|
|
10316
|
-
hasRequiredCommon = 1;
|
|
10317
|
-
function setup(env) {
|
|
10318
|
-
createDebug.debug = createDebug;
|
|
10319
|
-
createDebug.default = createDebug;
|
|
10320
|
-
createDebug.coerce = coerce;
|
|
10321
|
-
createDebug.disable = disable;
|
|
10322
|
-
createDebug.enable = enable;
|
|
10323
|
-
createDebug.enabled = enabled;
|
|
10324
|
-
createDebug.humanize = requireMs();
|
|
10325
|
-
createDebug.destroy = destroy;
|
|
10326
|
-
Object.keys(env).forEach((key) => {
|
|
10327
|
-
createDebug[key] = env[key];
|
|
10328
|
-
});
|
|
10329
|
-
createDebug.names = [];
|
|
10330
|
-
createDebug.skips = [];
|
|
10331
|
-
createDebug.formatters = {};
|
|
10332
|
-
function selectColor(namespace) {
|
|
10333
|
-
let hash = 0;
|
|
10334
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
10335
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
10336
|
-
hash |= 0;
|
|
10337
|
-
}
|
|
10338
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
10339
|
-
}
|
|
10340
|
-
createDebug.selectColor = selectColor;
|
|
10341
|
-
function createDebug(namespace) {
|
|
10342
|
-
let prevTime;
|
|
10343
|
-
let enableOverride = null;
|
|
10344
|
-
let namespacesCache;
|
|
10345
|
-
let enabledCache;
|
|
10346
|
-
function debug(...args) {
|
|
10347
|
-
if (!debug.enabled) {
|
|
10348
|
-
return;
|
|
10349
|
-
}
|
|
10350
|
-
const self = debug;
|
|
10351
|
-
const curr = Number(/* @__PURE__ */ new Date());
|
|
10352
|
-
const ms2 = curr - (prevTime || curr);
|
|
10353
|
-
self.diff = ms2;
|
|
10354
|
-
self.prev = prevTime;
|
|
10355
|
-
self.curr = curr;
|
|
10356
|
-
prevTime = curr;
|
|
10357
|
-
args[0] = createDebug.coerce(args[0]);
|
|
10358
|
-
if (typeof args[0] !== "string") {
|
|
10359
|
-
args.unshift("%O");
|
|
10360
|
-
}
|
|
10361
|
-
let index = 0;
|
|
10362
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
10363
|
-
if (match === "%%") {
|
|
10364
|
-
return "%";
|
|
10365
|
-
}
|
|
10366
|
-
index++;
|
|
10367
|
-
const formatter = createDebug.formatters[format];
|
|
10368
|
-
if (typeof formatter === "function") {
|
|
10369
|
-
const val = args[index];
|
|
10370
|
-
match = formatter.call(self, val);
|
|
10371
|
-
args.splice(index, 1);
|
|
10372
|
-
index--;
|
|
10373
|
-
}
|
|
10374
|
-
return match;
|
|
10375
|
-
});
|
|
10376
|
-
createDebug.formatArgs.call(self, args);
|
|
10377
|
-
const logFn = self.log || createDebug.log;
|
|
10378
|
-
logFn.apply(self, args);
|
|
10379
|
-
}
|
|
10380
|
-
debug.namespace = namespace;
|
|
10381
|
-
debug.useColors = createDebug.useColors();
|
|
10382
|
-
debug.color = createDebug.selectColor(namespace);
|
|
10383
|
-
debug.extend = extend;
|
|
10384
|
-
debug.destroy = createDebug.destroy;
|
|
10385
|
-
Object.defineProperty(debug, "enabled", {
|
|
10386
|
-
enumerable: true,
|
|
10387
|
-
configurable: false,
|
|
10388
|
-
get: () => {
|
|
10389
|
-
if (enableOverride !== null) {
|
|
10390
|
-
return enableOverride;
|
|
10391
|
-
}
|
|
10392
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
10393
|
-
namespacesCache = createDebug.namespaces;
|
|
10394
|
-
enabledCache = createDebug.enabled(namespace);
|
|
10395
|
-
}
|
|
10396
|
-
return enabledCache;
|
|
10397
|
-
},
|
|
10398
|
-
set: (v) => {
|
|
10399
|
-
enableOverride = v;
|
|
10400
|
-
}
|
|
10401
|
-
});
|
|
10402
|
-
if (typeof createDebug.init === "function") {
|
|
10403
|
-
createDebug.init(debug);
|
|
10404
|
-
}
|
|
10405
|
-
return debug;
|
|
10406
|
-
}
|
|
10407
|
-
function extend(namespace, delimiter) {
|
|
10408
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
|
10409
|
-
newDebug.log = this.log;
|
|
10410
|
-
return newDebug;
|
|
10411
|
-
}
|
|
10412
|
-
function enable(namespaces) {
|
|
10413
|
-
createDebug.save(namespaces);
|
|
10414
|
-
createDebug.namespaces = namespaces;
|
|
10415
|
-
createDebug.names = [];
|
|
10416
|
-
createDebug.skips = [];
|
|
10417
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
10418
|
-
for (const ns of split) {
|
|
10419
|
-
if (ns[0] === "-") {
|
|
10420
|
-
createDebug.skips.push(ns.slice(1));
|
|
10421
|
-
} else {
|
|
10422
|
-
createDebug.names.push(ns);
|
|
10423
|
-
}
|
|
10424
|
-
}
|
|
10425
|
-
}
|
|
10426
|
-
function matchesTemplate(search, template) {
|
|
10427
|
-
let searchIndex = 0;
|
|
10428
|
-
let templateIndex = 0;
|
|
10429
|
-
let starIndex = -1;
|
|
10430
|
-
let matchIndex = 0;
|
|
10431
|
-
while (searchIndex < search.length) {
|
|
10432
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
10433
|
-
if (template[templateIndex] === "*") {
|
|
10434
|
-
starIndex = templateIndex;
|
|
10435
|
-
matchIndex = searchIndex;
|
|
10436
|
-
templateIndex++;
|
|
10437
|
-
} else {
|
|
10438
|
-
searchIndex++;
|
|
10439
|
-
templateIndex++;
|
|
10440
|
-
}
|
|
10441
|
-
} else if (starIndex !== -1) {
|
|
10442
|
-
templateIndex = starIndex + 1;
|
|
10443
|
-
matchIndex++;
|
|
10444
|
-
searchIndex = matchIndex;
|
|
10445
|
-
} else {
|
|
10446
|
-
return false;
|
|
10447
|
-
}
|
|
10448
|
-
}
|
|
10449
|
-
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
10450
|
-
templateIndex++;
|
|
10451
|
-
}
|
|
10452
|
-
return templateIndex === template.length;
|
|
10453
|
-
}
|
|
10454
|
-
function disable() {
|
|
10455
|
-
const namespaces = [
|
|
10456
|
-
...createDebug.names,
|
|
10457
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
10458
|
-
].join(",");
|
|
10459
|
-
createDebug.enable("");
|
|
10460
|
-
return namespaces;
|
|
10461
|
-
}
|
|
10462
|
-
function enabled(name) {
|
|
10463
|
-
for (const skip of createDebug.skips) {
|
|
10464
|
-
if (matchesTemplate(name, skip)) {
|
|
10465
|
-
return false;
|
|
10466
|
-
}
|
|
10467
|
-
}
|
|
10468
|
-
for (const ns of createDebug.names) {
|
|
10469
|
-
if (matchesTemplate(name, ns)) {
|
|
10470
|
-
return true;
|
|
10471
|
-
}
|
|
10472
|
-
}
|
|
10473
|
-
return false;
|
|
10474
|
-
}
|
|
10475
|
-
function coerce(val) {
|
|
10476
|
-
if (val instanceof Error) {
|
|
10477
|
-
return val.stack || val.message;
|
|
10478
|
-
}
|
|
10479
|
-
return val;
|
|
10480
|
-
}
|
|
10481
|
-
function destroy() {
|
|
10482
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
10483
|
-
}
|
|
10484
|
-
createDebug.enable(createDebug.load());
|
|
10485
|
-
return createDebug;
|
|
10486
|
-
}
|
|
10487
|
-
common = setup;
|
|
10488
|
-
return common;
|
|
10489
|
-
}
|
|
10490
|
-
var hasRequiredBrowser;
|
|
10491
|
-
function requireBrowser() {
|
|
10492
|
-
if (hasRequiredBrowser) return browser.exports;
|
|
10493
|
-
hasRequiredBrowser = 1;
|
|
10494
|
-
(function(module, exports) {
|
|
10495
|
-
exports.formatArgs = formatArgs;
|
|
10496
|
-
exports.save = save;
|
|
10497
|
-
exports.load = load;
|
|
10498
|
-
exports.useColors = useColors;
|
|
10499
|
-
exports.storage = localstorage();
|
|
10500
|
-
exports.destroy = /* @__PURE__ */ (() => {
|
|
10501
|
-
let warned = false;
|
|
10502
|
-
return () => {
|
|
10503
|
-
if (!warned) {
|
|
10504
|
-
warned = true;
|
|
10505
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
10506
|
-
}
|
|
10507
|
-
};
|
|
10508
|
-
})();
|
|
10509
|
-
exports.colors = [
|
|
10510
|
-
"#0000CC",
|
|
10511
|
-
"#0000FF",
|
|
10512
|
-
"#0033CC",
|
|
10513
|
-
"#0033FF",
|
|
10514
|
-
"#0066CC",
|
|
10515
|
-
"#0066FF",
|
|
10516
|
-
"#0099CC",
|
|
10517
|
-
"#0099FF",
|
|
10518
|
-
"#00CC00",
|
|
10519
|
-
"#00CC33",
|
|
10520
|
-
"#00CC66",
|
|
10521
|
-
"#00CC99",
|
|
10522
|
-
"#00CCCC",
|
|
10523
|
-
"#00CCFF",
|
|
10524
|
-
"#3300CC",
|
|
10525
|
-
"#3300FF",
|
|
10526
|
-
"#3333CC",
|
|
10527
|
-
"#3333FF",
|
|
10528
|
-
"#3366CC",
|
|
10529
|
-
"#3366FF",
|
|
10530
|
-
"#3399CC",
|
|
10531
|
-
"#3399FF",
|
|
10532
|
-
"#33CC00",
|
|
10533
|
-
"#33CC33",
|
|
10534
|
-
"#33CC66",
|
|
10535
|
-
"#33CC99",
|
|
10536
|
-
"#33CCCC",
|
|
10537
|
-
"#33CCFF",
|
|
10538
|
-
"#6600CC",
|
|
10539
|
-
"#6600FF",
|
|
10540
|
-
"#6633CC",
|
|
10541
|
-
"#6633FF",
|
|
10542
|
-
"#66CC00",
|
|
10543
|
-
"#66CC33",
|
|
10544
|
-
"#9900CC",
|
|
10545
|
-
"#9900FF",
|
|
10546
|
-
"#9933CC",
|
|
10547
|
-
"#9933FF",
|
|
10548
|
-
"#99CC00",
|
|
10549
|
-
"#99CC33",
|
|
10550
|
-
"#CC0000",
|
|
10551
|
-
"#CC0033",
|
|
10552
|
-
"#CC0066",
|
|
10553
|
-
"#CC0099",
|
|
10554
|
-
"#CC00CC",
|
|
10555
|
-
"#CC00FF",
|
|
10556
|
-
"#CC3300",
|
|
10557
|
-
"#CC3333",
|
|
10558
|
-
"#CC3366",
|
|
10559
|
-
"#CC3399",
|
|
10560
|
-
"#CC33CC",
|
|
10561
|
-
"#CC33FF",
|
|
10562
|
-
"#CC6600",
|
|
10563
|
-
"#CC6633",
|
|
10564
|
-
"#CC9900",
|
|
10565
|
-
"#CC9933",
|
|
10566
|
-
"#CCCC00",
|
|
10567
|
-
"#CCCC33",
|
|
10568
|
-
"#FF0000",
|
|
10569
|
-
"#FF0033",
|
|
10570
|
-
"#FF0066",
|
|
10571
|
-
"#FF0099",
|
|
10572
|
-
"#FF00CC",
|
|
10573
|
-
"#FF00FF",
|
|
10574
|
-
"#FF3300",
|
|
10575
|
-
"#FF3333",
|
|
10576
|
-
"#FF3366",
|
|
10577
|
-
"#FF3399",
|
|
10578
|
-
"#FF33CC",
|
|
10579
|
-
"#FF33FF",
|
|
10580
|
-
"#FF6600",
|
|
10581
|
-
"#FF6633",
|
|
10582
|
-
"#FF9900",
|
|
10583
|
-
"#FF9933",
|
|
10584
|
-
"#FFCC00",
|
|
10585
|
-
"#FFCC33"
|
|
10586
|
-
];
|
|
10587
|
-
function useColors() {
|
|
10588
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
10589
|
-
return true;
|
|
10590
|
-
}
|
|
10591
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
10592
|
-
return false;
|
|
10593
|
-
}
|
|
10594
|
-
let m;
|
|
10595
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
10596
|
-
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
10597
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
10598
|
-
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
10599
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
10600
|
-
}
|
|
10601
|
-
function formatArgs(args) {
|
|
10602
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module.exports.humanize(this.diff);
|
|
10603
|
-
if (!this.useColors) {
|
|
10604
|
-
return;
|
|
10605
|
-
}
|
|
10606
|
-
const c = "color: " + this.color;
|
|
10607
|
-
args.splice(1, 0, c, "color: inherit");
|
|
10608
|
-
let index = 0;
|
|
10609
|
-
let lastC = 0;
|
|
10610
|
-
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
10611
|
-
if (match === "%%") {
|
|
10612
|
-
return;
|
|
10613
|
-
}
|
|
10614
|
-
index++;
|
|
10615
|
-
if (match === "%c") {
|
|
10616
|
-
lastC = index;
|
|
10617
|
-
}
|
|
10618
|
-
});
|
|
10619
|
-
args.splice(lastC, 0, c);
|
|
10620
|
-
}
|
|
10621
|
-
exports.log = console.debug || console.log || (() => {
|
|
10622
|
-
});
|
|
10623
|
-
function save(namespaces) {
|
|
10624
|
-
try {
|
|
10625
|
-
if (namespaces) {
|
|
10626
|
-
exports.storage.setItem("debug", namespaces);
|
|
10627
|
-
} else {
|
|
10628
|
-
exports.storage.removeItem("debug");
|
|
10629
|
-
}
|
|
10630
|
-
} catch (error) {
|
|
10631
|
-
}
|
|
10632
|
-
}
|
|
10633
|
-
function load() {
|
|
10634
|
-
let r;
|
|
10635
|
-
try {
|
|
10636
|
-
r = exports.storage.getItem("debug") || exports.storage.getItem("DEBUG");
|
|
10637
|
-
} catch (error) {
|
|
10638
|
-
}
|
|
10639
|
-
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
10640
|
-
r = process.env.DEBUG;
|
|
10641
|
-
}
|
|
10642
|
-
return r;
|
|
10643
|
-
}
|
|
10644
|
-
function localstorage() {
|
|
10645
|
-
try {
|
|
10646
|
-
return localStorage;
|
|
10647
|
-
} catch (error) {
|
|
10648
|
-
}
|
|
10649
|
-
}
|
|
10650
|
-
module.exports = requireCommon()(exports);
|
|
10651
|
-
const { formatters } = module.exports;
|
|
10652
|
-
formatters.j = function(v) {
|
|
10653
|
-
try {
|
|
10654
|
-
return JSON.stringify(v);
|
|
10655
|
-
} catch (error) {
|
|
10656
|
-
return "[UnexpectedJSONParseError]: " + error.message;
|
|
10657
|
-
}
|
|
10658
|
-
};
|
|
10659
|
-
})(browser, browser.exports);
|
|
10660
|
-
return browser.exports;
|
|
10661
|
-
}
|
|
10662
|
-
var hasRequiredDist;
|
|
10663
|
-
function requireDist() {
|
|
10664
|
-
if (hasRequiredDist) return dist;
|
|
10665
|
-
hasRequiredDist = 1;
|
|
10666
|
-
var __importDefault = dist && dist.__importDefault || function(mod) {
|
|
10667
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
10668
|
-
};
|
|
10669
|
-
Object.defineProperty(dist, "__esModule", { value: true });
|
|
10670
|
-
dist.NodeClusterAdapter = void 0;
|
|
10671
|
-
dist.createAdapter = createAdapter2;
|
|
10672
|
-
dist.setupPrimary = setupPrimary;
|
|
10673
|
-
const node_cluster_1 = __importDefault(require$$0$2);
|
|
10674
|
-
const socket_io_adapter_1 = require$$1$2;
|
|
10675
|
-
const debug_1 = __importDefault(requireBrowser());
|
|
10676
|
-
const debug = (0, debug_1.default)("socket.io-cluster-adapter");
|
|
10677
|
-
const MESSAGE_SOURCE = "_sio_adapter";
|
|
10678
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
10679
|
-
function ignoreError() {
|
|
10680
|
-
}
|
|
10681
|
-
function createAdapter2(opts = {}) {
|
|
10682
|
-
return function(nsp) {
|
|
10683
|
-
return new NodeClusterAdapter(nsp, opts);
|
|
10684
|
-
};
|
|
10685
|
-
}
|
|
10686
|
-
class NodeClusterAdapter extends socket_io_adapter_1.ClusterAdapterWithHeartbeat {
|
|
10687
|
-
constructor(nsp, opts = {}) {
|
|
10688
|
-
super(nsp, opts);
|
|
10689
|
-
process.on("message", (message) => {
|
|
10690
|
-
const isValidSource = (message === null || message === void 0 ? void 0 : message.source) === MESSAGE_SOURCE;
|
|
10691
|
-
if (!isValidSource) {
|
|
10692
|
-
debug("[%s] ignore unknown source", this.uid);
|
|
10693
|
-
return;
|
|
10694
|
-
}
|
|
10695
|
-
if (message.nsp !== this.nsp.name) {
|
|
10696
|
-
debug("[%s] ignore other namespace", this.uid);
|
|
10697
|
-
return;
|
|
10698
|
-
}
|
|
10699
|
-
this.onMessage(message);
|
|
10700
|
-
});
|
|
10701
|
-
this.init();
|
|
10702
|
-
}
|
|
10703
|
-
doPublish(message) {
|
|
10704
|
-
message.source = MESSAGE_SOURCE;
|
|
10705
|
-
process.send(message, null, {}, ignoreError);
|
|
10706
|
-
return Promise.resolve("");
|
|
10707
|
-
}
|
|
10708
|
-
doPublishResponse(requesterUid, response) {
|
|
10709
|
-
response.source = MESSAGE_SOURCE;
|
|
10710
|
-
response.requesterUid = requesterUid;
|
|
10711
|
-
process.send(response, null, {}, ignoreError);
|
|
10712
|
-
return Promise.resolve();
|
|
10713
|
-
}
|
|
10714
|
-
}
|
|
10715
|
-
dist.NodeClusterAdapter = NodeClusterAdapter;
|
|
10716
|
-
const UIDS = /* @__PURE__ */ Symbol("uids");
|
|
10717
|
-
function setupPrimary() {
|
|
10718
|
-
node_cluster_1.default.on("message", (worker, message) => {
|
|
10719
|
-
var _a;
|
|
10720
|
-
const isValidSource = (message === null || message === void 0 ? void 0 : message.source) === MESSAGE_SOURCE;
|
|
10721
|
-
if (!isValidSource) {
|
|
10722
|
-
return;
|
|
10723
|
-
}
|
|
10724
|
-
worker[UIDS] = worker[UIDS] || /* @__PURE__ */ new Set();
|
|
10725
|
-
worker[UIDS].add(message.uid);
|
|
10726
|
-
switch (message.type) {
|
|
10727
|
-
case socket_io_adapter_1.MessageType.FETCH_SOCKETS_RESPONSE:
|
|
10728
|
-
case socket_io_adapter_1.MessageType.SERVER_SIDE_EMIT_RESPONSE:
|
|
10729
|
-
const requesterUid = message.requesterUid;
|
|
10730
|
-
for (const workerId in node_cluster_1.default.workers) {
|
|
10731
|
-
if (hasOwnProperty.call(node_cluster_1.default.workers, workerId) && ((_a = node_cluster_1.default.workers[workerId][UIDS]) === null || _a === void 0 ? void 0 : _a.has(requesterUid))) {
|
|
10732
|
-
node_cluster_1.default.workers[workerId].send(message, null, ignoreError);
|
|
10733
|
-
break;
|
|
10734
|
-
}
|
|
10735
|
-
}
|
|
10736
|
-
break;
|
|
10737
|
-
default:
|
|
10738
|
-
const emitterIdAsString = String(worker.id);
|
|
10739
|
-
for (const workerId in node_cluster_1.default.workers) {
|
|
10740
|
-
if (hasOwnProperty.call(node_cluster_1.default.workers, workerId) && workerId !== emitterIdAsString) {
|
|
10741
|
-
node_cluster_1.default.workers[workerId].send(message, null, ignoreError);
|
|
10742
|
-
}
|
|
10743
|
-
}
|
|
10744
|
-
}
|
|
10745
|
-
});
|
|
10746
|
-
}
|
|
10747
|
-
return dist;
|
|
10748
|
-
}
|
|
10749
|
-
requireDist();
|
|
10750
10245
|
var tinyEmitter = { exports: {} };
|
|
10751
10246
|
var hasRequiredTinyEmitter;
|
|
10752
10247
|
function requireTinyEmitter() {
|