@powerhousedao/connect 6.0.0-dev.95 → 6.0.0-dev.96
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/src/context/index.js +244 -2253
- package/dist/src/hooks/index.js +244 -2253
- package/dist/src/main.js +541 -2550
- package/dist/src/pages/index.js +541 -2550
- package/dist/src/pglite.worker.js +70 -0
- package/dist/src/services/index.js +10 -2019
- package/dist/src/store/index.js +330 -2339
- package/dist/src/utils/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
package/dist/src/store/index.js
CHANGED
|
@@ -4520,7 +4520,7 @@ var init_package = __esm(() => {
|
|
|
4520
4520
|
package_default = {
|
|
4521
4521
|
name: "@powerhousedao/connect",
|
|
4522
4522
|
productName: "Powerhouse-Connect",
|
|
4523
|
-
version: "6.0.0-dev.
|
|
4523
|
+
version: "6.0.0-dev.96",
|
|
4524
4524
|
description: "Powerhouse Connect",
|
|
4525
4525
|
main: "dist/index.html",
|
|
4526
4526
|
type: "module",
|
|
@@ -80789,12 +80789,6 @@ function createStackParser(...parsers) {
|
|
|
80789
80789
|
return stripSentryFramesAndReverse(frames.slice(framesToPop));
|
|
80790
80790
|
};
|
|
80791
80791
|
}
|
|
80792
|
-
function stackParserFromStackParserOptions(stackParser) {
|
|
80793
|
-
if (Array.isArray(stackParser)) {
|
|
80794
|
-
return createStackParser(...stackParser);
|
|
80795
|
-
}
|
|
80796
|
-
return stackParser;
|
|
80797
|
-
}
|
|
80798
80792
|
function stripSentryFramesAndReverse(stack) {
|
|
80799
80793
|
if (!stack.length) {
|
|
80800
80794
|
return [];
|
|
@@ -84995,35 +84989,6 @@ var init_api = __esm(() => {
|
|
|
84995
84989
|
});
|
|
84996
84990
|
|
|
84997
84991
|
// ../../node_modules/.pnpm/@sentry+core@10.40.0/node_modules/@sentry/core/build/esm/integration.js
|
|
84998
|
-
function filterDuplicates(integrations) {
|
|
84999
|
-
const integrationsByName = {};
|
|
85000
|
-
integrations.forEach((currentInstance) => {
|
|
85001
|
-
const { name: name6 } = currentInstance;
|
|
85002
|
-
const existingInstance = integrationsByName[name6];
|
|
85003
|
-
if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {
|
|
85004
|
-
return;
|
|
85005
|
-
}
|
|
85006
|
-
integrationsByName[name6] = currentInstance;
|
|
85007
|
-
});
|
|
85008
|
-
return Object.values(integrationsByName);
|
|
85009
|
-
}
|
|
85010
|
-
function getIntegrationsToSetup(options) {
|
|
85011
|
-
const defaultIntegrations = options.defaultIntegrations || [];
|
|
85012
|
-
const userIntegrations = options.integrations;
|
|
85013
|
-
defaultIntegrations.forEach((integration) => {
|
|
85014
|
-
integration.isDefaultInstance = true;
|
|
85015
|
-
});
|
|
85016
|
-
let integrations;
|
|
85017
|
-
if (Array.isArray(userIntegrations)) {
|
|
85018
|
-
integrations = [...defaultIntegrations, ...userIntegrations];
|
|
85019
|
-
} else if (typeof userIntegrations === "function") {
|
|
85020
|
-
const resolvedUserIntegrations = userIntegrations(defaultIntegrations);
|
|
85021
|
-
integrations = Array.isArray(resolvedUserIntegrations) ? resolvedUserIntegrations : [resolvedUserIntegrations];
|
|
85022
|
-
} else {
|
|
85023
|
-
integrations = defaultIntegrations;
|
|
85024
|
-
}
|
|
85025
|
-
return filterDuplicates(integrations);
|
|
85026
|
-
}
|
|
85027
84992
|
function setupIntegrations(client, integrations) {
|
|
85028
84993
|
const integrationIndex = {};
|
|
85029
84994
|
integrations.forEach((integration) => {
|
|
@@ -86326,30 +86291,11 @@ var init_client = __esm(() => {
|
|
|
86326
86291
|
});
|
|
86327
86292
|
|
|
86328
86293
|
// ../../node_modules/.pnpm/@sentry+core@10.40.0/node_modules/@sentry/core/build/esm/sdk.js
|
|
86329
|
-
function initAndBind(clientClass, options) {
|
|
86330
|
-
if (options.debug === true) {
|
|
86331
|
-
if (DEBUG_BUILD) {
|
|
86332
|
-
debug.enable();
|
|
86333
|
-
} else {
|
|
86334
|
-
consoleSandbox(() => {
|
|
86335
|
-
console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
|
|
86336
|
-
});
|
|
86337
|
-
}
|
|
86338
|
-
}
|
|
86339
|
-
const scope = getCurrentScope();
|
|
86340
|
-
scope.update(options.initialScope);
|
|
86341
|
-
const client = new clientClass(options);
|
|
86342
|
-
setCurrentClient(client);
|
|
86343
|
-
client.init();
|
|
86344
|
-
return client;
|
|
86345
|
-
}
|
|
86346
86294
|
function setCurrentClient(client) {
|
|
86347
86295
|
getCurrentScope().setClient(client);
|
|
86348
86296
|
}
|
|
86349
86297
|
var init_sdk = __esm(() => {
|
|
86350
86298
|
init_currentScopes();
|
|
86351
|
-
init_debug_build();
|
|
86352
|
-
init_debug_logger();
|
|
86353
86299
|
});
|
|
86354
86300
|
|
|
86355
86301
|
// ../../node_modules/.pnpm/@sentry+core@10.40.0/node_modules/@sentry/core/build/esm/transports/offline.js
|
|
@@ -97152,41 +97098,6 @@ var init_spotlight = __esm(() => {
|
|
|
97152
97098
|
spotlightBrowserIntegration = defineIntegration(_spotlightIntegration);
|
|
97153
97099
|
});
|
|
97154
97100
|
|
|
97155
|
-
// ../../node_modules/.pnpm/@sentry+browser@10.40.0/node_modules/@sentry/browser/build/npm/esm/dev/utils/detectBrowserExtension.js
|
|
97156
|
-
function checkAndWarnIfIsEmbeddedBrowserExtension() {
|
|
97157
|
-
if (_isEmbeddedBrowserExtension()) {
|
|
97158
|
-
if (DEBUG_BUILD4) {
|
|
97159
|
-
consoleSandbox(() => {
|
|
97160
|
-
console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/");
|
|
97161
|
-
});
|
|
97162
|
-
}
|
|
97163
|
-
return true;
|
|
97164
|
-
}
|
|
97165
|
-
return false;
|
|
97166
|
-
}
|
|
97167
|
-
function _isEmbeddedBrowserExtension() {
|
|
97168
|
-
if (typeof WINDOW4.window === "undefined") {
|
|
97169
|
-
return false;
|
|
97170
|
-
}
|
|
97171
|
-
const _window = WINDOW4;
|
|
97172
|
-
if (_window.nw) {
|
|
97173
|
-
return false;
|
|
97174
|
-
}
|
|
97175
|
-
const extensionObject = _window["chrome"] || _window["browser"];
|
|
97176
|
-
if (!extensionObject?.runtime?.id) {
|
|
97177
|
-
return false;
|
|
97178
|
-
}
|
|
97179
|
-
const href = getLocationHref();
|
|
97180
|
-
const extensionProtocols = ["chrome-extension", "moz-extension", "ms-browser-extension", "safari-web-extension"];
|
|
97181
|
-
const isDedicatedExtensionPage = WINDOW4 === WINDOW4.top && extensionProtocols.some((protocol) => href.startsWith(`${protocol}://`));
|
|
97182
|
-
return !isDedicatedExtensionPage;
|
|
97183
|
-
}
|
|
97184
|
-
var init_detectBrowserExtension = __esm(() => {
|
|
97185
|
-
init_esm2();
|
|
97186
|
-
init_debug_build3();
|
|
97187
|
-
init_helpers();
|
|
97188
|
-
});
|
|
97189
|
-
|
|
97190
97101
|
// ../../node_modules/.pnpm/@sentry+browser@10.40.0/node_modules/@sentry/browser/build/npm/esm/dev/sdk.js
|
|
97191
97102
|
function getDefaultIntegrations(_options) {
|
|
97192
97103
|
return [
|
|
@@ -97203,35 +97114,12 @@ function getDefaultIntegrations(_options) {
|
|
|
97203
97114
|
browserSessionIntegration()
|
|
97204
97115
|
];
|
|
97205
97116
|
}
|
|
97206
|
-
function init(options = {}) {
|
|
97207
|
-
const shouldDisableBecauseIsBrowserExtenstion = !options.skipBrowserExtensionCheck && checkAndWarnIfIsEmbeddedBrowserExtension();
|
|
97208
|
-
let defaultIntegrations = options.defaultIntegrations == null ? getDefaultIntegrations() : options.defaultIntegrations;
|
|
97209
|
-
if (options.spotlight) {
|
|
97210
|
-
if (!defaultIntegrations) {
|
|
97211
|
-
defaultIntegrations = [];
|
|
97212
|
-
}
|
|
97213
|
-
const args = typeof options.spotlight === "string" ? { sidecarUrl: options.spotlight } : undefined;
|
|
97214
|
-
defaultIntegrations.push(spotlightBrowserIntegration(args));
|
|
97215
|
-
}
|
|
97216
|
-
const clientOptions = {
|
|
97217
|
-
...options,
|
|
97218
|
-
enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,
|
|
97219
|
-
stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),
|
|
97220
|
-
integrations: getIntegrationsToSetup({
|
|
97221
|
-
integrations: options.integrations,
|
|
97222
|
-
defaultIntegrations
|
|
97223
|
-
}),
|
|
97224
|
-
transport: options.transport || makeFetchTransport
|
|
97225
|
-
};
|
|
97226
|
-
return initAndBind(BrowserClient, clientOptions);
|
|
97227
|
-
}
|
|
97228
97117
|
function forceLoad() {}
|
|
97229
97118
|
function onLoad(callback) {
|
|
97230
97119
|
callback();
|
|
97231
97120
|
}
|
|
97232
97121
|
var init_sdk2 = __esm(() => {
|
|
97233
97122
|
init_esm2();
|
|
97234
|
-
init_client2();
|
|
97235
97123
|
init_breadcrumbs2();
|
|
97236
97124
|
init_browserapierrors();
|
|
97237
97125
|
init_browsersession();
|
|
@@ -97239,10 +97127,6 @@ var init_sdk2 = __esm(() => {
|
|
|
97239
97127
|
init_globalhandlers();
|
|
97240
97128
|
init_httpcontext();
|
|
97241
97129
|
init_linkederrors();
|
|
97242
|
-
init_spotlight();
|
|
97243
|
-
init_stack_parsers();
|
|
97244
|
-
init_fetch3();
|
|
97245
|
-
init_detectBrowserExtension();
|
|
97246
97130
|
});
|
|
97247
97131
|
|
|
97248
97132
|
// ../../node_modules/.pnpm/@sentry+browser@10.40.0/node_modules/@sentry/browser/build/npm/esm/dev/report-dialog.js
|
|
@@ -101605,12 +101489,12 @@ function record(options = {}) {
|
|
|
101605
101489
|
console.warn(error3);
|
|
101606
101490
|
}
|
|
101607
101491
|
});
|
|
101608
|
-
const
|
|
101492
|
+
const init = () => {
|
|
101609
101493
|
takeFullSnapshot2();
|
|
101610
101494
|
handlers3.push(observe2(document));
|
|
101611
101495
|
};
|
|
101612
101496
|
if (document.readyState === "interactive" || document.readyState === "complete") {
|
|
101613
|
-
|
|
101497
|
+
init();
|
|
101614
101498
|
} else {
|
|
101615
101499
|
handlers3.push(on("DOMContentLoaded", () => {
|
|
101616
101500
|
wrappedEmit({
|
|
@@ -101618,7 +101502,7 @@ function record(options = {}) {
|
|
|
101618
101502
|
data: {}
|
|
101619
101503
|
});
|
|
101620
101504
|
if (recordAfter === "DOMContentLoaded")
|
|
101621
|
-
|
|
101505
|
+
init();
|
|
101622
101506
|
}));
|
|
101623
101507
|
handlers3.push(on("load", () => {
|
|
101624
101508
|
wrappedEmit({
|
|
@@ -101626,7 +101510,7 @@ function record(options = {}) {
|
|
|
101626
101510
|
data: {}
|
|
101627
101511
|
});
|
|
101628
101512
|
if (recordAfter === "load")
|
|
101629
|
-
|
|
101513
|
+
init();
|
|
101630
101514
|
}, window));
|
|
101631
101515
|
}
|
|
101632
101516
|
return () => {
|
|
@@ -104582,10 +104466,10 @@ function _INTERNAL_instrumentRequestInterface() {
|
|
|
104582
104466
|
}
|
|
104583
104467
|
const OriginalRequest = Request;
|
|
104584
104468
|
try {
|
|
104585
|
-
const SentryRequest = function(input,
|
|
104586
|
-
const request = new OriginalRequest(input,
|
|
104587
|
-
if (
|
|
104588
|
-
request[ORIGINAL_BODY] =
|
|
104469
|
+
const SentryRequest = function(input, init) {
|
|
104470
|
+
const request = new OriginalRequest(input, init);
|
|
104471
|
+
if (init?.body != null) {
|
|
104472
|
+
request[ORIGINAL_BODY] = init.body;
|
|
104589
104473
|
}
|
|
104590
104474
|
return request;
|
|
104591
104475
|
};
|
|
@@ -108055,1889 +107939,6 @@ var init_dev = __esm(() => {
|
|
|
108055
107939
|
init_webWorker();
|
|
108056
107940
|
});
|
|
108057
107941
|
|
|
108058
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/sdk.js
|
|
108059
|
-
import { version as version3 } from "react";
|
|
108060
|
-
function init2(options) {
|
|
108061
|
-
const opts = {
|
|
108062
|
-
...options
|
|
108063
|
-
};
|
|
108064
|
-
applySdkMetadata(opts, "react");
|
|
108065
|
-
setContext("react", { version: version3 });
|
|
108066
|
-
return init(opts);
|
|
108067
|
-
}
|
|
108068
|
-
var init_sdk3 = __esm(() => {
|
|
108069
|
-
init_dev();
|
|
108070
|
-
init_esm2();
|
|
108071
|
-
});
|
|
108072
|
-
|
|
108073
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/error.js
|
|
108074
|
-
import { version as version5 } from "react";
|
|
108075
|
-
function isAtLeastReact17(reactVersion) {
|
|
108076
|
-
const reactMajor = reactVersion.match(/^([^.]+)/);
|
|
108077
|
-
return reactMajor !== null && parseInt(reactMajor[0]) >= 17;
|
|
108078
|
-
}
|
|
108079
|
-
function setCause(error3, cause) {
|
|
108080
|
-
const seenErrors = new WeakSet;
|
|
108081
|
-
function recurse(error4, cause2) {
|
|
108082
|
-
if (seenErrors.has(error4)) {
|
|
108083
|
-
return;
|
|
108084
|
-
}
|
|
108085
|
-
if (error4.cause) {
|
|
108086
|
-
seenErrors.add(error4);
|
|
108087
|
-
return recurse(error4.cause, cause2);
|
|
108088
|
-
}
|
|
108089
|
-
error4.cause = cause2;
|
|
108090
|
-
}
|
|
108091
|
-
recurse(error3, cause);
|
|
108092
|
-
}
|
|
108093
|
-
function captureReactException(error3, { componentStack }, hint) {
|
|
108094
|
-
if (isAtLeastReact17(version5) && isError(error3) && componentStack) {
|
|
108095
|
-
const errorBoundaryError = new Error(error3.message);
|
|
108096
|
-
errorBoundaryError.name = `React ErrorBoundary ${error3.name}`;
|
|
108097
|
-
errorBoundaryError.stack = componentStack;
|
|
108098
|
-
setCause(error3, errorBoundaryError);
|
|
108099
|
-
}
|
|
108100
|
-
return withScope2((scope) => {
|
|
108101
|
-
scope.setContext("react", { componentStack });
|
|
108102
|
-
return captureException(error3, hint);
|
|
108103
|
-
});
|
|
108104
|
-
}
|
|
108105
|
-
function reactErrorHandler(callback) {
|
|
108106
|
-
return (error3, errorInfo) => {
|
|
108107
|
-
const hasCallback = !!callback;
|
|
108108
|
-
const eventId = captureReactException(error3, errorInfo, {
|
|
108109
|
-
mechanism: { handled: hasCallback, type: "auto.function.react.error_handler" }
|
|
108110
|
-
});
|
|
108111
|
-
if (hasCallback) {
|
|
108112
|
-
callback(error3, errorInfo, eventId);
|
|
108113
|
-
}
|
|
108114
|
-
};
|
|
108115
|
-
}
|
|
108116
|
-
var init_error = __esm(() => {
|
|
108117
|
-
init_dev();
|
|
108118
|
-
init_esm2();
|
|
108119
|
-
});
|
|
108120
|
-
|
|
108121
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/constants.js
|
|
108122
|
-
var REACT_RENDER_OP = "ui.react.render", REACT_UPDATE_OP = "ui.react.update", REACT_MOUNT_OP = "ui.react.mount";
|
|
108123
|
-
var init_constants9 = () => {};
|
|
108124
|
-
|
|
108125
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/hoist-non-react-statics.js
|
|
108126
|
-
function isMemo(component) {
|
|
108127
|
-
return typeof component === "object" && component !== null && component.$$typeof === MemoType;
|
|
108128
|
-
}
|
|
108129
|
-
function getStatics(component) {
|
|
108130
|
-
if (isMemo(component)) {
|
|
108131
|
-
return MEMO_STATICS;
|
|
108132
|
-
}
|
|
108133
|
-
const componentType = component.$$typeof;
|
|
108134
|
-
return componentType && TYPE_STATICS[componentType] || REACT_STATICS;
|
|
108135
|
-
}
|
|
108136
|
-
function hoistNonReactStatics(targetComponent, sourceComponent, excludelist) {
|
|
108137
|
-
if (typeof sourceComponent !== "string") {
|
|
108138
|
-
if (objectPrototype) {
|
|
108139
|
-
const inheritedComponent = getPrototypeOf(sourceComponent);
|
|
108140
|
-
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
108141
|
-
hoistNonReactStatics(targetComponent, inheritedComponent);
|
|
108142
|
-
}
|
|
108143
|
-
}
|
|
108144
|
-
let keys2 = getOwnPropertyNames(sourceComponent);
|
|
108145
|
-
if (getOwnPropertySymbols) {
|
|
108146
|
-
keys2 = keys2.concat(getOwnPropertySymbols(sourceComponent));
|
|
108147
|
-
}
|
|
108148
|
-
const targetStatics = getStatics(targetComponent);
|
|
108149
|
-
const sourceStatics = getStatics(sourceComponent);
|
|
108150
|
-
for (const key of keys2) {
|
|
108151
|
-
if (!KNOWN_STATICS[key] && true && !sourceStatics?.[key] && !targetStatics?.[key] && !getOwnPropertyDescriptor(targetComponent, key)) {
|
|
108152
|
-
const descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
108153
|
-
if (descriptor) {
|
|
108154
|
-
try {
|
|
108155
|
-
defineProperty(targetComponent, key, descriptor);
|
|
108156
|
-
} catch (e3) {}
|
|
108157
|
-
}
|
|
108158
|
-
}
|
|
108159
|
-
}
|
|
108160
|
-
}
|
|
108161
|
-
return targetComponent;
|
|
108162
|
-
}
|
|
108163
|
-
var REACT_STATICS, KNOWN_STATICS, FORWARD_REF_STATICS, MEMO_STATICS, ForwardRefType, MemoType, TYPE_STATICS, defineProperty, getOwnPropertyNames, getOwnPropertySymbols, getOwnPropertyDescriptor, getPrototypeOf, objectPrototype;
|
|
108164
|
-
var init_hoist_non_react_statics = __esm(() => {
|
|
108165
|
-
REACT_STATICS = {
|
|
108166
|
-
childContextTypes: true,
|
|
108167
|
-
contextType: true,
|
|
108168
|
-
contextTypes: true,
|
|
108169
|
-
defaultProps: true,
|
|
108170
|
-
displayName: true,
|
|
108171
|
-
getDefaultProps: true,
|
|
108172
|
-
getDerivedStateFromError: true,
|
|
108173
|
-
getDerivedStateFromProps: true,
|
|
108174
|
-
mixins: true,
|
|
108175
|
-
propTypes: true,
|
|
108176
|
-
type: true
|
|
108177
|
-
};
|
|
108178
|
-
KNOWN_STATICS = {
|
|
108179
|
-
name: true,
|
|
108180
|
-
length: true,
|
|
108181
|
-
prototype: true,
|
|
108182
|
-
caller: true,
|
|
108183
|
-
callee: true,
|
|
108184
|
-
arguments: true,
|
|
108185
|
-
arity: true
|
|
108186
|
-
};
|
|
108187
|
-
FORWARD_REF_STATICS = {
|
|
108188
|
-
$$typeof: true,
|
|
108189
|
-
render: true,
|
|
108190
|
-
defaultProps: true,
|
|
108191
|
-
displayName: true,
|
|
108192
|
-
propTypes: true
|
|
108193
|
-
};
|
|
108194
|
-
MEMO_STATICS = {
|
|
108195
|
-
$$typeof: true,
|
|
108196
|
-
compare: true,
|
|
108197
|
-
defaultProps: true,
|
|
108198
|
-
displayName: true,
|
|
108199
|
-
propTypes: true,
|
|
108200
|
-
type: true
|
|
108201
|
-
};
|
|
108202
|
-
ForwardRefType = Symbol.for("react.forward_ref");
|
|
108203
|
-
MemoType = Symbol.for("react.memo");
|
|
108204
|
-
TYPE_STATICS = {};
|
|
108205
|
-
TYPE_STATICS[ForwardRefType] = FORWARD_REF_STATICS;
|
|
108206
|
-
TYPE_STATICS[MemoType] = MEMO_STATICS;
|
|
108207
|
-
defineProperty = Object.defineProperty.bind(Object);
|
|
108208
|
-
getOwnPropertyNames = Object.getOwnPropertyNames.bind(Object);
|
|
108209
|
-
getOwnPropertySymbols = Object.getOwnPropertySymbols?.bind(Object);
|
|
108210
|
-
getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor.bind(Object);
|
|
108211
|
-
getPrototypeOf = Object.getPrototypeOf.bind(Object);
|
|
108212
|
-
objectPrototype = Object.prototype;
|
|
108213
|
-
});
|
|
108214
|
-
|
|
108215
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/profiler.js
|
|
108216
|
-
import * as React from "react";
|
|
108217
|
-
function withProfiler(WrappedComponent, options) {
|
|
108218
|
-
const componentDisplayName = options?.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;
|
|
108219
|
-
const Wrapped = (props) => React.createElement(Profiler, { ...options, name: componentDisplayName, updateProps: props }, React.createElement(WrappedComponent, { ...props }));
|
|
108220
|
-
Wrapped.displayName = `profiler(${componentDisplayName})`;
|
|
108221
|
-
hoistNonReactStatics(Wrapped, WrappedComponent);
|
|
108222
|
-
return Wrapped;
|
|
108223
|
-
}
|
|
108224
|
-
function useProfiler(name6, options = {
|
|
108225
|
-
disabled: false,
|
|
108226
|
-
hasRenderSpan: true
|
|
108227
|
-
}) {
|
|
108228
|
-
const [mountSpan] = React.useState(() => {
|
|
108229
|
-
if (options?.disabled) {
|
|
108230
|
-
return;
|
|
108231
|
-
}
|
|
108232
|
-
return startInactiveSpan({
|
|
108233
|
-
name: `<${name6}>`,
|
|
108234
|
-
onlyIfParent: true,
|
|
108235
|
-
op: REACT_MOUNT_OP,
|
|
108236
|
-
attributes: {
|
|
108237
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
108238
|
-
"ui.component_name": name6
|
|
108239
|
-
}
|
|
108240
|
-
});
|
|
108241
|
-
});
|
|
108242
|
-
React.useEffect(() => {
|
|
108243
|
-
if (mountSpan) {
|
|
108244
|
-
mountSpan.end();
|
|
108245
|
-
}
|
|
108246
|
-
return () => {
|
|
108247
|
-
if (mountSpan && options.hasRenderSpan) {
|
|
108248
|
-
const startTime = spanToJSON(mountSpan).timestamp;
|
|
108249
|
-
const endTimestamp = timestampInSeconds();
|
|
108250
|
-
const renderSpan = startInactiveSpan({
|
|
108251
|
-
name: `<${name6}>`,
|
|
108252
|
-
onlyIfParent: true,
|
|
108253
|
-
op: REACT_RENDER_OP,
|
|
108254
|
-
startTime,
|
|
108255
|
-
attributes: {
|
|
108256
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
108257
|
-
"ui.component_name": name6
|
|
108258
|
-
}
|
|
108259
|
-
});
|
|
108260
|
-
if (renderSpan) {
|
|
108261
|
-
renderSpan.end(endTimestamp);
|
|
108262
|
-
}
|
|
108263
|
-
}
|
|
108264
|
-
};
|
|
108265
|
-
}, []);
|
|
108266
|
-
}
|
|
108267
|
-
var UNKNOWN_COMPONENT = "unknown", Profiler;
|
|
108268
|
-
var init_profiler = __esm(() => {
|
|
108269
|
-
init_dev();
|
|
108270
|
-
init_esm2();
|
|
108271
|
-
init_constants9();
|
|
108272
|
-
init_hoist_non_react_statics();
|
|
108273
|
-
Profiler = class Profiler extends React.Component {
|
|
108274
|
-
constructor(props) {
|
|
108275
|
-
super(props);
|
|
108276
|
-
const { name: name6, disabled = false } = this.props;
|
|
108277
|
-
if (disabled) {
|
|
108278
|
-
return;
|
|
108279
|
-
}
|
|
108280
|
-
this._mountSpan = startInactiveSpan({
|
|
108281
|
-
name: `<${name6}>`,
|
|
108282
|
-
onlyIfParent: true,
|
|
108283
|
-
op: REACT_MOUNT_OP,
|
|
108284
|
-
attributes: {
|
|
108285
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
108286
|
-
"ui.component_name": name6
|
|
108287
|
-
}
|
|
108288
|
-
});
|
|
108289
|
-
}
|
|
108290
|
-
componentDidMount() {
|
|
108291
|
-
if (this._mountSpan) {
|
|
108292
|
-
this._mountSpan.end();
|
|
108293
|
-
}
|
|
108294
|
-
}
|
|
108295
|
-
shouldComponentUpdate({ updateProps, includeUpdates = true }) {
|
|
108296
|
-
if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {
|
|
108297
|
-
const changedProps = Object.keys(updateProps).filter((k2) => updateProps[k2] !== this.props.updateProps[k2]);
|
|
108298
|
-
if (changedProps.length > 0) {
|
|
108299
|
-
const now = timestampInSeconds();
|
|
108300
|
-
this._updateSpan = withActiveSpan(this._mountSpan, () => {
|
|
108301
|
-
return startInactiveSpan({
|
|
108302
|
-
name: `<${this.props.name}>`,
|
|
108303
|
-
onlyIfParent: true,
|
|
108304
|
-
op: REACT_UPDATE_OP,
|
|
108305
|
-
startTime: now,
|
|
108306
|
-
attributes: {
|
|
108307
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
108308
|
-
"ui.component_name": this.props.name,
|
|
108309
|
-
"ui.react.changed_props": changedProps
|
|
108310
|
-
}
|
|
108311
|
-
});
|
|
108312
|
-
});
|
|
108313
|
-
}
|
|
108314
|
-
}
|
|
108315
|
-
return true;
|
|
108316
|
-
}
|
|
108317
|
-
componentDidUpdate() {
|
|
108318
|
-
if (this._updateSpan) {
|
|
108319
|
-
this._updateSpan.end();
|
|
108320
|
-
this._updateSpan = undefined;
|
|
108321
|
-
}
|
|
108322
|
-
}
|
|
108323
|
-
componentWillUnmount() {
|
|
108324
|
-
const endTimestamp = timestampInSeconds();
|
|
108325
|
-
const { name: name6, includeRender = true } = this.props;
|
|
108326
|
-
if (this._mountSpan && includeRender) {
|
|
108327
|
-
const startTime = spanToJSON(this._mountSpan).timestamp;
|
|
108328
|
-
withActiveSpan(this._mountSpan, () => {
|
|
108329
|
-
const renderSpan = startInactiveSpan({
|
|
108330
|
-
onlyIfParent: true,
|
|
108331
|
-
name: `<${name6}>`,
|
|
108332
|
-
op: REACT_RENDER_OP,
|
|
108333
|
-
startTime,
|
|
108334
|
-
attributes: {
|
|
108335
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
|
|
108336
|
-
"ui.component_name": name6
|
|
108337
|
-
}
|
|
108338
|
-
});
|
|
108339
|
-
if (renderSpan) {
|
|
108340
|
-
renderSpan.end(endTimestamp);
|
|
108341
|
-
}
|
|
108342
|
-
});
|
|
108343
|
-
}
|
|
108344
|
-
}
|
|
108345
|
-
render() {
|
|
108346
|
-
return this.props.children;
|
|
108347
|
-
}
|
|
108348
|
-
};
|
|
108349
|
-
Object.assign(Profiler, {
|
|
108350
|
-
defaultProps: {
|
|
108351
|
-
disabled: false,
|
|
108352
|
-
includeRender: true,
|
|
108353
|
-
includeUpdates: true
|
|
108354
|
-
}
|
|
108355
|
-
});
|
|
108356
|
-
});
|
|
108357
|
-
|
|
108358
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/debug-build.js
|
|
108359
|
-
var DEBUG_BUILD6;
|
|
108360
|
-
var init_debug_build4 = __esm(() => {
|
|
108361
|
-
DEBUG_BUILD6 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
108362
|
-
});
|
|
108363
|
-
|
|
108364
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/errorboundary.js
|
|
108365
|
-
import * as React2 from "react";
|
|
108366
|
-
function withErrorBoundary(WrappedComponent, errorBoundaryOptions) {
|
|
108367
|
-
const componentDisplayName = WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT2;
|
|
108368
|
-
const Wrapped = React2.memo((props) => React2.createElement(ErrorBoundary, { ...errorBoundaryOptions }, React2.createElement(WrappedComponent, { ...props })));
|
|
108369
|
-
Wrapped.displayName = `errorBoundary(${componentDisplayName})`;
|
|
108370
|
-
hoistNonReactStatics(Wrapped, WrappedComponent);
|
|
108371
|
-
return Wrapped;
|
|
108372
|
-
}
|
|
108373
|
-
var UNKNOWN_COMPONENT2 = "unknown", INITIAL_STATE, ErrorBoundary;
|
|
108374
|
-
var init_errorboundary = __esm(() => {
|
|
108375
|
-
init_dev();
|
|
108376
|
-
init_esm2();
|
|
108377
|
-
init_debug_build4();
|
|
108378
|
-
init_error();
|
|
108379
|
-
init_hoist_non_react_statics();
|
|
108380
|
-
INITIAL_STATE = {
|
|
108381
|
-
componentStack: null,
|
|
108382
|
-
error: null,
|
|
108383
|
-
eventId: null
|
|
108384
|
-
};
|
|
108385
|
-
ErrorBoundary = class ErrorBoundary extends React2.Component {
|
|
108386
|
-
constructor(props) {
|
|
108387
|
-
super(props);
|
|
108388
|
-
this.state = INITIAL_STATE;
|
|
108389
|
-
this._openFallbackReportDialog = true;
|
|
108390
|
-
const client = getClient();
|
|
108391
|
-
if (client && props.showDialog) {
|
|
108392
|
-
this._openFallbackReportDialog = false;
|
|
108393
|
-
this._cleanupHook = client.on("afterSendEvent", (event) => {
|
|
108394
|
-
if (!event.type && this._lastEventId && event.event_id === this._lastEventId) {
|
|
108395
|
-
showReportDialog({ ...props.dialogOptions, eventId: this._lastEventId });
|
|
108396
|
-
}
|
|
108397
|
-
});
|
|
108398
|
-
}
|
|
108399
|
-
}
|
|
108400
|
-
componentDidCatch(error3, errorInfo) {
|
|
108401
|
-
const { componentStack } = errorInfo;
|
|
108402
|
-
const { beforeCapture, onError, showDialog, dialogOptions } = this.props;
|
|
108403
|
-
withScope2((scope) => {
|
|
108404
|
-
if (beforeCapture) {
|
|
108405
|
-
beforeCapture(scope, error3, componentStack);
|
|
108406
|
-
}
|
|
108407
|
-
const handled = this.props.handled != null ? this.props.handled : !!this.props.fallback;
|
|
108408
|
-
const eventId = captureReactException(error3, errorInfo, {
|
|
108409
|
-
mechanism: { handled, type: "auto.function.react.error_boundary" }
|
|
108410
|
-
});
|
|
108411
|
-
if (onError) {
|
|
108412
|
-
onError(error3, componentStack, eventId);
|
|
108413
|
-
}
|
|
108414
|
-
if (showDialog) {
|
|
108415
|
-
this._lastEventId = eventId;
|
|
108416
|
-
if (this._openFallbackReportDialog) {
|
|
108417
|
-
showReportDialog({ ...dialogOptions, eventId });
|
|
108418
|
-
}
|
|
108419
|
-
}
|
|
108420
|
-
this.setState({ error: error3, componentStack, eventId });
|
|
108421
|
-
});
|
|
108422
|
-
}
|
|
108423
|
-
componentDidMount() {
|
|
108424
|
-
const { onMount } = this.props;
|
|
108425
|
-
if (onMount) {
|
|
108426
|
-
onMount();
|
|
108427
|
-
}
|
|
108428
|
-
}
|
|
108429
|
-
componentWillUnmount() {
|
|
108430
|
-
const { error: error3, componentStack, eventId } = this.state;
|
|
108431
|
-
const { onUnmount } = this.props;
|
|
108432
|
-
if (onUnmount) {
|
|
108433
|
-
if (this.state === INITIAL_STATE) {
|
|
108434
|
-
onUnmount(null, null, null);
|
|
108435
|
-
} else {
|
|
108436
|
-
onUnmount(error3, componentStack, eventId);
|
|
108437
|
-
}
|
|
108438
|
-
}
|
|
108439
|
-
if (this._cleanupHook) {
|
|
108440
|
-
this._cleanupHook();
|
|
108441
|
-
this._cleanupHook = undefined;
|
|
108442
|
-
}
|
|
108443
|
-
}
|
|
108444
|
-
resetErrorBoundary() {
|
|
108445
|
-
const { onReset } = this.props;
|
|
108446
|
-
const { error: error3, componentStack, eventId } = this.state;
|
|
108447
|
-
if (onReset) {
|
|
108448
|
-
onReset(error3, componentStack, eventId);
|
|
108449
|
-
}
|
|
108450
|
-
this.setState(INITIAL_STATE);
|
|
108451
|
-
}
|
|
108452
|
-
render() {
|
|
108453
|
-
const { fallback, children } = this.props;
|
|
108454
|
-
const state = this.state;
|
|
108455
|
-
if (state.componentStack === null) {
|
|
108456
|
-
return typeof children === "function" ? children() : children;
|
|
108457
|
-
}
|
|
108458
|
-
const element = typeof fallback === "function" ? React2.createElement(fallback, {
|
|
108459
|
-
error: state.error,
|
|
108460
|
-
componentStack: state.componentStack,
|
|
108461
|
-
resetError: () => this.resetErrorBoundary(),
|
|
108462
|
-
eventId: state.eventId
|
|
108463
|
-
}) : fallback;
|
|
108464
|
-
if (React2.isValidElement(element)) {
|
|
108465
|
-
return element;
|
|
108466
|
-
}
|
|
108467
|
-
if (fallback) {
|
|
108468
|
-
DEBUG_BUILD6 && debug.warn("fallback did not produce a valid ReactElement");
|
|
108469
|
-
}
|
|
108470
|
-
return null;
|
|
108471
|
-
}
|
|
108472
|
-
};
|
|
108473
|
-
});
|
|
108474
|
-
|
|
108475
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/redux.js
|
|
108476
|
-
function createReduxEnhancer(enhancerOptions) {
|
|
108477
|
-
const options = {
|
|
108478
|
-
...defaultOptions,
|
|
108479
|
-
...enhancerOptions
|
|
108480
|
-
};
|
|
108481
|
-
return (next) => (reducer, initialState) => {
|
|
108482
|
-
options.attachReduxState && getGlobalScope().addEventProcessor((event, hint) => {
|
|
108483
|
-
try {
|
|
108484
|
-
if (event.type === undefined && event.contexts.state.state.type === "redux") {
|
|
108485
|
-
hint.attachments = [
|
|
108486
|
-
...hint.attachments || [],
|
|
108487
|
-
{ filename: "redux_state.json", data: JSON.stringify(event.contexts.state.state.value) }
|
|
108488
|
-
];
|
|
108489
|
-
}
|
|
108490
|
-
} catch {}
|
|
108491
|
-
return event;
|
|
108492
|
-
});
|
|
108493
|
-
function sentryWrapReducer(reducer2) {
|
|
108494
|
-
return (state, action) => {
|
|
108495
|
-
const newState = reducer2(state, action);
|
|
108496
|
-
const scope = getCurrentScope();
|
|
108497
|
-
const transformedAction = options.actionTransformer(action);
|
|
108498
|
-
if (typeof transformedAction !== "undefined" && transformedAction !== null) {
|
|
108499
|
-
addBreadcrumb({
|
|
108500
|
-
category: ACTION_BREADCRUMB_CATEGORY,
|
|
108501
|
-
data: transformedAction,
|
|
108502
|
-
type: ACTION_BREADCRUMB_TYPE
|
|
108503
|
-
});
|
|
108504
|
-
}
|
|
108505
|
-
const transformedState = options.stateTransformer(newState);
|
|
108506
|
-
if (typeof transformedState !== "undefined" && transformedState !== null) {
|
|
108507
|
-
const client = getClient();
|
|
108508
|
-
const options2 = client?.getOptions();
|
|
108509
|
-
const normalizationDepth = options2?.normalizeDepth || 3;
|
|
108510
|
-
const newStateContext = { state: { type: "redux", value: transformedState } };
|
|
108511
|
-
addNonEnumerableProperty(newStateContext, "__sentry_override_normalization_depth__", 3 + normalizationDepth);
|
|
108512
|
-
scope.setContext("state", newStateContext);
|
|
108513
|
-
} else {
|
|
108514
|
-
scope.setContext("state", null);
|
|
108515
|
-
}
|
|
108516
|
-
const { configureScopeWithState } = options;
|
|
108517
|
-
if (typeof configureScopeWithState === "function") {
|
|
108518
|
-
configureScopeWithState(scope, newState);
|
|
108519
|
-
}
|
|
108520
|
-
return newState;
|
|
108521
|
-
};
|
|
108522
|
-
}
|
|
108523
|
-
const store2 = next(sentryWrapReducer(reducer), initialState);
|
|
108524
|
-
store2.replaceReducer = new Proxy(store2.replaceReducer, {
|
|
108525
|
-
apply: function(target, thisArg, args) {
|
|
108526
|
-
target.apply(thisArg, [sentryWrapReducer(args[0])]);
|
|
108527
|
-
}
|
|
108528
|
-
});
|
|
108529
|
-
return store2;
|
|
108530
|
-
};
|
|
108531
|
-
}
|
|
108532
|
-
var ACTION_BREADCRUMB_CATEGORY = "redux.action", ACTION_BREADCRUMB_TYPE = "info", defaultOptions;
|
|
108533
|
-
var init_redux = __esm(() => {
|
|
108534
|
-
init_esm2();
|
|
108535
|
-
defaultOptions = {
|
|
108536
|
-
attachReduxState: true,
|
|
108537
|
-
actionTransformer: (action) => action,
|
|
108538
|
-
stateTransformer: (state) => state || null
|
|
108539
|
-
};
|
|
108540
|
-
});
|
|
108541
|
-
|
|
108542
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouterv3.js
|
|
108543
|
-
function reactRouterV3BrowserTracingIntegration(options) {
|
|
108544
|
-
const integration = browserTracingIntegration({
|
|
108545
|
-
...options,
|
|
108546
|
-
instrumentPageLoad: false,
|
|
108547
|
-
instrumentNavigation: false
|
|
108548
|
-
});
|
|
108549
|
-
const { history, routes, match, instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
108550
|
-
return {
|
|
108551
|
-
...integration,
|
|
108552
|
-
afterAllSetup(client) {
|
|
108553
|
-
integration.afterAllSetup(client);
|
|
108554
|
-
if (instrumentPageLoad && WINDOW4.location) {
|
|
108555
|
-
normalizeTransactionName(routes, WINDOW4.location, match, (localName, source = "url") => {
|
|
108556
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
108557
|
-
name: localName,
|
|
108558
|
-
attributes: {
|
|
108559
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
108560
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.pageload.react.reactrouter_v3",
|
|
108561
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
108562
|
-
}
|
|
108563
|
-
});
|
|
108564
|
-
});
|
|
108565
|
-
}
|
|
108566
|
-
if (instrumentNavigation && history.listen) {
|
|
108567
|
-
history.listen((location) => {
|
|
108568
|
-
if (location.action === "PUSH" || location.action === "POP") {
|
|
108569
|
-
normalizeTransactionName(routes, location, match, (localName, source = "url") => {
|
|
108570
|
-
startBrowserTracingNavigationSpan(client, {
|
|
108571
|
-
name: localName,
|
|
108572
|
-
attributes: {
|
|
108573
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
108574
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.navigation.react.reactrouter_v3",
|
|
108575
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
108576
|
-
}
|
|
108577
|
-
});
|
|
108578
|
-
});
|
|
108579
|
-
}
|
|
108580
|
-
});
|
|
108581
|
-
}
|
|
108582
|
-
}
|
|
108583
|
-
};
|
|
108584
|
-
}
|
|
108585
|
-
function normalizeTransactionName(appRoutes, location, match, callback) {
|
|
108586
|
-
let name6 = location.pathname;
|
|
108587
|
-
match({
|
|
108588
|
-
location,
|
|
108589
|
-
routes: appRoutes
|
|
108590
|
-
}, (error3, _redirectLocation, renderProps) => {
|
|
108591
|
-
if (error3 || !renderProps) {
|
|
108592
|
-
return callback(name6);
|
|
108593
|
-
}
|
|
108594
|
-
const routePath = getRouteStringFromRoutes(renderProps.routes || []);
|
|
108595
|
-
if (routePath.length === 0 || routePath === "/*") {
|
|
108596
|
-
return callback(name6);
|
|
108597
|
-
}
|
|
108598
|
-
name6 = routePath;
|
|
108599
|
-
return callback(name6, "route");
|
|
108600
|
-
});
|
|
108601
|
-
}
|
|
108602
|
-
function getRouteStringFromRoutes(routes) {
|
|
108603
|
-
if (!Array.isArray(routes) || routes.length === 0) {
|
|
108604
|
-
return "";
|
|
108605
|
-
}
|
|
108606
|
-
const routesWithPaths = routes.filter((route) => !!route.path);
|
|
108607
|
-
let index = -1;
|
|
108608
|
-
for (let x2 = routesWithPaths.length - 1;x2 >= 0; x2--) {
|
|
108609
|
-
const route = routesWithPaths[x2];
|
|
108610
|
-
if (route.path?.startsWith("/")) {
|
|
108611
|
-
index = x2;
|
|
108612
|
-
break;
|
|
108613
|
-
}
|
|
108614
|
-
}
|
|
108615
|
-
return routesWithPaths.slice(index).reduce((acc, { path: path2 }) => {
|
|
108616
|
-
const pathSegment = acc === "/" || acc === "" ? path2 : `/${path2}`;
|
|
108617
|
-
return `${acc}${pathSegment}`;
|
|
108618
|
-
}, "");
|
|
108619
|
-
}
|
|
108620
|
-
var init_reactrouterv3 = __esm(() => {
|
|
108621
|
-
init_dev();
|
|
108622
|
-
init_esm2();
|
|
108623
|
-
});
|
|
108624
|
-
|
|
108625
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/tanstackrouter.js
|
|
108626
|
-
function tanstackRouterBrowserTracingIntegration(router, options = {}) {
|
|
108627
|
-
const castRouterInstance = router;
|
|
108628
|
-
const browserTracingIntegrationInstance = browserTracingIntegration({
|
|
108629
|
-
...options,
|
|
108630
|
-
instrumentNavigation: false,
|
|
108631
|
-
instrumentPageLoad: false
|
|
108632
|
-
});
|
|
108633
|
-
const { instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
108634
|
-
return {
|
|
108635
|
-
...browserTracingIntegrationInstance,
|
|
108636
|
-
afterAllSetup(client) {
|
|
108637
|
-
browserTracingIntegrationInstance.afterAllSetup(client);
|
|
108638
|
-
const initialWindowLocation = WINDOW4.location;
|
|
108639
|
-
if (instrumentPageLoad && initialWindowLocation) {
|
|
108640
|
-
const matchedRoutes = castRouterInstance.matchRoutes(initialWindowLocation.pathname, castRouterInstance.options.parseSearch(initialWindowLocation.search), { preload: false, throwOnError: false });
|
|
108641
|
-
const lastMatch = matchedRoutes[matchedRoutes.length - 1];
|
|
108642
|
-
const routeMatch = lastMatch?.routeId !== "__root__" ? lastMatch : undefined;
|
|
108643
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
108644
|
-
name: routeMatch ? routeMatch.routeId : initialWindowLocation.pathname,
|
|
108645
|
-
attributes: {
|
|
108646
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
108647
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.pageload.react.tanstack_router",
|
|
108648
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: routeMatch ? "route" : "url",
|
|
108649
|
-
...routeMatchToParamSpanAttributes(routeMatch)
|
|
108650
|
-
}
|
|
108651
|
-
});
|
|
108652
|
-
}
|
|
108653
|
-
if (instrumentNavigation) {
|
|
108654
|
-
castRouterInstance.subscribe("onBeforeNavigate", (onBeforeNavigateArgs) => {
|
|
108655
|
-
if (!onBeforeNavigateArgs.fromLocation || onBeforeNavigateArgs.toLocation.state === onBeforeNavigateArgs.fromLocation.state) {
|
|
108656
|
-
return;
|
|
108657
|
-
}
|
|
108658
|
-
const matchedRoutesOnBeforeNavigate = castRouterInstance.matchRoutes(onBeforeNavigateArgs.toLocation.pathname, onBeforeNavigateArgs.toLocation.search, { preload: false, throwOnError: false });
|
|
108659
|
-
const onBeforeNavigateLastMatch = matchedRoutesOnBeforeNavigate[matchedRoutesOnBeforeNavigate.length - 1];
|
|
108660
|
-
const onBeforeNavigateRouteMatch = onBeforeNavigateLastMatch?.routeId !== "__root__" ? onBeforeNavigateLastMatch : undefined;
|
|
108661
|
-
const navigationLocation = WINDOW4.location;
|
|
108662
|
-
const navigationSpan = startBrowserTracingNavigationSpan(client, {
|
|
108663
|
-
name: onBeforeNavigateRouteMatch ? onBeforeNavigateRouteMatch.routeId : navigationLocation.pathname,
|
|
108664
|
-
attributes: {
|
|
108665
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
108666
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.navigation.react.tanstack_router",
|
|
108667
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: onBeforeNavigateRouteMatch ? "route" : "url"
|
|
108668
|
-
}
|
|
108669
|
-
});
|
|
108670
|
-
const unsubscribeOnResolved = castRouterInstance.subscribe("onResolved", (onResolvedArgs) => {
|
|
108671
|
-
unsubscribeOnResolved();
|
|
108672
|
-
if (navigationSpan) {
|
|
108673
|
-
const matchedRoutesOnResolved = castRouterInstance.matchRoutes(onResolvedArgs.toLocation.pathname, onResolvedArgs.toLocation.search, { preload: false, throwOnError: false });
|
|
108674
|
-
const onResolvedLastMatch = matchedRoutesOnResolved[matchedRoutesOnResolved.length - 1];
|
|
108675
|
-
const onResolvedRouteMatch = onResolvedLastMatch?.routeId !== "__root__" ? onResolvedLastMatch : undefined;
|
|
108676
|
-
if (onResolvedRouteMatch) {
|
|
108677
|
-
navigationSpan.updateName(onResolvedRouteMatch.routeId);
|
|
108678
|
-
navigationSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "route");
|
|
108679
|
-
navigationSpan.setAttributes(routeMatchToParamSpanAttributes(onResolvedRouteMatch));
|
|
108680
|
-
}
|
|
108681
|
-
}
|
|
108682
|
-
});
|
|
108683
|
-
});
|
|
108684
|
-
}
|
|
108685
|
-
}
|
|
108686
|
-
};
|
|
108687
|
-
}
|
|
108688
|
-
function routeMatchToParamSpanAttributes(match) {
|
|
108689
|
-
if (!match) {
|
|
108690
|
-
return {};
|
|
108691
|
-
}
|
|
108692
|
-
const paramAttributes = {};
|
|
108693
|
-
Object.entries(match.params).forEach(([key, value]) => {
|
|
108694
|
-
paramAttributes[`url.path.params.${key}`] = value;
|
|
108695
|
-
paramAttributes[`url.path.parameter.${key}`] = value;
|
|
108696
|
-
paramAttributes[`params.${key}`] = value;
|
|
108697
|
-
});
|
|
108698
|
-
return paramAttributes;
|
|
108699
|
-
}
|
|
108700
|
-
var init_tanstackrouter = __esm(() => {
|
|
108701
|
-
init_dev();
|
|
108702
|
-
init_esm2();
|
|
108703
|
-
});
|
|
108704
|
-
|
|
108705
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter.js
|
|
108706
|
-
import * as React3 from "react";
|
|
108707
|
-
function reactRouterV4BrowserTracingIntegration(options) {
|
|
108708
|
-
const integration = browserTracingIntegration({
|
|
108709
|
-
...options,
|
|
108710
|
-
instrumentPageLoad: false,
|
|
108711
|
-
instrumentNavigation: false
|
|
108712
|
-
});
|
|
108713
|
-
const { history, routes, matchPath, instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
108714
|
-
return {
|
|
108715
|
-
...integration,
|
|
108716
|
-
afterAllSetup(client) {
|
|
108717
|
-
integration.afterAllSetup(client);
|
|
108718
|
-
instrumentReactRouter(client, instrumentPageLoad, instrumentNavigation, history, "reactrouter_v4", routes, matchPath);
|
|
108719
|
-
}
|
|
108720
|
-
};
|
|
108721
|
-
}
|
|
108722
|
-
function reactRouterV5BrowserTracingIntegration(options) {
|
|
108723
|
-
const integration = browserTracingIntegration({
|
|
108724
|
-
...options,
|
|
108725
|
-
instrumentPageLoad: false,
|
|
108726
|
-
instrumentNavigation: false
|
|
108727
|
-
});
|
|
108728
|
-
const { history, routes, matchPath, instrumentPageLoad = true, instrumentNavigation = true } = options;
|
|
108729
|
-
return {
|
|
108730
|
-
...integration,
|
|
108731
|
-
afterAllSetup(client) {
|
|
108732
|
-
integration.afterAllSetup(client);
|
|
108733
|
-
instrumentReactRouter(client, instrumentPageLoad, instrumentNavigation, history, "reactrouter_v5", routes, matchPath);
|
|
108734
|
-
}
|
|
108735
|
-
};
|
|
108736
|
-
}
|
|
108737
|
-
function instrumentReactRouter(client, instrumentPageLoad, instrumentNavigation, history, instrumentationName, allRoutes = [], matchPath) {
|
|
108738
|
-
function getInitPathName() {
|
|
108739
|
-
if (history.location) {
|
|
108740
|
-
return history.location.pathname;
|
|
108741
|
-
}
|
|
108742
|
-
if (WINDOW4.location) {
|
|
108743
|
-
return WINDOW4.location.pathname;
|
|
108744
|
-
}
|
|
108745
|
-
return;
|
|
108746
|
-
}
|
|
108747
|
-
function normalizeTransactionName2(pathname) {
|
|
108748
|
-
if (allRoutes.length === 0 || !matchPath) {
|
|
108749
|
-
return [pathname, "url"];
|
|
108750
|
-
}
|
|
108751
|
-
const branches = matchRoutes(allRoutes, pathname, matchPath);
|
|
108752
|
-
for (const branch of branches) {
|
|
108753
|
-
if (branch.match.isExact) {
|
|
108754
|
-
return [branch.match.path, "route"];
|
|
108755
|
-
}
|
|
108756
|
-
}
|
|
108757
|
-
return [pathname, "url"];
|
|
108758
|
-
}
|
|
108759
|
-
if (instrumentPageLoad) {
|
|
108760
|
-
const initPathName = getInitPathName();
|
|
108761
|
-
if (initPathName) {
|
|
108762
|
-
const [name6, source] = normalizeTransactionName2(initPathName);
|
|
108763
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
108764
|
-
name: name6,
|
|
108765
|
-
attributes: {
|
|
108766
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
108767
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.pageload.react.${instrumentationName}`,
|
|
108768
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
108769
|
-
}
|
|
108770
|
-
});
|
|
108771
|
-
}
|
|
108772
|
-
}
|
|
108773
|
-
if (instrumentNavigation && history.listen) {
|
|
108774
|
-
history.listen((location, action) => {
|
|
108775
|
-
if (action && (action === "PUSH" || action === "POP")) {
|
|
108776
|
-
const [name6, source] = normalizeTransactionName2(location.pathname);
|
|
108777
|
-
startBrowserTracingNavigationSpan(client, {
|
|
108778
|
-
name: name6,
|
|
108779
|
-
attributes: {
|
|
108780
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
108781
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.navigation.react.${instrumentationName}`,
|
|
108782
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source
|
|
108783
|
-
}
|
|
108784
|
-
});
|
|
108785
|
-
}
|
|
108786
|
-
});
|
|
108787
|
-
}
|
|
108788
|
-
}
|
|
108789
|
-
function matchRoutes(routes, pathname, matchPath, branch = []) {
|
|
108790
|
-
routes.some((route) => {
|
|
108791
|
-
const match = route.path ? matchPath(pathname, route) : branch.length ? branch[branch.length - 1].match : computeRootMatch(pathname);
|
|
108792
|
-
if (match) {
|
|
108793
|
-
branch.push({ route, match });
|
|
108794
|
-
if (route.routes) {
|
|
108795
|
-
matchRoutes(route.routes, pathname, matchPath, branch);
|
|
108796
|
-
}
|
|
108797
|
-
}
|
|
108798
|
-
return !!match;
|
|
108799
|
-
});
|
|
108800
|
-
return branch;
|
|
108801
|
-
}
|
|
108802
|
-
function computeRootMatch(pathname) {
|
|
108803
|
-
return { path: "/", url: "/", params: {}, isExact: pathname === "/" };
|
|
108804
|
-
}
|
|
108805
|
-
function withSentryRouting(Route) {
|
|
108806
|
-
const componentDisplayName = Route.displayName || Route.name;
|
|
108807
|
-
const WrappedRoute = (props) => {
|
|
108808
|
-
if (props?.computedMatch?.isExact) {
|
|
108809
|
-
const route = props.computedMatch.path;
|
|
108810
|
-
const activeRootSpan = getActiveRootSpan();
|
|
108811
|
-
getCurrentScope().setTransactionName(route);
|
|
108812
|
-
if (activeRootSpan) {
|
|
108813
|
-
activeRootSpan.updateName(route);
|
|
108814
|
-
activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "route");
|
|
108815
|
-
}
|
|
108816
|
-
}
|
|
108817
|
-
return React3.createElement(Route, { ...props });
|
|
108818
|
-
};
|
|
108819
|
-
WrappedRoute.displayName = `sentryRoute(${componentDisplayName})`;
|
|
108820
|
-
hoistNonReactStatics(WrappedRoute, Route);
|
|
108821
|
-
return WrappedRoute;
|
|
108822
|
-
}
|
|
108823
|
-
function getActiveRootSpan() {
|
|
108824
|
-
const span = getActiveSpan();
|
|
108825
|
-
const rootSpan = span && getRootSpan(span);
|
|
108826
|
-
if (!rootSpan) {
|
|
108827
|
-
return;
|
|
108828
|
-
}
|
|
108829
|
-
const op = spanToJSON(rootSpan).op;
|
|
108830
|
-
return op === "navigation" || op === "pageload" ? rootSpan : undefined;
|
|
108831
|
-
}
|
|
108832
|
-
var init_reactrouter = __esm(() => {
|
|
108833
|
-
init_dev();
|
|
108834
|
-
init_esm2();
|
|
108835
|
-
init_hoist_non_react_statics();
|
|
108836
|
-
});
|
|
108837
|
-
|
|
108838
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/route-manifest.js
|
|
108839
|
-
function stripBasenameFromPathname(pathname, basename3) {
|
|
108840
|
-
if (!basename3 || basename3 === "/") {
|
|
108841
|
-
return pathname;
|
|
108842
|
-
}
|
|
108843
|
-
if (!pathname.toLowerCase().startsWith(basename3.toLowerCase())) {
|
|
108844
|
-
return pathname;
|
|
108845
|
-
}
|
|
108846
|
-
const startIndex = basename3.endsWith("/") ? basename3.length - 1 : basename3.length;
|
|
108847
|
-
const nextChar = pathname.charAt(startIndex);
|
|
108848
|
-
if (nextChar && nextChar !== "/") {
|
|
108849
|
-
return pathname;
|
|
108850
|
-
}
|
|
108851
|
-
return pathname.slice(startIndex) || "/";
|
|
108852
|
-
}
|
|
108853
|
-
function matchRouteManifest(pathname, manifest, basename3) {
|
|
108854
|
-
if (!pathname || !manifest || !manifest.length) {
|
|
108855
|
-
return null;
|
|
108856
|
-
}
|
|
108857
|
-
const normalizedPathname = basename3 ? stripBasenameFromPathname(pathname, basename3) : pathname;
|
|
108858
|
-
let sorted = SORTED_MANIFEST_CACHE.get(manifest);
|
|
108859
|
-
if (!sorted) {
|
|
108860
|
-
sorted = sortBySpecificity(manifest);
|
|
108861
|
-
SORTED_MANIFEST_CACHE.set(manifest, sorted);
|
|
108862
|
-
DEBUG_BUILD6 && debug.log("[React Router] Sorted route manifest by specificity:", sorted.length, "patterns");
|
|
108863
|
-
}
|
|
108864
|
-
for (const pattern of sorted) {
|
|
108865
|
-
if (matchesPattern(normalizedPathname, pattern)) {
|
|
108866
|
-
DEBUG_BUILD6 && debug.log("[React Router] Matched pathname", normalizedPathname, "to pattern", pattern);
|
|
108867
|
-
return pattern;
|
|
108868
|
-
}
|
|
108869
|
-
}
|
|
108870
|
-
DEBUG_BUILD6 && debug.log("[React Router] No manifest match found for pathname:", normalizedPathname);
|
|
108871
|
-
return null;
|
|
108872
|
-
}
|
|
108873
|
-
function matchesPattern(pathname, pattern) {
|
|
108874
|
-
if (pattern === "/") {
|
|
108875
|
-
return pathname === "/" || pathname === "";
|
|
108876
|
-
}
|
|
108877
|
-
const pathSegments = splitPath2(pathname);
|
|
108878
|
-
const patternSegments = splitPath2(pattern);
|
|
108879
|
-
const hasWildcard = patternSegments.length > 0 && patternSegments[patternSegments.length - 1] === "*";
|
|
108880
|
-
if (hasWildcard) {
|
|
108881
|
-
const patternSegmentsWithoutWildcard = patternSegments.slice(0, -1);
|
|
108882
|
-
if (pathSegments.length < patternSegmentsWithoutWildcard.length) {
|
|
108883
|
-
return false;
|
|
108884
|
-
}
|
|
108885
|
-
for (const [i2, patternSegment] of patternSegmentsWithoutWildcard.entries()) {
|
|
108886
|
-
if (!segmentMatches(pathSegments[i2], patternSegment)) {
|
|
108887
|
-
return false;
|
|
108888
|
-
}
|
|
108889
|
-
}
|
|
108890
|
-
return true;
|
|
108891
|
-
}
|
|
108892
|
-
if (pathSegments.length !== patternSegments.length) {
|
|
108893
|
-
return false;
|
|
108894
|
-
}
|
|
108895
|
-
for (const [i2, patternSegment] of patternSegments.entries()) {
|
|
108896
|
-
if (!segmentMatches(pathSegments[i2], patternSegment)) {
|
|
108897
|
-
return false;
|
|
108898
|
-
}
|
|
108899
|
-
}
|
|
108900
|
-
return true;
|
|
108901
|
-
}
|
|
108902
|
-
function segmentMatches(pathSegment, patternSegment) {
|
|
108903
|
-
if (pathSegment === undefined || patternSegment === undefined) {
|
|
108904
|
-
return false;
|
|
108905
|
-
}
|
|
108906
|
-
if (PARAM_RE.test(patternSegment)) {
|
|
108907
|
-
return true;
|
|
108908
|
-
}
|
|
108909
|
-
return pathSegment === patternSegment;
|
|
108910
|
-
}
|
|
108911
|
-
function splitPath2(path2) {
|
|
108912
|
-
return path2.split("/").filter(Boolean);
|
|
108913
|
-
}
|
|
108914
|
-
function computeScore(pattern) {
|
|
108915
|
-
const segments = pattern.split("/");
|
|
108916
|
-
let score = segments.length;
|
|
108917
|
-
if (segments.includes("*")) {
|
|
108918
|
-
score += SPLAT_PENALTY;
|
|
108919
|
-
}
|
|
108920
|
-
for (const segment of segments) {
|
|
108921
|
-
if (segment === "*") {
|
|
108922
|
-
continue;
|
|
108923
|
-
} else if (PARAM_RE.test(segment)) {
|
|
108924
|
-
score += DYNAMIC_SEGMENT_SCORE;
|
|
108925
|
-
} else if (segment === "") {
|
|
108926
|
-
score += EMPTY_SEGMENT_SCORE;
|
|
108927
|
-
} else {
|
|
108928
|
-
score += STATIC_SEGMENT_SCORE;
|
|
108929
|
-
}
|
|
108930
|
-
}
|
|
108931
|
-
return score;
|
|
108932
|
-
}
|
|
108933
|
-
function sortBySpecificity(manifest) {
|
|
108934
|
-
return [...manifest].sort((a2, b2) => {
|
|
108935
|
-
const aScore = computeScore(a2);
|
|
108936
|
-
const bScore = computeScore(b2);
|
|
108937
|
-
return bScore - aScore;
|
|
108938
|
-
});
|
|
108939
|
-
}
|
|
108940
|
-
var SORTED_MANIFEST_CACHE, PARAM_RE, STATIC_SEGMENT_SCORE = 10, DYNAMIC_SEGMENT_SCORE = 3, EMPTY_SEGMENT_SCORE = 1, SPLAT_PENALTY = -2;
|
|
108941
|
-
var init_route_manifest = __esm(() => {
|
|
108942
|
-
init_esm2();
|
|
108943
|
-
init_debug_build4();
|
|
108944
|
-
SORTED_MANIFEST_CACHE = new WeakMap;
|
|
108945
|
-
PARAM_RE = /^:[\w-]+$/;
|
|
108946
|
-
});
|
|
108947
|
-
|
|
108948
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/utils.js
|
|
108949
|
-
function setNavigationContext(targetPath, span) {
|
|
108950
|
-
const token = {};
|
|
108951
|
-
if (_navigationContextStack.length >= MAX_CONTEXT_STACK_SIZE) {
|
|
108952
|
-
DEBUG_BUILD6 && debug.warn("[React Router] Navigation context stack overflow - removing oldest context");
|
|
108953
|
-
_navigationContextStack.shift();
|
|
108954
|
-
}
|
|
108955
|
-
_navigationContextStack.push({ token, targetPath, span });
|
|
108956
|
-
return token;
|
|
108957
|
-
}
|
|
108958
|
-
function clearNavigationContext(token) {
|
|
108959
|
-
const top = _navigationContextStack[_navigationContextStack.length - 1];
|
|
108960
|
-
if (top?.token === token) {
|
|
108961
|
-
_navigationContextStack.pop();
|
|
108962
|
-
}
|
|
108963
|
-
}
|
|
108964
|
-
function getNavigationContext() {
|
|
108965
|
-
const length4 = _navigationContextStack.length;
|
|
108966
|
-
return length4 > 0 ? _navigationContextStack[length4 - 1] ?? null : null;
|
|
108967
|
-
}
|
|
108968
|
-
function initializeRouterUtils(matchRoutes2, stripBasename = false) {
|
|
108969
|
-
_matchRoutes = matchRoutes2;
|
|
108970
|
-
_stripBasename = stripBasename;
|
|
108971
|
-
}
|
|
108972
|
-
function pickPath(match) {
|
|
108973
|
-
return trimWildcard(match.route.path || "");
|
|
108974
|
-
}
|
|
108975
|
-
function pickSplat(match) {
|
|
108976
|
-
return match.params["*"] || "";
|
|
108977
|
-
}
|
|
108978
|
-
function trimWildcard(path2) {
|
|
108979
|
-
return path2[path2.length - 1] === "*" ? path2.slice(0, -1) : path2;
|
|
108980
|
-
}
|
|
108981
|
-
function trimSlash(path2) {
|
|
108982
|
-
return path2[path2.length - 1] === "/" ? path2.slice(0, -1) : path2;
|
|
108983
|
-
}
|
|
108984
|
-
function pathEndsWithWildcard(path2) {
|
|
108985
|
-
return path2.endsWith("*");
|
|
108986
|
-
}
|
|
108987
|
-
function transactionNameHasWildcard(name6) {
|
|
108988
|
-
return name6.includes("/*") || name6.endsWith("*");
|
|
108989
|
-
}
|
|
108990
|
-
function pathIsWildcardAndHasChildren(path2, branch) {
|
|
108991
|
-
return pathEndsWithWildcard(path2) && !!branch.route.children?.length || false;
|
|
108992
|
-
}
|
|
108993
|
-
function routeIsDescendant(route) {
|
|
108994
|
-
return !!(!route.children && route.element && route.path?.endsWith("/*"));
|
|
108995
|
-
}
|
|
108996
|
-
function sendIndexPath(pathBuilder, pathname, basename3) {
|
|
108997
|
-
const reconstructedPath = pathBuilder && pathBuilder.length > 0 ? pathBuilder : _stripBasename ? stripBasenameFromPathname(pathname, basename3) : pathname;
|
|
108998
|
-
let formattedPath = reconstructedPath.slice(-2) === "/*" ? reconstructedPath.slice(0, -2) : reconstructedPath;
|
|
108999
|
-
if (formattedPath.length > 1 && formattedPath[formattedPath.length - 1] === "/") {
|
|
109000
|
-
formattedPath = formattedPath.slice(0, -1);
|
|
109001
|
-
}
|
|
109002
|
-
return [formattedPath, "route"];
|
|
109003
|
-
}
|
|
109004
|
-
function getNumberOfUrlSegments(url) {
|
|
109005
|
-
return url.split(/\\?\//).filter((s2) => s2.length > 0 && s2 !== ",").length;
|
|
109006
|
-
}
|
|
109007
|
-
function prefixWithSlash(path2) {
|
|
109008
|
-
return path2[0] === "/" ? path2 : `/${path2}`;
|
|
109009
|
-
}
|
|
109010
|
-
function rebuildRoutePathFromAllRoutes(allRoutes, location) {
|
|
109011
|
-
const matchedRoutes = _matchRoutes(allRoutes, location);
|
|
109012
|
-
if (!matchedRoutes || matchedRoutes.length === 0) {
|
|
109013
|
-
return "";
|
|
109014
|
-
}
|
|
109015
|
-
for (const match of matchedRoutes) {
|
|
109016
|
-
if (match.route.path && match.route.path !== "*") {
|
|
109017
|
-
const path2 = pickPath(match);
|
|
109018
|
-
const strippedPath = stripBasenameFromPathname(location.pathname, prefixWithSlash(match.pathnameBase));
|
|
109019
|
-
if (location.pathname === strippedPath) {
|
|
109020
|
-
return trimSlash(strippedPath);
|
|
109021
|
-
}
|
|
109022
|
-
return trimSlash(trimSlash(path2 || "") + prefixWithSlash(rebuildRoutePathFromAllRoutes(allRoutes.filter((route) => route !== match.route), {
|
|
109023
|
-
pathname: strippedPath
|
|
109024
|
-
})));
|
|
109025
|
-
}
|
|
109026
|
-
}
|
|
109027
|
-
return "";
|
|
109028
|
-
}
|
|
109029
|
-
function locationIsInsideDescendantRoute(location, routes) {
|
|
109030
|
-
const matchedRoutes = _matchRoutes(routes, location);
|
|
109031
|
-
if (matchedRoutes) {
|
|
109032
|
-
for (const match of matchedRoutes) {
|
|
109033
|
-
if (routeIsDescendant(match.route) && pickSplat(match)) {
|
|
109034
|
-
return true;
|
|
109035
|
-
}
|
|
109036
|
-
}
|
|
109037
|
-
}
|
|
109038
|
-
return false;
|
|
109039
|
-
}
|
|
109040
|
-
function getFallbackTransactionName(location, basename3) {
|
|
109041
|
-
return _stripBasename ? stripBasenameFromPathname(location.pathname, basename3) : location.pathname || "";
|
|
109042
|
-
}
|
|
109043
|
-
function getNormalizedName(routes, location, branches, basename3 = "") {
|
|
109044
|
-
if (!routes || routes.length === 0) {
|
|
109045
|
-
return [_stripBasename ? stripBasenameFromPathname(location.pathname, basename3) : location.pathname, "url"];
|
|
109046
|
-
}
|
|
109047
|
-
if (!branches) {
|
|
109048
|
-
return [getFallbackTransactionName(location, basename3), "url"];
|
|
109049
|
-
}
|
|
109050
|
-
let pathBuilder = "";
|
|
109051
|
-
for (const branch of branches) {
|
|
109052
|
-
const route = branch.route;
|
|
109053
|
-
if (!route) {
|
|
109054
|
-
continue;
|
|
109055
|
-
}
|
|
109056
|
-
if (route.index) {
|
|
109057
|
-
return sendIndexPath(pathBuilder, branch.pathname, basename3);
|
|
109058
|
-
}
|
|
109059
|
-
const path2 = route.path;
|
|
109060
|
-
if (!path2 || pathIsWildcardAndHasChildren(path2, branch)) {
|
|
109061
|
-
continue;
|
|
109062
|
-
}
|
|
109063
|
-
const newPath = path2[0] === "/" || pathBuilder[pathBuilder.length - 1] === "/" ? path2 : `/${path2}`;
|
|
109064
|
-
pathBuilder = trimSlash(pathBuilder) + prefixWithSlash(newPath);
|
|
109065
|
-
if (trimSlash(location.pathname) !== trimSlash(basename3 + branch.pathname)) {
|
|
109066
|
-
continue;
|
|
109067
|
-
}
|
|
109068
|
-
if (getNumberOfUrlSegments(pathBuilder) !== getNumberOfUrlSegments(branch.pathname) && !pathEndsWithWildcard(pathBuilder)) {
|
|
109069
|
-
return [(_stripBasename ? "" : basename3) + newPath, "route"];
|
|
109070
|
-
}
|
|
109071
|
-
if (pathIsWildcardAndHasChildren(pathBuilder, branch)) {
|
|
109072
|
-
pathBuilder = pathBuilder.slice(0, -1);
|
|
109073
|
-
}
|
|
109074
|
-
return [(_stripBasename ? "" : basename3) + pathBuilder, "route"];
|
|
109075
|
-
}
|
|
109076
|
-
return [getFallbackTransactionName(location, basename3), "url"];
|
|
109077
|
-
}
|
|
109078
|
-
function resolveRouteNameAndSource(location, routes, allRoutes, branches, basename3 = "", lazyRouteManifest, enableAsyncRouteHandlers) {
|
|
109079
|
-
if (enableAsyncRouteHandlers && lazyRouteManifest && lazyRouteManifest.length > 0) {
|
|
109080
|
-
const manifestMatch = matchRouteManifest(location.pathname, lazyRouteManifest, basename3);
|
|
109081
|
-
if (manifestMatch) {
|
|
109082
|
-
return [(_stripBasename ? "" : basename3) + manifestMatch, "route"];
|
|
109083
|
-
}
|
|
109084
|
-
}
|
|
109085
|
-
let name6;
|
|
109086
|
-
let source = "url";
|
|
109087
|
-
const isInDescendantRoute = locationIsInsideDescendantRoute(location, allRoutes);
|
|
109088
|
-
if (isInDescendantRoute) {
|
|
109089
|
-
name6 = prefixWithSlash(rebuildRoutePathFromAllRoutes(allRoutes, location));
|
|
109090
|
-
source = "route";
|
|
109091
|
-
}
|
|
109092
|
-
if (!isInDescendantRoute || !name6) {
|
|
109093
|
-
[name6, source] = getNormalizedName(routes, location, branches, basename3);
|
|
109094
|
-
}
|
|
109095
|
-
return [name6 || location.pathname, source];
|
|
109096
|
-
}
|
|
109097
|
-
function getActiveRootSpan2() {
|
|
109098
|
-
const span = getActiveSpan();
|
|
109099
|
-
const rootSpan = span ? getRootSpan(span) : undefined;
|
|
109100
|
-
if (!rootSpan) {
|
|
109101
|
-
return;
|
|
109102
|
-
}
|
|
109103
|
-
const op = spanToJSON(rootSpan).op;
|
|
109104
|
-
return op === "navigation" || op === "pageload" ? rootSpan : undefined;
|
|
109105
|
-
}
|
|
109106
|
-
var _matchRoutes, _stripBasename = false, _navigationContextStack, MAX_CONTEXT_STACK_SIZE = 10;
|
|
109107
|
-
var init_utils18 = __esm(() => {
|
|
109108
|
-
init_esm2();
|
|
109109
|
-
init_debug_build4();
|
|
109110
|
-
init_route_manifest();
|
|
109111
|
-
_navigationContextStack = [];
|
|
109112
|
-
});
|
|
109113
|
-
|
|
109114
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/lazy-routes.js
|
|
109115
|
-
function captureCurrentLocation() {
|
|
109116
|
-
const navContext = getNavigationContext();
|
|
109117
|
-
if (navContext) {
|
|
109118
|
-
if (navContext.targetPath) {
|
|
109119
|
-
return {
|
|
109120
|
-
pathname: navContext.targetPath,
|
|
109121
|
-
search: "",
|
|
109122
|
-
hash: "",
|
|
109123
|
-
state: null,
|
|
109124
|
-
key: "default"
|
|
109125
|
-
};
|
|
109126
|
-
}
|
|
109127
|
-
return null;
|
|
109128
|
-
}
|
|
109129
|
-
if (typeof WINDOW4 !== "undefined") {
|
|
109130
|
-
try {
|
|
109131
|
-
const windowLocation = WINDOW4.location;
|
|
109132
|
-
if (windowLocation) {
|
|
109133
|
-
return {
|
|
109134
|
-
pathname: windowLocation.pathname,
|
|
109135
|
-
search: windowLocation.search || "",
|
|
109136
|
-
hash: windowLocation.hash || "",
|
|
109137
|
-
state: null,
|
|
109138
|
-
key: "default"
|
|
109139
|
-
};
|
|
109140
|
-
}
|
|
109141
|
-
} catch {
|
|
109142
|
-
DEBUG_BUILD6 && debug.warn("[React Router] Could not access window.location");
|
|
109143
|
-
}
|
|
109144
|
-
}
|
|
109145
|
-
return null;
|
|
109146
|
-
}
|
|
109147
|
-
function captureActiveSpan() {
|
|
109148
|
-
const navContext = getNavigationContext();
|
|
109149
|
-
if (navContext) {
|
|
109150
|
-
return navContext.span;
|
|
109151
|
-
}
|
|
109152
|
-
return getActiveRootSpan2();
|
|
109153
|
-
}
|
|
109154
|
-
function createAsyncHandlerProxy(originalFunction, route, handlerKey, processResolvedRoutes) {
|
|
109155
|
-
const proxy = new Proxy(originalFunction, {
|
|
109156
|
-
apply(target, thisArg, argArray) {
|
|
109157
|
-
const locationAtInvocation = captureCurrentLocation();
|
|
109158
|
-
const spanAtInvocation = captureActiveSpan();
|
|
109159
|
-
const result = target.apply(thisArg, argArray);
|
|
109160
|
-
handleAsyncHandlerResult(result, route, handlerKey, processResolvedRoutes, locationAtInvocation, spanAtInvocation);
|
|
109161
|
-
return result;
|
|
109162
|
-
}
|
|
109163
|
-
});
|
|
109164
|
-
addNonEnumerableProperty(proxy, "__sentry_proxied__", true);
|
|
109165
|
-
return proxy;
|
|
109166
|
-
}
|
|
109167
|
-
function handleAsyncHandlerResult(result, route, handlerKey, processResolvedRoutes, currentLocation, capturedSpan) {
|
|
109168
|
-
if (isThenable(result)) {
|
|
109169
|
-
result.then((resolvedRoutes) => {
|
|
109170
|
-
if (Array.isArray(resolvedRoutes)) {
|
|
109171
|
-
processResolvedRoutes(resolvedRoutes, route, currentLocation ?? undefined, capturedSpan);
|
|
109172
|
-
}
|
|
109173
|
-
}).catch((e3) => {
|
|
109174
|
-
DEBUG_BUILD6 && debug.warn(`Error resolving async handler '${handlerKey}' for route`, route, e3);
|
|
109175
|
-
});
|
|
109176
|
-
} else if (Array.isArray(result)) {
|
|
109177
|
-
processResolvedRoutes(result, route, currentLocation ?? undefined, capturedSpan);
|
|
109178
|
-
}
|
|
109179
|
-
}
|
|
109180
|
-
function checkRouteForAsyncHandler(route, processResolvedRoutes) {
|
|
109181
|
-
if (route.handle && typeof route.handle === "object") {
|
|
109182
|
-
for (const key of Object.keys(route.handle)) {
|
|
109183
|
-
const maybeFn = route.handle[key];
|
|
109184
|
-
if (typeof maybeFn === "function" && !maybeFn.__sentry_proxied__) {
|
|
109185
|
-
route.handle[key] = createAsyncHandlerProxy(maybeFn, route, key, processResolvedRoutes);
|
|
109186
|
-
}
|
|
109187
|
-
}
|
|
109188
|
-
}
|
|
109189
|
-
if (Array.isArray(route.children)) {
|
|
109190
|
-
for (const child of route.children) {
|
|
109191
|
-
checkRouteForAsyncHandler(child, processResolvedRoutes);
|
|
109192
|
-
}
|
|
109193
|
-
}
|
|
109194
|
-
}
|
|
109195
|
-
var init_lazy_routes = __esm(() => {
|
|
109196
|
-
init_dev();
|
|
109197
|
-
init_esm2();
|
|
109198
|
-
init_debug_build4();
|
|
109199
|
-
init_utils18();
|
|
109200
|
-
});
|
|
109201
|
-
|
|
109202
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouter-compat-utils/instrumentation.js
|
|
109203
|
-
import * as React4 from "react";
|
|
109204
|
-
function scheduleCallback(callback) {
|
|
109205
|
-
if (WINDOW4?.requestAnimationFrame) {
|
|
109206
|
-
return WINDOW4.requestAnimationFrame(callback);
|
|
109207
|
-
}
|
|
109208
|
-
return setTimeout(callback, 0);
|
|
109209
|
-
}
|
|
109210
|
-
function cancelScheduledCallback(id) {
|
|
109211
|
-
if (WINDOW4?.cancelAnimationFrame) {
|
|
109212
|
-
WINDOW4.cancelAnimationFrame(id);
|
|
109213
|
-
} else {
|
|
109214
|
-
clearTimeout(id);
|
|
109215
|
-
}
|
|
109216
|
-
}
|
|
109217
|
-
function computeLocationKey(location) {
|
|
109218
|
-
return `${location.pathname}${location.search || ""}${location.hash || ""}`;
|
|
109219
|
-
}
|
|
109220
|
-
function isParameterizedRoute(routeName) {
|
|
109221
|
-
return routeName.includes(":") || routeName.includes("*");
|
|
109222
|
-
}
|
|
109223
|
-
function shouldSkipNavigation(trackedNav, locationKey, proposedName, spanHasEnded) {
|
|
109224
|
-
if (!trackedNav) {
|
|
109225
|
-
return { skip: false, shouldUpdate: false };
|
|
109226
|
-
}
|
|
109227
|
-
const isDuplicate = trackedNav.locationKey === locationKey && (trackedNav.isPlaceholder || !spanHasEnded);
|
|
109228
|
-
if (isDuplicate) {
|
|
109229
|
-
const currentHasWildcard = !!trackedNav.routeName && transactionNameHasWildcard(trackedNav.routeName);
|
|
109230
|
-
const proposedHasWildcard = transactionNameHasWildcard(proposedName);
|
|
109231
|
-
const currentIsParameterized = !!trackedNav.routeName && isParameterizedRoute(trackedNav.routeName);
|
|
109232
|
-
const proposedIsParameterized = isParameterizedRoute(proposedName);
|
|
109233
|
-
const isWildcardUpgrade = currentHasWildcard && !proposedHasWildcard;
|
|
109234
|
-
const isRawToParameterized = !currentIsParameterized && proposedIsParameterized;
|
|
109235
|
-
const isMoreSpecific = proposedName !== trackedNav.routeName && proposedName.length > (trackedNav.routeName?.length || 0) && !proposedHasWildcard;
|
|
109236
|
-
const shouldUpdate = !!(trackedNav.routeName && (isWildcardUpgrade || isRawToParameterized || isMoreSpecific));
|
|
109237
|
-
return { skip: true, shouldUpdate };
|
|
109238
|
-
}
|
|
109239
|
-
return { skip: false, shouldUpdate: false };
|
|
109240
|
-
}
|
|
109241
|
-
function addResolvedRoutesToParent(resolvedRoutes, parentRoute) {
|
|
109242
|
-
const existingChildren = parentRoute.children || [];
|
|
109243
|
-
const newRoutes = resolvedRoutes.filter((newRoute) => !existingChildren.some((existing) => existing === newRoute || newRoute.path && existing.path === newRoute.path || newRoute.id && existing.id === newRoute.id));
|
|
109244
|
-
if (newRoutes.length > 0) {
|
|
109245
|
-
parentRoute.children = [...existingChildren, ...newRoutes];
|
|
109246
|
-
}
|
|
109247
|
-
}
|
|
109248
|
-
function trackLazyRouteLoad(span, promise) {
|
|
109249
|
-
let promises = pendingLazyRouteLoads.get(span);
|
|
109250
|
-
if (!promises) {
|
|
109251
|
-
promises = new Set;
|
|
109252
|
-
pendingLazyRouteLoads.set(span, promises);
|
|
109253
|
-
}
|
|
109254
|
-
promises.add(promise);
|
|
109255
|
-
promise.finally(() => {
|
|
109256
|
-
const currentPromises = pendingLazyRouteLoads.get(span);
|
|
109257
|
-
if (currentPromises) {
|
|
109258
|
-
currentPromises.delete(promise);
|
|
109259
|
-
}
|
|
109260
|
-
});
|
|
109261
|
-
}
|
|
109262
|
-
function createDeferredLazyRoutePromise(span) {
|
|
109263
|
-
const deferredPromise = new Promise((resolve3) => {
|
|
109264
|
-
deferredLazyRouteResolvers.set(span, resolve3);
|
|
109265
|
-
});
|
|
109266
|
-
trackLazyRouteLoad(span, deferredPromise);
|
|
109267
|
-
}
|
|
109268
|
-
function resolveDeferredLazyRoutePromise(span) {
|
|
109269
|
-
const resolver = deferredLazyRouteResolvers.get(span);
|
|
109270
|
-
if (resolver) {
|
|
109271
|
-
resolver();
|
|
109272
|
-
deferredLazyRouteResolvers.delete(span);
|
|
109273
|
-
if (span.__sentry_may_have_lazy_routes__) {
|
|
109274
|
-
span.__sentry_may_have_lazy_routes__ = false;
|
|
109275
|
-
}
|
|
109276
|
-
}
|
|
109277
|
-
}
|
|
109278
|
-
function processResolvedRoutes(resolvedRoutes, parentRoute, currentLocation = null, capturedSpan) {
|
|
109279
|
-
resolvedRoutes.forEach((child) => {
|
|
109280
|
-
allRoutes.add(child);
|
|
109281
|
-
if (_enableAsyncRouteHandlers) {
|
|
109282
|
-
checkRouteForAsyncHandler(child, processResolvedRoutes);
|
|
109283
|
-
}
|
|
109284
|
-
});
|
|
109285
|
-
if (parentRoute) {
|
|
109286
|
-
addResolvedRoutesToParent(resolvedRoutes, parentRoute);
|
|
109287
|
-
}
|
|
109288
|
-
const targetSpan = capturedSpan ?? getActiveRootSpan2();
|
|
109289
|
-
if (targetSpan) {
|
|
109290
|
-
const spanJson = spanToJSON(targetSpan);
|
|
109291
|
-
if (spanJson.timestamp) {
|
|
109292
|
-
DEBUG_BUILD6 && debug.warn("[React Router] Lazy handler resolved after span ended - skipping update");
|
|
109293
|
-
return;
|
|
109294
|
-
}
|
|
109295
|
-
const spanOp = spanJson.op;
|
|
109296
|
-
let location = currentLocation;
|
|
109297
|
-
if (!location && !capturedSpan) {
|
|
109298
|
-
if (typeof WINDOW4 !== "undefined") {
|
|
109299
|
-
const globalLocation = WINDOW4.location;
|
|
109300
|
-
if (globalLocation?.pathname) {
|
|
109301
|
-
location = { pathname: globalLocation.pathname };
|
|
109302
|
-
}
|
|
109303
|
-
}
|
|
109304
|
-
}
|
|
109305
|
-
if (location) {
|
|
109306
|
-
if (spanOp === "pageload") {
|
|
109307
|
-
updatePageloadTransaction({
|
|
109308
|
-
activeRootSpan: targetSpan,
|
|
109309
|
-
location: { pathname: location.pathname },
|
|
109310
|
-
routes: Array.from(allRoutes),
|
|
109311
|
-
allRoutes: Array.from(allRoutes)
|
|
109312
|
-
});
|
|
109313
|
-
} else if (spanOp === "navigation") {
|
|
109314
|
-
updateNavigationSpan(targetSpan, location, Array.from(allRoutes), false, _matchRoutes2);
|
|
109315
|
-
}
|
|
109316
|
-
}
|
|
109317
|
-
}
|
|
109318
|
-
}
|
|
109319
|
-
function updateNavigationSpan(activeRootSpan, location, allRoutes2, forceUpdate = false, matchRoutes2) {
|
|
109320
|
-
const spanJson = spanToJSON(activeRootSpan);
|
|
109321
|
-
const currentName = spanJson.description;
|
|
109322
|
-
const hasBeenNamed = activeRootSpan?.__sentry_navigation_name_set__;
|
|
109323
|
-
const currentNameHasWildcard = currentName && transactionNameHasWildcard(currentName);
|
|
109324
|
-
const shouldUpdate = !hasBeenNamed || forceUpdate || currentNameHasWildcard;
|
|
109325
|
-
if (shouldUpdate && !spanJson.timestamp) {
|
|
109326
|
-
const currentBranches = matchRoutes2(allRoutes2, location);
|
|
109327
|
-
const [name6, source] = resolveRouteNameAndSource(location, allRoutes2, allRoutes2, currentBranches || [], _basename, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
109328
|
-
const currentSource = spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
109329
|
-
const isImprovement = name6 && (!currentName || !hasBeenNamed && (currentSource !== "route" || source === "route") || currentSource !== "route" && source === "route" || currentSource === "route" && source === "route" && currentNameHasWildcard);
|
|
109330
|
-
if (isImprovement) {
|
|
109331
|
-
activeRootSpan.updateName(name6);
|
|
109332
|
-
activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
109333
|
-
if (!transactionNameHasWildcard(name6) && source === "route") {
|
|
109334
|
-
addNonEnumerableProperty(activeRootSpan, "__sentry_navigation_name_set__", true);
|
|
109335
|
-
}
|
|
109336
|
-
}
|
|
109337
|
-
}
|
|
109338
|
-
}
|
|
109339
|
-
function setupRouterSubscription(router, routes, version4, basename3, activeRootSpan) {
|
|
109340
|
-
let isInitialPageloadComplete = false;
|
|
109341
|
-
let hasSeenPageloadSpan = !!activeRootSpan && spanToJSON(activeRootSpan).op === "pageload";
|
|
109342
|
-
let hasSeenPopAfterPageload = false;
|
|
109343
|
-
let scheduledNavigationHandler = null;
|
|
109344
|
-
let lastHandledPathname = null;
|
|
109345
|
-
router.subscribe((state) => {
|
|
109346
|
-
if (!isInitialPageloadComplete) {
|
|
109347
|
-
const currentRootSpan = getActiveRootSpan2();
|
|
109348
|
-
const isCurrentlyInPageload = currentRootSpan && spanToJSON(currentRootSpan).op === "pageload";
|
|
109349
|
-
if (isCurrentlyInPageload) {
|
|
109350
|
-
hasSeenPageloadSpan = true;
|
|
109351
|
-
} else if (hasSeenPageloadSpan) {
|
|
109352
|
-
if (state.historyAction === "POP" && !hasSeenPopAfterPageload) {
|
|
109353
|
-
hasSeenPopAfterPageload = true;
|
|
109354
|
-
} else {
|
|
109355
|
-
isInitialPageloadComplete = true;
|
|
109356
|
-
}
|
|
109357
|
-
}
|
|
109358
|
-
}
|
|
109359
|
-
const shouldHandleNavigation = state.historyAction === "PUSH" || state.historyAction === "POP" && isInitialPageloadComplete;
|
|
109360
|
-
if (shouldHandleNavigation) {
|
|
109361
|
-
const currentLocationKey = computeLocationKey(state.location);
|
|
109362
|
-
const navigationHandler = () => {
|
|
109363
|
-
if (lastHandledPathname === currentLocationKey) {
|
|
109364
|
-
return;
|
|
109365
|
-
}
|
|
109366
|
-
lastHandledPathname = currentLocationKey;
|
|
109367
|
-
scheduledNavigationHandler = null;
|
|
109368
|
-
handleNavigation({
|
|
109369
|
-
location: state.location,
|
|
109370
|
-
routes,
|
|
109371
|
-
navigationType: state.historyAction,
|
|
109372
|
-
version: version4,
|
|
109373
|
-
basename: basename3,
|
|
109374
|
-
allRoutes: Array.from(allRoutes)
|
|
109375
|
-
});
|
|
109376
|
-
};
|
|
109377
|
-
if (state.navigation.state !== "idle") {
|
|
109378
|
-
if (lastHandledPathname !== currentLocationKey) {
|
|
109379
|
-
lastHandledPathname = null;
|
|
109380
|
-
}
|
|
109381
|
-
if (scheduledNavigationHandler !== null) {
|
|
109382
|
-
cancelScheduledCallback(scheduledNavigationHandler);
|
|
109383
|
-
}
|
|
109384
|
-
scheduledNavigationHandler = scheduleCallback(navigationHandler);
|
|
109385
|
-
} else {
|
|
109386
|
-
if (scheduledNavigationHandler !== null) {
|
|
109387
|
-
cancelScheduledCallback(scheduledNavigationHandler);
|
|
109388
|
-
scheduledNavigationHandler = null;
|
|
109389
|
-
}
|
|
109390
|
-
navigationHandler();
|
|
109391
|
-
}
|
|
109392
|
-
}
|
|
109393
|
-
});
|
|
109394
|
-
}
|
|
109395
|
-
function createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, version4) {
|
|
109396
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes2) {
|
|
109397
|
-
DEBUG_BUILD6 && debug.warn(`reactRouterV${version4}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`);
|
|
109398
|
-
return createRouterFunction;
|
|
109399
|
-
}
|
|
109400
|
-
return function(routes, opts) {
|
|
109401
|
-
addRoutesToAllRoutes(routes);
|
|
109402
|
-
if (_enableAsyncRouteHandlers) {
|
|
109403
|
-
for (const route of routes) {
|
|
109404
|
-
checkRouteForAsyncHandler(route, processResolvedRoutes);
|
|
109405
|
-
}
|
|
109406
|
-
}
|
|
109407
|
-
const activeRootSpan = getActiveRootSpan2();
|
|
109408
|
-
const hasPatchRoutesOnNavigation = opts && "patchRoutesOnNavigation" in opts && typeof opts.patchRoutesOnNavigation === "function";
|
|
109409
|
-
if (hasPatchRoutesOnNavigation && activeRootSpan) {
|
|
109410
|
-
addNonEnumerableProperty(activeRootSpan, "__sentry_may_have_lazy_routes__", true);
|
|
109411
|
-
createDeferredLazyRoutePromise(activeRootSpan);
|
|
109412
|
-
}
|
|
109413
|
-
const wrappedOpts = wrapPatchRoutesOnNavigation(opts, false, activeRootSpan);
|
|
109414
|
-
const router = createRouterFunction(routes, wrappedOpts);
|
|
109415
|
-
const basename3 = opts?.basename;
|
|
109416
|
-
if (router.state.historyAction === "POP" && activeRootSpan) {
|
|
109417
|
-
updatePageloadTransaction({
|
|
109418
|
-
activeRootSpan,
|
|
109419
|
-
location: router.state.location,
|
|
109420
|
-
routes,
|
|
109421
|
-
basename: basename3,
|
|
109422
|
-
allRoutes: Array.from(allRoutes)
|
|
109423
|
-
});
|
|
109424
|
-
}
|
|
109425
|
-
_basename = basename3 || "";
|
|
109426
|
-
setupRouterSubscription(router, routes, version4, basename3, activeRootSpan);
|
|
109427
|
-
return router;
|
|
109428
|
-
};
|
|
109429
|
-
}
|
|
109430
|
-
function createV6CompatibleWrapCreateMemoryRouter(createRouterFunction, version4) {
|
|
109431
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes2) {
|
|
109432
|
-
DEBUG_BUILD6 && debug.warn(`reactRouterV${version4}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`);
|
|
109433
|
-
return createRouterFunction;
|
|
109434
|
-
}
|
|
109435
|
-
return function(routes, opts) {
|
|
109436
|
-
addRoutesToAllRoutes(routes);
|
|
109437
|
-
if (_enableAsyncRouteHandlers) {
|
|
109438
|
-
for (const route of routes) {
|
|
109439
|
-
checkRouteForAsyncHandler(route, processResolvedRoutes);
|
|
109440
|
-
}
|
|
109441
|
-
}
|
|
109442
|
-
const memoryActiveRootSpanEarly = getActiveRootSpan2();
|
|
109443
|
-
const hasPatchRoutesOnNavigation = opts && "patchRoutesOnNavigation" in opts && typeof opts.patchRoutesOnNavigation === "function";
|
|
109444
|
-
if (hasPatchRoutesOnNavigation && memoryActiveRootSpanEarly) {
|
|
109445
|
-
addNonEnumerableProperty(memoryActiveRootSpanEarly, "__sentry_may_have_lazy_routes__", true);
|
|
109446
|
-
createDeferredLazyRoutePromise(memoryActiveRootSpanEarly);
|
|
109447
|
-
}
|
|
109448
|
-
const wrappedOpts = wrapPatchRoutesOnNavigation(opts, true, memoryActiveRootSpanEarly);
|
|
109449
|
-
const router = createRouterFunction(routes, wrappedOpts);
|
|
109450
|
-
const basename3 = opts?.basename;
|
|
109451
|
-
let initialEntry = undefined;
|
|
109452
|
-
const initialEntries = opts?.initialEntries;
|
|
109453
|
-
const initialIndex = opts?.initialIndex;
|
|
109454
|
-
const hasOnlyOneInitialEntry = initialEntries && initialEntries.length === 1;
|
|
109455
|
-
const hasIndexedEntry = initialIndex !== undefined && initialEntries && initialEntries[initialIndex];
|
|
109456
|
-
initialEntry = hasOnlyOneInitialEntry ? initialEntries[0] : hasIndexedEntry ? initialEntries[initialIndex] : undefined;
|
|
109457
|
-
const location = initialEntry ? typeof initialEntry === "string" ? { pathname: initialEntry } : initialEntry : router.state.location;
|
|
109458
|
-
const memoryActiveRootSpan = getActiveRootSpan2();
|
|
109459
|
-
if (router.state.historyAction === "POP" && memoryActiveRootSpan) {
|
|
109460
|
-
updatePageloadTransaction({
|
|
109461
|
-
activeRootSpan: memoryActiveRootSpan,
|
|
109462
|
-
location,
|
|
109463
|
-
routes,
|
|
109464
|
-
basename: basename3,
|
|
109465
|
-
allRoutes: Array.from(allRoutes)
|
|
109466
|
-
});
|
|
109467
|
-
}
|
|
109468
|
-
_basename = basename3 || "";
|
|
109469
|
-
setupRouterSubscription(router, routes, version4, basename3, memoryActiveRootSpan);
|
|
109470
|
-
return router;
|
|
109471
|
-
};
|
|
109472
|
-
}
|
|
109473
|
-
function createReactRouterV6CompatibleTracingIntegration(options, version4) {
|
|
109474
|
-
const integration = browserTracingIntegration({ ...options, instrumentPageLoad: false, instrumentNavigation: false });
|
|
109475
|
-
const {
|
|
109476
|
-
useEffect: useEffect9,
|
|
109477
|
-
useLocation,
|
|
109478
|
-
useNavigationType,
|
|
109479
|
-
createRoutesFromChildren,
|
|
109480
|
-
matchRoutes: matchRoutes2,
|
|
109481
|
-
stripBasename,
|
|
109482
|
-
enableAsyncRouteHandlers = false,
|
|
109483
|
-
instrumentPageLoad = true,
|
|
109484
|
-
instrumentNavigation = true,
|
|
109485
|
-
lazyRouteTimeout,
|
|
109486
|
-
lazyRouteManifest
|
|
109487
|
-
} = options;
|
|
109488
|
-
return {
|
|
109489
|
-
...integration,
|
|
109490
|
-
setup(client) {
|
|
109491
|
-
integration.setup(client);
|
|
109492
|
-
const finalTimeout = options.finalTimeout ?? 30000;
|
|
109493
|
-
const defaultMaxWait = (options.idleTimeout ?? 1000) * 3;
|
|
109494
|
-
const configuredMaxWait = lazyRouteTimeout ?? defaultMaxWait;
|
|
109495
|
-
if (configuredMaxWait === Infinity) {
|
|
109496
|
-
_lazyRouteTimeout = finalTimeout;
|
|
109497
|
-
DEBUG_BUILD6 && debug.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:", finalTimeout, "ms to prevent indefinite hangs");
|
|
109498
|
-
} else if (Number.isNaN(configuredMaxWait)) {
|
|
109499
|
-
DEBUG_BUILD6 && debug.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:", defaultMaxWait);
|
|
109500
|
-
_lazyRouteTimeout = defaultMaxWait;
|
|
109501
|
-
} else if (configuredMaxWait < 0) {
|
|
109502
|
-
DEBUG_BUILD6 && debug.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:", configuredMaxWait, "falling back to:", defaultMaxWait);
|
|
109503
|
-
_lazyRouteTimeout = defaultMaxWait;
|
|
109504
|
-
} else {
|
|
109505
|
-
_lazyRouteTimeout = configuredMaxWait;
|
|
109506
|
-
}
|
|
109507
|
-
_useEffect = useEffect9;
|
|
109508
|
-
_useLocation = useLocation;
|
|
109509
|
-
_useNavigationType = useNavigationType;
|
|
109510
|
-
_matchRoutes2 = matchRoutes2;
|
|
109511
|
-
_createRoutesFromChildren = createRoutesFromChildren;
|
|
109512
|
-
_enableAsyncRouteHandlers = enableAsyncRouteHandlers;
|
|
109513
|
-
_lazyRouteManifest = lazyRouteManifest;
|
|
109514
|
-
initializeRouterUtils(matchRoutes2, stripBasename || false);
|
|
109515
|
-
},
|
|
109516
|
-
afterAllSetup(client) {
|
|
109517
|
-
integration.afterAllSetup(client);
|
|
109518
|
-
const initPathName = WINDOW4.location?.pathname;
|
|
109519
|
-
if (instrumentPageLoad && initPathName) {
|
|
109520
|
-
startBrowserTracingPageLoadSpan(client, {
|
|
109521
|
-
name: initPathName,
|
|
109522
|
-
attributes: {
|
|
109523
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "url",
|
|
109524
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "pageload",
|
|
109525
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.pageload.react.reactrouter_v${version4}`
|
|
109526
|
-
}
|
|
109527
|
-
});
|
|
109528
|
-
}
|
|
109529
|
-
if (instrumentNavigation) {
|
|
109530
|
-
CLIENTS_WITH_INSTRUMENT_NAVIGATION.add(client);
|
|
109531
|
-
}
|
|
109532
|
-
}
|
|
109533
|
-
};
|
|
109534
|
-
}
|
|
109535
|
-
function createV6CompatibleWrapUseRoutes(origUseRoutes, version4) {
|
|
109536
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_matchRoutes2) {
|
|
109537
|
-
DEBUG_BUILD6 && debug.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters.");
|
|
109538
|
-
return origUseRoutes;
|
|
109539
|
-
}
|
|
109540
|
-
const SentryRoutes = (props) => {
|
|
109541
|
-
const isMountRenderPass = React4.useRef(true);
|
|
109542
|
-
const { routes, locationArg } = props;
|
|
109543
|
-
const Routes = origUseRoutes(routes, locationArg);
|
|
109544
|
-
const location = _useLocation();
|
|
109545
|
-
const navigationType = _useNavigationType();
|
|
109546
|
-
const stableLocationParam = typeof locationArg === "string" || locationArg?.pathname ? locationArg : location;
|
|
109547
|
-
_useEffect(() => {
|
|
109548
|
-
const normalizedLocation = typeof stableLocationParam === "string" ? { pathname: stableLocationParam } : stableLocationParam;
|
|
109549
|
-
if (isMountRenderPass.current) {
|
|
109550
|
-
addRoutesToAllRoutes(routes);
|
|
109551
|
-
updatePageloadTransaction({
|
|
109552
|
-
activeRootSpan: getActiveRootSpan2(),
|
|
109553
|
-
location: normalizedLocation,
|
|
109554
|
-
routes,
|
|
109555
|
-
allRoutes: Array.from(allRoutes)
|
|
109556
|
-
});
|
|
109557
|
-
isMountRenderPass.current = false;
|
|
109558
|
-
} else {
|
|
109559
|
-
handleNavigation({
|
|
109560
|
-
location: normalizedLocation,
|
|
109561
|
-
routes,
|
|
109562
|
-
navigationType,
|
|
109563
|
-
version: version4,
|
|
109564
|
-
allRoutes: Array.from(allRoutes)
|
|
109565
|
-
});
|
|
109566
|
-
}
|
|
109567
|
-
}, [navigationType, stableLocationParam]);
|
|
109568
|
-
return Routes;
|
|
109569
|
-
};
|
|
109570
|
-
return (routes, locationArg) => {
|
|
109571
|
-
return React4.createElement(SentryRoutes, { routes, locationArg });
|
|
109572
|
-
};
|
|
109573
|
-
}
|
|
109574
|
-
function wrapPatchRoutesOnNavigation(opts, isMemoryRouter = false, capturedSpan) {
|
|
109575
|
-
if (!opts || !("patchRoutesOnNavigation" in opts) || typeof opts.patchRoutesOnNavigation !== "function") {
|
|
109576
|
-
return opts || {};
|
|
109577
|
-
}
|
|
109578
|
-
const originalPatchRoutes = opts.patchRoutesOnNavigation;
|
|
109579
|
-
return {
|
|
109580
|
-
...opts,
|
|
109581
|
-
patchRoutesOnNavigation: async (args) => {
|
|
109582
|
-
const targetPath = args?.path;
|
|
109583
|
-
const activeRootSpan = getActiveRootSpan2() ?? capturedSpan;
|
|
109584
|
-
if (!isMemoryRouter) {
|
|
109585
|
-
const originalPatch = args?.patch;
|
|
109586
|
-
const matches = args?.matches;
|
|
109587
|
-
if (originalPatch) {
|
|
109588
|
-
args.patch = (routeId, children) => {
|
|
109589
|
-
addRoutesToAllRoutes(children);
|
|
109590
|
-
if (matches && matches.length > 0) {
|
|
109591
|
-
const leafMatch = matches[matches.length - 1];
|
|
109592
|
-
const leafRoute = leafMatch?.route;
|
|
109593
|
-
if (leafRoute) {
|
|
109594
|
-
const matchingRoute = Array.from(allRoutes).find((route) => {
|
|
109595
|
-
const idMatches = route.id !== undefined && route.id === routeId;
|
|
109596
|
-
const referenceMatches = route === leafRoute;
|
|
109597
|
-
const pathMatches = route.path !== undefined && leafRoute.path !== undefined && route.path === leafRoute.path;
|
|
109598
|
-
return idMatches || referenceMatches || pathMatches;
|
|
109599
|
-
});
|
|
109600
|
-
if (matchingRoute) {
|
|
109601
|
-
addResolvedRoutesToParent(children, matchingRoute);
|
|
109602
|
-
}
|
|
109603
|
-
}
|
|
109604
|
-
}
|
|
109605
|
-
const spanJson = activeRootSpan ? spanToJSON(activeRootSpan) : undefined;
|
|
109606
|
-
if (targetPath && activeRootSpan && spanJson && !spanJson.timestamp && spanJson.op === "navigation") {
|
|
109607
|
-
updateNavigationSpan(activeRootSpan, { pathname: targetPath, search: "", hash: "", state: null, key: "default" }, Array.from(allRoutes), true, _matchRoutes2);
|
|
109608
|
-
}
|
|
109609
|
-
return originalPatch(routeId, children);
|
|
109610
|
-
};
|
|
109611
|
-
}
|
|
109612
|
-
}
|
|
109613
|
-
const lazyLoadPromise = (async () => {
|
|
109614
|
-
const contextToken = setNavigationContext(targetPath, activeRootSpan);
|
|
109615
|
-
let result;
|
|
109616
|
-
try {
|
|
109617
|
-
result = await originalPatchRoutes(args);
|
|
109618
|
-
} finally {
|
|
109619
|
-
clearNavigationContext(contextToken);
|
|
109620
|
-
if (activeRootSpan) {
|
|
109621
|
-
resolveDeferredLazyRoutePromise(activeRootSpan);
|
|
109622
|
-
}
|
|
109623
|
-
}
|
|
109624
|
-
const spanJson = activeRootSpan ? spanToJSON(activeRootSpan) : undefined;
|
|
109625
|
-
if (activeRootSpan && spanJson && !spanJson.timestamp && spanJson.op === "navigation") {
|
|
109626
|
-
const pathname = targetPath;
|
|
109627
|
-
if (pathname) {
|
|
109628
|
-
updateNavigationSpan(activeRootSpan, { pathname, search: "", hash: "", state: null, key: "default" }, Array.from(allRoutes), false, _matchRoutes2);
|
|
109629
|
-
}
|
|
109630
|
-
}
|
|
109631
|
-
return result;
|
|
109632
|
-
})();
|
|
109633
|
-
if (activeRootSpan) {
|
|
109634
|
-
trackLazyRouteLoad(activeRootSpan, lazyLoadPromise);
|
|
109635
|
-
}
|
|
109636
|
-
return lazyLoadPromise;
|
|
109637
|
-
}
|
|
109638
|
-
};
|
|
109639
|
-
}
|
|
109640
|
-
function handleNavigation(opts) {
|
|
109641
|
-
const { location, routes, navigationType, version: version4, matches, basename: basename3, allRoutes: allRoutes2 } = opts;
|
|
109642
|
-
const branches = Array.isArray(matches) ? matches : _matchRoutes2(allRoutes2 || routes, location, basename3);
|
|
109643
|
-
const client = getClient();
|
|
109644
|
-
if (!client || !CLIENTS_WITH_INSTRUMENT_NAVIGATION.has(client)) {
|
|
109645
|
-
return;
|
|
109646
|
-
}
|
|
109647
|
-
const activeRootSpan = getActiveRootSpan2();
|
|
109648
|
-
if (activeRootSpan && spanToJSON(activeRootSpan).op === "pageload" && navigationType === "POP") {
|
|
109649
|
-
return;
|
|
109650
|
-
}
|
|
109651
|
-
if ((navigationType === "PUSH" || navigationType === "POP") && branches) {
|
|
109652
|
-
const [name6, source] = resolveRouteNameAndSource(location, allRoutes2 || routes, allRoutes2 || routes, branches, basename3, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
109653
|
-
const locationKey = computeLocationKey(location);
|
|
109654
|
-
const trackedNav = activeNavigationSpans.get(client);
|
|
109655
|
-
const trackedSpanHasEnded = trackedNav && !trackedNav.isPlaceholder ? !!spanToJSON(trackedNav.span).timestamp : false;
|
|
109656
|
-
const { skip, shouldUpdate } = shouldSkipNavigation(trackedNav, locationKey, name6, trackedSpanHasEnded);
|
|
109657
|
-
if (skip) {
|
|
109658
|
-
if (shouldUpdate && trackedNav) {
|
|
109659
|
-
const oldName = trackedNav.routeName;
|
|
109660
|
-
if (trackedNav.isPlaceholder) {
|
|
109661
|
-
trackedNav.routeName = name6;
|
|
109662
|
-
DEBUG_BUILD6 && debug.log(`[Tracing] Updated placeholder navigation name from "${oldName}" to "${name6}" (will apply to real span)`);
|
|
109663
|
-
} else {
|
|
109664
|
-
trackedNav.span.updateName(name6);
|
|
109665
|
-
trackedNav.span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
109666
|
-
addNonEnumerableProperty(trackedNav.span, "__sentry_navigation_name_set__", true);
|
|
109667
|
-
trackedNav.routeName = name6;
|
|
109668
|
-
DEBUG_BUILD6 && debug.log(`[Tracing] Updated navigation span name from "${oldName}" to "${name6}"`);
|
|
109669
|
-
}
|
|
109670
|
-
} else {
|
|
109671
|
-
DEBUG_BUILD6 && debug.log(`[Tracing] Skipping duplicate navigation for location: ${locationKey}`);
|
|
109672
|
-
}
|
|
109673
|
-
return;
|
|
109674
|
-
}
|
|
109675
|
-
const placeholderSpan = { end: () => {} };
|
|
109676
|
-
const placeholderEntry = {
|
|
109677
|
-
span: placeholderSpan,
|
|
109678
|
-
routeName: name6,
|
|
109679
|
-
pathname: location.pathname,
|
|
109680
|
-
locationKey,
|
|
109681
|
-
isPlaceholder: true
|
|
109682
|
-
};
|
|
109683
|
-
activeNavigationSpans.set(client, placeholderEntry);
|
|
109684
|
-
let navigationSpan;
|
|
109685
|
-
try {
|
|
109686
|
-
navigationSpan = startBrowserTracingNavigationSpan(client, {
|
|
109687
|
-
name: placeholderEntry.routeName,
|
|
109688
|
-
attributes: {
|
|
109689
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
|
|
109690
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "navigation",
|
|
109691
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: `auto.navigation.react.reactrouter_v${version4}`
|
|
109692
|
-
}
|
|
109693
|
-
});
|
|
109694
|
-
} catch (e3) {
|
|
109695
|
-
activeNavigationSpans.delete(client);
|
|
109696
|
-
throw e3;
|
|
109697
|
-
}
|
|
109698
|
-
if (navigationSpan) {
|
|
109699
|
-
activeNavigationSpans.set(client, {
|
|
109700
|
-
span: navigationSpan,
|
|
109701
|
-
routeName: placeholderEntry.routeName,
|
|
109702
|
-
pathname: location.pathname,
|
|
109703
|
-
locationKey
|
|
109704
|
-
});
|
|
109705
|
-
patchSpanEnd(navigationSpan, location, routes, basename3, "navigation");
|
|
109706
|
-
} else {
|
|
109707
|
-
activeNavigationSpans.delete(client);
|
|
109708
|
-
}
|
|
109709
|
-
}
|
|
109710
|
-
}
|
|
109711
|
-
function addRoutesToAllRoutes(routes) {
|
|
109712
|
-
routes.forEach((route) => {
|
|
109713
|
-
const extractedChildRoutes = getChildRoutesRecursively(route);
|
|
109714
|
-
extractedChildRoutes.forEach((r3) => {
|
|
109715
|
-
allRoutes.add(r3);
|
|
109716
|
-
});
|
|
109717
|
-
});
|
|
109718
|
-
}
|
|
109719
|
-
function getChildRoutesRecursively(route, allRoutes2 = new Set) {
|
|
109720
|
-
if (!allRoutes2.has(route)) {
|
|
109721
|
-
allRoutes2.add(route);
|
|
109722
|
-
if (route.children && !route.index) {
|
|
109723
|
-
route.children.forEach((child) => {
|
|
109724
|
-
const childRoutes = getChildRoutesRecursively(child, allRoutes2);
|
|
109725
|
-
childRoutes.forEach((r3) => {
|
|
109726
|
-
allRoutes2.add(r3);
|
|
109727
|
-
});
|
|
109728
|
-
});
|
|
109729
|
-
}
|
|
109730
|
-
}
|
|
109731
|
-
return allRoutes2;
|
|
109732
|
-
}
|
|
109733
|
-
function updatePageloadTransaction({
|
|
109734
|
-
activeRootSpan,
|
|
109735
|
-
location,
|
|
109736
|
-
routes,
|
|
109737
|
-
matches,
|
|
109738
|
-
basename: basename3,
|
|
109739
|
-
allRoutes: allRoutes2
|
|
109740
|
-
}) {
|
|
109741
|
-
const branches = Array.isArray(matches) ? matches : _matchRoutes2(allRoutes2 || routes, location, basename3);
|
|
109742
|
-
if (branches) {
|
|
109743
|
-
const [name6, source] = resolveRouteNameAndSource(location, allRoutes2 || routes, allRoutes2 || routes, branches, basename3, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
109744
|
-
getCurrentScope().setTransactionName(name6 || "/");
|
|
109745
|
-
if (activeRootSpan) {
|
|
109746
|
-
activeRootSpan.updateName(name6);
|
|
109747
|
-
activeRootSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
109748
|
-
patchSpanEnd(activeRootSpan, location, routes, basename3, "pageload");
|
|
109749
|
-
}
|
|
109750
|
-
} else if (activeRootSpan) {
|
|
109751
|
-
patchSpanEnd(activeRootSpan, location, routes, basename3, "pageload");
|
|
109752
|
-
}
|
|
109753
|
-
}
|
|
109754
|
-
function shouldUpdateWildcardSpanName(currentName, currentSource, newName, newSource, allowNoCurrentName = false) {
|
|
109755
|
-
if (!newName) {
|
|
109756
|
-
return false;
|
|
109757
|
-
}
|
|
109758
|
-
if (!currentName && allowNoCurrentName) {
|
|
109759
|
-
return true;
|
|
109760
|
-
}
|
|
109761
|
-
const hasWildcard = currentName && transactionNameHasWildcard(currentName);
|
|
109762
|
-
if (hasWildcard && newSource === "route" && !transactionNameHasWildcard(newName)) {
|
|
109763
|
-
return true;
|
|
109764
|
-
}
|
|
109765
|
-
if (currentSource !== "route" && newSource === "route") {
|
|
109766
|
-
return true;
|
|
109767
|
-
}
|
|
109768
|
-
return false;
|
|
109769
|
-
}
|
|
109770
|
-
function tryUpdateSpanNameBeforeEnd(span, spanJson, currentName, location, routes, basename3, spanType, allRoutes2) {
|
|
109771
|
-
try {
|
|
109772
|
-
const currentSource = spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
109773
|
-
if (currentSource === "route" && currentName && !transactionNameHasWildcard(currentName)) {
|
|
109774
|
-
return;
|
|
109775
|
-
}
|
|
109776
|
-
const currentAllRoutes = Array.from(allRoutes2);
|
|
109777
|
-
const routesToUse = currentAllRoutes.length > 0 ? currentAllRoutes : routes;
|
|
109778
|
-
const branches = _matchRoutes2(routesToUse, location, basename3);
|
|
109779
|
-
if (!branches) {
|
|
109780
|
-
return;
|
|
109781
|
-
}
|
|
109782
|
-
const [name6, source] = resolveRouteNameAndSource(location, routesToUse, routesToUse, branches, basename3, _lazyRouteManifest, _enableAsyncRouteHandlers);
|
|
109783
|
-
const isImprovement = shouldUpdateWildcardSpanName(currentName, currentSource, name6, source, true);
|
|
109784
|
-
const spanNotEnded = spanType === "pageload" || !spanJson.timestamp;
|
|
109785
|
-
if (isImprovement && spanNotEnded) {
|
|
109786
|
-
span.updateName(name6);
|
|
109787
|
-
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source);
|
|
109788
|
-
}
|
|
109789
|
-
} catch (error3) {
|
|
109790
|
-
DEBUG_BUILD6 && debug.warn(`Error updating span details before ending: ${error3}`);
|
|
109791
|
-
}
|
|
109792
|
-
}
|
|
109793
|
-
function patchSpanEnd(span, location, routes, basename3, spanType) {
|
|
109794
|
-
const patchedPropertyName = `__sentry_${spanType}_end_patched__`;
|
|
109795
|
-
const hasEndBeenPatched = span?.[patchedPropertyName];
|
|
109796
|
-
if (hasEndBeenPatched || !span.end) {
|
|
109797
|
-
return;
|
|
109798
|
-
}
|
|
109799
|
-
const originalEnd = span.end.bind(span);
|
|
109800
|
-
let endCalled = false;
|
|
109801
|
-
span.end = function patchedEnd(...args) {
|
|
109802
|
-
if (endCalled) {
|
|
109803
|
-
return;
|
|
109804
|
-
}
|
|
109805
|
-
endCalled = true;
|
|
109806
|
-
const endTimestamp = args.length > 0 ? args[0] : Date.now() / 1000;
|
|
109807
|
-
const spanJson = spanToJSON(span);
|
|
109808
|
-
const currentName = spanJson.description;
|
|
109809
|
-
const currentSource = spanJson.data?.[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
109810
|
-
const cleanupNavigationSpan = () => {
|
|
109811
|
-
const client = getClient();
|
|
109812
|
-
if (client && spanType === "navigation") {
|
|
109813
|
-
const trackedNav = activeNavigationSpans.get(client);
|
|
109814
|
-
if (trackedNav && trackedNav.span === span) {
|
|
109815
|
-
activeNavigationSpans.delete(client);
|
|
109816
|
-
}
|
|
109817
|
-
}
|
|
109818
|
-
};
|
|
109819
|
-
const pendingPromises = pendingLazyRouteLoads.get(span);
|
|
109820
|
-
const mayHaveLazyRoutes = span.__sentry_may_have_lazy_routes__;
|
|
109821
|
-
const hasPendingOrMayHaveLazyRoutes = pendingPromises && pendingPromises.size > 0 || mayHaveLazyRoutes;
|
|
109822
|
-
const shouldWaitForLazyRoutes = hasPendingOrMayHaveLazyRoutes && currentName && (transactionNameHasWildcard(currentName) || currentSource !== "route");
|
|
109823
|
-
if (shouldWaitForLazyRoutes) {
|
|
109824
|
-
if (_lazyRouteTimeout === 0) {
|
|
109825
|
-
tryUpdateSpanNameBeforeEnd(span, spanJson, currentName, location, routes, basename3, spanType, allRoutes);
|
|
109826
|
-
cleanupNavigationSpan();
|
|
109827
|
-
originalEnd(endTimestamp);
|
|
109828
|
-
return;
|
|
109829
|
-
}
|
|
109830
|
-
const timeoutPromise = new Promise((r3) => setTimeout(r3, _lazyRouteTimeout));
|
|
109831
|
-
let waitPromise;
|
|
109832
|
-
if (pendingPromises && pendingPromises.size > 0) {
|
|
109833
|
-
const allSettled = Promise.allSettled(pendingPromises).then(() => {});
|
|
109834
|
-
waitPromise = _lazyRouteTimeout === Infinity ? allSettled : Promise.race([allSettled, timeoutPromise]);
|
|
109835
|
-
} else {
|
|
109836
|
-
waitPromise = timeoutPromise;
|
|
109837
|
-
}
|
|
109838
|
-
waitPromise.then(() => {
|
|
109839
|
-
const updatedSpanJson = spanToJSON(span);
|
|
109840
|
-
tryUpdateSpanNameBeforeEnd(span, updatedSpanJson, updatedSpanJson.description, location, routes, basename3, spanType, allRoutes);
|
|
109841
|
-
cleanupNavigationSpan();
|
|
109842
|
-
originalEnd(endTimestamp);
|
|
109843
|
-
}).catch(() => {
|
|
109844
|
-
cleanupNavigationSpan();
|
|
109845
|
-
originalEnd(endTimestamp);
|
|
109846
|
-
});
|
|
109847
|
-
return;
|
|
109848
|
-
}
|
|
109849
|
-
tryUpdateSpanNameBeforeEnd(span, spanJson, currentName, location, routes, basename3, spanType, allRoutes);
|
|
109850
|
-
cleanupNavigationSpan();
|
|
109851
|
-
originalEnd(endTimestamp);
|
|
109852
|
-
};
|
|
109853
|
-
addNonEnumerableProperty(span, patchedPropertyName, true);
|
|
109854
|
-
}
|
|
109855
|
-
function createV6CompatibleWithSentryReactRouterRouting(Routes, version4) {
|
|
109856
|
-
if (!_useEffect || !_useLocation || !_useNavigationType || !_createRoutesFromChildren || !_matchRoutes2) {
|
|
109857
|
-
DEBUG_BUILD6 && debug.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
|
|
109858
|
-
useEffect: ${_useEffect}. useLocation: ${_useLocation}. useNavigationType: ${_useNavigationType}.
|
|
109859
|
-
createRoutesFromChildren: ${_createRoutesFromChildren}. matchRoutes: ${_matchRoutes2}.`);
|
|
109860
|
-
return Routes;
|
|
109861
|
-
}
|
|
109862
|
-
const SentryRoutes = (props) => {
|
|
109863
|
-
const isMountRenderPass = React4.useRef(true);
|
|
109864
|
-
const location = _useLocation();
|
|
109865
|
-
const navigationType = _useNavigationType();
|
|
109866
|
-
_useEffect(() => {
|
|
109867
|
-
const routes = _createRoutesFromChildren(props.children);
|
|
109868
|
-
if (isMountRenderPass.current) {
|
|
109869
|
-
addRoutesToAllRoutes(routes);
|
|
109870
|
-
updatePageloadTransaction({
|
|
109871
|
-
activeRootSpan: getActiveRootSpan2(),
|
|
109872
|
-
location,
|
|
109873
|
-
routes,
|
|
109874
|
-
allRoutes: Array.from(allRoutes)
|
|
109875
|
-
});
|
|
109876
|
-
isMountRenderPass.current = false;
|
|
109877
|
-
} else {
|
|
109878
|
-
handleNavigation({ location, routes, navigationType, version: version4, allRoutes: Array.from(allRoutes) });
|
|
109879
|
-
}
|
|
109880
|
-
}, [location, navigationType]);
|
|
109881
|
-
return React4.createElement(Routes, { ...props });
|
|
109882
|
-
};
|
|
109883
|
-
hoistNonReactStatics(SentryRoutes, Routes);
|
|
109884
|
-
return SentryRoutes;
|
|
109885
|
-
}
|
|
109886
|
-
var _useEffect, _useLocation, _useNavigationType, _createRoutesFromChildren, _matchRoutes2, _enableAsyncRouteHandlers = false, _lazyRouteTimeout = 3000, _lazyRouteManifest, _basename = "", CLIENTS_WITH_INSTRUMENT_NAVIGATION, activeNavigationSpans, allRoutes, pendingLazyRouteLoads, deferredLazyRouteResolvers;
|
|
109887
|
-
var init_instrumentation = __esm(() => {
|
|
109888
|
-
init_dev();
|
|
109889
|
-
init_esm2();
|
|
109890
|
-
init_debug_build4();
|
|
109891
|
-
init_hoist_non_react_statics();
|
|
109892
|
-
init_lazy_routes();
|
|
109893
|
-
init_utils18();
|
|
109894
|
-
CLIENTS_WITH_INSTRUMENT_NAVIGATION = new WeakSet;
|
|
109895
|
-
activeNavigationSpans = new WeakMap;
|
|
109896
|
-
allRoutes = new Set;
|
|
109897
|
-
pendingLazyRouteLoads = new WeakMap;
|
|
109898
|
-
deferredLazyRouteResolvers = new WeakMap;
|
|
109899
|
-
});
|
|
109900
|
-
|
|
109901
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouterv6.js
|
|
109902
|
-
function reactRouterV6BrowserTracingIntegration(options) {
|
|
109903
|
-
return createReactRouterV6CompatibleTracingIntegration(options, "6");
|
|
109904
|
-
}
|
|
109905
|
-
function wrapUseRoutesV6(origUseRoutes) {
|
|
109906
|
-
return createV6CompatibleWrapUseRoutes(origUseRoutes, "6");
|
|
109907
|
-
}
|
|
109908
|
-
function wrapCreateBrowserRouterV6(createRouterFunction) {
|
|
109909
|
-
return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, "6");
|
|
109910
|
-
}
|
|
109911
|
-
function wrapCreateMemoryRouterV6(createMemoryRouterFunction) {
|
|
109912
|
-
return createV6CompatibleWrapCreateMemoryRouter(createMemoryRouterFunction, "6");
|
|
109913
|
-
}
|
|
109914
|
-
function withSentryReactRouterV6Routing(routes) {
|
|
109915
|
-
return createV6CompatibleWithSentryReactRouterRouting(routes, "6");
|
|
109916
|
-
}
|
|
109917
|
-
var init_reactrouterv6 = __esm(() => {
|
|
109918
|
-
init_instrumentation();
|
|
109919
|
-
});
|
|
109920
|
-
|
|
109921
|
-
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/reactrouterv7.js
|
|
109922
|
-
function reactRouterV7BrowserTracingIntegration(options) {
|
|
109923
|
-
return createReactRouterV6CompatibleTracingIntegration(options, "7");
|
|
109924
|
-
}
|
|
109925
|
-
function withSentryReactRouterV7Routing(routes) {
|
|
109926
|
-
return createV6CompatibleWithSentryReactRouterRouting(routes, "7");
|
|
109927
|
-
}
|
|
109928
|
-
function wrapCreateBrowserRouterV7(createRouterFunction) {
|
|
109929
|
-
return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, "7");
|
|
109930
|
-
}
|
|
109931
|
-
function wrapCreateMemoryRouterV7(createMemoryRouterFunction) {
|
|
109932
|
-
return createV6CompatibleWrapCreateMemoryRouter(createMemoryRouterFunction, "7");
|
|
109933
|
-
}
|
|
109934
|
-
function wrapUseRoutesV7(origUseRoutes) {
|
|
109935
|
-
return createV6CompatibleWrapUseRoutes(origUseRoutes, "7");
|
|
109936
|
-
}
|
|
109937
|
-
var init_reactrouterv7 = __esm(() => {
|
|
109938
|
-
init_instrumentation();
|
|
109939
|
-
});
|
|
109940
|
-
|
|
109941
107942
|
// ../../node_modules/.pnpm/@sentry+react@10.40.0_react@19.2.4/node_modules/@sentry/react/build/esm/index.js
|
|
109942
107943
|
var exports_esm = {};
|
|
109943
107944
|
__export(exports_esm, {
|
|
@@ -110105,16 +108106,6 @@ __export(exports_esm, {
|
|
|
110105
108106
|
BrowserClient: () => BrowserClient
|
|
110106
108107
|
});
|
|
110107
108108
|
var init_esm7 = __esm(() => {
|
|
110108
|
-
init_sdk3();
|
|
110109
|
-
init_error();
|
|
110110
|
-
init_profiler();
|
|
110111
|
-
init_errorboundary();
|
|
110112
|
-
init_redux();
|
|
110113
|
-
init_reactrouterv3();
|
|
110114
|
-
init_tanstackrouter();
|
|
110115
|
-
init_reactrouter();
|
|
110116
|
-
init_reactrouterv6();
|
|
110117
|
-
init_reactrouterv7();
|
|
110118
108109
|
init_dev();
|
|
110119
108110
|
});
|
|
110120
108111
|
|
|
@@ -110150,7 +108141,7 @@ import {
|
|
|
110150
108141
|
ToastContainer as BaseToastContainer,
|
|
110151
108142
|
toast as baseToast
|
|
110152
108143
|
} from "@powerhousedao/design-system/connect";
|
|
110153
|
-
import { createElement
|
|
108144
|
+
import { createElement } from "react";
|
|
110154
108145
|
function toast(content, options) {
|
|
110155
108146
|
const {
|
|
110156
108147
|
type = "default",
|
|
@@ -110159,7 +108150,7 @@ function toast(content, options) {
|
|
|
110159
108150
|
} = options || {};
|
|
110160
108151
|
return baseToast(content, { type, containerId, ...restOptions });
|
|
110161
108152
|
}
|
|
110162
|
-
var CONNECT_TOAST_CONTAINER_ID = "connect", ToastContainer = () =>
|
|
108153
|
+
var CONNECT_TOAST_CONTAINER_ID = "connect", ToastContainer = () => createElement(BaseToastContainer, {
|
|
110163
108154
|
containerId: CONNECT_TOAST_CONTAINER_ID
|
|
110164
108155
|
});
|
|
110165
108156
|
var init_toast = () => {};
|
|
@@ -113007,10 +110998,10 @@ function fixedBase64(bodyLength, padding3) {
|
|
|
113007
110998
|
function fixedBase64url(length4) {
|
|
113008
110999
|
return new RegExp(`^[A-Za-z0-9_-]{${length4}}$`);
|
|
113009
111000
|
}
|
|
113010
|
-
var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid = (
|
|
113011
|
-
if (!
|
|
111001
|
+
var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid = (version3) => {
|
|
111002
|
+
if (!version3)
|
|
113012
111003
|
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
113013
|
-
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${
|
|
111004
|
+
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version3}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
113014
111005
|
}, uuid42, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`, ipv4, ipv6, mac = (delimiter) => {
|
|
113015
111006
|
const escapedDelim = escapeRegex(delimiter ?? ":");
|
|
113016
111007
|
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
@@ -113666,9 +111657,9 @@ class Doc {
|
|
|
113666
111657
|
}
|
|
113667
111658
|
|
|
113668
111659
|
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
|
|
113669
|
-
var
|
|
111660
|
+
var version3;
|
|
113670
111661
|
var init_versions = __esm(() => {
|
|
113671
|
-
|
|
111662
|
+
version3 = {
|
|
113672
111663
|
major: 4,
|
|
113673
111664
|
minor: 3,
|
|
113674
111665
|
patch: 6
|
|
@@ -114044,7 +112035,7 @@ var init_schemas = __esm(() => {
|
|
|
114044
112035
|
inst ?? (inst = {});
|
|
114045
112036
|
inst._zod.def = def;
|
|
114046
112037
|
inst._zod.bag = inst._zod.bag || {};
|
|
114047
|
-
inst._zod.version =
|
|
112038
|
+
inst._zod.version = version3;
|
|
114048
112039
|
const checks = [...inst._zod.def.checks ?? []];
|
|
114049
112040
|
if (inst._zod.traits.has("$ZodCheck")) {
|
|
114050
112041
|
checks.unshift(inst);
|
|
@@ -123329,7 +121320,7 @@ var init_json_schema = () => {};
|
|
|
123329
121320
|
// ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
|
|
123330
121321
|
var exports_core2 = {};
|
|
123331
121322
|
__export(exports_core2, {
|
|
123332
|
-
version: () =>
|
|
121323
|
+
version: () => version3,
|
|
123333
121324
|
util: () => exports_util,
|
|
123334
121325
|
treeifyError: () => treeifyError,
|
|
123335
121326
|
toJSONSchema: () => toJSONSchema,
|
|
@@ -133849,7 +131840,7 @@ var init_locatedError = __esm(() => {
|
|
|
133849
131840
|
});
|
|
133850
131841
|
|
|
133851
131842
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/error/index.mjs
|
|
133852
|
-
var
|
|
131843
|
+
var init_error = __esm(() => {
|
|
133853
131844
|
init_GraphQLError();
|
|
133854
131845
|
init_locatedError();
|
|
133855
131846
|
});
|
|
@@ -134549,7 +132540,7 @@ var init_graphql = __esm(() => {
|
|
|
134549
132540
|
init_language();
|
|
134550
132541
|
init_execution();
|
|
134551
132542
|
init_validation();
|
|
134552
|
-
|
|
132543
|
+
init_error();
|
|
134553
132544
|
init_utilities();
|
|
134554
132545
|
});
|
|
134555
132546
|
|
|
@@ -135434,7 +133425,7 @@ function getPHCustomScalarByTypeName(name6) {
|
|
|
135434
133425
|
return scalar18;
|
|
135435
133426
|
}
|
|
135436
133427
|
var SerializableSchema;
|
|
135437
|
-
var
|
|
133428
|
+
var init_utils18 = __esm(() => {
|
|
135438
133429
|
init_zod();
|
|
135439
133430
|
init_scalars2();
|
|
135440
133431
|
SerializableSchema = exports_external2.lazy(() => exports_external2.union([
|
|
@@ -135450,7 +133441,7 @@ var init_utils19 = __esm(() => {
|
|
|
135450
133441
|
// ../../node_modules/.pnpm/@powerhousedao+document-engineering@1.40.1_@types+express@5.0.6_@types+react-dom@19.2.3_70418f913b57b75f8393eefe7def1a20/node_modules/@powerhousedao/document-engineering/dist/src/scalars/graphql/index.js
|
|
135451
133442
|
var init_graphql2 = __esm(() => {
|
|
135452
133443
|
init_scalars2();
|
|
135453
|
-
|
|
133444
|
+
init_utils18();
|
|
135454
133445
|
});
|
|
135455
133446
|
|
|
135456
133447
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/constants/graphql-kinds.js
|
|
@@ -137147,7 +135138,7 @@ ${typeDefsDoc}`;
|
|
|
137147
135138
|
|
|
137148
135139
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/context/schema-context.js
|
|
137149
135140
|
import { jsx as _jsx2 } from "react/jsx-runtime";
|
|
137150
|
-
import { createContext, useContext, useEffect as
|
|
135141
|
+
import { createContext, useContext, useEffect as useEffect8, useState as useState9 } from "react";
|
|
137151
135142
|
function makeSharedSchemaSdl(existingSchemaSdl, globalStateSchemaSdl, localStateSchemaSdl, operationSchemasSdl) {
|
|
137152
135143
|
const existingSchema = buildSchema(existingSchemaSdl);
|
|
137153
135144
|
const sdls = [
|
|
@@ -137220,8 +135211,8 @@ function parseSharedSchemaSdl(initialSchema2, globalStateSchemaSdl, localStateSc
|
|
|
137220
135211
|
}
|
|
137221
135212
|
function SchemaContextProvider(props) {
|
|
137222
135213
|
const { children, globalStateSchemaSdl, localStateSchemaSdl, operationSchemasSdl } = props;
|
|
137223
|
-
const [sharedSchemaSdl, setSharedSchemaSdl] =
|
|
137224
|
-
|
|
135214
|
+
const [sharedSchemaSdl, setSharedSchemaSdl] = useState9(() => parseSharedSchemaSdl(printSchema(initialSchema), globalStateSchemaSdl, localStateSchemaSdl, operationSchemasSdl));
|
|
135215
|
+
useEffect8(() => {
|
|
137225
135216
|
setSharedSchemaSdl((prev) => parseSharedSchemaSdl(prev.sharedSchema, globalStateSchemaSdl, localStateSchemaSdl, operationSchemasSdl));
|
|
137226
135217
|
}, [globalStateSchemaSdl, localStateSchemaSdl, operationSchemasSdl]);
|
|
137227
135218
|
return _jsx2(SchemaContext.Provider, { value: sharedSchemaSdl, children });
|
|
@@ -138003,7 +135994,7 @@ var init_helpers3 = __esm(() => {
|
|
|
138003
135994
|
});
|
|
138004
135995
|
|
|
138005
135996
|
// ../../node_modules/.pnpm/react-hook-form@7.71.2_react@19.2.4/node_modules/react-hook-form/dist/index.esm.mjs
|
|
138006
|
-
import
|
|
135997
|
+
import React from "react";
|
|
138007
135998
|
function cloneObject(data) {
|
|
138008
135999
|
if (data instanceof Date) {
|
|
138009
136000
|
return new Date(data);
|
|
@@ -138027,8 +136018,8 @@ function cloneObject(data) {
|
|
|
138027
136018
|
function useFormState(props) {
|
|
138028
136019
|
const formControl = useFormControlContext();
|
|
138029
136020
|
const { control = formControl, disabled, name: name6, exact } = props || {};
|
|
138030
|
-
const [formState, updateFormState] =
|
|
138031
|
-
const _localProxyFormState =
|
|
136021
|
+
const [formState, updateFormState] = React.useState(control._formState);
|
|
136022
|
+
const _localProxyFormState = React.useRef({
|
|
138032
136023
|
isDirty: false,
|
|
138033
136024
|
isLoading: false,
|
|
138034
136025
|
dirtyFields: false,
|
|
@@ -138049,10 +136040,10 @@ function useFormState(props) {
|
|
|
138049
136040
|
});
|
|
138050
136041
|
}
|
|
138051
136042
|
}), [name6, disabled, exact]);
|
|
138052
|
-
|
|
136043
|
+
React.useEffect(() => {
|
|
138053
136044
|
_localProxyFormState.current.isValid && control._setValid(true);
|
|
138054
136045
|
}, [control]);
|
|
138055
|
-
return
|
|
136046
|
+
return React.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
|
|
138056
136047
|
}
|
|
138057
136048
|
function deepEqual(object1, object2, _internal_visited = new WeakSet) {
|
|
138058
136049
|
if (isPrimitive2(object1) || isPrimitive2(object2)) {
|
|
@@ -138088,21 +136079,21 @@ function deepEqual(object1, object2, _internal_visited = new WeakSet) {
|
|
|
138088
136079
|
function useWatch(props) {
|
|
138089
136080
|
const formControl = useFormControlContext();
|
|
138090
136081
|
const { control = formControl, name: name6, defaultValue, disabled, exact, compute } = props || {};
|
|
138091
|
-
const _defaultValue =
|
|
138092
|
-
const _compute =
|
|
138093
|
-
const _computeFormValues =
|
|
138094
|
-
const _prevControl =
|
|
138095
|
-
const _prevName =
|
|
136082
|
+
const _defaultValue = React.useRef(defaultValue);
|
|
136083
|
+
const _compute = React.useRef(compute);
|
|
136084
|
+
const _computeFormValues = React.useRef(undefined);
|
|
136085
|
+
const _prevControl = React.useRef(control);
|
|
136086
|
+
const _prevName = React.useRef(name6);
|
|
138096
136087
|
_compute.current = compute;
|
|
138097
|
-
const [value, updateValue] =
|
|
136088
|
+
const [value, updateValue] = React.useState(() => {
|
|
138098
136089
|
const defaultValue2 = control._getWatch(name6, _defaultValue.current);
|
|
138099
136090
|
return _compute.current ? _compute.current(defaultValue2) : defaultValue2;
|
|
138100
136091
|
});
|
|
138101
|
-
const getCurrentOutput =
|
|
136092
|
+
const getCurrentOutput = React.useCallback((values) => {
|
|
138102
136093
|
const formValues = generateWatchOutput(name6, control._names, values || control._formValues, false, _defaultValue.current);
|
|
138103
136094
|
return _compute.current ? _compute.current(formValues) : formValues;
|
|
138104
136095
|
}, [control._formValues, control._names, name6]);
|
|
138105
|
-
const refreshValue =
|
|
136096
|
+
const refreshValue = React.useCallback((values) => {
|
|
138106
136097
|
if (!disabled) {
|
|
138107
136098
|
const formValues = generateWatchOutput(name6, control._names, values || control._formValues, false, _defaultValue.current);
|
|
138108
136099
|
if (_compute.current) {
|
|
@@ -138133,10 +136124,10 @@ function useWatch(props) {
|
|
|
138133
136124
|
}
|
|
138134
136125
|
});
|
|
138135
136126
|
}, [control, exact, name6, refreshValue]);
|
|
138136
|
-
|
|
136127
|
+
React.useEffect(() => control._removeUnmounted());
|
|
138137
136128
|
const controlChanged = _prevControl.current !== control;
|
|
138138
136129
|
const prevName = _prevName.current;
|
|
138139
|
-
const computedOutput =
|
|
136130
|
+
const computedOutput = React.useMemo(() => {
|
|
138140
136131
|
if (disabled) {
|
|
138141
136132
|
return null;
|
|
138142
136133
|
}
|
|
@@ -138150,7 +136141,7 @@ function useController(props) {
|
|
|
138150
136141
|
const formControl = useFormControlContext();
|
|
138151
136142
|
const { name: name6, disabled, control = formControl, shouldUnregister, defaultValue, exact = true } = props;
|
|
138152
136143
|
const isArrayField = isNameInFieldArray(control._names.array, name6);
|
|
138153
|
-
const defaultValueMemo =
|
|
136144
|
+
const defaultValueMemo = React.useMemo(() => get(control._formValues, name6, get(control._defaultValues, name6, defaultValue)), [control, name6, defaultValue]);
|
|
138154
136145
|
const value = useWatch({
|
|
138155
136146
|
control,
|
|
138156
136147
|
name: name6,
|
|
@@ -138162,15 +136153,15 @@ function useController(props) {
|
|
|
138162
136153
|
name: name6,
|
|
138163
136154
|
exact
|
|
138164
136155
|
});
|
|
138165
|
-
const _props =
|
|
138166
|
-
const _previousNameRef =
|
|
138167
|
-
const _registerProps =
|
|
136156
|
+
const _props = React.useRef(props);
|
|
136157
|
+
const _previousNameRef = React.useRef(undefined);
|
|
136158
|
+
const _registerProps = React.useRef(control.register(name6, {
|
|
138168
136159
|
...props.rules,
|
|
138169
136160
|
value,
|
|
138170
136161
|
...isBoolean4(props.disabled) ? { disabled: props.disabled } : {}
|
|
138171
136162
|
}));
|
|
138172
136163
|
_props.current = props;
|
|
138173
|
-
const fieldState =
|
|
136164
|
+
const fieldState = React.useMemo(() => Object.defineProperties({}, {
|
|
138174
136165
|
invalid: {
|
|
138175
136166
|
enumerable: true,
|
|
138176
136167
|
get: () => !!get(formState.errors, name6)
|
|
@@ -138192,21 +136183,21 @@ function useController(props) {
|
|
|
138192
136183
|
get: () => get(formState.errors, name6)
|
|
138193
136184
|
}
|
|
138194
136185
|
}), [formState, name6]);
|
|
138195
|
-
const onChange =
|
|
136186
|
+
const onChange = React.useCallback((event) => _registerProps.current.onChange({
|
|
138196
136187
|
target: {
|
|
138197
136188
|
value: getEventValue(event),
|
|
138198
136189
|
name: name6
|
|
138199
136190
|
},
|
|
138200
136191
|
type: EVENTS.CHANGE
|
|
138201
136192
|
}), [name6]);
|
|
138202
|
-
const onBlur =
|
|
136193
|
+
const onBlur = React.useCallback(() => _registerProps.current.onBlur({
|
|
138203
136194
|
target: {
|
|
138204
136195
|
value: get(control._formValues, name6),
|
|
138205
136196
|
name: name6
|
|
138206
136197
|
},
|
|
138207
136198
|
type: EVENTS.BLUR
|
|
138208
136199
|
}), [name6, control._formValues]);
|
|
138209
|
-
const ref =
|
|
136200
|
+
const ref = React.useCallback((elm) => {
|
|
138210
136201
|
const field2 = get(control._fields, name6);
|
|
138211
136202
|
if (field2 && field2._f && elm) {
|
|
138212
136203
|
field2._f.ref = {
|
|
@@ -138217,7 +136208,7 @@ function useController(props) {
|
|
|
138217
136208
|
};
|
|
138218
136209
|
}
|
|
138219
136210
|
}, [control._fields, name6]);
|
|
138220
|
-
const field =
|
|
136211
|
+
const field = React.useMemo(() => ({
|
|
138221
136212
|
name: name6,
|
|
138222
136213
|
value,
|
|
138223
136214
|
...isBoolean4(disabled) || formState.disabled ? { disabled: formState.disabled || disabled } : {},
|
|
@@ -138225,7 +136216,7 @@ function useController(props) {
|
|
|
138225
136216
|
onBlur,
|
|
138226
136217
|
ref
|
|
138227
136218
|
}), [name6, disabled, formState.disabled, onChange, onBlur, ref, value]);
|
|
138228
|
-
|
|
136219
|
+
React.useEffect(() => {
|
|
138229
136220
|
const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
|
|
138230
136221
|
const previousName = _previousNameRef.current;
|
|
138231
136222
|
if (previousName && previousName !== name6 && !isArrayField) {
|
|
@@ -138255,13 +136246,13 @@ function useController(props) {
|
|
|
138255
136246
|
(isArrayField ? _shouldUnregisterField && !control._state.action : _shouldUnregisterField) ? control.unregister(name6) : updateMounted(name6, false);
|
|
138256
136247
|
};
|
|
138257
136248
|
}, [name6, control, isArrayField, shouldUnregister]);
|
|
138258
|
-
|
|
136249
|
+
React.useEffect(() => {
|
|
138259
136250
|
control._setDisabledField({
|
|
138260
136251
|
disabled,
|
|
138261
136252
|
name: name6
|
|
138262
136253
|
});
|
|
138263
136254
|
}, [disabled, name6, control]);
|
|
138264
|
-
return
|
|
136255
|
+
return React.useMemo(() => ({
|
|
138265
136256
|
field,
|
|
138266
136257
|
formState,
|
|
138267
136258
|
fieldState
|
|
@@ -138409,7 +136400,7 @@ function getValidateError(result, ref, type18 = "validate") {
|
|
|
138409
136400
|
}
|
|
138410
136401
|
function createFormControl(props = {}) {
|
|
138411
136402
|
let _options = {
|
|
138412
|
-
...
|
|
136403
|
+
...defaultOptions,
|
|
138413
136404
|
...props
|
|
138414
136405
|
};
|
|
138415
136406
|
let _formState = {
|
|
@@ -139318,9 +137309,9 @@ function createFormControl(props = {}) {
|
|
|
139318
137309
|
};
|
|
139319
137310
|
}
|
|
139320
137311
|
function useForm(props = {}) {
|
|
139321
|
-
const _formControl =
|
|
139322
|
-
const _values =
|
|
139323
|
-
const [formState, updateFormState] =
|
|
137312
|
+
const _formControl = React.useRef(undefined);
|
|
137313
|
+
const _values = React.useRef(undefined);
|
|
137314
|
+
const [formState, updateFormState] = React.useState({
|
|
139324
137315
|
isDirty: false,
|
|
139325
137316
|
isValidating: false,
|
|
139326
137317
|
isLoading: isFunction4(props.defaultValues),
|
|
@@ -139369,8 +137360,8 @@ function useForm(props = {}) {
|
|
|
139369
137360
|
control._formState.isReady = true;
|
|
139370
137361
|
return sub;
|
|
139371
137362
|
}, [control]);
|
|
139372
|
-
|
|
139373
|
-
|
|
137363
|
+
React.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
|
|
137364
|
+
React.useEffect(() => {
|
|
139374
137365
|
if (props.mode) {
|
|
139375
137366
|
control._options.mode = props.mode;
|
|
139376
137367
|
}
|
|
@@ -139378,18 +137369,18 @@ function useForm(props = {}) {
|
|
|
139378
137369
|
control._options.reValidateMode = props.reValidateMode;
|
|
139379
137370
|
}
|
|
139380
137371
|
}, [control, props.mode, props.reValidateMode]);
|
|
139381
|
-
|
|
137372
|
+
React.useEffect(() => {
|
|
139382
137373
|
if (props.errors) {
|
|
139383
137374
|
control._setErrors(props.errors);
|
|
139384
137375
|
control._focusError();
|
|
139385
137376
|
}
|
|
139386
137377
|
}, [control, props.errors]);
|
|
139387
|
-
|
|
137378
|
+
React.useEffect(() => {
|
|
139388
137379
|
props.shouldUnregister && control._subjects.state.next({
|
|
139389
137380
|
values: control._getWatch()
|
|
139390
137381
|
});
|
|
139391
137382
|
}, [control, props.shouldUnregister]);
|
|
139392
|
-
|
|
137383
|
+
React.useEffect(() => {
|
|
139393
137384
|
if (control._proxyFormState.isDirty) {
|
|
139394
137385
|
const isDirty2 = control._getDirty();
|
|
139395
137386
|
if (isDirty2 !== formState.isDirty) {
|
|
@@ -139399,7 +137390,7 @@ function useForm(props = {}) {
|
|
|
139399
137390
|
}
|
|
139400
137391
|
}
|
|
139401
137392
|
}, [control, formState.isDirty]);
|
|
139402
|
-
|
|
137393
|
+
React.useEffect(() => {
|
|
139403
137394
|
var _a2;
|
|
139404
137395
|
if (props.values && !deepEqual(props.values, _values.current)) {
|
|
139405
137396
|
control._reset(props.values, {
|
|
@@ -139415,7 +137406,7 @@ function useForm(props = {}) {
|
|
|
139415
137406
|
control._resetDefaultValues();
|
|
139416
137407
|
}
|
|
139417
137408
|
}, [control, props.values]);
|
|
139418
|
-
|
|
137409
|
+
React.useEffect(() => {
|
|
139419
137410
|
if (!control._state.mount) {
|
|
139420
137411
|
control._setValid();
|
|
139421
137412
|
control._state.mount = true;
|
|
@@ -139426,7 +137417,7 @@ function useForm(props = {}) {
|
|
|
139426
137417
|
}
|
|
139427
137418
|
control._removeUnmounted();
|
|
139428
137419
|
});
|
|
139429
|
-
_formControl.current.formState =
|
|
137420
|
+
_formControl.current.formState = React.useMemo(() => getProxyFormState(formState, control), [control, formState]);
|
|
139430
137421
|
return _formControl.current;
|
|
139431
137422
|
}
|
|
139432
137423
|
var isCheckBoxInput = (element) => element.type === "checkbox", isDateObject3 = (value) => value instanceof Date, isNullOrUndefined = (value) => value == null, isObjectType2 = (value) => typeof value === "object", isObject6 = (value) => !isNullOrUndefined(value) && !Array.isArray(value) && isObjectType2(value) && !isDateObject3(value), getEventValue = (event) => isObject6(event) && event.target ? isCheckBoxInput(event.target) ? event.target.checked : event.target.value : event, getNodeParentName = (name6) => name6.substring(0, name6.search(/\.\d+(\.|$)/)) || name6, isNameInFieldArray = (names, name6) => names.has(getNodeParentName(name6)), isPlainObject5 = (tempObject) => {
|
|
@@ -139456,7 +137447,7 @@ var isCheckBoxInput = (element) => element.type === "checkbox", isDateObject3 =
|
|
|
139456
137447
|
object2[key] = newValue;
|
|
139457
137448
|
object2 = object2[key];
|
|
139458
137449
|
}
|
|
139459
|
-
}, EVENTS, VALIDATION_MODE, INPUT_VALIDATION_RULES, HookFormControlContext, useFormControlContext = () =>
|
|
137450
|
+
}, EVENTS, VALIDATION_MODE, INPUT_VALIDATION_RULES, HookFormControlContext, useFormControlContext = () => React.useContext(HookFormControlContext), getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
|
|
139460
137451
|
const result = {
|
|
139461
137452
|
defaultValues: control._defaultValues
|
|
139462
137453
|
};
|
|
@@ -139483,9 +137474,9 @@ var isCheckBoxInput = (element) => element.type === "checkbox", isDateObject3 =
|
|
|
139483
137474
|
}
|
|
139484
137475
|
isGlobal && (_names.watchAll = true);
|
|
139485
137476
|
return formValues;
|
|
139486
|
-
}, isPrimitive2 = (value) => isNullOrUndefined(value) || !isObjectType2(value), Controller = (props) => props.render(useController(props)), HookFormContext, useFormContext = () =>
|
|
137477
|
+
}, isPrimitive2 = (value) => isNullOrUndefined(value) || !isObjectType2(value), Controller = (props) => props.render(useController(props)), HookFormContext, useFormContext = () => React.useContext(HookFormContext), FormProvider = (props) => {
|
|
139487
137478
|
const { children, watch, getValues, getFieldState, setError, clearErrors, setValue, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe: subscribe2 } = props;
|
|
139488
|
-
return
|
|
137479
|
+
return React.createElement(HookFormContext.Provider, { value: React.useMemo(() => ({
|
|
139489
137480
|
watch,
|
|
139490
137481
|
getValues,
|
|
139491
137482
|
getFieldState,
|
|
@@ -139519,7 +137510,7 @@ var isCheckBoxInput = (element) => element.type === "checkbox", isDateObject3 =
|
|
|
139519
137510
|
trigger,
|
|
139520
137511
|
unregister,
|
|
139521
137512
|
watch
|
|
139522
|
-
]) },
|
|
137513
|
+
]) }, React.createElement(HookFormControlContext.Provider, { value: control }, children));
|
|
139523
137514
|
}, appendErrors = (name6, validateAllFieldCriteria, errors5, type18, message) => validateAllFieldCriteria ? {
|
|
139524
137515
|
...errors5[name6],
|
|
139525
137516
|
types: {
|
|
@@ -139790,7 +137781,7 @@ var isCheckBoxInput = (element) => element.type === "checkbox", isDateObject3 =
|
|
|
139790
137781
|
}
|
|
139791
137782
|
setCustomValidity(true);
|
|
139792
137783
|
return error50;
|
|
139793
|
-
},
|
|
137784
|
+
}, defaultOptions;
|
|
139794
137785
|
var init_index_esm = __esm(() => {
|
|
139795
137786
|
isWeb = typeof window !== "undefined" && typeof window.HTMLElement !== "undefined" && typeof document !== "undefined";
|
|
139796
137787
|
EVENTS = {
|
|
@@ -139814,10 +137805,10 @@ var init_index_esm = __esm(() => {
|
|
|
139814
137805
|
required: "required",
|
|
139815
137806
|
validate: "validate"
|
|
139816
137807
|
};
|
|
139817
|
-
HookFormControlContext =
|
|
137808
|
+
HookFormControlContext = React.createContext(null);
|
|
139818
137809
|
HookFormControlContext.displayName = "HookFormControlContext";
|
|
139819
|
-
useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
139820
|
-
HookFormContext =
|
|
137810
|
+
useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
137811
|
+
HookFormContext = React.createContext(null);
|
|
139821
137812
|
HookFormContext.displayName = "HookFormContext";
|
|
139822
137813
|
defaultResult = {
|
|
139823
137814
|
value: false,
|
|
@@ -139828,7 +137819,7 @@ var init_index_esm = __esm(() => {
|
|
|
139828
137819
|
isValid: false,
|
|
139829
137820
|
value: null
|
|
139830
137821
|
};
|
|
139831
|
-
|
|
137822
|
+
defaultOptions = {
|
|
139832
137823
|
mode: VALIDATION_MODE.onSubmit,
|
|
139833
137824
|
reValidateMode: VALIDATION_MODE.onChange,
|
|
139834
137825
|
shouldFocusError: true
|
|
@@ -141273,13 +139264,13 @@ var require_isBoolean = __commonJS((exports, module) => {
|
|
|
141273
139264
|
function _interopRequireDefault(e3) {
|
|
141274
139265
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
141275
139266
|
}
|
|
141276
|
-
var
|
|
139267
|
+
var defaultOptions2 = {
|
|
141277
139268
|
loose: false
|
|
141278
139269
|
};
|
|
141279
139270
|
var strictBooleans = ["true", "false", "1", "0"];
|
|
141280
139271
|
var looseBooleans = [].concat(strictBooleans, ["yes", "no"]);
|
|
141281
139272
|
function isBoolean5(str) {
|
|
141282
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
139273
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions2;
|
|
141283
139274
|
(0, _assertString.default)(str);
|
|
141284
139275
|
if (options.loose) {
|
|
141285
139276
|
return (0, _includesArray.default)(looseBooleans, str.toLowerCase());
|
|
@@ -145715,7 +143706,7 @@ var require_isStrongPassword = __commonJS((exports, module) => {
|
|
|
145715
143706
|
var lowerCaseRegex = /^[a-z]$/;
|
|
145716
143707
|
var numberRegex = /^[0-9]$/;
|
|
145717
143708
|
var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/;
|
|
145718
|
-
var
|
|
143709
|
+
var defaultOptions2 = {
|
|
145719
143710
|
minLength: 8,
|
|
145720
143711
|
minLowercase: 1,
|
|
145721
143712
|
minUppercase: 1,
|
|
@@ -145786,7 +143777,7 @@ var require_isStrongPassword = __commonJS((exports, module) => {
|
|
|
145786
143777
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
145787
143778
|
(0, _assertString.default)(str);
|
|
145788
143779
|
var analysis = analyzePassword(str);
|
|
145789
|
-
options = (0, _merge.default)(options || {},
|
|
143780
|
+
options = (0, _merge.default)(options || {}, defaultOptions2);
|
|
145790
143781
|
if (options.returnScore) {
|
|
145791
143782
|
return scorePassword(analysis, options);
|
|
145792
143783
|
}
|
|
@@ -146395,7 +144386,7 @@ var init_inputs = __esm(() => {
|
|
|
146395
144386
|
});
|
|
146396
144387
|
|
|
146397
144388
|
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
146398
|
-
import * as
|
|
144389
|
+
import * as React2 from "react";
|
|
146399
144390
|
function setRef(ref, value) {
|
|
146400
144391
|
if (typeof ref === "function") {
|
|
146401
144392
|
return ref(value);
|
|
@@ -146428,12 +144419,12 @@ function composeRefs(...refs) {
|
|
|
146428
144419
|
};
|
|
146429
144420
|
}
|
|
146430
144421
|
function useComposedRefs(...refs) {
|
|
146431
|
-
return
|
|
144422
|
+
return React2.useCallback(composeRefs(...refs), refs);
|
|
146432
144423
|
}
|
|
146433
144424
|
var init_dist4 = () => {};
|
|
146434
144425
|
|
|
146435
144426
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
146436
|
-
import * as
|
|
144427
|
+
import * as React3 from "react";
|
|
146437
144428
|
import { Fragment as Fragment22, jsx } from "react/jsx-runtime";
|
|
146438
144429
|
function isPromiseLike(value) {
|
|
146439
144430
|
return typeof value === "object" && value !== null && "then" in value;
|
|
@@ -146443,25 +144434,25 @@ function isLazyComponent(element) {
|
|
|
146443
144434
|
}
|
|
146444
144435
|
function createSlot(ownerName) {
|
|
146445
144436
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
146446
|
-
const Slot2 =
|
|
144437
|
+
const Slot2 = React3.forwardRef((props, forwardedRef) => {
|
|
146447
144438
|
let { children, ...slotProps } = props;
|
|
146448
144439
|
if (isLazyComponent(children) && typeof use2 === "function") {
|
|
146449
144440
|
children = use2(children._payload);
|
|
146450
144441
|
}
|
|
146451
|
-
const childrenArray =
|
|
144442
|
+
const childrenArray = React3.Children.toArray(children);
|
|
146452
144443
|
const slottable = childrenArray.find(isSlottable);
|
|
146453
144444
|
if (slottable) {
|
|
146454
144445
|
const newElement = slottable.props.children;
|
|
146455
144446
|
const newChildren = childrenArray.map((child) => {
|
|
146456
144447
|
if (child === slottable) {
|
|
146457
|
-
if (
|
|
146458
|
-
return
|
|
146459
|
-
return
|
|
144448
|
+
if (React3.Children.count(newElement) > 1)
|
|
144449
|
+
return React3.Children.only(null);
|
|
144450
|
+
return React3.isValidElement(newElement) ? newElement.props.children : null;
|
|
146460
144451
|
} else {
|
|
146461
144452
|
return child;
|
|
146462
144453
|
}
|
|
146463
144454
|
});
|
|
146464
|
-
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
144455
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, undefined, newChildren) : null });
|
|
146465
144456
|
}
|
|
146466
144457
|
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
146467
144458
|
});
|
|
@@ -146469,26 +144460,26 @@ function createSlot(ownerName) {
|
|
|
146469
144460
|
return Slot2;
|
|
146470
144461
|
}
|
|
146471
144462
|
function createSlotClone(ownerName) {
|
|
146472
|
-
const SlotClone =
|
|
144463
|
+
const SlotClone = React3.forwardRef((props, forwardedRef) => {
|
|
146473
144464
|
let { children, ...slotProps } = props;
|
|
146474
144465
|
if (isLazyComponent(children) && typeof use2 === "function") {
|
|
146475
144466
|
children = use2(children._payload);
|
|
146476
144467
|
}
|
|
146477
|
-
if (
|
|
144468
|
+
if (React3.isValidElement(children)) {
|
|
146478
144469
|
const childrenRef = getElementRef(children);
|
|
146479
144470
|
const props2 = mergeProps2(slotProps, children.props);
|
|
146480
|
-
if (children.type !==
|
|
144471
|
+
if (children.type !== React3.Fragment) {
|
|
146481
144472
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
146482
144473
|
}
|
|
146483
|
-
return
|
|
144474
|
+
return React3.cloneElement(children, props2);
|
|
146484
144475
|
}
|
|
146485
|
-
return
|
|
144476
|
+
return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
|
|
146486
144477
|
});
|
|
146487
144478
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
146488
144479
|
return SlotClone;
|
|
146489
144480
|
}
|
|
146490
144481
|
function isSlottable(child) {
|
|
146491
|
-
return
|
|
144482
|
+
return React3.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
146492
144483
|
}
|
|
146493
144484
|
function mergeProps2(slotProps, childProps) {
|
|
146494
144485
|
const overrideProps = { ...childProps };
|
|
@@ -146531,24 +144522,24 @@ var REACT_LAZY_TYPE, use2, Slot2, SLOTTABLE_IDENTIFIER;
|
|
|
146531
144522
|
var init_dist5 = __esm(() => {
|
|
146532
144523
|
init_dist4();
|
|
146533
144524
|
REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
146534
|
-
use2 =
|
|
144525
|
+
use2 = React3[" use ".trim().toString()];
|
|
146535
144526
|
Slot2 = /* @__PURE__ */ createSlot("Slot");
|
|
146536
144527
|
SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
146537
144528
|
});
|
|
146538
144529
|
|
|
146539
144530
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/context/form-context.js
|
|
146540
|
-
import
|
|
144531
|
+
import React4 from "react";
|
|
146541
144532
|
var FormFieldContext, FormItemContext;
|
|
146542
144533
|
var init_form_context = __esm(() => {
|
|
146543
|
-
FormFieldContext =
|
|
146544
|
-
FormItemContext =
|
|
144534
|
+
FormFieldContext = React4.createContext({});
|
|
144535
|
+
FormItemContext = React4.createContext({});
|
|
146545
144536
|
});
|
|
146546
144537
|
|
|
146547
144538
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/hooks/useFormField.js
|
|
146548
|
-
import
|
|
144539
|
+
import React5 from "react";
|
|
146549
144540
|
var useFormField = () => {
|
|
146550
|
-
const fieldContext =
|
|
146551
|
-
const itemContext =
|
|
144541
|
+
const fieldContext = React5.useContext(FormFieldContext);
|
|
144542
|
+
const itemContext = React5.useContext(FormItemContext);
|
|
146552
144543
|
const { getFieldState, formState } = useFormContext();
|
|
146553
144544
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
146554
144545
|
if (!fieldContext) {
|
|
@@ -146601,7 +144592,7 @@ var init_style = __esm(() => {
|
|
|
146601
144592
|
});
|
|
146602
144593
|
|
|
146603
144594
|
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.4_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_0243fb2db8a1fb85ca77b8d9e5c2d650/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
146604
|
-
import * as
|
|
144595
|
+
import * as React6 from "react";
|
|
146605
144596
|
import * as ReactDOM from "react-dom";
|
|
146606
144597
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
146607
144598
|
var NODES, Primitive;
|
|
@@ -146628,7 +144619,7 @@ var init_dist6 = __esm(() => {
|
|
|
146628
144619
|
];
|
|
146629
144620
|
Primitive = NODES.reduce((primitive, node2) => {
|
|
146630
144621
|
const Slot3 = createSlot(`Primitive.${node2}`);
|
|
146631
|
-
const Node2 =
|
|
144622
|
+
const Node2 = React6.forwardRef((props, forwardedRef) => {
|
|
146632
144623
|
const { asChild, ...primitiveProps } = props;
|
|
146633
144624
|
const Comp = asChild ? Slot3 : node2;
|
|
146634
144625
|
if (typeof window !== "undefined") {
|
|
@@ -146642,13 +144633,13 @@ var init_dist6 = __esm(() => {
|
|
|
146642
144633
|
});
|
|
146643
144634
|
|
|
146644
144635
|
// ../../node_modules/.pnpm/@radix-ui+react-label@2.1.8_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_55fa612a976b7bdfbf4dcdd93d861aab/node_modules/@radix-ui/react-label/dist/index.mjs
|
|
146645
|
-
import * as
|
|
144636
|
+
import * as React7 from "react";
|
|
146646
144637
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
146647
144638
|
var NAME = "Label", Label, Root;
|
|
146648
144639
|
var init_dist7 = __esm(() => {
|
|
146649
144640
|
init_dist6();
|
|
146650
144641
|
"use client";
|
|
146651
|
-
Label =
|
|
144642
|
+
Label = React7.forwardRef((props, forwardedRef) => {
|
|
146652
144643
|
return /* @__PURE__ */ jsx3(Primitive.label, {
|
|
146653
144644
|
...props,
|
|
146654
144645
|
ref: forwardedRef,
|
|
@@ -146737,20 +144728,20 @@ var init_dist8 = __esm(() => {
|
|
|
146737
144728
|
|
|
146738
144729
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/label.js
|
|
146739
144730
|
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
146740
|
-
import * as
|
|
144731
|
+
import * as React8 from "react";
|
|
146741
144732
|
var labelVariants, Label2;
|
|
146742
144733
|
var init_label = __esm(() => {
|
|
146743
144734
|
init_dist7();
|
|
146744
144735
|
init_dist8();
|
|
146745
144736
|
init_style();
|
|
146746
144737
|
labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
146747
|
-
Label2 =
|
|
144738
|
+
Label2 = React8.forwardRef(({ className, ...props }, ref) => _jsx3(Root, { ref, className: cn2(labelVariants(), className), ...props }));
|
|
146748
144739
|
Label2.displayName = Root.displayName;
|
|
146749
144740
|
});
|
|
146750
144741
|
|
|
146751
144742
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/form.js
|
|
146752
144743
|
import { jsx as _jsx4 } from "react/jsx-runtime";
|
|
146753
|
-
import * as
|
|
144744
|
+
import * as React9 from "react";
|
|
146754
144745
|
var Form2, FormField = ({ ...props }) => {
|
|
146755
144746
|
return _jsx4(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx4(Controller, { ...props }) });
|
|
146756
144747
|
}, FormItem, FormLabel, FormControl, FormDescription, FormMessage;
|
|
@@ -146762,27 +144753,27 @@ var init_form = __esm(() => {
|
|
|
146762
144753
|
init_style();
|
|
146763
144754
|
init_label();
|
|
146764
144755
|
Form2 = FormProvider;
|
|
146765
|
-
FormItem =
|
|
146766
|
-
const id =
|
|
144756
|
+
FormItem = React9.forwardRef(({ className, ...props }, ref) => {
|
|
144757
|
+
const id = React9.useId();
|
|
146767
144758
|
return _jsx4(FormItemContext.Provider, { value: { id }, children: _jsx4("div", { ref, className: cn2("", className), ...props }) });
|
|
146768
144759
|
});
|
|
146769
144760
|
FormItem.displayName = "FormItem";
|
|
146770
|
-
FormLabel =
|
|
144761
|
+
FormLabel = React9.forwardRef(({ className, ...props }, ref) => {
|
|
146771
144762
|
const { error: error50, formItemId } = useFormField();
|
|
146772
144763
|
return _jsx4(Label2, { ref, className: cn2(error50 && "text-destructive", className), htmlFor: formItemId, ...props });
|
|
146773
144764
|
});
|
|
146774
144765
|
FormLabel.displayName = "FormLabel";
|
|
146775
|
-
FormControl =
|
|
144766
|
+
FormControl = React9.forwardRef(({ ...props }, ref) => {
|
|
146776
144767
|
const { error: error50, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
146777
144768
|
return _jsx4(Slot2, { ref, id: formItemId, "aria-describedby": !error50 ? formDescriptionId : `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error50, ...props });
|
|
146778
144769
|
});
|
|
146779
144770
|
FormControl.displayName = "FormControl";
|
|
146780
|
-
FormDescription =
|
|
144771
|
+
FormDescription = React9.forwardRef(({ className, ...props }, ref) => {
|
|
146781
144772
|
const { formDescriptionId } = useFormField();
|
|
146782
144773
|
return _jsx4("p", { ref, id: formDescriptionId, className: cn2("text-[0.8rem] text-gray-600", className), ...props });
|
|
146783
144774
|
});
|
|
146784
144775
|
FormDescription.displayName = "FormDescription";
|
|
146785
|
-
FormMessage =
|
|
144776
|
+
FormMessage = React9.forwardRef(({ className, children, ...props }, ref) => {
|
|
146786
144777
|
const { error: error50, formMessageId } = useFormField();
|
|
146787
144778
|
const body = error50 ? String(error50.message) : children;
|
|
146788
144779
|
if (!body) {
|
|
@@ -146795,13 +144786,13 @@ var init_form = __esm(() => {
|
|
|
146795
144786
|
|
|
146796
144787
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/text-area.js
|
|
146797
144788
|
import { jsx as _jsx5 } from "react/jsx-runtime";
|
|
146798
|
-
import * as
|
|
146799
|
-
import { forwardRef as forwardRef7, useImperativeHandle, useRef as
|
|
144789
|
+
import * as React10 from "react";
|
|
144790
|
+
import { forwardRef as forwardRef7, useImperativeHandle, useRef as useRef7, useCallback as useCallback8 } from "react";
|
|
146800
144791
|
var Textarea;
|
|
146801
144792
|
var init_text_area = __esm(() => {
|
|
146802
144793
|
init_style();
|
|
146803
144794
|
Textarea = forwardRef7(({ className, ...props }, ref) => {
|
|
146804
|
-
const textareaRef =
|
|
144795
|
+
const textareaRef = useRef7(null);
|
|
146805
144796
|
const adjustHeight = useCallback8((textarea) => {
|
|
146806
144797
|
textarea.style.height = "auto";
|
|
146807
144798
|
const newHeight = Math.max(textarea.scrollHeight, textarea.offsetHeight);
|
|
@@ -146810,7 +144801,7 @@ var init_text_area = __esm(() => {
|
|
|
146810
144801
|
const handleInput = useCallback8((e3) => {
|
|
146811
144802
|
adjustHeight(e3.currentTarget);
|
|
146812
144803
|
}, [adjustHeight]);
|
|
146813
|
-
|
|
144804
|
+
React10.useEffect(() => {
|
|
146814
144805
|
if (textareaRef.current) {
|
|
146815
144806
|
adjustHeight(textareaRef.current);
|
|
146816
144807
|
}
|
|
@@ -146826,7 +144817,7 @@ var init_text_area = __esm(() => {
|
|
|
146826
144817
|
|
|
146827
144818
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/text-field.js
|
|
146828
144819
|
import { jsx as _jsx6, jsxs as _jsxs } from "react/jsx-runtime";
|
|
146829
|
-
import { forwardRef as forwardRef8, useCallback as useCallback10, useEffect as
|
|
144820
|
+
import { forwardRef as forwardRef8, useCallback as useCallback10, useEffect as useEffect11, useId as useId2, useImperativeHandle as useImperativeHandle2, useRef as useRef9 } from "react";
|
|
146830
144821
|
var TextField;
|
|
146831
144822
|
var init_text_field = __esm(() => {
|
|
146832
144823
|
init_zod2();
|
|
@@ -146837,9 +144828,9 @@ var init_text_field = __esm(() => {
|
|
|
146837
144828
|
init_form();
|
|
146838
144829
|
init_text_area();
|
|
146839
144830
|
TextField = forwardRef8(({ name: name6, value, onSubmit, label, placeholder, unique, className = "", rows = 1, focusOnMount = false, required: required2 = false, allowEmpty = false, shouldReset = false, onChange }, ref) => {
|
|
146840
|
-
const textareaRef =
|
|
144831
|
+
const textareaRef = useRef9(null);
|
|
146841
144832
|
const id = useId2();
|
|
146842
|
-
|
|
144833
|
+
useEffect11(() => {
|
|
146843
144834
|
if (focusOnMount && textareaRef.current) {
|
|
146844
144835
|
textareaRef.current.focus();
|
|
146845
144836
|
}
|
|
@@ -146889,7 +144880,7 @@ var init_text_field = __esm(() => {
|
|
|
146889
144880
|
useImperativeHandle2(ref, () => ({
|
|
146890
144881
|
focus: () => textareaRef.current?.focus()
|
|
146891
144882
|
}));
|
|
146892
|
-
|
|
144883
|
+
useEffect11(() => {
|
|
146893
144884
|
form.reset({ [name6]: value ?? "" });
|
|
146894
144885
|
}, [form, name6, value]);
|
|
146895
144886
|
return _jsx6(Form2, { ...form, children: _jsx6(FormField, { control: form.control, name: name6, render: ({ field }) => _jsxs(FormItem, { className: "grid h-full grid-rows-[auto,1fr] gap-2 overflow-visible", children: [!!label && _jsx6(FormLabel, { htmlFor: name6, className: "text-sm font-medium text-gray-700", children: label }), _jsx6(FormControl, { children: _jsx6(Textarea, { ...field, id, name: name6, ref: (node2) => {
|
|
@@ -147096,10 +145087,10 @@ var init_linting = __esm(() => {
|
|
|
147096
145087
|
|
|
147097
145088
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/operation-description-form.js
|
|
147098
145089
|
import { jsx as _jsx10 } from "react/jsx-runtime";
|
|
147099
|
-
import { useEffect as
|
|
145090
|
+
import { useEffect as useEffect12, useRef as useRef10 } from "react";
|
|
147100
145091
|
function OperationDescriptionForm({ operation, focusOnMount, setOperationDescription }) {
|
|
147101
|
-
const textFieldRef =
|
|
147102
|
-
|
|
145092
|
+
const textFieldRef = useRef10(null);
|
|
145093
|
+
useEffect12(() => {
|
|
147103
145094
|
if (focusOnMount && textFieldRef.current) {
|
|
147104
145095
|
textFieldRef.current.focus();
|
|
147105
145096
|
}
|
|
@@ -147112,9 +145103,9 @@ var init_operation_description_form = __esm(() => {
|
|
|
147112
145103
|
|
|
147113
145104
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/operation-error-form.js
|
|
147114
145105
|
import { jsx as _jsx11 } from "react/jsx-runtime";
|
|
147115
|
-
import { useCallback as useCallback13, useRef as
|
|
145106
|
+
import { useCallback as useCallback13, useRef as useRef11 } from "react";
|
|
147116
145107
|
function OperationErrorForm({ operation, error: error50, focusOnMount, onSubmit, onAddOperationError, deleteOperationError, setOperationErrorName }) {
|
|
147117
|
-
const textFieldRef =
|
|
145108
|
+
const textFieldRef = useRef11(null);
|
|
147118
145109
|
const isEdit = !!error50;
|
|
147119
145110
|
const allOperationErrorNames = operation.errors.map((o3) => o3.name).filter((n5) => n5 !== null);
|
|
147120
145111
|
const handleSubmit = useCallback13((name6) => {
|
|
@@ -147152,10 +145143,10 @@ var init_operation_error_form = __esm(() => {
|
|
|
147152
145143
|
|
|
147153
145144
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/operation-errors.js
|
|
147154
145145
|
import { jsx as _jsx12, jsxs as _jsxs3 } from "react/jsx-runtime";
|
|
147155
|
-
import { useCallback as useCallback14, useId as useId3, useState as
|
|
145146
|
+
import { useCallback as useCallback14, useId as useId3, useState as useState11 } from "react";
|
|
147156
145147
|
function OperationErrors({ operation, addOperationError, deleteOperationError, setOperationErrorName }) {
|
|
147157
145148
|
const addErrorFormId = useId3();
|
|
147158
|
-
const [shouldFocusAddForm, setShouldFocusAddForm] =
|
|
145149
|
+
const [shouldFocusAddForm, setShouldFocusAddForm] = useState11(false);
|
|
147159
145150
|
const onAddOperationError = useCallback14(async (operationId, error50) => {
|
|
147160
145151
|
const errorId = await addOperationError(operationId, error50);
|
|
147161
145152
|
if (errorId) {
|
|
@@ -163138,7 +161129,7 @@ var init_getOperationFacts = __esm(() => {
|
|
|
163138
161129
|
});
|
|
163139
161130
|
|
|
163140
161131
|
// ../../node_modules/.pnpm/graphql-language-service@5.5.0_graphql@16.12.0/node_modules/graphql-language-service/esm/utils/index.js
|
|
163141
|
-
var
|
|
161132
|
+
var init_utils19 = __esm(() => {
|
|
163142
161133
|
init_fragmentDependencies();
|
|
163143
161134
|
init_getVariablesJSONSchema();
|
|
163144
161135
|
init_getASTNodeAtPosition();
|
|
@@ -163149,7 +161140,7 @@ var init_utils20 = __esm(() => {
|
|
|
163149
161140
|
|
|
163150
161141
|
// ../../node_modules/.pnpm/graphql-language-service@5.5.0_graphql@16.12.0/node_modules/graphql-language-service/esm/interface/getDefinition.js
|
|
163151
161142
|
var init_getDefinition = __esm(() => {
|
|
163152
|
-
|
|
161143
|
+
init_utils19();
|
|
163153
161144
|
});
|
|
163154
161145
|
|
|
163155
161146
|
// ../../node_modules/.pnpm/graphql-language-service@5.5.0_graphql@16.12.0/node_modules/graphql-language-service/esm/interface/getDiagnostics.js
|
|
@@ -163251,7 +161242,7 @@ var SEVERITY, DIAGNOSTIC_SEVERITY, invariant3 = (condition, message) => {
|
|
|
163251
161242
|
var init_getDiagnostics = __esm(() => {
|
|
163252
161243
|
init_graphql();
|
|
163253
161244
|
init_parser2();
|
|
163254
|
-
|
|
161245
|
+
init_utils19();
|
|
163255
161246
|
SEVERITY = {
|
|
163256
161247
|
Error: "Error",
|
|
163257
161248
|
Warning: "Warning",
|
|
@@ -163268,7 +161259,7 @@ var init_getDiagnostics = __esm(() => {
|
|
|
163268
161259
|
|
|
163269
161260
|
// ../../node_modules/.pnpm/graphql-language-service@5.5.0_graphql@16.12.0/node_modules/graphql-language-service/esm/interface/getOutline.js
|
|
163270
161261
|
var init_getOutline = __esm(() => {
|
|
163271
|
-
|
|
161262
|
+
init_utils19();
|
|
163272
161263
|
});
|
|
163273
161264
|
|
|
163274
161265
|
// ../../node_modules/.pnpm/graphql-language-service@5.5.0_graphql@16.12.0/node_modules/graphql-language-service/esm/interface/getHoverInformation.js
|
|
@@ -163291,7 +161282,7 @@ var init_esm10 = __esm(() => {
|
|
|
163291
161282
|
init_interface7();
|
|
163292
161283
|
init_parser2();
|
|
163293
161284
|
init_types6();
|
|
163294
|
-
|
|
161285
|
+
init_utils19();
|
|
163295
161286
|
});
|
|
163296
161287
|
|
|
163297
161288
|
// ../../node_modules/.pnpm/@lezer+common@1.5.1/node_modules/@lezer/common/dist/index.js
|
|
@@ -172703,7 +170694,7 @@ var init_dist20 = __esm(() => {
|
|
|
172703
170694
|
|
|
172704
170695
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/code-editors/constants.js
|
|
172705
170696
|
var baseKeymap, baseEditorExtensions;
|
|
172706
|
-
var
|
|
170697
|
+
var init_constants9 = __esm(() => {
|
|
172707
170698
|
init_dist18();
|
|
172708
170699
|
init_dist19();
|
|
172709
170700
|
init_dist15();
|
|
@@ -172794,14 +170785,14 @@ var init_factories = __esm(() => {
|
|
|
172794
170785
|
});
|
|
172795
170786
|
|
|
172796
170787
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/code-editors/hooks.js
|
|
172797
|
-
import { useEffect as
|
|
170788
|
+
import { useEffect as useEffect13, useRef as useRef12 } from "react";
|
|
172798
170789
|
function useEditorRefs() {
|
|
172799
|
-
const editorRef =
|
|
172800
|
-
const viewRef =
|
|
172801
|
-
const updateListenerCompartment =
|
|
172802
|
-
const focusHandlerCompartment =
|
|
172803
|
-
const pasteHandlerCompartment =
|
|
172804
|
-
const timeoutRef =
|
|
170790
|
+
const editorRef = useRef12(null);
|
|
170791
|
+
const viewRef = useRef12(null);
|
|
170792
|
+
const updateListenerCompartment = useRef12(new Compartment);
|
|
170793
|
+
const focusHandlerCompartment = useRef12(new Compartment);
|
|
170794
|
+
const pasteHandlerCompartment = useRef12(new Compartment);
|
|
170795
|
+
const timeoutRef = useRef12(null);
|
|
172805
170796
|
return {
|
|
172806
170797
|
editorRef,
|
|
172807
170798
|
viewRef,
|
|
@@ -172812,7 +170803,7 @@ function useEditorRefs() {
|
|
|
172812
170803
|
};
|
|
172813
170804
|
}
|
|
172814
170805
|
function useEditorCleanup(viewRef) {
|
|
172815
|
-
|
|
170806
|
+
useEffect13(() => {
|
|
172816
170807
|
return () => {
|
|
172817
170808
|
if (viewRef.current) {
|
|
172818
170809
|
viewRef.current.destroy();
|
|
@@ -172822,7 +170813,7 @@ function useEditorCleanup(viewRef) {
|
|
|
172822
170813
|
}, []);
|
|
172823
170814
|
}
|
|
172824
170815
|
function useHandlerReconfiguration(view, readonly4, timeoutRef, updateDocumentInModel, compartments) {
|
|
172825
|
-
|
|
170816
|
+
useEffect13(() => {
|
|
172826
170817
|
if (!view)
|
|
172827
170818
|
return;
|
|
172828
170819
|
view.dispatch({
|
|
@@ -172836,7 +170827,7 @@ function useHandlerReconfiguration(view, readonly4, timeoutRef, updateDocumentIn
|
|
|
172836
170827
|
}, [readonly4, updateDocumentInModel]);
|
|
172837
170828
|
}
|
|
172838
170829
|
function useDocumentSync(view, doc3) {
|
|
172839
|
-
|
|
170830
|
+
useEffect13(() => {
|
|
172840
170831
|
if (!view)
|
|
172841
170832
|
return;
|
|
172842
170833
|
const currentDoc = view.state.doc.toString();
|
|
@@ -180152,7 +178143,7 @@ __export(exports_graphql_editor, {
|
|
|
180152
178143
|
default: () => graphql_editor_default
|
|
180153
178144
|
});
|
|
180154
178145
|
import { jsx as _jsx13 } from "react/jsx-runtime";
|
|
180155
|
-
import { memo
|
|
178146
|
+
import { memo, useEffect as useEffect14, useRef as useRef13 } from "react";
|
|
180156
178147
|
var GraphqlEditor, graphql_editor_default;
|
|
180157
178148
|
var init_graphql_editor = __esm(() => {
|
|
180158
178149
|
init_dist11();
|
|
@@ -180162,17 +178153,17 @@ var init_graphql_editor = __esm(() => {
|
|
|
180162
178153
|
init_graphql();
|
|
180163
178154
|
init_dist17();
|
|
180164
178155
|
init_schema_context();
|
|
180165
|
-
|
|
178156
|
+
init_constants9();
|
|
180166
178157
|
init_factories();
|
|
180167
178158
|
init_hooks();
|
|
180168
178159
|
init_linting2();
|
|
180169
|
-
GraphqlEditor =
|
|
178160
|
+
GraphqlEditor = memo(function GraphqlEditor2(props) {
|
|
180170
178161
|
const { doc: doc3, readonly: readonly4 = false, updateDocumentInModel, customLinter } = props;
|
|
180171
178162
|
const { editorRef, viewRef, updateListenerCompartment, focusHandlerCompartment, pasteHandlerCompartment, timeoutRef } = useEditorRefs();
|
|
180172
|
-
const graphqlCompartment =
|
|
180173
|
-
const linterCompartment =
|
|
178163
|
+
const graphqlCompartment = useRef13(new Compartment);
|
|
178164
|
+
const linterCompartment = useRef13(new Compartment);
|
|
180174
178165
|
const { sharedSchema } = useSchemaContext();
|
|
180175
|
-
|
|
178166
|
+
useEffect14(() => {
|
|
180176
178167
|
if (!viewRef.current) {
|
|
180177
178168
|
const schema18 = buildSchema(sharedSchema);
|
|
180178
178169
|
viewRef.current = new EditorView({
|
|
@@ -180196,7 +178187,7 @@ var init_graphql_editor = __esm(() => {
|
|
|
180196
178187
|
}
|
|
180197
178188
|
}, []);
|
|
180198
178189
|
useEditorCleanup(viewRef);
|
|
180199
|
-
|
|
178190
|
+
useEffect14(() => {
|
|
180200
178191
|
const view = viewRef.current;
|
|
180201
178192
|
if (!view)
|
|
180202
178193
|
return;
|
|
@@ -180253,9 +178244,9 @@ var init_operation = __esm(() => {
|
|
|
180253
178244
|
|
|
180254
178245
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/operations.js
|
|
180255
178246
|
import { jsx as _jsx15, jsxs as _jsxs5 } from "react/jsx-runtime";
|
|
180256
|
-
import { useCallback as useCallback16, useId as useId4, useState as
|
|
178247
|
+
import { useCallback as useCallback16, useId as useId4, useState as useState12 } from "react";
|
|
180257
178248
|
function Operations({ module, allOperations, shouldFocusNewOperation, updateOperationName, deleteOperation, addOperationAndInitialSchema, addOperationError, deleteOperationError, setOperationErrorName, updateOperationSchema, setOperationDescription, toggleNoInputRequired }) {
|
|
180258
|
-
const [lastCreatedOperationId, setLastCreatedOperationId] =
|
|
178249
|
+
const [lastCreatedOperationId, setLastCreatedOperationId] = useState12(null);
|
|
180259
178250
|
const addOperationFormId = useId4();
|
|
180260
178251
|
const allOperationNames = allOperations.map((o3) => o3.name).filter((n5) => n5 !== null);
|
|
180261
178252
|
const onAddOperationAndInitialSchema = useCallback16(async (moduleId, name6) => {
|
|
@@ -180287,10 +178278,10 @@ var init_module = __esm(() => {
|
|
|
180287
178278
|
|
|
180288
178279
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/modules.js
|
|
180289
178280
|
import { jsx as _jsx17, jsxs as _jsxs7 } from "react/jsx-runtime";
|
|
180290
|
-
import { useCallback as useCallback17, useRef as
|
|
178281
|
+
import { useCallback as useCallback17, useRef as useRef14, useState as useState13 } from "react";
|
|
180291
178282
|
function Modules({ modules, allOperations, addModule, updateModuleName, deleteModule, updateOperationName, deleteOperation, addOperationAndInitialSchema, updateOperationSchema, setOperationDescription, addOperationError, deleteOperationError, setOperationErrorName, toggleNoInputRequired }) {
|
|
180292
|
-
const [lastCreatedModuleId, setLastCreatedModuleId] =
|
|
180293
|
-
const focusTrapRef =
|
|
178283
|
+
const [lastCreatedModuleId, setLastCreatedModuleId] = useState13(null);
|
|
178284
|
+
const focusTrapRef = useRef14(null);
|
|
180294
178285
|
const onAddModule = useCallback17(async (name6) => {
|
|
180295
178286
|
const moduleId = await addModule(name6);
|
|
180296
178287
|
if (moduleId) {
|
|
@@ -180371,24 +178362,24 @@ var init_dist21 = __esm(() => {
|
|
|
180371
178362
|
});
|
|
180372
178363
|
|
|
180373
178364
|
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
180374
|
-
import * as
|
|
178365
|
+
import * as React11 from "react";
|
|
180375
178366
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
180376
178367
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
180377
178368
|
let defaultContexts = [];
|
|
180378
178369
|
function createContext3(rootComponentName, defaultContext) {
|
|
180379
|
-
const BaseContext =
|
|
178370
|
+
const BaseContext = React11.createContext(defaultContext);
|
|
180380
178371
|
const index = defaultContexts.length;
|
|
180381
178372
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
180382
178373
|
const Provider = (props) => {
|
|
180383
178374
|
const { scope, children, ...context } = props;
|
|
180384
178375
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
180385
|
-
const value =
|
|
178376
|
+
const value = React11.useMemo(() => context, Object.values(context));
|
|
180386
178377
|
return /* @__PURE__ */ jsx4(Context.Provider, { value, children });
|
|
180387
178378
|
};
|
|
180388
178379
|
Provider.displayName = rootComponentName + "Provider";
|
|
180389
178380
|
function useContext22(consumerName, scope) {
|
|
180390
178381
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
180391
|
-
const context =
|
|
178382
|
+
const context = React11.useContext(Context);
|
|
180392
178383
|
if (context)
|
|
180393
178384
|
return context;
|
|
180394
178385
|
if (defaultContext !== undefined)
|
|
@@ -180399,11 +178390,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
180399
178390
|
}
|
|
180400
178391
|
const createScope = () => {
|
|
180401
178392
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
180402
|
-
return
|
|
178393
|
+
return React11.createContext(defaultContext);
|
|
180403
178394
|
});
|
|
180404
178395
|
return function useScope(scope) {
|
|
180405
178396
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
180406
|
-
return
|
|
178397
|
+
return React11.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
180407
178398
|
};
|
|
180408
178399
|
};
|
|
180409
178400
|
createScope.scopeName = scopeName;
|
|
@@ -180424,7 +178415,7 @@ function composeContextScopes(...scopes) {
|
|
|
180424
178415
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
180425
178416
|
return { ...nextScopes2, ...currentScope };
|
|
180426
178417
|
}, {});
|
|
180427
|
-
return
|
|
178418
|
+
return React11.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
180428
178419
|
};
|
|
180429
178420
|
};
|
|
180430
178421
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -180433,26 +178424,26 @@ function composeContextScopes(...scopes) {
|
|
|
180433
178424
|
var init_dist22 = () => {};
|
|
180434
178425
|
|
|
180435
178426
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
180436
|
-
import * as
|
|
178427
|
+
import * as React12 from "react";
|
|
180437
178428
|
import { Fragment as Fragment23, jsx as jsx5 } from "react/jsx-runtime";
|
|
180438
178429
|
function createSlot2(ownerName) {
|
|
180439
178430
|
const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
180440
|
-
const Slot22 =
|
|
178431
|
+
const Slot22 = React12.forwardRef((props, forwardedRef) => {
|
|
180441
178432
|
const { children, ...slotProps } = props;
|
|
180442
|
-
const childrenArray =
|
|
178433
|
+
const childrenArray = React12.Children.toArray(children);
|
|
180443
178434
|
const slottable = childrenArray.find(isSlottable2);
|
|
180444
178435
|
if (slottable) {
|
|
180445
178436
|
const newElement = slottable.props.children;
|
|
180446
178437
|
const newChildren = childrenArray.map((child) => {
|
|
180447
178438
|
if (child === slottable) {
|
|
180448
|
-
if (
|
|
180449
|
-
return
|
|
180450
|
-
return
|
|
178439
|
+
if (React12.Children.count(newElement) > 1)
|
|
178440
|
+
return React12.Children.only(null);
|
|
178441
|
+
return React12.isValidElement(newElement) ? newElement.props.children : null;
|
|
180451
178442
|
} else {
|
|
180452
178443
|
return child;
|
|
180453
178444
|
}
|
|
180454
178445
|
});
|
|
180455
|
-
return /* @__PURE__ */ jsx5(SlotClone, { ...slotProps, ref: forwardedRef, children:
|
|
178446
|
+
return /* @__PURE__ */ jsx5(SlotClone, { ...slotProps, ref: forwardedRef, children: React12.isValidElement(newElement) ? React12.cloneElement(newElement, undefined, newChildren) : null });
|
|
180456
178447
|
}
|
|
180457
178448
|
return /* @__PURE__ */ jsx5(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
180458
178449
|
});
|
|
@@ -180460,23 +178451,23 @@ function createSlot2(ownerName) {
|
|
|
180460
178451
|
return Slot22;
|
|
180461
178452
|
}
|
|
180462
178453
|
function createSlotClone2(ownerName) {
|
|
180463
|
-
const SlotClone =
|
|
178454
|
+
const SlotClone = React12.forwardRef((props, forwardedRef) => {
|
|
180464
178455
|
const { children, ...slotProps } = props;
|
|
180465
|
-
if (
|
|
178456
|
+
if (React12.isValidElement(children)) {
|
|
180466
178457
|
const childrenRef = getElementRef2(children);
|
|
180467
178458
|
const props2 = mergeProps3(slotProps, children.props);
|
|
180468
|
-
if (children.type !==
|
|
178459
|
+
if (children.type !== React12.Fragment) {
|
|
180469
178460
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
180470
178461
|
}
|
|
180471
|
-
return
|
|
178462
|
+
return React12.cloneElement(children, props2);
|
|
180472
178463
|
}
|
|
180473
|
-
return
|
|
178464
|
+
return React12.Children.count(children) > 1 ? React12.Children.only(null) : null;
|
|
180474
178465
|
});
|
|
180475
178466
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
180476
178467
|
return SlotClone;
|
|
180477
178468
|
}
|
|
180478
178469
|
function isSlottable2(child) {
|
|
180479
|
-
return
|
|
178470
|
+
return React12.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
180480
178471
|
}
|
|
180481
178472
|
function mergeProps3(slotProps, childProps) {
|
|
180482
178473
|
const overrideProps = { ...childProps };
|
|
@@ -180522,7 +178513,7 @@ var init_dist23 = __esm(() => {
|
|
|
180522
178513
|
});
|
|
180523
178514
|
|
|
180524
178515
|
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.14__@types+r_161926fa2509d0b7370b60b8bb4eb8b0/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
180525
|
-
import
|
|
178516
|
+
import React13 from "react";
|
|
180526
178517
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
180527
178518
|
import React22 from "react";
|
|
180528
178519
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
@@ -180532,14 +178523,14 @@ function createCollection(name6) {
|
|
|
180532
178523
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
180533
178524
|
const CollectionProvider = (props) => {
|
|
180534
178525
|
const { scope, children } = props;
|
|
180535
|
-
const ref =
|
|
180536
|
-
const itemMap =
|
|
178526
|
+
const ref = React13.useRef(null);
|
|
178527
|
+
const itemMap = React13.useRef(/* @__PURE__ */ new Map).current;
|
|
180537
178528
|
return /* @__PURE__ */ jsx6(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
180538
178529
|
};
|
|
180539
178530
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
180540
178531
|
const COLLECTION_SLOT_NAME = name6 + "CollectionSlot";
|
|
180541
178532
|
const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);
|
|
180542
|
-
const CollectionSlot =
|
|
178533
|
+
const CollectionSlot = React13.forwardRef((props, forwardedRef) => {
|
|
180543
178534
|
const { scope, children } = props;
|
|
180544
178535
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
180545
178536
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
@@ -180549,12 +178540,12 @@ function createCollection(name6) {
|
|
|
180549
178540
|
const ITEM_SLOT_NAME = name6 + "CollectionItemSlot";
|
|
180550
178541
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
180551
178542
|
const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);
|
|
180552
|
-
const CollectionItemSlot =
|
|
178543
|
+
const CollectionItemSlot = React13.forwardRef((props, forwardedRef) => {
|
|
180553
178544
|
const { scope, children, ...itemData } = props;
|
|
180554
|
-
const ref =
|
|
178545
|
+
const ref = React13.useRef(null);
|
|
180555
178546
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
180556
178547
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
180557
|
-
|
|
178548
|
+
React13.useEffect(() => {
|
|
180558
178549
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
180559
178550
|
return () => void context.itemMap.delete(ref);
|
|
180560
178551
|
});
|
|
@@ -180563,7 +178554,7 @@ function createCollection(name6) {
|
|
|
180563
178554
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
180564
178555
|
function useCollection(scope) {
|
|
180565
178556
|
const context = useCollectionContext(name6 + "CollectionConsumer", scope);
|
|
180566
|
-
const getItems =
|
|
178557
|
+
const getItems = React13.useCallback(() => {
|
|
180567
178558
|
const collectionNode = context.collectionRef.current;
|
|
180568
178559
|
if (!collectionNode)
|
|
180569
178560
|
return [];
|
|
@@ -180890,16 +178881,16 @@ var init_dist24 = __esm(() => {
|
|
|
180890
178881
|
});
|
|
180891
178882
|
|
|
180892
178883
|
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
180893
|
-
import * as
|
|
178884
|
+
import * as React14 from "react";
|
|
180894
178885
|
var useLayoutEffect2;
|
|
180895
178886
|
var init_dist25 = __esm(() => {
|
|
180896
|
-
useLayoutEffect2 = globalThis?.document ?
|
|
178887
|
+
useLayoutEffect2 = globalThis?.document ? React14.useLayoutEffect : () => {};
|
|
180897
178888
|
});
|
|
180898
178889
|
|
|
180899
178890
|
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
180900
|
-
import * as
|
|
178891
|
+
import * as React15 from "react";
|
|
180901
178892
|
function useId5(deterministicId) {
|
|
180902
|
-
const [id, setId] =
|
|
178893
|
+
const [id, setId] = React15.useState(useReactId());
|
|
180903
178894
|
useLayoutEffect2(() => {
|
|
180904
178895
|
if (!deterministicId)
|
|
180905
178896
|
setId((reactId) => reactId ?? String(count2++));
|
|
@@ -180909,13 +178900,13 @@ function useId5(deterministicId) {
|
|
|
180909
178900
|
var useReactId, count2 = 0;
|
|
180910
178901
|
var init_dist26 = __esm(() => {
|
|
180911
178902
|
init_dist25();
|
|
180912
|
-
useReactId =
|
|
178903
|
+
useReactId = React15[" useId ".trim().toString()] || (() => {
|
|
180913
178904
|
return;
|
|
180914
178905
|
});
|
|
180915
178906
|
});
|
|
180916
178907
|
|
|
180917
178908
|
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_1181ea5061ec9212248424669240e4ec/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
180918
|
-
import * as
|
|
178909
|
+
import * as React16 from "react";
|
|
180919
178910
|
import * as ReactDOM2 from "react-dom";
|
|
180920
178911
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
180921
178912
|
var NODES2, Primitive2;
|
|
@@ -180942,7 +178933,7 @@ var init_dist27 = __esm(() => {
|
|
|
180942
178933
|
];
|
|
180943
178934
|
Primitive2 = NODES2.reduce((primitive, node2) => {
|
|
180944
178935
|
const Slot3 = createSlot2(`Primitive.${node2}`);
|
|
180945
|
-
const Node2 =
|
|
178936
|
+
const Node2 = React16.forwardRef((props, forwardedRef) => {
|
|
180946
178937
|
const { asChild, ...primitiveProps } = props;
|
|
180947
178938
|
const Comp = asChild ? Slot3 : node2;
|
|
180948
178939
|
if (typeof window !== "undefined") {
|
|
@@ -180956,19 +178947,19 @@ var init_dist27 = __esm(() => {
|
|
|
180956
178947
|
});
|
|
180957
178948
|
|
|
180958
178949
|
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
180959
|
-
import * as
|
|
178950
|
+
import * as React17 from "react";
|
|
180960
178951
|
function useCallbackRef(callback) {
|
|
180961
|
-
const callbackRef =
|
|
180962
|
-
|
|
178952
|
+
const callbackRef = React17.useRef(callback);
|
|
178953
|
+
React17.useEffect(() => {
|
|
180963
178954
|
callbackRef.current = callback;
|
|
180964
178955
|
});
|
|
180965
|
-
return
|
|
178956
|
+
return React17.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
180966
178957
|
}
|
|
180967
178958
|
var init_dist28 = () => {};
|
|
180968
178959
|
|
|
180969
178960
|
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
178961
|
+
import * as React18 from "react";
|
|
180970
178962
|
import * as React23 from "react";
|
|
180971
|
-
import * as React24 from "react";
|
|
180972
178963
|
function useControllableState({
|
|
180973
178964
|
prop,
|
|
180974
178965
|
defaultProp,
|
|
@@ -180982,8 +178973,8 @@ function useControllableState({
|
|
|
180982
178973
|
const isControlled = prop !== undefined;
|
|
180983
178974
|
const value = isControlled ? prop : uncontrolledProp;
|
|
180984
178975
|
if (true) {
|
|
180985
|
-
const isControlledRef =
|
|
180986
|
-
|
|
178976
|
+
const isControlledRef = React18.useRef(prop !== undefined);
|
|
178977
|
+
React18.useEffect(() => {
|
|
180987
178978
|
const wasControlled = isControlledRef.current;
|
|
180988
178979
|
if (wasControlled !== isControlled) {
|
|
180989
178980
|
const from6 = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -180993,7 +178984,7 @@ function useControllableState({
|
|
|
180993
178984
|
isControlledRef.current = isControlled;
|
|
180994
178985
|
}, [isControlled, caller]);
|
|
180995
178986
|
}
|
|
180996
|
-
const setValue =
|
|
178987
|
+
const setValue = React18.useCallback((nextValue) => {
|
|
180997
178988
|
if (isControlled) {
|
|
180998
178989
|
const value2 = isFunction5(nextValue) ? nextValue(prop) : nextValue;
|
|
180999
178990
|
if (value2 !== prop) {
|
|
@@ -181009,13 +179000,13 @@ function useUncontrolledState({
|
|
|
181009
179000
|
defaultProp,
|
|
181010
179001
|
onChange
|
|
181011
179002
|
}) {
|
|
181012
|
-
const [value, setValue] =
|
|
181013
|
-
const prevValueRef =
|
|
181014
|
-
const onChangeRef =
|
|
179003
|
+
const [value, setValue] = React18.useState(defaultProp);
|
|
179004
|
+
const prevValueRef = React18.useRef(value);
|
|
179005
|
+
const onChangeRef = React18.useRef(onChange);
|
|
181015
179006
|
useInsertionEffect(() => {
|
|
181016
179007
|
onChangeRef.current = onChange;
|
|
181017
179008
|
}, [onChange]);
|
|
181018
|
-
|
|
179009
|
+
React18.useEffect(() => {
|
|
181019
179010
|
if (prevValueRef.current !== value) {
|
|
181020
179011
|
onChangeRef.current?.(value);
|
|
181021
179012
|
prevValueRef.current = value;
|
|
@@ -181029,24 +179020,24 @@ function isFunction5(value) {
|
|
|
181029
179020
|
var useInsertionEffect, SYNC_STATE;
|
|
181030
179021
|
var init_dist29 = __esm(() => {
|
|
181031
179022
|
init_dist25();
|
|
181032
|
-
useInsertionEffect =
|
|
179023
|
+
useInsertionEffect = React18[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
181033
179024
|
SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
181034
179025
|
});
|
|
181035
179026
|
|
|
181036
179027
|
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
181037
|
-
import * as
|
|
179028
|
+
import * as React19 from "react";
|
|
181038
179029
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
181039
179030
|
function useDirection(localDir) {
|
|
181040
|
-
const globalDir =
|
|
179031
|
+
const globalDir = React19.useContext(DirectionContext);
|
|
181041
179032
|
return localDir || globalDir || "ltr";
|
|
181042
179033
|
}
|
|
181043
179034
|
var DirectionContext;
|
|
181044
179035
|
var init_dist30 = __esm(() => {
|
|
181045
|
-
DirectionContext =
|
|
179036
|
+
DirectionContext = React19.createContext(undefined);
|
|
181046
179037
|
});
|
|
181047
179038
|
|
|
181048
179039
|
// ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.14__@type_4eeb29c998b846c35358e2f929e7490e/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
181049
|
-
import * as
|
|
179040
|
+
import * as React20 from "react";
|
|
181050
179041
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
181051
179042
|
function getDirectionAwareKey(key, dir) {
|
|
181052
179043
|
if (dir !== "rtl")
|
|
@@ -181090,11 +179081,11 @@ var init_dist31 = __esm(() => {
|
|
|
181090
179081
|
[Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
|
|
181091
179082
|
[createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(GROUP_NAME, [createCollectionScope]);
|
|
181092
179083
|
[RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
181093
|
-
RovingFocusGroup =
|
|
179084
|
+
RovingFocusGroup = React20.forwardRef((props, forwardedRef) => {
|
|
181094
179085
|
return /* @__PURE__ */ jsx9(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx9(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx9(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
181095
179086
|
});
|
|
181096
179087
|
RovingFocusGroup.displayName = GROUP_NAME;
|
|
181097
|
-
RovingFocusGroupImpl =
|
|
179088
|
+
RovingFocusGroupImpl = React20.forwardRef((props, forwardedRef) => {
|
|
181098
179089
|
const {
|
|
181099
179090
|
__scopeRovingFocusGroup,
|
|
181100
179091
|
orientation,
|
|
@@ -181107,7 +179098,7 @@ var init_dist31 = __esm(() => {
|
|
|
181107
179098
|
preventScrollOnEntryFocus = false,
|
|
181108
179099
|
...groupProps
|
|
181109
179100
|
} = props;
|
|
181110
|
-
const ref =
|
|
179101
|
+
const ref = React20.useRef(null);
|
|
181111
179102
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
181112
179103
|
const direction = useDirection(dir);
|
|
181113
179104
|
const [currentTabStopId, setCurrentTabStopId] = useControllableState({
|
|
@@ -181116,12 +179107,12 @@ var init_dist31 = __esm(() => {
|
|
|
181116
179107
|
onChange: onCurrentTabStopIdChange,
|
|
181117
179108
|
caller: GROUP_NAME
|
|
181118
179109
|
});
|
|
181119
|
-
const [isTabbingBackOut, setIsTabbingBackOut] =
|
|
179110
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React20.useState(false);
|
|
181120
179111
|
const handleEntryFocus = useCallbackRef(onEntryFocus);
|
|
181121
179112
|
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
181122
|
-
const isClickFocusRef =
|
|
181123
|
-
const [focusableItemsCount, setFocusableItemsCount] =
|
|
181124
|
-
|
|
179113
|
+
const isClickFocusRef = React20.useRef(false);
|
|
179114
|
+
const [focusableItemsCount, setFocusableItemsCount] = React20.useState(0);
|
|
179115
|
+
React20.useEffect(() => {
|
|
181125
179116
|
const node2 = ref.current;
|
|
181126
179117
|
if (node2) {
|
|
181127
179118
|
node2.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
@@ -181134,10 +179125,10 @@ var init_dist31 = __esm(() => {
|
|
|
181134
179125
|
dir: direction,
|
|
181135
179126
|
loop,
|
|
181136
179127
|
currentTabStopId,
|
|
181137
|
-
onItemFocus:
|
|
181138
|
-
onItemShiftTab:
|
|
181139
|
-
onFocusableItemAdd:
|
|
181140
|
-
onFocusableItemRemove:
|
|
179128
|
+
onItemFocus: React20.useCallback((tabStopId) => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),
|
|
179129
|
+
onItemShiftTab: React20.useCallback(() => setIsTabbingBackOut(true), []),
|
|
179130
|
+
onFocusableItemAdd: React20.useCallback(() => setFocusableItemsCount((prevCount) => prevCount + 1), []),
|
|
179131
|
+
onFocusableItemRemove: React20.useCallback(() => setFocusableItemsCount((prevCount) => prevCount - 1), []),
|
|
181141
179132
|
children: /* @__PURE__ */ jsx9(Primitive2.div, {
|
|
181142
179133
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
181143
179134
|
"data-orientation": orientation,
|
|
@@ -181167,7 +179158,7 @@ var init_dist31 = __esm(() => {
|
|
|
181167
179158
|
})
|
|
181168
179159
|
});
|
|
181169
179160
|
});
|
|
181170
|
-
RovingFocusGroupItem =
|
|
179161
|
+
RovingFocusGroupItem = React20.forwardRef((props, forwardedRef) => {
|
|
181171
179162
|
const {
|
|
181172
179163
|
__scopeRovingFocusGroup,
|
|
181173
179164
|
focusable = true,
|
|
@@ -181182,7 +179173,7 @@ var init_dist31 = __esm(() => {
|
|
|
181182
179173
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
181183
179174
|
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
181184
179175
|
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
181185
|
-
|
|
179176
|
+
React20.useEffect(() => {
|
|
181186
179177
|
if (focusable) {
|
|
181187
179178
|
onFocusableItemAdd();
|
|
181188
179179
|
return () => onFocusableItemRemove();
|
|
@@ -181250,19 +179241,19 @@ var init_dist31 = __esm(() => {
|
|
|
181250
179241
|
});
|
|
181251
179242
|
|
|
181252
179243
|
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.14__@types+rea_c01c26c80b5ab5e3ecefbda6eca51ad1/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
181253
|
-
import * as
|
|
181254
|
-
import * as
|
|
179244
|
+
import * as React24 from "react";
|
|
179245
|
+
import * as React21 from "react";
|
|
181255
179246
|
function useStateMachine(initialState, machine) {
|
|
181256
|
-
return
|
|
179247
|
+
return React21.useReducer((state, event) => {
|
|
181257
179248
|
const nextState = machine[state][event];
|
|
181258
179249
|
return nextState ?? state;
|
|
181259
179250
|
}, initialState);
|
|
181260
179251
|
}
|
|
181261
179252
|
function usePresence(present) {
|
|
181262
|
-
const [node2, setNode] =
|
|
181263
|
-
const stylesRef =
|
|
181264
|
-
const prevPresentRef =
|
|
181265
|
-
const prevAnimationNameRef =
|
|
179253
|
+
const [node2, setNode] = React24.useState();
|
|
179254
|
+
const stylesRef = React24.useRef(null);
|
|
179255
|
+
const prevPresentRef = React24.useRef(present);
|
|
179256
|
+
const prevAnimationNameRef = React24.useRef("none");
|
|
181266
179257
|
const initialState = present ? "mounted" : "unmounted";
|
|
181267
179258
|
const [state, send] = useStateMachine(initialState, {
|
|
181268
179259
|
mounted: {
|
|
@@ -181277,7 +179268,7 @@ function usePresence(present) {
|
|
|
181277
179268
|
MOUNT: "mounted"
|
|
181278
179269
|
}
|
|
181279
179270
|
});
|
|
181280
|
-
|
|
179271
|
+
React24.useEffect(() => {
|
|
181281
179272
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
181282
179273
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
181283
179274
|
}, [state]);
|
|
@@ -181343,7 +179334,7 @@ function usePresence(present) {
|
|
|
181343
179334
|
}, [node2, send]);
|
|
181344
179335
|
return {
|
|
181345
179336
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
181346
|
-
ref:
|
|
179337
|
+
ref: React24.useCallback((node22) => {
|
|
181347
179338
|
stylesRef.current = node22 ? getComputedStyle(node22) : null;
|
|
181348
179339
|
setNode(node22);
|
|
181349
179340
|
}, [])
|
|
@@ -181368,10 +179359,10 @@ function getElementRef3(element) {
|
|
|
181368
179359
|
var Presence = (props) => {
|
|
181369
179360
|
const { present, children } = props;
|
|
181370
179361
|
const presence = usePresence(present);
|
|
181371
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) :
|
|
179362
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React24.Children.only(children);
|
|
181372
179363
|
const ref = useComposedRefs(presence.ref, getElementRef3(child));
|
|
181373
179364
|
const forceMount = typeof children === "function";
|
|
181374
|
-
return forceMount || presence.isPresent ?
|
|
179365
|
+
return forceMount || presence.isPresent ? React24.cloneElement(child, { ref }) : null;
|
|
181375
179366
|
};
|
|
181376
179367
|
var init_dist32 = __esm(() => {
|
|
181377
179368
|
init_dist4();
|
|
@@ -181381,7 +179372,7 @@ var init_dist32 = __esm(() => {
|
|
|
181381
179372
|
});
|
|
181382
179373
|
|
|
181383
179374
|
// ../../node_modules/.pnpm/@radix-ui+react-tabs@1.1.13_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_2ad0945e3cb98dc5bbfaaf29c105e977/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
181384
|
-
import * as
|
|
179375
|
+
import * as React25 from "react";
|
|
181385
179376
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
181386
179377
|
function makeTriggerId(baseId, value) {
|
|
181387
179378
|
return `${baseId}-trigger-${value}`;
|
|
@@ -181406,7 +179397,7 @@ var init_dist33 = __esm(() => {
|
|
|
181406
179397
|
]);
|
|
181407
179398
|
useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
181408
179399
|
[TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
181409
|
-
Tabs =
|
|
179400
|
+
Tabs = React25.forwardRef((props, forwardedRef) => {
|
|
181410
179401
|
const {
|
|
181411
179402
|
__scopeTabs,
|
|
181412
179403
|
value: valueProp,
|
|
@@ -181441,7 +179432,7 @@ var init_dist33 = __esm(() => {
|
|
|
181441
179432
|
});
|
|
181442
179433
|
});
|
|
181443
179434
|
Tabs.displayName = TABS_NAME;
|
|
181444
|
-
TabsList =
|
|
179435
|
+
TabsList = React25.forwardRef((props, forwardedRef) => {
|
|
181445
179436
|
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
181446
179437
|
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
181447
179438
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
@@ -181460,7 +179451,7 @@ var init_dist33 = __esm(() => {
|
|
|
181460
179451
|
});
|
|
181461
179452
|
});
|
|
181462
179453
|
TabsList.displayName = TAB_LIST_NAME;
|
|
181463
|
-
TabsTrigger =
|
|
179454
|
+
TabsTrigger = React25.forwardRef((props, forwardedRef) => {
|
|
181464
179455
|
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
181465
179456
|
const context = useTabsContext(TRIGGER_NAME, __scopeTabs);
|
|
181466
179457
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
@@ -181504,14 +179495,14 @@ var init_dist33 = __esm(() => {
|
|
|
181504
179495
|
});
|
|
181505
179496
|
});
|
|
181506
179497
|
TabsTrigger.displayName = TRIGGER_NAME;
|
|
181507
|
-
TabsContent =
|
|
179498
|
+
TabsContent = React25.forwardRef((props, forwardedRef) => {
|
|
181508
179499
|
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
181509
179500
|
const context = useTabsContext(CONTENT_NAME, __scopeTabs);
|
|
181510
179501
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
181511
179502
|
const contentId = makeContentId(context.baseId, value);
|
|
181512
179503
|
const isSelected = value === context.value;
|
|
181513
|
-
const isMountAnimationPreventedRef =
|
|
181514
|
-
|
|
179504
|
+
const isMountAnimationPreventedRef = React25.useRef(isSelected);
|
|
179505
|
+
React25.useEffect(() => {
|
|
181515
179506
|
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
181516
179507
|
return () => cancelAnimationFrame(rAF);
|
|
181517
179508
|
}, []);
|
|
@@ -181541,17 +179532,17 @@ var init_dist33 = __esm(() => {
|
|
|
181541
179532
|
|
|
181542
179533
|
// ../../packages/powerhouse-vetra-packages/dist/editors/document-model-editor/components/tabs.js
|
|
181543
179534
|
import { jsx as _jsx20 } from "react/jsx-runtime";
|
|
181544
|
-
import * as
|
|
179535
|
+
import * as React27 from "react";
|
|
181545
179536
|
var Tabs2, TabsList2, TabsTrigger2, TabsContent2;
|
|
181546
179537
|
var init_tabs = __esm(() => {
|
|
181547
179538
|
init_dist33();
|
|
181548
179539
|
init_style();
|
|
181549
179540
|
Tabs2 = Root22;
|
|
181550
|
-
TabsList2 =
|
|
179541
|
+
TabsList2 = React27.forwardRef(({ className, ...props }, ref) => _jsx20(List, { ref, className: cn2("flex items-center justify-center rounded-xl bg-slate-50 p-1 shadow-[inset_0px_0px_2px_rgba(255,255,255,0.50)]", className), ...props }));
|
|
181551
179542
|
TabsList2.displayName = List.displayName;
|
|
181552
|
-
TabsTrigger2 =
|
|
179543
|
+
TabsTrigger2 = React27.forwardRef(({ className, ...props }, ref) => _jsx20(Trigger, { ref, className: cn2("flex w-full items-center justify-center whitespace-nowrap rounded-lg p-1 text-sm text-gray-500 transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-gray-50 data-[state=active]:text-gray-800 data-[state=active]:shadow-[0px_16px_16px_-4px_rgba(0,0,0,0.10)]", className), ...props }));
|
|
181553
179544
|
TabsTrigger2.displayName = Trigger.displayName;
|
|
181554
|
-
TabsContent2 =
|
|
179545
|
+
TabsContent2 = React27.forwardRef(({ className, ...props }, ref) => _jsx20(Content, { ref, className: cn2("", className), ...props }));
|
|
181555
179546
|
TabsContent2.displayName = Content.displayName;
|
|
181556
179547
|
});
|
|
181557
179548
|
|
|
@@ -181649,7 +179640,7 @@ __export(exports_json_editor, {
|
|
|
181649
179640
|
default: () => json_editor_default
|
|
181650
179641
|
});
|
|
181651
179642
|
import { jsx as _jsx21 } from "react/jsx-runtime";
|
|
181652
|
-
import { memo as
|
|
179643
|
+
import { memo as memo2, useEffect as useEffect21 } from "react";
|
|
181653
179644
|
var JSONEditor, json_editor_default;
|
|
181654
179645
|
var init_json_editor = __esm(() => {
|
|
181655
179646
|
init_dist35();
|
|
@@ -181657,13 +179648,13 @@ var init_json_editor = __esm(() => {
|
|
|
181657
179648
|
init_dist9();
|
|
181658
179649
|
init_dist10();
|
|
181659
179650
|
init_dist17();
|
|
181660
|
-
|
|
179651
|
+
init_constants9();
|
|
181661
179652
|
init_factories();
|
|
181662
179653
|
init_hooks();
|
|
181663
|
-
JSONEditor =
|
|
179654
|
+
JSONEditor = memo2(function JSONEditor2(props) {
|
|
181664
179655
|
const { doc: doc3, readonly: readonly4 = false, updateDocumentInModel } = props;
|
|
181665
179656
|
const { editorRef, viewRef, updateListenerCompartment, focusHandlerCompartment, pasteHandlerCompartment, timeoutRef } = useEditorRefs();
|
|
181666
|
-
|
|
179657
|
+
useEffect21(() => {
|
|
181667
179658
|
if (!viewRef.current) {
|
|
181668
179659
|
viewRef.current = new EditorView({
|
|
181669
179660
|
state: EditorState.create({
|
|
@@ -181706,11 +179697,11 @@ __export(exports_state_schemas, {
|
|
|
181706
179697
|
import { jsxs as _jsxs9, jsx as _jsx22 } from "react/jsx-runtime";
|
|
181707
179698
|
import { cn as cn3 } from "@powerhousedao/design-system";
|
|
181708
179699
|
import { Checkbox } from "@powerhousedao/design-system/ui/components/checkbox/checkbox.js";
|
|
181709
|
-
import { lazy as lazy3, Suspense as Suspense2, useCallback as useCallback21, useEffect as
|
|
179700
|
+
import { lazy as lazy3, Suspense as Suspense2, useCallback as useCallback21, useEffect as useEffect22, useMemo as useMemo8, useRef as useRef21, useState as useState18 } from "react";
|
|
181710
179701
|
function StateEditor({ modelName, stateSchema, initialValue, setStateSchema, setInitialState, scope }) {
|
|
181711
179702
|
const { sharedSchema: sharedSchemaSdl, error: sharedSchemaError } = useSchemaContext();
|
|
181712
|
-
const [showStandardLib, setShowStandardLib] =
|
|
181713
|
-
const [syncWithSchema, setSyncWithSchema] =
|
|
179703
|
+
const [showStandardLib, setShowStandardLib] = useState18(false);
|
|
179704
|
+
const [syncWithSchema, setSyncWithSchema] = useState18(true);
|
|
181714
179705
|
const customLinter = useCallback21((doc3) => ensureValidStateSchemaName(doc3, modelName, scope), [modelName, scope]);
|
|
181715
179706
|
const schemaErrors = useMemo8(() => {
|
|
181716
179707
|
const errors5 = ensureValidStateSchemaName(stateSchema, modelName, scope);
|
|
@@ -181724,7 +179715,7 @@ function StateEditor({ modelName, stateSchema, initialValue, setStateSchema, set
|
|
|
181724
179715
|
}, []);
|
|
181725
179716
|
const handleSchemaUpdate = useCallback21((newDoc) => setStateSchema(newDoc, scope), [setStateSchema, scope]);
|
|
181726
179717
|
const handleInitialStateUpdate = useCallback21((newDoc) => setInitialState(newDoc, scope), [setInitialState, scope]);
|
|
181727
|
-
const hasSyncedRef =
|
|
179718
|
+
const hasSyncedRef = useRef21(false);
|
|
181728
179719
|
const { initialValueErrors, fixedState } = useMemo8(() => {
|
|
181729
179720
|
const existingValue = initialValue || "{}";
|
|
181730
179721
|
const sharedSchemaDocumentNode = safeParseSdl(sharedSchemaSdl);
|
|
@@ -181749,7 +179740,7 @@ function StateEditor({ modelName, stateSchema, initialValue, setStateSchema, set
|
|
|
181749
179740
|
}
|
|
181750
179741
|
return { initialValueErrors: errors5, fixedState: null };
|
|
181751
179742
|
}, [sharedSchemaSdl, initialValue, syncWithSchema, scope, modelName]);
|
|
181752
|
-
|
|
179743
|
+
useEffect22(() => {
|
|
181753
179744
|
if (fixedState && !hasSyncedRef.current) {
|
|
181754
179745
|
hasSyncedRef.current = true;
|
|
181755
179746
|
setInitialState(fixedState, scope);
|
|
@@ -181790,18 +179781,18 @@ import { jsx as _jsx23, jsxs as _jsxs10 } from "react/jsx-runtime";
|
|
|
181790
179781
|
import { DocumentToolbar } from "@powerhousedao/design-system/connect";
|
|
181791
179782
|
import { addModule, addOperation, addOperationError, deleteModule, deleteOperation, deleteOperationError, setAuthorName, setAuthorWebsite, setInitialState, setModelDescription, setModelExtension, setModelId, setModelName, setModuleName, setOperationDescription, setOperationErrorName, setOperationName, setOperationSchema, setStateSchema } from "document-model";
|
|
181792
179783
|
import { generateId as generateId3 } from "document-model/core";
|
|
181793
|
-
import { lazy as lazy4, Suspense as Suspense3, useEffect as
|
|
179784
|
+
import { lazy as lazy4, Suspense as Suspense3, useEffect as useEffect23, useRef as useRef22, useState as useState19 } from "react";
|
|
181794
179785
|
function Editor() {
|
|
181795
179786
|
useSetPHDocumentEditorConfig(editorConfig);
|
|
181796
179787
|
const toast3 = usePHToast();
|
|
181797
179788
|
const [document2, dispatch] = useSelectedDocumentModelDocument();
|
|
181798
|
-
const [scope, setScope] =
|
|
179789
|
+
const [scope, setScope] = useState19("global");
|
|
181799
179790
|
const documentNodeName = document2.header.name;
|
|
181800
179791
|
const { name: modelName, id: documentType, extension, description, author: { name: authorName, website: authorWebsite } } = document2.state.global;
|
|
181801
179792
|
const { state: { global: { schema: globalStateSchema, initialValue: globalStateInitialValue }, local: { schema: localStateSchema, initialValue: localStateInitialValue } }, modules } = document2.state.global.specifications[0];
|
|
181802
179793
|
const operations = modules.flatMap((module) => module.operations);
|
|
181803
|
-
const shouldSetInitialName =
|
|
181804
|
-
|
|
179794
|
+
const shouldSetInitialName = useRef22(!modelName && !!documentNodeName && operations.length === 0);
|
|
179795
|
+
useEffect23(() => {
|
|
181805
179796
|
if (!shouldSetInitialName.current || !documentNodeName)
|
|
181806
179797
|
return;
|
|
181807
179798
|
const initialSchemaDoc2 = initializeModelSchema(documentNodeName);
|
|
@@ -182035,7 +180026,7 @@ var init_create_document = __esm(() => {
|
|
|
182035
180026
|
});
|
|
182036
180027
|
|
|
182037
180028
|
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.13.19/node_modules/@tanstack/virtual-core/dist/esm/utils.js
|
|
182038
|
-
function
|
|
180029
|
+
function memo3(getDeps, fn, opts) {
|
|
182039
180030
|
let deps = opts.initialDeps ?? [];
|
|
182040
180031
|
let result;
|
|
182041
180032
|
let isInitial = true;
|
|
@@ -182095,7 +180086,7 @@ var approxEqual = (a3, b2) => Math.abs(a3 - b2) < 1.01, debounce3 = (targetWindo
|
|
|
182095
180086
|
timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms);
|
|
182096
180087
|
};
|
|
182097
180088
|
};
|
|
182098
|
-
var
|
|
180089
|
+
var init_utils20 = () => {};
|
|
182099
180090
|
|
|
182100
180091
|
// ../../node_modules/.pnpm/@tanstack+virtual-core@3.13.19/node_modules/@tanstack/virtual-core/dist/esm/index.js
|
|
182101
180092
|
class Virtualizer {
|
|
@@ -182188,7 +180179,7 @@ class Virtualizer {
|
|
|
182188
180179
|
var _a3, _b;
|
|
182189
180180
|
(_b = (_a3 = this.options).onChange) == null || _b.call(_a3, this, sync);
|
|
182190
180181
|
};
|
|
182191
|
-
this.maybeNotify =
|
|
180182
|
+
this.maybeNotify = memo3(() => {
|
|
182192
180183
|
this.calculateRange();
|
|
182193
180184
|
return [
|
|
182194
180185
|
this.isScrolling,
|
|
@@ -182294,7 +180285,7 @@ class Virtualizer {
|
|
|
182294
180285
|
return a3.end - b2.end;
|
|
182295
180286
|
})[0] : undefined;
|
|
182296
180287
|
};
|
|
182297
|
-
this.getMeasurementOptions =
|
|
180288
|
+
this.getMeasurementOptions = memo3(() => [
|
|
182298
180289
|
this.options.count,
|
|
182299
180290
|
this.options.paddingStart,
|
|
182300
180291
|
this.options.scrollMargin,
|
|
@@ -182319,7 +180310,7 @@ class Virtualizer {
|
|
|
182319
180310
|
}, {
|
|
182320
180311
|
key: false
|
|
182321
180312
|
});
|
|
182322
|
-
this.getMeasurements =
|
|
180313
|
+
this.getMeasurements = memo3(() => [this.getMeasurementOptions(), this.itemSizeCache], ({ count: count3, paddingStart, scrollMargin, getItemKey, enabled, lanes }, itemSizeCache) => {
|
|
182323
180314
|
if (!enabled) {
|
|
182324
180315
|
this.measurementsCache = [];
|
|
182325
180316
|
this.itemSizeCache.clear();
|
|
@@ -182397,7 +180388,7 @@ class Virtualizer {
|
|
|
182397
180388
|
key: "getMeasurements",
|
|
182398
180389
|
debug: () => this.options.debug
|
|
182399
180390
|
});
|
|
182400
|
-
this.calculateRange =
|
|
180391
|
+
this.calculateRange = memo3(() => [
|
|
182401
180392
|
this.getMeasurements(),
|
|
182402
180393
|
this.getSize(),
|
|
182403
180394
|
this.getScrollOffset(),
|
|
@@ -182413,7 +180404,7 @@ class Virtualizer {
|
|
|
182413
180404
|
key: "calculateRange",
|
|
182414
180405
|
debug: () => this.options.debug
|
|
182415
180406
|
});
|
|
182416
|
-
this.getVirtualIndexes =
|
|
180407
|
+
this.getVirtualIndexes = memo3(() => {
|
|
182417
180408
|
let startIndex = null;
|
|
182418
180409
|
let endIndex = null;
|
|
182419
180410
|
const range = this.calculateRange();
|
|
@@ -182502,7 +180493,7 @@ class Virtualizer {
|
|
|
182502
180493
|
}
|
|
182503
180494
|
this._measureElement(node2, undefined);
|
|
182504
180495
|
};
|
|
182505
|
-
this.getVirtualItems =
|
|
180496
|
+
this.getVirtualItems = memo3(() => [this.getVirtualIndexes(), this.getMeasurements()], (indexes, measurements) => {
|
|
182506
180497
|
const virtualItems = [];
|
|
182507
180498
|
for (let k2 = 0, len = indexes.length;k2 < len; k2++) {
|
|
182508
180499
|
const i5 = indexes[k2];
|
|
@@ -182842,7 +180833,7 @@ var getRect = (element) => {
|
|
|
182842
180833
|
}
|
|
182843
180834
|
};
|
|
182844
180835
|
var init_esm11 = __esm(() => {
|
|
182845
|
-
|
|
180836
|
+
init_utils20();
|
|
182846
180837
|
addEventListenerOptions = {
|
|
182847
180838
|
passive: true
|
|
182848
180839
|
};
|
|
@@ -182850,13 +180841,13 @@ var init_esm11 = __esm(() => {
|
|
|
182850
180841
|
});
|
|
182851
180842
|
|
|
182852
180843
|
// ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.19_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@tanstack/react-virtual/dist/esm/index.js
|
|
182853
|
-
import * as
|
|
180844
|
+
import * as React28 from "react";
|
|
182854
180845
|
import { flushSync as flushSync3 } from "react-dom";
|
|
182855
180846
|
function useVirtualizerBase({
|
|
182856
180847
|
useFlushSync = true,
|
|
182857
180848
|
...options
|
|
182858
180849
|
}) {
|
|
182859
|
-
const rerender =
|
|
180850
|
+
const rerender = React28.useReducer(() => ({}), {})[1];
|
|
182860
180851
|
const resolvedOptions = {
|
|
182861
180852
|
...options,
|
|
182862
180853
|
onChange: (instance2, sync) => {
|
|
@@ -182869,7 +180860,7 @@ function useVirtualizerBase({
|
|
|
182869
180860
|
(_a3 = options.onChange) == null || _a3.call(options, instance2, sync);
|
|
182870
180861
|
}
|
|
182871
180862
|
};
|
|
182872
|
-
const [instance] =
|
|
180863
|
+
const [instance] = React28.useState(() => new Virtualizer(resolvedOptions));
|
|
182873
180864
|
instance.setOptions(resolvedOptions);
|
|
182874
180865
|
useIsomorphicLayoutEffect2(() => {
|
|
182875
180866
|
return instance._didMount();
|
|
@@ -182891,16 +180882,16 @@ var useIsomorphicLayoutEffect2;
|
|
|
182891
180882
|
var init_esm12 = __esm(() => {
|
|
182892
180883
|
init_esm11();
|
|
182893
180884
|
init_esm11();
|
|
182894
|
-
useIsomorphicLayoutEffect2 = typeof document !== "undefined" ?
|
|
180885
|
+
useIsomorphicLayoutEffect2 = typeof document !== "undefined" ? React28.useLayoutEffect : React28.useEffect;
|
|
182895
180886
|
});
|
|
182896
180887
|
|
|
182897
180888
|
// ../../packages/powerhouse-vetra-packages/dist/editors/generic-drive-explorer/components/file-content-view.js
|
|
182898
180889
|
import { jsx as _jsx25 } from "react/jsx-runtime";
|
|
182899
180890
|
import { useWindowSize } from "@powerhousedao/design-system";
|
|
182900
180891
|
import { FileItem } from "@powerhousedao/design-system/connect";
|
|
182901
|
-
import
|
|
180892
|
+
import React29, { useRef as useRef23 } from "react";
|
|
182902
180893
|
function FileContentView() {
|
|
182903
|
-
const parentRef =
|
|
180894
|
+
const parentRef = useRef23(null);
|
|
182904
180895
|
const windowSize = useWindowSize();
|
|
182905
180896
|
const availableWidth = windowSize.innerWidth - USED_SPACE;
|
|
182906
180897
|
const nodes = useNodesInSelectedDriveOrFolder();
|
|
@@ -182954,7 +180945,7 @@ function FileContentView() {
|
|
|
182954
180945
|
height: `${rowVirtualizer.getTotalSize()}px`,
|
|
182955
180946
|
width: `${columnVirtualizer.getTotalSize()}px`,
|
|
182956
180947
|
position: "relative"
|
|
182957
|
-
}, children: rowVirtualizer.getVirtualItems().map((virtualRow) => _jsx25(
|
|
180948
|
+
}, children: rowVirtualizer.getVirtualItems().map((virtualRow) => _jsx25(React29.Fragment, { children: columnVirtualizer.getVirtualItems().map((virtualColumn) => _jsx25("div", { style: {
|
|
182958
180949
|
position: "absolute",
|
|
182959
180950
|
top: 0,
|
|
182960
180951
|
left: 0,
|
|
@@ -183074,15 +181065,15 @@ var init_editors = __esm(() => {
|
|
|
183074
181065
|
import { logger as logger9 } from "document-drive";
|
|
183075
181066
|
import { useSyncExternalStore as useSyncExternalStore5 } from "react";
|
|
183076
181067
|
import { use as use3, useCallback as useCallback22, useSyncExternalStore as useSyncExternalStore22 } from "react";
|
|
183077
|
-
import { useEffect as
|
|
181068
|
+
import { useEffect as useEffect25, useState as useState21, useSyncExternalStore as useSyncExternalStore32 } from "react";
|
|
183078
181069
|
import { logger as logger52 } from "document-drive";
|
|
183079
181070
|
import { logger as logger42 } from "document-drive";
|
|
183080
181071
|
import { logger as logger23 } from "document-drive";
|
|
183081
181072
|
import { logger as logger32 } from "document-drive";
|
|
183082
181073
|
import { buildSignedAction as buildSignedAction2 } from "document-model/core";
|
|
183083
181074
|
import { useSyncExternalStore as useSyncExternalStore42 } from "react";
|
|
183084
|
-
import { useEffect as
|
|
183085
|
-
import { useEffect as useEffect32, useRef as
|
|
181075
|
+
import { useEffect as useEffect26, useState as useState22 } from "react";
|
|
181076
|
+
import { useEffect as useEffect32, useRef as useRef24, useState as useState32 } from "react";
|
|
183086
181077
|
function consumeDidFromUrl2() {
|
|
183087
181078
|
if (typeof window === "undefined")
|
|
183088
181079
|
return;
|
|
@@ -183379,8 +181370,8 @@ class DocumentCache2 {
|
|
|
183379
181370
|
}
|
|
183380
181371
|
function useUser2() {
|
|
183381
181372
|
const renown = useRenown2();
|
|
183382
|
-
const [user, setUser2] =
|
|
183383
|
-
|
|
181373
|
+
const [user, setUser2] = useState21(renown?.user);
|
|
181374
|
+
useEffect25(() => {
|
|
183384
181375
|
setUser2(renown?.user);
|
|
183385
181376
|
if (!renown)
|
|
183386
181377
|
return;
|
|
@@ -183600,7 +181591,7 @@ function setDefaultPHGlobalConfig(config20) {
|
|
|
183600
181591
|
function useConnectionStates2() {
|
|
183601
181592
|
const syncManager = useSync2();
|
|
183602
181593
|
const [states, setStates] = useState32(() => buildSnapshot2(syncManager));
|
|
183603
|
-
const unsubscribesRef =
|
|
181594
|
+
const unsubscribesRef = useRef24([]);
|
|
183604
181595
|
useEffect32(() => {
|
|
183605
181596
|
if (!syncManager)
|
|
183606
181597
|
return;
|
|
@@ -184845,12 +182836,12 @@ var init_connect2 = __esm(() => {
|
|
|
184845
182836
|
function loadGenericDriveExplorerEditorModule() {
|
|
184846
182837
|
const name6 = "Generic Drive Explorer";
|
|
184847
182838
|
const documentTypes = ["powerhouse/document-drive"];
|
|
184848
|
-
const
|
|
182839
|
+
const Component = GenericDriveExplorer.Component;
|
|
184849
182840
|
const vetraEditorModule = {
|
|
184850
182841
|
id: DEFAULT_DRIVE_EDITOR_ID,
|
|
184851
182842
|
name: name6,
|
|
184852
182843
|
documentTypes,
|
|
184853
|
-
Component
|
|
182844
|
+
Component
|
|
184854
182845
|
};
|
|
184855
182846
|
return vetraEditorModule;
|
|
184856
182847
|
}
|
|
@@ -184858,12 +182849,12 @@ function loadDocumentModelEditor() {
|
|
|
184858
182849
|
const name6 = "Document Model Editor";
|
|
184859
182850
|
const id = "document-model-editor-v2";
|
|
184860
182851
|
const documentTypes = ["powerhouse/document-model"];
|
|
184861
|
-
const
|
|
182852
|
+
const Component = DocumentModelEditor.Component;
|
|
184862
182853
|
const vetraEditorModule = {
|
|
184863
182854
|
id,
|
|
184864
182855
|
name: name6,
|
|
184865
182856
|
documentTypes,
|
|
184866
|
-
Component
|
|
182857
|
+
Component
|
|
184867
182858
|
};
|
|
184868
182859
|
return vetraEditorModule;
|
|
184869
182860
|
}
|
|
@@ -186340,8 +184331,8 @@ var init_feature_flags = __esm(() => {
|
|
|
186340
184331
|
});
|
|
186341
184332
|
|
|
186342
184333
|
// ../../packages/shared/dist/processors/constants.js
|
|
186343
|
-
var DEFAULT_ANALYTICS_PROCESSOR_DB_NAME = "analytics-db";
|
|
186344
|
-
var
|
|
184334
|
+
var DEFAULT_RELATIONAL_PROCESSOR_DB_NAME = "relational-db", DEFAULT_ANALYTICS_PROCESSOR_DB_NAME = "analytics-db";
|
|
184335
|
+
var init_constants10 = () => {};
|
|
186345
184336
|
|
|
186346
184337
|
// ../../node_modules/.pnpm/@sindresorhus+fnv1a@3.1.0/node_modules/@sindresorhus/fnv1a/index.js
|
|
186347
184338
|
function fnv1aUint8Array(uint8Array, size) {
|
|
@@ -186448,7 +184439,7 @@ function relationalDbToQueryBuilder2(query) {
|
|
|
186448
184439
|
};
|
|
186449
184440
|
}
|
|
186450
184441
|
var SUPPORTED_SIZES, LOG2_262;
|
|
186451
|
-
var
|
|
184442
|
+
var init_utils21 = __esm(() => {
|
|
186452
184443
|
init_fnv1a();
|
|
186453
184444
|
SUPPORTED_SIZES = [32, 64, 128, 256, 512, 1024];
|
|
186454
184445
|
LOG2_262 = Math.log2(26);
|
|
@@ -186457,15 +184448,15 @@ var init_utils22 = __esm(() => {
|
|
|
186457
184448
|
// ../../packages/shared/dist/processors/relational/types.js
|
|
186458
184449
|
var IS_RELATIONAL_DB_PROCESSOR2;
|
|
186459
184450
|
var init_types7 = __esm(() => {
|
|
186460
|
-
|
|
184451
|
+
init_utils21();
|
|
186461
184452
|
IS_RELATIONAL_DB_PROCESSOR2 = Symbol.for("ph.IS_RELATIONAL_DB_PROCESSOR");
|
|
186462
184453
|
});
|
|
186463
184454
|
|
|
186464
184455
|
// ../../packages/shared/dist/processors/index.js
|
|
186465
184456
|
var init_processors = __esm(() => {
|
|
186466
|
-
|
|
184457
|
+
init_constants10();
|
|
186467
184458
|
init_types7();
|
|
186468
|
-
|
|
184459
|
+
init_utils21();
|
|
186469
184460
|
});
|
|
186470
184461
|
|
|
186471
184462
|
// src/pglite.db.ts
|
|
@@ -186525,11 +184516,11 @@ __export(exports_analytics, {
|
|
|
186525
184516
|
import { PGlite as PGlite3 } from "@electric-sql/pglite";
|
|
186526
184517
|
import { IdbFs, PGlite as PGlite22 } from "@electric-sql/pglite";
|
|
186527
184518
|
import * as React52 from "react";
|
|
186528
|
-
import * as
|
|
184519
|
+
import * as React30 from "react";
|
|
186529
184520
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
186530
|
-
import * as
|
|
184521
|
+
import * as React26 from "react";
|
|
186531
184522
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
186532
|
-
import * as
|
|
184523
|
+
import * as React32 from "react";
|
|
186533
184524
|
import * as React42 from "react";
|
|
186534
184525
|
import * as React62 from "react";
|
|
186535
184526
|
import { childLogger } from "document-drive";
|
|
@@ -203115,7 +201106,7 @@ var __defProp6, __returnValue4 = (v2) => v2, __export4 = (target, all) => {
|
|
|
203115
201106
|
this.#mutationCache.clear();
|
|
203116
201107
|
}
|
|
203117
201108
|
}, QueryClientContext, useQueryClient = (queryClient) => {
|
|
203118
|
-
const client =
|
|
201109
|
+
const client = React30.useContext(QueryClientContext);
|
|
203119
201110
|
if (queryClient) {
|
|
203120
201111
|
return queryClient;
|
|
203121
201112
|
}
|
|
@@ -203127,14 +201118,14 @@ var __defProp6, __returnValue4 = (v2) => v2, __export4 = (target, all) => {
|
|
|
203127
201118
|
client,
|
|
203128
201119
|
children
|
|
203129
201120
|
}) => {
|
|
203130
|
-
|
|
201121
|
+
React30.useEffect(() => {
|
|
203131
201122
|
client.mount();
|
|
203132
201123
|
return () => {
|
|
203133
201124
|
client.unmount();
|
|
203134
201125
|
};
|
|
203135
201126
|
}, [client]);
|
|
203136
201127
|
return /* @__PURE__ */ jsx11(QueryClientContext.Provider, { value: client, children });
|
|
203137
|
-
}, QueryErrorResetBoundaryContext, useQueryErrorResetBoundary = () =>
|
|
201128
|
+
}, QueryErrorResetBoundaryContext, useQueryErrorResetBoundary = () => React26.useContext(QueryErrorResetBoundaryContext), ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
203138
201129
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
203139
201130
|
if (options.suspense || options.experimental_prefetchInRender || throwOnError) {
|
|
203140
201131
|
if (!errorResetBoundary.isReset()) {
|
|
@@ -203142,7 +201133,7 @@ var __defProp6, __returnValue4 = (v2) => v2, __export4 = (target, all) => {
|
|
|
203142
201133
|
}
|
|
203143
201134
|
}
|
|
203144
201135
|
}, useClearResetErrorBoundary = (errorResetBoundary) => {
|
|
203145
|
-
|
|
201136
|
+
React32.useEffect(() => {
|
|
203146
201137
|
errorResetBoundary.clearReset();
|
|
203147
201138
|
}, [errorResetBoundary]);
|
|
203148
201139
|
}, getHasError = ({
|
|
@@ -206895,20 +204886,20 @@ var init_analytics = __esm(() => {
|
|
|
206895
204886
|
});
|
|
206896
204887
|
require__defineProperty = __commonJS22((exports, module) => {
|
|
206897
204888
|
var getNative = require__getNative();
|
|
206898
|
-
var
|
|
204889
|
+
var defineProperty = function() {
|
|
206899
204890
|
try {
|
|
206900
204891
|
var func = getNative(Object, "defineProperty");
|
|
206901
204892
|
func({}, "", {});
|
|
206902
204893
|
return func;
|
|
206903
204894
|
} catch (e3) {}
|
|
206904
204895
|
}();
|
|
206905
|
-
module.exports =
|
|
204896
|
+
module.exports = defineProperty;
|
|
206906
204897
|
});
|
|
206907
204898
|
require__baseAssignValue = __commonJS22((exports, module) => {
|
|
206908
|
-
var
|
|
204899
|
+
var defineProperty = require__defineProperty();
|
|
206909
204900
|
function baseAssignValue(object2, key, value) {
|
|
206910
|
-
if (key == "__proto__" &&
|
|
206911
|
-
|
|
204901
|
+
if (key == "__proto__" && defineProperty) {
|
|
204902
|
+
defineProperty(object2, key, {
|
|
206912
204903
|
configurable: true,
|
|
206913
204904
|
enumerable: true,
|
|
206914
204905
|
value,
|
|
@@ -207802,10 +205793,10 @@ var init_analytics = __esm(() => {
|
|
|
207802
205793
|
});
|
|
207803
205794
|
require__baseSetToString = __commonJS22((exports, module) => {
|
|
207804
205795
|
var constant = require_constant();
|
|
207805
|
-
var
|
|
205796
|
+
var defineProperty = require__defineProperty();
|
|
207806
205797
|
var identity6 = require_identity();
|
|
207807
|
-
var baseSetToString = !
|
|
207808
|
-
return
|
|
205798
|
+
var baseSetToString = !defineProperty ? identity6 : function(func, string4) {
|
|
205799
|
+
return defineProperty(func, "toString", {
|
|
207809
205800
|
configurable: true,
|
|
207810
205801
|
enumerable: false,
|
|
207811
205802
|
value: constant(string4),
|
|
@@ -216570,7 +214561,7 @@ should equal
|
|
|
216570
214561
|
require_define_properties = __commonJS222((exports, module) => {
|
|
216571
214562
|
var keys3 = require_object_keys(), hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol", toStr = Object.prototype.toString, concat4 = Array.prototype.concat, defineDataProperty = require_define_data_property(), isFunction22 = function(fn) {
|
|
216572
214563
|
return typeof fn === "function" && toStr.call(fn) === "[object Function]";
|
|
216573
|
-
}, supportsDescriptors = require_has_property_descriptors()(),
|
|
214564
|
+
}, supportsDescriptors = require_has_property_descriptors()(), defineProperty = function(object2, name6, value, predicate) {
|
|
216574
214565
|
if (name6 in object2) {
|
|
216575
214566
|
if (predicate === true) {
|
|
216576
214567
|
if (object2[name6] === value)
|
|
@@ -216587,7 +214578,7 @@ should equal
|
|
|
216587
214578
|
if (hasSymbols)
|
|
216588
214579
|
props = concat4.call(props, Object.getOwnPropertySymbols(map2));
|
|
216589
214580
|
for (var i22 = 0;i22 < props.length; i22 += 1)
|
|
216590
|
-
|
|
214581
|
+
defineProperty(object2, props[i22], map2[props[i22]], predicates[props[i22]]);
|
|
216591
214582
|
};
|
|
216592
214583
|
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
216593
214584
|
module.exports = defineProperties;
|
|
@@ -216906,11 +214897,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216906
214897
|
var areEq = objEquiv(val1, val2, strict2, aKeys, memos, iterationType);
|
|
216907
214898
|
return memos.val1.delete(val1), memos.val2.delete(val2), areEq;
|
|
216908
214899
|
}
|
|
216909
|
-
function setHasEqualElement(set3, val1, strict2,
|
|
214900
|
+
function setHasEqualElement(set3, val1, strict2, memo4) {
|
|
216910
214901
|
var setValues = arrayFromSet(set3);
|
|
216911
214902
|
for (var i22 = 0;i22 < setValues.length; i22++) {
|
|
216912
214903
|
var val2 = setValues[i22];
|
|
216913
|
-
if (innerDeepEqual(val1, val2, strict2,
|
|
214904
|
+
if (innerDeepEqual(val1, val2, strict2, memo4))
|
|
216914
214905
|
return set3.delete(val2), true;
|
|
216915
214906
|
}
|
|
216916
214907
|
return false;
|
|
@@ -216937,16 +214928,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216937
214928
|
return altValue;
|
|
216938
214929
|
return b2.has(altValue) && !a3.has(altValue);
|
|
216939
214930
|
}
|
|
216940
|
-
function mapMightHaveLoosePrim(a3, b2, prim, item,
|
|
214931
|
+
function mapMightHaveLoosePrim(a3, b2, prim, item, memo4) {
|
|
216941
214932
|
var altValue = findLooseMatchingPrimitives(prim);
|
|
216942
214933
|
if (altValue != null)
|
|
216943
214934
|
return altValue;
|
|
216944
214935
|
var curB = b2.get(altValue);
|
|
216945
|
-
if (curB === undefined && !b2.has(altValue) || !innerDeepEqual(item, curB, false,
|
|
214936
|
+
if (curB === undefined && !b2.has(altValue) || !innerDeepEqual(item, curB, false, memo4))
|
|
216946
214937
|
return false;
|
|
216947
|
-
return !a3.has(altValue) && innerDeepEqual(item, curB, false,
|
|
214938
|
+
return !a3.has(altValue) && innerDeepEqual(item, curB, false, memo4);
|
|
216948
214939
|
}
|
|
216949
|
-
function setEquiv(a3, b2, strict2,
|
|
214940
|
+
function setEquiv(a3, b2, strict2, memo4) {
|
|
216950
214941
|
var set3 = null, aValues = arrayFromSet(a3);
|
|
216951
214942
|
for (var i22 = 0;i22 < aValues.length; i22++) {
|
|
216952
214943
|
var val = aValues[i22];
|
|
@@ -216969,25 +214960,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216969
214960
|
for (var _i = 0;_i < bValues.length; _i++) {
|
|
216970
214961
|
var _val = bValues[_i];
|
|
216971
214962
|
if (_typeof(_val) === "object" && _val !== null) {
|
|
216972
|
-
if (!setHasEqualElement(set3, _val, strict2,
|
|
214963
|
+
if (!setHasEqualElement(set3, _val, strict2, memo4))
|
|
216973
214964
|
return false;
|
|
216974
|
-
} else if (!strict2 && !a3.has(_val) && !setHasEqualElement(set3, _val, strict2,
|
|
214965
|
+
} else if (!strict2 && !a3.has(_val) && !setHasEqualElement(set3, _val, strict2, memo4))
|
|
216975
214966
|
return false;
|
|
216976
214967
|
}
|
|
216977
214968
|
return set3.size === 0;
|
|
216978
214969
|
}
|
|
216979
214970
|
return true;
|
|
216980
214971
|
}
|
|
216981
|
-
function mapHasEqualEntry(set3, map2, key1, item1, strict2,
|
|
214972
|
+
function mapHasEqualEntry(set3, map2, key1, item1, strict2, memo4) {
|
|
216982
214973
|
var setValues = arrayFromSet(set3);
|
|
216983
214974
|
for (var i22 = 0;i22 < setValues.length; i22++) {
|
|
216984
214975
|
var key2 = setValues[i22];
|
|
216985
|
-
if (innerDeepEqual(key1, key2, strict2,
|
|
214976
|
+
if (innerDeepEqual(key1, key2, strict2, memo4) && innerDeepEqual(item1, map2.get(key2), strict2, memo4))
|
|
216986
214977
|
return set3.delete(key2), true;
|
|
216987
214978
|
}
|
|
216988
214979
|
return false;
|
|
216989
214980
|
}
|
|
216990
|
-
function mapEquiv(a3, b2, strict2,
|
|
214981
|
+
function mapEquiv(a3, b2, strict2, memo4) {
|
|
216991
214982
|
var set3 = null, aEntries = arrayFromMap(a3);
|
|
216992
214983
|
for (var i22 = 0;i22 < aEntries.length; i22++) {
|
|
216993
214984
|
var _aEntries$i = _slicedToArray(aEntries[i22], 2), key = _aEntries$i[0], item1 = _aEntries$i[1];
|
|
@@ -216997,10 +214988,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216997
214988
|
set3.add(key);
|
|
216998
214989
|
} else {
|
|
216999
214990
|
var item2 = b2.get(key);
|
|
217000
|
-
if (item2 === undefined && !b2.has(key) || !innerDeepEqual(item1, item2, strict2,
|
|
214991
|
+
if (item2 === undefined && !b2.has(key) || !innerDeepEqual(item1, item2, strict2, memo4)) {
|
|
217001
214992
|
if (strict2)
|
|
217002
214993
|
return false;
|
|
217003
|
-
if (!mapMightHaveLoosePrim(a3, b2, key, item1,
|
|
214994
|
+
if (!mapMightHaveLoosePrim(a3, b2, key, item1, memo4))
|
|
217004
214995
|
return false;
|
|
217005
214996
|
if (set3 === null)
|
|
217006
214997
|
set3 = new Set;
|
|
@@ -217013,9 +215004,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
217013
215004
|
for (var _i2 = 0;_i2 < bEntries.length; _i2++) {
|
|
217014
215005
|
var _bEntries$_i = _slicedToArray(bEntries[_i2], 2), _key = _bEntries$_i[0], item = _bEntries$_i[1];
|
|
217015
215006
|
if (_typeof(_key) === "object" && _key !== null) {
|
|
217016
|
-
if (!mapHasEqualEntry(set3, a3, _key, item, strict2,
|
|
215007
|
+
if (!mapHasEqualEntry(set3, a3, _key, item, strict2, memo4))
|
|
217017
215008
|
return false;
|
|
217018
|
-
} else if (!strict2 && (!a3.has(_key) || !innerDeepEqual(a3.get(_key), item, false,
|
|
215009
|
+
} else if (!strict2 && (!a3.has(_key) || !innerDeepEqual(a3.get(_key), item, false, memo4)) && !mapHasEqualEntry(set3, a3, _key, item, false, memo4))
|
|
217019
215010
|
return false;
|
|
217020
215011
|
}
|
|
217021
215012
|
return set3.size === 0;
|
|
@@ -222366,19 +220357,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
222366
220357
|
}
|
|
222367
220358
|
}
|
|
222368
220359
|
getColumnTypes(columns) {
|
|
222369
|
-
return columns.reduce(function(
|
|
220360
|
+
return columns.reduce(function(memo4, columnSQL) {
|
|
222370
220361
|
const column = columnSQL[0];
|
|
222371
|
-
|
|
222372
|
-
|
|
222373
|
-
return
|
|
220362
|
+
memo4.sql.push(column.sql);
|
|
220363
|
+
memo4.bindings.concat(column.bindings);
|
|
220364
|
+
return memo4;
|
|
222374
220365
|
}, { sql: [], bindings: [] });
|
|
222375
220366
|
}
|
|
222376
220367
|
columnQueries(columns) {
|
|
222377
|
-
const queries = columns.reduce(function(
|
|
220368
|
+
const queries = columns.reduce(function(memo4, columnSQL) {
|
|
222378
220369
|
const column = tail(columnSQL);
|
|
222379
220370
|
if (!isEmpty(column))
|
|
222380
|
-
return
|
|
222381
|
-
return
|
|
220371
|
+
return memo4.concat(column);
|
|
220372
|
+
return memo4;
|
|
222382
220373
|
}, []);
|
|
222383
220374
|
for (const q2 of queries) {
|
|
222384
220375
|
this.pushQuery(q2);
|
|
@@ -251201,8 +249192,8 @@ https://github.com/browserify/crypto-browserify`);
|
|
|
251201
249192
|
});
|
|
251202
249193
|
}
|
|
251203
249194
|
};
|
|
251204
|
-
QueryClientContext =
|
|
251205
|
-
QueryErrorResetBoundaryContext =
|
|
249195
|
+
QueryClientContext = React30.createContext(undefined);
|
|
249196
|
+
QueryErrorResetBoundaryContext = React26.createContext(createValue());
|
|
251206
249197
|
IsRestoringContext = React42.createContext(false);
|
|
251207
249198
|
IsRestoringProvider = IsRestoringContext.Provider;
|
|
251208
249199
|
logger11 = childLogger(["reactor-browser", "analytics", "provider"]);
|
|
@@ -253524,10 +251515,10 @@ var init_reactor2 = __esm(() => {
|
|
|
253524
251515
|
});
|
|
253525
251516
|
|
|
253526
251517
|
// src/store/user.ts
|
|
253527
|
-
import { useEffect as
|
|
251518
|
+
import { useEffect as useEffect33 } from "react";
|
|
253528
251519
|
function useSetSentryUser() {
|
|
253529
251520
|
const user = useUser2();
|
|
253530
|
-
|
|
251521
|
+
useEffect33(() => {
|
|
253531
251522
|
let sentryUser = null;
|
|
253532
251523
|
if (user) {
|
|
253533
251524
|
const { credential, ...rest } = user;
|