@windrun-huaiin/third-ui 5.13.6 → 5.14.1
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/fuma/mdx/index.js +534 -2677
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +533 -2676
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.js +206 -2465
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +203 -2462
- package/dist/fuma/server.mjs.map +1 -1
- package/package.json +1 -1
- package/src/fuma/mdx/mermaid.tsx +115 -21
package/dist/fuma/server.js
CHANGED
|
@@ -903,7 +903,7 @@ var require_acorn = __commonJS({
|
|
|
903
903
|
this.privateNameStack = [];
|
|
904
904
|
};
|
|
905
905
|
var prototypeAccessors2 = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
|
|
906
|
-
Parser3.prototype.parse = function
|
|
906
|
+
Parser3.prototype.parse = function parse5() {
|
|
907
907
|
var node2 = this.options.program || this.startNode();
|
|
908
908
|
this.nextToken();
|
|
909
909
|
return this.parseTopLevel(node2);
|
|
@@ -963,7 +963,7 @@ var require_acorn = __commonJS({
|
|
|
963
963
|
}
|
|
964
964
|
return cls;
|
|
965
965
|
};
|
|
966
|
-
Parser3.parse = function
|
|
966
|
+
Parser3.parse = function parse5(input, options) {
|
|
967
967
|
return new this(options, input).parse();
|
|
968
968
|
};
|
|
969
969
|
Parser3.parseExpressionAt = function parseExpressionAt3(input, pos, options) {
|
|
@@ -3763,7 +3763,7 @@ var require_acorn = __commonJS({
|
|
|
3763
3763
|
}
|
|
3764
3764
|
}
|
|
3765
3765
|
};
|
|
3766
|
-
var
|
|
3766
|
+
var Node3 = function Node4(parser, pos, loc) {
|
|
3767
3767
|
this.type = "";
|
|
3768
3768
|
this.start = pos;
|
|
3769
3769
|
this.end = 0;
|
|
@@ -3779,10 +3779,10 @@ var require_acorn = __commonJS({
|
|
|
3779
3779
|
};
|
|
3780
3780
|
var pp$22 = Parser3.prototype;
|
|
3781
3781
|
pp$22.startNode = function() {
|
|
3782
|
-
return new
|
|
3782
|
+
return new Node3(this, this.start, this.startLoc);
|
|
3783
3783
|
};
|
|
3784
3784
|
pp$22.startNodeAt = function(pos, loc) {
|
|
3785
|
-
return new
|
|
3785
|
+
return new Node3(this, pos, loc);
|
|
3786
3786
|
};
|
|
3787
3787
|
function finishNodeAt2(node2, type, pos, loc) {
|
|
3788
3788
|
node2.type = type;
|
|
@@ -3802,7 +3802,7 @@ var require_acorn = __commonJS({
|
|
|
3802
3802
|
return finishNodeAt2.call(this, node2, type, pos, loc);
|
|
3803
3803
|
};
|
|
3804
3804
|
pp$22.copyNode = function(node2) {
|
|
3805
|
-
var newNode = new
|
|
3805
|
+
var newNode = new Node3(this, node2.start, this.startLoc);
|
|
3806
3806
|
for (var prop in node2) {
|
|
3807
3807
|
newNode[prop] = node2[prop];
|
|
3808
3808
|
}
|
|
@@ -5000,11 +5000,11 @@ var require_acorn = __commonJS({
|
|
|
5000
5000
|
return result;
|
|
5001
5001
|
};
|
|
5002
5002
|
pp$12.regexp_classString = function(state) {
|
|
5003
|
-
var
|
|
5003
|
+
var count = 0;
|
|
5004
5004
|
while (this.regexp_eatClassSetCharacter(state)) {
|
|
5005
|
-
|
|
5005
|
+
count++;
|
|
5006
5006
|
}
|
|
5007
|
-
return
|
|
5007
|
+
return count === 1 ? CharSetOk2 : CharSetString2;
|
|
5008
5008
|
};
|
|
5009
5009
|
pp$12.regexp_eatClassSetCharacter = function(state) {
|
|
5010
5010
|
var start2 = state.pos;
|
|
@@ -6011,7 +6011,7 @@ var require_acorn = __commonJS({
|
|
|
6011
6011
|
Position: Position3,
|
|
6012
6012
|
SourceLocation: SourceLocation3,
|
|
6013
6013
|
getLineInfo: getLineInfo2,
|
|
6014
|
-
Node:
|
|
6014
|
+
Node: Node3,
|
|
6015
6015
|
TokenType: TokenType3,
|
|
6016
6016
|
tokTypes: types$12,
|
|
6017
6017
|
keywordTypes: keywords2,
|
|
@@ -6025,7 +6025,7 @@ var require_acorn = __commonJS({
|
|
|
6025
6025
|
lineBreakG: lineBreakG2,
|
|
6026
6026
|
nonASCIIwhitespace: nonASCIIwhitespace2
|
|
6027
6027
|
};
|
|
6028
|
-
function
|
|
6028
|
+
function parse4(input, options) {
|
|
6029
6029
|
return Parser3.parse(input, options);
|
|
6030
6030
|
}
|
|
6031
6031
|
function parseExpressionAt2(input, pos, options) {
|
|
@@ -6034,7 +6034,7 @@ var require_acorn = __commonJS({
|
|
|
6034
6034
|
function tokenizer2(input, options) {
|
|
6035
6035
|
return Parser3.tokenizer(input, options);
|
|
6036
6036
|
}
|
|
6037
|
-
exports3.Node =
|
|
6037
|
+
exports3.Node = Node3;
|
|
6038
6038
|
exports3.Parser = Parser3;
|
|
6039
6039
|
exports3.Position = Position3;
|
|
6040
6040
|
exports3.SourceLocation = SourceLocation3;
|
|
@@ -6050,7 +6050,7 @@ var require_acorn = __commonJS({
|
|
|
6050
6050
|
exports3.lineBreak = lineBreak2;
|
|
6051
6051
|
exports3.lineBreakG = lineBreakG2;
|
|
6052
6052
|
exports3.nonASCIIwhitespace = nonASCIIwhitespace2;
|
|
6053
|
-
exports3.parse =
|
|
6053
|
+
exports3.parse = parse4;
|
|
6054
6054
|
exports3.parseExpressionAt = parseExpressionAt2;
|
|
6055
6055
|
exports3.tokContexts = types2;
|
|
6056
6056
|
exports3.tokTypes = types$12;
|
|
@@ -6233,12 +6233,12 @@ var require_acorn_jsx = __commonJS({
|
|
|
6233
6233
|
return this.finishToken(tt.string, out);
|
|
6234
6234
|
}
|
|
6235
6235
|
jsx_readEntity() {
|
|
6236
|
-
let str = "",
|
|
6236
|
+
let str = "", count = 0, entity;
|
|
6237
6237
|
let ch = this.input[this.pos];
|
|
6238
6238
|
if (ch !== "&")
|
|
6239
6239
|
this.raise(this.pos, "Entity must start with an ampersand");
|
|
6240
6240
|
let startPos = ++this.pos;
|
|
6241
|
-
while (this.pos < this.input.length &&
|
|
6241
|
+
while (this.pos < this.input.length && count++ < 10) {
|
|
6242
6242
|
ch = this.input[this.pos++];
|
|
6243
6243
|
if (ch === ";") {
|
|
6244
6244
|
if (str[0] === "#") {
|
|
@@ -6592,7 +6592,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
6592
6592
|
|
|
6593
6593
|
// src/fuma/fuma-page-genarator.tsx
|
|
6594
6594
|
var import_page = require("fumadocs-ui/page");
|
|
6595
|
-
var
|
|
6595
|
+
var import_react42 = require("react");
|
|
6596
6596
|
|
|
6597
6597
|
// ../base-ui/src/assets/github.tsx
|
|
6598
6598
|
var import_react = __toESM(require("react"), 1);
|
|
@@ -9233,93 +9233,42 @@ for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS))
|
|
|
9233
9233
|
var wrappedBuiltinIconsPart = tempWrappedBuiltinIcons;
|
|
9234
9234
|
var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart), wrappedBuiltinIconsPart);
|
|
9235
9235
|
|
|
9236
|
-
//
|
|
9237
|
-
var
|
|
9236
|
+
// src/fuma/mdx/mermaid.tsx
|
|
9237
|
+
var import_next_themes = require("next-themes");
|
|
9238
|
+
var import_react35 = require("react");
|
|
9239
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9238
9240
|
|
|
9239
|
-
//
|
|
9240
|
-
var
|
|
9241
|
+
// src/fuma/mdx/image-zoom.tsx
|
|
9242
|
+
var import_framework = require("fumadocs-core/framework");
|
|
9243
|
+
var import_react36 = require("react");
|
|
9244
|
+
var import_react_medium_image_zoom = __toESM(require("react-medium-image-zoom"));
|
|
9245
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
9241
9246
|
|
|
9242
|
-
//
|
|
9243
|
-
var
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
function useContext22(consumerName) {
|
|
9254
|
-
const context = React33.useContext(Context);
|
|
9255
|
-
if (context) return context;
|
|
9256
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
9257
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
9258
|
-
}
|
|
9259
|
-
return [Provider, useContext22];
|
|
9260
|
-
}
|
|
9261
|
-
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
9262
|
-
let defaultContexts = [];
|
|
9263
|
-
function createContext32(rootComponentName, defaultContext) {
|
|
9264
|
-
const BaseContext = React33.createContext(defaultContext);
|
|
9265
|
-
const index2 = defaultContexts.length;
|
|
9266
|
-
defaultContexts = [...defaultContexts, defaultContext];
|
|
9267
|
-
const Provider = (props) => {
|
|
9268
|
-
var _b;
|
|
9269
|
-
const _a = props, { scope, children } = _a, context = __objRest(_a, ["scope", "children"]);
|
|
9270
|
-
const Context = ((_b = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _b[index2]) || BaseContext;
|
|
9271
|
-
const value2 = React33.useMemo(() => context, Object.values(context));
|
|
9272
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Context.Provider, { value: value2, children });
|
|
9273
|
-
};
|
|
9274
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
9275
|
-
function useContext22(consumerName, scope) {
|
|
9276
|
-
var _a;
|
|
9277
|
-
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index2]) || BaseContext;
|
|
9278
|
-
const context = React33.useContext(Context);
|
|
9279
|
-
if (context) return context;
|
|
9280
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
9281
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
9282
|
-
}
|
|
9283
|
-
return [Provider, useContext22];
|
|
9284
|
-
}
|
|
9285
|
-
const createScope = () => {
|
|
9286
|
-
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
9287
|
-
return React33.createContext(defaultContext);
|
|
9288
|
-
});
|
|
9289
|
-
return function useScope(scope) {
|
|
9290
|
-
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
9291
|
-
return React33.useMemo(
|
|
9292
|
-
() => ({ [`__scope${scopeName}`]: __spreadProps(__spreadValues({}, scope), { [scopeName]: contexts }) }),
|
|
9293
|
-
[scope, contexts]
|
|
9294
|
-
);
|
|
9295
|
-
};
|
|
9296
|
-
};
|
|
9297
|
-
createScope.scopeName = scopeName;
|
|
9298
|
-
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
9299
|
-
}
|
|
9300
|
-
function composeContextScopes(...scopes) {
|
|
9301
|
-
const baseScope = scopes[0];
|
|
9302
|
-
if (scopes.length === 1) return baseScope;
|
|
9303
|
-
const createScope = () => {
|
|
9304
|
-
const scopeHooks = scopes.map((createScope2) => ({
|
|
9305
|
-
useScope: createScope2(),
|
|
9306
|
-
scopeName: createScope2.scopeName
|
|
9307
|
-
}));
|
|
9308
|
-
return function useComposedScopes(overrideScopes) {
|
|
9309
|
-
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
9310
|
-
const scopeProps = useScope(overrideScopes);
|
|
9311
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
9312
|
-
return __spreadValues(__spreadValues({}, nextScopes2), currentScope);
|
|
9313
|
-
}, {});
|
|
9314
|
-
return React33.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
9315
|
-
};
|
|
9316
|
-
};
|
|
9317
|
-
createScope.scopeName = baseScope.scopeName;
|
|
9318
|
-
return createScope;
|
|
9247
|
+
// src/fuma/mdx/trophy-card.tsx
|
|
9248
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
9249
|
+
|
|
9250
|
+
// src/fuma/mdx/image-grid.tsx
|
|
9251
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
9252
|
+
|
|
9253
|
+
// ../lib/src/utils.ts
|
|
9254
|
+
var import_clsx = require("clsx");
|
|
9255
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
9256
|
+
function cn(...inputs) {
|
|
9257
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
9319
9258
|
}
|
|
9320
9259
|
|
|
9321
|
-
//
|
|
9260
|
+
// src/fuma/mdx/zia-card.tsx
|
|
9261
|
+
var import_link2 = __toESM(require("next/link"));
|
|
9262
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
9263
|
+
|
|
9264
|
+
// ../base-ui/src/ui/button.tsx
|
|
9265
|
+
var React35 = __toESM(require("react"), 1);
|
|
9266
|
+
|
|
9267
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
9322
9268
|
var React34 = __toESM(require("react"), 1);
|
|
9269
|
+
|
|
9270
|
+
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
9271
|
+
var React33 = __toESM(require("react"), 1);
|
|
9323
9272
|
function setRef(ref2, value2) {
|
|
9324
9273
|
if (typeof ref2 === "function") {
|
|
9325
9274
|
return ref2(value2);
|
|
@@ -9351,177 +9300,54 @@ function composeRefs(...refs) {
|
|
|
9351
9300
|
}
|
|
9352
9301
|
};
|
|
9353
9302
|
}
|
|
9354
|
-
function useComposedRefs(...refs) {
|
|
9355
|
-
return React34.useCallback(composeRefs(...refs), refs);
|
|
9356
|
-
}
|
|
9357
|
-
|
|
9358
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
9359
|
-
var React54 = __toESM(require("react"), 1);
|
|
9360
|
-
|
|
9361
|
-
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
9362
|
-
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9363
|
-
return function handleEvent(event) {
|
|
9364
|
-
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
|
9365
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
9366
|
-
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
|
9367
|
-
}
|
|
9368
|
-
};
|
|
9369
|
-
}
|
|
9370
|
-
|
|
9371
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
9372
|
-
var React36 = __toESM(require("react"), 1);
|
|
9373
|
-
|
|
9374
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
9375
|
-
var React35 = __toESM(require("react"), 1);
|
|
9376
|
-
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? React35.useLayoutEffect : () => {
|
|
9377
|
-
};
|
|
9378
|
-
|
|
9379
|
-
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
9380
|
-
var useReactId = React36[" useId ".trim().toString()] || (() => void 0);
|
|
9381
|
-
var count = 0;
|
|
9382
|
-
function useId(deterministicId) {
|
|
9383
|
-
const [id, setId] = React36.useState(useReactId());
|
|
9384
|
-
useLayoutEffect2(() => {
|
|
9385
|
-
if (!deterministicId) setId((reactId) => reactId != null ? reactId : String(count++));
|
|
9386
|
-
}, [deterministicId]);
|
|
9387
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
9388
|
-
}
|
|
9389
|
-
|
|
9390
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
9391
|
-
var React37 = __toESM(require("react"), 1);
|
|
9392
|
-
var React210 = __toESM(require("react"), 1);
|
|
9393
|
-
var useInsertionEffect = React37[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
9394
|
-
function useControllableState({
|
|
9395
|
-
prop,
|
|
9396
|
-
defaultProp,
|
|
9397
|
-
onChange = () => {
|
|
9398
|
-
},
|
|
9399
|
-
caller
|
|
9400
|
-
}) {
|
|
9401
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
9402
|
-
defaultProp,
|
|
9403
|
-
onChange
|
|
9404
|
-
});
|
|
9405
|
-
const isControlled = prop !== void 0;
|
|
9406
|
-
const value2 = isControlled ? prop : uncontrolledProp;
|
|
9407
|
-
if (true) {
|
|
9408
|
-
const isControlledRef = React37.useRef(prop !== void 0);
|
|
9409
|
-
React37.useEffect(() => {
|
|
9410
|
-
const wasControlled = isControlledRef.current;
|
|
9411
|
-
if (wasControlled !== isControlled) {
|
|
9412
|
-
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
9413
|
-
const to = isControlled ? "controlled" : "uncontrolled";
|
|
9414
|
-
console.warn(
|
|
9415
|
-
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
9416
|
-
);
|
|
9417
|
-
}
|
|
9418
|
-
isControlledRef.current = isControlled;
|
|
9419
|
-
}, [isControlled, caller]);
|
|
9420
|
-
}
|
|
9421
|
-
const setValue = React37.useCallback(
|
|
9422
|
-
(nextValue) => {
|
|
9423
|
-
var _a;
|
|
9424
|
-
if (isControlled) {
|
|
9425
|
-
const value22 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
9426
|
-
if (value22 !== prop) {
|
|
9427
|
-
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value22);
|
|
9428
|
-
}
|
|
9429
|
-
} else {
|
|
9430
|
-
setUncontrolledProp(nextValue);
|
|
9431
|
-
}
|
|
9432
|
-
},
|
|
9433
|
-
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
9434
|
-
);
|
|
9435
|
-
return [value2, setValue];
|
|
9436
|
-
}
|
|
9437
|
-
function useUncontrolledState({
|
|
9438
|
-
defaultProp,
|
|
9439
|
-
onChange
|
|
9440
|
-
}) {
|
|
9441
|
-
const [value2, setValue] = React37.useState(defaultProp);
|
|
9442
|
-
const prevValueRef = React37.useRef(value2);
|
|
9443
|
-
const onChangeRef = React37.useRef(onChange);
|
|
9444
|
-
useInsertionEffect(() => {
|
|
9445
|
-
onChangeRef.current = onChange;
|
|
9446
|
-
}, [onChange]);
|
|
9447
|
-
React37.useEffect(() => {
|
|
9448
|
-
var _a;
|
|
9449
|
-
if (prevValueRef.current !== value2) {
|
|
9450
|
-
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value2);
|
|
9451
|
-
prevValueRef.current = value2;
|
|
9452
|
-
}
|
|
9453
|
-
}, [value2, prevValueRef]);
|
|
9454
|
-
return [value2, setValue, onChangeRef];
|
|
9455
|
-
}
|
|
9456
|
-
function isFunction(value2) {
|
|
9457
|
-
return typeof value2 === "function";
|
|
9458
|
-
}
|
|
9459
|
-
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
9460
|
-
|
|
9461
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
9462
|
-
var React42 = __toESM(require("react"), 1);
|
|
9463
|
-
|
|
9464
|
-
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
9465
|
-
var React39 = __toESM(require("react"), 1);
|
|
9466
|
-
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
9467
9303
|
|
|
9468
9304
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
9469
|
-
var
|
|
9470
|
-
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
9305
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
9471
9306
|
// @__NO_SIDE_EFFECTS__
|
|
9472
9307
|
function createSlot(ownerName) {
|
|
9473
9308
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
9474
|
-
const
|
|
9309
|
+
const Slot2 = React34.forwardRef((props, forwardedRef) => {
|
|
9475
9310
|
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
9476
|
-
const childrenArray =
|
|
9311
|
+
const childrenArray = React34.Children.toArray(children);
|
|
9477
9312
|
const slottable = childrenArray.find(isSlottable);
|
|
9478
9313
|
if (slottable) {
|
|
9479
9314
|
const newElement = slottable.props.children;
|
|
9480
9315
|
const newChildren = childrenArray.map((child) => {
|
|
9481
9316
|
if (child === slottable) {
|
|
9482
|
-
if (
|
|
9483
|
-
return
|
|
9317
|
+
if (React34.Children.count(newElement) > 1) return React34.Children.only(null);
|
|
9318
|
+
return React34.isValidElement(newElement) ? newElement.props.children : null;
|
|
9484
9319
|
} else {
|
|
9485
9320
|
return child;
|
|
9486
9321
|
}
|
|
9487
9322
|
});
|
|
9488
|
-
return /* @__PURE__ */ (0,
|
|
9323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
|
|
9489
9324
|
}
|
|
9490
|
-
return /* @__PURE__ */ (0,
|
|
9325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
9491
9326
|
});
|
|
9492
|
-
|
|
9493
|
-
return
|
|
9327
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
9328
|
+
return Slot2;
|
|
9494
9329
|
}
|
|
9495
9330
|
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
9496
9331
|
// @__NO_SIDE_EFFECTS__
|
|
9497
9332
|
function createSlotClone(ownerName) {
|
|
9498
|
-
const SlotClone =
|
|
9333
|
+
const SlotClone = React34.forwardRef((props, forwardedRef) => {
|
|
9499
9334
|
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
9500
|
-
if (
|
|
9335
|
+
if (React34.isValidElement(children)) {
|
|
9501
9336
|
const childrenRef = getElementRef(children);
|
|
9502
9337
|
const props2 = mergeProps(slotProps, children.props);
|
|
9503
|
-
if (children.type !==
|
|
9338
|
+
if (children.type !== React34.Fragment) {
|
|
9504
9339
|
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
9505
9340
|
}
|
|
9506
|
-
return
|
|
9341
|
+
return React34.cloneElement(children, props2);
|
|
9507
9342
|
}
|
|
9508
|
-
return
|
|
9343
|
+
return React34.Children.count(children) > 1 ? React34.Children.only(null) : null;
|
|
9509
9344
|
});
|
|
9510
9345
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
9511
9346
|
return SlotClone;
|
|
9512
9347
|
}
|
|
9513
9348
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
9514
|
-
// @__NO_SIDE_EFFECTS__
|
|
9515
|
-
function createSlottable(ownerName) {
|
|
9516
|
-
const Slottable2 = ({ children }) => {
|
|
9517
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children });
|
|
9518
|
-
};
|
|
9519
|
-
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
9520
|
-
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
9521
|
-
return Slottable2;
|
|
9522
|
-
}
|
|
9523
9349
|
function isSlottable(child) {
|
|
9524
|
-
return
|
|
9350
|
+
return React34.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
9525
9351
|
}
|
|
9526
9352
|
function mergeProps(slotProps, childProps) {
|
|
9527
9353
|
const overrideProps = __spreadValues({}, childProps);
|
|
@@ -9562,2240 +9388,155 @@ function getElementRef(element) {
|
|
|
9562
9388
|
return element.props.ref || element.ref;
|
|
9563
9389
|
}
|
|
9564
9390
|
|
|
9565
|
-
//
|
|
9566
|
-
var
|
|
9567
|
-
var
|
|
9568
|
-
|
|
9569
|
-
"
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
];
|
|
9586
|
-
var Primitive = NODES.reduce((primitive, node2) => {
|
|
9587
|
-
const Slot3 = createSlot(`Primitive.${node2}`);
|
|
9588
|
-
const Node4 = React39.forwardRef((props, forwardedRef) => {
|
|
9589
|
-
const _a = props, { asChild } = _a, primitiveProps = __objRest(_a, ["asChild"]);
|
|
9590
|
-
const Comp = asChild ? Slot3 : node2;
|
|
9591
|
-
if (typeof window !== "undefined") {
|
|
9592
|
-
window[Symbol.for("radix-ui")] = true;
|
|
9593
|
-
}
|
|
9594
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Comp, __spreadProps(__spreadValues({}, primitiveProps), { ref: forwardedRef }));
|
|
9595
|
-
});
|
|
9596
|
-
Node4.displayName = `Primitive.${node2}`;
|
|
9597
|
-
return __spreadProps(__spreadValues({}, primitive), { [node2]: Node4 });
|
|
9598
|
-
}, {});
|
|
9599
|
-
function dispatchDiscreteCustomEvent(target, event) {
|
|
9600
|
-
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
9601
|
-
}
|
|
9602
|
-
|
|
9603
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
9604
|
-
var React40 = __toESM(require("react"), 1);
|
|
9605
|
-
function useCallbackRef(callback) {
|
|
9606
|
-
const callbackRef = React40.useRef(callback);
|
|
9607
|
-
React40.useEffect(() => {
|
|
9608
|
-
callbackRef.current = callback;
|
|
9609
|
-
});
|
|
9610
|
-
return React40.useMemo(() => (...args) => {
|
|
9611
|
-
var _a;
|
|
9612
|
-
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
9613
|
-
}, []);
|
|
9614
|
-
}
|
|
9615
|
-
|
|
9616
|
-
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
9617
|
-
var React41 = __toESM(require("react"), 1);
|
|
9618
|
-
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
9619
|
-
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
9620
|
-
React41.useEffect(() => {
|
|
9621
|
-
const handleKeyDown = (event) => {
|
|
9622
|
-
if (event.key === "Escape") {
|
|
9623
|
-
onEscapeKeyDown(event);
|
|
9391
|
+
// ../base-ui/src/ui/button.tsx
|
|
9392
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
9393
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
9394
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
9395
|
+
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
9396
|
+
{
|
|
9397
|
+
variants: {
|
|
9398
|
+
variant: {
|
|
9399
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
9400
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
9401
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
9402
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
9403
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
9404
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
9405
|
+
},
|
|
9406
|
+
size: {
|
|
9407
|
+
default: "h-10 px-4 py-2",
|
|
9408
|
+
sm: "h-9 rounded-md px-3",
|
|
9409
|
+
lg: "h-11 rounded-md px-8",
|
|
9410
|
+
icon: "h-10 w-10"
|
|
9624
9411
|
}
|
|
9625
|
-
}
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
}
|
|
9630
|
-
|
|
9631
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
9632
|
-
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
9633
|
-
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
9634
|
-
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
9635
|
-
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
9636
|
-
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
9637
|
-
var originalBodyPointerEvents;
|
|
9638
|
-
var DismissableLayerContext = React42.createContext({
|
|
9639
|
-
layers: /* @__PURE__ */ new Set(),
|
|
9640
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
9641
|
-
branches: /* @__PURE__ */ new Set()
|
|
9642
|
-
});
|
|
9643
|
-
var DismissableLayer = React42.forwardRef(
|
|
9644
|
-
(props, forwardedRef) => {
|
|
9645
|
-
var _b;
|
|
9646
|
-
const _a = props, {
|
|
9647
|
-
disableOutsidePointerEvents = false,
|
|
9648
|
-
onEscapeKeyDown,
|
|
9649
|
-
onPointerDownOutside,
|
|
9650
|
-
onFocusOutside,
|
|
9651
|
-
onInteractOutside,
|
|
9652
|
-
onDismiss
|
|
9653
|
-
} = _a, layerProps = __objRest(_a, [
|
|
9654
|
-
"disableOutsidePointerEvents",
|
|
9655
|
-
"onEscapeKeyDown",
|
|
9656
|
-
"onPointerDownOutside",
|
|
9657
|
-
"onFocusOutside",
|
|
9658
|
-
"onInteractOutside",
|
|
9659
|
-
"onDismiss"
|
|
9660
|
-
]);
|
|
9661
|
-
const context = React42.useContext(DismissableLayerContext);
|
|
9662
|
-
const [node2, setNode] = React42.useState(null);
|
|
9663
|
-
const ownerDocument = (_b = node2 == null ? void 0 : node2.ownerDocument) != null ? _b : globalThis == null ? void 0 : globalThis.document;
|
|
9664
|
-
const [, force] = React42.useState({});
|
|
9665
|
-
const composedRefs = useComposedRefs(forwardedRef, (node22) => setNode(node22));
|
|
9666
|
-
const layers = Array.from(context.layers);
|
|
9667
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
9668
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
9669
|
-
const index2 = node2 ? layers.indexOf(node2) : -1;
|
|
9670
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
9671
|
-
const isPointerEventsEnabled = index2 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
9672
|
-
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
9673
|
-
const target = event.target;
|
|
9674
|
-
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
9675
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
9676
|
-
onPointerDownOutside == null ? void 0 : onPointerDownOutside(event);
|
|
9677
|
-
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
|
9678
|
-
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
9679
|
-
}, ownerDocument);
|
|
9680
|
-
const focusOutside = useFocusOutside((event) => {
|
|
9681
|
-
const target = event.target;
|
|
9682
|
-
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
9683
|
-
if (isFocusInBranch) return;
|
|
9684
|
-
onFocusOutside == null ? void 0 : onFocusOutside(event);
|
|
9685
|
-
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
|
9686
|
-
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
|
9687
|
-
}, ownerDocument);
|
|
9688
|
-
useEscapeKeydown((event) => {
|
|
9689
|
-
const isHighestLayer = index2 === context.layers.size - 1;
|
|
9690
|
-
if (!isHighestLayer) return;
|
|
9691
|
-
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event);
|
|
9692
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
9693
|
-
event.preventDefault();
|
|
9694
|
-
onDismiss();
|
|
9695
|
-
}
|
|
9696
|
-
}, ownerDocument);
|
|
9697
|
-
React42.useEffect(() => {
|
|
9698
|
-
if (!node2) return;
|
|
9699
|
-
if (disableOutsidePointerEvents) {
|
|
9700
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
9701
|
-
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
9702
|
-
ownerDocument.body.style.pointerEvents = "none";
|
|
9703
|
-
}
|
|
9704
|
-
context.layersWithOutsidePointerEventsDisabled.add(node2);
|
|
9705
|
-
}
|
|
9706
|
-
context.layers.add(node2);
|
|
9707
|
-
dispatchUpdate();
|
|
9708
|
-
return () => {
|
|
9709
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
9710
|
-
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
9711
|
-
}
|
|
9712
|
-
};
|
|
9713
|
-
}, [node2, ownerDocument, disableOutsidePointerEvents, context]);
|
|
9714
|
-
React42.useEffect(() => {
|
|
9715
|
-
return () => {
|
|
9716
|
-
if (!node2) return;
|
|
9717
|
-
context.layers.delete(node2);
|
|
9718
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node2);
|
|
9719
|
-
dispatchUpdate();
|
|
9720
|
-
};
|
|
9721
|
-
}, [node2, context]);
|
|
9722
|
-
React42.useEffect(() => {
|
|
9723
|
-
const handleUpdate = () => force({});
|
|
9724
|
-
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
9725
|
-
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
9726
|
-
}, []);
|
|
9727
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
9728
|
-
Primitive.div,
|
|
9729
|
-
__spreadProps(__spreadValues({}, layerProps), {
|
|
9730
|
-
ref: composedRefs,
|
|
9731
|
-
style: __spreadValues({
|
|
9732
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0
|
|
9733
|
-
}, props.style),
|
|
9734
|
-
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
9735
|
-
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
9736
|
-
onPointerDownCapture: composeEventHandlers(
|
|
9737
|
-
props.onPointerDownCapture,
|
|
9738
|
-
pointerDownOutside.onPointerDownCapture
|
|
9739
|
-
)
|
|
9740
|
-
})
|
|
9741
|
-
);
|
|
9412
|
+
},
|
|
9413
|
+
defaultVariants: {
|
|
9414
|
+
variant: "default",
|
|
9415
|
+
size: "default"
|
|
9416
|
+
}
|
|
9742
9417
|
}
|
|
9743
9418
|
);
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
var
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9419
|
+
var Button = React35.forwardRef(
|
|
9420
|
+
(_a, ref2) => {
|
|
9421
|
+
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
9422
|
+
const Comp = asChild ? Slot : "button";
|
|
9423
|
+
if (asChild) {
|
|
9424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9425
|
+
Comp,
|
|
9426
|
+
__spreadProps(__spreadValues({
|
|
9427
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
9428
|
+
ref: ref2,
|
|
9429
|
+
disabled: loading || props.disabled
|
|
9430
|
+
}, props), {
|
|
9431
|
+
children
|
|
9432
|
+
})
|
|
9433
|
+
);
|
|
9757
9434
|
}
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
handleAndDispatchCustomEvent(
|
|
9772
|
-
POINTER_DOWN_OUTSIDE,
|
|
9773
|
-
handlePointerDownOutside,
|
|
9774
|
-
eventDetail,
|
|
9775
|
-
{ discrete: true }
|
|
9776
|
-
);
|
|
9777
|
-
};
|
|
9778
|
-
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
9779
|
-
const eventDetail = { originalEvent: event };
|
|
9780
|
-
if (event.pointerType === "touch") {
|
|
9781
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9782
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
9783
|
-
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
9784
|
-
} else {
|
|
9785
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
9786
|
-
}
|
|
9787
|
-
} else {
|
|
9788
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9789
|
-
}
|
|
9790
|
-
isPointerInsideReactTreeRef.current = false;
|
|
9791
|
-
};
|
|
9792
|
-
const timerId = window.setTimeout(() => {
|
|
9793
|
-
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
9794
|
-
}, 0);
|
|
9795
|
-
return () => {
|
|
9796
|
-
window.clearTimeout(timerId);
|
|
9797
|
-
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
9798
|
-
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
9799
|
-
};
|
|
9800
|
-
}, [ownerDocument, handlePointerDownOutside]);
|
|
9801
|
-
return {
|
|
9802
|
-
// ensures we check React component tree (not just DOM tree)
|
|
9803
|
-
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
9804
|
-
};
|
|
9805
|
-
}
|
|
9806
|
-
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
9807
|
-
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
9808
|
-
const isFocusInsideReactTreeRef = React42.useRef(false);
|
|
9809
|
-
React42.useEffect(() => {
|
|
9810
|
-
const handleFocus = (event) => {
|
|
9811
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
9812
|
-
const eventDetail = { originalEvent: event };
|
|
9813
|
-
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
9814
|
-
discrete: false
|
|
9815
|
-
});
|
|
9816
|
-
}
|
|
9817
|
-
};
|
|
9818
|
-
ownerDocument.addEventListener("focusin", handleFocus);
|
|
9819
|
-
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
9820
|
-
}, [ownerDocument, handleFocusOutside]);
|
|
9821
|
-
return {
|
|
9822
|
-
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
9823
|
-
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
9824
|
-
};
|
|
9825
|
-
}
|
|
9826
|
-
function dispatchUpdate() {
|
|
9827
|
-
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
9828
|
-
document.dispatchEvent(event);
|
|
9829
|
-
}
|
|
9830
|
-
function handleAndDispatchCustomEvent(name2, handler2, detail, { discrete }) {
|
|
9831
|
-
const target = detail.originalEvent.target;
|
|
9832
|
-
const event = new CustomEvent(name2, { bubbles: false, cancelable: true, detail });
|
|
9833
|
-
if (handler2) target.addEventListener(name2, handler2, { once: true });
|
|
9834
|
-
if (discrete) {
|
|
9835
|
-
dispatchDiscreteCustomEvent(target, event);
|
|
9836
|
-
} else {
|
|
9837
|
-
target.dispatchEvent(event);
|
|
9435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
9436
|
+
Comp,
|
|
9437
|
+
__spreadProps(__spreadValues({
|
|
9438
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
9439
|
+
ref: ref2,
|
|
9440
|
+
disabled: loading || props.disabled
|
|
9441
|
+
}, props), {
|
|
9442
|
+
children: [
|
|
9443
|
+
children,
|
|
9444
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
9445
|
+
]
|
|
9446
|
+
})
|
|
9447
|
+
);
|
|
9838
9448
|
}
|
|
9839
|
-
|
|
9449
|
+
);
|
|
9450
|
+
Button.displayName = "Button";
|
|
9840
9451
|
|
|
9841
|
-
//
|
|
9842
|
-
var
|
|
9843
|
-
var
|
|
9844
|
-
var
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
var
|
|
9848
|
-
var
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
9863
|
-
const lastFocusedElementRef = React43.useRef(null);
|
|
9864
|
-
const composedRefs = useComposedRefs(forwardedRef, (node2) => setContainer(node2));
|
|
9865
|
-
const focusScope = React43.useRef({
|
|
9866
|
-
paused: false,
|
|
9867
|
-
pause() {
|
|
9868
|
-
this.paused = true;
|
|
9869
|
-
},
|
|
9870
|
-
resume() {
|
|
9871
|
-
this.paused = false;
|
|
9872
|
-
}
|
|
9873
|
-
}).current;
|
|
9874
|
-
React43.useEffect(() => {
|
|
9875
|
-
if (trapped) {
|
|
9876
|
-
let handleFocusIn2 = function(event) {
|
|
9877
|
-
if (focusScope.paused || !container) return;
|
|
9878
|
-
const target = event.target;
|
|
9879
|
-
if (container.contains(target)) {
|
|
9880
|
-
lastFocusedElementRef.current = target;
|
|
9881
|
-
} else {
|
|
9882
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
9883
|
-
}
|
|
9884
|
-
}, handleFocusOut2 = function(event) {
|
|
9885
|
-
if (focusScope.paused || !container) return;
|
|
9886
|
-
const relatedTarget = event.relatedTarget;
|
|
9887
|
-
if (relatedTarget === null) return;
|
|
9888
|
-
if (!container.contains(relatedTarget)) {
|
|
9889
|
-
focus(lastFocusedElementRef.current, { select: true });
|
|
9890
|
-
}
|
|
9891
|
-
}, handleMutations2 = function(mutations) {
|
|
9892
|
-
const focusedElement = document.activeElement;
|
|
9893
|
-
if (focusedElement !== document.body) return;
|
|
9894
|
-
for (const mutation of mutations) {
|
|
9895
|
-
if (mutation.removedNodes.length > 0) focus(container);
|
|
9896
|
-
}
|
|
9897
|
-
};
|
|
9898
|
-
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
|
9899
|
-
document.addEventListener("focusin", handleFocusIn2);
|
|
9900
|
-
document.addEventListener("focusout", handleFocusOut2);
|
|
9901
|
-
const mutationObserver = new MutationObserver(handleMutations2);
|
|
9902
|
-
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
9903
|
-
return () => {
|
|
9904
|
-
document.removeEventListener("focusin", handleFocusIn2);
|
|
9905
|
-
document.removeEventListener("focusout", handleFocusOut2);
|
|
9906
|
-
mutationObserver.disconnect();
|
|
9907
|
-
};
|
|
9452
|
+
// src/fuma/mdx/gradient-button.tsx
|
|
9453
|
+
var import_link3 = __toESM(require("next/link"));
|
|
9454
|
+
var import_react37 = __toESM(require("react"));
|
|
9455
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
9456
|
+
|
|
9457
|
+
// src/fuma/mdx/toc-base.tsx
|
|
9458
|
+
var import_react38 = require("react");
|
|
9459
|
+
var import_navigation = require("next/navigation");
|
|
9460
|
+
var import_use_copy_button = require("fumadocs-ui/utils/use-copy-button");
|
|
9461
|
+
var import_link4 = __toESM(require("fumadocs-core/link"));
|
|
9462
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
9463
|
+
function EditOnGitHub({ url }) {
|
|
9464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
9465
|
+
import_link4.default,
|
|
9466
|
+
{
|
|
9467
|
+
className: "flex items-center gap-x-2 text-stone-600 hover:text-stone-500 dark:text-stone-400 dark:hover:text-stone-300 text-sm",
|
|
9468
|
+
href: url,
|
|
9469
|
+
children: [
|
|
9470
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.GitHub, {}),
|
|
9471
|
+
"Edit this page on GitHub"
|
|
9472
|
+
]
|
|
9908
9473
|
}
|
|
9909
|
-
}, [trapped, container, focusScope.paused]);
|
|
9910
|
-
React43.useEffect(() => {
|
|
9911
|
-
if (container) {
|
|
9912
|
-
focusScopesStack.add(focusScope);
|
|
9913
|
-
const previouslyFocusedElement = document.activeElement;
|
|
9914
|
-
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
9915
|
-
if (!hasFocusedCandidate) {
|
|
9916
|
-
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
9917
|
-
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
9918
|
-
container.dispatchEvent(mountEvent);
|
|
9919
|
-
if (!mountEvent.defaultPrevented) {
|
|
9920
|
-
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
9921
|
-
if (document.activeElement === previouslyFocusedElement) {
|
|
9922
|
-
focus(container);
|
|
9923
|
-
}
|
|
9924
|
-
}
|
|
9925
|
-
}
|
|
9926
|
-
return () => {
|
|
9927
|
-
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
9928
|
-
setTimeout(() => {
|
|
9929
|
-
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
9930
|
-
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
9931
|
-
container.dispatchEvent(unmountEvent);
|
|
9932
|
-
if (!unmountEvent.defaultPrevented) {
|
|
9933
|
-
focus(previouslyFocusedElement != null ? previouslyFocusedElement : document.body, { select: true });
|
|
9934
|
-
}
|
|
9935
|
-
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
9936
|
-
focusScopesStack.remove(focusScope);
|
|
9937
|
-
}, 0);
|
|
9938
|
-
};
|
|
9939
|
-
}
|
|
9940
|
-
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
9941
|
-
const handleKeyDown = React43.useCallback(
|
|
9942
|
-
(event) => {
|
|
9943
|
-
if (!loop && !trapped) return;
|
|
9944
|
-
if (focusScope.paused) return;
|
|
9945
|
-
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
9946
|
-
const focusedElement = document.activeElement;
|
|
9947
|
-
if (isTabKey && focusedElement) {
|
|
9948
|
-
const container2 = event.currentTarget;
|
|
9949
|
-
const [first, last] = getTabbableEdges(container2);
|
|
9950
|
-
const hasTabbableElementsInside = first && last;
|
|
9951
|
-
if (!hasTabbableElementsInside) {
|
|
9952
|
-
if (focusedElement === container2) event.preventDefault();
|
|
9953
|
-
} else {
|
|
9954
|
-
if (!event.shiftKey && focusedElement === last) {
|
|
9955
|
-
event.preventDefault();
|
|
9956
|
-
if (loop) focus(first, { select: true });
|
|
9957
|
-
} else if (event.shiftKey && focusedElement === first) {
|
|
9958
|
-
event.preventDefault();
|
|
9959
|
-
if (loop) focus(last, { select: true });
|
|
9960
|
-
}
|
|
9961
|
-
}
|
|
9962
|
-
}
|
|
9963
|
-
},
|
|
9964
|
-
[loop, trapped, focusScope.paused]
|
|
9965
9474
|
);
|
|
9966
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Primitive.div, __spreadProps(__spreadValues({ tabIndex: -1 }, scopeProps), { ref: composedRefs, onKeyDown: handleKeyDown }));
|
|
9967
|
-
});
|
|
9968
|
-
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
9969
|
-
function focusFirst(candidates, { select = false } = {}) {
|
|
9970
|
-
const previouslyFocusedElement = document.activeElement;
|
|
9971
|
-
for (const candidate of candidates) {
|
|
9972
|
-
focus(candidate, { select });
|
|
9973
|
-
if (document.activeElement !== previouslyFocusedElement) return;
|
|
9974
|
-
}
|
|
9975
|
-
}
|
|
9976
|
-
function getTabbableEdges(container) {
|
|
9977
|
-
const candidates = getTabbableCandidates(container);
|
|
9978
|
-
const first = findVisible(candidates, container);
|
|
9979
|
-
const last = findVisible(candidates.reverse(), container);
|
|
9980
|
-
return [first, last];
|
|
9981
|
-
}
|
|
9982
|
-
function getTabbableCandidates(container) {
|
|
9983
|
-
const nodes = [];
|
|
9984
|
-
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
9985
|
-
acceptNode: (node2) => {
|
|
9986
|
-
const isHiddenInput = node2.tagName === "INPUT" && node2.type === "hidden";
|
|
9987
|
-
if (node2.disabled || node2.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
9988
|
-
return node2.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
9989
|
-
}
|
|
9990
|
-
});
|
|
9991
|
-
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
9992
|
-
return nodes;
|
|
9993
|
-
}
|
|
9994
|
-
function findVisible(elements, container) {
|
|
9995
|
-
for (const element of elements) {
|
|
9996
|
-
if (!isHidden(element, { upTo: container })) return element;
|
|
9997
|
-
}
|
|
9998
|
-
}
|
|
9999
|
-
function isHidden(node2, { upTo }) {
|
|
10000
|
-
if (getComputedStyle(node2).visibility === "hidden") return true;
|
|
10001
|
-
while (node2) {
|
|
10002
|
-
if (upTo !== void 0 && node2 === upTo) return false;
|
|
10003
|
-
if (getComputedStyle(node2).display === "none") return true;
|
|
10004
|
-
node2 = node2.parentElement;
|
|
10005
|
-
}
|
|
10006
|
-
return false;
|
|
10007
9475
|
}
|
|
10008
|
-
function
|
|
10009
|
-
return
|
|
10010
|
-
}
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
element.focus({ preventScroll: true });
|
|
10015
|
-
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
10016
|
-
element.select();
|
|
10017
|
-
}
|
|
9476
|
+
function LastUpdatedDate({ date }) {
|
|
9477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-x-2 text-stone-600 dark:text-stone-400 text-sm", children: [
|
|
9478
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.LastUpdated, {}),
|
|
9479
|
+
"Lastest on ",
|
|
9480
|
+
date ? date : "Ages ago"
|
|
9481
|
+
] });
|
|
10018
9482
|
}
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
9483
|
+
|
|
9484
|
+
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
9485
|
+
var import_next_intl = require("next-intl");
|
|
9486
|
+
|
|
9487
|
+
// src/fuma/mdx/banner.tsx
|
|
9488
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
9489
|
+
var import_react39 = require("react");
|
|
9490
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
9491
|
+
var buttonVariants2 = (0, import_class_variance_authority2.cva)(
|
|
9492
|
+
"inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50",
|
|
9493
|
+
{
|
|
9494
|
+
variants: {
|
|
9495
|
+
color: {
|
|
9496
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
9497
|
+
outline: "border hover:bg-accent hover:text-accent-foreground",
|
|
9498
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
9499
|
+
secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
|
|
9500
|
+
},
|
|
9501
|
+
size: {
|
|
9502
|
+
sm: "gap-1 px-2 py-1.5 text-xs",
|
|
9503
|
+
icon: "p-1.5 [&_svg]:size-5",
|
|
9504
|
+
"icon-sm": "p-1.5 [&_svg]:size-4.5"
|
|
10027
9505
|
}
|
|
10028
|
-
stack = arrayRemove(stack, focusScope);
|
|
10029
|
-
stack.unshift(focusScope);
|
|
10030
|
-
},
|
|
10031
|
-
remove(focusScope) {
|
|
10032
|
-
var _a;
|
|
10033
|
-
stack = arrayRemove(stack, focusScope);
|
|
10034
|
-
(_a = stack[0]) == null ? void 0 : _a.resume();
|
|
10035
9506
|
}
|
|
10036
|
-
};
|
|
10037
|
-
}
|
|
10038
|
-
function arrayRemove(array, item) {
|
|
10039
|
-
const updatedArray = [...array];
|
|
10040
|
-
const index2 = updatedArray.indexOf(item);
|
|
10041
|
-
if (index2 !== -1) {
|
|
10042
|
-
updatedArray.splice(index2, 1);
|
|
10043
9507
|
}
|
|
10044
|
-
|
|
10045
|
-
}
|
|
10046
|
-
function removeLinks(items) {
|
|
10047
|
-
return items.filter((item) => item.tagName !== "A");
|
|
10048
|
-
}
|
|
10049
|
-
|
|
10050
|
-
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react@_a0745de0839b0b019298ec068509a840/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
10051
|
-
var React44 = __toESM(require("react"), 1);
|
|
10052
|
-
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
10053
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10054
|
-
var PORTAL_NAME = "Portal";
|
|
10055
|
-
var Portal = React44.forwardRef((props, forwardedRef) => {
|
|
10056
|
-
var _b;
|
|
10057
|
-
const _a = props, { container: containerProp } = _a, portalProps = __objRest(_a, ["container"]);
|
|
10058
|
-
const [mounted, setMounted] = React44.useState(false);
|
|
10059
|
-
useLayoutEffect2(() => setMounted(true), []);
|
|
10060
|
-
const container = containerProp || mounted && ((_b = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _b.body);
|
|
10061
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Primitive.div, __spreadProps(__spreadValues({}, portalProps), { ref: forwardedRef })), container) : null;
|
|
10062
|
-
});
|
|
10063
|
-
Portal.displayName = PORTAL_NAME;
|
|
10064
|
-
|
|
10065
|
-
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.3_@types+react@19.1.2__@types+reac_dbbe976722e7c3e02883ea31c3bbbf14/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
10066
|
-
var React211 = __toESM(require("react"), 1);
|
|
10067
|
-
var React45 = __toESM(require("react"), 1);
|
|
10068
|
-
function useStateMachine(initialState, machine) {
|
|
10069
|
-
return React45.useReducer((state, event) => {
|
|
10070
|
-
const nextState = machine[state][event];
|
|
10071
|
-
return nextState != null ? nextState : state;
|
|
10072
|
-
}, initialState);
|
|
10073
|
-
}
|
|
10074
|
-
var Presence = (props) => {
|
|
10075
|
-
const { present, children } = props;
|
|
10076
|
-
const presence = usePresence(present);
|
|
10077
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React211.Children.only(children);
|
|
10078
|
-
const ref2 = useComposedRefs(presence.ref, getElementRef2(child));
|
|
10079
|
-
const forceMount = typeof children === "function";
|
|
10080
|
-
return forceMount || presence.isPresent ? React211.cloneElement(child, { ref: ref2 }) : null;
|
|
10081
|
-
};
|
|
10082
|
-
Presence.displayName = "Presence";
|
|
10083
|
-
function usePresence(present) {
|
|
10084
|
-
const [node2, setNode] = React211.useState();
|
|
10085
|
-
const stylesRef = React211.useRef(null);
|
|
10086
|
-
const prevPresentRef = React211.useRef(present);
|
|
10087
|
-
const prevAnimationNameRef = React211.useRef("none");
|
|
10088
|
-
const initialState = present ? "mounted" : "unmounted";
|
|
10089
|
-
const [state, send] = useStateMachine(initialState, {
|
|
10090
|
-
mounted: {
|
|
10091
|
-
UNMOUNT: "unmounted",
|
|
10092
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
10093
|
-
},
|
|
10094
|
-
unmountSuspended: {
|
|
10095
|
-
MOUNT: "mounted",
|
|
10096
|
-
ANIMATION_END: "unmounted"
|
|
10097
|
-
},
|
|
10098
|
-
unmounted: {
|
|
10099
|
-
MOUNT: "mounted"
|
|
10100
|
-
}
|
|
10101
|
-
});
|
|
10102
|
-
React211.useEffect(() => {
|
|
10103
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
10104
|
-
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
10105
|
-
}, [state]);
|
|
10106
|
-
useLayoutEffect2(() => {
|
|
10107
|
-
const styles = stylesRef.current;
|
|
10108
|
-
const wasPresent = prevPresentRef.current;
|
|
10109
|
-
const hasPresentChanged = wasPresent !== present;
|
|
10110
|
-
if (hasPresentChanged) {
|
|
10111
|
-
const prevAnimationName = prevAnimationNameRef.current;
|
|
10112
|
-
const currentAnimationName = getAnimationName(styles);
|
|
10113
|
-
if (present) {
|
|
10114
|
-
send("MOUNT");
|
|
10115
|
-
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
|
10116
|
-
send("UNMOUNT");
|
|
10117
|
-
} else {
|
|
10118
|
-
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
10119
|
-
if (wasPresent && isAnimating) {
|
|
10120
|
-
send("ANIMATION_OUT");
|
|
10121
|
-
} else {
|
|
10122
|
-
send("UNMOUNT");
|
|
10123
|
-
}
|
|
10124
|
-
}
|
|
10125
|
-
prevPresentRef.current = present;
|
|
10126
|
-
}
|
|
10127
|
-
}, [present, send]);
|
|
10128
|
-
useLayoutEffect2(() => {
|
|
10129
|
-
var _a;
|
|
10130
|
-
if (node2) {
|
|
10131
|
-
let timeoutId;
|
|
10132
|
-
const ownerWindow = (_a = node2.ownerDocument.defaultView) != null ? _a : window;
|
|
10133
|
-
const handleAnimationEnd = (event) => {
|
|
10134
|
-
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
10135
|
-
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
10136
|
-
if (event.target === node2 && isCurrentAnimation) {
|
|
10137
|
-
send("ANIMATION_END");
|
|
10138
|
-
if (!prevPresentRef.current) {
|
|
10139
|
-
const currentFillMode = node2.style.animationFillMode;
|
|
10140
|
-
node2.style.animationFillMode = "forwards";
|
|
10141
|
-
timeoutId = ownerWindow.setTimeout(() => {
|
|
10142
|
-
if (node2.style.animationFillMode === "forwards") {
|
|
10143
|
-
node2.style.animationFillMode = currentFillMode;
|
|
10144
|
-
}
|
|
10145
|
-
});
|
|
10146
|
-
}
|
|
10147
|
-
}
|
|
10148
|
-
};
|
|
10149
|
-
const handleAnimationStart = (event) => {
|
|
10150
|
-
if (event.target === node2) {
|
|
10151
|
-
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
10152
|
-
}
|
|
10153
|
-
};
|
|
10154
|
-
node2.addEventListener("animationstart", handleAnimationStart);
|
|
10155
|
-
node2.addEventListener("animationcancel", handleAnimationEnd);
|
|
10156
|
-
node2.addEventListener("animationend", handleAnimationEnd);
|
|
10157
|
-
return () => {
|
|
10158
|
-
ownerWindow.clearTimeout(timeoutId);
|
|
10159
|
-
node2.removeEventListener("animationstart", handleAnimationStart);
|
|
10160
|
-
node2.removeEventListener("animationcancel", handleAnimationEnd);
|
|
10161
|
-
node2.removeEventListener("animationend", handleAnimationEnd);
|
|
10162
|
-
};
|
|
10163
|
-
} else {
|
|
10164
|
-
send("ANIMATION_END");
|
|
10165
|
-
}
|
|
10166
|
-
}, [node2, send]);
|
|
10167
|
-
return {
|
|
10168
|
-
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
10169
|
-
ref: React211.useCallback((node22) => {
|
|
10170
|
-
stylesRef.current = node22 ? getComputedStyle(node22) : null;
|
|
10171
|
-
setNode(node22);
|
|
10172
|
-
}, [])
|
|
10173
|
-
};
|
|
10174
|
-
}
|
|
10175
|
-
function getAnimationName(styles) {
|
|
10176
|
-
return (styles == null ? void 0 : styles.animationName) || "none";
|
|
10177
|
-
}
|
|
10178
|
-
function getElementRef2(element) {
|
|
10179
|
-
var _a, _b;
|
|
10180
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
10181
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
10182
|
-
if (mayWarn) {
|
|
10183
|
-
return element.ref;
|
|
10184
|
-
}
|
|
10185
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
10186
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
10187
|
-
if (mayWarn) {
|
|
10188
|
-
return element.props.ref;
|
|
10189
|
-
}
|
|
10190
|
-
return element.props.ref || element.ref;
|
|
10191
|
-
}
|
|
10192
|
-
|
|
10193
|
-
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
10194
|
-
var React46 = __toESM(require("react"), 1);
|
|
10195
|
-
var count2 = 0;
|
|
10196
|
-
function useFocusGuards() {
|
|
10197
|
-
React46.useEffect(() => {
|
|
10198
|
-
var _a, _b;
|
|
10199
|
-
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
10200
|
-
document.body.insertAdjacentElement("afterbegin", (_a = edgeGuards[0]) != null ? _a : createFocusGuard());
|
|
10201
|
-
document.body.insertAdjacentElement("beforeend", (_b = edgeGuards[1]) != null ? _b : createFocusGuard());
|
|
10202
|
-
count2++;
|
|
10203
|
-
return () => {
|
|
10204
|
-
if (count2 === 1) {
|
|
10205
|
-
document.querySelectorAll("[data-radix-focus-guard]").forEach((node2) => node2.remove());
|
|
10206
|
-
}
|
|
10207
|
-
count2--;
|
|
10208
|
-
};
|
|
10209
|
-
}, []);
|
|
10210
|
-
}
|
|
10211
|
-
function createFocusGuard() {
|
|
10212
|
-
const element = document.createElement("span");
|
|
10213
|
-
element.setAttribute("data-radix-focus-guard", "");
|
|
10214
|
-
element.tabIndex = 0;
|
|
10215
|
-
element.style.outline = "none";
|
|
10216
|
-
element.style.opacity = "0";
|
|
10217
|
-
element.style.position = "fixed";
|
|
10218
|
-
element.style.pointerEvents = "none";
|
|
10219
|
-
return element;
|
|
10220
|
-
}
|
|
10221
|
-
|
|
10222
|
-
// ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
10223
|
-
var __assign = function() {
|
|
10224
|
-
__assign = Object.assign || function __assign2(t) {
|
|
10225
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10226
|
-
s = arguments[i];
|
|
10227
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10228
|
-
}
|
|
10229
|
-
return t;
|
|
10230
|
-
};
|
|
10231
|
-
return __assign.apply(this, arguments);
|
|
10232
|
-
};
|
|
10233
|
-
function __rest(s, e) {
|
|
10234
|
-
var t = {};
|
|
10235
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
10236
|
-
t[p] = s[p];
|
|
10237
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
10238
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
10239
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
10240
|
-
t[p[i]] = s[p[i]];
|
|
10241
|
-
}
|
|
10242
|
-
return t;
|
|
10243
|
-
}
|
|
10244
|
-
function __spreadArray(to, from, pack) {
|
|
10245
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
10246
|
-
if (ar || !(i in from)) {
|
|
10247
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
10248
|
-
ar[i] = from[i];
|
|
10249
|
-
}
|
|
10250
|
-
}
|
|
10251
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10252
|
-
}
|
|
10253
|
-
|
|
10254
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
10255
|
-
var React53 = __toESM(require("react"));
|
|
10256
|
-
|
|
10257
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
10258
|
-
var React49 = __toESM(require("react"));
|
|
10259
|
-
|
|
10260
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
10261
|
-
var zeroRightClassName = "right-scroll-bar-position";
|
|
10262
|
-
var fullWidthClassName = "width-before-scroll-bar";
|
|
10263
|
-
var noScrollbarsClassName = "with-scroll-bars-hidden";
|
|
10264
|
-
var removedBarSizeVariable = "--removed-body-scroll-bar-size";
|
|
10265
|
-
|
|
10266
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
10267
|
-
function assignRef(ref2, value2) {
|
|
10268
|
-
if (typeof ref2 === "function") {
|
|
10269
|
-
ref2(value2);
|
|
10270
|
-
} else if (ref2) {
|
|
10271
|
-
ref2.current = value2;
|
|
10272
|
-
}
|
|
10273
|
-
return ref2;
|
|
10274
|
-
}
|
|
10275
|
-
|
|
10276
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
10277
|
-
var import_react35 = require("react");
|
|
10278
|
-
function useCallbackRef2(initialValue, callback) {
|
|
10279
|
-
var ref2 = (0, import_react35.useState)(function() {
|
|
10280
|
-
return {
|
|
10281
|
-
// value
|
|
10282
|
-
value: initialValue,
|
|
10283
|
-
// last callback
|
|
10284
|
-
callback,
|
|
10285
|
-
// "memoized" public interface
|
|
10286
|
-
facade: {
|
|
10287
|
-
get current() {
|
|
10288
|
-
return ref2.value;
|
|
10289
|
-
},
|
|
10290
|
-
set current(value2) {
|
|
10291
|
-
var last = ref2.value;
|
|
10292
|
-
if (last !== value2) {
|
|
10293
|
-
ref2.value = value2;
|
|
10294
|
-
ref2.callback(value2, last);
|
|
10295
|
-
}
|
|
10296
|
-
}
|
|
10297
|
-
}
|
|
10298
|
-
};
|
|
10299
|
-
})[0];
|
|
10300
|
-
ref2.callback = callback;
|
|
10301
|
-
return ref2.facade;
|
|
10302
|
-
}
|
|
10303
|
-
|
|
10304
|
-
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
10305
|
-
var React47 = __toESM(require("react"));
|
|
10306
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React47.useLayoutEffect : React47.useEffect;
|
|
10307
|
-
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
10308
|
-
function useMergeRefs(refs, defaultValue) {
|
|
10309
|
-
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
10310
|
-
return refs.forEach(function(ref2) {
|
|
10311
|
-
return assignRef(ref2, newValue);
|
|
10312
|
-
});
|
|
10313
|
-
});
|
|
10314
|
-
useIsomorphicLayoutEffect(function() {
|
|
10315
|
-
var oldValue = currentValues.get(callbackRef);
|
|
10316
|
-
if (oldValue) {
|
|
10317
|
-
var prevRefs_1 = new Set(oldValue);
|
|
10318
|
-
var nextRefs_1 = new Set(refs);
|
|
10319
|
-
var current_1 = callbackRef.current;
|
|
10320
|
-
prevRefs_1.forEach(function(ref2) {
|
|
10321
|
-
if (!nextRefs_1.has(ref2)) {
|
|
10322
|
-
assignRef(ref2, null);
|
|
10323
|
-
}
|
|
10324
|
-
});
|
|
10325
|
-
nextRefs_1.forEach(function(ref2) {
|
|
10326
|
-
if (!prevRefs_1.has(ref2)) {
|
|
10327
|
-
assignRef(ref2, current_1);
|
|
10328
|
-
}
|
|
10329
|
-
});
|
|
10330
|
-
}
|
|
10331
|
-
currentValues.set(callbackRef, refs);
|
|
10332
|
-
}, [refs]);
|
|
10333
|
-
return callbackRef;
|
|
10334
|
-
}
|
|
10335
|
-
|
|
10336
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/medium.js
|
|
10337
|
-
function ItoI(a) {
|
|
10338
|
-
return a;
|
|
10339
|
-
}
|
|
10340
|
-
function innerCreateMedium(defaults, middleware) {
|
|
10341
|
-
if (middleware === void 0) {
|
|
10342
|
-
middleware = ItoI;
|
|
10343
|
-
}
|
|
10344
|
-
var buffer = [];
|
|
10345
|
-
var assigned = false;
|
|
10346
|
-
var medium = {
|
|
10347
|
-
read: function() {
|
|
10348
|
-
if (assigned) {
|
|
10349
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
10350
|
-
}
|
|
10351
|
-
if (buffer.length) {
|
|
10352
|
-
return buffer[buffer.length - 1];
|
|
10353
|
-
}
|
|
10354
|
-
return defaults;
|
|
10355
|
-
},
|
|
10356
|
-
useMedium: function(data2) {
|
|
10357
|
-
var item = middleware(data2, assigned);
|
|
10358
|
-
buffer.push(item);
|
|
10359
|
-
return function() {
|
|
10360
|
-
buffer = buffer.filter(function(x) {
|
|
10361
|
-
return x !== item;
|
|
10362
|
-
});
|
|
10363
|
-
};
|
|
10364
|
-
},
|
|
10365
|
-
assignSyncMedium: function(cb) {
|
|
10366
|
-
assigned = true;
|
|
10367
|
-
while (buffer.length) {
|
|
10368
|
-
var cbs = buffer;
|
|
10369
|
-
buffer = [];
|
|
10370
|
-
cbs.forEach(cb);
|
|
10371
|
-
}
|
|
10372
|
-
buffer = {
|
|
10373
|
-
push: function(x) {
|
|
10374
|
-
return cb(x);
|
|
10375
|
-
},
|
|
10376
|
-
filter: function() {
|
|
10377
|
-
return buffer;
|
|
10378
|
-
}
|
|
10379
|
-
};
|
|
10380
|
-
},
|
|
10381
|
-
assignMedium: function(cb) {
|
|
10382
|
-
assigned = true;
|
|
10383
|
-
var pendingQueue = [];
|
|
10384
|
-
if (buffer.length) {
|
|
10385
|
-
var cbs = buffer;
|
|
10386
|
-
buffer = [];
|
|
10387
|
-
cbs.forEach(cb);
|
|
10388
|
-
pendingQueue = buffer;
|
|
10389
|
-
}
|
|
10390
|
-
var executeQueue = function() {
|
|
10391
|
-
var cbs2 = pendingQueue;
|
|
10392
|
-
pendingQueue = [];
|
|
10393
|
-
cbs2.forEach(cb);
|
|
10394
|
-
};
|
|
10395
|
-
var cycle = function() {
|
|
10396
|
-
return Promise.resolve().then(executeQueue);
|
|
10397
|
-
};
|
|
10398
|
-
cycle();
|
|
10399
|
-
buffer = {
|
|
10400
|
-
push: function(x) {
|
|
10401
|
-
pendingQueue.push(x);
|
|
10402
|
-
cycle();
|
|
10403
|
-
},
|
|
10404
|
-
filter: function(filter) {
|
|
10405
|
-
pendingQueue = pendingQueue.filter(filter);
|
|
10406
|
-
return buffer;
|
|
10407
|
-
}
|
|
10408
|
-
};
|
|
10409
|
-
}
|
|
10410
|
-
};
|
|
10411
|
-
return medium;
|
|
10412
|
-
}
|
|
10413
|
-
function createSidecarMedium(options) {
|
|
10414
|
-
if (options === void 0) {
|
|
10415
|
-
options = {};
|
|
10416
|
-
}
|
|
10417
|
-
var medium = innerCreateMedium(null);
|
|
10418
|
-
medium.options = __assign({ async: true, ssr: false }, options);
|
|
10419
|
-
return medium;
|
|
10420
|
-
}
|
|
10421
|
-
|
|
10422
|
-
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js
|
|
10423
|
-
var React48 = __toESM(require("react"));
|
|
10424
|
-
var SideCar = function(_a) {
|
|
10425
|
-
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
10426
|
-
if (!sideCar) {
|
|
10427
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
10428
|
-
}
|
|
10429
|
-
var Target = sideCar.read();
|
|
10430
|
-
if (!Target) {
|
|
10431
|
-
throw new Error("Sidecar medium not found");
|
|
10432
|
-
}
|
|
10433
|
-
return React48.createElement(Target, __assign({}, rest));
|
|
10434
|
-
};
|
|
10435
|
-
SideCar.isSideCarExport = true;
|
|
10436
|
-
function exportSidecar(medium, exported) {
|
|
10437
|
-
medium.useMedium(exported);
|
|
10438
|
-
return SideCar;
|
|
10439
|
-
}
|
|
10440
|
-
|
|
10441
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
10442
|
-
var effectCar = createSidecarMedium();
|
|
10443
|
-
|
|
10444
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
10445
|
-
var nothing = function() {
|
|
10446
|
-
return;
|
|
10447
|
-
};
|
|
10448
|
-
var RemoveScroll = React49.forwardRef(function(props, parentRef) {
|
|
10449
|
-
var ref2 = React49.useRef(null);
|
|
10450
|
-
var _a = React49.useState({
|
|
10451
|
-
onScrollCapture: nothing,
|
|
10452
|
-
onWheelCapture: nothing,
|
|
10453
|
-
onTouchMoveCapture: nothing
|
|
10454
|
-
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
10455
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
10456
|
-
var SideCar2 = sideCar;
|
|
10457
|
-
var containerRef = useMergeRefs([ref2, parentRef]);
|
|
10458
|
-
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
10459
|
-
return React49.createElement(
|
|
10460
|
-
React49.Fragment,
|
|
10461
|
-
null,
|
|
10462
|
-
enabled && React49.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref2, gapMode }),
|
|
10463
|
-
forwardProps ? React49.cloneElement(React49.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React49.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
10464
|
-
);
|
|
10465
|
-
});
|
|
10466
|
-
RemoveScroll.defaultProps = {
|
|
10467
|
-
enabled: true,
|
|
10468
|
-
removeScrollBar: true,
|
|
10469
|
-
inert: false
|
|
10470
|
-
};
|
|
10471
|
-
RemoveScroll.classNames = {
|
|
10472
|
-
fullWidth: fullWidthClassName,
|
|
10473
|
-
zeroRight: zeroRightClassName
|
|
10474
|
-
};
|
|
10475
|
-
|
|
10476
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
10477
|
-
var React52 = __toESM(require("react"));
|
|
10478
|
-
|
|
10479
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
10480
|
-
var React51 = __toESM(require("react"));
|
|
10481
|
-
|
|
10482
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
10483
|
-
var React50 = __toESM(require("react"));
|
|
10484
|
-
|
|
10485
|
-
// ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
10486
|
-
var currentNonce;
|
|
10487
|
-
var getNonce = function() {
|
|
10488
|
-
if (currentNonce) {
|
|
10489
|
-
return currentNonce;
|
|
10490
|
-
}
|
|
10491
|
-
if (typeof __webpack_nonce__ !== "undefined") {
|
|
10492
|
-
return __webpack_nonce__;
|
|
10493
|
-
}
|
|
10494
|
-
return void 0;
|
|
10495
|
-
};
|
|
10496
|
-
|
|
10497
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
10498
|
-
function makeStyleTag() {
|
|
10499
|
-
if (!document)
|
|
10500
|
-
return null;
|
|
10501
|
-
var tag = document.createElement("style");
|
|
10502
|
-
tag.type = "text/css";
|
|
10503
|
-
var nonce = getNonce();
|
|
10504
|
-
if (nonce) {
|
|
10505
|
-
tag.setAttribute("nonce", nonce);
|
|
10506
|
-
}
|
|
10507
|
-
return tag;
|
|
10508
|
-
}
|
|
10509
|
-
function injectStyles(tag, css) {
|
|
10510
|
-
if (tag.styleSheet) {
|
|
10511
|
-
tag.styleSheet.cssText = css;
|
|
10512
|
-
} else {
|
|
10513
|
-
tag.appendChild(document.createTextNode(css));
|
|
10514
|
-
}
|
|
10515
|
-
}
|
|
10516
|
-
function insertStyleTag(tag) {
|
|
10517
|
-
var head = document.head || document.getElementsByTagName("head")[0];
|
|
10518
|
-
head.appendChild(tag);
|
|
10519
|
-
}
|
|
10520
|
-
var stylesheetSingleton = function() {
|
|
10521
|
-
var counter = 0;
|
|
10522
|
-
var stylesheet = null;
|
|
10523
|
-
return {
|
|
10524
|
-
add: function(style) {
|
|
10525
|
-
if (counter == 0) {
|
|
10526
|
-
if (stylesheet = makeStyleTag()) {
|
|
10527
|
-
injectStyles(stylesheet, style);
|
|
10528
|
-
insertStyleTag(stylesheet);
|
|
10529
|
-
}
|
|
10530
|
-
}
|
|
10531
|
-
counter++;
|
|
10532
|
-
},
|
|
10533
|
-
remove: function() {
|
|
10534
|
-
counter--;
|
|
10535
|
-
if (!counter && stylesheet) {
|
|
10536
|
-
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
10537
|
-
stylesheet = null;
|
|
10538
|
-
}
|
|
10539
|
-
}
|
|
10540
|
-
};
|
|
10541
|
-
};
|
|
10542
|
-
|
|
10543
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
10544
|
-
var styleHookSingleton = function() {
|
|
10545
|
-
var sheet = stylesheetSingleton();
|
|
10546
|
-
return function(styles, isDynamic) {
|
|
10547
|
-
React50.useEffect(function() {
|
|
10548
|
-
sheet.add(styles);
|
|
10549
|
-
return function() {
|
|
10550
|
-
sheet.remove();
|
|
10551
|
-
};
|
|
10552
|
-
}, [styles && isDynamic]);
|
|
10553
|
-
};
|
|
10554
|
-
};
|
|
10555
|
-
|
|
10556
|
-
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/component.js
|
|
10557
|
-
var styleSingleton = function() {
|
|
10558
|
-
var useStyle = styleHookSingleton();
|
|
10559
|
-
var Sheet = function(_a) {
|
|
10560
|
-
var styles = _a.styles, dynamic = _a.dynamic;
|
|
10561
|
-
useStyle(styles, dynamic);
|
|
10562
|
-
return null;
|
|
10563
|
-
};
|
|
10564
|
-
return Sheet;
|
|
10565
|
-
};
|
|
10566
|
-
|
|
10567
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
|
|
10568
|
-
var zeroGap = {
|
|
10569
|
-
left: 0,
|
|
10570
|
-
top: 0,
|
|
10571
|
-
right: 0,
|
|
10572
|
-
gap: 0
|
|
10573
|
-
};
|
|
10574
|
-
var parse = function(x) {
|
|
10575
|
-
return parseInt(x || "", 10) || 0;
|
|
10576
|
-
};
|
|
10577
|
-
var getOffset = function(gapMode) {
|
|
10578
|
-
var cs = window.getComputedStyle(document.body);
|
|
10579
|
-
var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
|
|
10580
|
-
var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
|
|
10581
|
-
var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
|
|
10582
|
-
return [parse(left), parse(top), parse(right)];
|
|
10583
|
-
};
|
|
10584
|
-
var getGapWidth = function(gapMode) {
|
|
10585
|
-
if (gapMode === void 0) {
|
|
10586
|
-
gapMode = "margin";
|
|
10587
|
-
}
|
|
10588
|
-
if (typeof window === "undefined") {
|
|
10589
|
-
return zeroGap;
|
|
10590
|
-
}
|
|
10591
|
-
var offsets = getOffset(gapMode);
|
|
10592
|
-
var documentWidth = document.documentElement.clientWidth;
|
|
10593
|
-
var windowWidth = window.innerWidth;
|
|
10594
|
-
return {
|
|
10595
|
-
left: offsets[0],
|
|
10596
|
-
top: offsets[1],
|
|
10597
|
-
right: offsets[2],
|
|
10598
|
-
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
|
|
10599
|
-
};
|
|
10600
|
-
};
|
|
10601
|
-
|
|
10602
|
-
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
10603
|
-
var Style = styleSingleton();
|
|
10604
|
-
var lockAttribute = "data-scroll-locked";
|
|
10605
|
-
var getStyles = function(_a, allowRelative, gapMode, important) {
|
|
10606
|
-
var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
|
|
10607
|
-
if (gapMode === void 0) {
|
|
10608
|
-
gapMode = "margin";
|
|
10609
|
-
}
|
|
10610
|
-
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
|
|
10611
|
-
allowRelative && "position: relative ".concat(important, ";"),
|
|
10612
|
-
gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
|
|
10613
|
-
gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
|
|
10614
|
-
].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
|
|
10615
|
-
};
|
|
10616
|
-
var getCurrentUseCounter = function() {
|
|
10617
|
-
var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
|
|
10618
|
-
return isFinite(counter) ? counter : 0;
|
|
10619
|
-
};
|
|
10620
|
-
var useLockAttribute = function() {
|
|
10621
|
-
React51.useEffect(function() {
|
|
10622
|
-
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
10623
|
-
return function() {
|
|
10624
|
-
var newCounter = getCurrentUseCounter() - 1;
|
|
10625
|
-
if (newCounter <= 0) {
|
|
10626
|
-
document.body.removeAttribute(lockAttribute);
|
|
10627
|
-
} else {
|
|
10628
|
-
document.body.setAttribute(lockAttribute, newCounter.toString());
|
|
10629
|
-
}
|
|
10630
|
-
};
|
|
10631
|
-
}, []);
|
|
10632
|
-
};
|
|
10633
|
-
var RemoveScrollBar = function(_a) {
|
|
10634
|
-
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
10635
|
-
useLockAttribute();
|
|
10636
|
-
var gap = React51.useMemo(function() {
|
|
10637
|
-
return getGapWidth(gapMode);
|
|
10638
|
-
}, [gapMode]);
|
|
10639
|
-
return React51.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
10640
|
-
};
|
|
10641
|
-
|
|
10642
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
10643
|
-
var passiveSupported = false;
|
|
10644
|
-
if (typeof window !== "undefined") {
|
|
10645
|
-
try {
|
|
10646
|
-
options = Object.defineProperty({}, "passive", {
|
|
10647
|
-
get: function() {
|
|
10648
|
-
passiveSupported = true;
|
|
10649
|
-
return true;
|
|
10650
|
-
}
|
|
10651
|
-
});
|
|
10652
|
-
window.addEventListener("test", options, options);
|
|
10653
|
-
window.removeEventListener("test", options, options);
|
|
10654
|
-
} catch (err) {
|
|
10655
|
-
passiveSupported = false;
|
|
10656
|
-
}
|
|
10657
|
-
}
|
|
10658
|
-
var options;
|
|
10659
|
-
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
10660
|
-
|
|
10661
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
10662
|
-
var alwaysContainsScroll = function(node2) {
|
|
10663
|
-
return node2.tagName === "TEXTAREA";
|
|
10664
|
-
};
|
|
10665
|
-
var elementCanBeScrolled = function(node2, overflow) {
|
|
10666
|
-
if (!(node2 instanceof Element)) {
|
|
10667
|
-
return false;
|
|
10668
|
-
}
|
|
10669
|
-
var styles = window.getComputedStyle(node2);
|
|
10670
|
-
return (
|
|
10671
|
-
// not-not-scrollable
|
|
10672
|
-
styles[overflow] !== "hidden" && // contains scroll inside self
|
|
10673
|
-
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node2) && styles[overflow] === "visible")
|
|
10674
|
-
);
|
|
10675
|
-
};
|
|
10676
|
-
var elementCouldBeVScrolled = function(node2) {
|
|
10677
|
-
return elementCanBeScrolled(node2, "overflowY");
|
|
10678
|
-
};
|
|
10679
|
-
var elementCouldBeHScrolled = function(node2) {
|
|
10680
|
-
return elementCanBeScrolled(node2, "overflowX");
|
|
10681
|
-
};
|
|
10682
|
-
var locationCouldBeScrolled = function(axis, node2) {
|
|
10683
|
-
var ownerDocument = node2.ownerDocument;
|
|
10684
|
-
var current2 = node2;
|
|
10685
|
-
do {
|
|
10686
|
-
if (typeof ShadowRoot !== "undefined" && current2 instanceof ShadowRoot) {
|
|
10687
|
-
current2 = current2.host;
|
|
10688
|
-
}
|
|
10689
|
-
var isScrollable = elementCouldBeScrolled(axis, current2);
|
|
10690
|
-
if (isScrollable) {
|
|
10691
|
-
var _a = getScrollVariables(axis, current2), scrollHeight = _a[1], clientHeight = _a[2];
|
|
10692
|
-
if (scrollHeight > clientHeight) {
|
|
10693
|
-
return true;
|
|
10694
|
-
}
|
|
10695
|
-
}
|
|
10696
|
-
current2 = current2.parentNode;
|
|
10697
|
-
} while (current2 && current2 !== ownerDocument.body);
|
|
10698
|
-
return false;
|
|
10699
|
-
};
|
|
10700
|
-
var getVScrollVariables = function(_a) {
|
|
10701
|
-
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
10702
|
-
return [
|
|
10703
|
-
scrollTop,
|
|
10704
|
-
scrollHeight,
|
|
10705
|
-
clientHeight
|
|
10706
|
-
];
|
|
10707
|
-
};
|
|
10708
|
-
var getHScrollVariables = function(_a) {
|
|
10709
|
-
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
10710
|
-
return [
|
|
10711
|
-
scrollLeft,
|
|
10712
|
-
scrollWidth,
|
|
10713
|
-
clientWidth
|
|
10714
|
-
];
|
|
10715
|
-
};
|
|
10716
|
-
var elementCouldBeScrolled = function(axis, node2) {
|
|
10717
|
-
return axis === "v" ? elementCouldBeVScrolled(node2) : elementCouldBeHScrolled(node2);
|
|
10718
|
-
};
|
|
10719
|
-
var getScrollVariables = function(axis, node2) {
|
|
10720
|
-
return axis === "v" ? getVScrollVariables(node2) : getHScrollVariables(node2);
|
|
10721
|
-
};
|
|
10722
|
-
var getDirectionFactor = function(axis, direction) {
|
|
10723
|
-
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
10724
|
-
};
|
|
10725
|
-
var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
10726
|
-
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
10727
|
-
var delta = directionFactor * sourceDelta;
|
|
10728
|
-
var target = event.target;
|
|
10729
|
-
var targetInLock = endTarget.contains(target);
|
|
10730
|
-
var shouldCancelScroll = false;
|
|
10731
|
-
var isDeltaPositive = delta > 0;
|
|
10732
|
-
var availableScroll = 0;
|
|
10733
|
-
var availableScrollTop = 0;
|
|
10734
|
-
do {
|
|
10735
|
-
if (!target) {
|
|
10736
|
-
break;
|
|
10737
|
-
}
|
|
10738
|
-
var _a = getScrollVariables(axis, target), position2 = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
10739
|
-
var elementScroll = scroll_1 - capacity - directionFactor * position2;
|
|
10740
|
-
if (position2 || elementScroll) {
|
|
10741
|
-
if (elementCouldBeScrolled(axis, target)) {
|
|
10742
|
-
availableScroll += elementScroll;
|
|
10743
|
-
availableScrollTop += position2;
|
|
10744
|
-
}
|
|
10745
|
-
}
|
|
10746
|
-
var parent_1 = target.parentNode;
|
|
10747
|
-
target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
|
|
10748
|
-
} while (
|
|
10749
|
-
// portaled content
|
|
10750
|
-
!targetInLock && target !== document.body || // self content
|
|
10751
|
-
targetInLock && (endTarget.contains(target) || endTarget === target)
|
|
10752
|
-
);
|
|
10753
|
-
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
10754
|
-
shouldCancelScroll = true;
|
|
10755
|
-
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
10756
|
-
shouldCancelScroll = true;
|
|
10757
|
-
}
|
|
10758
|
-
return shouldCancelScroll;
|
|
10759
|
-
};
|
|
10760
|
-
|
|
10761
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
10762
|
-
var getTouchXY = function(event) {
|
|
10763
|
-
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
10764
|
-
};
|
|
10765
|
-
var getDeltaXY = function(event) {
|
|
10766
|
-
return [event.deltaX, event.deltaY];
|
|
10767
|
-
};
|
|
10768
|
-
var extractRef = function(ref2) {
|
|
10769
|
-
return ref2 && "current" in ref2 ? ref2.current : ref2;
|
|
10770
|
-
};
|
|
10771
|
-
var deltaCompare = function(x, y) {
|
|
10772
|
-
return x[0] === y[0] && x[1] === y[1];
|
|
10773
|
-
};
|
|
10774
|
-
var generateStyle = function(id) {
|
|
10775
|
-
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
|
10776
|
-
};
|
|
10777
|
-
var idCounter = 0;
|
|
10778
|
-
var lockStack = [];
|
|
10779
|
-
function RemoveScrollSideCar(props) {
|
|
10780
|
-
var shouldPreventQueue = React52.useRef([]);
|
|
10781
|
-
var touchStartRef = React52.useRef([0, 0]);
|
|
10782
|
-
var activeAxis = React52.useRef();
|
|
10783
|
-
var id = React52.useState(idCounter++)[0];
|
|
10784
|
-
var Style2 = React52.useState(styleSingleton)[0];
|
|
10785
|
-
var lastProps = React52.useRef(props);
|
|
10786
|
-
React52.useEffect(function() {
|
|
10787
|
-
lastProps.current = props;
|
|
10788
|
-
}, [props]);
|
|
10789
|
-
React52.useEffect(function() {
|
|
10790
|
-
if (props.inert) {
|
|
10791
|
-
document.body.classList.add("block-interactivity-".concat(id));
|
|
10792
|
-
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
10793
|
-
allow_1.forEach(function(el) {
|
|
10794
|
-
return el.classList.add("allow-interactivity-".concat(id));
|
|
10795
|
-
});
|
|
10796
|
-
return function() {
|
|
10797
|
-
document.body.classList.remove("block-interactivity-".concat(id));
|
|
10798
|
-
allow_1.forEach(function(el) {
|
|
10799
|
-
return el.classList.remove("allow-interactivity-".concat(id));
|
|
10800
|
-
});
|
|
10801
|
-
};
|
|
10802
|
-
}
|
|
10803
|
-
return;
|
|
10804
|
-
}, [props.inert, props.lockRef.current, props.shards]);
|
|
10805
|
-
var shouldCancelEvent = React52.useCallback(function(event, parent) {
|
|
10806
|
-
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
10807
|
-
return !lastProps.current.allowPinchZoom;
|
|
10808
|
-
}
|
|
10809
|
-
var touch = getTouchXY(event);
|
|
10810
|
-
var touchStart = touchStartRef.current;
|
|
10811
|
-
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
10812
|
-
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
|
10813
|
-
var currentAxis;
|
|
10814
|
-
var target = event.target;
|
|
10815
|
-
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
10816
|
-
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
10817
|
-
return false;
|
|
10818
|
-
}
|
|
10819
|
-
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
10820
|
-
if (!canBeScrolledInMainDirection) {
|
|
10821
|
-
return true;
|
|
10822
|
-
}
|
|
10823
|
-
if (canBeScrolledInMainDirection) {
|
|
10824
|
-
currentAxis = moveDirection;
|
|
10825
|
-
} else {
|
|
10826
|
-
currentAxis = moveDirection === "v" ? "h" : "v";
|
|
10827
|
-
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
10828
|
-
}
|
|
10829
|
-
if (!canBeScrolledInMainDirection) {
|
|
10830
|
-
return false;
|
|
10831
|
-
}
|
|
10832
|
-
if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
|
|
10833
|
-
activeAxis.current = currentAxis;
|
|
10834
|
-
}
|
|
10835
|
-
if (!currentAxis) {
|
|
10836
|
-
return true;
|
|
10837
|
-
}
|
|
10838
|
-
var cancelingAxis = activeAxis.current || currentAxis;
|
|
10839
|
-
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
10840
|
-
}, []);
|
|
10841
|
-
var shouldPrevent = React52.useCallback(function(_event) {
|
|
10842
|
-
var event = _event;
|
|
10843
|
-
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
10844
|
-
return;
|
|
10845
|
-
}
|
|
10846
|
-
var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
|
|
10847
|
-
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
10848
|
-
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
10849
|
-
})[0];
|
|
10850
|
-
if (sourceEvent && sourceEvent.should) {
|
|
10851
|
-
if (event.cancelable) {
|
|
10852
|
-
event.preventDefault();
|
|
10853
|
-
}
|
|
10854
|
-
return;
|
|
10855
|
-
}
|
|
10856
|
-
if (!sourceEvent) {
|
|
10857
|
-
var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node2) {
|
|
10858
|
-
return node2.contains(event.target);
|
|
10859
|
-
});
|
|
10860
|
-
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
10861
|
-
if (shouldStop) {
|
|
10862
|
-
if (event.cancelable) {
|
|
10863
|
-
event.preventDefault();
|
|
10864
|
-
}
|
|
10865
|
-
}
|
|
10866
|
-
}
|
|
10867
|
-
}, []);
|
|
10868
|
-
var shouldCancel = React52.useCallback(function(name2, delta, target, should) {
|
|
10869
|
-
var event = { name: name2, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
10870
|
-
shouldPreventQueue.current.push(event);
|
|
10871
|
-
setTimeout(function() {
|
|
10872
|
-
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
10873
|
-
return e !== event;
|
|
10874
|
-
});
|
|
10875
|
-
}, 1);
|
|
10876
|
-
}, []);
|
|
10877
|
-
var scrollTouchStart = React52.useCallback(function(event) {
|
|
10878
|
-
touchStartRef.current = getTouchXY(event);
|
|
10879
|
-
activeAxis.current = void 0;
|
|
10880
|
-
}, []);
|
|
10881
|
-
var scrollWheel = React52.useCallback(function(event) {
|
|
10882
|
-
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
10883
|
-
}, []);
|
|
10884
|
-
var scrollTouchMove = React52.useCallback(function(event) {
|
|
10885
|
-
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
10886
|
-
}, []);
|
|
10887
|
-
React52.useEffect(function() {
|
|
10888
|
-
lockStack.push(Style2);
|
|
10889
|
-
props.setCallbacks({
|
|
10890
|
-
onScrollCapture: scrollWheel,
|
|
10891
|
-
onWheelCapture: scrollWheel,
|
|
10892
|
-
onTouchMoveCapture: scrollTouchMove
|
|
10893
|
-
});
|
|
10894
|
-
document.addEventListener("wheel", shouldPrevent, nonPassive);
|
|
10895
|
-
document.addEventListener("touchmove", shouldPrevent, nonPassive);
|
|
10896
|
-
document.addEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
10897
|
-
return function() {
|
|
10898
|
-
lockStack = lockStack.filter(function(inst) {
|
|
10899
|
-
return inst !== Style2;
|
|
10900
|
-
});
|
|
10901
|
-
document.removeEventListener("wheel", shouldPrevent, nonPassive);
|
|
10902
|
-
document.removeEventListener("touchmove", shouldPrevent, nonPassive);
|
|
10903
|
-
document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
10904
|
-
};
|
|
10905
|
-
}, []);
|
|
10906
|
-
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
10907
|
-
return React52.createElement(
|
|
10908
|
-
React52.Fragment,
|
|
10909
|
-
null,
|
|
10910
|
-
inert ? React52.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
10911
|
-
removeScrollBar ? React52.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
10912
|
-
);
|
|
10913
|
-
}
|
|
10914
|
-
function getOutermostShadowParent(node2) {
|
|
10915
|
-
var shadowParent = null;
|
|
10916
|
-
while (node2 !== null) {
|
|
10917
|
-
if (node2 instanceof ShadowRoot) {
|
|
10918
|
-
shadowParent = node2.host;
|
|
10919
|
-
node2 = node2.host;
|
|
10920
|
-
}
|
|
10921
|
-
node2 = node2.parentNode;
|
|
10922
|
-
}
|
|
10923
|
-
return shadowParent;
|
|
10924
|
-
}
|
|
10925
|
-
|
|
10926
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
10927
|
-
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
10928
|
-
|
|
10929
|
-
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
10930
|
-
var ReactRemoveScroll = React53.forwardRef(function(props, ref2) {
|
|
10931
|
-
return React53.createElement(RemoveScroll, __assign({}, props, { ref: ref2, sideCar: sidecar_default }));
|
|
10932
|
-
});
|
|
10933
|
-
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
10934
|
-
var Combination_default = ReactRemoveScroll;
|
|
10935
|
-
|
|
10936
|
-
// ../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
|
|
10937
|
-
var getDefaultParent = function(originalTarget) {
|
|
10938
|
-
if (typeof document === "undefined") {
|
|
10939
|
-
return null;
|
|
10940
|
-
}
|
|
10941
|
-
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
10942
|
-
return sampleTarget.ownerDocument.body;
|
|
10943
|
-
};
|
|
10944
|
-
var counterMap = /* @__PURE__ */ new WeakMap();
|
|
10945
|
-
var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
10946
|
-
var markerMap = {};
|
|
10947
|
-
var lockCount = 0;
|
|
10948
|
-
var unwrapHost = function(node2) {
|
|
10949
|
-
return node2 && (node2.host || unwrapHost(node2.parentNode));
|
|
10950
|
-
};
|
|
10951
|
-
var correctTargets = function(parent, targets) {
|
|
10952
|
-
return targets.map(function(target) {
|
|
10953
|
-
if (parent.contains(target)) {
|
|
10954
|
-
return target;
|
|
10955
|
-
}
|
|
10956
|
-
var correctedTarget = unwrapHost(target);
|
|
10957
|
-
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
10958
|
-
return correctedTarget;
|
|
10959
|
-
}
|
|
10960
|
-
console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
|
|
10961
|
-
return null;
|
|
10962
|
-
}).filter(function(x) {
|
|
10963
|
-
return Boolean(x);
|
|
10964
|
-
});
|
|
10965
|
-
};
|
|
10966
|
-
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
|
|
10967
|
-
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
10968
|
-
if (!markerMap[markerName]) {
|
|
10969
|
-
markerMap[markerName] = /* @__PURE__ */ new WeakMap();
|
|
10970
|
-
}
|
|
10971
|
-
var markerCounter = markerMap[markerName];
|
|
10972
|
-
var hiddenNodes = [];
|
|
10973
|
-
var elementsToKeep = /* @__PURE__ */ new Set();
|
|
10974
|
-
var elementsToStop = new Set(targets);
|
|
10975
|
-
var keep = function(el) {
|
|
10976
|
-
if (!el || elementsToKeep.has(el)) {
|
|
10977
|
-
return;
|
|
10978
|
-
}
|
|
10979
|
-
elementsToKeep.add(el);
|
|
10980
|
-
keep(el.parentNode);
|
|
10981
|
-
};
|
|
10982
|
-
targets.forEach(keep);
|
|
10983
|
-
var deep = function(parent) {
|
|
10984
|
-
if (!parent || elementsToStop.has(parent)) {
|
|
10985
|
-
return;
|
|
10986
|
-
}
|
|
10987
|
-
Array.prototype.forEach.call(parent.children, function(node2) {
|
|
10988
|
-
if (elementsToKeep.has(node2)) {
|
|
10989
|
-
deep(node2);
|
|
10990
|
-
} else {
|
|
10991
|
-
try {
|
|
10992
|
-
var attr = node2.getAttribute(controlAttribute);
|
|
10993
|
-
var alreadyHidden = attr !== null && attr !== "false";
|
|
10994
|
-
var counterValue = (counterMap.get(node2) || 0) + 1;
|
|
10995
|
-
var markerValue = (markerCounter.get(node2) || 0) + 1;
|
|
10996
|
-
counterMap.set(node2, counterValue);
|
|
10997
|
-
markerCounter.set(node2, markerValue);
|
|
10998
|
-
hiddenNodes.push(node2);
|
|
10999
|
-
if (counterValue === 1 && alreadyHidden) {
|
|
11000
|
-
uncontrolledNodes.set(node2, true);
|
|
11001
|
-
}
|
|
11002
|
-
if (markerValue === 1) {
|
|
11003
|
-
node2.setAttribute(markerName, "true");
|
|
11004
|
-
}
|
|
11005
|
-
if (!alreadyHidden) {
|
|
11006
|
-
node2.setAttribute(controlAttribute, "true");
|
|
11007
|
-
}
|
|
11008
|
-
} catch (e) {
|
|
11009
|
-
console.error("aria-hidden: cannot operate on ", node2, e);
|
|
11010
|
-
}
|
|
11011
|
-
}
|
|
11012
|
-
});
|
|
11013
|
-
};
|
|
11014
|
-
deep(parentNode);
|
|
11015
|
-
elementsToKeep.clear();
|
|
11016
|
-
lockCount++;
|
|
11017
|
-
return function() {
|
|
11018
|
-
hiddenNodes.forEach(function(node2) {
|
|
11019
|
-
var counterValue = counterMap.get(node2) - 1;
|
|
11020
|
-
var markerValue = markerCounter.get(node2) - 1;
|
|
11021
|
-
counterMap.set(node2, counterValue);
|
|
11022
|
-
markerCounter.set(node2, markerValue);
|
|
11023
|
-
if (!counterValue) {
|
|
11024
|
-
if (!uncontrolledNodes.has(node2)) {
|
|
11025
|
-
node2.removeAttribute(controlAttribute);
|
|
11026
|
-
}
|
|
11027
|
-
uncontrolledNodes.delete(node2);
|
|
11028
|
-
}
|
|
11029
|
-
if (!markerValue) {
|
|
11030
|
-
node2.removeAttribute(markerName);
|
|
11031
|
-
}
|
|
11032
|
-
});
|
|
11033
|
-
lockCount--;
|
|
11034
|
-
if (!lockCount) {
|
|
11035
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
11036
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
11037
|
-
uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
11038
|
-
markerMap = {};
|
|
11039
|
-
}
|
|
11040
|
-
};
|
|
11041
|
-
};
|
|
11042
|
-
var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
11043
|
-
if (markerName === void 0) {
|
|
11044
|
-
markerName = "data-aria-hidden";
|
|
11045
|
-
}
|
|
11046
|
-
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
11047
|
-
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
11048
|
-
if (!activeParentNode) {
|
|
11049
|
-
return function() {
|
|
11050
|
-
return null;
|
|
11051
|
-
};
|
|
11052
|
-
}
|
|
11053
|
-
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
|
|
11054
|
-
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
11055
|
-
};
|
|
11056
|
-
|
|
11057
|
-
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
11058
|
-
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
11059
|
-
var DIALOG_NAME = "Dialog";
|
|
11060
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
11061
|
-
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
11062
|
-
var Dialog = (props) => {
|
|
11063
|
-
const {
|
|
11064
|
-
__scopeDialog,
|
|
11065
|
-
children,
|
|
11066
|
-
open: openProp,
|
|
11067
|
-
defaultOpen,
|
|
11068
|
-
onOpenChange,
|
|
11069
|
-
modal = true
|
|
11070
|
-
} = props;
|
|
11071
|
-
const triggerRef = React54.useRef(null);
|
|
11072
|
-
const contentRef = React54.useRef(null);
|
|
11073
|
-
const [open, setOpen] = useControllableState({
|
|
11074
|
-
prop: openProp,
|
|
11075
|
-
defaultProp: defaultOpen != null ? defaultOpen : false,
|
|
11076
|
-
onChange: onOpenChange,
|
|
11077
|
-
caller: DIALOG_NAME
|
|
11078
|
-
});
|
|
11079
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11080
|
-
DialogProvider,
|
|
11081
|
-
{
|
|
11082
|
-
scope: __scopeDialog,
|
|
11083
|
-
triggerRef,
|
|
11084
|
-
contentRef,
|
|
11085
|
-
contentId: useId(),
|
|
11086
|
-
titleId: useId(),
|
|
11087
|
-
descriptionId: useId(),
|
|
11088
|
-
open,
|
|
11089
|
-
onOpenChange: setOpen,
|
|
11090
|
-
onOpenToggle: React54.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
11091
|
-
modal,
|
|
11092
|
-
children
|
|
11093
|
-
}
|
|
11094
|
-
);
|
|
11095
|
-
};
|
|
11096
|
-
Dialog.displayName = DIALOG_NAME;
|
|
11097
|
-
var TRIGGER_NAME = "DialogTrigger";
|
|
11098
|
-
var DialogTrigger = React54.forwardRef(
|
|
11099
|
-
(props, forwardedRef) => {
|
|
11100
|
-
const _a = props, { __scopeDialog } = _a, triggerProps = __objRest(_a, ["__scopeDialog"]);
|
|
11101
|
-
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
11102
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
11103
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11104
|
-
Primitive.button,
|
|
11105
|
-
__spreadProps(__spreadValues({
|
|
11106
|
-
type: "button",
|
|
11107
|
-
"aria-haspopup": "dialog",
|
|
11108
|
-
"aria-expanded": context.open,
|
|
11109
|
-
"aria-controls": context.contentId,
|
|
11110
|
-
"data-state": getState(context.open)
|
|
11111
|
-
}, triggerProps), {
|
|
11112
|
-
ref: composedTriggerRef,
|
|
11113
|
-
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
11114
|
-
})
|
|
11115
|
-
);
|
|
11116
|
-
}
|
|
11117
|
-
);
|
|
11118
|
-
DialogTrigger.displayName = TRIGGER_NAME;
|
|
11119
|
-
var PORTAL_NAME2 = "DialogPortal";
|
|
11120
|
-
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
11121
|
-
forceMount: void 0
|
|
11122
|
-
});
|
|
11123
|
-
var DialogPortal = (props) => {
|
|
11124
|
-
const { __scopeDialog, forceMount, children, container } = props;
|
|
11125
|
-
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
11126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React54.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
|
11127
|
-
};
|
|
11128
|
-
DialogPortal.displayName = PORTAL_NAME2;
|
|
11129
|
-
var OVERLAY_NAME = "DialogOverlay";
|
|
11130
|
-
var DialogOverlay = React54.forwardRef(
|
|
11131
|
-
(props, forwardedRef) => {
|
|
11132
|
-
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
11133
|
-
const _a = props, { forceMount = portalContext.forceMount } = _a, overlayProps = __objRest(_a, ["forceMount"]);
|
|
11134
|
-
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
11135
|
-
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogOverlayImpl, __spreadProps(__spreadValues({}, overlayProps), { ref: forwardedRef })) }) : null;
|
|
11136
|
-
}
|
|
11137
|
-
);
|
|
11138
|
-
DialogOverlay.displayName = OVERLAY_NAME;
|
|
11139
|
-
var Slot2 = createSlot("DialogOverlay.RemoveScroll");
|
|
11140
|
-
var DialogOverlayImpl = React54.forwardRef(
|
|
11141
|
-
(props, forwardedRef) => {
|
|
11142
|
-
const _a = props, { __scopeDialog } = _a, overlayProps = __objRest(_a, ["__scopeDialog"]);
|
|
11143
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
11144
|
-
return (
|
|
11145
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
11146
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
11147
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11148
|
-
Primitive.div,
|
|
11149
|
-
__spreadProps(__spreadValues({
|
|
11150
|
-
"data-state": getState(context.open)
|
|
11151
|
-
}, overlayProps), {
|
|
11152
|
-
ref: forwardedRef,
|
|
11153
|
-
style: __spreadValues({ pointerEvents: "auto" }, overlayProps.style)
|
|
11154
|
-
})
|
|
11155
|
-
) })
|
|
11156
|
-
);
|
|
11157
|
-
}
|
|
11158
|
-
);
|
|
11159
|
-
var CONTENT_NAME = "DialogContent";
|
|
11160
|
-
var DialogContent = React54.forwardRef(
|
|
11161
|
-
(props, forwardedRef) => {
|
|
11162
|
-
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
11163
|
-
const _a = props, { forceMount = portalContext.forceMount } = _a, contentProps = __objRest(_a, ["forceMount"]);
|
|
11164
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
11165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogContentModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogContentNonModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) });
|
|
11166
|
-
}
|
|
11167
|
-
);
|
|
11168
|
-
DialogContent.displayName = CONTENT_NAME;
|
|
11169
|
-
var DialogContentModal = React54.forwardRef(
|
|
11170
|
-
(props, forwardedRef) => {
|
|
11171
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
11172
|
-
const contentRef = React54.useRef(null);
|
|
11173
|
-
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
11174
|
-
React54.useEffect(() => {
|
|
11175
|
-
const content3 = contentRef.current;
|
|
11176
|
-
if (content3) return hideOthers(content3);
|
|
11177
|
-
}, []);
|
|
11178
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11179
|
-
DialogContentImpl,
|
|
11180
|
-
__spreadProps(__spreadValues({}, props), {
|
|
11181
|
-
ref: composedRefs,
|
|
11182
|
-
trapFocus: context.open,
|
|
11183
|
-
disableOutsidePointerEvents: true,
|
|
11184
|
-
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
11185
|
-
var _a;
|
|
11186
|
-
event.preventDefault();
|
|
11187
|
-
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
|
11188
|
-
}),
|
|
11189
|
-
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
11190
|
-
const originalEvent = event.detail.originalEvent;
|
|
11191
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
11192
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
11193
|
-
if (isRightClick) event.preventDefault();
|
|
11194
|
-
}),
|
|
11195
|
-
onFocusOutside: composeEventHandlers(
|
|
11196
|
-
props.onFocusOutside,
|
|
11197
|
-
(event) => event.preventDefault()
|
|
11198
|
-
)
|
|
11199
|
-
})
|
|
11200
|
-
);
|
|
11201
|
-
}
|
|
11202
|
-
);
|
|
11203
|
-
var DialogContentNonModal = React54.forwardRef(
|
|
11204
|
-
(props, forwardedRef) => {
|
|
11205
|
-
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
11206
|
-
const hasInteractedOutsideRef = React54.useRef(false);
|
|
11207
|
-
const hasPointerDownOutsideRef = React54.useRef(false);
|
|
11208
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11209
|
-
DialogContentImpl,
|
|
11210
|
-
__spreadProps(__spreadValues({}, props), {
|
|
11211
|
-
ref: forwardedRef,
|
|
11212
|
-
trapFocus: false,
|
|
11213
|
-
disableOutsidePointerEvents: false,
|
|
11214
|
-
onCloseAutoFocus: (event) => {
|
|
11215
|
-
var _a, _b;
|
|
11216
|
-
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
|
11217
|
-
if (!event.defaultPrevented) {
|
|
11218
|
-
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
|
11219
|
-
event.preventDefault();
|
|
11220
|
-
}
|
|
11221
|
-
hasInteractedOutsideRef.current = false;
|
|
11222
|
-
hasPointerDownOutsideRef.current = false;
|
|
11223
|
-
},
|
|
11224
|
-
onInteractOutside: (event) => {
|
|
11225
|
-
var _a, _b;
|
|
11226
|
-
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
|
11227
|
-
if (!event.defaultPrevented) {
|
|
11228
|
-
hasInteractedOutsideRef.current = true;
|
|
11229
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
11230
|
-
hasPointerDownOutsideRef.current = true;
|
|
11231
|
-
}
|
|
11232
|
-
}
|
|
11233
|
-
const target = event.target;
|
|
11234
|
-
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
|
11235
|
-
if (targetIsTrigger) event.preventDefault();
|
|
11236
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
11237
|
-
event.preventDefault();
|
|
11238
|
-
}
|
|
11239
|
-
}
|
|
11240
|
-
})
|
|
11241
|
-
);
|
|
11242
|
-
}
|
|
11243
|
-
);
|
|
11244
|
-
var DialogContentImpl = React54.forwardRef(
|
|
11245
|
-
(props, forwardedRef) => {
|
|
11246
|
-
const _a = props, { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus } = _a, contentProps = __objRest(_a, ["__scopeDialog", "trapFocus", "onOpenAutoFocus", "onCloseAutoFocus"]);
|
|
11247
|
-
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
11248
|
-
const contentRef = React54.useRef(null);
|
|
11249
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
11250
|
-
useFocusGuards();
|
|
11251
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
11252
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11253
|
-
FocusScope,
|
|
11254
|
-
{
|
|
11255
|
-
asChild: true,
|
|
11256
|
-
loop: true,
|
|
11257
|
-
trapped: trapFocus,
|
|
11258
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
11259
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
11260
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11261
|
-
DismissableLayer,
|
|
11262
|
-
__spreadProps(__spreadValues({
|
|
11263
|
-
role: "dialog",
|
|
11264
|
-
id: context.contentId,
|
|
11265
|
-
"aria-describedby": context.descriptionId,
|
|
11266
|
-
"aria-labelledby": context.titleId,
|
|
11267
|
-
"data-state": getState(context.open)
|
|
11268
|
-
}, contentProps), {
|
|
11269
|
-
ref: composedRefs,
|
|
11270
|
-
onDismiss: () => context.onOpenChange(false)
|
|
11271
|
-
})
|
|
11272
|
-
)
|
|
11273
|
-
}
|
|
11274
|
-
),
|
|
11275
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
11276
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
11277
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
11278
|
-
] })
|
|
11279
|
-
] });
|
|
11280
|
-
}
|
|
11281
|
-
);
|
|
11282
|
-
var TITLE_NAME = "DialogTitle";
|
|
11283
|
-
var DialogTitle = React54.forwardRef(
|
|
11284
|
-
(props, forwardedRef) => {
|
|
11285
|
-
const _a = props, { __scopeDialog } = _a, titleProps = __objRest(_a, ["__scopeDialog"]);
|
|
11286
|
-
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
11287
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Primitive.h2, __spreadProps(__spreadValues({ id: context.titleId }, titleProps), { ref: forwardedRef }));
|
|
11288
|
-
}
|
|
11289
|
-
);
|
|
11290
|
-
DialogTitle.displayName = TITLE_NAME;
|
|
11291
|
-
var DESCRIPTION_NAME = "DialogDescription";
|
|
11292
|
-
var DialogDescription = React54.forwardRef(
|
|
11293
|
-
(props, forwardedRef) => {
|
|
11294
|
-
const _a = props, { __scopeDialog } = _a, descriptionProps = __objRest(_a, ["__scopeDialog"]);
|
|
11295
|
-
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
11296
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Primitive.p, __spreadProps(__spreadValues({ id: context.descriptionId }, descriptionProps), { ref: forwardedRef }));
|
|
11297
|
-
}
|
|
11298
|
-
);
|
|
11299
|
-
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
11300
|
-
var CLOSE_NAME = "DialogClose";
|
|
11301
|
-
var DialogClose = React54.forwardRef(
|
|
11302
|
-
(props, forwardedRef) => {
|
|
11303
|
-
const _a = props, { __scopeDialog } = _a, closeProps = __objRest(_a, ["__scopeDialog"]);
|
|
11304
|
-
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
11305
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
11306
|
-
Primitive.button,
|
|
11307
|
-
__spreadProps(__spreadValues({
|
|
11308
|
-
type: "button"
|
|
11309
|
-
}, closeProps), {
|
|
11310
|
-
ref: forwardedRef,
|
|
11311
|
-
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
11312
|
-
})
|
|
11313
|
-
);
|
|
11314
|
-
}
|
|
11315
|
-
);
|
|
11316
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
11317
|
-
function getState(open) {
|
|
11318
|
-
return open ? "open" : "closed";
|
|
11319
|
-
}
|
|
11320
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
11321
|
-
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
11322
|
-
contentName: CONTENT_NAME,
|
|
11323
|
-
titleName: TITLE_NAME,
|
|
11324
|
-
docsSlug: "dialog"
|
|
11325
|
-
});
|
|
11326
|
-
var TitleWarning = ({ titleId }) => {
|
|
11327
|
-
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
11328
|
-
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
11329
|
-
|
|
11330
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
11331
|
-
|
|
11332
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
11333
|
-
React54.useEffect(() => {
|
|
11334
|
-
if (titleId) {
|
|
11335
|
-
const hasTitle = document.getElementById(titleId);
|
|
11336
|
-
if (!hasTitle) console.error(MESSAGE);
|
|
11337
|
-
}
|
|
11338
|
-
}, [MESSAGE, titleId]);
|
|
11339
|
-
return null;
|
|
11340
|
-
};
|
|
11341
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
11342
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
11343
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
11344
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
11345
|
-
React54.useEffect(() => {
|
|
11346
|
-
var _a;
|
|
11347
|
-
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
|
11348
|
-
if (descriptionId && describedById) {
|
|
11349
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
11350
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
11351
|
-
}
|
|
11352
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
11353
|
-
return null;
|
|
11354
|
-
};
|
|
11355
|
-
var Root = Dialog;
|
|
11356
|
-
var Trigger = DialogTrigger;
|
|
11357
|
-
var Portal2 = DialogPortal;
|
|
11358
|
-
var Overlay = DialogOverlay;
|
|
11359
|
-
var Content = DialogContent;
|
|
11360
|
-
var Title = DialogTitle;
|
|
11361
|
-
var Description = DialogDescription;
|
|
11362
|
-
var Close = DialogClose;
|
|
11363
|
-
|
|
11364
|
-
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
11365
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
11366
|
-
var ROOT_NAME = "AlertDialog";
|
|
11367
|
-
var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
11368
|
-
createDialogScope
|
|
11369
|
-
]);
|
|
11370
|
-
var useDialogScope = createDialogScope();
|
|
11371
|
-
var AlertDialog = (props) => {
|
|
11372
|
-
const _a = props, { __scopeAlertDialog } = _a, alertDialogProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11373
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11374
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Root, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), alertDialogProps), { modal: true }));
|
|
11375
|
-
};
|
|
11376
|
-
AlertDialog.displayName = ROOT_NAME;
|
|
11377
|
-
var TRIGGER_NAME2 = "AlertDialogTrigger";
|
|
11378
|
-
var AlertDialogTrigger = React55.forwardRef(
|
|
11379
|
-
(props, forwardedRef) => {
|
|
11380
|
-
const _a = props, { __scopeAlertDialog } = _a, triggerProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11381
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11382
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Trigger, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), triggerProps), { ref: forwardedRef }));
|
|
11383
|
-
}
|
|
11384
|
-
);
|
|
11385
|
-
AlertDialogTrigger.displayName = TRIGGER_NAME2;
|
|
11386
|
-
var PORTAL_NAME3 = "AlertDialogPortal";
|
|
11387
|
-
var AlertDialogPortal = (props) => {
|
|
11388
|
-
const _a = props, { __scopeAlertDialog } = _a, portalProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11389
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11390
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Portal2, __spreadValues(__spreadValues({}, dialogScope), portalProps));
|
|
11391
|
-
};
|
|
11392
|
-
AlertDialogPortal.displayName = PORTAL_NAME3;
|
|
11393
|
-
var OVERLAY_NAME2 = "AlertDialogOverlay";
|
|
11394
|
-
var AlertDialogOverlay = React55.forwardRef(
|
|
11395
|
-
(props, forwardedRef) => {
|
|
11396
|
-
const _a = props, { __scopeAlertDialog } = _a, overlayProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11397
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11398
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Overlay, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), overlayProps), { ref: forwardedRef }));
|
|
11399
|
-
}
|
|
11400
|
-
);
|
|
11401
|
-
AlertDialogOverlay.displayName = OVERLAY_NAME2;
|
|
11402
|
-
var CONTENT_NAME2 = "AlertDialogContent";
|
|
11403
|
-
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME2);
|
|
11404
|
-
var Slottable = createSlottable("AlertDialogContent");
|
|
11405
|
-
var AlertDialogContent = React55.forwardRef(
|
|
11406
|
-
(props, forwardedRef) => {
|
|
11407
|
-
const _a = props, { __scopeAlertDialog, children } = _a, contentProps = __objRest(_a, ["__scopeAlertDialog", "children"]);
|
|
11408
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11409
|
-
const contentRef = React55.useRef(null);
|
|
11410
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
11411
|
-
const cancelRef = React55.useRef(null);
|
|
11412
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
11413
|
-
WarningProvider,
|
|
11414
|
-
{
|
|
11415
|
-
contentName: CONTENT_NAME2,
|
|
11416
|
-
titleName: TITLE_NAME2,
|
|
11417
|
-
docsSlug: "alert-dialog",
|
|
11418
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
11419
|
-
Content,
|
|
11420
|
-
__spreadProps(__spreadValues(__spreadValues({
|
|
11421
|
-
role: "alertdialog"
|
|
11422
|
-
}, dialogScope), contentProps), {
|
|
11423
|
-
ref: composedRefs,
|
|
11424
|
-
onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
|
|
11425
|
-
var _a2;
|
|
11426
|
-
event.preventDefault();
|
|
11427
|
-
(_a2 = cancelRef.current) == null ? void 0 : _a2.focus({ preventScroll: true });
|
|
11428
|
-
}),
|
|
11429
|
-
onPointerDownOutside: (event) => event.preventDefault(),
|
|
11430
|
-
onInteractOutside: (event) => event.preventDefault(),
|
|
11431
|
-
children: [
|
|
11432
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Slottable, { children }),
|
|
11433
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(DescriptionWarning2, { contentRef })
|
|
11434
|
-
]
|
|
11435
|
-
})
|
|
11436
|
-
) })
|
|
11437
|
-
}
|
|
11438
|
-
);
|
|
11439
|
-
}
|
|
11440
|
-
);
|
|
11441
|
-
AlertDialogContent.displayName = CONTENT_NAME2;
|
|
11442
|
-
var TITLE_NAME2 = "AlertDialogTitle";
|
|
11443
|
-
var AlertDialogTitle = React55.forwardRef(
|
|
11444
|
-
(props, forwardedRef) => {
|
|
11445
|
-
const _a = props, { __scopeAlertDialog } = _a, titleProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11446
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11447
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Title, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), titleProps), { ref: forwardedRef }));
|
|
11448
|
-
}
|
|
11449
|
-
);
|
|
11450
|
-
AlertDialogTitle.displayName = TITLE_NAME2;
|
|
11451
|
-
var DESCRIPTION_NAME2 = "AlertDialogDescription";
|
|
11452
|
-
var AlertDialogDescription = React55.forwardRef((props, forwardedRef) => {
|
|
11453
|
-
const _a = props, { __scopeAlertDialog } = _a, descriptionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11454
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11455
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Description, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), descriptionProps), { ref: forwardedRef }));
|
|
11456
|
-
});
|
|
11457
|
-
AlertDialogDescription.displayName = DESCRIPTION_NAME2;
|
|
11458
|
-
var ACTION_NAME = "AlertDialogAction";
|
|
11459
|
-
var AlertDialogAction = React55.forwardRef(
|
|
11460
|
-
(props, forwardedRef) => {
|
|
11461
|
-
const _a = props, { __scopeAlertDialog } = _a, actionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11462
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11463
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), actionProps), { ref: forwardedRef }));
|
|
11464
|
-
}
|
|
11465
|
-
);
|
|
11466
|
-
AlertDialogAction.displayName = ACTION_NAME;
|
|
11467
|
-
var CANCEL_NAME = "AlertDialogCancel";
|
|
11468
|
-
var AlertDialogCancel = React55.forwardRef(
|
|
11469
|
-
(props, forwardedRef) => {
|
|
11470
|
-
const _a = props, { __scopeAlertDialog } = _a, cancelProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
11471
|
-
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
11472
|
-
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11473
|
-
const ref2 = useComposedRefs(forwardedRef, cancelRef);
|
|
11474
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), cancelProps), { ref: ref2 }));
|
|
11475
|
-
}
|
|
11476
|
-
);
|
|
11477
|
-
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
11478
|
-
var DescriptionWarning2 = ({ contentRef }) => {
|
|
11479
|
-
const MESSAGE = `\`${CONTENT_NAME2}\` requires a description for the component to be accessible for screen reader users.
|
|
11480
|
-
|
|
11481
|
-
You can add a description to the \`${CONTENT_NAME2}\` by passing a \`${DESCRIPTION_NAME2}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
11482
|
-
|
|
11483
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME2}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
11484
|
-
|
|
11485
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
11486
|
-
React55.useEffect(() => {
|
|
11487
|
-
var _a;
|
|
11488
|
-
const hasDescription = document.getElementById(
|
|
11489
|
-
(_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby")
|
|
11490
|
-
);
|
|
11491
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
11492
|
-
}, [MESSAGE, contentRef]);
|
|
11493
|
-
return null;
|
|
11494
|
-
};
|
|
11495
|
-
var Portal22 = AlertDialogPortal;
|
|
11496
|
-
var Overlay2 = AlertDialogOverlay;
|
|
11497
|
-
var Content2 = AlertDialogContent;
|
|
11498
|
-
var Action = AlertDialogAction;
|
|
11499
|
-
var Cancel = AlertDialogCancel;
|
|
11500
|
-
var Title2 = AlertDialogTitle;
|
|
11501
|
-
var Description2 = AlertDialogDescription;
|
|
11502
|
-
|
|
11503
|
-
// ../lib/src/utils.ts
|
|
11504
|
-
var import_clsx = require("clsx");
|
|
11505
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
11506
|
-
function cn(...inputs) {
|
|
11507
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
11508
|
-
}
|
|
11509
|
-
|
|
11510
|
-
// ../base-ui/src/ui/button.tsx
|
|
11511
|
-
var React56 = __toESM(require("react"), 1);
|
|
11512
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
11513
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
11514
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
11515
|
-
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
11516
|
-
{
|
|
11517
|
-
variants: {
|
|
11518
|
-
variant: {
|
|
11519
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11520
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
11521
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
11522
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11523
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
11524
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
11525
|
-
},
|
|
11526
|
-
size: {
|
|
11527
|
-
default: "h-10 px-4 py-2",
|
|
11528
|
-
sm: "h-9 rounded-md px-3",
|
|
11529
|
-
lg: "h-11 rounded-md px-8",
|
|
11530
|
-
icon: "h-10 w-10"
|
|
11531
|
-
}
|
|
11532
|
-
},
|
|
11533
|
-
defaultVariants: {
|
|
11534
|
-
variant: "default",
|
|
11535
|
-
size: "default"
|
|
11536
|
-
}
|
|
11537
|
-
}
|
|
11538
|
-
);
|
|
11539
|
-
var Button = React56.forwardRef(
|
|
11540
|
-
(_a, ref2) => {
|
|
11541
|
-
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
11542
|
-
const Comp = asChild ? Slot : "button";
|
|
11543
|
-
if (asChild) {
|
|
11544
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
11545
|
-
Comp,
|
|
11546
|
-
__spreadProps(__spreadValues({
|
|
11547
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
11548
|
-
ref: ref2,
|
|
11549
|
-
disabled: loading || props.disabled
|
|
11550
|
-
}, props), {
|
|
11551
|
-
children
|
|
11552
|
-
})
|
|
11553
|
-
);
|
|
11554
|
-
}
|
|
11555
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
11556
|
-
Comp,
|
|
11557
|
-
__spreadProps(__spreadValues({
|
|
11558
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
11559
|
-
ref: ref2,
|
|
11560
|
-
disabled: loading || props.disabled
|
|
11561
|
-
}, props), {
|
|
11562
|
-
children: [
|
|
11563
|
-
children,
|
|
11564
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
11565
|
-
]
|
|
11566
|
-
})
|
|
11567
|
-
);
|
|
11568
|
-
}
|
|
11569
|
-
);
|
|
11570
|
-
Button.displayName = "Button";
|
|
11571
|
-
|
|
11572
|
-
// ../base-ui/src/ui/alert-dialog.tsx
|
|
11573
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
11574
|
-
var AlertDialogPortal2 = Portal22;
|
|
11575
|
-
var AlertDialogOverlay2 = React57.forwardRef((_a, ref2) => {
|
|
11576
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11577
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11578
|
-
Overlay2,
|
|
11579
|
-
__spreadProps(__spreadValues({
|
|
11580
|
-
className: cn(
|
|
11581
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
11582
|
-
className
|
|
11583
|
-
)
|
|
11584
|
-
}, props), {
|
|
11585
|
-
ref: ref2
|
|
11586
|
-
})
|
|
11587
|
-
);
|
|
11588
|
-
});
|
|
11589
|
-
AlertDialogOverlay2.displayName = Overlay2.displayName;
|
|
11590
|
-
var AlertDialogContent2 = React57.forwardRef((_a, ref2) => {
|
|
11591
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11592
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(AlertDialogPortal2, { children: [
|
|
11593
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AlertDialogOverlay2, {}),
|
|
11594
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11595
|
-
Content2,
|
|
11596
|
-
__spreadValues({
|
|
11597
|
-
ref: ref2,
|
|
11598
|
-
className: cn(
|
|
11599
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
11600
|
-
className
|
|
11601
|
-
)
|
|
11602
|
-
}, props)
|
|
11603
|
-
)
|
|
11604
|
-
] });
|
|
11605
|
-
});
|
|
11606
|
-
AlertDialogContent2.displayName = Content2.displayName;
|
|
11607
|
-
var AlertDialogHeader = (_a) => {
|
|
11608
|
-
var _b = _a, {
|
|
11609
|
-
className
|
|
11610
|
-
} = _b, props = __objRest(_b, [
|
|
11611
|
-
"className"
|
|
11612
|
-
]);
|
|
11613
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11614
|
-
"div",
|
|
11615
|
-
__spreadValues({
|
|
11616
|
-
className: cn(
|
|
11617
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
11618
|
-
className
|
|
11619
|
-
)
|
|
11620
|
-
}, props)
|
|
11621
|
-
);
|
|
11622
|
-
};
|
|
11623
|
-
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
11624
|
-
var AlertDialogFooter = (_a) => {
|
|
11625
|
-
var _b = _a, {
|
|
11626
|
-
className
|
|
11627
|
-
} = _b, props = __objRest(_b, [
|
|
11628
|
-
"className"
|
|
11629
|
-
]);
|
|
11630
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11631
|
-
"div",
|
|
11632
|
-
__spreadValues({
|
|
11633
|
-
className: cn(
|
|
11634
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
11635
|
-
className
|
|
11636
|
-
)
|
|
11637
|
-
}, props)
|
|
11638
|
-
);
|
|
11639
|
-
};
|
|
11640
|
-
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
11641
|
-
var AlertDialogTitle2 = React57.forwardRef((_a, ref2) => {
|
|
11642
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11643
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11644
|
-
Title2,
|
|
11645
|
-
__spreadValues({
|
|
11646
|
-
ref: ref2,
|
|
11647
|
-
className: cn("text-lg font-semibold", className)
|
|
11648
|
-
}, props)
|
|
11649
|
-
);
|
|
11650
|
-
});
|
|
11651
|
-
AlertDialogTitle2.displayName = Title2.displayName;
|
|
11652
|
-
var AlertDialogDescription2 = React57.forwardRef((_a, ref2) => {
|
|
11653
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11654
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11655
|
-
Description2,
|
|
11656
|
-
__spreadValues({
|
|
11657
|
-
ref: ref2,
|
|
11658
|
-
className: cn("text-sm text-muted-foreground", className)
|
|
11659
|
-
}, props)
|
|
11660
|
-
);
|
|
11661
|
-
});
|
|
11662
|
-
AlertDialogDescription2.displayName = Description2.displayName;
|
|
11663
|
-
var AlertDialogAction2 = React57.forwardRef((_a, ref2) => {
|
|
11664
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11665
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11666
|
-
Action,
|
|
11667
|
-
__spreadValues({
|
|
11668
|
-
ref: ref2,
|
|
11669
|
-
className: cn(buttonVariants(), className)
|
|
11670
|
-
}, props)
|
|
11671
|
-
);
|
|
11672
|
-
});
|
|
11673
|
-
AlertDialogAction2.displayName = Action.displayName;
|
|
11674
|
-
var AlertDialogCancel2 = React57.forwardRef((_a, ref2) => {
|
|
11675
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11676
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
11677
|
-
Cancel,
|
|
11678
|
-
__spreadValues({
|
|
11679
|
-
ref: ref2,
|
|
11680
|
-
className: cn(
|
|
11681
|
-
buttonVariants({ variant: "outline" }),
|
|
11682
|
-
"mt-2 sm:mt-0",
|
|
11683
|
-
className
|
|
11684
|
-
)
|
|
11685
|
-
}, props)
|
|
11686
|
-
);
|
|
11687
|
-
});
|
|
11688
|
-
AlertDialogCancel2.displayName = Cancel.displayName;
|
|
11689
|
-
|
|
11690
|
-
// src/fuma/mdx/mermaid.tsx
|
|
11691
|
-
var import_next_themes = require("next-themes");
|
|
11692
|
-
var import_react36 = require("react");
|
|
11693
|
-
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
11694
|
-
|
|
11695
|
-
// src/fuma/mdx/image-zoom.tsx
|
|
11696
|
-
var import_framework = require("fumadocs-core/framework");
|
|
11697
|
-
var import_react37 = require("react");
|
|
11698
|
-
var import_react_medium_image_zoom = __toESM(require("react-medium-image-zoom"));
|
|
11699
|
-
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
11700
|
-
|
|
11701
|
-
// src/fuma/mdx/trophy-card.tsx
|
|
11702
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
11703
|
-
|
|
11704
|
-
// src/fuma/mdx/image-grid.tsx
|
|
11705
|
-
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
11706
|
-
|
|
11707
|
-
// src/fuma/mdx/zia-card.tsx
|
|
11708
|
-
var import_link2 = __toESM(require("next/link"));
|
|
11709
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
11710
|
-
|
|
11711
|
-
// src/fuma/mdx/gradient-button.tsx
|
|
11712
|
-
var import_link3 = __toESM(require("next/link"));
|
|
11713
|
-
var import_react38 = __toESM(require("react"));
|
|
11714
|
-
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
11715
|
-
|
|
11716
|
-
// src/fuma/mdx/toc-base.tsx
|
|
11717
|
-
var import_react39 = require("react");
|
|
11718
|
-
var import_navigation = require("next/navigation");
|
|
11719
|
-
var import_use_copy_button = require("fumadocs-ui/utils/use-copy-button");
|
|
11720
|
-
var import_link4 = __toESM(require("fumadocs-core/link"));
|
|
11721
|
-
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
11722
|
-
function EditOnGitHub({ url }) {
|
|
11723
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
11724
|
-
import_link4.default,
|
|
11725
|
-
{
|
|
11726
|
-
className: "flex items-center gap-x-2 text-stone-600 hover:text-stone-500 dark:text-stone-400 dark:hover:text-stone-300 text-sm",
|
|
11727
|
-
href: url,
|
|
11728
|
-
children: [
|
|
11729
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(globalLucideIcons.GitHub, {}),
|
|
11730
|
-
"Edit this page on GitHub"
|
|
11731
|
-
]
|
|
11732
|
-
}
|
|
11733
|
-
);
|
|
11734
|
-
}
|
|
11735
|
-
function LastUpdatedDate({ date }) {
|
|
11736
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-x-2 text-stone-600 dark:text-stone-400 text-sm", children: [
|
|
11737
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(globalLucideIcons.LastUpdated, {}),
|
|
11738
|
-
"Lastest on ",
|
|
11739
|
-
date ? date : "Ages ago"
|
|
11740
|
-
] });
|
|
11741
|
-
}
|
|
11742
|
-
|
|
11743
|
-
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
11744
|
-
var import_next_intl = require("next-intl");
|
|
11745
|
-
|
|
11746
|
-
// src/fuma/mdx/banner.tsx
|
|
11747
|
-
var import_class_variance_authority2 = require("class-variance-authority");
|
|
11748
|
-
var import_react40 = require("react");
|
|
11749
|
-
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
11750
|
-
var buttonVariants2 = (0, import_class_variance_authority2.cva)(
|
|
11751
|
-
"inline-flex items-center justify-center rounded-md p-2 text-sm font-medium transition-colors duration-100 disabled:pointer-events-none disabled:opacity-50",
|
|
11752
|
-
{
|
|
11753
|
-
variants: {
|
|
11754
|
-
color: {
|
|
11755
|
-
primary: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
11756
|
-
outline: "border hover:bg-accent hover:text-accent-foreground",
|
|
11757
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
11758
|
-
secondary: "border bg-secondary text-secondary-foreground hover:bg-accent hover:text-accent-foreground"
|
|
11759
|
-
},
|
|
11760
|
-
size: {
|
|
11761
|
-
sm: "gap-1 px-2 py-1.5 text-xs",
|
|
11762
|
-
icon: "p-1.5 [&_svg]:size-5",
|
|
11763
|
-
"icon-sm": "p-1.5 [&_svg]:size-4.5"
|
|
11764
|
-
}
|
|
11765
|
-
}
|
|
11766
|
-
}
|
|
11767
|
-
);
|
|
9508
|
+
);
|
|
11768
9509
|
|
|
11769
9510
|
// src/fuma/mdx/fuma-banner-suit.tsx
|
|
11770
|
-
var
|
|
9511
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
11771
9512
|
|
|
11772
9513
|
// src/fuma/mdx/fuma-github-info.tsx
|
|
11773
|
-
var
|
|
11774
|
-
var
|
|
9514
|
+
var import_react40 = require("react");
|
|
9515
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
11775
9516
|
|
|
11776
9517
|
// src/fuma/mdx/site-x.tsx
|
|
11777
9518
|
var import_next_intl2 = require("next-intl");
|
|
11778
|
-
var
|
|
9519
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
11779
9520
|
|
|
11780
9521
|
// src/fuma/mdx/zia-file.tsx
|
|
11781
|
-
var
|
|
9522
|
+
var import_react41 = require("react");
|
|
11782
9523
|
var import_collapsible = require("fumadocs-ui/components/ui/collapsible");
|
|
11783
9524
|
var import_link5 = __toESM(require("next/link"));
|
|
11784
|
-
var
|
|
9525
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
11785
9526
|
|
|
11786
9527
|
// src/fuma/mdx/toc-footer-wrapper.tsx
|
|
11787
|
-
var
|
|
9528
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
11788
9529
|
function TocFooterWrapper({ lastModified, editPath, githubBaseUrl, copyButtonComponent }) {
|
|
11789
9530
|
const showEdit = githubBaseUrl && editPath;
|
|
11790
|
-
return /* @__PURE__ */ (0,
|
|
11791
|
-
/* @__PURE__ */ (0,
|
|
9531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col gap-y-2 items-start m-4", children: [
|
|
9532
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LastUpdatedDate, { date: lastModified }),
|
|
11792
9533
|
copyButtonComponent,
|
|
11793
|
-
showEdit && /* @__PURE__ */ (0,
|
|
9534
|
+
showEdit && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(EditOnGitHub, { url: `${githubBaseUrl}${editPath}` })
|
|
11794
9535
|
] });
|
|
11795
9536
|
}
|
|
11796
9537
|
|
|
11797
9538
|
// src/fuma/fuma-page-genarator.tsx
|
|
11798
|
-
var
|
|
9539
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
11799
9540
|
function createFumaPage({
|
|
11800
9541
|
sourceKey,
|
|
11801
9542
|
mdxContentSource,
|
|
@@ -11812,20 +9553,20 @@ function createFumaPage({
|
|
|
11812
9553
|
const { slug, locale } = yield params;
|
|
11813
9554
|
const page = mdxContentSource.getPage(slug, locale);
|
|
11814
9555
|
if (!page) {
|
|
11815
|
-
return /* @__PURE__ */ (0,
|
|
9556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FallbackPage, { siteIcon });
|
|
11816
9557
|
}
|
|
11817
9558
|
const path2 = githubBaseUrl ? `${mdxSourceDir}/${page.file.path}` : void 0;
|
|
11818
|
-
const tocFooterElement = /* @__PURE__ */ (0,
|
|
9559
|
+
const tocFooterElement = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11819
9560
|
TocFooterWrapper,
|
|
11820
9561
|
{
|
|
11821
9562
|
lastModified: page.data.date,
|
|
11822
|
-
copyButtonComponent: copyButtonComponent ? (0,
|
|
9563
|
+
copyButtonComponent: copyButtonComponent ? (0, import_react42.cloneElement)(copyButtonComponent, { sourceKey }) : void 0,
|
|
11823
9564
|
editPath: path2,
|
|
11824
9565
|
githubBaseUrl
|
|
11825
9566
|
}
|
|
11826
9567
|
);
|
|
11827
9568
|
const MDX = page.data.body;
|
|
11828
|
-
return /* @__PURE__ */ (0,
|
|
9569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
11829
9570
|
import_page.DocsPage,
|
|
11830
9571
|
{
|
|
11831
9572
|
tableOfContent: { style: "clerk", single: false, footer: tocFooterElement },
|
|
@@ -11834,9 +9575,9 @@ function createFumaPage({
|
|
|
11834
9575
|
full: page.data.full,
|
|
11835
9576
|
article: { className: "max-sm:pb-16" },
|
|
11836
9577
|
children: [
|
|
11837
|
-
/* @__PURE__ */ (0,
|
|
11838
|
-
/* @__PURE__ */ (0,
|
|
11839
|
-
/* @__PURE__ */ (0,
|
|
9578
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_page.DocsTitle, { children: page.data.title }),
|
|
9579
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_page.DocsDescription, { className: "mb-2", children: page.data.description }),
|
|
9580
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_page.DocsBody, { className: "text-fd-foreground/80", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MDX, { components: getMDXComponents() }) })
|
|
11840
9581
|
]
|
|
11841
9582
|
}
|
|
11842
9583
|
);
|
|
@@ -15286,9 +13027,9 @@ var SpliceBuffer = class {
|
|
|
15286
13027
|
* Any removed items.
|
|
15287
13028
|
*/
|
|
15288
13029
|
splice(start2, deleteCount, items) {
|
|
15289
|
-
const
|
|
13030
|
+
const count = deleteCount || 0;
|
|
15290
13031
|
this.setCursor(Math.trunc(start2));
|
|
15291
|
-
const removed = this.right.splice(this.right.length -
|
|
13032
|
+
const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);
|
|
15292
13033
|
if (items) chunkedPush(this.left, items);
|
|
15293
13034
|
return removed.reverse();
|
|
15294
13035
|
}
|
|
@@ -17906,7 +15647,7 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
17906
15647
|
}
|
|
17907
15648
|
|
|
17908
15649
|
// ../../node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.js
|
|
17909
|
-
function
|
|
15650
|
+
function parse(options) {
|
|
17910
15651
|
const settings = options || {};
|
|
17911
15652
|
const constructs2 = (
|
|
17912
15653
|
/** @type {FullNormalizedExtension} */
|
|
@@ -18068,7 +15809,7 @@ function fromMarkdown(value2, encoding, options) {
|
|
|
18068
15809
|
options = encoding;
|
|
18069
15810
|
encoding = void 0;
|
|
18070
15811
|
}
|
|
18071
|
-
return compiler(options)(postprocess(
|
|
15812
|
+
return compiler(options)(postprocess(parse(options).document().write(preprocess()(value2, encoding, true))));
|
|
18072
15813
|
}
|
|
18073
15814
|
function compiler(options) {
|
|
18074
15815
|
const config = {
|
|
@@ -18907,18 +16648,18 @@ function longestStreak(value2, substring) {
|
|
|
18907
16648
|
const source = String(value2);
|
|
18908
16649
|
let index2 = source.indexOf(substring);
|
|
18909
16650
|
let expected = index2;
|
|
18910
|
-
let
|
|
16651
|
+
let count = 0;
|
|
18911
16652
|
let max = 0;
|
|
18912
16653
|
if (typeof substring !== "string") {
|
|
18913
16654
|
throw new TypeError("Expected substring");
|
|
18914
16655
|
}
|
|
18915
16656
|
while (index2 !== -1) {
|
|
18916
16657
|
if (index2 === expected) {
|
|
18917
|
-
if (++
|
|
18918
|
-
max =
|
|
16658
|
+
if (++count > max) {
|
|
16659
|
+
max = count;
|
|
18919
16660
|
}
|
|
18920
16661
|
} else {
|
|
18921
|
-
|
|
16662
|
+
count = 1;
|
|
18922
16663
|
}
|
|
18923
16664
|
expected = index2 + substring.length;
|
|
18924
16665
|
index2 = source.indexOf(substring, expected);
|
|
@@ -21824,13 +19565,13 @@ function ccount(value2, character) {
|
|
|
21824
19565
|
if (typeof character !== "string") {
|
|
21825
19566
|
throw new TypeError("Expected character");
|
|
21826
19567
|
}
|
|
21827
|
-
let
|
|
19568
|
+
let count = 0;
|
|
21828
19569
|
let index2 = source.indexOf(character);
|
|
21829
19570
|
while (index2 !== -1) {
|
|
21830
|
-
|
|
19571
|
+
count++;
|
|
21831
19572
|
index2 = source.indexOf(character, index2 + character.length);
|
|
21832
19573
|
}
|
|
21833
|
-
return
|
|
19574
|
+
return count;
|
|
21834
19575
|
}
|
|
21835
19576
|
|
|
21836
19577
|
// ../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
|
|
@@ -25447,7 +23188,7 @@ var Parser = function Parser2(options, input, startPos) {
|
|
|
25447
23188
|
this.privateNameStack = [];
|
|
25448
23189
|
};
|
|
25449
23190
|
var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } };
|
|
25450
|
-
Parser.prototype.parse = function
|
|
23191
|
+
Parser.prototype.parse = function parse2() {
|
|
25451
23192
|
var node2 = this.options.program || this.startNode();
|
|
25452
23193
|
this.nextToken();
|
|
25453
23194
|
return this.parseTopLevel(node2);
|
|
@@ -25507,7 +23248,7 @@ Parser.extend = function extend2() {
|
|
|
25507
23248
|
}
|
|
25508
23249
|
return cls;
|
|
25509
23250
|
};
|
|
25510
|
-
Parser.parse = function
|
|
23251
|
+
Parser.parse = function parse3(input, options) {
|
|
25511
23252
|
return new this(options, input).parse();
|
|
25512
23253
|
};
|
|
25513
23254
|
Parser.parseExpressionAt = function parseExpressionAt(input, pos, options) {
|
|
@@ -28310,7 +26051,7 @@ pp$3.currentThisScope = function() {
|
|
|
28310
26051
|
}
|
|
28311
26052
|
}
|
|
28312
26053
|
};
|
|
28313
|
-
var
|
|
26054
|
+
var Node = function Node2(parser, pos, loc) {
|
|
28314
26055
|
this.type = "";
|
|
28315
26056
|
this.start = pos;
|
|
28316
26057
|
this.end = 0;
|
|
@@ -28326,10 +26067,10 @@ var Node2 = function Node3(parser, pos, loc) {
|
|
|
28326
26067
|
};
|
|
28327
26068
|
var pp$2 = Parser.prototype;
|
|
28328
26069
|
pp$2.startNode = function() {
|
|
28329
|
-
return new
|
|
26070
|
+
return new Node(this, this.start, this.startLoc);
|
|
28330
26071
|
};
|
|
28331
26072
|
pp$2.startNodeAt = function(pos, loc) {
|
|
28332
|
-
return new
|
|
26073
|
+
return new Node(this, pos, loc);
|
|
28333
26074
|
};
|
|
28334
26075
|
function finishNodeAt(node2, type, pos, loc) {
|
|
28335
26076
|
node2.type = type;
|
|
@@ -28349,7 +26090,7 @@ pp$2.finishNodeAt = function(node2, type, pos, loc) {
|
|
|
28349
26090
|
return finishNodeAt.call(this, node2, type, pos, loc);
|
|
28350
26091
|
};
|
|
28351
26092
|
pp$2.copyNode = function(node2) {
|
|
28352
|
-
var newNode = new
|
|
26093
|
+
var newNode = new Node(this, node2.start, this.startLoc);
|
|
28353
26094
|
for (var prop in node2) {
|
|
28354
26095
|
newNode[prop] = node2[prop];
|
|
28355
26096
|
}
|
|
@@ -29550,11 +27291,11 @@ pp$1.regexp_classStringDisjunctionContents = function(state) {
|
|
|
29550
27291
|
return result;
|
|
29551
27292
|
};
|
|
29552
27293
|
pp$1.regexp_classString = function(state) {
|
|
29553
|
-
var
|
|
27294
|
+
var count = 0;
|
|
29554
27295
|
while (this.regexp_eatClassSetCharacter(state)) {
|
|
29555
|
-
|
|
27296
|
+
count++;
|
|
29556
27297
|
}
|
|
29557
|
-
return
|
|
27298
|
+
return count === 1 ? CharSetOk : CharSetString;
|
|
29558
27299
|
};
|
|
29559
27300
|
pp$1.regexp_eatClassSetCharacter = function(state) {
|
|
29560
27301
|
var start2 = state.pos;
|
|
@@ -30561,7 +28302,7 @@ Parser.acorn = {
|
|
|
30561
28302
|
Position,
|
|
30562
28303
|
SourceLocation,
|
|
30563
28304
|
getLineInfo,
|
|
30564
|
-
Node
|
|
28305
|
+
Node,
|
|
30565
28306
|
TokenType,
|
|
30566
28307
|
tokTypes: types$1,
|
|
30567
28308
|
keywordTypes: keywords,
|