@norskvideo/norsk-studio-built-ins 1.27.0-2025-05-20-8668716f → 1.27.0-2025-05-22-5168ed86
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/client/info.js +2324 -15
- package/lib/output.autoCmaf/runtime.d.ts +11 -0
- package/lib/output.autoCmaf/runtime.js +37 -0
- package/lib/output.autoCmaf/runtime.js.map +1 -1
- package/lib/processor.smartSingleMediaSwitch/runtime.js +4 -2
- package/lib/processor.smartSingleMediaSwitch/runtime.js.map +1 -1
- package/lib/processor.smartSourceSwitch/runtime.js +1 -1
- package/lib/processor.smartSourceSwitch/runtime.js.map +1 -1
- package/package.json +3 -3
package/client/info.js
CHANGED
@@ -22831,9 +22831,9 @@ var require_lucide_react = __commonJS({
|
|
22831
22831
|
}
|
22832
22832
|
});
|
22833
22833
|
|
22834
|
-
//
|
22834
|
+
// ../../node_modules/tailwind-merge/dist/bundle-cjs.js
|
22835
22835
|
var require_bundle_cjs = __commonJS({
|
22836
|
-
"
|
22836
|
+
"../../node_modules/tailwind-merge/dist/bundle-cjs.js"(exports) {
|
22837
22837
|
"use strict";
|
22838
22838
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
22839
22839
|
value: "Module"
|
@@ -57737,6 +57737,2276 @@ var require_dist44 = __commonJS({
|
|
57737
57737
|
}
|
57738
57738
|
});
|
57739
57739
|
|
57740
|
+
// ../core/node_modules/@radix-ui/primitive/dist/index.js
|
57741
|
+
var require_dist45 = __commonJS({
|
57742
|
+
"../core/node_modules/@radix-ui/primitive/dist/index.js"(exports, module) {
|
57743
|
+
"use strict";
|
57744
|
+
var __defProp2 = Object.defineProperty;
|
57745
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57746
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57747
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57748
|
+
var __export2 = (target, all) => {
|
57749
|
+
for (var name in all)
|
57750
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57751
|
+
};
|
57752
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57753
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57754
|
+
for (let key of __getOwnPropNames2(from2))
|
57755
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57756
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57757
|
+
}
|
57758
|
+
return to2;
|
57759
|
+
};
|
57760
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
57761
|
+
var index_exports = {};
|
57762
|
+
__export2(index_exports, {
|
57763
|
+
composeEventHandlers: () => composeEventHandlers
|
57764
|
+
});
|
57765
|
+
module.exports = __toCommonJS2(index_exports);
|
57766
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
57767
|
+
return function handleEvent(event) {
|
57768
|
+
originalEventHandler?.(event);
|
57769
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
57770
|
+
return ourEventHandler?.(event);
|
57771
|
+
}
|
57772
|
+
};
|
57773
|
+
}
|
57774
|
+
}
|
57775
|
+
});
|
57776
|
+
|
57777
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js
|
57778
|
+
var require_dist46 = __commonJS({
|
57779
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js"(exports, module) {
|
57780
|
+
"use strict";
|
57781
|
+
var __create2 = Object.create;
|
57782
|
+
var __defProp2 = Object.defineProperty;
|
57783
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57784
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57785
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
57786
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57787
|
+
var __export2 = (target, all) => {
|
57788
|
+
for (var name in all)
|
57789
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57790
|
+
};
|
57791
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57792
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57793
|
+
for (let key of __getOwnPropNames2(from2))
|
57794
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57795
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57796
|
+
}
|
57797
|
+
return to2;
|
57798
|
+
};
|
57799
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
57800
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
57801
|
+
// file that has been converted to a CommonJS file using a Babel-
|
57802
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
57803
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
57804
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
57805
|
+
mod
|
57806
|
+
));
|
57807
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
57808
|
+
var index_exports = {};
|
57809
|
+
__export2(index_exports, {
|
57810
|
+
composeRefs: () => composeRefs,
|
57811
|
+
useComposedRefs: () => useComposedRefs
|
57812
|
+
});
|
57813
|
+
module.exports = __toCommonJS2(index_exports);
|
57814
|
+
var React3 = __toESM2(require_react());
|
57815
|
+
function setRef(ref, value) {
|
57816
|
+
if (typeof ref === "function") {
|
57817
|
+
return ref(value);
|
57818
|
+
} else if (ref !== null && ref !== void 0) {
|
57819
|
+
ref.current = value;
|
57820
|
+
}
|
57821
|
+
}
|
57822
|
+
function composeRefs(...refs) {
|
57823
|
+
return (node) => {
|
57824
|
+
let hasCleanup = false;
|
57825
|
+
const cleanups = refs.map((ref) => {
|
57826
|
+
const cleanup = setRef(ref, node);
|
57827
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
57828
|
+
hasCleanup = true;
|
57829
|
+
}
|
57830
|
+
return cleanup;
|
57831
|
+
});
|
57832
|
+
if (hasCleanup) {
|
57833
|
+
return () => {
|
57834
|
+
for (let i = 0; i < cleanups.length; i++) {
|
57835
|
+
const cleanup = cleanups[i];
|
57836
|
+
if (typeof cleanup == "function") {
|
57837
|
+
cleanup();
|
57838
|
+
} else {
|
57839
|
+
setRef(refs[i], null);
|
57840
|
+
}
|
57841
|
+
}
|
57842
|
+
};
|
57843
|
+
}
|
57844
|
+
};
|
57845
|
+
}
|
57846
|
+
function useComposedRefs(...refs) {
|
57847
|
+
return React3.useCallback(composeRefs(...refs), refs);
|
57848
|
+
}
|
57849
|
+
}
|
57850
|
+
});
|
57851
|
+
|
57852
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js
|
57853
|
+
var require_dist47 = __commonJS({
|
57854
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js"(exports, module) {
|
57855
|
+
"use strict";
|
57856
|
+
var __create2 = Object.create;
|
57857
|
+
var __defProp2 = Object.defineProperty;
|
57858
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57859
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57860
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
57861
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57862
|
+
var __export2 = (target, all) => {
|
57863
|
+
for (var name in all)
|
57864
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57865
|
+
};
|
57866
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57867
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57868
|
+
for (let key of __getOwnPropNames2(from2))
|
57869
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57870
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57871
|
+
}
|
57872
|
+
return to2;
|
57873
|
+
};
|
57874
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
57875
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
57876
|
+
// file that has been converted to a CommonJS file using a Babel-
|
57877
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
57878
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
57879
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
57880
|
+
mod
|
57881
|
+
));
|
57882
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
57883
|
+
var index_exports = {};
|
57884
|
+
__export2(index_exports, {
|
57885
|
+
createContext: () => createContext2,
|
57886
|
+
createContextScope: () => createContextScope
|
57887
|
+
});
|
57888
|
+
module.exports = __toCommonJS2(index_exports);
|
57889
|
+
var React3 = __toESM2(require_react());
|
57890
|
+
var import_jsx_runtime44 = require_jsx_runtime();
|
57891
|
+
function createContext2(rootComponentName, defaultContext) {
|
57892
|
+
const Context = React3.createContext(defaultContext);
|
57893
|
+
const Provider = (props) => {
|
57894
|
+
const { children, ...context } = props;
|
57895
|
+
const value = React3.useMemo(() => context, Object.values(context));
|
57896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Context.Provider, { value, children });
|
57897
|
+
};
|
57898
|
+
Provider.displayName = rootComponentName + "Provider";
|
57899
|
+
function useContext2(consumerName) {
|
57900
|
+
const context = React3.useContext(Context);
|
57901
|
+
if (context)
|
57902
|
+
return context;
|
57903
|
+
if (defaultContext !== void 0)
|
57904
|
+
return defaultContext;
|
57905
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
57906
|
+
}
|
57907
|
+
return [Provider, useContext2];
|
57908
|
+
}
|
57909
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
57910
|
+
let defaultContexts = [];
|
57911
|
+
function createContext3(rootComponentName, defaultContext) {
|
57912
|
+
const BaseContext = React3.createContext(defaultContext);
|
57913
|
+
const index3 = defaultContexts.length;
|
57914
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
57915
|
+
const Provider = (props) => {
|
57916
|
+
const { scope, children, ...context } = props;
|
57917
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
57918
|
+
const value = React3.useMemo(() => context, Object.values(context));
|
57919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Context.Provider, { value, children });
|
57920
|
+
};
|
57921
|
+
Provider.displayName = rootComponentName + "Provider";
|
57922
|
+
function useContext2(consumerName, scope) {
|
57923
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
57924
|
+
const context = React3.useContext(Context);
|
57925
|
+
if (context)
|
57926
|
+
return context;
|
57927
|
+
if (defaultContext !== void 0)
|
57928
|
+
return defaultContext;
|
57929
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
57930
|
+
}
|
57931
|
+
return [Provider, useContext2];
|
57932
|
+
}
|
57933
|
+
const createScope = () => {
|
57934
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
57935
|
+
return React3.createContext(defaultContext);
|
57936
|
+
});
|
57937
|
+
return function useScope(scope) {
|
57938
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
57939
|
+
return React3.useMemo(
|
57940
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
57941
|
+
[scope, contexts]
|
57942
|
+
);
|
57943
|
+
};
|
57944
|
+
};
|
57945
|
+
createScope.scopeName = scopeName;
|
57946
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
57947
|
+
}
|
57948
|
+
function composeContextScopes(...scopes) {
|
57949
|
+
const baseScope = scopes[0];
|
57950
|
+
if (scopes.length === 1)
|
57951
|
+
return baseScope;
|
57952
|
+
const createScope = () => {
|
57953
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
57954
|
+
useScope: createScope2(),
|
57955
|
+
scopeName: createScope2.scopeName
|
57956
|
+
}));
|
57957
|
+
return function useComposedScopes(overrideScopes) {
|
57958
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
57959
|
+
const scopeProps = useScope(overrideScopes);
|
57960
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
57961
|
+
return { ...nextScopes2, ...currentScope };
|
57962
|
+
}, {});
|
57963
|
+
return React3.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
57964
|
+
};
|
57965
|
+
};
|
57966
|
+
createScope.scopeName = baseScope.scopeName;
|
57967
|
+
return createScope;
|
57968
|
+
}
|
57969
|
+
}
|
57970
|
+
});
|
57971
|
+
|
57972
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
57973
|
+
var require_dist48 = __commonJS({
|
57974
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
57975
|
+
"use strict";
|
57976
|
+
var __create2 = Object.create;
|
57977
|
+
var __defProp2 = Object.defineProperty;
|
57978
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
57979
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
57980
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
57981
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
57982
|
+
var __export2 = (target, all) => {
|
57983
|
+
for (var name in all)
|
57984
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
57985
|
+
};
|
57986
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
57987
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
57988
|
+
for (let key of __getOwnPropNames2(from2))
|
57989
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
57990
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
57991
|
+
}
|
57992
|
+
return to2;
|
57993
|
+
};
|
57994
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
57995
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
57996
|
+
// file that has been converted to a CommonJS file using a Babel-
|
57997
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
57998
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
57999
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58000
|
+
mod
|
58001
|
+
));
|
58002
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58003
|
+
var index_exports = {};
|
58004
|
+
__export2(index_exports, {
|
58005
|
+
useLayoutEffect: () => useLayoutEffect2
|
58006
|
+
});
|
58007
|
+
module.exports = __toCommonJS2(index_exports);
|
58008
|
+
var React3 = __toESM2(require_react());
|
58009
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
58010
|
+
};
|
58011
|
+
}
|
58012
|
+
});
|
58013
|
+
|
58014
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.js
|
58015
|
+
var require_dist49 = __commonJS({
|
58016
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.js"(exports, module) {
|
58017
|
+
"use strict";
|
58018
|
+
var __create2 = Object.create;
|
58019
|
+
var __defProp2 = Object.defineProperty;
|
58020
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58021
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58022
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58023
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58024
|
+
var __export2 = (target, all) => {
|
58025
|
+
for (var name in all)
|
58026
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58027
|
+
};
|
58028
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58029
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58030
|
+
for (let key of __getOwnPropNames2(from2))
|
58031
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58032
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58033
|
+
}
|
58034
|
+
return to2;
|
58035
|
+
};
|
58036
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58037
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58038
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58039
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58040
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58041
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58042
|
+
mod
|
58043
|
+
));
|
58044
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58045
|
+
var index_exports = {};
|
58046
|
+
__export2(index_exports, {
|
58047
|
+
useId: () => useId
|
58048
|
+
});
|
58049
|
+
module.exports = __toCommonJS2(index_exports);
|
58050
|
+
var React3 = __toESM2(require_react());
|
58051
|
+
var import_react_use_layout_effect = require_dist48();
|
58052
|
+
var useReactId = React3[" useId ".trim().toString()] || (() => void 0);
|
58053
|
+
var count = 0;
|
58054
|
+
function useId(deterministicId) {
|
58055
|
+
const [id, setId] = React3.useState(useReactId());
|
58056
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
58057
|
+
if (!deterministicId)
|
58058
|
+
setId((reactId) => reactId ?? String(count++));
|
58059
|
+
}, [deterministicId]);
|
58060
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
58061
|
+
}
|
58062
|
+
}
|
58063
|
+
});
|
58064
|
+
|
58065
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
58066
|
+
var require_dist50 = __commonJS({
|
58067
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
58068
|
+
"use strict";
|
58069
|
+
var __create2 = Object.create;
|
58070
|
+
var __defProp2 = Object.defineProperty;
|
58071
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58072
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58073
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58074
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58075
|
+
var __export2 = (target, all) => {
|
58076
|
+
for (var name in all)
|
58077
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58078
|
+
};
|
58079
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58080
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58081
|
+
for (let key of __getOwnPropNames2(from2))
|
58082
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58083
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58084
|
+
}
|
58085
|
+
return to2;
|
58086
|
+
};
|
58087
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58088
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58089
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58090
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58091
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58092
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58093
|
+
mod
|
58094
|
+
));
|
58095
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58096
|
+
var index_exports = {};
|
58097
|
+
__export2(index_exports, {
|
58098
|
+
useLayoutEffect: () => useLayoutEffect2
|
58099
|
+
});
|
58100
|
+
module.exports = __toCommonJS2(index_exports);
|
58101
|
+
var React3 = __toESM2(require_react());
|
58102
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
58103
|
+
};
|
58104
|
+
}
|
58105
|
+
});
|
58106
|
+
|
58107
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.js
|
58108
|
+
var require_dist51 = __commonJS({
|
58109
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.js"(exports, module) {
|
58110
|
+
"use strict";
|
58111
|
+
var __create2 = Object.create;
|
58112
|
+
var __defProp2 = Object.defineProperty;
|
58113
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58114
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58115
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58116
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58117
|
+
var __export2 = (target, all) => {
|
58118
|
+
for (var name in all)
|
58119
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58120
|
+
};
|
58121
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58122
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58123
|
+
for (let key of __getOwnPropNames2(from2))
|
58124
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58125
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58126
|
+
}
|
58127
|
+
return to2;
|
58128
|
+
};
|
58129
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58130
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58131
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58132
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58133
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58134
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58135
|
+
mod
|
58136
|
+
));
|
58137
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58138
|
+
var index_exports = {};
|
58139
|
+
__export2(index_exports, {
|
58140
|
+
useControllableState: () => useControllableState,
|
58141
|
+
useControllableStateReducer: () => useControllableStateReducer
|
58142
|
+
});
|
58143
|
+
module.exports = __toCommonJS2(index_exports);
|
58144
|
+
var React3 = __toESM2(require_react());
|
58145
|
+
var import_react_use_layout_effect = require_dist50();
|
58146
|
+
var useInsertionEffect = React3[" useInsertionEffect ".trim().toString()] || import_react_use_layout_effect.useLayoutEffect;
|
58147
|
+
function useControllableState({
|
58148
|
+
prop,
|
58149
|
+
defaultProp,
|
58150
|
+
onChange = () => {
|
58151
|
+
},
|
58152
|
+
caller
|
58153
|
+
}) {
|
58154
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
58155
|
+
defaultProp,
|
58156
|
+
onChange
|
58157
|
+
});
|
58158
|
+
const isControlled = prop !== void 0;
|
58159
|
+
const value = isControlled ? prop : uncontrolledProp;
|
58160
|
+
if (true) {
|
58161
|
+
const isControlledRef = React3.useRef(prop !== void 0);
|
58162
|
+
React3.useEffect(() => {
|
58163
|
+
const wasControlled = isControlledRef.current;
|
58164
|
+
if (wasControlled !== isControlled) {
|
58165
|
+
const from2 = wasControlled ? "controlled" : "uncontrolled";
|
58166
|
+
const to2 = isControlled ? "controlled" : "uncontrolled";
|
58167
|
+
console.warn(
|
58168
|
+
`${caller} is changing from ${from2} to ${to2}. 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.`
|
58169
|
+
);
|
58170
|
+
}
|
58171
|
+
isControlledRef.current = isControlled;
|
58172
|
+
}, [isControlled, caller]);
|
58173
|
+
}
|
58174
|
+
const setValue = React3.useCallback(
|
58175
|
+
(nextValue) => {
|
58176
|
+
if (isControlled) {
|
58177
|
+
const value2 = isFunction2(nextValue) ? nextValue(prop) : nextValue;
|
58178
|
+
if (value2 !== prop) {
|
58179
|
+
onChangeRef.current?.(value2);
|
58180
|
+
}
|
58181
|
+
} else {
|
58182
|
+
setUncontrolledProp(nextValue);
|
58183
|
+
}
|
58184
|
+
},
|
58185
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
58186
|
+
);
|
58187
|
+
return [value, setValue];
|
58188
|
+
}
|
58189
|
+
function useUncontrolledState({
|
58190
|
+
defaultProp,
|
58191
|
+
onChange
|
58192
|
+
}) {
|
58193
|
+
const [value, setValue] = React3.useState(defaultProp);
|
58194
|
+
const prevValueRef = React3.useRef(value);
|
58195
|
+
const onChangeRef = React3.useRef(onChange);
|
58196
|
+
useInsertionEffect(() => {
|
58197
|
+
onChangeRef.current = onChange;
|
58198
|
+
}, [onChange]);
|
58199
|
+
React3.useEffect(() => {
|
58200
|
+
if (prevValueRef.current !== value) {
|
58201
|
+
onChangeRef.current?.(value);
|
58202
|
+
prevValueRef.current = value;
|
58203
|
+
}
|
58204
|
+
}, [value, prevValueRef]);
|
58205
|
+
return [value, setValue, onChangeRef];
|
58206
|
+
}
|
58207
|
+
function isFunction2(value) {
|
58208
|
+
return typeof value === "function";
|
58209
|
+
}
|
58210
|
+
var React22 = __toESM2(require_react());
|
58211
|
+
var import_react_use_effect_event = require_dist32();
|
58212
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
58213
|
+
function useControllableStateReducer(reducer, userArgs, initialArg, init) {
|
58214
|
+
const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;
|
58215
|
+
const isControlled = controlledState !== void 0;
|
58216
|
+
const onChange = (0, import_react_use_effect_event.useEffectEvent)(onChangeProp);
|
58217
|
+
if (true) {
|
58218
|
+
const isControlledRef = React22.useRef(controlledState !== void 0);
|
58219
|
+
React22.useEffect(() => {
|
58220
|
+
const wasControlled = isControlledRef.current;
|
58221
|
+
if (wasControlled !== isControlled) {
|
58222
|
+
const from2 = wasControlled ? "controlled" : "uncontrolled";
|
58223
|
+
const to2 = isControlled ? "controlled" : "uncontrolled";
|
58224
|
+
console.warn(
|
58225
|
+
`${caller} is changing from ${from2} to ${to2}. 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.`
|
58226
|
+
);
|
58227
|
+
}
|
58228
|
+
isControlledRef.current = isControlled;
|
58229
|
+
}, [isControlled, caller]);
|
58230
|
+
}
|
58231
|
+
const args = [{ ...initialArg, state: defaultProp }];
|
58232
|
+
if (init) {
|
58233
|
+
args.push(init);
|
58234
|
+
}
|
58235
|
+
const [internalState, dispatch] = React22.useReducer(
|
58236
|
+
(state2, action) => {
|
58237
|
+
if (action.type === SYNC_STATE) {
|
58238
|
+
return { ...state2, state: action.state };
|
58239
|
+
}
|
58240
|
+
const next = reducer(state2, action);
|
58241
|
+
if (isControlled && !Object.is(next.state, state2.state)) {
|
58242
|
+
onChange(next.state);
|
58243
|
+
}
|
58244
|
+
return next;
|
58245
|
+
},
|
58246
|
+
...args
|
58247
|
+
);
|
58248
|
+
const uncontrolledState = internalState.state;
|
58249
|
+
const prevValueRef = React22.useRef(uncontrolledState);
|
58250
|
+
React22.useEffect(() => {
|
58251
|
+
if (prevValueRef.current !== uncontrolledState) {
|
58252
|
+
prevValueRef.current = uncontrolledState;
|
58253
|
+
if (!isControlled) {
|
58254
|
+
onChange(uncontrolledState);
|
58255
|
+
}
|
58256
|
+
}
|
58257
|
+
}, [onChange, uncontrolledState, prevValueRef, isControlled]);
|
58258
|
+
const state = React22.useMemo(() => {
|
58259
|
+
const isControlled2 = controlledState !== void 0;
|
58260
|
+
if (isControlled2) {
|
58261
|
+
return { ...internalState, state: controlledState };
|
58262
|
+
}
|
58263
|
+
return internalState;
|
58264
|
+
}, [internalState, controlledState]);
|
58265
|
+
React22.useEffect(() => {
|
58266
|
+
if (isControlled && !Object.is(controlledState, internalState.state)) {
|
58267
|
+
dispatch({ type: SYNC_STATE, state: controlledState });
|
58268
|
+
}
|
58269
|
+
}, [controlledState, internalState.state, isControlled]);
|
58270
|
+
return [state, dispatch];
|
58271
|
+
}
|
58272
|
+
}
|
58273
|
+
});
|
58274
|
+
|
58275
|
+
// ../core/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.js
|
58276
|
+
var require_dist52 = __commonJS({
|
58277
|
+
"../core/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.js"(exports, module) {
|
58278
|
+
"use strict";
|
58279
|
+
var __create2 = Object.create;
|
58280
|
+
var __defProp2 = Object.defineProperty;
|
58281
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58282
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58283
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58284
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58285
|
+
var __export2 = (target, all) => {
|
58286
|
+
for (var name in all)
|
58287
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58288
|
+
};
|
58289
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58290
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58291
|
+
for (let key of __getOwnPropNames2(from2))
|
58292
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58293
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58294
|
+
}
|
58295
|
+
return to2;
|
58296
|
+
};
|
58297
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58298
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58299
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58300
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58301
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58302
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58303
|
+
mod
|
58304
|
+
));
|
58305
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58306
|
+
var index_exports = {};
|
58307
|
+
__export2(index_exports, {
|
58308
|
+
composeRefs: () => composeRefs,
|
58309
|
+
useComposedRefs: () => useComposedRefs
|
58310
|
+
});
|
58311
|
+
module.exports = __toCommonJS2(index_exports);
|
58312
|
+
var React3 = __toESM2(require_react());
|
58313
|
+
function setRef(ref, value) {
|
58314
|
+
if (typeof ref === "function") {
|
58315
|
+
return ref(value);
|
58316
|
+
} else if (ref !== null && ref !== void 0) {
|
58317
|
+
ref.current = value;
|
58318
|
+
}
|
58319
|
+
}
|
58320
|
+
function composeRefs(...refs) {
|
58321
|
+
return (node) => {
|
58322
|
+
let hasCleanup = false;
|
58323
|
+
const cleanups = refs.map((ref) => {
|
58324
|
+
const cleanup = setRef(ref, node);
|
58325
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
58326
|
+
hasCleanup = true;
|
58327
|
+
}
|
58328
|
+
return cleanup;
|
58329
|
+
});
|
58330
|
+
if (hasCleanup) {
|
58331
|
+
return () => {
|
58332
|
+
for (let i = 0; i < cleanups.length; i++) {
|
58333
|
+
const cleanup = cleanups[i];
|
58334
|
+
if (typeof cleanup == "function") {
|
58335
|
+
cleanup();
|
58336
|
+
} else {
|
58337
|
+
setRef(refs[i], null);
|
58338
|
+
}
|
58339
|
+
}
|
58340
|
+
};
|
58341
|
+
}
|
58342
|
+
};
|
58343
|
+
}
|
58344
|
+
function useComposedRefs(...refs) {
|
58345
|
+
return React3.useCallback(composeRefs(...refs), refs);
|
58346
|
+
}
|
58347
|
+
}
|
58348
|
+
});
|
58349
|
+
|
58350
|
+
// ../core/node_modules/@radix-ui/react-slot/dist/index.js
|
58351
|
+
var require_dist53 = __commonJS({
|
58352
|
+
"../core/node_modules/@radix-ui/react-slot/dist/index.js"(exports, module) {
|
58353
|
+
"use strict";
|
58354
|
+
"use client";
|
58355
|
+
var __create2 = Object.create;
|
58356
|
+
var __defProp2 = Object.defineProperty;
|
58357
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58358
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58359
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58360
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58361
|
+
var __export2 = (target, all) => {
|
58362
|
+
for (var name in all)
|
58363
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58364
|
+
};
|
58365
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58366
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58367
|
+
for (let key of __getOwnPropNames2(from2))
|
58368
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58369
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58370
|
+
}
|
58371
|
+
return to2;
|
58372
|
+
};
|
58373
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58374
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58375
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58376
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58377
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58378
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58379
|
+
mod
|
58380
|
+
));
|
58381
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58382
|
+
var index_exports = {};
|
58383
|
+
__export2(index_exports, {
|
58384
|
+
Root: () => Slot,
|
58385
|
+
Slot: () => Slot,
|
58386
|
+
Slottable: () => Slottable,
|
58387
|
+
createSlot: () => createSlot,
|
58388
|
+
createSlottable: () => createSlottable
|
58389
|
+
});
|
58390
|
+
module.exports = __toCommonJS2(index_exports);
|
58391
|
+
var React3 = __toESM2(require_react());
|
58392
|
+
var import_react_compose_refs = require_dist52();
|
58393
|
+
var import_jsx_runtime44 = require_jsx_runtime();
|
58394
|
+
// @__NO_SIDE_EFFECTS__
|
58395
|
+
function createSlot(ownerName) {
|
58396
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
58397
|
+
const Slot2 = React3.forwardRef((props, forwardedRef) => {
|
58398
|
+
const { children, ...slotProps } = props;
|
58399
|
+
const childrenArray = React3.Children.toArray(children);
|
58400
|
+
const slottable = childrenArray.find(isSlottable);
|
58401
|
+
if (slottable) {
|
58402
|
+
const newElement = slottable.props.children;
|
58403
|
+
const newChildren = childrenArray.map((child) => {
|
58404
|
+
if (child === slottable) {
|
58405
|
+
if (React3.Children.count(newElement) > 1)
|
58406
|
+
return React3.Children.only(null);
|
58407
|
+
return React3.isValidElement(newElement) ? newElement.props.children : null;
|
58408
|
+
} else {
|
58409
|
+
return child;
|
58410
|
+
}
|
58411
|
+
});
|
58412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
58413
|
+
}
|
58414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
58415
|
+
});
|
58416
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
58417
|
+
return Slot2;
|
58418
|
+
}
|
58419
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
58420
|
+
// @__NO_SIDE_EFFECTS__
|
58421
|
+
function createSlotClone(ownerName) {
|
58422
|
+
const SlotClone = React3.forwardRef((props, forwardedRef) => {
|
58423
|
+
const { children, ...slotProps } = props;
|
58424
|
+
const childrenRef = React3.isValidElement(children) ? getElementRef(children) : void 0;
|
58425
|
+
const ref = (0, import_react_compose_refs.useComposedRefs)(childrenRef, forwardedRef);
|
58426
|
+
if (React3.isValidElement(children)) {
|
58427
|
+
const props2 = mergeProps(slotProps, children.props);
|
58428
|
+
if (children.type !== React3.Fragment) {
|
58429
|
+
props2.ref = ref;
|
58430
|
+
}
|
58431
|
+
return React3.cloneElement(children, props2);
|
58432
|
+
}
|
58433
|
+
return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
|
58434
|
+
});
|
58435
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
58436
|
+
return SlotClone;
|
58437
|
+
}
|
58438
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
58439
|
+
// @__NO_SIDE_EFFECTS__
|
58440
|
+
function createSlottable(ownerName) {
|
58441
|
+
const Slottable2 = ({ children }) => {
|
58442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children });
|
58443
|
+
};
|
58444
|
+
Slottable2.displayName = `${ownerName}.Slottable`;
|
58445
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
58446
|
+
return Slottable2;
|
58447
|
+
}
|
58448
|
+
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
58449
|
+
function isSlottable(child) {
|
58450
|
+
return React3.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
58451
|
+
}
|
58452
|
+
function mergeProps(slotProps, childProps) {
|
58453
|
+
const overrideProps = { ...childProps };
|
58454
|
+
for (const propName in childProps) {
|
58455
|
+
const slotPropValue = slotProps[propName];
|
58456
|
+
const childPropValue = childProps[propName];
|
58457
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
58458
|
+
if (isHandler) {
|
58459
|
+
if (slotPropValue && childPropValue) {
|
58460
|
+
overrideProps[propName] = (...args) => {
|
58461
|
+
const result2 = childPropValue(...args);
|
58462
|
+
slotPropValue(...args);
|
58463
|
+
return result2;
|
58464
|
+
};
|
58465
|
+
} else if (slotPropValue) {
|
58466
|
+
overrideProps[propName] = slotPropValue;
|
58467
|
+
}
|
58468
|
+
} else if (propName === "style") {
|
58469
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
58470
|
+
} else if (propName === "className") {
|
58471
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
58472
|
+
}
|
58473
|
+
}
|
58474
|
+
return { ...slotProps, ...overrideProps };
|
58475
|
+
}
|
58476
|
+
function getElementRef(element) {
|
58477
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
58478
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
58479
|
+
if (mayWarn) {
|
58480
|
+
return element.ref;
|
58481
|
+
}
|
58482
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
58483
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
58484
|
+
if (mayWarn) {
|
58485
|
+
return element.props.ref;
|
58486
|
+
}
|
58487
|
+
return element.props.ref || element.ref;
|
58488
|
+
}
|
58489
|
+
}
|
58490
|
+
});
|
58491
|
+
|
58492
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js
|
58493
|
+
var require_dist54 = __commonJS({
|
58494
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js"(exports, module) {
|
58495
|
+
"use strict";
|
58496
|
+
var __create2 = Object.create;
|
58497
|
+
var __defProp2 = Object.defineProperty;
|
58498
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58499
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58500
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58501
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58502
|
+
var __export2 = (target, all) => {
|
58503
|
+
for (var name in all)
|
58504
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58505
|
+
};
|
58506
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58507
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58508
|
+
for (let key of __getOwnPropNames2(from2))
|
58509
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58510
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58511
|
+
}
|
58512
|
+
return to2;
|
58513
|
+
};
|
58514
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58515
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58516
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58517
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58518
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58519
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58520
|
+
mod
|
58521
|
+
));
|
58522
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58523
|
+
var index_exports = {};
|
58524
|
+
__export2(index_exports, {
|
58525
|
+
Primitive: () => Primitive,
|
58526
|
+
Root: () => Root,
|
58527
|
+
dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent
|
58528
|
+
});
|
58529
|
+
module.exports = __toCommonJS2(index_exports);
|
58530
|
+
var React3 = __toESM2(require_react());
|
58531
|
+
var ReactDOM2 = __toESM2(require_react_dom());
|
58532
|
+
var import_react_slot = require_dist53();
|
58533
|
+
var import_jsx_runtime44 = require_jsx_runtime();
|
58534
|
+
var NODES = [
|
58535
|
+
"a",
|
58536
|
+
"button",
|
58537
|
+
"div",
|
58538
|
+
"form",
|
58539
|
+
"h2",
|
58540
|
+
"h3",
|
58541
|
+
"img",
|
58542
|
+
"input",
|
58543
|
+
"label",
|
58544
|
+
"li",
|
58545
|
+
"nav",
|
58546
|
+
"ol",
|
58547
|
+
"p",
|
58548
|
+
"select",
|
58549
|
+
"span",
|
58550
|
+
"svg",
|
58551
|
+
"ul"
|
58552
|
+
];
|
58553
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
58554
|
+
const Slot = (0, import_react_slot.createSlot)(`Primitive.${node}`);
|
58555
|
+
const Node2 = React3.forwardRef((props, forwardedRef) => {
|
58556
|
+
const { asChild, ...primitiveProps } = props;
|
58557
|
+
const Comp = asChild ? Slot : node;
|
58558
|
+
if (typeof window !== "undefined") {
|
58559
|
+
window[Symbol.for("radix-ui")] = true;
|
58560
|
+
}
|
58561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
58562
|
+
});
|
58563
|
+
Node2.displayName = `Primitive.${node}`;
|
58564
|
+
return { ...primitive, [node]: Node2 };
|
58565
|
+
}, {});
|
58566
|
+
function dispatchDiscreteCustomEvent(target, event) {
|
58567
|
+
if (target)
|
58568
|
+
ReactDOM2.flushSync(() => target.dispatchEvent(event));
|
58569
|
+
}
|
58570
|
+
var Root = Primitive;
|
58571
|
+
}
|
58572
|
+
});
|
58573
|
+
|
58574
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref/dist/index.js
|
58575
|
+
var require_dist55 = __commonJS({
|
58576
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref/dist/index.js"(exports, module) {
|
58577
|
+
"use strict";
|
58578
|
+
var __create2 = Object.create;
|
58579
|
+
var __defProp2 = Object.defineProperty;
|
58580
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58581
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58582
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58583
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58584
|
+
var __export2 = (target, all) => {
|
58585
|
+
for (var name in all)
|
58586
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58587
|
+
};
|
58588
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58589
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58590
|
+
for (let key of __getOwnPropNames2(from2))
|
58591
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58592
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58593
|
+
}
|
58594
|
+
return to2;
|
58595
|
+
};
|
58596
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58597
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58598
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58599
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58600
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58601
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58602
|
+
mod
|
58603
|
+
));
|
58604
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58605
|
+
var index_exports = {};
|
58606
|
+
__export2(index_exports, {
|
58607
|
+
useCallbackRef: () => useCallbackRef
|
58608
|
+
});
|
58609
|
+
module.exports = __toCommonJS2(index_exports);
|
58610
|
+
var React3 = __toESM2(require_react());
|
58611
|
+
function useCallbackRef(callback2) {
|
58612
|
+
const callbackRef = React3.useRef(callback2);
|
58613
|
+
React3.useEffect(() => {
|
58614
|
+
callbackRef.current = callback2;
|
58615
|
+
});
|
58616
|
+
return React3.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
58617
|
+
}
|
58618
|
+
}
|
58619
|
+
});
|
58620
|
+
|
58621
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js
|
58622
|
+
var require_dist56 = __commonJS({
|
58623
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js"(exports, module) {
|
58624
|
+
"use strict";
|
58625
|
+
var __create2 = Object.create;
|
58626
|
+
var __defProp2 = Object.defineProperty;
|
58627
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58628
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58629
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58630
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58631
|
+
var __export2 = (target, all) => {
|
58632
|
+
for (var name in all)
|
58633
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58634
|
+
};
|
58635
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58636
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58637
|
+
for (let key of __getOwnPropNames2(from2))
|
58638
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58639
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58640
|
+
}
|
58641
|
+
return to2;
|
58642
|
+
};
|
58643
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58644
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58645
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58646
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58647
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58648
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58649
|
+
mod
|
58650
|
+
));
|
58651
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58652
|
+
var index_exports = {};
|
58653
|
+
__export2(index_exports, {
|
58654
|
+
useEscapeKeydown: () => useEscapeKeydown
|
58655
|
+
});
|
58656
|
+
module.exports = __toCommonJS2(index_exports);
|
58657
|
+
var React3 = __toESM2(require_react());
|
58658
|
+
var import_react_use_callback_ref = require_dist55();
|
58659
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
58660
|
+
const onEscapeKeyDown = (0, import_react_use_callback_ref.useCallbackRef)(onEscapeKeyDownProp);
|
58661
|
+
React3.useEffect(() => {
|
58662
|
+
const handleKeyDown = (event) => {
|
58663
|
+
if (event.key === "Escape") {
|
58664
|
+
onEscapeKeyDown(event);
|
58665
|
+
}
|
58666
|
+
};
|
58667
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
58668
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
58669
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
58670
|
+
}
|
58671
|
+
}
|
58672
|
+
});
|
58673
|
+
|
58674
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js
|
58675
|
+
var require_dist57 = __commonJS({
|
58676
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js"(exports, module) {
|
58677
|
+
"use strict";
|
58678
|
+
"use client";
|
58679
|
+
var __create2 = Object.create;
|
58680
|
+
var __defProp2 = Object.defineProperty;
|
58681
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58682
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58683
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58684
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58685
|
+
var __export2 = (target, all) => {
|
58686
|
+
for (var name in all)
|
58687
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58688
|
+
};
|
58689
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58690
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58691
|
+
for (let key of __getOwnPropNames2(from2))
|
58692
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58693
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58694
|
+
}
|
58695
|
+
return to2;
|
58696
|
+
};
|
58697
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58698
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58699
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58700
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58701
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58702
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58703
|
+
mod
|
58704
|
+
));
|
58705
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58706
|
+
var index_exports = {};
|
58707
|
+
__export2(index_exports, {
|
58708
|
+
Branch: () => Branch,
|
58709
|
+
DismissableLayer: () => DismissableLayer,
|
58710
|
+
DismissableLayerBranch: () => DismissableLayerBranch,
|
58711
|
+
Root: () => Root
|
58712
|
+
});
|
58713
|
+
module.exports = __toCommonJS2(index_exports);
|
58714
|
+
var React3 = __toESM2(require_react());
|
58715
|
+
var import_primitive = require_dist45();
|
58716
|
+
var import_react_primitive = require_dist54();
|
58717
|
+
var import_react_compose_refs = require_dist46();
|
58718
|
+
var import_react_use_callback_ref = require_dist55();
|
58719
|
+
var import_react_use_escape_keydown = require_dist56();
|
58720
|
+
var import_jsx_runtime44 = require_jsx_runtime();
|
58721
|
+
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
58722
|
+
var CONTEXT_UPDATE = "dismissableLayer.update";
|
58723
|
+
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
58724
|
+
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
58725
|
+
var originalBodyPointerEvents;
|
58726
|
+
var DismissableLayerContext = React3.createContext({
|
58727
|
+
layers: /* @__PURE__ */ new Set(),
|
58728
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
58729
|
+
branches: /* @__PURE__ */ new Set()
|
58730
|
+
});
|
58731
|
+
var DismissableLayer = React3.forwardRef(
|
58732
|
+
(props, forwardedRef) => {
|
58733
|
+
const {
|
58734
|
+
disableOutsidePointerEvents = false,
|
58735
|
+
onEscapeKeyDown,
|
58736
|
+
onPointerDownOutside,
|
58737
|
+
onFocusOutside,
|
58738
|
+
onInteractOutside,
|
58739
|
+
onDismiss,
|
58740
|
+
...layerProps
|
58741
|
+
} = props;
|
58742
|
+
const context = React3.useContext(DismissableLayerContext);
|
58743
|
+
const [node, setNode] = React3.useState(null);
|
58744
|
+
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
58745
|
+
const [, force] = React3.useState({});
|
58746
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node2) => setNode(node2));
|
58747
|
+
const layers = Array.from(context.layers);
|
58748
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
58749
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
58750
|
+
const index3 = node ? layers.indexOf(node) : -1;
|
58751
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
58752
|
+
const isPointerEventsEnabled = index3 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
58753
|
+
const pointerDownOutside = usePointerDownOutside((event) => {
|
58754
|
+
const target = event.target;
|
58755
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
58756
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch)
|
58757
|
+
return;
|
58758
|
+
onPointerDownOutside?.(event);
|
58759
|
+
onInteractOutside?.(event);
|
58760
|
+
if (!event.defaultPrevented)
|
58761
|
+
onDismiss?.();
|
58762
|
+
}, ownerDocument);
|
58763
|
+
const focusOutside = useFocusOutside((event) => {
|
58764
|
+
const target = event.target;
|
58765
|
+
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
58766
|
+
if (isFocusInBranch)
|
58767
|
+
return;
|
58768
|
+
onFocusOutside?.(event);
|
58769
|
+
onInteractOutside?.(event);
|
58770
|
+
if (!event.defaultPrevented)
|
58771
|
+
onDismiss?.();
|
58772
|
+
}, ownerDocument);
|
58773
|
+
(0, import_react_use_escape_keydown.useEscapeKeydown)((event) => {
|
58774
|
+
const isHighestLayer = index3 === context.layers.size - 1;
|
58775
|
+
if (!isHighestLayer)
|
58776
|
+
return;
|
58777
|
+
onEscapeKeyDown?.(event);
|
58778
|
+
if (!event.defaultPrevented && onDismiss) {
|
58779
|
+
event.preventDefault();
|
58780
|
+
onDismiss();
|
58781
|
+
}
|
58782
|
+
}, ownerDocument);
|
58783
|
+
React3.useEffect(() => {
|
58784
|
+
if (!node)
|
58785
|
+
return;
|
58786
|
+
if (disableOutsidePointerEvents) {
|
58787
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
58788
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
58789
|
+
ownerDocument.body.style.pointerEvents = "none";
|
58790
|
+
}
|
58791
|
+
context.layersWithOutsidePointerEventsDisabled.add(node);
|
58792
|
+
}
|
58793
|
+
context.layers.add(node);
|
58794
|
+
dispatchUpdate();
|
58795
|
+
return () => {
|
58796
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
58797
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
58798
|
+
}
|
58799
|
+
};
|
58800
|
+
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
58801
|
+
React3.useEffect(() => {
|
58802
|
+
return () => {
|
58803
|
+
if (!node)
|
58804
|
+
return;
|
58805
|
+
context.layers.delete(node);
|
58806
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
58807
|
+
dispatchUpdate();
|
58808
|
+
};
|
58809
|
+
}, [node, context]);
|
58810
|
+
React3.useEffect(() => {
|
58811
|
+
const handleUpdate = () => force({});
|
58812
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
58813
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
58814
|
+
}, []);
|
58815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
58816
|
+
import_react_primitive.Primitive.div,
|
58817
|
+
{
|
58818
|
+
...layerProps,
|
58819
|
+
ref: composedRefs,
|
58820
|
+
style: {
|
58821
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
58822
|
+
...props.style
|
58823
|
+
},
|
58824
|
+
onFocusCapture: (0, import_primitive.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),
|
58825
|
+
onBlurCapture: (0, import_primitive.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),
|
58826
|
+
onPointerDownCapture: (0, import_primitive.composeEventHandlers)(
|
58827
|
+
props.onPointerDownCapture,
|
58828
|
+
pointerDownOutside.onPointerDownCapture
|
58829
|
+
)
|
58830
|
+
}
|
58831
|
+
);
|
58832
|
+
}
|
58833
|
+
);
|
58834
|
+
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
58835
|
+
var BRANCH_NAME = "DismissableLayerBranch";
|
58836
|
+
var DismissableLayerBranch = React3.forwardRef((props, forwardedRef) => {
|
58837
|
+
const context = React3.useContext(DismissableLayerContext);
|
58838
|
+
const ref = React3.useRef(null);
|
58839
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref);
|
58840
|
+
React3.useEffect(() => {
|
58841
|
+
const node = ref.current;
|
58842
|
+
if (node) {
|
58843
|
+
context.branches.add(node);
|
58844
|
+
return () => {
|
58845
|
+
context.branches.delete(node);
|
58846
|
+
};
|
58847
|
+
}
|
58848
|
+
}, [context.branches]);
|
58849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_primitive.Primitive.div, { ...props, ref: composedRefs });
|
58850
|
+
});
|
58851
|
+
DismissableLayerBranch.displayName = BRANCH_NAME;
|
58852
|
+
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
58853
|
+
const handlePointerDownOutside = (0, import_react_use_callback_ref.useCallbackRef)(onPointerDownOutside);
|
58854
|
+
const isPointerInsideReactTreeRef = React3.useRef(false);
|
58855
|
+
const handleClickRef = React3.useRef(() => {
|
58856
|
+
});
|
58857
|
+
React3.useEffect(() => {
|
58858
|
+
const handlePointerDown = (event) => {
|
58859
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
58860
|
+
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
58861
|
+
handleAndDispatchCustomEvent(
|
58862
|
+
POINTER_DOWN_OUTSIDE,
|
58863
|
+
handlePointerDownOutside,
|
58864
|
+
eventDetail,
|
58865
|
+
{ discrete: true }
|
58866
|
+
);
|
58867
|
+
};
|
58868
|
+
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
58869
|
+
const eventDetail = { originalEvent: event };
|
58870
|
+
if (event.pointerType === "touch") {
|
58871
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
58872
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
58873
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
58874
|
+
} else {
|
58875
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
58876
|
+
}
|
58877
|
+
} else {
|
58878
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
58879
|
+
}
|
58880
|
+
isPointerInsideReactTreeRef.current = false;
|
58881
|
+
};
|
58882
|
+
const timerId = window.setTimeout(() => {
|
58883
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
58884
|
+
}, 0);
|
58885
|
+
return () => {
|
58886
|
+
window.clearTimeout(timerId);
|
58887
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
58888
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
58889
|
+
};
|
58890
|
+
}, [ownerDocument, handlePointerDownOutside]);
|
58891
|
+
return {
|
58892
|
+
// ensures we check React component tree (not just DOM tree)
|
58893
|
+
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
58894
|
+
};
|
58895
|
+
}
|
58896
|
+
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
58897
|
+
const handleFocusOutside = (0, import_react_use_callback_ref.useCallbackRef)(onFocusOutside);
|
58898
|
+
const isFocusInsideReactTreeRef = React3.useRef(false);
|
58899
|
+
React3.useEffect(() => {
|
58900
|
+
const handleFocus = (event) => {
|
58901
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
58902
|
+
const eventDetail = { originalEvent: event };
|
58903
|
+
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
58904
|
+
discrete: false
|
58905
|
+
});
|
58906
|
+
}
|
58907
|
+
};
|
58908
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
58909
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
58910
|
+
}, [ownerDocument, handleFocusOutside]);
|
58911
|
+
return {
|
58912
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
58913
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
58914
|
+
};
|
58915
|
+
}
|
58916
|
+
function dispatchUpdate() {
|
58917
|
+
const event = new CustomEvent(CONTEXT_UPDATE);
|
58918
|
+
document.dispatchEvent(event);
|
58919
|
+
}
|
58920
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
58921
|
+
const target = detail.originalEvent.target;
|
58922
|
+
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
58923
|
+
if (handler)
|
58924
|
+
target.addEventListener(name, handler, { once: true });
|
58925
|
+
if (discrete) {
|
58926
|
+
(0, import_react_primitive.dispatchDiscreteCustomEvent)(target, event);
|
58927
|
+
} else {
|
58928
|
+
target.dispatchEvent(event);
|
58929
|
+
}
|
58930
|
+
}
|
58931
|
+
var Root = DismissableLayer;
|
58932
|
+
var Branch = DismissableLayerBranch;
|
58933
|
+
}
|
58934
|
+
});
|
58935
|
+
|
58936
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.js
|
58937
|
+
var require_dist58 = __commonJS({
|
58938
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.js"(exports, module) {
|
58939
|
+
"use strict";
|
58940
|
+
var __create2 = Object.create;
|
58941
|
+
var __defProp2 = Object.defineProperty;
|
58942
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58943
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58944
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58945
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58946
|
+
var __export2 = (target, all) => {
|
58947
|
+
for (var name in all)
|
58948
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58949
|
+
};
|
58950
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58951
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
58952
|
+
for (let key of __getOwnPropNames2(from2))
|
58953
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
58954
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
58955
|
+
}
|
58956
|
+
return to2;
|
58957
|
+
};
|
58958
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
58959
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
58960
|
+
// file that has been converted to a CommonJS file using a Babel-
|
58961
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
58962
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
58963
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
58964
|
+
mod
|
58965
|
+
));
|
58966
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
58967
|
+
var index_exports = {};
|
58968
|
+
__export2(index_exports, {
|
58969
|
+
useCallbackRef: () => useCallbackRef
|
58970
|
+
});
|
58971
|
+
module.exports = __toCommonJS2(index_exports);
|
58972
|
+
var React3 = __toESM2(require_react());
|
58973
|
+
function useCallbackRef(callback2) {
|
58974
|
+
const callbackRef = React3.useRef(callback2);
|
58975
|
+
React3.useEffect(() => {
|
58976
|
+
callbackRef.current = callback2;
|
58977
|
+
});
|
58978
|
+
return React3.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
58979
|
+
}
|
58980
|
+
}
|
58981
|
+
});
|
58982
|
+
|
58983
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js
|
58984
|
+
var require_dist59 = __commonJS({
|
58985
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js"(exports, module) {
|
58986
|
+
"use strict";
|
58987
|
+
"use client";
|
58988
|
+
var __create2 = Object.create;
|
58989
|
+
var __defProp2 = Object.defineProperty;
|
58990
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
58991
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
58992
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
58993
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
58994
|
+
var __export2 = (target, all) => {
|
58995
|
+
for (var name in all)
|
58996
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
58997
|
+
};
|
58998
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
58999
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59000
|
+
for (let key of __getOwnPropNames2(from2))
|
59001
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59002
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59003
|
+
}
|
59004
|
+
return to2;
|
59005
|
+
};
|
59006
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59007
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59008
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59009
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59010
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59011
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59012
|
+
mod
|
59013
|
+
));
|
59014
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59015
|
+
var index_exports = {};
|
59016
|
+
__export2(index_exports, {
|
59017
|
+
FocusScope: () => FocusScope,
|
59018
|
+
Root: () => Root
|
59019
|
+
});
|
59020
|
+
module.exports = __toCommonJS2(index_exports);
|
59021
|
+
var React3 = __toESM2(require_react());
|
59022
|
+
var import_react_compose_refs = require_dist46();
|
59023
|
+
var import_react_primitive = require_dist54();
|
59024
|
+
var import_react_use_callback_ref = require_dist58();
|
59025
|
+
var import_jsx_runtime44 = require_jsx_runtime();
|
59026
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
59027
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
59028
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
59029
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
59030
|
+
var FocusScope = React3.forwardRef((props, forwardedRef) => {
|
59031
|
+
const {
|
59032
|
+
loop = false,
|
59033
|
+
trapped = false,
|
59034
|
+
onMountAutoFocus: onMountAutoFocusProp,
|
59035
|
+
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
59036
|
+
...scopeProps
|
59037
|
+
} = props;
|
59038
|
+
const [container, setContainer] = React3.useState(null);
|
59039
|
+
const onMountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onMountAutoFocusProp);
|
59040
|
+
const onUnmountAutoFocus = (0, import_react_use_callback_ref.useCallbackRef)(onUnmountAutoFocusProp);
|
59041
|
+
const lastFocusedElementRef = React3.useRef(null);
|
59042
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, (node) => setContainer(node));
|
59043
|
+
const focusScope = React3.useRef({
|
59044
|
+
paused: false,
|
59045
|
+
pause() {
|
59046
|
+
this.paused = true;
|
59047
|
+
},
|
59048
|
+
resume() {
|
59049
|
+
this.paused = false;
|
59050
|
+
}
|
59051
|
+
}).current;
|
59052
|
+
React3.useEffect(() => {
|
59053
|
+
if (trapped) {
|
59054
|
+
let handleFocusIn2 = function(event) {
|
59055
|
+
if (focusScope.paused || !container)
|
59056
|
+
return;
|
59057
|
+
const target = event.target;
|
59058
|
+
if (container.contains(target)) {
|
59059
|
+
lastFocusedElementRef.current = target;
|
59060
|
+
} else {
|
59061
|
+
focus(lastFocusedElementRef.current, { select: true });
|
59062
|
+
}
|
59063
|
+
}, handleFocusOut2 = function(event) {
|
59064
|
+
if (focusScope.paused || !container)
|
59065
|
+
return;
|
59066
|
+
const relatedTarget = event.relatedTarget;
|
59067
|
+
if (relatedTarget === null)
|
59068
|
+
return;
|
59069
|
+
if (!container.contains(relatedTarget)) {
|
59070
|
+
focus(lastFocusedElementRef.current, { select: true });
|
59071
|
+
}
|
59072
|
+
}, handleMutations2 = function(mutations) {
|
59073
|
+
const focusedElement = document.activeElement;
|
59074
|
+
if (focusedElement !== document.body)
|
59075
|
+
return;
|
59076
|
+
for (const mutation of mutations) {
|
59077
|
+
if (mutation.removedNodes.length > 0)
|
59078
|
+
focus(container);
|
59079
|
+
}
|
59080
|
+
};
|
59081
|
+
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
59082
|
+
document.addEventListener("focusin", handleFocusIn2);
|
59083
|
+
document.addEventListener("focusout", handleFocusOut2);
|
59084
|
+
const mutationObserver = new MutationObserver(handleMutations2);
|
59085
|
+
if (container)
|
59086
|
+
mutationObserver.observe(container, { childList: true, subtree: true });
|
59087
|
+
return () => {
|
59088
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
59089
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
59090
|
+
mutationObserver.disconnect();
|
59091
|
+
};
|
59092
|
+
}
|
59093
|
+
}, [trapped, container, focusScope.paused]);
|
59094
|
+
React3.useEffect(() => {
|
59095
|
+
if (container) {
|
59096
|
+
focusScopesStack.add(focusScope);
|
59097
|
+
const previouslyFocusedElement = document.activeElement;
|
59098
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
59099
|
+
if (!hasFocusedCandidate) {
|
59100
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
59101
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
59102
|
+
container.dispatchEvent(mountEvent);
|
59103
|
+
if (!mountEvent.defaultPrevented) {
|
59104
|
+
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
59105
|
+
if (document.activeElement === previouslyFocusedElement) {
|
59106
|
+
focus(container);
|
59107
|
+
}
|
59108
|
+
}
|
59109
|
+
}
|
59110
|
+
return () => {
|
59111
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
59112
|
+
setTimeout(() => {
|
59113
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
59114
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
59115
|
+
container.dispatchEvent(unmountEvent);
|
59116
|
+
if (!unmountEvent.defaultPrevented) {
|
59117
|
+
focus(previouslyFocusedElement ?? document.body, { select: true });
|
59118
|
+
}
|
59119
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
59120
|
+
focusScopesStack.remove(focusScope);
|
59121
|
+
}, 0);
|
59122
|
+
};
|
59123
|
+
}
|
59124
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
59125
|
+
const handleKeyDown = React3.useCallback(
|
59126
|
+
(event) => {
|
59127
|
+
if (!loop && !trapped)
|
59128
|
+
return;
|
59129
|
+
if (focusScope.paused)
|
59130
|
+
return;
|
59131
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
59132
|
+
const focusedElement = document.activeElement;
|
59133
|
+
if (isTabKey && focusedElement) {
|
59134
|
+
const container2 = event.currentTarget;
|
59135
|
+
const [first, last] = getTabbableEdges(container2);
|
59136
|
+
const hasTabbableElementsInside = first && last;
|
59137
|
+
if (!hasTabbableElementsInside) {
|
59138
|
+
if (focusedElement === container2)
|
59139
|
+
event.preventDefault();
|
59140
|
+
} else {
|
59141
|
+
if (!event.shiftKey && focusedElement === last) {
|
59142
|
+
event.preventDefault();
|
59143
|
+
if (loop)
|
59144
|
+
focus(first, { select: true });
|
59145
|
+
} else if (event.shiftKey && focusedElement === first) {
|
59146
|
+
event.preventDefault();
|
59147
|
+
if (loop)
|
59148
|
+
focus(last, { select: true });
|
59149
|
+
}
|
59150
|
+
}
|
59151
|
+
}
|
59152
|
+
},
|
59153
|
+
[loop, trapped, focusScope.paused]
|
59154
|
+
);
|
59155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_primitive.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
59156
|
+
});
|
59157
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
59158
|
+
function focusFirst(candidates, { select = false } = {}) {
|
59159
|
+
const previouslyFocusedElement = document.activeElement;
|
59160
|
+
for (const candidate of candidates) {
|
59161
|
+
focus(candidate, { select });
|
59162
|
+
if (document.activeElement !== previouslyFocusedElement)
|
59163
|
+
return;
|
59164
|
+
}
|
59165
|
+
}
|
59166
|
+
function getTabbableEdges(container) {
|
59167
|
+
const candidates = getTabbableCandidates(container);
|
59168
|
+
const first = findVisible(candidates, container);
|
59169
|
+
const last = findVisible(candidates.reverse(), container);
|
59170
|
+
return [first, last];
|
59171
|
+
}
|
59172
|
+
function getTabbableCandidates(container) {
|
59173
|
+
const nodes = [];
|
59174
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
59175
|
+
acceptNode: (node) => {
|
59176
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
59177
|
+
if (node.disabled || node.hidden || isHiddenInput)
|
59178
|
+
return NodeFilter.FILTER_SKIP;
|
59179
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
59180
|
+
}
|
59181
|
+
});
|
59182
|
+
while (walker.nextNode())
|
59183
|
+
nodes.push(walker.currentNode);
|
59184
|
+
return nodes;
|
59185
|
+
}
|
59186
|
+
function findVisible(elements2, container) {
|
59187
|
+
for (const element of elements2) {
|
59188
|
+
if (!isHidden(element, { upTo: container }))
|
59189
|
+
return element;
|
59190
|
+
}
|
59191
|
+
}
|
59192
|
+
function isHidden(node, { upTo }) {
|
59193
|
+
if (getComputedStyle(node).visibility === "hidden")
|
59194
|
+
return true;
|
59195
|
+
while (node) {
|
59196
|
+
if (upTo !== void 0 && node === upTo)
|
59197
|
+
return false;
|
59198
|
+
if (getComputedStyle(node).display === "none")
|
59199
|
+
return true;
|
59200
|
+
node = node.parentElement;
|
59201
|
+
}
|
59202
|
+
return false;
|
59203
|
+
}
|
59204
|
+
function isSelectableInput(element) {
|
59205
|
+
return element instanceof HTMLInputElement && "select" in element;
|
59206
|
+
}
|
59207
|
+
function focus(element, { select = false } = {}) {
|
59208
|
+
if (element && element.focus) {
|
59209
|
+
const previouslyFocusedElement = document.activeElement;
|
59210
|
+
element.focus({ preventScroll: true });
|
59211
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
59212
|
+
element.select();
|
59213
|
+
}
|
59214
|
+
}
|
59215
|
+
var focusScopesStack = createFocusScopesStack();
|
59216
|
+
function createFocusScopesStack() {
|
59217
|
+
let stack = [];
|
59218
|
+
return {
|
59219
|
+
add(focusScope) {
|
59220
|
+
const activeFocusScope = stack[0];
|
59221
|
+
if (focusScope !== activeFocusScope) {
|
59222
|
+
activeFocusScope?.pause();
|
59223
|
+
}
|
59224
|
+
stack = arrayRemove(stack, focusScope);
|
59225
|
+
stack.unshift(focusScope);
|
59226
|
+
},
|
59227
|
+
remove(focusScope) {
|
59228
|
+
stack = arrayRemove(stack, focusScope);
|
59229
|
+
stack[0]?.resume();
|
59230
|
+
}
|
59231
|
+
};
|
59232
|
+
}
|
59233
|
+
function arrayRemove(array, item) {
|
59234
|
+
const updatedArray = [...array];
|
59235
|
+
const index3 = updatedArray.indexOf(item);
|
59236
|
+
if (index3 !== -1) {
|
59237
|
+
updatedArray.splice(index3, 1);
|
59238
|
+
}
|
59239
|
+
return updatedArray;
|
59240
|
+
}
|
59241
|
+
function removeLinks(items) {
|
59242
|
+
return items.filter((item) => item.tagName !== "A");
|
59243
|
+
}
|
59244
|
+
var Root = FocusScope;
|
59245
|
+
}
|
59246
|
+
});
|
59247
|
+
|
59248
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
59249
|
+
var require_dist60 = __commonJS({
|
59250
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
59251
|
+
"use strict";
|
59252
|
+
var __create2 = Object.create;
|
59253
|
+
var __defProp2 = Object.defineProperty;
|
59254
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59255
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59256
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59257
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59258
|
+
var __export2 = (target, all) => {
|
59259
|
+
for (var name in all)
|
59260
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59261
|
+
};
|
59262
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59263
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59264
|
+
for (let key of __getOwnPropNames2(from2))
|
59265
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59266
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59267
|
+
}
|
59268
|
+
return to2;
|
59269
|
+
};
|
59270
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59271
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59272
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59273
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59274
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59275
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59276
|
+
mod
|
59277
|
+
));
|
59278
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59279
|
+
var index_exports = {};
|
59280
|
+
__export2(index_exports, {
|
59281
|
+
useLayoutEffect: () => useLayoutEffect2
|
59282
|
+
});
|
59283
|
+
module.exports = __toCommonJS2(index_exports);
|
59284
|
+
var React3 = __toESM2(require_react());
|
59285
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
59286
|
+
};
|
59287
|
+
}
|
59288
|
+
});
|
59289
|
+
|
59290
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js
|
59291
|
+
var require_dist61 = __commonJS({
|
59292
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js"(exports, module) {
|
59293
|
+
"use strict";
|
59294
|
+
"use client";
|
59295
|
+
var __create2 = Object.create;
|
59296
|
+
var __defProp2 = Object.defineProperty;
|
59297
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59298
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59299
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59300
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59301
|
+
var __export2 = (target, all) => {
|
59302
|
+
for (var name in all)
|
59303
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59304
|
+
};
|
59305
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59306
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59307
|
+
for (let key of __getOwnPropNames2(from2))
|
59308
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59309
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59310
|
+
}
|
59311
|
+
return to2;
|
59312
|
+
};
|
59313
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59314
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59315
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59316
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59317
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59318
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59319
|
+
mod
|
59320
|
+
));
|
59321
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59322
|
+
var index_exports = {};
|
59323
|
+
__export2(index_exports, {
|
59324
|
+
Portal: () => Portal,
|
59325
|
+
Root: () => Root
|
59326
|
+
});
|
59327
|
+
module.exports = __toCommonJS2(index_exports);
|
59328
|
+
var React3 = __toESM2(require_react());
|
59329
|
+
var import_react_dom = __toESM2(require_react_dom());
|
59330
|
+
var import_react_primitive = require_dist54();
|
59331
|
+
var import_react_use_layout_effect = require_dist60();
|
59332
|
+
var import_jsx_runtime44 = require_jsx_runtime();
|
59333
|
+
var PORTAL_NAME = "Portal";
|
59334
|
+
var Portal = React3.forwardRef((props, forwardedRef) => {
|
59335
|
+
const { container: containerProp, ...portalProps } = props;
|
59336
|
+
const [mounted, setMounted] = React3.useState(false);
|
59337
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
59338
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
59339
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
59340
|
+
});
|
59341
|
+
Portal.displayName = PORTAL_NAME;
|
59342
|
+
var Root = Portal;
|
59343
|
+
}
|
59344
|
+
});
|
59345
|
+
|
59346
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.js
|
59347
|
+
var require_dist62 = __commonJS({
|
59348
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.js"(exports, module) {
|
59349
|
+
"use strict";
|
59350
|
+
var __create2 = Object.create;
|
59351
|
+
var __defProp2 = Object.defineProperty;
|
59352
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59353
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59354
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59355
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59356
|
+
var __export2 = (target, all) => {
|
59357
|
+
for (var name in all)
|
59358
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59359
|
+
};
|
59360
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59361
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59362
|
+
for (let key of __getOwnPropNames2(from2))
|
59363
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59364
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59365
|
+
}
|
59366
|
+
return to2;
|
59367
|
+
};
|
59368
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59369
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59370
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59371
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59372
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59373
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59374
|
+
mod
|
59375
|
+
));
|
59376
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59377
|
+
var index_exports = {};
|
59378
|
+
__export2(index_exports, {
|
59379
|
+
useLayoutEffect: () => useLayoutEffect2
|
59380
|
+
});
|
59381
|
+
module.exports = __toCommonJS2(index_exports);
|
59382
|
+
var React3 = __toESM2(require_react());
|
59383
|
+
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
59384
|
+
};
|
59385
|
+
}
|
59386
|
+
});
|
59387
|
+
|
59388
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js
|
59389
|
+
var require_dist63 = __commonJS({
|
59390
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js"(exports, module) {
|
59391
|
+
"use strict";
|
59392
|
+
"use client";
|
59393
|
+
var __create2 = Object.create;
|
59394
|
+
var __defProp2 = Object.defineProperty;
|
59395
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59396
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59397
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59398
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59399
|
+
var __export2 = (target, all) => {
|
59400
|
+
for (var name in all)
|
59401
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59402
|
+
};
|
59403
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59404
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59405
|
+
for (let key of __getOwnPropNames2(from2))
|
59406
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59407
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59408
|
+
}
|
59409
|
+
return to2;
|
59410
|
+
};
|
59411
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59412
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59413
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59414
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59415
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59416
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59417
|
+
mod
|
59418
|
+
));
|
59419
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59420
|
+
var index_exports = {};
|
59421
|
+
__export2(index_exports, {
|
59422
|
+
Presence: () => Presence,
|
59423
|
+
Root: () => Root
|
59424
|
+
});
|
59425
|
+
module.exports = __toCommonJS2(index_exports);
|
59426
|
+
var React22 = __toESM2(require_react());
|
59427
|
+
var import_react_compose_refs = require_dist46();
|
59428
|
+
var import_react_use_layout_effect = require_dist62();
|
59429
|
+
var React3 = __toESM2(require_react());
|
59430
|
+
function useStateMachine(initialState, machine) {
|
59431
|
+
return React3.useReducer((state, event) => {
|
59432
|
+
const nextState = machine[state][event];
|
59433
|
+
return nextState ?? state;
|
59434
|
+
}, initialState);
|
59435
|
+
}
|
59436
|
+
var Presence = (props) => {
|
59437
|
+
const { present, children } = props;
|
59438
|
+
const presence = usePresence(present);
|
59439
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
|
59440
|
+
const ref = (0, import_react_compose_refs.useComposedRefs)(presence.ref, getElementRef(child));
|
59441
|
+
const forceMount = typeof children === "function";
|
59442
|
+
return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
|
59443
|
+
};
|
59444
|
+
Presence.displayName = "Presence";
|
59445
|
+
function usePresence(present) {
|
59446
|
+
const [node, setNode] = React22.useState();
|
59447
|
+
const stylesRef = React22.useRef(null);
|
59448
|
+
const prevPresentRef = React22.useRef(present);
|
59449
|
+
const prevAnimationNameRef = React22.useRef("none");
|
59450
|
+
const initialState = present ? "mounted" : "unmounted";
|
59451
|
+
const [state, send] = useStateMachine(initialState, {
|
59452
|
+
mounted: {
|
59453
|
+
UNMOUNT: "unmounted",
|
59454
|
+
ANIMATION_OUT: "unmountSuspended"
|
59455
|
+
},
|
59456
|
+
unmountSuspended: {
|
59457
|
+
MOUNT: "mounted",
|
59458
|
+
ANIMATION_END: "unmounted"
|
59459
|
+
},
|
59460
|
+
unmounted: {
|
59461
|
+
MOUNT: "mounted"
|
59462
|
+
}
|
59463
|
+
});
|
59464
|
+
React22.useEffect(() => {
|
59465
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
59466
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
59467
|
+
}, [state]);
|
59468
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
59469
|
+
const styles = stylesRef.current;
|
59470
|
+
const wasPresent = prevPresentRef.current;
|
59471
|
+
const hasPresentChanged = wasPresent !== present;
|
59472
|
+
if (hasPresentChanged) {
|
59473
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
59474
|
+
const currentAnimationName = getAnimationName(styles);
|
59475
|
+
if (present) {
|
59476
|
+
send("MOUNT");
|
59477
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
59478
|
+
send("UNMOUNT");
|
59479
|
+
} else {
|
59480
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
59481
|
+
if (wasPresent && isAnimating) {
|
59482
|
+
send("ANIMATION_OUT");
|
59483
|
+
} else {
|
59484
|
+
send("UNMOUNT");
|
59485
|
+
}
|
59486
|
+
}
|
59487
|
+
prevPresentRef.current = present;
|
59488
|
+
}
|
59489
|
+
}, [present, send]);
|
59490
|
+
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
59491
|
+
if (node) {
|
59492
|
+
let timeoutId;
|
59493
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
59494
|
+
const handleAnimationEnd = (event) => {
|
59495
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
59496
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
59497
|
+
if (event.target === node && isCurrentAnimation) {
|
59498
|
+
send("ANIMATION_END");
|
59499
|
+
if (!prevPresentRef.current) {
|
59500
|
+
const currentFillMode = node.style.animationFillMode;
|
59501
|
+
node.style.animationFillMode = "forwards";
|
59502
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
59503
|
+
if (node.style.animationFillMode === "forwards") {
|
59504
|
+
node.style.animationFillMode = currentFillMode;
|
59505
|
+
}
|
59506
|
+
});
|
59507
|
+
}
|
59508
|
+
}
|
59509
|
+
};
|
59510
|
+
const handleAnimationStart = (event) => {
|
59511
|
+
if (event.target === node) {
|
59512
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
59513
|
+
}
|
59514
|
+
};
|
59515
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
59516
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
59517
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
59518
|
+
return () => {
|
59519
|
+
ownerWindow.clearTimeout(timeoutId);
|
59520
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
59521
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
59522
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
59523
|
+
};
|
59524
|
+
} else {
|
59525
|
+
send("ANIMATION_END");
|
59526
|
+
}
|
59527
|
+
}, [node, send]);
|
59528
|
+
return {
|
59529
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
59530
|
+
ref: React22.useCallback((node2) => {
|
59531
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
59532
|
+
setNode(node2);
|
59533
|
+
}, [])
|
59534
|
+
};
|
59535
|
+
}
|
59536
|
+
function getAnimationName(styles) {
|
59537
|
+
return styles?.animationName || "none";
|
59538
|
+
}
|
59539
|
+
function getElementRef(element) {
|
59540
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
59541
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
59542
|
+
if (mayWarn) {
|
59543
|
+
return element.ref;
|
59544
|
+
}
|
59545
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
59546
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
59547
|
+
if (mayWarn) {
|
59548
|
+
return element.props.ref;
|
59549
|
+
}
|
59550
|
+
return element.props.ref || element.ref;
|
59551
|
+
}
|
59552
|
+
var Root = Presence;
|
59553
|
+
}
|
59554
|
+
});
|
59555
|
+
|
59556
|
+
// ../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js
|
59557
|
+
var require_dist64 = __commonJS({
|
59558
|
+
"../core/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js"(exports, module) {
|
59559
|
+
"use strict";
|
59560
|
+
"use client";
|
59561
|
+
var __create2 = Object.create;
|
59562
|
+
var __defProp2 = Object.defineProperty;
|
59563
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59564
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59565
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59566
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59567
|
+
var __export2 = (target, all) => {
|
59568
|
+
for (var name in all)
|
59569
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59570
|
+
};
|
59571
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59572
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59573
|
+
for (let key of __getOwnPropNames2(from2))
|
59574
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59575
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59576
|
+
}
|
59577
|
+
return to2;
|
59578
|
+
};
|
59579
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59580
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59581
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59582
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59583
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59584
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59585
|
+
mod
|
59586
|
+
));
|
59587
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59588
|
+
var index_exports = {};
|
59589
|
+
__export2(index_exports, {
|
59590
|
+
FocusGuards: () => FocusGuards,
|
59591
|
+
Root: () => Root,
|
59592
|
+
useFocusGuards: () => useFocusGuards
|
59593
|
+
});
|
59594
|
+
module.exports = __toCommonJS2(index_exports);
|
59595
|
+
var React3 = __toESM2(require_react());
|
59596
|
+
var count = 0;
|
59597
|
+
function FocusGuards(props) {
|
59598
|
+
useFocusGuards();
|
59599
|
+
return props.children;
|
59600
|
+
}
|
59601
|
+
function useFocusGuards() {
|
59602
|
+
React3.useEffect(() => {
|
59603
|
+
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
59604
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
59605
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
59606
|
+
count++;
|
59607
|
+
return () => {
|
59608
|
+
if (count === 1) {
|
59609
|
+
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
59610
|
+
}
|
59611
|
+
count--;
|
59612
|
+
};
|
59613
|
+
}, []);
|
59614
|
+
}
|
59615
|
+
function createFocusGuard() {
|
59616
|
+
const element = document.createElement("span");
|
59617
|
+
element.setAttribute("data-radix-focus-guard", "");
|
59618
|
+
element.tabIndex = 0;
|
59619
|
+
element.style.outline = "none";
|
59620
|
+
element.style.opacity = "0";
|
59621
|
+
element.style.position = "fixed";
|
59622
|
+
element.style.pointerEvents = "none";
|
59623
|
+
return element;
|
59624
|
+
}
|
59625
|
+
var Root = FocusGuards;
|
59626
|
+
}
|
59627
|
+
});
|
59628
|
+
|
59629
|
+
// ../core/node_modules/@radix-ui/react-dialog/dist/index.js
|
59630
|
+
var require_dist65 = __commonJS({
|
59631
|
+
"../core/node_modules/@radix-ui/react-dialog/dist/index.js"(exports, module) {
|
59632
|
+
"use strict";
|
59633
|
+
"use client";
|
59634
|
+
var __create2 = Object.create;
|
59635
|
+
var __defProp2 = Object.defineProperty;
|
59636
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
59637
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
59638
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
59639
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
59640
|
+
var __export2 = (target, all) => {
|
59641
|
+
for (var name in all)
|
59642
|
+
__defProp2(target, name, { get: all[name], enumerable: true });
|
59643
|
+
};
|
59644
|
+
var __copyProps2 = (to2, from2, except, desc) => {
|
59645
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
59646
|
+
for (let key of __getOwnPropNames2(from2))
|
59647
|
+
if (!__hasOwnProp2.call(to2, key) && key !== except)
|
59648
|
+
__defProp2(to2, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc2(from2, key)) || desc.enumerable });
|
59649
|
+
}
|
59650
|
+
return to2;
|
59651
|
+
};
|
59652
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
59653
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
59654
|
+
// file that has been converted to a CommonJS file using a Babel-
|
59655
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
59656
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
59657
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
59658
|
+
mod
|
59659
|
+
));
|
59660
|
+
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
59661
|
+
var index_exports = {};
|
59662
|
+
__export2(index_exports, {
|
59663
|
+
Close: () => Close,
|
59664
|
+
Content: () => Content,
|
59665
|
+
Description: () => Description,
|
59666
|
+
Dialog: () => Dialog,
|
59667
|
+
DialogClose: () => DialogClose,
|
59668
|
+
DialogContent: () => DialogContent,
|
59669
|
+
DialogDescription: () => DialogDescription,
|
59670
|
+
DialogOverlay: () => DialogOverlay,
|
59671
|
+
DialogPortal: () => DialogPortal,
|
59672
|
+
DialogTitle: () => DialogTitle,
|
59673
|
+
DialogTrigger: () => DialogTrigger,
|
59674
|
+
Overlay: () => Overlay,
|
59675
|
+
Portal: () => Portal,
|
59676
|
+
Root: () => Root,
|
59677
|
+
Title: () => Title2,
|
59678
|
+
Trigger: () => Trigger,
|
59679
|
+
WarningProvider: () => WarningProvider,
|
59680
|
+
createDialogScope: () => createDialogScope
|
59681
|
+
});
|
59682
|
+
module.exports = __toCommonJS2(index_exports);
|
59683
|
+
var React3 = __toESM2(require_react());
|
59684
|
+
var import_primitive = require_dist45();
|
59685
|
+
var import_react_compose_refs = require_dist46();
|
59686
|
+
var import_react_context = require_dist47();
|
59687
|
+
var import_react_id = require_dist49();
|
59688
|
+
var import_react_use_controllable_state = require_dist51();
|
59689
|
+
var import_react_dismissable_layer = require_dist57();
|
59690
|
+
var import_react_focus_scope = require_dist59();
|
59691
|
+
var import_react_portal = require_dist61();
|
59692
|
+
var import_react_presence = require_dist63();
|
59693
|
+
var import_react_primitive = require_dist54();
|
59694
|
+
var import_react_focus_guards = require_dist64();
|
59695
|
+
var import_react_remove_scroll = require_es57();
|
59696
|
+
var import_aria_hidden = require_es5();
|
59697
|
+
var import_react_slot = require_dist53();
|
59698
|
+
var import_jsx_runtime44 = require_jsx_runtime();
|
59699
|
+
var DIALOG_NAME = "Dialog";
|
59700
|
+
var [createDialogContext, createDialogScope] = (0, import_react_context.createContextScope)(DIALOG_NAME);
|
59701
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
59702
|
+
var Dialog = (props) => {
|
59703
|
+
const {
|
59704
|
+
__scopeDialog,
|
59705
|
+
children,
|
59706
|
+
open: openProp,
|
59707
|
+
defaultOpen,
|
59708
|
+
onOpenChange,
|
59709
|
+
modal = true
|
59710
|
+
} = props;
|
59711
|
+
const triggerRef = React3.useRef(null);
|
59712
|
+
const contentRef = React3.useRef(null);
|
59713
|
+
const [open, setOpen] = (0, import_react_use_controllable_state.useControllableState)({
|
59714
|
+
prop: openProp,
|
59715
|
+
defaultProp: defaultOpen ?? false,
|
59716
|
+
onChange: onOpenChange,
|
59717
|
+
caller: DIALOG_NAME
|
59718
|
+
});
|
59719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59720
|
+
DialogProvider,
|
59721
|
+
{
|
59722
|
+
scope: __scopeDialog,
|
59723
|
+
triggerRef,
|
59724
|
+
contentRef,
|
59725
|
+
contentId: (0, import_react_id.useId)(),
|
59726
|
+
titleId: (0, import_react_id.useId)(),
|
59727
|
+
descriptionId: (0, import_react_id.useId)(),
|
59728
|
+
open,
|
59729
|
+
onOpenChange: setOpen,
|
59730
|
+
onOpenToggle: React3.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
59731
|
+
modal,
|
59732
|
+
children
|
59733
|
+
}
|
59734
|
+
);
|
59735
|
+
};
|
59736
|
+
Dialog.displayName = DIALOG_NAME;
|
59737
|
+
var TRIGGER_NAME = "DialogTrigger";
|
59738
|
+
var DialogTrigger = React3.forwardRef(
|
59739
|
+
(props, forwardedRef) => {
|
59740
|
+
const { __scopeDialog, ...triggerProps } = props;
|
59741
|
+
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
59742
|
+
const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
59743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59744
|
+
import_react_primitive.Primitive.button,
|
59745
|
+
{
|
59746
|
+
type: "button",
|
59747
|
+
"aria-haspopup": "dialog",
|
59748
|
+
"aria-expanded": context.open,
|
59749
|
+
"aria-controls": context.contentId,
|
59750
|
+
"data-state": getState(context.open),
|
59751
|
+
...triggerProps,
|
59752
|
+
ref: composedTriggerRef,
|
59753
|
+
onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle)
|
59754
|
+
}
|
59755
|
+
);
|
59756
|
+
}
|
59757
|
+
);
|
59758
|
+
DialogTrigger.displayName = TRIGGER_NAME;
|
59759
|
+
var PORTAL_NAME = "DialogPortal";
|
59760
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
59761
|
+
forceMount: void 0
|
59762
|
+
});
|
59763
|
+
var DialogPortal = (props) => {
|
59764
|
+
const { __scopeDialog, forceMount, children, container } = props;
|
59765
|
+
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
59766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React3.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_portal.Portal, { asChild: true, container, children: child }) })) });
|
59767
|
+
};
|
59768
|
+
DialogPortal.displayName = PORTAL_NAME;
|
59769
|
+
var OVERLAY_NAME = "DialogOverlay";
|
59770
|
+
var DialogOverlay = React3.forwardRef(
|
59771
|
+
(props, forwardedRef) => {
|
59772
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
59773
|
+
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
59774
|
+
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
59775
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
59776
|
+
}
|
59777
|
+
);
|
59778
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
59779
|
+
var Slot = (0, import_react_slot.createSlot)("DialogOverlay.RemoveScroll");
|
59780
|
+
var DialogOverlayImpl = React3.forwardRef(
|
59781
|
+
(props, forwardedRef) => {
|
59782
|
+
const { __scopeDialog, ...overlayProps } = props;
|
59783
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
59784
|
+
return (
|
59785
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
59786
|
+
// ie. when `Overlay` and `Content` are siblings
|
59787
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59788
|
+
import_react_primitive.Primitive.div,
|
59789
|
+
{
|
59790
|
+
"data-state": getState(context.open),
|
59791
|
+
...overlayProps,
|
59792
|
+
ref: forwardedRef,
|
59793
|
+
style: { pointerEvents: "auto", ...overlayProps.style }
|
59794
|
+
}
|
59795
|
+
) })
|
59796
|
+
);
|
59797
|
+
}
|
59798
|
+
);
|
59799
|
+
var CONTENT_NAME = "DialogContent";
|
59800
|
+
var DialogContent = React3.forwardRef(
|
59801
|
+
(props, forwardedRef) => {
|
59802
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
59803
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
59804
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
59805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
59806
|
+
}
|
59807
|
+
);
|
59808
|
+
DialogContent.displayName = CONTENT_NAME;
|
59809
|
+
var DialogContentModal = React3.forwardRef(
|
59810
|
+
(props, forwardedRef) => {
|
59811
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
59812
|
+
const contentRef = React3.useRef(null);
|
59813
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
59814
|
+
React3.useEffect(() => {
|
59815
|
+
const content = contentRef.current;
|
59816
|
+
if (content)
|
59817
|
+
return (0, import_aria_hidden.hideOthers)(content);
|
59818
|
+
}, []);
|
59819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59820
|
+
DialogContentImpl,
|
59821
|
+
{
|
59822
|
+
...props,
|
59823
|
+
ref: composedRefs,
|
59824
|
+
trapFocus: context.open,
|
59825
|
+
disableOutsidePointerEvents: true,
|
59826
|
+
onCloseAutoFocus: (0, import_primitive.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
59827
|
+
event.preventDefault();
|
59828
|
+
context.triggerRef.current?.focus();
|
59829
|
+
}),
|
59830
|
+
onPointerDownOutside: (0, import_primitive.composeEventHandlers)(props.onPointerDownOutside, (event) => {
|
59831
|
+
const originalEvent = event.detail.originalEvent;
|
59832
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
59833
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
59834
|
+
if (isRightClick)
|
59835
|
+
event.preventDefault();
|
59836
|
+
}),
|
59837
|
+
onFocusOutside: (0, import_primitive.composeEventHandlers)(
|
59838
|
+
props.onFocusOutside,
|
59839
|
+
(event) => event.preventDefault()
|
59840
|
+
)
|
59841
|
+
}
|
59842
|
+
);
|
59843
|
+
}
|
59844
|
+
);
|
59845
|
+
var DialogContentNonModal = React3.forwardRef(
|
59846
|
+
(props, forwardedRef) => {
|
59847
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
59848
|
+
const hasInteractedOutsideRef = React3.useRef(false);
|
59849
|
+
const hasPointerDownOutsideRef = React3.useRef(false);
|
59850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59851
|
+
DialogContentImpl,
|
59852
|
+
{
|
59853
|
+
...props,
|
59854
|
+
ref: forwardedRef,
|
59855
|
+
trapFocus: false,
|
59856
|
+
disableOutsidePointerEvents: false,
|
59857
|
+
onCloseAutoFocus: (event) => {
|
59858
|
+
props.onCloseAutoFocus?.(event);
|
59859
|
+
if (!event.defaultPrevented) {
|
59860
|
+
if (!hasInteractedOutsideRef.current)
|
59861
|
+
context.triggerRef.current?.focus();
|
59862
|
+
event.preventDefault();
|
59863
|
+
}
|
59864
|
+
hasInteractedOutsideRef.current = false;
|
59865
|
+
hasPointerDownOutsideRef.current = false;
|
59866
|
+
},
|
59867
|
+
onInteractOutside: (event) => {
|
59868
|
+
props.onInteractOutside?.(event);
|
59869
|
+
if (!event.defaultPrevented) {
|
59870
|
+
hasInteractedOutsideRef.current = true;
|
59871
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
59872
|
+
hasPointerDownOutsideRef.current = true;
|
59873
|
+
}
|
59874
|
+
}
|
59875
|
+
const target = event.target;
|
59876
|
+
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
59877
|
+
if (targetIsTrigger)
|
59878
|
+
event.preventDefault();
|
59879
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
59880
|
+
event.preventDefault();
|
59881
|
+
}
|
59882
|
+
}
|
59883
|
+
}
|
59884
|
+
);
|
59885
|
+
}
|
59886
|
+
);
|
59887
|
+
var DialogContentImpl = React3.forwardRef(
|
59888
|
+
(props, forwardedRef) => {
|
59889
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
59890
|
+
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
59891
|
+
const contentRef = React3.useRef(null);
|
59892
|
+
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
59893
|
+
(0, import_react_focus_guards.useFocusGuards)();
|
59894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
59895
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59896
|
+
import_react_focus_scope.FocusScope,
|
59897
|
+
{
|
59898
|
+
asChild: true,
|
59899
|
+
loop: true,
|
59900
|
+
trapped: trapFocus,
|
59901
|
+
onMountAutoFocus: onOpenAutoFocus,
|
59902
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
59903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59904
|
+
import_react_dismissable_layer.DismissableLayer,
|
59905
|
+
{
|
59906
|
+
role: "dialog",
|
59907
|
+
id: context.contentId,
|
59908
|
+
"aria-describedby": context.descriptionId,
|
59909
|
+
"aria-labelledby": context.titleId,
|
59910
|
+
"data-state": getState(context.open),
|
59911
|
+
...contentProps,
|
59912
|
+
ref: composedRefs,
|
59913
|
+
onDismiss: () => context.onOpenChange(false)
|
59914
|
+
}
|
59915
|
+
)
|
59916
|
+
}
|
59917
|
+
),
|
59918
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
|
59919
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TitleWarning, { titleId: context.titleId }),
|
59920
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
59921
|
+
] })
|
59922
|
+
] });
|
59923
|
+
}
|
59924
|
+
);
|
59925
|
+
var TITLE_NAME = "DialogTitle";
|
59926
|
+
var DialogTitle = React3.forwardRef(
|
59927
|
+
(props, forwardedRef) => {
|
59928
|
+
const { __scopeDialog, ...titleProps } = props;
|
59929
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
59930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_primitive.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
59931
|
+
}
|
59932
|
+
);
|
59933
|
+
DialogTitle.displayName = TITLE_NAME;
|
59934
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
59935
|
+
var DialogDescription = React3.forwardRef(
|
59936
|
+
(props, forwardedRef) => {
|
59937
|
+
const { __scopeDialog, ...descriptionProps } = props;
|
59938
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
59939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_primitive.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
59940
|
+
}
|
59941
|
+
);
|
59942
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
59943
|
+
var CLOSE_NAME = "DialogClose";
|
59944
|
+
var DialogClose = React3.forwardRef(
|
59945
|
+
(props, forwardedRef) => {
|
59946
|
+
const { __scopeDialog, ...closeProps } = props;
|
59947
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
59948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
59949
|
+
import_react_primitive.Primitive.button,
|
59950
|
+
{
|
59951
|
+
type: "button",
|
59952
|
+
...closeProps,
|
59953
|
+
ref: forwardedRef,
|
59954
|
+
onClick: (0, import_primitive.composeEventHandlers)(props.onClick, () => context.onOpenChange(false))
|
59955
|
+
}
|
59956
|
+
);
|
59957
|
+
}
|
59958
|
+
);
|
59959
|
+
DialogClose.displayName = CLOSE_NAME;
|
59960
|
+
function getState(open) {
|
59961
|
+
return open ? "open" : "closed";
|
59962
|
+
}
|
59963
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
59964
|
+
var [WarningProvider, useWarningContext] = (0, import_react_context.createContext)(TITLE_WARNING_NAME, {
|
59965
|
+
contentName: CONTENT_NAME,
|
59966
|
+
titleName: TITLE_NAME,
|
59967
|
+
docsSlug: "dialog"
|
59968
|
+
});
|
59969
|
+
var TitleWarning = ({ titleId }) => {
|
59970
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
59971
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
59972
|
+
|
59973
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
59974
|
+
|
59975
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
59976
|
+
React3.useEffect(() => {
|
59977
|
+
if (titleId) {
|
59978
|
+
const hasTitle = document.getElementById(titleId);
|
59979
|
+
if (!hasTitle)
|
59980
|
+
console.error(MESSAGE);
|
59981
|
+
}
|
59982
|
+
}, [MESSAGE, titleId]);
|
59983
|
+
return null;
|
59984
|
+
};
|
59985
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
59986
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
59987
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
59988
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
59989
|
+
React3.useEffect(() => {
|
59990
|
+
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
59991
|
+
if (descriptionId && describedById) {
|
59992
|
+
const hasDescription = document.getElementById(descriptionId);
|
59993
|
+
if (!hasDescription)
|
59994
|
+
console.warn(MESSAGE);
|
59995
|
+
}
|
59996
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
59997
|
+
return null;
|
59998
|
+
};
|
59999
|
+
var Root = Dialog;
|
60000
|
+
var Trigger = DialogTrigger;
|
60001
|
+
var Portal = DialogPortal;
|
60002
|
+
var Overlay = DialogOverlay;
|
60003
|
+
var Content = DialogContent;
|
60004
|
+
var Title2 = DialogTitle;
|
60005
|
+
var Description = DialogDescription;
|
60006
|
+
var Close = DialogClose;
|
60007
|
+
}
|
60008
|
+
});
|
60009
|
+
|
57740
60010
|
// ../core/lib/client/jsx/shadcn-ui/dialog.js
|
57741
60011
|
var require_dialog = __commonJS({
|
57742
60012
|
"../core/lib/client/jsx/shadcn-ui/dialog.js"(exports) {
|
@@ -57787,7 +60057,7 @@ var require_dialog = __commonJS({
|
|
57787
60057
|
exports.DialogTrigger = DialogTrigger;
|
57788
60058
|
var jsx_runtime_1 = require_jsx_runtime();
|
57789
60059
|
var React3 = __importStar2(require_react());
|
57790
|
-
var DialogPrimitive = __importStar2(
|
60060
|
+
var DialogPrimitive = __importStar2(require_dist65());
|
57791
60061
|
var lucide_react_1 = require_lucide_react();
|
57792
60062
|
var tailwind_merge_1 = require_bundle_cjs();
|
57793
60063
|
function Dialog({ ...props }) {
|
@@ -57829,6 +60099,38 @@ var require_dialog = __commonJS({
|
|
57829
60099
|
var require_command = __commonJS({
|
57830
60100
|
"../core/lib/client/jsx/shadcn-ui/command.js"(exports) {
|
57831
60101
|
"use strict";
|
60102
|
+
var __createBinding2 = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
60103
|
+
if (k2 === void 0)
|
60104
|
+
k2 = k;
|
60105
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
60106
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
60107
|
+
desc = { enumerable: true, get: function() {
|
60108
|
+
return m[k];
|
60109
|
+
} };
|
60110
|
+
}
|
60111
|
+
Object.defineProperty(o, k2, desc);
|
60112
|
+
} : function(o, m, k, k2) {
|
60113
|
+
if (k2 === void 0)
|
60114
|
+
k2 = k;
|
60115
|
+
o[k2] = m[k];
|
60116
|
+
});
|
60117
|
+
var __setModuleDefault2 = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
60118
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
60119
|
+
} : function(o, v) {
|
60120
|
+
o["default"] = v;
|
60121
|
+
});
|
60122
|
+
var __importStar2 = exports && exports.__importStar || function(mod) {
|
60123
|
+
if (mod && mod.__esModule)
|
60124
|
+
return mod;
|
60125
|
+
var result2 = {};
|
60126
|
+
if (mod != null) {
|
60127
|
+
for (var k in mod)
|
60128
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
60129
|
+
__createBinding2(result2, mod, k);
|
60130
|
+
}
|
60131
|
+
__setModuleDefault2(result2, mod);
|
60132
|
+
return result2;
|
60133
|
+
};
|
57832
60134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
57833
60135
|
exports.Command = Command2;
|
57834
60136
|
exports.CommandDialog = CommandDialog2;
|
@@ -57839,11 +60141,14 @@ var require_command = __commonJS({
|
|
57839
60141
|
exports.CommandItem = CommandItem2;
|
57840
60142
|
exports.CommandShortcut = CommandShortcut;
|
57841
60143
|
exports.CommandSeparator = CommandSeparator2;
|
60144
|
+
exports.SearchInput = SearchInput;
|
57842
60145
|
var jsx_runtime_1 = require_jsx_runtime();
|
60146
|
+
var React3 = __importStar2(require_react());
|
57843
60147
|
var cmdk_1 = require_dist44();
|
57844
60148
|
var lucide_react_1 = require_lucide_react();
|
57845
60149
|
var tailwind_merge_1 = require_bundle_cjs();
|
57846
60150
|
var dialog_1 = require_dialog();
|
60151
|
+
var input_1 = require_input();
|
57847
60152
|
function Command2({ className, ...props }) {
|
57848
60153
|
return (0, jsx_runtime_1.jsx)(cmdk_1.Command, { "data-slot": "command", className: (0, tailwind_merge_1.twMerge)("bg-white text-gray-900 dark:bg-gray-800 dark:text-white flex h-full w-full flex-col overflow-hidden rounded-lg", className), ...props });
|
57849
60154
|
}
|
@@ -57851,7 +60156,11 @@ var require_command = __commonJS({
|
|
57851
60156
|
return (0, jsx_runtime_1.jsxs)(dialog_1.Dialog, { ...props, children: [(0, jsx_runtime_1.jsxs)(dialog_1.DialogHeader, { className: "sr-only", children: [(0, jsx_runtime_1.jsx)(dialog_1.DialogTitle, { children: title }), (0, jsx_runtime_1.jsx)(dialog_1.DialogDescription, { children: description })] }), (0, jsx_runtime_1.jsx)(dialog_1.DialogContent, { className: "overflow-hidden p-0", children: (0, jsx_runtime_1.jsx)(Command2, { className: "[&_[cmdk-group-heading]]:text-gray-500 dark:[&_[cmdk-group-heading]]:text-gray-400 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) })] });
|
57852
60157
|
}
|
57853
60158
|
function CommandInput2({ className, ...props }) {
|
57854
|
-
return (0, jsx_runtime_1.jsxs)("div", { "data-slot": "command-input-wrapper", className: "flex h-8 items-center gap-2 border-b border-gray-200 dark:border-gray-600 px-3", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.SearchIcon, { className: "size-4 shrink-0 text-gray-500 dark:text-gray-400" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, { "data-slot": "command-input", className: (0, tailwind_merge_1.twMerge)("placeholder:text-gray-500 dark:placeholder:text-gray-400 flex h-
|
60159
|
+
return (0, jsx_runtime_1.jsxs)("div", { "data-slot": "command-input-wrapper", className: "flex h-8 items-center gap-2 border-b border-gray-200 dark:border-gray-600 px-3", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.SearchIcon, { className: "size-4 shrink-0 text-gray-500 dark:text-gray-400" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, { "data-slot": "command-input", className: (0, tailwind_merge_1.twMerge)("placeholder:text-gray-500 dark:placeholder:text-gray-400 flex h-8 w-full rounded-md border-b border-gray-200 dark:border-gray-700 bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] });
|
60160
|
+
}
|
60161
|
+
function SearchInput({ className, ...props }) {
|
60162
|
+
const [focused, setFocused] = React3.useState(false);
|
60163
|
+
return (0, jsx_runtime_1.jsxs)("div", { "data-slot": "search-input-wrapper", className: (0, tailwind_merge_1.twMerge)("flex h-8 items-center gap-2 border border-gray-200 dark:border-gray-700 rounded-md px-2", focused && "border-blue-500 dark:border-blue-500", className), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.SearchIcon, { className: "size-4 shrink-0 text-gray-500 dark:text-gray-400" }), (0, jsx_runtime_1.jsx)(input_1.Input, { type: "text", onFocus: () => setFocused(true), onBlur: () => setFocused(false), "data-slot": "search-input", className: (0, tailwind_merge_1.twMerge)("border-none placeholder:text-gray-500 dark:placeholder:text-gray-400 flex h-full w-full px-0 bg-transparent text-base font-normal outline-hidden disabled:cursor-not-allowed disabled:opacity-50"), ...props })] });
|
57855
60164
|
}
|
57856
60165
|
function CommandList2({ className, ...props }) {
|
57857
60166
|
return (0, jsx_runtime_1.jsx)(cmdk_1.Command.List, { "data-slot": "command-list", className: (0, tailwind_merge_1.twMerge)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props });
|
@@ -58427,7 +60736,7 @@ var require_utilities_cjs_development = __commonJS({
|
|
58427
60736
|
});
|
58428
60737
|
|
58429
60738
|
// ../../node_modules/@dnd-kit/utilities/dist/index.js
|
58430
|
-
var
|
60739
|
+
var require_dist66 = __commonJS({
|
58431
60740
|
"../../node_modules/@dnd-kit/utilities/dist/index.js"(exports, module) {
|
58432
60741
|
"use strict";
|
58433
60742
|
if (false) {
|
@@ -58508,7 +60817,7 @@ var require_accessibility_cjs_development = __commonJS({
|
|
58508
60817
|
});
|
58509
60818
|
|
58510
60819
|
// ../../node_modules/@dnd-kit/accessibility/dist/index.js
|
58511
|
-
var
|
60820
|
+
var require_dist67 = __commonJS({
|
58512
60821
|
"../../node_modules/@dnd-kit/accessibility/dist/index.js"(exports, module) {
|
58513
60822
|
"use strict";
|
58514
60823
|
if (false) {
|
@@ -58530,8 +60839,8 @@ var require_core_cjs_development = __commonJS({
|
|
58530
60839
|
var React3 = require_react();
|
58531
60840
|
var React__default = _interopDefault(React3);
|
58532
60841
|
var reactDom = require_react_dom();
|
58533
|
-
var utilities =
|
58534
|
-
var accessibility =
|
60842
|
+
var utilities = require_dist66();
|
60843
|
+
var accessibility = require_dist67();
|
58535
60844
|
var DndMonitorContext = /* @__PURE__ */ React3.createContext(null);
|
58536
60845
|
function useDndMonitor(listener) {
|
58537
60846
|
const registerListener = React3.useContext(DndMonitorContext);
|
@@ -62019,7 +64328,7 @@ var require_core_cjs_development = __commonJS({
|
|
62019
64328
|
});
|
62020
64329
|
|
62021
64330
|
// ../../node_modules/@dnd-kit/core/dist/index.js
|
62022
|
-
var
|
64331
|
+
var require_dist68 = __commonJS({
|
62023
64332
|
"../../node_modules/@dnd-kit/core/dist/index.js"(exports, module) {
|
62024
64333
|
"use strict";
|
62025
64334
|
if (false) {
|
@@ -62040,8 +64349,8 @@ var require_sortable_cjs_development = __commonJS({
|
|
62040
64349
|
}
|
62041
64350
|
var React3 = require_react();
|
62042
64351
|
var React__default = _interopDefault(React3);
|
62043
|
-
var core =
|
62044
|
-
var utilities =
|
64352
|
+
var core = require_dist68();
|
64353
|
+
var utilities = require_dist66();
|
62045
64354
|
function arrayMove(array, from2, to2) {
|
62046
64355
|
const newArray = array.slice();
|
62047
64356
|
newArray.splice(to2 < 0 ? newArray.length + to2 : to2, 0, newArray.splice(from2, 1)[0]);
|
@@ -62732,7 +65041,7 @@ var require_sortable_cjs_development = __commonJS({
|
|
62732
65041
|
});
|
62733
65042
|
|
62734
65043
|
// ../../node_modules/@dnd-kit/sortable/dist/index.js
|
62735
|
-
var
|
65044
|
+
var require_dist69 = __commonJS({
|
62736
65045
|
"../../node_modules/@dnd-kit/sortable/dist/index.js"(exports, module) {
|
62737
65046
|
"use strict";
|
62738
65047
|
if (false) {
|
@@ -62765,9 +65074,9 @@ var require_advanced_stream_mapping = __commonJS({
|
|
62765
65074
|
var util_1 = require_util();
|
62766
65075
|
var language_selector_1 = require_language_selector();
|
62767
65076
|
var react_2 = __importDefault2(require_react());
|
62768
|
-
var utilities_1 =
|
62769
|
-
var core_1 =
|
62770
|
-
var sortable_1 =
|
65077
|
+
var utilities_1 = require_dist66();
|
65078
|
+
var core_1 = require_dist68();
|
65079
|
+
var sortable_1 = require_dist69();
|
62771
65080
|
var lucide_react_2 = require_lucide_react();
|
62772
65081
|
var util_2 = require_util();
|
62773
65082
|
function advancedStreamMappingEditor(defaultValue, data) {
|