groove-dev 0.22.7 → 0.22.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@groove-dev/daemon/src/api.js +12 -2
- package/node_modules/@groove-dev/daemon/src/gateways/manager.js +3 -0
- package/node_modules/@groove-dev/gui/dist/assets/{index-B6DQvtWt.js → index-BKZQfaOu.js} +19 -19
- package/node_modules/@groove-dev/gui/dist/assets/index-CDWObHaG.css +1 -0
- package/node_modules/@groove-dev/gui/dist/index.html +2 -2
- package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +1 -1
- package/node_modules/@groove-dev/gui/src/views/agents.jsx +5 -2
- package/package.json +1 -1
- package/packages/daemon/src/api.js +12 -2
- package/packages/daemon/src/gateways/manager.js +3 -0
- package/packages/gui/dist/assets/{index-B6DQvtWt.js → index-BKZQfaOu.js} +19 -19
- package/packages/gui/dist/assets/index-CDWObHaG.css +1 -0
- package/packages/gui/dist/index.html +2 -2
- package/packages/gui/src/components/agents/agent-feed.jsx +1 -1
- package/packages/gui/src/views/agents.jsx +5 -2
- package/node_modules/@groove-dev/gui/dist/assets/index-DHaSTu1c.css +0 -1
- package/packages/gui/dist/assets/index-DHaSTu1c.css +0 -1
- package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js +0 -68
- package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js +0 -1420
- package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js +0 -17
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js +0 -22
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js +0 -34
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js +0 -101
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js +0 -2534
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js +0 -789
- package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_language.js +0 -115
- package/packages/gui/node_modules/.vite/deps/@codemirror_language.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_search.js +0 -1136
- package/packages/gui/node_modules/.vite/deps/@codemirror_search.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_state.js +0 -63
- package/packages/gui/node_modules/.vite/deps/@codemirror_state.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js +0 -179
- package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@codemirror_view.js +0 -104
- package/packages/gui/node_modules/.vite/deps/@codemirror_view.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js +0 -367
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js +0 -755
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-select.js +0 -1254
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-select.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js +0 -436
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js +0 -531
- package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js +0 -46
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js +0 -121
- package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js +0 -9237
- package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/@xyflow_react.js +0 -9934
- package/packages/gui/node_modules/.vite/deps/@xyflow_react.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/_metadata.json +0 -265
- package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js +0 -5169
- package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js +0 -2000
- package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-3LBP22MX.js +0 -1115
- package/packages/gui/node_modules/.vite/deps/chunk-3LBP22MX.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-3Q7HT7ZF.js +0 -701
- package/packages/gui/node_modules/.vite/deps/chunk-3Q7HT7ZF.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js +0 -1776
- package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-6DLNZUA5.js +0 -142
- package/packages/gui/node_modules/.vite/deps/chunk-6DLNZUA5.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js +0 -292
- package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-AZUN7XMC.js +0 -87
- package/packages/gui/node_modules/.vite/deps/chunk-AZUN7XMC.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js +0 -1004
- package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js +0 -23
- package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js +0 -1062
- package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-I2PYXDFH.js +0 -1106
- package/packages/gui/node_modules/.vite/deps/chunk-I2PYXDFH.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-JPXYHBLX.js +0 -306
- package/packages/gui/node_modules/.vite/deps/chunk-JPXYHBLX.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-JYDZ3XIW.js +0 -264
- package/packages/gui/node_modules/.vite/deps/chunk-JYDZ3XIW.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js +0 -42
- package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-QZQGPDRM.js +0 -2328
- package/packages/gui/node_modules/.vite/deps/chunk-QZQGPDRM.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js +0 -10985
- package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-UO4Y2XXS.js +0 -105
- package/packages/gui/node_modules/.vite/deps/chunk-UO4Y2XXS.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-VW6LO3QI.js +0 -9
- package/packages/gui/node_modules/.vite/deps/chunk-VW6LO3QI.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js +0 -280
- package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js +0 -3459
- package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/clsx.js +0 -22
- package/packages/gui/node_modules/.vite/deps/clsx.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/framer-motion.js +0 -12732
- package/packages/gui/node_modules/.vite/deps/framer-motion.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/lucide-react.js +0 -29653
- package/packages/gui/node_modules/.vite/deps/lucide-react.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/package.json +0 -3
- package/packages/gui/node_modules/.vite/deps/react-dom.js +0 -6
- package/packages/gui/node_modules/.vite/deps/react-dom.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react-dom_client.js +0 -20217
- package/packages/gui/node_modules/.vite/deps/react-dom_client.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react.js +0 -5
- package/packages/gui/node_modules/.vite/deps/react.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -278
- package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js +0 -6
- package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/tailwind-merge.js +0 -3263
- package/packages/gui/node_modules/.vite/deps/tailwind-merge.js.map +0 -7
- package/packages/gui/node_modules/.vite/deps/zustand.js +0 -56
- package/packages/gui/node_modules/.vite/deps/zustand.js.map +0 -7
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_react
|
|
3
|
-
} from "./chunk-CDLO3JFW.js";
|
|
4
|
-
import {
|
|
5
|
-
__commonJS
|
|
6
|
-
} from "./chunk-PR4QN5HX.js";
|
|
7
|
-
|
|
8
|
-
// ../../node_modules/react/cjs/react-jsx-runtime.development.js
|
|
9
|
-
var require_react_jsx_runtime_development = __commonJS({
|
|
10
|
-
"../../node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
|
11
|
-
"use strict";
|
|
12
|
-
(function() {
|
|
13
|
-
function getComponentNameFromType(type) {
|
|
14
|
-
if (null == type) return null;
|
|
15
|
-
if ("function" === typeof type)
|
|
16
|
-
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
17
|
-
if ("string" === typeof type) return type;
|
|
18
|
-
switch (type) {
|
|
19
|
-
case REACT_FRAGMENT_TYPE:
|
|
20
|
-
return "Fragment";
|
|
21
|
-
case REACT_PROFILER_TYPE:
|
|
22
|
-
return "Profiler";
|
|
23
|
-
case REACT_STRICT_MODE_TYPE:
|
|
24
|
-
return "StrictMode";
|
|
25
|
-
case REACT_SUSPENSE_TYPE:
|
|
26
|
-
return "Suspense";
|
|
27
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
28
|
-
return "SuspenseList";
|
|
29
|
-
case REACT_ACTIVITY_TYPE:
|
|
30
|
-
return "Activity";
|
|
31
|
-
}
|
|
32
|
-
if ("object" === typeof type)
|
|
33
|
-
switch ("number" === typeof type.tag && console.error(
|
|
34
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
35
|
-
), type.$$typeof) {
|
|
36
|
-
case REACT_PORTAL_TYPE:
|
|
37
|
-
return "Portal";
|
|
38
|
-
case REACT_CONTEXT_TYPE:
|
|
39
|
-
return type.displayName || "Context";
|
|
40
|
-
case REACT_CONSUMER_TYPE:
|
|
41
|
-
return (type._context.displayName || "Context") + ".Consumer";
|
|
42
|
-
case REACT_FORWARD_REF_TYPE:
|
|
43
|
-
var innerType = type.render;
|
|
44
|
-
type = type.displayName;
|
|
45
|
-
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
46
|
-
return type;
|
|
47
|
-
case REACT_MEMO_TYPE:
|
|
48
|
-
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
49
|
-
case REACT_LAZY_TYPE:
|
|
50
|
-
innerType = type._payload;
|
|
51
|
-
type = type._init;
|
|
52
|
-
try {
|
|
53
|
-
return getComponentNameFromType(type(innerType));
|
|
54
|
-
} catch (x) {
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
function testStringCoercion(value) {
|
|
60
|
-
return "" + value;
|
|
61
|
-
}
|
|
62
|
-
function checkKeyStringCoercion(value) {
|
|
63
|
-
try {
|
|
64
|
-
testStringCoercion(value);
|
|
65
|
-
var JSCompiler_inline_result = false;
|
|
66
|
-
} catch (e) {
|
|
67
|
-
JSCompiler_inline_result = true;
|
|
68
|
-
}
|
|
69
|
-
if (JSCompiler_inline_result) {
|
|
70
|
-
JSCompiler_inline_result = console;
|
|
71
|
-
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
72
|
-
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
73
|
-
JSCompiler_temp_const.call(
|
|
74
|
-
JSCompiler_inline_result,
|
|
75
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
76
|
-
JSCompiler_inline_result$jscomp$0
|
|
77
|
-
);
|
|
78
|
-
return testStringCoercion(value);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function getTaskName(type) {
|
|
82
|
-
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
83
|
-
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
|
|
84
|
-
return "<...>";
|
|
85
|
-
try {
|
|
86
|
-
var name = getComponentNameFromType(type);
|
|
87
|
-
return name ? "<" + name + ">" : "<...>";
|
|
88
|
-
} catch (x) {
|
|
89
|
-
return "<...>";
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function getOwner() {
|
|
93
|
-
var dispatcher = ReactSharedInternals.A;
|
|
94
|
-
return null === dispatcher ? null : dispatcher.getOwner();
|
|
95
|
-
}
|
|
96
|
-
function UnknownOwner() {
|
|
97
|
-
return Error("react-stack-top-frame");
|
|
98
|
-
}
|
|
99
|
-
function hasValidKey(config) {
|
|
100
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
101
|
-
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
102
|
-
if (getter && getter.isReactWarning) return false;
|
|
103
|
-
}
|
|
104
|
-
return void 0 !== config.key;
|
|
105
|
-
}
|
|
106
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
107
|
-
function warnAboutAccessingKey() {
|
|
108
|
-
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
|
|
109
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
110
|
-
displayName
|
|
111
|
-
));
|
|
112
|
-
}
|
|
113
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
114
|
-
Object.defineProperty(props, "key", {
|
|
115
|
-
get: warnAboutAccessingKey,
|
|
116
|
-
configurable: true
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
function elementRefGetterWithDeprecationWarning() {
|
|
120
|
-
var componentName = getComponentNameFromType(this.type);
|
|
121
|
-
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
|
|
122
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
123
|
-
));
|
|
124
|
-
componentName = this.props.ref;
|
|
125
|
-
return void 0 !== componentName ? componentName : null;
|
|
126
|
-
}
|
|
127
|
-
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
128
|
-
var refProp = props.ref;
|
|
129
|
-
type = {
|
|
130
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
131
|
-
type,
|
|
132
|
-
key,
|
|
133
|
-
props,
|
|
134
|
-
_owner: owner
|
|
135
|
-
};
|
|
136
|
-
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
137
|
-
enumerable: false,
|
|
138
|
-
get: elementRefGetterWithDeprecationWarning
|
|
139
|
-
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
140
|
-
type._store = {};
|
|
141
|
-
Object.defineProperty(type._store, "validated", {
|
|
142
|
-
configurable: false,
|
|
143
|
-
enumerable: false,
|
|
144
|
-
writable: true,
|
|
145
|
-
value: 0
|
|
146
|
-
});
|
|
147
|
-
Object.defineProperty(type, "_debugInfo", {
|
|
148
|
-
configurable: false,
|
|
149
|
-
enumerable: false,
|
|
150
|
-
writable: true,
|
|
151
|
-
value: null
|
|
152
|
-
});
|
|
153
|
-
Object.defineProperty(type, "_debugStack", {
|
|
154
|
-
configurable: false,
|
|
155
|
-
enumerable: false,
|
|
156
|
-
writable: true,
|
|
157
|
-
value: debugStack
|
|
158
|
-
});
|
|
159
|
-
Object.defineProperty(type, "_debugTask", {
|
|
160
|
-
configurable: false,
|
|
161
|
-
enumerable: false,
|
|
162
|
-
writable: true,
|
|
163
|
-
value: debugTask
|
|
164
|
-
});
|
|
165
|
-
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
166
|
-
return type;
|
|
167
|
-
}
|
|
168
|
-
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
169
|
-
var children = config.children;
|
|
170
|
-
if (void 0 !== children)
|
|
171
|
-
if (isStaticChildren)
|
|
172
|
-
if (isArrayImpl(children)) {
|
|
173
|
-
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
|
|
174
|
-
validateChildKeys(children[isStaticChildren]);
|
|
175
|
-
Object.freeze && Object.freeze(children);
|
|
176
|
-
} else
|
|
177
|
-
console.error(
|
|
178
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
179
|
-
);
|
|
180
|
-
else validateChildKeys(children);
|
|
181
|
-
if (hasOwnProperty.call(config, "key")) {
|
|
182
|
-
children = getComponentNameFromType(type);
|
|
183
|
-
var keys = Object.keys(config).filter(function(k) {
|
|
184
|
-
return "key" !== k;
|
|
185
|
-
});
|
|
186
|
-
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
187
|
-
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
188
|
-
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
189
|
-
isStaticChildren,
|
|
190
|
-
children,
|
|
191
|
-
keys,
|
|
192
|
-
children
|
|
193
|
-
), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
194
|
-
}
|
|
195
|
-
children = null;
|
|
196
|
-
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
197
|
-
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
198
|
-
if ("key" in config) {
|
|
199
|
-
maybeKey = {};
|
|
200
|
-
for (var propName in config)
|
|
201
|
-
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
202
|
-
} else maybeKey = config;
|
|
203
|
-
children && defineKeyPropWarningGetter(
|
|
204
|
-
maybeKey,
|
|
205
|
-
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
|
|
206
|
-
);
|
|
207
|
-
return ReactElement(
|
|
208
|
-
type,
|
|
209
|
-
children,
|
|
210
|
-
maybeKey,
|
|
211
|
-
getOwner(),
|
|
212
|
-
debugStack,
|
|
213
|
-
debugTask
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
function validateChildKeys(node) {
|
|
217
|
-
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
218
|
-
}
|
|
219
|
-
function isValidElement(object) {
|
|
220
|
-
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
221
|
-
}
|
|
222
|
-
var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
|
223
|
-
return null;
|
|
224
|
-
};
|
|
225
|
-
React = {
|
|
226
|
-
react_stack_bottom_frame: function(callStackForError) {
|
|
227
|
-
return callStackForError();
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
var specialPropKeyWarningShown;
|
|
231
|
-
var didWarnAboutElementRef = {};
|
|
232
|
-
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
233
|
-
React,
|
|
234
|
-
UnknownOwner
|
|
235
|
-
)();
|
|
236
|
-
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
237
|
-
var didWarnAboutKeySpread = {};
|
|
238
|
-
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
239
|
-
exports.jsx = function(type, config, maybeKey) {
|
|
240
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
241
|
-
return jsxDEVImpl(
|
|
242
|
-
type,
|
|
243
|
-
config,
|
|
244
|
-
maybeKey,
|
|
245
|
-
false,
|
|
246
|
-
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
247
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
248
|
-
);
|
|
249
|
-
};
|
|
250
|
-
exports.jsxs = function(type, config, maybeKey) {
|
|
251
|
-
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
252
|
-
return jsxDEVImpl(
|
|
253
|
-
type,
|
|
254
|
-
config,
|
|
255
|
-
maybeKey,
|
|
256
|
-
true,
|
|
257
|
-
trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
|
|
258
|
-
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
259
|
-
);
|
|
260
|
-
};
|
|
261
|
-
})();
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
// ../../node_modules/react/jsx-runtime.js
|
|
266
|
-
var require_jsx_runtime = __commonJS({
|
|
267
|
-
"../../node_modules/react/jsx-runtime.js"(exports, module) {
|
|
268
|
-
if (false) {
|
|
269
|
-
module.exports = null;
|
|
270
|
-
} else {
|
|
271
|
-
module.exports = require_react_jsx_runtime_development();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
export {
|
|
277
|
-
require_jsx_runtime
|
|
278
|
-
};
|
|
279
|
-
/*! Bundled license information:
|
|
280
|
-
|
|
281
|
-
react/cjs/react-jsx-runtime.development.js:
|
|
282
|
-
(**
|
|
283
|
-
* @license React
|
|
284
|
-
* react-jsx-runtime.development.js
|
|
285
|
-
*
|
|
286
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the MIT license found in the
|
|
289
|
-
* LICENSE file in the root directory of this source tree.
|
|
290
|
-
*)
|
|
291
|
-
*/
|
|
292
|
-
//# sourceMappingURL=chunk-ACEP5X2F.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../node_modules/react/cjs/react-jsx-runtime.development.js", "../../../../../node_modules/react/jsx-runtime.js"],
|
|
4
|
-
"sourcesContent": ["/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n maybeKey,\n getOwner(),\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n", "'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAAA;AAAA;AAAA;AAWA,KACG,WAAY;AACX,eAAS,yBAAyB,MAAM;AACtC,YAAI,QAAQ,KAAM,QAAO;AACzB,YAAI,eAAe,OAAO;AACxB,iBAAO,KAAK,aAAa,yBACrB,OACA,KAAK,eAAe,KAAK,QAAQ;AACvC,YAAI,aAAa,OAAO,KAAM,QAAO;AACrC,gBAAQ,MAAM;AAAA,UACZ,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,UACT,KAAK;AACH,mBAAO;AAAA,QACX;AACA,YAAI,aAAa,OAAO;AACtB,kBACG,aAAa,OAAO,KAAK,OACxB,QAAQ;AAAA,YACN;AAAA,UACF,GACF,KAAK,UACL;AAAA,YACA,KAAK;AACH,qBAAO;AAAA,YACT,KAAK;AACH,qBAAO,KAAK,eAAe;AAAA,YAC7B,KAAK;AACH,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
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createContextScope,
|
|
3
|
-
createSlot,
|
|
4
|
-
useComposedRefs
|
|
5
|
-
} from "./chunk-JPXYHBLX.js";
|
|
6
|
-
import {
|
|
7
|
-
require_jsx_runtime
|
|
8
|
-
} from "./chunk-ACEP5X2F.js";
|
|
9
|
-
import {
|
|
10
|
-
require_react
|
|
11
|
-
} from "./chunk-CDLO3JFW.js";
|
|
12
|
-
import {
|
|
13
|
-
__toESM
|
|
14
|
-
} from "./chunk-PR4QN5HX.js";
|
|
15
|
-
|
|
16
|
-
// ../../node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
17
|
-
var import_react = __toESM(require_react(), 1);
|
|
18
|
-
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
|
19
|
-
var import_react2 = __toESM(require_react(), 1);
|
|
20
|
-
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
|
21
|
-
function createCollection(name) {
|
|
22
|
-
const PROVIDER_NAME = name + "CollectionProvider";
|
|
23
|
-
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
|
24
|
-
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
25
|
-
PROVIDER_NAME,
|
|
26
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
27
|
-
);
|
|
28
|
-
const CollectionProvider = (props) => {
|
|
29
|
-
const { scope, children } = props;
|
|
30
|
-
const ref = import_react.default.useRef(null);
|
|
31
|
-
const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
32
|
-
return (0, import_jsx_runtime.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
33
|
-
};
|
|
34
|
-
CollectionProvider.displayName = PROVIDER_NAME;
|
|
35
|
-
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
36
|
-
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
37
|
-
const CollectionSlot = import_react.default.forwardRef(
|
|
38
|
-
(props, forwardedRef) => {
|
|
39
|
-
const { scope, children } = props;
|
|
40
|
-
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
41
|
-
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
42
|
-
return (0, import_jsx_runtime.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
46
|
-
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
47
|
-
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
48
|
-
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
49
|
-
const CollectionItemSlot = import_react.default.forwardRef(
|
|
50
|
-
(props, forwardedRef) => {
|
|
51
|
-
const { scope, children, ...itemData } = props;
|
|
52
|
-
const ref = import_react.default.useRef(null);
|
|
53
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
54
|
-
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
55
|
-
import_react.default.useEffect(() => {
|
|
56
|
-
context.itemMap.set(ref, { ref, ...itemData });
|
|
57
|
-
return () => void context.itemMap.delete(ref);
|
|
58
|
-
});
|
|
59
|
-
return (0, import_jsx_runtime.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
63
|
-
function useCollection(scope) {
|
|
64
|
-
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
65
|
-
const getItems = import_react.default.useCallback(() => {
|
|
66
|
-
const collectionNode = context.collectionRef.current;
|
|
67
|
-
if (!collectionNode) return [];
|
|
68
|
-
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
69
|
-
const items = Array.from(context.itemMap.values());
|
|
70
|
-
const orderedItems = items.sort(
|
|
71
|
-
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
|
72
|
-
);
|
|
73
|
-
return orderedItems;
|
|
74
|
-
}, [context.collectionRef, context.itemMap]);
|
|
75
|
-
return getItems;
|
|
76
|
-
}
|
|
77
|
-
return [
|
|
78
|
-
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
|
79
|
-
useCollection,
|
|
80
|
-
createCollectionScope
|
|
81
|
-
];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
createCollection
|
|
86
|
-
};
|
|
87
|
-
//# sourceMappingURL=chunk-AZUN7XMC.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../node_modules/@radix-ui/react-collection/src/collection-legacy.tsx", "../../../../../node_modules/@radix-ui/react-collection/src/collection.tsx", "../../../../../node_modules/@radix-ui/react-collection/src/ordered-dictionary.ts"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createSlot, type Slot } from '@radix-ui/react-slot';\n\ntype SlotProps = React.ComponentPropsWithoutRef<typeof Slot>;\ntype CollectionElement = HTMLElement;\ninterface CollectionProps extends SlotProps {\n scope: any;\n}\n\n// We have resorted to returning slots directly rather than exposing primitives that can then\n// be slotted like `<CollectionItem as={Slot}>\u2026</CollectionItem>`.\n// This is because we encountered issues with generic types that cannot be statically analysed\n// due to creating them dynamically via createCollection.\n\nfunction createCollection<ItemElement extends HTMLElement, ItemData = {}>(name: string) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/\n\n const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n\n type ContextValue = {\n collectionRef: React.RefObject<CollectionElement | null>;\n itemMap: Map<\n React.RefObject<ItemElement | null>,\n { ref: React.RefObject<ItemElement | null> } & ItemData\n >;\n };\n\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext<ContextValue>(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: new Map() }\n );\n\n const CollectionProvider: React.FC<{ children?: React.ReactNode; scope: any }> = (props) => {\n const { scope, children } = props;\n const ref = React.useRef<CollectionElement>(null);\n const itemMap = React.useRef<ContextValue['itemMap']>(new Map()).current;\n return (\n <CollectionProviderImpl scope={scope} itemMap={itemMap} collectionRef={ref}>\n {children}\n </CollectionProviderImpl>\n );\n };\n\n CollectionProvider.displayName = PROVIDER_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/\n\n const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef<CollectionElement, CollectionProps>(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <CollectionSlotImpl ref={composedRefs}>{children}</CollectionSlotImpl>;\n }\n );\n\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/\n\n const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n\n type CollectionItemSlotProps = ItemData & {\n children: React.ReactNode;\n scope: any;\n };\n\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef<ItemElement, CollectionItemSlotProps>(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef<ItemElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...(itemData as unknown as ItemData) });\n return () => void context.itemMap.delete(ref);\n });\n\n return (\n <CollectionItemSlotImpl {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs}>\n {children}\n </CollectionItemSlotImpl>\n );\n }\n );\n\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useCollection(scope: any) {\n const context = useCollectionContext(name + 'CollectionConsumer', scope);\n\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current!) - orderedNodes.indexOf(b.ref.current!)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n\n return getItems;\n }\n\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope,\n ] as const;\n}\n\nexport { createCollection };\nexport type { CollectionProps };\n", "import React from 'react';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createSlot, type Slot } from '@radix-ui/react-slot';\nimport type { EntryOf } from './ordered-dictionary';\nimport { OrderedDict } from './ordered-dictionary';\n\ntype SlotProps = React.ComponentPropsWithoutRef<typeof Slot>;\ntype CollectionElement = HTMLElement;\ninterface CollectionProps extends SlotProps {\n scope: any;\n}\n\ninterface BaseItemData {\n id?: string;\n}\n\ntype ItemDataWithElement<\n ItemData extends BaseItemData,\n ItemElement extends HTMLElement,\n> = ItemData & {\n element: ItemElement;\n};\n\ntype ItemMap<ItemElement extends HTMLElement, ItemData extends BaseItemData> = OrderedDict<\n ItemElement,\n ItemDataWithElement<ItemData, ItemElement>\n>;\n\nfunction createCollection<\n ItemElement extends HTMLElement,\n ItemData extends BaseItemData = BaseItemData,\n>(name: string) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/\n\n const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n\n type ContextValue = {\n collectionElement: CollectionElement | null;\n collectionRef: React.Ref<CollectionElement | null>;\n collectionRefObject: React.RefObject<CollectionElement | null>;\n itemMap: ItemMap<ItemElement, ItemData>;\n setItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, ItemData>>>;\n };\n\n const [CollectionContextProvider, useCollectionContext] = createCollectionContext<ContextValue>(\n PROVIDER_NAME,\n {\n collectionElement: null,\n collectionRef: { current: null },\n collectionRefObject: { current: null },\n itemMap: new OrderedDict(),\n setItemMap: () => void 0,\n }\n );\n\n type CollectionState = [\n ItemMap: ItemMap<ItemElement, ItemData>,\n SetItemMap: React.Dispatch<React.SetStateAction<ItemMap<ItemElement, ItemData>>>,\n ];\n\n const CollectionProvider: React.FC<{\n children?: React.ReactNode;\n scope: any;\n state?: CollectionState;\n }> = ({ state, ...props }) => {\n return state ? (\n <CollectionProviderImpl {...props} state={state} />\n ) : (\n <CollectionInit {...props} />\n );\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n\n const CollectionInit: React.FC<{\n children?: React.ReactNode;\n scope: any;\n }> = (props) => {\n const state = useInitCollection();\n return <CollectionProviderImpl {...props} state={state} />;\n };\n CollectionInit.displayName = PROVIDER_NAME + 'Init';\n\n const CollectionProviderImpl: React.FC<{\n children?: React.ReactNode;\n scope: any;\n state: CollectionState;\n }> = (props) => {\n const { scope, children, state } = props;\n const ref = React.useRef<CollectionElement>(null);\n const [collectionElement, setCollectionElement] = React.useState<CollectionElement | null>(\n null\n );\n const composeRefs = useComposedRefs(ref, setCollectionElement);\n const [itemMap, setItemMap] = state;\n\n React.useEffect(() => {\n if (!collectionElement) return;\n\n const observer = getChildListObserver(() => {\n // setItemMap((map) => {\n // const copy = new OrderedDict(map).toSorted(([, a], [, b]) =>\n // !a.element || !b.element ? 0 : isElementPreceding(a.element, b.element) ? -1 : 1\n // );\n // // check if the order has changed\n // let index = -1;\n // for (const entry of copy) {\n // index++;\n // const key = map.keyAt(index)!;\n // const [copyKey] = entry;\n // if (key !== copyKey) {\n // // order has changed!\n // return copy;\n // }\n // }\n // return map;\n // });\n });\n observer.observe(collectionElement, {\n childList: true,\n subtree: true,\n });\n return () => {\n observer.disconnect();\n };\n }, [collectionElement]);\n\n return (\n <CollectionContextProvider\n scope={scope}\n itemMap={itemMap}\n setItemMap={setItemMap}\n collectionRef={composeRefs}\n collectionRefObject={ref}\n collectionElement={collectionElement}\n >\n {children}\n </CollectionContextProvider>\n );\n };\n\n CollectionProviderImpl.displayName = PROVIDER_NAME + 'Impl';\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/\n\n const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef<CollectionElement, CollectionProps>(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <CollectionSlotImpl ref={composedRefs}>{children}</CollectionSlotImpl>;\n }\n );\n\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/\n\n const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n\n type CollectionItemSlotProps = ItemData & {\n children: React.ReactNode;\n scope: any;\n };\n\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef<ItemElement, CollectionItemSlotProps>(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef<ItemElement>(null);\n const [element, setElement] = React.useState<ItemElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, setElement);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n\n const { setItemMap } = context;\n\n const itemDataRef = React.useRef(itemData);\n if (!shallowEqual(itemDataRef.current, itemData)) {\n itemDataRef.current = itemData;\n }\n const memoizedItemData = itemDataRef.current;\n\n React.useEffect(() => {\n const itemData = memoizedItemData;\n setItemMap((map) => {\n if (!element) {\n return map;\n }\n\n if (!map.has(element)) {\n map.set(element, { ...(itemData as unknown as ItemData), element });\n return map.toSorted(sortByDocumentPosition);\n }\n\n return map\n .set(element, { ...(itemData as unknown as ItemData), element })\n .toSorted(sortByDocumentPosition);\n });\n\n return () => {\n setItemMap((map) => {\n if (!element || !map.has(element)) {\n return map;\n }\n map.delete(element);\n return new OrderedDict(map);\n });\n };\n }, [element, memoizedItemData, setItemMap]);\n\n return (\n <CollectionItemSlotImpl {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs as any}>\n {children}\n </CollectionItemSlotImpl>\n );\n }\n );\n\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n\n /* -----------------------------------------------------------------------------------------------\n * useInitCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useInitCollection() {\n return React.useState<ItemMap<ItemElement, ItemData>>(new OrderedDict());\n }\n\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/\n\n function useCollection(scope: any) {\n const { itemMap } = useCollectionContext(name + 'CollectionConsumer', scope);\n\n return itemMap;\n }\n\n const functions = {\n createCollectionScope,\n useCollection,\n useInitCollection,\n };\n\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n functions,\n ] as const;\n}\n\nexport { createCollection };\nexport type { CollectionProps };\n\nfunction shallowEqual(a: any, b: any) {\n if (a === b) return true;\n if (typeof a !== 'object' || typeof b !== 'object') return false;\n if (a == null || b == null) return false;\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n if (keysA.length !== keysB.length) return false;\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (a[key] !== b[key]) return false;\n }\n return true;\n}\n\nfunction isElementPreceding(a: Element, b: Element) {\n return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);\n}\n\nfunction sortByDocumentPosition<E extends HTMLElement, T extends BaseItemData>(\n a: EntryOf<ItemMap<E, T>>,\n b: EntryOf<ItemMap<E, T>>\n) {\n return !a[1].element || !b[1].element\n ? 0\n : isElementPreceding(a[1].element, b[1].element)\n ? -1\n : 1;\n}\n\nfunction getChildListObserver(callback: () => void) {\n const observer = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n callback();\n return;\n }\n }\n });\n\n return observer;\n}\n", "// Not a real member because it shouldn't be accessible, but the super class\n// calls `set` which needs to read the instanciation state, so it can't be a\n// private member.\nconst __instanciated = new WeakMap<OrderedDict<any, any>, boolean>();\nexport class OrderedDict<K, V> extends Map<K, V> {\n #keys: K[];\n\n constructor(iterable?: Iterable<readonly [K, V]> | null | undefined);\n constructor(entries?: readonly (readonly [K, V])[] | null) {\n super(entries);\n this.#keys = [...super.keys()];\n __instanciated.set(this, true);\n }\n\n set(key: K, value: V) {\n if (__instanciated.get(this)) {\n if (this.has(key)) {\n this.#keys[this.#keys.indexOf(key)] = key;\n } else {\n this.#keys.push(key);\n }\n }\n super.set(key, value);\n return this;\n }\n\n insert(index: number, key: K, value: V) {\n const has = this.has(key);\n const length = this.#keys.length;\n const relativeIndex = toSafeInteger(index);\n let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n\n if (safeIndex === this.size || (has && safeIndex === this.size - 1) || safeIndex === -1) {\n this.set(key, value);\n return this;\n }\n\n const size = this.size + (has ? 0 : 1);\n\n // If you insert at, say, -2, without this bit you'd replace the\n // second-to-last item and push the rest up one, which means the new item is\n // 3rd to last. This isn't very intuitive; inserting at -2 is more like\n // saying \"make this item the second to last\".\n if (relativeIndex < 0) {\n actualIndex++;\n }\n\n const keys = [...this.#keys];\n let nextValue: V | undefined;\n let shouldSkip = false;\n for (let i = actualIndex; i < size; i++) {\n if (actualIndex === i) {\n let nextKey = keys[i]!;\n if (keys[i] === key) {\n nextKey = keys[i + 1]!;\n }\n if (has) {\n // delete first to ensure that the item is moved to the end\n this.delete(key);\n }\n nextValue = this.get(nextKey);\n this.set(key, value);\n } else {\n if (!shouldSkip && keys[i - 1] === key) {\n shouldSkip = true;\n }\n const currentKey = keys[shouldSkip ? i : i - 1]!;\n const currentValue = nextValue!;\n nextValue = this.get(currentKey);\n this.delete(currentKey);\n this.set(currentKey, currentValue);\n }\n }\n return this;\n }\n\n with(index: number, key: K, value: V) {\n const copy = new OrderedDict(this);\n copy.insert(index, key, value);\n return copy;\n }\n\n before(key: K) {\n const index = this.#keys.indexOf(key) - 1;\n if (index < 0) {\n return undefined;\n }\n return this.entryAt(index);\n }\n\n /**\n * Sets a new key-value pair at the position before the given key.\n */\n setBefore(key: K, newKey: K, value: V) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index, newKey, value);\n }\n\n after(key: K) {\n let index = this.#keys.indexOf(key);\n index = index === -1 || index === this.size - 1 ? -1 : index + 1;\n if (index === -1) {\n return undefined;\n }\n return this.entryAt(index);\n }\n\n /**\n * Sets a new key-value pair at the position after the given key.\n */\n setAfter(key: K, newKey: K, value: V) {\n const index = this.#keys.indexOf(key);\n if (index === -1) {\n return this;\n }\n return this.insert(index + 1, newKey, value);\n }\n\n first() {\n return this.entryAt(0);\n }\n\n last() {\n return this.entryAt(-1);\n }\n\n clear() {\n this.#keys = [];\n return super.clear();\n }\n\n delete(key: K) {\n const deleted = super.delete(key);\n if (deleted) {\n this.#keys.splice(this.#keys.indexOf(key), 1);\n }\n return deleted;\n }\n\n deleteAt(index: number) {\n const key = this.keyAt(index);\n if (key !== undefined) {\n return this.delete(key);\n }\n return false;\n }\n\n at(index: number) {\n const key = at(this.#keys, index);\n if (key !== undefined) {\n return this.get(key);\n }\n }\n\n entryAt(index: number): [K, V] | undefined {\n const key = at(this.#keys, index);\n if (key !== undefined) {\n return [key, this.get(key)!];\n }\n }\n\n indexOf(key: K) {\n return this.#keys.indexOf(key);\n }\n\n keyAt(index: number) {\n return at(this.#keys, index);\n }\n\n from(key: K, offset: number) {\n const index = this.indexOf(key);\n if (index === -1) {\n return undefined;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.at(dest);\n }\n\n keyFrom(key: K, offset: number) {\n const index = this.indexOf(key);\n if (index === -1) {\n return undefined;\n }\n let dest = index + offset;\n if (dest < 0) dest = 0;\n if (dest >= this.size) dest = this.size - 1;\n return this.keyAt(dest);\n }\n\n find(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => boolean,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return entry;\n }\n index++;\n }\n return undefined;\n }\n\n findIndex(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => boolean,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return index;\n }\n index++;\n }\n return -1;\n }\n\n filter<KK extends K, VV extends V>(\n predicate: (entry: [K, V], index: number, dict: OrderedDict<K, V>) => entry is [KK, VV],\n thisArg?: any\n ): OrderedDict<KK, VV>;\n\n filter(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ): OrderedDict<K, V>;\n\n filter(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n const entries: Array<[K, V]> = [];\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n entries.push(entry);\n }\n index++;\n }\n return new OrderedDict(entries);\n }\n\n map<U>(\n callbackfn: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => U,\n thisArg?: any\n ): OrderedDict<K, U> {\n const entries: [K, U][] = [];\n let index = 0;\n for (const entry of this) {\n entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);\n index++;\n }\n return new OrderedDict(entries);\n }\n\n reduce(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V]\n ): [K, V];\n reduce(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V],\n initialValue: [K, V]\n ): [K, V];\n reduce<U>(\n callbackfn: (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n initialValue: U\n ): U;\n\n reduce<U>(\n ...args: [\n (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n U?,\n ]\n ) {\n const [callbackfn, initialValue] = args;\n let index = 0;\n let accumulator = initialValue ?? this.at(0)!;\n for (const entry of this) {\n if (index === 0 && args.length === 1) {\n accumulator = entry as any;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n index++;\n }\n return accumulator;\n }\n\n reduceRight(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V]\n ): [K, V];\n reduceRight(\n callbackfn: (\n previousValue: [K, V],\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => [K, V],\n initialValue: [K, V]\n ): [K, V];\n reduceRight<U>(\n callbackfn: (\n previousValue: [K, V],\n currentValue: U,\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n initialValue: U\n ): U;\n\n reduceRight<U>(\n ...args: [\n (\n previousValue: U,\n currentEntry: [K, V],\n currentIndex: number,\n dictionary: OrderedDict<K, V>\n ) => U,\n U?,\n ]\n ) {\n const [callbackfn, initialValue] = args;\n let accumulator = initialValue ?? this.at(-1)!;\n for (let index = this.size - 1; index >= 0; index--) {\n const entry = this.at(index)!;\n if (index === this.size - 1 && args.length === 1) {\n accumulator = entry as any;\n } else {\n accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);\n }\n }\n return accumulator;\n }\n\n toSorted(compareFn?: (a: [K, V], b: [K, V]) => number): OrderedDict<K, V> {\n const entries = [...this.entries()].sort(compareFn);\n return new OrderedDict(entries);\n }\n\n toReversed(): OrderedDict<K, V> {\n const reversed = new OrderedDict<K, V>();\n for (let index = this.size - 1; index >= 0; index--) {\n const key = this.keyAt(index)!;\n const element = this.get(key)!;\n reversed.set(key, element);\n }\n return reversed;\n }\n\n toSpliced(start: number, deleteCount?: number): OrderedDict<K, V>;\n toSpliced(start: number, deleteCount: number, ...items: [K, V][]): OrderedDict<K, V>;\n\n toSpliced(...args: [start: number, deleteCount: number, ...items: [K, V][]]) {\n const entries = [...this.entries()];\n entries.splice(...args);\n return new OrderedDict(entries);\n }\n\n slice(start?: number, end?: number) {\n const result = new OrderedDict<K, V>();\n let stop = this.size - 1;\n\n if (start === undefined) {\n return result;\n }\n\n if (start < 0) {\n start = start + this.size;\n }\n\n if (end !== undefined && end > 0) {\n stop = end - 1;\n }\n\n for (let index = start; index <= stop; index++) {\n const key = this.keyAt(index)!;\n const element = this.get(key)!;\n result.set(key, element);\n }\n return result;\n }\n\n every(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return false;\n }\n index++;\n }\n return true;\n }\n\n some(\n predicate: (entry: [K, V], index: number, dictionary: OrderedDict<K, V>) => unknown,\n thisArg?: any\n ) {\n let index = 0;\n for (const entry of this) {\n if (Reflect.apply(predicate, thisArg, [entry, index, this])) {\n return true;\n }\n index++;\n }\n return false;\n }\n}\n\nexport type KeyOf<D extends OrderedDict<any, any>> =\n D extends OrderedDict<infer K, any> ? K : never;\nexport type ValueOf<D extends OrderedDict<any, any>> =\n D extends OrderedDict<any, infer V> ? V : never;\nexport type EntryOf<D extends OrderedDict<any, any>> = [KeyOf<D>, ValueOf<D>];\nexport type KeyFrom<E extends EntryOf<any>> = E[0];\nexport type ValueFrom<E extends EntryOf<any>> = E[1];\n\nfunction at<T>(array: ArrayLike<T>, index: number): T | undefined {\n if ('at' in Array.prototype) {\n return Array.prototype.at.call(array, index);\n }\n const actualIndex = toSafeIndex(array, index);\n return actualIndex === -1 ? undefined : array[actualIndex];\n}\n\nfunction toSafeIndex(array: ArrayLike<any>, index: number) {\n const length = array.length;\n const relativeIndex = toSafeInteger(index);\n const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;\n return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;\n}\n\nfunction toSafeInteger(number: number) {\n // eslint-disable-next-line no-self-compare\n return number !== number || number === 0 ? 0 : Math.trunc(number);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA,mBAAkB;AA0CZ,yBAAA;AC1CN,IAAAA,gBAAkB;AAsEZ,IAAAC,sBAAA;ADtDN,SAAS,iBAAiE,MAAc;AAKtF,QAAM,gBAAgB,OAAO;AAC7B,QAAM,CAAC,yBAAyB,qBAAqB,IAAI,mBAAmB,aAAa;AAUzF,QAAM,CAAC,wBAAwB,oBAAoB,IAAI;IACrD;IACA,EAAE,eAAe,EAAE,SAAS,KAAK,GAAG,SAAS,oBAAI,IAAI,EAAE;EACzD;AAEA,QAAM,qBAA2E,CAAC,UAAU;AAC1F,UAAM,EA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