@tonyclaw/agent-inspector 4.0.7 → 4.0.9
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/.output/backend/nitro.json +1 -1
- package/.output/cli.js +915 -25970
- package/.output/server/_chunks/ssr-renderer.mjs +1 -38
- package/.output/server/_libs/@opentelemetry/semantic-conventions+[...].mjs +1 -2658
- package/.output/server/_libs/agent-base.mjs +2 -234
- package/.output/server/_libs/ajv-formats.mjs +1 -330
- package/.output/server/_libs/ajv.mjs +8 -6080
- package/.output/server/_libs/anthropic-ai__sdk.mjs +19 -6021
- package/.output/server/_libs/atomically.mjs +1 -155
- package/.output/server/_libs/base64-js.mjs +1 -102
- package/.output/server/_libs/bignumber.js.mjs +1 -1353
- package/.output/server/_libs/buffer-equal-constant-time.mjs +1 -38
- package/.output/server/_libs/conf.mjs +1 -635
- package/.output/server/_libs/cookie-es.mjs +1 -44
- package/.output/server/_libs/core-util-is.mjs +1 -75
- package/.output/server/_libs/data-uri-to-buffer.mjs +1 -39
- package/.output/server/_libs/debounce-fn.mjs +1 -69
- package/.output/server/_libs/debug.mjs +5 -547
- package/.output/server/_libs/dot-prop.mjs +1 -265
- package/.output/server/_libs/ecdsa-sig-formatter.mjs +1 -162
- package/.output/server/_libs/env-paths.mjs +1 -57
- package/.output/server/_libs/extend.mjs +1 -94
- package/.output/server/_libs/fast-deep-equal.mjs +1 -38
- package/.output/server/_libs/fast-uri.mjs +1 -812
- package/.output/server/_libs/fetch-blob.mjs +1 -287
- package/.output/server/_libs/formdata-polyfill.mjs +9 -86
- package/.output/server/_libs/gaxios.mjs +5 -926
- package/.output/server/_libs/gcp-metadata.mjs +1 -322
- package/.output/server/_libs/google-auth-library.mjs +16 -6339
- package/.output/server/_libs/google-logging-utils.mjs +1 -385
- package/.output/server/_libs/google__genai.mjs +13 -18034
- package/.output/server/_libs/h3-v2.mjs +2 -287
- package/.output/server/_libs/h3.mjs +2 -408
- package/.output/server/_libs/has-flag.mjs +1 -16
- package/.output/server/_libs/https-proxy-agent.mjs +7 -280
- package/.output/server/_libs/immediate.mjs +1 -74
- package/.output/server/_libs/inherits.mjs +1 -50
- package/.output/server/_libs/isarray.mjs +1 -14
- package/.output/server/_libs/isbot.mjs +1 -20
- package/.output/server/_libs/json-bigint.mjs +8 -413
- package/.output/server/_libs/json-schema-traverse.mjs +1 -91
- package/.output/server/_libs/jszip.mjs +2 -3051
- package/.output/server/_libs/jwa.mjs +3 -233
- package/.output/server/_libs/jws.mjs +1 -298
- package/.output/server/_libs/lie.mjs +1 -273
- package/.output/server/_libs/mariozechner__pi-agent-core.mjs +1 -824
- package/.output/server/_libs/mariozechner__pi-ai.mjs +34 -22887
- package/.output/server/_libs/mimic-function.mjs +2 -47
- package/.output/server/_libs/mistralai__mistralai.mjs +7 -32045
- package/.output/server/_libs/modelcontextprotocol__core.mjs +1 -1121
- package/.output/server/_libs/modelcontextprotocol__server.mjs +13 -13205
- package/.output/server/_libs/ms.mjs +1 -120
- package/.output/server/_libs/node-domexception.mjs +1 -17
- package/.output/server/_libs/node-fetch.mjs +4 -1578
- package/.output/server/_libs/ohash.mjs +1 -1
- package/.output/server/_libs/openai.mjs +23 -6766
- package/.output/server/_libs/opentelemetry__api.mjs +1 -1678
- package/.output/server/_libs/p-retry.mjs +1 -87
- package/.output/server/_libs/pako.mjs +1 -4223
- package/.output/server/_libs/partial-json.mjs +2 -244
- package/.output/server/_libs/process-nextick-args.mjs +1 -48
- package/.output/server/_libs/react-dom.mjs +62 -10778
- package/.output/server/_libs/react.mjs +1 -519
- package/.output/server/_libs/readable-stream.mjs +1 -1518
- package/.output/server/_libs/retry.mjs +1 -236
- package/.output/server/_libs/rou3.mjs +1 -14
- package/.output/server/_libs/safe-buffer.mjs +1 -126
- package/.output/server/_libs/semver.mjs +1 -1938
- package/.output/server/_libs/seroval-plugins.mjs +1 -58
- package/.output/server/_libs/seroval.mjs +3 -1775
- package/.output/server/_libs/setimmediate.mjs +1 -152
- package/.output/server/_libs/srvx.mjs +4 -1390
- package/.output/server/_libs/stubborn-fs.mjs +1 -91
- package/.output/server/_libs/stubborn-utils.mjs +1 -66
- package/.output/server/_libs/supports-color.mjs +1 -108
- package/.output/server/_libs/tanstack__history.mjs +1 -230
- package/.output/server/_libs/tanstack__react-router.mjs +1 -848
- package/.output/server/_libs/tanstack__react-store.mjs +1 -1
- package/.output/server/_libs/tanstack__router-core.mjs +1 -4839
- package/.output/server/_libs/typebox.mjs +3 -6596
- package/.output/server/_libs/ufo.mjs +1 -54
- package/.output/server/_libs/uint8array-extras.mjs +1 -69
- package/.output/server/_libs/util-deprecate.mjs +1 -12
- package/.output/server/_libs/web-streams-polyfill.mjs +1 -4282
- package/.output/server/_libs/when-exit.mjs +1 -53
- package/.output/server/_libs/ws.mjs +7 -3715
- package/.output/server/_libs/zod-to-json-schema.mjs +5 -1207
- package/.output/server/_libs/zod.mjs +59 -9958
- package/.output/server/_ssr/empty-plugin-adapters-C3Q1xu4u.mjs +1 -0
- package/.output/server/_ssr/index.mjs +2 -1512
- package/.output/server/_ssr/publicBasePathContext--TAQS2_5.mjs +1 -0
- package/.output/server/_ssr/router-zSWaME0l.mjs +341 -0
- package/.output/server/_ssr/start-PDVGOqUN.mjs +1 -0
- package/.output/server/_tanstack-start-manifest_v-D7cKwKzM.mjs +1 -0
- package/.output/server/index.mjs +1 -320
- package/.output/ui/assets/{CompareDrawer-fWsmegqc.js → CompareDrawer-C6KvvPtJ.js} +1 -1
- package/.output/ui/assets/{InspectorPet-Z9XIA0t8.js → InspectorPet-CSH6OAhB.js} +1 -1
- package/.output/ui/assets/{ProxyViewerContainer-DhIB_ZAU.js → ProxyViewerContainer-vPd7g0Xn.js} +4 -4
- package/.output/ui/assets/{ReplayDialog-w_3PENIi.js → ReplayDialog-DbXUcT39.js} +1 -1
- package/.output/ui/assets/{RequestAnatomy-Dix0D4G6.js → RequestAnatomy-BWOCIN7J.js} +1 -1
- package/.output/ui/assets/{ResponseView-BtlbxW2o.js → ResponseView-BqDbTzFs.js} +1 -1
- package/.output/ui/assets/{StreamingChunkSequence-BqNQJASb.js → StreamingChunkSequence-UHl2g6w6.js} +1 -1
- package/.output/ui/assets/{_sessionId-DPiw4uu2.js → _sessionId-B2S61lDJ.js} +1 -1
- package/.output/ui/assets/{_sessionId-Bo9J8C5J.js → _sessionId-CS6hqj8-.js} +1 -1
- package/.output/ui/assets/{index-BL5id77_.js → index-C6V66rNI.js} +1 -1
- package/.output/ui/assets/{index-icwV1YtX.js → index-DY5xBYHr.js} +1 -1
- package/.output/ui/assets/{index-Wd6TK76x.js → index-DgyIeqyV.js} +2 -2
- package/.output/ui/assets/{index-CWSVfojK.js → index-HLs5jTyi.js} +1 -1
- package/.output/ui/assets/{json-viewer-Cpr3uw1I.js → json-viewer-i5LcN8e7.js} +1 -1
- package/.output/ui/assets/{jszip.min-Cncg6JOi.js → jszip.min-yNpb9qnf.js} +1 -1
- package/.output/ui/index.html +1 -1
- package/.output/workers/logFinalizer.worker.js +41 -17739
- package/.output/workers/sessionWorkerEntry.js +41 -17735
- package/package.json +7 -7
- package/.output/server/_ssr/empty-plugin-adapters-BFgPZ6_d.mjs +0 -6
- package/.output/server/_ssr/publicBasePathContext-IH2ilOfu.mjs +0 -176
- package/.output/server/_ssr/router-weYHAqCb.mjs +0 -27177
- package/.output/server/_ssr/start-COQu_AgD.mjs +0 -57
- package/.output/server/_tanstack-start-manifest_v-ClTaMkEj.mjs +0 -4
|
@@ -1,234 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import require$$1$1 from "https";
|
|
4
|
-
var dist = {};
|
|
5
|
-
var helpers = {};
|
|
6
|
-
var hasRequiredHelpers;
|
|
7
|
-
function requireHelpers() {
|
|
8
|
-
if (hasRequiredHelpers) return helpers;
|
|
9
|
-
hasRequiredHelpers = 1;
|
|
10
|
-
var __createBinding = helpers && helpers.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === void 0) k2 = k;
|
|
12
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
-
desc = { enumerable: true, get: function() {
|
|
15
|
-
return m[k];
|
|
16
|
-
} };
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(o, k2, desc);
|
|
19
|
-
}) : (function(o, m, k, k2) {
|
|
20
|
-
if (k2 === void 0) k2 = k;
|
|
21
|
-
o[k2] = m[k];
|
|
22
|
-
}));
|
|
23
|
-
var __setModuleDefault = helpers && helpers.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
24
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
-
}) : function(o, v) {
|
|
26
|
-
o["default"] = v;
|
|
27
|
-
});
|
|
28
|
-
var __importStar = helpers && helpers.__importStar || function(mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) {
|
|
32
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
}
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
Object.defineProperty(helpers, "__esModule", { value: true });
|
|
38
|
-
helpers.req = helpers.json = helpers.toBuffer = void 0;
|
|
39
|
-
const http = __importStar(require$$1);
|
|
40
|
-
const https = __importStar(require$$1$1);
|
|
41
|
-
async function toBuffer(stream) {
|
|
42
|
-
let length = 0;
|
|
43
|
-
const chunks = [];
|
|
44
|
-
for await (const chunk of stream) {
|
|
45
|
-
length += chunk.length;
|
|
46
|
-
chunks.push(chunk);
|
|
47
|
-
}
|
|
48
|
-
return Buffer.concat(chunks, length);
|
|
49
|
-
}
|
|
50
|
-
helpers.toBuffer = toBuffer;
|
|
51
|
-
async function json(stream) {
|
|
52
|
-
const buf = await toBuffer(stream);
|
|
53
|
-
const str = buf.toString("utf8");
|
|
54
|
-
try {
|
|
55
|
-
return JSON.parse(str);
|
|
56
|
-
} catch (_err) {
|
|
57
|
-
const err = _err;
|
|
58
|
-
err.message += ` (input: ${str})`;
|
|
59
|
-
throw err;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
helpers.json = json;
|
|
63
|
-
function req(url, opts = {}) {
|
|
64
|
-
const href = typeof url === "string" ? url : url.href;
|
|
65
|
-
const req2 = (href.startsWith("https:") ? https : http).request(url, opts);
|
|
66
|
-
const promise = new Promise((resolve, reject) => {
|
|
67
|
-
req2.once("response", resolve).once("error", reject).end();
|
|
68
|
-
});
|
|
69
|
-
req2.then = promise.then.bind(promise);
|
|
70
|
-
return req2;
|
|
71
|
-
}
|
|
72
|
-
helpers.req = req;
|
|
73
|
-
return helpers;
|
|
74
|
-
}
|
|
75
|
-
var hasRequiredDist;
|
|
76
|
-
function requireDist() {
|
|
77
|
-
if (hasRequiredDist) return dist;
|
|
78
|
-
hasRequiredDist = 1;
|
|
79
|
-
(function(exports$1) {
|
|
80
|
-
var __createBinding = dist && dist.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
81
|
-
if (k2 === void 0) k2 = k;
|
|
82
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
83
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
84
|
-
desc = { enumerable: true, get: function() {
|
|
85
|
-
return m[k];
|
|
86
|
-
} };
|
|
87
|
-
}
|
|
88
|
-
Object.defineProperty(o, k2, desc);
|
|
89
|
-
}) : (function(o, m, k, k2) {
|
|
90
|
-
if (k2 === void 0) k2 = k;
|
|
91
|
-
o[k2] = m[k];
|
|
92
|
-
}));
|
|
93
|
-
var __setModuleDefault = dist && dist.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
94
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
95
|
-
}) : function(o, v) {
|
|
96
|
-
o["default"] = v;
|
|
97
|
-
});
|
|
98
|
-
var __importStar = dist && dist.__importStar || function(mod) {
|
|
99
|
-
if (mod && mod.__esModule) return mod;
|
|
100
|
-
var result = {};
|
|
101
|
-
if (mod != null) {
|
|
102
|
-
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
103
|
-
}
|
|
104
|
-
__setModuleDefault(result, mod);
|
|
105
|
-
return result;
|
|
106
|
-
};
|
|
107
|
-
var __exportStar = dist && dist.__exportStar || function(m, exports$12) {
|
|
108
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding(exports$12, m, p);
|
|
109
|
-
};
|
|
110
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
111
|
-
exports$1.Agent = void 0;
|
|
112
|
-
const net = __importStar(require$$0);
|
|
113
|
-
const http = __importStar(require$$1);
|
|
114
|
-
const https_1 = require$$1$1;
|
|
115
|
-
__exportStar(requireHelpers(), exports$1);
|
|
116
|
-
const INTERNAL = /* @__PURE__ */ Symbol("AgentBaseInternalState");
|
|
117
|
-
class Agent extends http.Agent {
|
|
118
|
-
constructor(opts) {
|
|
119
|
-
super(opts);
|
|
120
|
-
this[INTERNAL] = {};
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Determine whether this is an `http` or `https` request.
|
|
124
|
-
*/
|
|
125
|
-
isSecureEndpoint(options) {
|
|
126
|
-
if (options) {
|
|
127
|
-
if (typeof options.secureEndpoint === "boolean") {
|
|
128
|
-
return options.secureEndpoint;
|
|
129
|
-
}
|
|
130
|
-
if (typeof options.protocol === "string") {
|
|
131
|
-
return options.protocol === "https:";
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
const { stack } = new Error();
|
|
135
|
-
if (typeof stack !== "string")
|
|
136
|
-
return false;
|
|
137
|
-
return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
|
|
138
|
-
}
|
|
139
|
-
// In order to support async signatures in `connect()` and Node's native
|
|
140
|
-
// connection pooling in `http.Agent`, the array of sockets for each origin
|
|
141
|
-
// has to be updated synchronously. This is so the length of the array is
|
|
142
|
-
// accurate when `addRequest()` is next called. We achieve this by creating a
|
|
143
|
-
// fake socket and adding it to `sockets[origin]` and incrementing
|
|
144
|
-
// `totalSocketCount`.
|
|
145
|
-
incrementSockets(name) {
|
|
146
|
-
if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
if (!this.sockets[name]) {
|
|
150
|
-
this.sockets[name] = [];
|
|
151
|
-
}
|
|
152
|
-
const fakeSocket = new net.Socket({ writable: false });
|
|
153
|
-
this.sockets[name].push(fakeSocket);
|
|
154
|
-
this.totalSocketCount++;
|
|
155
|
-
return fakeSocket;
|
|
156
|
-
}
|
|
157
|
-
decrementSockets(name, socket) {
|
|
158
|
-
if (!this.sockets[name] || socket === null) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
const sockets = this.sockets[name];
|
|
162
|
-
const index = sockets.indexOf(socket);
|
|
163
|
-
if (index !== -1) {
|
|
164
|
-
sockets.splice(index, 1);
|
|
165
|
-
this.totalSocketCount--;
|
|
166
|
-
if (sockets.length === 0) {
|
|
167
|
-
delete this.sockets[name];
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
// In order to properly update the socket pool, we need to call `getName()` on
|
|
172
|
-
// the core `https.Agent` if it is a secureEndpoint.
|
|
173
|
-
getName(options) {
|
|
174
|
-
const secureEndpoint = this.isSecureEndpoint(options);
|
|
175
|
-
if (secureEndpoint) {
|
|
176
|
-
return https_1.Agent.prototype.getName.call(this, options);
|
|
177
|
-
}
|
|
178
|
-
return super.getName(options);
|
|
179
|
-
}
|
|
180
|
-
createSocket(req, options, cb) {
|
|
181
|
-
const connectOpts = {
|
|
182
|
-
...options,
|
|
183
|
-
secureEndpoint: this.isSecureEndpoint(options)
|
|
184
|
-
};
|
|
185
|
-
const name = this.getName(connectOpts);
|
|
186
|
-
const fakeSocket = this.incrementSockets(name);
|
|
187
|
-
Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
|
|
188
|
-
this.decrementSockets(name, fakeSocket);
|
|
189
|
-
if (socket instanceof http.Agent) {
|
|
190
|
-
try {
|
|
191
|
-
return socket.addRequest(req, connectOpts);
|
|
192
|
-
} catch (err) {
|
|
193
|
-
return cb(err);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
this[INTERNAL].currentSocket = socket;
|
|
197
|
-
super.createSocket(req, options, cb);
|
|
198
|
-
}, (err) => {
|
|
199
|
-
this.decrementSockets(name, fakeSocket);
|
|
200
|
-
cb(err);
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
createConnection() {
|
|
204
|
-
const socket = this[INTERNAL].currentSocket;
|
|
205
|
-
this[INTERNAL].currentSocket = void 0;
|
|
206
|
-
if (!socket) {
|
|
207
|
-
throw new Error("No socket was returned in the `connect()` function");
|
|
208
|
-
}
|
|
209
|
-
return socket;
|
|
210
|
-
}
|
|
211
|
-
get defaultPort() {
|
|
212
|
-
return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
|
|
213
|
-
}
|
|
214
|
-
set defaultPort(v) {
|
|
215
|
-
if (this[INTERNAL]) {
|
|
216
|
-
this[INTERNAL].defaultPort = v;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
get protocol() {
|
|
220
|
-
return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
|
|
221
|
-
}
|
|
222
|
-
set protocol(v) {
|
|
223
|
-
if (this[INTERNAL]) {
|
|
224
|
-
this[INTERNAL].protocol = v;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
exports$1.Agent = Agent;
|
|
229
|
-
})(dist);
|
|
230
|
-
return dist;
|
|
231
|
-
}
|
|
232
|
-
export {
|
|
233
|
-
requireDist as r
|
|
234
|
-
};
|
|
1
|
+
import E from"net";import j from"http";import w from"https";var u={},c={},v;function q(){if(v)return c;v=1;var f=c&&c.__createBinding||(Object.create?(function(n,o,r,e){e===void 0&&(e=r);var t=Object.getOwnPropertyDescriptor(o,r);(!t||("get"in t?!o.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return o[r]}}),Object.defineProperty(n,e,t)}):(function(n,o,r,e){e===void 0&&(e=r),n[e]=o[r]})),l=c&&c.__setModuleDefault||(Object.create?(function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}):function(n,o){n.default=o}),h=c&&c.__importStar||function(n){if(n&&n.__esModule)return n;var o={};if(n!=null)for(var r in n)r!=="default"&&Object.prototype.hasOwnProperty.call(n,r)&&f(o,n,r);return l(o,n),o};Object.defineProperty(c,"__esModule",{value:!0}),c.req=c.json=c.toBuffer=void 0;const p=h(j),g=h(w);async function d(n){let o=0;const r=[];for await(const e of n)o+=e.length,r.push(e);return Buffer.concat(r,o)}c.toBuffer=d;async function _(n){const r=(await d(n)).toString("utf8");try{return JSON.parse(r)}catch(e){const t=e;throw t.message+=` (input: ${r})`,t}}c.json=_;function S(n,o={}){const e=((typeof n=="string"?n:n.href).startsWith("https:")?g:p).request(n,o),t=new Promise((i,s)=>{e.once("response",i).once("error",s).end()});return e.then=t.then.bind(t),e}return c.req=S,c}var O;function B(){return O||(O=1,(function(f){var l=u&&u.__createBinding||(Object.create?(function(r,e,t,i){i===void 0&&(i=t);var s=Object.getOwnPropertyDescriptor(e,t);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,i,s)}):(function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]})),h=u&&u.__setModuleDefault||(Object.create?(function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}):function(r,e){r.default=e}),p=u&&u.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&l(e,r,t);return h(e,r),e},g=u&&u.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&l(e,r,t)};Object.defineProperty(f,"__esModule",{value:!0}),f.Agent=void 0;const d=p(E),_=p(j),S=w;g(q(),f);const n=Symbol("AgentBaseInternalState");class o extends _.Agent{constructor(e){super(e),this[n]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}const{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
2
|
+
`).some(i=>i.indexOf("(https.js:")!==-1||i.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);const t=new d.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;const i=this.sockets[e],s=i.indexOf(t);s!==-1&&(i.splice(s,1),this.totalSocketCount--,i.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?S.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,i){const s={...t,secureEndpoint:this.isSecureEndpoint(t)},b=this.getName(s),y=this.incrementSockets(b);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(b,y),a instanceof _.Agent)try{return a.addRequest(e,s)}catch(P){return i(P)}this[n].currentSocket=a,super.createSocket(e,t,i)},a=>{this.decrementSockets(b,y),i(a)})}createConnection(){const e=this[n].currentSocket;if(this[n].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[n].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[n]&&(this[n].defaultPort=e)}get protocol(){return this[n].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[n]&&(this[n].protocol=e)}}f.Agent=o})(u)),u}export{B as r};
|
|
@@ -1,330 +1 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs } from "./react.mjs";
|
|
2
|
-
import { r as requireCodegen, a as requireAjv } from "./ajv.mjs";
|
|
3
|
-
var dist = { exports: {} };
|
|
4
|
-
var formats = {};
|
|
5
|
-
var hasRequiredFormats;
|
|
6
|
-
function requireFormats() {
|
|
7
|
-
if (hasRequiredFormats) return formats;
|
|
8
|
-
hasRequiredFormats = 1;
|
|
9
|
-
(function(exports$1) {
|
|
10
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
11
|
-
exports$1.formatNames = exports$1.fastFormats = exports$1.fullFormats = void 0;
|
|
12
|
-
function fmtDef(validate, compare) {
|
|
13
|
-
return { validate, compare };
|
|
14
|
-
}
|
|
15
|
-
exports$1.fullFormats = {
|
|
16
|
-
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
17
|
-
date: fmtDef(date, compareDate),
|
|
18
|
-
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
19
|
-
time: fmtDef(getTime(true), compareTime),
|
|
20
|
-
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
|
21
|
-
"iso-time": fmtDef(getTime(), compareIsoTime),
|
|
22
|
-
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
|
23
|
-
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
|
24
|
-
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
25
|
-
uri,
|
|
26
|
-
"uri-reference": /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
|
|
27
|
-
// uri-template: https://tools.ietf.org/html/rfc6570
|
|
28
|
-
"uri-template": /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,
|
|
29
|
-
// For the source: https://gist.github.com/dperini/729294
|
|
30
|
-
// For test cases: https://mathiasbynens.be/demo/url-regex
|
|
31
|
-
url: /^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
|
|
32
|
-
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
|
33
|
-
hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
|
34
|
-
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
|
35
|
-
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
|
36
|
-
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
37
|
-
regex,
|
|
38
|
-
// uuid: http://tools.ietf.org/html/rfc4122
|
|
39
|
-
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
|
40
|
-
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
41
|
-
// uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A
|
|
42
|
-
"json-pointer": /^(?:\/(?:[^~/]|~0|~1)*)*$/,
|
|
43
|
-
"json-pointer-uri-fragment": /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,
|
|
44
|
-
// relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00
|
|
45
|
-
"relative-json-pointer": /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,
|
|
46
|
-
// the following formats are used by the openapi specification: https://spec.openapis.org/oas/v3.0.0#data-types
|
|
47
|
-
// byte: https://github.com/miguelmota/is-base64
|
|
48
|
-
byte,
|
|
49
|
-
// signed 32 bit integer
|
|
50
|
-
int32: { type: "number", validate: validateInt32 },
|
|
51
|
-
// signed 64 bit integer
|
|
52
|
-
int64: { type: "number", validate: validateInt64 },
|
|
53
|
-
// C-type float
|
|
54
|
-
float: { type: "number", validate: validateNumber },
|
|
55
|
-
// C-type double
|
|
56
|
-
double: { type: "number", validate: validateNumber },
|
|
57
|
-
// hint to the UI to hide input strings
|
|
58
|
-
password: true,
|
|
59
|
-
// unchecked string payload
|
|
60
|
-
binary: true
|
|
61
|
-
};
|
|
62
|
-
exports$1.fastFormats = {
|
|
63
|
-
...exports$1.fullFormats,
|
|
64
|
-
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
65
|
-
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
66
|
-
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
67
|
-
"iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
|
|
68
|
-
"iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
|
|
69
|
-
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
|
70
|
-
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
71
|
-
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
|
72
|
-
// email (sources from jsen validator):
|
|
73
|
-
// http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363
|
|
74
|
-
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
75
|
-
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
76
|
-
};
|
|
77
|
-
exports$1.formatNames = Object.keys(exports$1.fullFormats);
|
|
78
|
-
function isLeapYear(year) {
|
|
79
|
-
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
80
|
-
}
|
|
81
|
-
const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/;
|
|
82
|
-
const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
83
|
-
function date(str) {
|
|
84
|
-
const matches = DATE.exec(str);
|
|
85
|
-
if (!matches)
|
|
86
|
-
return false;
|
|
87
|
-
const year = +matches[1];
|
|
88
|
-
const month = +matches[2];
|
|
89
|
-
const day = +matches[3];
|
|
90
|
-
return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);
|
|
91
|
-
}
|
|
92
|
-
function compareDate(d1, d2) {
|
|
93
|
-
if (!(d1 && d2))
|
|
94
|
-
return void 0;
|
|
95
|
-
if (d1 > d2)
|
|
96
|
-
return 1;
|
|
97
|
-
if (d1 < d2)
|
|
98
|
-
return -1;
|
|
99
|
-
return 0;
|
|
100
|
-
}
|
|
101
|
-
const TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
102
|
-
function getTime(strictTimeZone) {
|
|
103
|
-
return function time(str) {
|
|
104
|
-
const matches = TIME.exec(str);
|
|
105
|
-
if (!matches)
|
|
106
|
-
return false;
|
|
107
|
-
const hr = +matches[1];
|
|
108
|
-
const min = +matches[2];
|
|
109
|
-
const sec = +matches[3];
|
|
110
|
-
const tz = matches[4];
|
|
111
|
-
const tzSign = matches[5] === "-" ? -1 : 1;
|
|
112
|
-
const tzH = +(matches[6] || 0);
|
|
113
|
-
const tzM = +(matches[7] || 0);
|
|
114
|
-
if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
|
|
115
|
-
return false;
|
|
116
|
-
if (hr <= 23 && min <= 59 && sec < 60)
|
|
117
|
-
return true;
|
|
118
|
-
const utcMin = min - tzM * tzSign;
|
|
119
|
-
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
|
|
120
|
-
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
function compareTime(s1, s2) {
|
|
124
|
-
if (!(s1 && s2))
|
|
125
|
-
return void 0;
|
|
126
|
-
const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
|
|
127
|
-
const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
|
|
128
|
-
if (!(t1 && t2))
|
|
129
|
-
return void 0;
|
|
130
|
-
return t1 - t2;
|
|
131
|
-
}
|
|
132
|
-
function compareIsoTime(t1, t2) {
|
|
133
|
-
if (!(t1 && t2))
|
|
134
|
-
return void 0;
|
|
135
|
-
const a1 = TIME.exec(t1);
|
|
136
|
-
const a2 = TIME.exec(t2);
|
|
137
|
-
if (!(a1 && a2))
|
|
138
|
-
return void 0;
|
|
139
|
-
t1 = a1[1] + a1[2] + a1[3];
|
|
140
|
-
t2 = a2[1] + a2[2] + a2[3];
|
|
141
|
-
if (t1 > t2)
|
|
142
|
-
return 1;
|
|
143
|
-
if (t1 < t2)
|
|
144
|
-
return -1;
|
|
145
|
-
return 0;
|
|
146
|
-
}
|
|
147
|
-
const DATE_TIME_SEPARATOR = /t|\s/i;
|
|
148
|
-
function getDateTime(strictTimeZone) {
|
|
149
|
-
const time = getTime(strictTimeZone);
|
|
150
|
-
return function date_time(str) {
|
|
151
|
-
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
152
|
-
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
function compareDateTime(dt1, dt2) {
|
|
156
|
-
if (!(dt1 && dt2))
|
|
157
|
-
return void 0;
|
|
158
|
-
const d1 = new Date(dt1).valueOf();
|
|
159
|
-
const d2 = new Date(dt2).valueOf();
|
|
160
|
-
if (!(d1 && d2))
|
|
161
|
-
return void 0;
|
|
162
|
-
return d1 - d2;
|
|
163
|
-
}
|
|
164
|
-
function compareIsoDateTime(dt1, dt2) {
|
|
165
|
-
if (!(dt1 && dt2))
|
|
166
|
-
return void 0;
|
|
167
|
-
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
|
|
168
|
-
const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
|
|
169
|
-
const res = compareDate(d1, d2);
|
|
170
|
-
if (res === void 0)
|
|
171
|
-
return void 0;
|
|
172
|
-
return res || compareTime(t1, t2);
|
|
173
|
-
}
|
|
174
|
-
const NOT_URI_FRAGMENT = /\/|:/;
|
|
175
|
-
const URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
176
|
-
function uri(str) {
|
|
177
|
-
return NOT_URI_FRAGMENT.test(str) && URI.test(str);
|
|
178
|
-
}
|
|
179
|
-
const BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
180
|
-
function byte(str) {
|
|
181
|
-
BYTE.lastIndex = 0;
|
|
182
|
-
return BYTE.test(str);
|
|
183
|
-
}
|
|
184
|
-
const MIN_INT32 = -2147483648;
|
|
185
|
-
const MAX_INT32 = 2 ** 31 - 1;
|
|
186
|
-
function validateInt32(value) {
|
|
187
|
-
return Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;
|
|
188
|
-
}
|
|
189
|
-
function validateInt64(value) {
|
|
190
|
-
return Number.isInteger(value);
|
|
191
|
-
}
|
|
192
|
-
function validateNumber() {
|
|
193
|
-
return true;
|
|
194
|
-
}
|
|
195
|
-
const Z_ANCHOR = /[^\\]\\Z/;
|
|
196
|
-
function regex(str) {
|
|
197
|
-
if (Z_ANCHOR.test(str))
|
|
198
|
-
return false;
|
|
199
|
-
try {
|
|
200
|
-
new RegExp(str);
|
|
201
|
-
return true;
|
|
202
|
-
} catch (e) {
|
|
203
|
-
return false;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
})(formats);
|
|
207
|
-
return formats;
|
|
208
|
-
}
|
|
209
|
-
var limit = {};
|
|
210
|
-
var hasRequiredLimit;
|
|
211
|
-
function requireLimit() {
|
|
212
|
-
if (hasRequiredLimit) return limit;
|
|
213
|
-
hasRequiredLimit = 1;
|
|
214
|
-
(function(exports$1) {
|
|
215
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
216
|
-
exports$1.formatLimitDefinition = void 0;
|
|
217
|
-
const ajv_1 = /* @__PURE__ */ requireAjv();
|
|
218
|
-
const codegen_1 = /* @__PURE__ */ requireCodegen();
|
|
219
|
-
const ops = codegen_1.operators;
|
|
220
|
-
const KWDs = {
|
|
221
|
-
formatMaximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
|
|
222
|
-
formatMinimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
|
|
223
|
-
formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
|
|
224
|
-
formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
225
|
-
};
|
|
226
|
-
const error = {
|
|
227
|
-
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
228
|
-
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
229
|
-
};
|
|
230
|
-
exports$1.formatLimitDefinition = {
|
|
231
|
-
keyword: Object.keys(KWDs),
|
|
232
|
-
type: "string",
|
|
233
|
-
schemaType: "string",
|
|
234
|
-
$data: true,
|
|
235
|
-
error,
|
|
236
|
-
code(cxt) {
|
|
237
|
-
const { gen, data, schemaCode, keyword, it } = cxt;
|
|
238
|
-
const { opts, self } = it;
|
|
239
|
-
if (!opts.validateFormats)
|
|
240
|
-
return;
|
|
241
|
-
const fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, "format");
|
|
242
|
-
if (fCxt.$data)
|
|
243
|
-
validate$DataFormat();
|
|
244
|
-
else
|
|
245
|
-
validateFormat();
|
|
246
|
-
function validate$DataFormat() {
|
|
247
|
-
const fmts = gen.scopeValue("formats", {
|
|
248
|
-
ref: self.formats,
|
|
249
|
-
code: opts.code.formats
|
|
250
|
-
});
|
|
251
|
-
const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);
|
|
252
|
-
cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
|
|
253
|
-
}
|
|
254
|
-
function validateFormat() {
|
|
255
|
-
const format = fCxt.schema;
|
|
256
|
-
const fmtDef = self.formats[format];
|
|
257
|
-
if (!fmtDef || fmtDef === true)
|
|
258
|
-
return;
|
|
259
|
-
if (typeof fmtDef != "object" || fmtDef instanceof RegExp || typeof fmtDef.compare != "function") {
|
|
260
|
-
throw new Error(`"${keyword}": format "${format}" does not define "compare" function`);
|
|
261
|
-
}
|
|
262
|
-
const fmt = gen.scopeValue("formats", {
|
|
263
|
-
key: format,
|
|
264
|
-
ref: fmtDef,
|
|
265
|
-
code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0
|
|
266
|
-
});
|
|
267
|
-
cxt.fail$data(compareCode(fmt));
|
|
268
|
-
}
|
|
269
|
-
function compareCode(fmt) {
|
|
270
|
-
return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
dependencies: ["format"]
|
|
274
|
-
};
|
|
275
|
-
const formatLimitPlugin = (ajv) => {
|
|
276
|
-
ajv.addKeyword(exports$1.formatLimitDefinition);
|
|
277
|
-
return ajv;
|
|
278
|
-
};
|
|
279
|
-
exports$1.default = formatLimitPlugin;
|
|
280
|
-
})(limit);
|
|
281
|
-
return limit;
|
|
282
|
-
}
|
|
283
|
-
var hasRequiredDist;
|
|
284
|
-
function requireDist() {
|
|
285
|
-
if (hasRequiredDist) return dist.exports;
|
|
286
|
-
hasRequiredDist = 1;
|
|
287
|
-
(function(module, exports$1) {
|
|
288
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
289
|
-
const formats_1 = requireFormats();
|
|
290
|
-
const limit_1 = requireLimit();
|
|
291
|
-
const codegen_1 = /* @__PURE__ */ requireCodegen();
|
|
292
|
-
const fullName = new codegen_1.Name("fullFormats");
|
|
293
|
-
const fastName = new codegen_1.Name("fastFormats");
|
|
294
|
-
const formatsPlugin = (ajv, opts = { keywords: true }) => {
|
|
295
|
-
if (Array.isArray(opts)) {
|
|
296
|
-
addFormats(ajv, opts, formats_1.fullFormats, fullName);
|
|
297
|
-
return ajv;
|
|
298
|
-
}
|
|
299
|
-
const [formats2, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];
|
|
300
|
-
const list = opts.formats || formats_1.formatNames;
|
|
301
|
-
addFormats(ajv, list, formats2, exportName);
|
|
302
|
-
if (opts.keywords)
|
|
303
|
-
(0, limit_1.default)(ajv);
|
|
304
|
-
return ajv;
|
|
305
|
-
};
|
|
306
|
-
formatsPlugin.get = (name, mode = "full") => {
|
|
307
|
-
const formats2 = mode === "fast" ? formats_1.fastFormats : formats_1.fullFormats;
|
|
308
|
-
const f = formats2[name];
|
|
309
|
-
if (!f)
|
|
310
|
-
throw new Error(`Unknown format "${name}"`);
|
|
311
|
-
return f;
|
|
312
|
-
};
|
|
313
|
-
function addFormats(ajv, list, fs, exportName) {
|
|
314
|
-
var _a;
|
|
315
|
-
var _b;
|
|
316
|
-
(_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
317
|
-
for (const f of list)
|
|
318
|
-
ajv.addFormat(f, fs[f]);
|
|
319
|
-
}
|
|
320
|
-
module.exports = exports$1 = formatsPlugin;
|
|
321
|
-
Object.defineProperty(exports$1, "__esModule", { value: true });
|
|
322
|
-
exports$1.default = formatsPlugin;
|
|
323
|
-
})(dist, dist.exports);
|
|
324
|
-
return dist.exports;
|
|
325
|
-
}
|
|
326
|
-
var distExports = requireDist();
|
|
327
|
-
const ajvFormatsModule = /* @__PURE__ */ getDefaultExportFromCjs(distExports);
|
|
328
|
-
export {
|
|
329
|
-
ajvFormatsModule as a
|
|
330
|
-
};
|
|
1
|
+
import{g as Y}from"./react.mjs";import{r as C,a as K}from"./ajv.mjs";var w={exports:{}},A={},q;function W(){return q||(q=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0;function n(t,a){return{validate:t,compare:a}}r.fullFormats={date:n(g,F),time:n(u(!0),o),"date-time":n(z(!0),m),"iso-time":n(u(),s),"iso-date-time":n(z(),y),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:k,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:U,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:v,int32:{type:"number",validate:G},int64:{type:"number",validate:Z},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:n(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,F),time:n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,o),"date-time":n(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,m),"iso-time":n(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,s),"iso-date-time":n(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);function f(t){return t%4===0&&(t%100!==0||t%400===0)}const l=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,p=[0,31,28,31,30,31,30,31,31,30,31,30,31];function g(t){const a=l.exec(t);if(!a)return!1;const i=+a[1],e=+a[2],_=+a[3];return e>=1&&e<=12&&_>=1&&_<=(e===2&&f(i)?29:p[e])}function F(t,a){if(t&&a)return t>a?1:t<a?-1:0}const d=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(t){return function(i){const e=d.exec(i);if(!e)return!1;const _=+e[1],b=+e[2],E=+e[3],V=e[4],R=e[5]==="-"?-1:1,S=+(e[6]||0),L=+(e[7]||0);if(S>23||L>59||t&&!V)return!1;if(_<=23&&b<=59&&E<60)return!0;const N=b-L*R,j=_-S*R-(N<0?1:0);return(j===23||j===-1)&&(N===59||N===-1)&&E<61}}function o(t,a){if(!(t&&a))return;const i=new Date("2020-01-01T"+t).valueOf(),e=new Date("2020-01-01T"+a).valueOf();if(i&&e)return i-e}function s(t,a){if(!(t&&a))return;const i=d.exec(t),e=d.exec(a);if(i&&e)return t=i[1]+i[2]+i[3],a=e[1]+e[2]+e[3],t>a?1:t<a?-1:0}const $=/t|\s/i;function z(t){const a=u(t);return function(e){const _=e.split($);return _.length===2&&g(_[0])&&a(_[1])}}function m(t,a){if(!(t&&a))return;const i=new Date(t).valueOf(),e=new Date(a).valueOf();if(i&&e)return i-e}function y(t,a){if(!(t&&a))return;const[i,e]=t.split($),[_,b]=a.split($),E=F(i,_);if(E!==void 0)return E||o(e,b)}const T=/\/|:/,h=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function k(t){return T.test(t)&&h.test(t)}const D=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function v(t){return D.lastIndex=0,D.test(t)}const c=-2147483648,M=2**31-1;function G(t){return Number.isInteger(t)&&t<=M&&t>=c}function Z(t){return Number.isInteger(t)}function O(){return!0}const H=/[^\\]\\Z/;function U(t){if(H.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}})(A)),A}var I={},x;function B(){return x||(x=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatLimitDefinition=void 0;const n=K(),f=C(),l=f.operators,p={formatMaximum:{okStr:"<=",ok:l.LTE,fail:l.GT},formatMinimum:{okStr:">=",ok:l.GTE,fail:l.LT},formatExclusiveMaximum:{okStr:"<",ok:l.LT,fail:l.GTE},formatExclusiveMinimum:{okStr:">",ok:l.GT,fail:l.LTE}},g={message:({keyword:d,schemaCode:u})=>(0,f.str)`should be ${p[d].okStr} ${u}`,params:({keyword:d,schemaCode:u})=>(0,f._)`{comparison: ${p[d].okStr}, limit: ${u}}`};r.formatLimitDefinition={keyword:Object.keys(p),type:"string",schemaType:"string",$data:!0,error:g,code(d){const{gen:u,data:o,schemaCode:s,keyword:$,it:z}=d,{opts:m,self:y}=z;if(!m.validateFormats)return;const T=new n.KeywordCxt(z,y.RULES.all.format.definition,"format");T.$data?h():k();function h(){const v=u.scopeValue("formats",{ref:y.formats,code:m.code.formats}),c=u.const("fmt",(0,f._)`${v}[${T.schemaCode}]`);d.fail$data((0,f.or)((0,f._)`typeof ${c} != "object"`,(0,f._)`${c} instanceof RegExp`,(0,f._)`typeof ${c}.compare != "function"`,D(c)))}function k(){const v=T.schema,c=y.formats[v];if(!c||c===!0)return;if(typeof c!="object"||c instanceof RegExp||typeof c.compare!="function")throw new Error(`"${$}": format "${v}" does not define "compare" function`);const M=u.scopeValue("formats",{key:v,ref:c,code:m.code.formats?(0,f._)`${m.code.formats}${(0,f.getProperty)(v)}`:void 0});d.fail$data(D(M))}function D(v){return(0,f._)`${v}.compare(${o}, ${s}) ${p[$].fail} 0`}},dependencies:["format"]};const F=d=>(d.addKeyword(r.formatLimitDefinition),d);r.default=F})(I)),I}var P;function X(){return P||(P=1,(function(r,n){Object.defineProperty(n,"__esModule",{value:!0});const f=W(),l=B(),p=C(),g=new p.Name("fullFormats"),F=new p.Name("fastFormats"),d=(o,s={keywords:!0})=>{if(Array.isArray(s))return u(o,s,f.fullFormats,g),o;const[$,z]=s.mode==="fast"?[f.fastFormats,F]:[f.fullFormats,g],m=s.formats||f.formatNames;return u(o,m,$,z),s.keywords&&(0,l.default)(o),o};d.get=(o,s="full")=>{const z=(s==="fast"?f.fastFormats:f.fullFormats)[o];if(!z)throw new Error(`Unknown format "${o}"`);return z};function u(o,s,$,z){var m,y;(m=(y=o.opts.code).formats)!==null&&m!==void 0||(y.formats=(0,p._)`require("ajv-formats/dist/formats").${z}`);for(const T of s)o.addFormat(T,$[T])}r.exports=n=d,Object.defineProperty(n,"__esModule",{value:!0}),n.default=d})(w,w.exports)),w.exports}var J=X();const at=Y(J);export{at as a};
|