mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-22 09:34:57 +02:00
7931 lines
388 KiB
JavaScript
Vendored
7931 lines
388 KiB
JavaScript
Vendored
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined,
|
||
"[project]/node_modules/@radix-ui/react-label/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Label",
|
||
()=>Label,
|
||
"Root",
|
||
()=>Root
|
||
]);
|
||
// src/label.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-primitive/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
"use client";
|
||
;
|
||
;
|
||
;
|
||
var NAME = "Label";
|
||
var Label = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].label, {
|
||
...props,
|
||
ref: forwardedRef,
|
||
onMouseDown: (event)=>{
|
||
const target = event.target;
|
||
if (target.closest("button, input, select, textarea")) return;
|
||
props.onMouseDown?.(event);
|
||
if (!event.defaultPrevented && event.detail > 1) event.preventDefault();
|
||
}
|
||
});
|
||
});
|
||
Label.displayName = NAME;
|
||
var Root = Label;
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-context/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"createContext",
|
||
()=>createContext2,
|
||
"createContextScope",
|
||
()=>createContextScope
|
||
]);
|
||
// packages/react/context/src/create-context.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
function createContext2(rootComponentName, defaultContext) {
|
||
const Context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
const Provider = (props)=>{
|
||
const { children, ...context } = props;
|
||
const value = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContext2.Provider.useMemo[value]": ()=>context
|
||
}["createContext2.Provider.useMemo[value]"], Object.values(context));
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Context.Provider, {
|
||
value,
|
||
children
|
||
});
|
||
};
|
||
Provider.displayName = rootComponentName + "Provider";
|
||
function useContext2(consumerName) {
|
||
const context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useContext"](Context);
|
||
if (context) return context;
|
||
if (defaultContext !== void 0) return defaultContext;
|
||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||
}
|
||
return [
|
||
Provider,
|
||
useContext2
|
||
];
|
||
}
|
||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||
let defaultContexts = [];
|
||
function createContext3(rootComponentName, defaultContext) {
|
||
const BaseContext = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
const index = defaultContexts.length;
|
||
defaultContexts = [
|
||
...defaultContexts,
|
||
defaultContext
|
||
];
|
||
const Provider = (props)=>{
|
||
const { scope, children, ...context } = props;
|
||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||
const value = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContextScope.createContext3.Provider.useMemo[value]": ()=>context
|
||
}["createContextScope.createContext3.Provider.useMemo[value]"], Object.values(context));
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Context.Provider, {
|
||
value,
|
||
children
|
||
});
|
||
};
|
||
Provider.displayName = rootComponentName + "Provider";
|
||
function useContext2(consumerName, scope) {
|
||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||
const context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useContext"](Context);
|
||
if (context) return context;
|
||
if (defaultContext !== void 0) return defaultContext;
|
||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||
}
|
||
return [
|
||
Provider,
|
||
useContext2
|
||
];
|
||
}
|
||
const createScope = ()=>{
|
||
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
});
|
||
return function useScope(scope) {
|
||
const contexts = scope?.[scopeName] || scopeContexts;
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContextScope.createScope.useScope.useMemo": ()=>({
|
||
[`__scope${scopeName}`]: {
|
||
...scope,
|
||
[scopeName]: contexts
|
||
}
|
||
})
|
||
}["createContextScope.createScope.useScope.useMemo"], [
|
||
scope,
|
||
contexts
|
||
]);
|
||
};
|
||
};
|
||
createScope.scopeName = scopeName;
|
||
return [
|
||
createContext3,
|
||
composeContextScopes(createScope, ...createContextScopeDeps)
|
||
];
|
||
}
|
||
function composeContextScopes(...scopes) {
|
||
const baseScope = scopes[0];
|
||
if (scopes.length === 1) return baseScope;
|
||
const createScope = ()=>{
|
||
const scopeHooks = scopes.map((createScope2)=>({
|
||
useScope: createScope2(),
|
||
scopeName: createScope2.scopeName
|
||
}));
|
||
return function useComposedScopes(overrideScopes) {
|
||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName })=>{
|
||
const scopeProps = useScope(overrideScopes);
|
||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||
return {
|
||
...nextScopes2,
|
||
...currentScope
|
||
};
|
||
}, {});
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"composeContextScopes.createScope.useComposedScopes.useMemo": ()=>({
|
||
[`__scope${baseScope.scopeName}`]: nextScopes
|
||
})
|
||
}["composeContextScopes.createScope.useComposedScopes.useMemo"], [
|
||
nextScopes
|
||
]);
|
||
};
|
||
};
|
||
createScope.scopeName = baseScope.scopeName;
|
||
return createScope;
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Root",
|
||
()=>Slot,
|
||
"Slot",
|
||
()=>Slot,
|
||
"Slottable",
|
||
()=>Slottable,
|
||
"createSlot",
|
||
()=>createSlot,
|
||
"createSlottable",
|
||
()=>createSlottable
|
||
]);
|
||
// src/slot.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlot(ownerName) {
|
||
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
||
const Slot2 = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { children, ...slotProps } = props;
|
||
const childrenArray = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].toArray(children);
|
||
const slottable = childrenArray.find(isSlottable);
|
||
if (slottable) {
|
||
const newElement = slottable.props.children;
|
||
const newChildren = childrenArray.map((child)=>{
|
||
if (child === slottable) {
|
||
if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].count(newElement) > 1) return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].only(null);
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? newElement.props.children : null;
|
||
} else {
|
||
return child;
|
||
}
|
||
});
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, {
|
||
...slotProps,
|
||
ref: forwardedRef,
|
||
children: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["cloneElement"](newElement, void 0, newChildren) : null
|
||
});
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, {
|
||
...slotProps,
|
||
ref: forwardedRef,
|
||
children
|
||
});
|
||
});
|
||
Slot2.displayName = `${ownerName}.Slot`;
|
||
return Slot2;
|
||
}
|
||
var Slot = /* @__PURE__ */ createSlot("Slot");
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlotClone(ownerName) {
|
||
const SlotClone = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { children, ...slotProps } = props;
|
||
if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](children)) {
|
||
const childrenRef = getElementRef(children);
|
||
const props2 = mergeProps(slotProps, children.props);
|
||
if (children.type !== __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"]) {
|
||
props2.ref = forwardedRef ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeRefs"])(forwardedRef, childrenRef) : childrenRef;
|
||
}
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["cloneElement"](children, props2);
|
||
}
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].count(children) > 1 ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].only(null) : null;
|
||
});
|
||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||
return SlotClone;
|
||
}
|
||
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlottable(ownerName) {
|
||
const Slottable2 = ({ children })=>{
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"], {
|
||
children
|
||
});
|
||
};
|
||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||
return Slottable2;
|
||
}
|
||
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
||
function isSlottable(child) {
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||
}
|
||
function mergeProps(slotProps, childProps) {
|
||
const overrideProps = {
|
||
...childProps
|
||
};
|
||
for(const propName in childProps){
|
||
const slotPropValue = slotProps[propName];
|
||
const childPropValue = childProps[propName];
|
||
const isHandler = /^on[A-Z]/.test(propName);
|
||
if (isHandler) {
|
||
if (slotPropValue && childPropValue) {
|
||
overrideProps[propName] = (...args)=>{
|
||
const result = childPropValue(...args);
|
||
slotPropValue(...args);
|
||
return result;
|
||
};
|
||
} else if (slotPropValue) {
|
||
overrideProps[propName] = slotPropValue;
|
||
}
|
||
} else if (propName === "style") {
|
||
overrideProps[propName] = {
|
||
...slotPropValue,
|
||
...childPropValue
|
||
};
|
||
} else if (propName === "className") {
|
||
overrideProps[propName] = [
|
||
slotPropValue,
|
||
childPropValue
|
||
].filter(Boolean).join(" ");
|
||
}
|
||
}
|
||
return {
|
||
...slotProps,
|
||
...overrideProps
|
||
};
|
||
}
|
||
function getElementRef(element) {
|
||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||
if (mayWarn) {
|
||
return element.ref;
|
||
}
|
||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||
if (mayWarn) {
|
||
return element.props.ref;
|
||
}
|
||
return element.props.ref || element.ref;
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Primitive",
|
||
()=>Primitive,
|
||
"Root",
|
||
()=>Root,
|
||
"dispatchDiscreteCustomEvent",
|
||
()=>dispatchDiscreteCustomEvent
|
||
]);
|
||
// src/primitive.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react-dom/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
;
|
||
var NODES = [
|
||
"a",
|
||
"button",
|
||
"div",
|
||
"form",
|
||
"h2",
|
||
"h3",
|
||
"img",
|
||
"input",
|
||
"label",
|
||
"li",
|
||
"nav",
|
||
"ol",
|
||
"p",
|
||
"select",
|
||
"span",
|
||
"svg",
|
||
"ul"
|
||
];
|
||
var Primitive = NODES.reduce((primitive, node)=>{
|
||
const Slot = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createSlot"])(`Primitive.${node}`);
|
||
const Node = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { asChild, ...primitiveProps } = props;
|
||
const Comp = asChild ? Slot : node;
|
||
if (typeof window !== "undefined") {
|
||
window[Symbol.for("radix-ui")] = true;
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Comp, {
|
||
...primitiveProps,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
Node.displayName = `Primitive.${node}`;
|
||
return {
|
||
...primitive,
|
||
[node]: Node
|
||
};
|
||
}, {});
|
||
function dispatchDiscreteCustomEvent(target, event) {
|
||
if (target) __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["flushSync"](()=>target.dispatchEvent(event));
|
||
}
|
||
var Root = Primitive;
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-popover/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Anchor",
|
||
()=>Anchor2,
|
||
"Arrow",
|
||
()=>Arrow2,
|
||
"Close",
|
||
()=>Close,
|
||
"Content",
|
||
()=>Content2,
|
||
"Popover",
|
||
()=>Popover,
|
||
"PopoverAnchor",
|
||
()=>PopoverAnchor,
|
||
"PopoverArrow",
|
||
()=>PopoverArrow,
|
||
"PopoverClose",
|
||
()=>PopoverClose,
|
||
"PopoverContent",
|
||
()=>PopoverContent,
|
||
"PopoverPortal",
|
||
()=>PopoverPortal,
|
||
"PopoverTrigger",
|
||
()=>PopoverTrigger,
|
||
"Portal",
|
||
()=>Portal,
|
||
"Root",
|
||
()=>Root2,
|
||
"Trigger",
|
||
()=>Trigger,
|
||
"createPopoverScope",
|
||
()=>createPopoverScope
|
||
]);
|
||
// src/popover.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/primitive/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$context$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-context/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$dismissable$2d$layer$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$guards$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-focus-guards/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$scope$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-focus-scope/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$id$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-id/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-popper/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$portal$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-portal/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$presence$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-presence/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-primitive/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$controllable$2d$state$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$aria$2d$hidden$2f$dist$2f$es2015$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/aria-hidden/dist/es2015/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$remove$2d$scroll$2f$dist$2f$es2015$2f$Combination$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__$3c$export__default__as__RemoveScroll$3e$__ = __turbopack_context__.i("[project]/node_modules/react-remove-scroll/dist/es2015/Combination.js [app-client] (ecmascript) <export default as RemoveScroll>");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
"use client";
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
var POPOVER_NAME = "Popover";
|
||
var [createPopoverContext, createPopoverScope] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$context$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContextScope"])(POPOVER_NAME, [
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createPopperScope"]
|
||
]);
|
||
var usePopperScope = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createPopperScope"])();
|
||
var [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);
|
||
var Popover = (props)=>{
|
||
const { __scopePopover, children, open: openProp, defaultOpen, onOpenChange, modal = false } = props;
|
||
const popperScope = usePopperScope(__scopePopover);
|
||
const triggerRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](null);
|
||
const [hasCustomAnchor, setHasCustomAnchor] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](false);
|
||
const [open, setOpen] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$controllable$2d$state$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useControllableState"])({
|
||
prop: openProp,
|
||
defaultProp: defaultOpen ?? false,
|
||
onChange: onOpenChange,
|
||
caller: POPOVER_NAME
|
||
});
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Root"], {
|
||
...popperScope,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(PopoverProvider, {
|
||
scope: __scopePopover,
|
||
contentId: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$id$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useId"])(),
|
||
triggerRef,
|
||
open,
|
||
onOpenChange: setOpen,
|
||
onOpenToggle: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"Popover.useCallback": ()=>setOpen({
|
||
"Popover.useCallback": (prevOpen)=>!prevOpen
|
||
}["Popover.useCallback"])
|
||
}["Popover.useCallback"], [
|
||
setOpen
|
||
]),
|
||
hasCustomAnchor,
|
||
onCustomAnchorAdd: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"Popover.useCallback": ()=>setHasCustomAnchor(true)
|
||
}["Popover.useCallback"], []),
|
||
onCustomAnchorRemove: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"Popover.useCallback": ()=>setHasCustomAnchor(false)
|
||
}["Popover.useCallback"], []),
|
||
modal,
|
||
children
|
||
})
|
||
});
|
||
};
|
||
Popover.displayName = POPOVER_NAME;
|
||
var ANCHOR_NAME = "PopoverAnchor";
|
||
var PopoverAnchor = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopePopover, ...anchorProps } = props;
|
||
const context = usePopoverContext(ANCHOR_NAME, __scopePopover);
|
||
const popperScope = usePopperScope(__scopePopover);
|
||
const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"PopoverAnchor.useEffect": ()=>{
|
||
onCustomAnchorAdd();
|
||
return ({
|
||
"PopoverAnchor.useEffect": ()=>onCustomAnchorRemove()
|
||
})["PopoverAnchor.useEffect"];
|
||
}
|
||
}["PopoverAnchor.useEffect"], [
|
||
onCustomAnchorAdd,
|
||
onCustomAnchorRemove
|
||
]);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Anchor"], {
|
||
...popperScope,
|
||
...anchorProps,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
PopoverAnchor.displayName = ANCHOR_NAME;
|
||
var TRIGGER_NAME = "PopoverTrigger";
|
||
var PopoverTrigger = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopePopover, ...triggerProps } = props;
|
||
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
||
const popperScope = usePopperScope(__scopePopover);
|
||
const composedTriggerRef = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, context.triggerRef);
|
||
const trigger = /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].button, {
|
||
type: "button",
|
||
"aria-haspopup": "dialog",
|
||
"aria-expanded": context.open,
|
||
"aria-controls": context.contentId,
|
||
"data-state": getState(context.open),
|
||
...triggerProps,
|
||
ref: composedTriggerRef,
|
||
onClick: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(props.onClick, context.onOpenToggle)
|
||
});
|
||
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Anchor"], {
|
||
asChild: true,
|
||
...popperScope,
|
||
children: trigger
|
||
});
|
||
});
|
||
PopoverTrigger.displayName = TRIGGER_NAME;
|
||
var PORTAL_NAME = "PopoverPortal";
|
||
var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {
|
||
forceMount: void 0
|
||
});
|
||
var PopoverPortal = (props)=>{
|
||
const { __scopePopover, forceMount, children, container } = props;
|
||
const context = usePopoverContext(PORTAL_NAME, __scopePopover);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(PortalProvider, {
|
||
scope: __scopePopover,
|
||
forceMount,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$presence$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Presence"], {
|
||
present: forceMount || context.open,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$portal$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Portal"], {
|
||
asChild: true,
|
||
container,
|
||
children
|
||
})
|
||
})
|
||
});
|
||
};
|
||
PopoverPortal.displayName = PORTAL_NAME;
|
||
var CONTENT_NAME = "PopoverContent";
|
||
var PopoverContent = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);
|
||
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
||
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$presence$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Presence"], {
|
||
present: forceMount || context.open,
|
||
children: context.modal ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(PopoverContentModal, {
|
||
...contentProps,
|
||
ref: forwardedRef
|
||
}) : /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(PopoverContentNonModal, {
|
||
...contentProps,
|
||
ref: forwardedRef
|
||
})
|
||
});
|
||
});
|
||
PopoverContent.displayName = CONTENT_NAME;
|
||
var Slot = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createSlot"])("PopoverContent.RemoveScroll");
|
||
var PopoverContentModal = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
||
const contentRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](null);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, contentRef);
|
||
const isRightClickOutsideRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](false);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"PopoverContentModal.useEffect": ()=>{
|
||
const content = contentRef.current;
|
||
if (content) return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$aria$2d$hidden$2f$dist$2f$es2015$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["hideOthers"])(content);
|
||
}
|
||
}["PopoverContentModal.useEffect"], []);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$remove$2d$scroll$2f$dist$2f$es2015$2f$Combination$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__$3c$export__default__as__RemoveScroll$3e$__["RemoveScroll"], {
|
||
as: Slot,
|
||
allowPinchZoom: true,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(PopoverContentImpl, {
|
||
...props,
|
||
ref: composedRefs,
|
||
trapFocus: context.open,
|
||
disableOutsidePointerEvents: true,
|
||
onCloseAutoFocus: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(props.onCloseAutoFocus, (event)=>{
|
||
event.preventDefault();
|
||
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
||
}),
|
||
onPointerDownOutside: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(props.onPointerDownOutside, (event)=>{
|
||
const originalEvent = event.detail.originalEvent;
|
||
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
||
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
||
isRightClickOutsideRef.current = isRightClick;
|
||
}, {
|
||
checkForDefaultPrevented: false
|
||
}),
|
||
onFocusOutside: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(props.onFocusOutside, (event)=>event.preventDefault(), {
|
||
checkForDefaultPrevented: false
|
||
})
|
||
})
|
||
});
|
||
});
|
||
var PopoverContentNonModal = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
||
const hasInteractedOutsideRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](false);
|
||
const hasPointerDownOutsideRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](false);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(PopoverContentImpl, {
|
||
...props,
|
||
ref: forwardedRef,
|
||
trapFocus: false,
|
||
disableOutsidePointerEvents: false,
|
||
onCloseAutoFocus: (event)=>{
|
||
props.onCloseAutoFocus?.(event);
|
||
if (!event.defaultPrevented) {
|
||
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
||
event.preventDefault();
|
||
}
|
||
hasInteractedOutsideRef.current = false;
|
||
hasPointerDownOutsideRef.current = false;
|
||
},
|
||
onInteractOutside: (event)=>{
|
||
props.onInteractOutside?.(event);
|
||
if (!event.defaultPrevented) {
|
||
hasInteractedOutsideRef.current = true;
|
||
if (event.detail.originalEvent.type === "pointerdown") {
|
||
hasPointerDownOutsideRef.current = true;
|
||
}
|
||
}
|
||
const target = event.target;
|
||
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
||
if (targetIsTrigger) event.preventDefault();
|
||
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
||
event.preventDefault();
|
||
}
|
||
}
|
||
});
|
||
});
|
||
var PopoverContentImpl = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopePopover, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, ...contentProps } = props;
|
||
const context = usePopoverContext(CONTENT_NAME, __scopePopover);
|
||
const popperScope = usePopperScope(__scopePopover);
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$guards$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useFocusGuards"])();
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$scope$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["FocusScope"], {
|
||
asChild: true,
|
||
loop: true,
|
||
trapped: trapFocus,
|
||
onMountAutoFocus: onOpenAutoFocus,
|
||
onUnmountAutoFocus: onCloseAutoFocus,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$dismissable$2d$layer$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["DismissableLayer"], {
|
||
asChild: true,
|
||
disableOutsidePointerEvents,
|
||
onInteractOutside,
|
||
onEscapeKeyDown,
|
||
onPointerDownOutside,
|
||
onFocusOutside,
|
||
onDismiss: ()=>context.onOpenChange(false),
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Content"], {
|
||
"data-state": getState(context.open),
|
||
role: "dialog",
|
||
id: context.contentId,
|
||
...popperScope,
|
||
...contentProps,
|
||
ref: forwardedRef,
|
||
style: {
|
||
...contentProps.style,
|
||
// re-namespace exposed content custom properties
|
||
...{
|
||
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
||
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
||
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
||
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
||
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
||
}
|
||
}
|
||
})
|
||
})
|
||
});
|
||
});
|
||
var CLOSE_NAME = "PopoverClose";
|
||
var PopoverClose = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopePopover, ...closeProps } = props;
|
||
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popover$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].button, {
|
||
type: "button",
|
||
...closeProps,
|
||
ref: forwardedRef,
|
||
onClick: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(props.onClick, ()=>context.onOpenChange(false))
|
||
});
|
||
});
|
||
PopoverClose.displayName = CLOSE_NAME;
|
||
var ARROW_NAME = "PopoverArrow";
|
||
var PopoverArrow = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopePopover, ...arrowProps } = props;
|
||
const popperScope = usePopperScope(__scopePopover);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Arrow"], {
|
||
...popperScope,
|
||
...arrowProps,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
PopoverArrow.displayName = ARROW_NAME;
|
||
function getState(open) {
|
||
return open ? "open" : "closed";
|
||
}
|
||
var Root2 = Popover;
|
||
var Anchor2 = PopoverAnchor;
|
||
var Trigger = PopoverTrigger;
|
||
var Portal = PopoverPortal;
|
||
var Content2 = PopoverContent;
|
||
var Close = PopoverClose;
|
||
var Arrow2 = PopoverArrow;
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-context/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"createContext",
|
||
()=>createContext2,
|
||
"createContextScope",
|
||
()=>createContextScope
|
||
]);
|
||
// packages/react/context/src/create-context.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
function createContext2(rootComponentName, defaultContext) {
|
||
const Context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
const Provider = (props)=>{
|
||
const { children, ...context } = props;
|
||
const value = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContext2.Provider.useMemo[value]": ()=>context
|
||
}["createContext2.Provider.useMemo[value]"], Object.values(context));
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Context.Provider, {
|
||
value,
|
||
children
|
||
});
|
||
};
|
||
Provider.displayName = rootComponentName + "Provider";
|
||
function useContext2(consumerName) {
|
||
const context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useContext"](Context);
|
||
if (context) return context;
|
||
if (defaultContext !== void 0) return defaultContext;
|
||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||
}
|
||
return [
|
||
Provider,
|
||
useContext2
|
||
];
|
||
}
|
||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||
let defaultContexts = [];
|
||
function createContext3(rootComponentName, defaultContext) {
|
||
const BaseContext = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
const index = defaultContexts.length;
|
||
defaultContexts = [
|
||
...defaultContexts,
|
||
defaultContext
|
||
];
|
||
const Provider = (props)=>{
|
||
const { scope, children, ...context } = props;
|
||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||
const value = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContextScope.createContext3.Provider.useMemo[value]": ()=>context
|
||
}["createContextScope.createContext3.Provider.useMemo[value]"], Object.values(context));
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Context.Provider, {
|
||
value,
|
||
children
|
||
});
|
||
};
|
||
Provider.displayName = rootComponentName + "Provider";
|
||
function useContext2(consumerName, scope) {
|
||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||
const context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useContext"](Context);
|
||
if (context) return context;
|
||
if (defaultContext !== void 0) return defaultContext;
|
||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||
}
|
||
return [
|
||
Provider,
|
||
useContext2
|
||
];
|
||
}
|
||
const createScope = ()=>{
|
||
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
});
|
||
return function useScope(scope) {
|
||
const contexts = scope?.[scopeName] || scopeContexts;
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContextScope.createScope.useScope.useMemo": ()=>({
|
||
[`__scope${scopeName}`]: {
|
||
...scope,
|
||
[scopeName]: contexts
|
||
}
|
||
})
|
||
}["createContextScope.createScope.useScope.useMemo"], [
|
||
scope,
|
||
contexts
|
||
]);
|
||
};
|
||
};
|
||
createScope.scopeName = scopeName;
|
||
return [
|
||
createContext3,
|
||
composeContextScopes(createScope, ...createContextScopeDeps)
|
||
];
|
||
}
|
||
function composeContextScopes(...scopes) {
|
||
const baseScope = scopes[0];
|
||
if (scopes.length === 1) return baseScope;
|
||
const createScope = ()=>{
|
||
const scopeHooks = scopes.map((createScope2)=>({
|
||
useScope: createScope2(),
|
||
scopeName: createScope2.scopeName
|
||
}));
|
||
return function useComposedScopes(overrideScopes) {
|
||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName })=>{
|
||
const scopeProps = useScope(overrideScopes);
|
||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||
return {
|
||
...nextScopes2,
|
||
...currentScope
|
||
};
|
||
}, {});
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"composeContextScopes.createScope.useComposedScopes.useMemo": ()=>({
|
||
[`__scope${baseScope.scopeName}`]: nextScopes
|
||
})
|
||
}["composeContextScopes.createScope.useComposedScopes.useMemo"], [
|
||
nextScopes
|
||
]);
|
||
};
|
||
};
|
||
createScope.scopeName = baseScope.scopeName;
|
||
return createScope;
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-use-previous/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"usePrevious",
|
||
()=>usePrevious
|
||
]);
|
||
// packages/react/use-previous/src/use-previous.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
;
|
||
function usePrevious(value) {
|
||
const ref = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"]({
|
||
value,
|
||
previous: value
|
||
});
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"usePrevious.useMemo": ()=>{
|
||
if (ref.current.value !== value) {
|
||
ref.current.previous = ref.current.value;
|
||
ref.current.value = value;
|
||
}
|
||
return ref.current.previous;
|
||
}
|
||
}["usePrevious.useMemo"], [
|
||
value
|
||
]);
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Root",
|
||
()=>Slot,
|
||
"Slot",
|
||
()=>Slot,
|
||
"Slottable",
|
||
()=>Slottable,
|
||
"createSlot",
|
||
()=>createSlot,
|
||
"createSlottable",
|
||
()=>createSlottable
|
||
]);
|
||
// src/slot.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlot(ownerName) {
|
||
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
||
const Slot2 = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { children, ...slotProps } = props;
|
||
const childrenArray = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].toArray(children);
|
||
const slottable = childrenArray.find(isSlottable);
|
||
if (slottable) {
|
||
const newElement = slottable.props.children;
|
||
const newChildren = childrenArray.map((child)=>{
|
||
if (child === slottable) {
|
||
if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].count(newElement) > 1) return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].only(null);
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? newElement.props.children : null;
|
||
} else {
|
||
return child;
|
||
}
|
||
});
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, {
|
||
...slotProps,
|
||
ref: forwardedRef,
|
||
children: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["cloneElement"](newElement, void 0, newChildren) : null
|
||
});
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, {
|
||
...slotProps,
|
||
ref: forwardedRef,
|
||
children
|
||
});
|
||
});
|
||
Slot2.displayName = `${ownerName}.Slot`;
|
||
return Slot2;
|
||
}
|
||
var Slot = /* @__PURE__ */ createSlot("Slot");
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlotClone(ownerName) {
|
||
const SlotClone = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { children, ...slotProps } = props;
|
||
if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](children)) {
|
||
const childrenRef = getElementRef(children);
|
||
const props2 = mergeProps(slotProps, children.props);
|
||
if (children.type !== __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"]) {
|
||
props2.ref = forwardedRef ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeRefs"])(forwardedRef, childrenRef) : childrenRef;
|
||
}
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["cloneElement"](children, props2);
|
||
}
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].count(children) > 1 ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].only(null) : null;
|
||
});
|
||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||
return SlotClone;
|
||
}
|
||
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlottable(ownerName) {
|
||
const Slottable2 = ({ children })=>{
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"], {
|
||
children
|
||
});
|
||
};
|
||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||
return Slottable2;
|
||
}
|
||
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
||
function isSlottable(child) {
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||
}
|
||
function mergeProps(slotProps, childProps) {
|
||
const overrideProps = {
|
||
...childProps
|
||
};
|
||
for(const propName in childProps){
|
||
const slotPropValue = slotProps[propName];
|
||
const childPropValue = childProps[propName];
|
||
const isHandler = /^on[A-Z]/.test(propName);
|
||
if (isHandler) {
|
||
if (slotPropValue && childPropValue) {
|
||
overrideProps[propName] = (...args)=>{
|
||
const result = childPropValue(...args);
|
||
slotPropValue(...args);
|
||
return result;
|
||
};
|
||
} else if (slotPropValue) {
|
||
overrideProps[propName] = slotPropValue;
|
||
}
|
||
} else if (propName === "style") {
|
||
overrideProps[propName] = {
|
||
...slotPropValue,
|
||
...childPropValue
|
||
};
|
||
} else if (propName === "className") {
|
||
overrideProps[propName] = [
|
||
slotPropValue,
|
||
childPropValue
|
||
].filter(Boolean).join(" ");
|
||
}
|
||
}
|
||
return {
|
||
...slotProps,
|
||
...overrideProps
|
||
};
|
||
}
|
||
function getElementRef(element) {
|
||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||
if (mayWarn) {
|
||
return element.ref;
|
||
}
|
||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||
if (mayWarn) {
|
||
return element.props.ref;
|
||
}
|
||
return element.props.ref || element.ref;
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-primitive/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Primitive",
|
||
()=>Primitive,
|
||
"Root",
|
||
()=>Root,
|
||
"dispatchDiscreteCustomEvent",
|
||
()=>dispatchDiscreteCustomEvent
|
||
]);
|
||
// src/primitive.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react-dom/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
;
|
||
var NODES = [
|
||
"a",
|
||
"button",
|
||
"div",
|
||
"form",
|
||
"h2",
|
||
"h3",
|
||
"img",
|
||
"input",
|
||
"label",
|
||
"li",
|
||
"nav",
|
||
"ol",
|
||
"p",
|
||
"select",
|
||
"span",
|
||
"svg",
|
||
"ul"
|
||
];
|
||
var Primitive = NODES.reduce((primitive, node)=>{
|
||
const Slot = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createSlot"])(`Primitive.${node}`);
|
||
const Node = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { asChild, ...primitiveProps } = props;
|
||
const Comp = asChild ? Slot : node;
|
||
if (typeof window !== "undefined") {
|
||
window[Symbol.for("radix-ui")] = true;
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Comp, {
|
||
...primitiveProps,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
Node.displayName = `Primitive.${node}`;
|
||
return {
|
||
...primitive,
|
||
[node]: Node
|
||
};
|
||
}, {});
|
||
function dispatchDiscreteCustomEvent(target, event) {
|
||
if (target) __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["flushSync"](()=>target.dispatchEvent(event));
|
||
}
|
||
var Root = Primitive;
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-checkbox/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Checkbox",
|
||
()=>Checkbox,
|
||
"CheckboxIndicator",
|
||
()=>CheckboxIndicator,
|
||
"Indicator",
|
||
()=>CheckboxIndicator,
|
||
"Root",
|
||
()=>Checkbox,
|
||
"createCheckboxScope",
|
||
()=>createCheckboxScope,
|
||
"unstable_BubbleInput",
|
||
()=>CheckboxBubbleInput,
|
||
"unstable_CheckboxBubbleInput",
|
||
()=>CheckboxBubbleInput,
|
||
"unstable_CheckboxProvider",
|
||
()=>CheckboxProvider,
|
||
"unstable_CheckboxTrigger",
|
||
()=>CheckboxTrigger,
|
||
"unstable_Provider",
|
||
()=>CheckboxProvider,
|
||
"unstable_Trigger",
|
||
()=>CheckboxTrigger
|
||
]);
|
||
// src/checkbox.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$context$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-context/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/primitive/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$controllable$2d$state$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$previous$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-previous/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$size$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-size/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$presence$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-presence/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-primitive/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
"use client";
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
var CHECKBOX_NAME = "Checkbox";
|
||
var [createCheckboxContext, createCheckboxScope] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$context$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContextScope"])(CHECKBOX_NAME);
|
||
var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
|
||
function CheckboxProvider(props) {
|
||
const { __scopeCheckbox, checked: checkedProp, children, defaultChecked, disabled, form, name, onCheckedChange, required, value = "on", // @ts-expect-error
|
||
internal_do_not_use_render } = props;
|
||
const [checked, setChecked] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$controllable$2d$state$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useControllableState"])({
|
||
prop: checkedProp,
|
||
defaultProp: defaultChecked ?? false,
|
||
onChange: onCheckedChange,
|
||
caller: CHECKBOX_NAME
|
||
});
|
||
const [control, setControl] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const [bubbleInput, setBubbleInput] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const hasConsumerStoppedPropagationRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](false);
|
||
const isFormControl = control ? !!form || !!control.closest("form") : // We set this to true by default so that events bubble to forms without JS (SSR)
|
||
true;
|
||
const context = {
|
||
checked,
|
||
disabled,
|
||
setChecked,
|
||
control,
|
||
setControl,
|
||
name,
|
||
form,
|
||
value,
|
||
hasConsumerStoppedPropagationRef,
|
||
required,
|
||
defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
|
||
isFormControl,
|
||
bubbleInput,
|
||
setBubbleInput
|
||
};
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(CheckboxProviderImpl, {
|
||
scope: __scopeCheckbox,
|
||
...context,
|
||
children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
|
||
});
|
||
}
|
||
var TRIGGER_NAME = "CheckboxTrigger";
|
||
var CheckboxTrigger = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"](({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef)=>{
|
||
const { control, value, disabled, checked, required, setControl, setChecked, hasConsumerStoppedPropagationRef, isFormControl, bubbleInput } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, setControl);
|
||
const initialCheckedStateRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](checked);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"CheckboxTrigger.useEffect": ()=>{
|
||
const form = control?.form;
|
||
if (form) {
|
||
const reset = {
|
||
"CheckboxTrigger.useEffect.reset": ()=>setChecked(initialCheckedStateRef.current)
|
||
}["CheckboxTrigger.useEffect.reset"];
|
||
form.addEventListener("reset", reset);
|
||
return ({
|
||
"CheckboxTrigger.useEffect": ()=>form.removeEventListener("reset", reset)
|
||
})["CheckboxTrigger.useEffect"];
|
||
}
|
||
}
|
||
}["CheckboxTrigger.useEffect"], [
|
||
control,
|
||
setChecked
|
||
]);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].button, {
|
||
type: "button",
|
||
role: "checkbox",
|
||
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
||
"aria-required": required,
|
||
"data-state": getState(checked),
|
||
"data-disabled": disabled ? "" : void 0,
|
||
disabled,
|
||
value,
|
||
...checkboxProps,
|
||
ref: composedRefs,
|
||
onKeyDown: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(onKeyDown, (event)=>{
|
||
if (event.key === "Enter") event.preventDefault();
|
||
}),
|
||
onClick: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(onClick, (event)=>{
|
||
setChecked((prevChecked)=>isIndeterminate(prevChecked) ? true : !prevChecked);
|
||
if (bubbleInput && isFormControl) {
|
||
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
||
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
||
}
|
||
})
|
||
});
|
||
});
|
||
CheckboxTrigger.displayName = TRIGGER_NAME;
|
||
var Checkbox = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeCheckbox, name, checked, defaultChecked, required, disabled, value, onCheckedChange, form, ...checkboxProps } = props;
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(CheckboxProvider, {
|
||
__scopeCheckbox,
|
||
checked,
|
||
defaultChecked,
|
||
disabled,
|
||
required,
|
||
onCheckedChange,
|
||
name,
|
||
form,
|
||
value,
|
||
internal_do_not_use_render: ({ isFormControl })=>/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"], {
|
||
children: [
|
||
/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(CheckboxTrigger, {
|
||
...checkboxProps,
|
||
ref: forwardedRef,
|
||
__scopeCheckbox
|
||
}),
|
||
isFormControl && /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(CheckboxBubbleInput, {
|
||
__scopeCheckbox
|
||
})
|
||
]
|
||
})
|
||
});
|
||
});
|
||
Checkbox.displayName = CHECKBOX_NAME;
|
||
var INDICATOR_NAME = "CheckboxIndicator";
|
||
var CheckboxIndicator = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
||
const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$presence$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Presence"], {
|
||
present: forceMount || isIndeterminate(context.checked) || context.checked === true,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].span, {
|
||
"data-state": getState(context.checked),
|
||
"data-disabled": context.disabled ? "" : void 0,
|
||
...indicatorProps,
|
||
ref: forwardedRef,
|
||
style: {
|
||
pointerEvents: "none",
|
||
...props.style
|
||
}
|
||
})
|
||
});
|
||
});
|
||
CheckboxIndicator.displayName = INDICATOR_NAME;
|
||
var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
|
||
var CheckboxBubbleInput = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"](({ __scopeCheckbox, ...props }, forwardedRef)=>{
|
||
const { control, hasConsumerStoppedPropagationRef, checked, defaultChecked, required, disabled, name, value, form, bubbleInput, setBubbleInput } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, setBubbleInput);
|
||
const prevChecked = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$previous$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["usePrevious"])(checked);
|
||
const controlSize = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$size$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useSize"])(control);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"CheckboxBubbleInput.useEffect": ()=>{
|
||
const input = bubbleInput;
|
||
if (!input) return;
|
||
const inputProto = window.HTMLInputElement.prototype;
|
||
const descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
|
||
const setChecked = descriptor.set;
|
||
const bubbles = !hasConsumerStoppedPropagationRef.current;
|
||
if (prevChecked !== checked && setChecked) {
|
||
const event = new Event("click", {
|
||
bubbles
|
||
});
|
||
input.indeterminate = isIndeterminate(checked);
|
||
setChecked.call(input, isIndeterminate(checked) ? false : checked);
|
||
input.dispatchEvent(event);
|
||
}
|
||
}
|
||
}["CheckboxBubbleInput.useEffect"], [
|
||
bubbleInput,
|
||
prevChecked,
|
||
checked,
|
||
hasConsumerStoppedPropagationRef
|
||
]);
|
||
const defaultCheckedRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](isIndeterminate(checked) ? false : checked);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$checkbox$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].input, {
|
||
type: "checkbox",
|
||
"aria-hidden": true,
|
||
defaultChecked: defaultChecked ?? defaultCheckedRef.current,
|
||
required,
|
||
disabled,
|
||
name,
|
||
value,
|
||
form,
|
||
...props,
|
||
tabIndex: -1,
|
||
ref: composedRefs,
|
||
style: {
|
||
...props.style,
|
||
...controlSize,
|
||
position: "absolute",
|
||
pointerEvents: "none",
|
||
opacity: 0,
|
||
margin: 0,
|
||
// We transform because the input is absolutely positioned but we have
|
||
// rendered it **after** the button. This pulls it back to sit on top
|
||
// of the button.
|
||
transform: "translateX(-100%)"
|
||
}
|
||
});
|
||
});
|
||
CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
||
function isFunction(value) {
|
||
return typeof value === "function";
|
||
}
|
||
function isIndeterminate(checked) {
|
||
return checked === "indeterminate";
|
||
}
|
||
function getState(checked) {
|
||
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/number/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"clamp",
|
||
()=>clamp
|
||
]);
|
||
// packages/core/number/src/number.ts
|
||
function clamp(value, [min, max]) {
|
||
return Math.min(max, Math.max(min, value));
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-context/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"createContext",
|
||
()=>createContext2,
|
||
"createContextScope",
|
||
()=>createContextScope
|
||
]);
|
||
// packages/react/context/src/create-context.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
function createContext2(rootComponentName, defaultContext) {
|
||
const Context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
const Provider = (props)=>{
|
||
const { children, ...context } = props;
|
||
const value = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContext2.Provider.useMemo[value]": ()=>context
|
||
}["createContext2.Provider.useMemo[value]"], Object.values(context));
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Context.Provider, {
|
||
value,
|
||
children
|
||
});
|
||
};
|
||
Provider.displayName = rootComponentName + "Provider";
|
||
function useContext2(consumerName) {
|
||
const context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useContext"](Context);
|
||
if (context) return context;
|
||
if (defaultContext !== void 0) return defaultContext;
|
||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||
}
|
||
return [
|
||
Provider,
|
||
useContext2
|
||
];
|
||
}
|
||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||
let defaultContexts = [];
|
||
function createContext3(rootComponentName, defaultContext) {
|
||
const BaseContext = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
const index = defaultContexts.length;
|
||
defaultContexts = [
|
||
...defaultContexts,
|
||
defaultContext
|
||
];
|
||
const Provider = (props)=>{
|
||
const { scope, children, ...context } = props;
|
||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||
const value = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContextScope.createContext3.Provider.useMemo[value]": ()=>context
|
||
}["createContextScope.createContext3.Provider.useMemo[value]"], Object.values(context));
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Context.Provider, {
|
||
value,
|
||
children
|
||
});
|
||
};
|
||
Provider.displayName = rootComponentName + "Provider";
|
||
function useContext2(consumerName, scope) {
|
||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||
const context = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useContext"](Context);
|
||
if (context) return context;
|
||
if (defaultContext !== void 0) return defaultContext;
|
||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||
}
|
||
return [
|
||
Provider,
|
||
useContext2
|
||
];
|
||
}
|
||
const createScope = ()=>{
|
||
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContext"](defaultContext);
|
||
});
|
||
return function useScope(scope) {
|
||
const contexts = scope?.[scopeName] || scopeContexts;
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"createContextScope.createScope.useScope.useMemo": ()=>({
|
||
[`__scope${scopeName}`]: {
|
||
...scope,
|
||
[scopeName]: contexts
|
||
}
|
||
})
|
||
}["createContextScope.createScope.useScope.useMemo"], [
|
||
scope,
|
||
contexts
|
||
]);
|
||
};
|
||
};
|
||
createScope.scopeName = scopeName;
|
||
return [
|
||
createContext3,
|
||
composeContextScopes(createScope, ...createContextScopeDeps)
|
||
];
|
||
}
|
||
function composeContextScopes(...scopes) {
|
||
const baseScope = scopes[0];
|
||
if (scopes.length === 1) return baseScope;
|
||
const createScope = ()=>{
|
||
const scopeHooks = scopes.map((createScope2)=>({
|
||
useScope: createScope2(),
|
||
scopeName: createScope2.scopeName
|
||
}));
|
||
return function useComposedScopes(overrideScopes) {
|
||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName })=>{
|
||
const scopeProps = useScope(overrideScopes);
|
||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||
return {
|
||
...nextScopes2,
|
||
...currentScope
|
||
};
|
||
}, {});
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"composeContextScopes.createScope.useComposedScopes.useMemo": ()=>({
|
||
[`__scope${baseScope.scopeName}`]: nextScopes
|
||
})
|
||
}["composeContextScopes.createScope.useComposedScopes.useMemo"], [
|
||
nextScopes
|
||
]);
|
||
};
|
||
};
|
||
createScope.scopeName = baseScope.scopeName;
|
||
return createScope;
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Root",
|
||
()=>Slot,
|
||
"Slot",
|
||
()=>Slot,
|
||
"Slottable",
|
||
()=>Slottable,
|
||
"createSlot",
|
||
()=>createSlot,
|
||
"createSlottable",
|
||
()=>createSlottable
|
||
]);
|
||
// src/slot.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlot(ownerName) {
|
||
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
||
const Slot2 = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { children, ...slotProps } = props;
|
||
const childrenArray = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].toArray(children);
|
||
const slottable = childrenArray.find(isSlottable);
|
||
if (slottable) {
|
||
const newElement = slottable.props.children;
|
||
const newChildren = childrenArray.map((child)=>{
|
||
if (child === slottable) {
|
||
if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].count(newElement) > 1) return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].only(null);
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? newElement.props.children : null;
|
||
} else {
|
||
return child;
|
||
}
|
||
});
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, {
|
||
...slotProps,
|
||
ref: forwardedRef,
|
||
children: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["cloneElement"](newElement, void 0, newChildren) : null
|
||
});
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, {
|
||
...slotProps,
|
||
ref: forwardedRef,
|
||
children
|
||
});
|
||
});
|
||
Slot2.displayName = `${ownerName}.Slot`;
|
||
return Slot2;
|
||
}
|
||
var Slot = /* @__PURE__ */ createSlot("Slot");
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlotClone(ownerName) {
|
||
const SlotClone = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { children, ...slotProps } = props;
|
||
if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](children)) {
|
||
const childrenRef = getElementRef(children);
|
||
const props2 = mergeProps(slotProps, children.props);
|
||
if (children.type !== __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"]) {
|
||
props2.ref = forwardedRef ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeRefs"])(forwardedRef, childrenRef) : childrenRef;
|
||
}
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["cloneElement"](children, props2);
|
||
}
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].count(children) > 1 ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Children"].only(null) : null;
|
||
});
|
||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||
return SlotClone;
|
||
}
|
||
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
||
// @__NO_SIDE_EFFECTS__
|
||
function createSlottable(ownerName) {
|
||
const Slottable2 = ({ children })=>{
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"], {
|
||
children
|
||
});
|
||
};
|
||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||
return Slottable2;
|
||
}
|
||
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
||
function isSlottable(child) {
|
||
return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["isValidElement"](child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||
}
|
||
function mergeProps(slotProps, childProps) {
|
||
const overrideProps = {
|
||
...childProps
|
||
};
|
||
for(const propName in childProps){
|
||
const slotPropValue = slotProps[propName];
|
||
const childPropValue = childProps[propName];
|
||
const isHandler = /^on[A-Z]/.test(propName);
|
||
if (isHandler) {
|
||
if (slotPropValue && childPropValue) {
|
||
overrideProps[propName] = (...args)=>{
|
||
const result = childPropValue(...args);
|
||
slotPropValue(...args);
|
||
return result;
|
||
};
|
||
} else if (slotPropValue) {
|
||
overrideProps[propName] = slotPropValue;
|
||
}
|
||
} else if (propName === "style") {
|
||
overrideProps[propName] = {
|
||
...slotPropValue,
|
||
...childPropValue
|
||
};
|
||
} else if (propName === "className") {
|
||
overrideProps[propName] = [
|
||
slotPropValue,
|
||
childPropValue
|
||
].filter(Boolean).join(" ");
|
||
}
|
||
}
|
||
return {
|
||
...slotProps,
|
||
...overrideProps
|
||
};
|
||
}
|
||
function getElementRef(element) {
|
||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||
if (mayWarn) {
|
||
return element.ref;
|
||
}
|
||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||
if (mayWarn) {
|
||
return element.props.ref;
|
||
}
|
||
return element.props.ref || element.ref;
|
||
}
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-primitive/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Primitive",
|
||
()=>Primitive,
|
||
"Root",
|
||
()=>Root,
|
||
"dispatchDiscreteCustomEvent",
|
||
()=>dispatchDiscreteCustomEvent
|
||
]);
|
||
// src/primitive.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react-dom/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
;
|
||
var NODES = [
|
||
"a",
|
||
"button",
|
||
"div",
|
||
"form",
|
||
"h2",
|
||
"h3",
|
||
"img",
|
||
"input",
|
||
"label",
|
||
"li",
|
||
"nav",
|
||
"ol",
|
||
"p",
|
||
"select",
|
||
"span",
|
||
"svg",
|
||
"ul"
|
||
];
|
||
var Primitive = NODES.reduce((primitive, node)=>{
|
||
const Slot = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createSlot"])(`Primitive.${node}`);
|
||
const Node = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { asChild, ...primitiveProps } = props;
|
||
const Comp = asChild ? Slot : node;
|
||
if (typeof window !== "undefined") {
|
||
window[Symbol.for("radix-ui")] = true;
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Comp, {
|
||
...primitiveProps,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
Node.displayName = `Primitive.${node}`;
|
||
return {
|
||
...primitive,
|
||
[node]: Node
|
||
};
|
||
}, {});
|
||
function dispatchDiscreteCustomEvent(target, event) {
|
||
if (target) __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["flushSync"](()=>target.dispatchEvent(event));
|
||
}
|
||
var Root = Primitive;
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/@radix-ui/react-select/dist/index.mjs [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Arrow",
|
||
()=>Arrow2,
|
||
"Content",
|
||
()=>Content2,
|
||
"Group",
|
||
()=>Group,
|
||
"Icon",
|
||
()=>Icon,
|
||
"Item",
|
||
()=>Item,
|
||
"ItemIndicator",
|
||
()=>ItemIndicator,
|
||
"ItemText",
|
||
()=>ItemText,
|
||
"Label",
|
||
()=>Label,
|
||
"Portal",
|
||
()=>Portal,
|
||
"Root",
|
||
()=>Root2,
|
||
"ScrollDownButton",
|
||
()=>ScrollDownButton,
|
||
"ScrollUpButton",
|
||
()=>ScrollUpButton,
|
||
"Select",
|
||
()=>Select,
|
||
"SelectArrow",
|
||
()=>SelectArrow,
|
||
"SelectContent",
|
||
()=>SelectContent,
|
||
"SelectGroup",
|
||
()=>SelectGroup,
|
||
"SelectIcon",
|
||
()=>SelectIcon,
|
||
"SelectItem",
|
||
()=>SelectItem,
|
||
"SelectItemIndicator",
|
||
()=>SelectItemIndicator,
|
||
"SelectItemText",
|
||
()=>SelectItemText,
|
||
"SelectLabel",
|
||
()=>SelectLabel,
|
||
"SelectPortal",
|
||
()=>SelectPortal,
|
||
"SelectScrollDownButton",
|
||
()=>SelectScrollDownButton,
|
||
"SelectScrollUpButton",
|
||
()=>SelectScrollUpButton,
|
||
"SelectSeparator",
|
||
()=>SelectSeparator,
|
||
"SelectTrigger",
|
||
()=>SelectTrigger,
|
||
"SelectValue",
|
||
()=>SelectValue,
|
||
"SelectViewport",
|
||
()=>SelectViewport,
|
||
"Separator",
|
||
()=>Separator,
|
||
"Trigger",
|
||
()=>Trigger,
|
||
"Value",
|
||
()=>Value,
|
||
"Viewport",
|
||
()=>Viewport,
|
||
"createSelectScope",
|
||
()=>createSelectScope
|
||
]);
|
||
// src/select.tsx
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react-dom/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$number$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/number/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/primitive/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$collection$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-collection/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$context$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-context/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$direction$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-direction/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$dismissable$2d$layer$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$guards$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-focus-guards/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$scope$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-focus-scope/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$id$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-id/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-popper/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$portal$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-portal/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-primitive/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$callback$2d$ref$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$controllable$2d$state$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$previous$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-use-previous/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$visually$2d$hidden$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$aria$2d$hidden$2f$dist$2f$es2015$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/aria-hidden/dist/es2015/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$remove$2d$scroll$2f$dist$2f$es2015$2f$Combination$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__$3c$export__default__as__RemoveScroll$3e$__ = __turbopack_context__.i("[project]/node_modules/react-remove-scroll/dist/es2015/Combination.js [app-client] (ecmascript) <export default as RemoveScroll>");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/jsx-runtime.js [app-client] (ecmascript)");
|
||
"use client";
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
;
|
||
var OPEN_KEYS = [
|
||
" ",
|
||
"Enter",
|
||
"ArrowUp",
|
||
"ArrowDown"
|
||
];
|
||
var SELECTION_KEYS = [
|
||
" ",
|
||
"Enter"
|
||
];
|
||
var SELECT_NAME = "Select";
|
||
var [Collection, useCollection, createCollectionScope] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$collection$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createCollection"])(SELECT_NAME);
|
||
var [createSelectContext, createSelectScope] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$context$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createContextScope"])(SELECT_NAME, [
|
||
createCollectionScope,
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createPopperScope"]
|
||
]);
|
||
var usePopperScope = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createPopperScope"])();
|
||
var [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);
|
||
var [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME);
|
||
var Select = (props)=>{
|
||
const { __scopeSelect, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, dir, name, autoComplete, disabled, required, form } = props;
|
||
const popperScope = usePopperScope(__scopeSelect);
|
||
const [trigger, setTrigger] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const [valueNode, setValueNode] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const [valueNodeHasChildren, setValueNodeHasChildren] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](false);
|
||
const direction = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$direction$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useDirection"])(dir);
|
||
const [open, setOpen] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$controllable$2d$state$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useControllableState"])({
|
||
prop: openProp,
|
||
defaultProp: defaultOpen ?? false,
|
||
onChange: onOpenChange,
|
||
caller: SELECT_NAME
|
||
});
|
||
const [value, setValue] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$controllable$2d$state$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useControllableState"])({
|
||
prop: valueProp,
|
||
defaultProp: defaultValue,
|
||
onChange: onValueChange,
|
||
caller: SELECT_NAME
|
||
});
|
||
const triggerPointerDownPosRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](null);
|
||
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
||
const [nativeOptionsSet, setNativeOptionsSet] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](/* @__PURE__ */ new Set());
|
||
const nativeSelectKey = Array.from(nativeOptionsSet).map((option)=>option.props.value).join(";");
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Root"], {
|
||
...popperScope,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsxs"])(SelectProvider, {
|
||
required,
|
||
scope: __scopeSelect,
|
||
trigger,
|
||
onTriggerChange: setTrigger,
|
||
valueNode,
|
||
onValueNodeChange: setValueNode,
|
||
valueNodeHasChildren,
|
||
onValueNodeHasChildrenChange: setValueNodeHasChildren,
|
||
contentId: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$id$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useId"])(),
|
||
value,
|
||
onValueChange: setValue,
|
||
open,
|
||
onOpenChange: setOpen,
|
||
dir: direction,
|
||
triggerPointerDownPosRef,
|
||
disabled,
|
||
children: [
|
||
/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Collection.Provider, {
|
||
scope: __scopeSelect,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectNativeOptionsProvider, {
|
||
scope: props.__scopeSelect,
|
||
onNativeOptionAdd: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"Select.useCallback": (option)=>{
|
||
setNativeOptionsSet({
|
||
"Select.useCallback": (prev)=>new Set(prev).add(option)
|
||
}["Select.useCallback"]);
|
||
}
|
||
}["Select.useCallback"], []),
|
||
onNativeOptionRemove: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"Select.useCallback": (option)=>{
|
||
setNativeOptionsSet({
|
||
"Select.useCallback": (prev)=>{
|
||
const optionsSet = new Set(prev);
|
||
optionsSet.delete(option);
|
||
return optionsSet;
|
||
}
|
||
}["Select.useCallback"]);
|
||
}
|
||
}["Select.useCallback"], []),
|
||
children
|
||
})
|
||
}),
|
||
isFormControl ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsxs"])(SelectBubbleInput, {
|
||
"aria-hidden": true,
|
||
required,
|
||
tabIndex: -1,
|
||
name,
|
||
autoComplete,
|
||
value,
|
||
onChange: (event)=>setValue(event.target.value),
|
||
disabled,
|
||
form,
|
||
children: [
|
||
value === void 0 ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])("option", {
|
||
value: ""
|
||
}) : null,
|
||
Array.from(nativeOptionsSet)
|
||
]
|
||
}, nativeSelectKey) : null
|
||
]
|
||
})
|
||
});
|
||
};
|
||
Select.displayName = SELECT_NAME;
|
||
var TRIGGER_NAME = "SelectTrigger";
|
||
var SelectTrigger = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
||
const popperScope = usePopperScope(__scopeSelect);
|
||
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
||
const isDisabled = context.disabled || disabled;
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, context.onTriggerChange);
|
||
const getItems = useCollection(__scopeSelect);
|
||
const pointerTypeRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"]("touch");
|
||
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch({
|
||
"SelectTrigger.useTypeaheadSearch": (search)=>{
|
||
const enabledItems = getItems().filter({
|
||
"SelectTrigger.useTypeaheadSearch.enabledItems": (item)=>!item.disabled
|
||
}["SelectTrigger.useTypeaheadSearch.enabledItems"]);
|
||
const currentItem = enabledItems.find({
|
||
"SelectTrigger.useTypeaheadSearch.currentItem": (item)=>item.value === context.value
|
||
}["SelectTrigger.useTypeaheadSearch.currentItem"]);
|
||
const nextItem = findNextItem(enabledItems, search, currentItem);
|
||
if (nextItem !== void 0) {
|
||
context.onValueChange(nextItem.value);
|
||
}
|
||
}
|
||
}["SelectTrigger.useTypeaheadSearch"]);
|
||
const handleOpen = (pointerEvent)=>{
|
||
if (!isDisabled) {
|
||
context.onOpenChange(true);
|
||
resetTypeahead();
|
||
}
|
||
if (pointerEvent) {
|
||
context.triggerPointerDownPosRef.current = {
|
||
x: Math.round(pointerEvent.pageX),
|
||
y: Math.round(pointerEvent.pageY)
|
||
};
|
||
}
|
||
};
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Anchor"], {
|
||
asChild: true,
|
||
...popperScope,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].button, {
|
||
type: "button",
|
||
role: "combobox",
|
||
"aria-controls": context.contentId,
|
||
"aria-expanded": context.open,
|
||
"aria-required": context.required,
|
||
"aria-autocomplete": "none",
|
||
dir: context.dir,
|
||
"data-state": context.open ? "open" : "closed",
|
||
disabled: isDisabled,
|
||
"data-disabled": isDisabled ? "" : void 0,
|
||
"data-placeholder": shouldShowPlaceholder(context.value) ? "" : void 0,
|
||
...triggerProps,
|
||
ref: composedRefs,
|
||
onClick: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(triggerProps.onClick, (event)=>{
|
||
event.currentTarget.focus();
|
||
if (pointerTypeRef.current !== "mouse") {
|
||
handleOpen(event);
|
||
}
|
||
}),
|
||
onPointerDown: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(triggerProps.onPointerDown, (event)=>{
|
||
pointerTypeRef.current = event.pointerType;
|
||
const target = event.target;
|
||
if (target.hasPointerCapture(event.pointerId)) {
|
||
target.releasePointerCapture(event.pointerId);
|
||
}
|
||
if (event.button === 0 && event.ctrlKey === false && event.pointerType === "mouse") {
|
||
handleOpen(event);
|
||
event.preventDefault();
|
||
}
|
||
}),
|
||
onKeyDown: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(triggerProps.onKeyDown, (event)=>{
|
||
const isTypingAhead = searchRef.current !== "";
|
||
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
||
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
|
||
if (isTypingAhead && event.key === " ") return;
|
||
if (OPEN_KEYS.includes(event.key)) {
|
||
handleOpen();
|
||
event.preventDefault();
|
||
}
|
||
})
|
||
})
|
||
});
|
||
});
|
||
SelectTrigger.displayName = TRIGGER_NAME;
|
||
var VALUE_NAME = "SelectValue";
|
||
var SelectValue = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
||
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
||
const { onValueNodeHasChildrenChange } = context;
|
||
const hasChildren = children !== void 0;
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, context.onValueNodeChange);
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectValue.useLayoutEffect": ()=>{
|
||
onValueNodeHasChildrenChange(hasChildren);
|
||
}
|
||
}["SelectValue.useLayoutEffect"], [
|
||
onValueNodeHasChildrenChange,
|
||
hasChildren
|
||
]);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].span, {
|
||
...valueProps,
|
||
ref: composedRefs,
|
||
style: {
|
||
pointerEvents: "none"
|
||
},
|
||
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"], {
|
||
children: placeholder
|
||
}) : children
|
||
});
|
||
});
|
||
SelectValue.displayName = VALUE_NAME;
|
||
var ICON_NAME = "SelectIcon";
|
||
var SelectIcon = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, children, ...iconProps } = props;
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].span, {
|
||
"aria-hidden": true,
|
||
...iconProps,
|
||
ref: forwardedRef,
|
||
children: children || "\u25BC"
|
||
});
|
||
});
|
||
SelectIcon.displayName = ICON_NAME;
|
||
var PORTAL_NAME = "SelectPortal";
|
||
var SelectPortal = (props)=>{
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$portal$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Portal"], {
|
||
asChild: true,
|
||
...props
|
||
});
|
||
};
|
||
SelectPortal.displayName = PORTAL_NAME;
|
||
var CONTENT_NAME = "SelectContent";
|
||
var SelectContent = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const context = useSelectContext(CONTENT_NAME, props.__scopeSelect);
|
||
const [fragment, setFragment] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"]();
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectContent.useLayoutEffect": ()=>{
|
||
setFragment(new DocumentFragment());
|
||
}
|
||
}["SelectContent.useLayoutEffect"], []);
|
||
if (!context.open) {
|
||
const frag = fragment;
|
||
return frag ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createPortal"](/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectContentProvider, {
|
||
scope: props.__scopeSelect,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Collection.Slot, {
|
||
scope: props.__scopeSelect,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])("div", {
|
||
children: props.children
|
||
})
|
||
})
|
||
}), frag) : null;
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectContentImpl, {
|
||
...props,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
SelectContent.displayName = CONTENT_NAME;
|
||
var CONTENT_MARGIN = 10;
|
||
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME);
|
||
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
||
var Slot = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$slot$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createSlot"])("SelectContent.RemoveScroll");
|
||
var SelectContentImpl = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, position = "item-aligned", onCloseAutoFocus, onEscapeKeyDown, onPointerDownOutside, //
|
||
// PopperContent props
|
||
side, sideOffset, align, alignOffset, arrowPadding, collisionBoundary, collisionPadding, sticky, hideWhenDetached, avoidCollisions, //
|
||
...contentProps } = props;
|
||
const context = useSelectContext(CONTENT_NAME, __scopeSelect);
|
||
const [content, setContent] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const [viewport, setViewport] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, {
|
||
"SelectContentImpl.useComposedRefs[composedRefs]": (node)=>setContent(node)
|
||
}["SelectContentImpl.useComposedRefs[composedRefs]"]);
|
||
const [selectedItem, setSelectedItem] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const [selectedItemText, setSelectedItemText] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const getItems = useCollection(__scopeSelect);
|
||
const [isPositioned, setIsPositioned] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](false);
|
||
const firstValidItemFoundRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](false);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"SelectContentImpl.useEffect": ()=>{
|
||
if (content) return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$aria$2d$hidden$2f$dist$2f$es2015$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["hideOthers"])(content);
|
||
}
|
||
}["SelectContentImpl.useEffect"], [
|
||
content
|
||
]);
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$guards$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useFocusGuards"])();
|
||
const focusFirst = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectContentImpl.useCallback[focusFirst]": (candidates)=>{
|
||
const [firstItem, ...restItems] = getItems().map({
|
||
"SelectContentImpl.useCallback[focusFirst]": (item)=>item.ref.current
|
||
}["SelectContentImpl.useCallback[focusFirst]"]);
|
||
const [lastItem] = restItems.slice(-1);
|
||
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
||
for (const candidate of candidates){
|
||
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
||
candidate?.scrollIntoView({
|
||
block: "nearest"
|
||
});
|
||
if (candidate === firstItem && viewport) viewport.scrollTop = 0;
|
||
if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;
|
||
candidate?.focus();
|
||
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
||
}
|
||
}
|
||
}["SelectContentImpl.useCallback[focusFirst]"], [
|
||
getItems,
|
||
viewport
|
||
]);
|
||
const focusSelectedItem = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectContentImpl.useCallback[focusSelectedItem]": ()=>focusFirst([
|
||
selectedItem,
|
||
content
|
||
])
|
||
}["SelectContentImpl.useCallback[focusSelectedItem]"], [
|
||
focusFirst,
|
||
selectedItem,
|
||
content
|
||
]);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"SelectContentImpl.useEffect": ()=>{
|
||
if (isPositioned) {
|
||
focusSelectedItem();
|
||
}
|
||
}
|
||
}["SelectContentImpl.useEffect"], [
|
||
isPositioned,
|
||
focusSelectedItem
|
||
]);
|
||
const { onOpenChange, triggerPointerDownPosRef } = context;
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"SelectContentImpl.useEffect": ()=>{
|
||
if (content) {
|
||
let pointerMoveDelta = {
|
||
x: 0,
|
||
y: 0
|
||
};
|
||
const handlePointerMove = {
|
||
"SelectContentImpl.useEffect.handlePointerMove": (event)=>{
|
||
pointerMoveDelta = {
|
||
x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),
|
||
y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0))
|
||
};
|
||
}
|
||
}["SelectContentImpl.useEffect.handlePointerMove"];
|
||
const handlePointerUp = {
|
||
"SelectContentImpl.useEffect.handlePointerUp": (event)=>{
|
||
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {
|
||
event.preventDefault();
|
||
} else {
|
||
if (!content.contains(event.target)) {
|
||
onOpenChange(false);
|
||
}
|
||
}
|
||
document.removeEventListener("pointermove", handlePointerMove);
|
||
triggerPointerDownPosRef.current = null;
|
||
}
|
||
}["SelectContentImpl.useEffect.handlePointerUp"];
|
||
if (triggerPointerDownPosRef.current !== null) {
|
||
document.addEventListener("pointermove", handlePointerMove);
|
||
document.addEventListener("pointerup", handlePointerUp, {
|
||
capture: true,
|
||
once: true
|
||
});
|
||
}
|
||
return ({
|
||
"SelectContentImpl.useEffect": ()=>{
|
||
document.removeEventListener("pointermove", handlePointerMove);
|
||
document.removeEventListener("pointerup", handlePointerUp, {
|
||
capture: true
|
||
});
|
||
}
|
||
})["SelectContentImpl.useEffect"];
|
||
}
|
||
}
|
||
}["SelectContentImpl.useEffect"], [
|
||
content,
|
||
onOpenChange,
|
||
triggerPointerDownPosRef
|
||
]);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"SelectContentImpl.useEffect": ()=>{
|
||
const close = {
|
||
"SelectContentImpl.useEffect.close": ()=>onOpenChange(false)
|
||
}["SelectContentImpl.useEffect.close"];
|
||
window.addEventListener("blur", close);
|
||
window.addEventListener("resize", close);
|
||
return ({
|
||
"SelectContentImpl.useEffect": ()=>{
|
||
window.removeEventListener("blur", close);
|
||
window.removeEventListener("resize", close);
|
||
}
|
||
})["SelectContentImpl.useEffect"];
|
||
}
|
||
}["SelectContentImpl.useEffect"], [
|
||
onOpenChange
|
||
]);
|
||
const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch({
|
||
"SelectContentImpl.useTypeaheadSearch": (search)=>{
|
||
const enabledItems = getItems().filter({
|
||
"SelectContentImpl.useTypeaheadSearch.enabledItems": (item)=>!item.disabled
|
||
}["SelectContentImpl.useTypeaheadSearch.enabledItems"]);
|
||
const currentItem = enabledItems.find({
|
||
"SelectContentImpl.useTypeaheadSearch.currentItem": (item)=>item.ref.current === document.activeElement
|
||
}["SelectContentImpl.useTypeaheadSearch.currentItem"]);
|
||
const nextItem = findNextItem(enabledItems, search, currentItem);
|
||
if (nextItem) {
|
||
setTimeout({
|
||
"SelectContentImpl.useTypeaheadSearch": ()=>nextItem.ref.current.focus()
|
||
}["SelectContentImpl.useTypeaheadSearch"]);
|
||
}
|
||
}
|
||
}["SelectContentImpl.useTypeaheadSearch"]);
|
||
const itemRefCallback = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectContentImpl.useCallback[itemRefCallback]": (node, value, disabled)=>{
|
||
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
||
const isSelectedItem = context.value !== void 0 && context.value === value;
|
||
if (isSelectedItem || isFirstValidItem) {
|
||
setSelectedItem(node);
|
||
if (isFirstValidItem) firstValidItemFoundRef.current = true;
|
||
}
|
||
}
|
||
}["SelectContentImpl.useCallback[itemRefCallback]"], [
|
||
context.value
|
||
]);
|
||
const handleItemLeave = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectContentImpl.useCallback[handleItemLeave]": ()=>content?.focus()
|
||
}["SelectContentImpl.useCallback[handleItemLeave]"], [
|
||
content
|
||
]);
|
||
const itemTextRefCallback = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectContentImpl.useCallback[itemTextRefCallback]": (node, value, disabled)=>{
|
||
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
||
const isSelectedItem = context.value !== void 0 && context.value === value;
|
||
if (isSelectedItem || isFirstValidItem) {
|
||
setSelectedItemText(node);
|
||
}
|
||
}
|
||
}["SelectContentImpl.useCallback[itemTextRefCallback]"], [
|
||
context.value
|
||
]);
|
||
const SelectPosition = position === "popper" ? SelectPopperPosition : SelectItemAlignedPosition;
|
||
const popperContentProps = SelectPosition === SelectPopperPosition ? {
|
||
side,
|
||
sideOffset,
|
||
align,
|
||
alignOffset,
|
||
arrowPadding,
|
||
collisionBoundary,
|
||
collisionPadding,
|
||
sticky,
|
||
hideWhenDetached,
|
||
avoidCollisions
|
||
} : {};
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectContentProvider, {
|
||
scope: __scopeSelect,
|
||
content,
|
||
viewport,
|
||
onViewportChange: setViewport,
|
||
itemRefCallback,
|
||
selectedItem,
|
||
onItemLeave: handleItemLeave,
|
||
itemTextRefCallback,
|
||
focusSelectedItem,
|
||
selectedItemText,
|
||
position,
|
||
isPositioned,
|
||
searchRef,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$remove$2d$scroll$2f$dist$2f$es2015$2f$Combination$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__$3c$export__default__as__RemoveScroll$3e$__["RemoveScroll"], {
|
||
as: Slot,
|
||
allowPinchZoom: true,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$focus$2d$scope$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["FocusScope"], {
|
||
asChild: true,
|
||
trapped: context.open,
|
||
onMountAutoFocus: (event)=>{
|
||
event.preventDefault();
|
||
},
|
||
onUnmountAutoFocus: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(onCloseAutoFocus, (event)=>{
|
||
context.trigger?.focus({
|
||
preventScroll: true
|
||
});
|
||
event.preventDefault();
|
||
}),
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$dismissable$2d$layer$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["DismissableLayer"], {
|
||
asChild: true,
|
||
disableOutsidePointerEvents: true,
|
||
onEscapeKeyDown,
|
||
onPointerDownOutside,
|
||
onFocusOutside: (event)=>event.preventDefault(),
|
||
onDismiss: ()=>context.onOpenChange(false),
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectPosition, {
|
||
role: "listbox",
|
||
id: context.contentId,
|
||
"data-state": context.open ? "open" : "closed",
|
||
dir: context.dir,
|
||
onContextMenu: (event)=>event.preventDefault(),
|
||
...contentProps,
|
||
...popperContentProps,
|
||
onPlaced: ()=>setIsPositioned(true),
|
||
ref: composedRefs,
|
||
style: {
|
||
// flex layout so we can place the scroll buttons properly
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
// reset the outline by default as the content MAY get focused
|
||
outline: "none",
|
||
...contentProps.style
|
||
},
|
||
onKeyDown: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(contentProps.onKeyDown, (event)=>{
|
||
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
||
if (event.key === "Tab") event.preventDefault();
|
||
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
|
||
if ([
|
||
"ArrowUp",
|
||
"ArrowDown",
|
||
"Home",
|
||
"End"
|
||
].includes(event.key)) {
|
||
const items = getItems().filter((item)=>!item.disabled);
|
||
let candidateNodes = items.map((item)=>item.ref.current);
|
||
if ([
|
||
"ArrowUp",
|
||
"End"
|
||
].includes(event.key)) {
|
||
candidateNodes = candidateNodes.slice().reverse();
|
||
}
|
||
if ([
|
||
"ArrowUp",
|
||
"ArrowDown"
|
||
].includes(event.key)) {
|
||
const currentElement = event.target;
|
||
const currentIndex = candidateNodes.indexOf(currentElement);
|
||
candidateNodes = candidateNodes.slice(currentIndex + 1);
|
||
}
|
||
setTimeout(()=>focusFirst(candidateNodes));
|
||
event.preventDefault();
|
||
}
|
||
})
|
||
})
|
||
})
|
||
})
|
||
})
|
||
});
|
||
});
|
||
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
||
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
||
var SelectItemAlignedPosition = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
||
const context = useSelectContext(CONTENT_NAME, __scopeSelect);
|
||
const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect);
|
||
const [contentWrapper, setContentWrapper] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const [content, setContent] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, {
|
||
"SelectItemAlignedPosition.useComposedRefs[composedRefs]": (node)=>setContent(node)
|
||
}["SelectItemAlignedPosition.useComposedRefs[composedRefs]"]);
|
||
const getItems = useCollection(__scopeSelect);
|
||
const shouldExpandOnScrollRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](false);
|
||
const shouldRepositionRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](true);
|
||
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
||
const position = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectItemAlignedPosition.useCallback[position]": ()=>{
|
||
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
||
const triggerRect = context.trigger.getBoundingClientRect();
|
||
const contentRect = content.getBoundingClientRect();
|
||
const valueNodeRect = context.valueNode.getBoundingClientRect();
|
||
const itemTextRect = selectedItemText.getBoundingClientRect();
|
||
if (context.dir !== "rtl") {
|
||
const itemTextOffset = itemTextRect.left - contentRect.left;
|
||
const left = valueNodeRect.left - itemTextOffset;
|
||
const leftDelta = triggerRect.left - left;
|
||
const minContentWidth = triggerRect.width + leftDelta;
|
||
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
||
const rightEdge = window.innerWidth - CONTENT_MARGIN;
|
||
const clampedLeft = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$number$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["clamp"])(left, [
|
||
CONTENT_MARGIN,
|
||
// Prevents the content from going off the starting edge of the
|
||
// viewport. It may still go off the ending edge, but this can be
|
||
// controlled by the user since they may want to manage overflow in a
|
||
// specific way.
|
||
// https://github.com/radix-ui/primitives/issues/2049
|
||
Math.max(CONTENT_MARGIN, rightEdge - contentWidth)
|
||
]);
|
||
contentWrapper.style.minWidth = minContentWidth + "px";
|
||
contentWrapper.style.left = clampedLeft + "px";
|
||
} else {
|
||
const itemTextOffset = contentRect.right - itemTextRect.right;
|
||
const right = window.innerWidth - valueNodeRect.right - itemTextOffset;
|
||
const rightDelta = window.innerWidth - triggerRect.right - right;
|
||
const minContentWidth = triggerRect.width + rightDelta;
|
||
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
||
const leftEdge = window.innerWidth - CONTENT_MARGIN;
|
||
const clampedRight = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$number$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["clamp"])(right, [
|
||
CONTENT_MARGIN,
|
||
Math.max(CONTENT_MARGIN, leftEdge - contentWidth)
|
||
]);
|
||
contentWrapper.style.minWidth = minContentWidth + "px";
|
||
contentWrapper.style.right = clampedRight + "px";
|
||
}
|
||
const items = getItems();
|
||
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
||
const itemsHeight = viewport.scrollHeight;
|
||
const contentStyles = window.getComputedStyle(content);
|
||
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
|
||
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
|
||
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
|
||
const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);
|
||
const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;
|
||
const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);
|
||
const viewportStyles = window.getComputedStyle(viewport);
|
||
const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);
|
||
const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);
|
||
const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;
|
||
const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;
|
||
const selectedItemHalfHeight = selectedItem.offsetHeight / 2;
|
||
const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;
|
||
const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;
|
||
const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;
|
||
const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;
|
||
if (willAlignWithoutTopOverflow) {
|
||
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;
|
||
contentWrapper.style.bottom = "0px";
|
||
const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;
|
||
const clampedTriggerMiddleToBottomEdge = Math.max(triggerMiddleToBottomEdge, selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
||
(isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth);
|
||
const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;
|
||
contentWrapper.style.height = height + "px";
|
||
} else {
|
||
const isFirstItem = items.length > 0 && selectedItem === items[0].ref.current;
|
||
contentWrapper.style.top = "0px";
|
||
const clampedTopEdgeToTriggerMiddle = Math.max(topEdgeToTriggerMiddle, contentBorderTopWidth + viewport.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
||
(isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight);
|
||
const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;
|
||
contentWrapper.style.height = height + "px";
|
||
viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;
|
||
}
|
||
contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;
|
||
contentWrapper.style.minHeight = minContentHeight + "px";
|
||
contentWrapper.style.maxHeight = availableHeight + "px";
|
||
onPlaced?.();
|
||
requestAnimationFrame({
|
||
"SelectItemAlignedPosition.useCallback[position]": ()=>shouldExpandOnScrollRef.current = true
|
||
}["SelectItemAlignedPosition.useCallback[position]"]);
|
||
}
|
||
}
|
||
}["SelectItemAlignedPosition.useCallback[position]"], [
|
||
getItems,
|
||
context.trigger,
|
||
context.valueNode,
|
||
contentWrapper,
|
||
content,
|
||
viewport,
|
||
selectedItem,
|
||
selectedItemText,
|
||
context.dir,
|
||
onPlaced
|
||
]);
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectItemAlignedPosition.useLayoutEffect": ()=>position()
|
||
}["SelectItemAlignedPosition.useLayoutEffect"], [
|
||
position
|
||
]);
|
||
const [contentZIndex, setContentZIndex] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"]();
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectItemAlignedPosition.useLayoutEffect": ()=>{
|
||
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
||
}
|
||
}["SelectItemAlignedPosition.useLayoutEffect"], [
|
||
content
|
||
]);
|
||
const handleScrollButtonChange = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectItemAlignedPosition.useCallback[handleScrollButtonChange]": (node)=>{
|
||
if (node && shouldRepositionRef.current === true) {
|
||
position();
|
||
focusSelectedItem?.();
|
||
shouldRepositionRef.current = false;
|
||
}
|
||
}
|
||
}["SelectItemAlignedPosition.useCallback[handleScrollButtonChange]"], [
|
||
position,
|
||
focusSelectedItem
|
||
]);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectViewportProvider, {
|
||
scope: __scopeSelect,
|
||
contentWrapper,
|
||
shouldExpandOnScrollRef,
|
||
onScrollButtonChange: handleScrollButtonChange,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])("div", {
|
||
ref: setContentWrapper,
|
||
style: {
|
||
display: "flex",
|
||
flexDirection: "column",
|
||
position: "fixed",
|
||
zIndex: contentZIndex
|
||
},
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].div, {
|
||
...popperProps,
|
||
ref: composedRefs,
|
||
style: {
|
||
// When we get the height of the content, it includes borders. If we were to set
|
||
// the height without having `boxSizing: 'border-box'` it would be too big.
|
||
boxSizing: "border-box",
|
||
// We need to ensure the content doesn't get taller than the wrapper
|
||
maxHeight: "100%",
|
||
...popperProps.style
|
||
}
|
||
})
|
||
})
|
||
});
|
||
});
|
||
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
||
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
||
var SelectPopperPosition = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, align = "start", collisionPadding = CONTENT_MARGIN, ...popperProps } = props;
|
||
const popperScope = usePopperScope(__scopeSelect);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Content"], {
|
||
...popperScope,
|
||
...popperProps,
|
||
ref: forwardedRef,
|
||
align,
|
||
collisionPadding,
|
||
style: {
|
||
// Ensure border-box for floating-ui calculations
|
||
boxSizing: "border-box",
|
||
...popperProps.style,
|
||
// re-namespace exposed content custom properties
|
||
...{
|
||
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
||
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
||
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
||
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
||
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
||
}
|
||
}
|
||
});
|
||
});
|
||
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
||
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME, {});
|
||
var VIEWPORT_NAME = "SelectViewport";
|
||
var SelectViewport = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, nonce, ...viewportProps } = props;
|
||
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
||
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, contentContext.onViewportChange);
|
||
const prevScrollTopRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](0);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"], {
|
||
children: [
|
||
/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])("style", {
|
||
dangerouslySetInnerHTML: {
|
||
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
||
},
|
||
nonce
|
||
}),
|
||
/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Collection.Slot, {
|
||
scope: __scopeSelect,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].div, {
|
||
"data-radix-select-viewport": "",
|
||
role: "presentation",
|
||
...viewportProps,
|
||
ref: composedRefs,
|
||
style: {
|
||
// we use position: 'relative' here on the `viewport` so that when we call
|
||
// `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
|
||
// (independent of the scrollUpButton).
|
||
position: "relative",
|
||
flex: 1,
|
||
// Viewport should only be scrollable in the vertical direction.
|
||
// This won't work in vertical writing modes, so we'll need to
|
||
// revisit this if/when that is supported
|
||
// https://developer.chrome.com/blog/vertical-form-controls
|
||
overflow: "hidden auto",
|
||
...viewportProps.style
|
||
},
|
||
onScroll: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(viewportProps.onScroll, (event)=>{
|
||
const viewport = event.currentTarget;
|
||
const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;
|
||
if (shouldExpandOnScrollRef?.current && contentWrapper) {
|
||
const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);
|
||
if (scrolledBy > 0) {
|
||
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
||
const cssMinHeight = parseFloat(contentWrapper.style.minHeight);
|
||
const cssHeight = parseFloat(contentWrapper.style.height);
|
||
const prevHeight = Math.max(cssMinHeight, cssHeight);
|
||
if (prevHeight < availableHeight) {
|
||
const nextHeight = prevHeight + scrolledBy;
|
||
const clampedNextHeight = Math.min(availableHeight, nextHeight);
|
||
const heightDiff = nextHeight - clampedNextHeight;
|
||
contentWrapper.style.height = clampedNextHeight + "px";
|
||
if (contentWrapper.style.bottom === "0px") {
|
||
viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;
|
||
contentWrapper.style.justifyContent = "flex-end";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
prevScrollTopRef.current = viewport.scrollTop;
|
||
})
|
||
})
|
||
})
|
||
]
|
||
});
|
||
});
|
||
SelectViewport.displayName = VIEWPORT_NAME;
|
||
var GROUP_NAME = "SelectGroup";
|
||
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
||
var SelectGroup = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, ...groupProps } = props;
|
||
const groupId = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$id$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useId"])();
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectGroupContextProvider, {
|
||
scope: __scopeSelect,
|
||
id: groupId,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].div, {
|
||
role: "group",
|
||
"aria-labelledby": groupId,
|
||
...groupProps,
|
||
ref: forwardedRef
|
||
})
|
||
});
|
||
});
|
||
SelectGroup.displayName = GROUP_NAME;
|
||
var LABEL_NAME = "SelectLabel";
|
||
var SelectLabel = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, ...labelProps } = props;
|
||
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].div, {
|
||
id: groupContext.id,
|
||
...labelProps,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
SelectLabel.displayName = LABEL_NAME;
|
||
var ITEM_NAME = "SelectItem";
|
||
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
||
var SelectItem = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, value, disabled = false, textValue: textValueProp, ...itemProps } = props;
|
||
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
||
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
||
const isSelected = context.value === value;
|
||
const [textValue, setTextValue] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](textValueProp ?? "");
|
||
const [isFocused, setIsFocused] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](false);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, {
|
||
"SelectItem.useComposedRefs[composedRefs]": (node)=>contentContext.itemRefCallback?.(node, value, disabled)
|
||
}["SelectItem.useComposedRefs[composedRefs]"]);
|
||
const textId = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$id$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useId"])();
|
||
const pointerTypeRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"]("touch");
|
||
const handleSelect = ()=>{
|
||
if (!disabled) {
|
||
context.onValueChange(value);
|
||
context.onOpenChange(false);
|
||
}
|
||
};
|
||
if (value === "") {
|
||
throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
||
}
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectItemContextProvider, {
|
||
scope: __scopeSelect,
|
||
value,
|
||
disabled,
|
||
textId,
|
||
isSelected,
|
||
onItemTextChange: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectItem.useCallback": (node)=>{
|
||
setTextValue({
|
||
"SelectItem.useCallback": (prevTextValue)=>prevTextValue || (node?.textContent ?? "").trim()
|
||
}["SelectItem.useCallback"]);
|
||
}
|
||
}["SelectItem.useCallback"], []),
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(Collection.ItemSlot, {
|
||
scope: __scopeSelect,
|
||
value,
|
||
disabled,
|
||
textValue,
|
||
children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].div, {
|
||
role: "option",
|
||
"aria-labelledby": textId,
|
||
"data-highlighted": isFocused ? "" : void 0,
|
||
"aria-selected": isSelected && isFocused,
|
||
"data-state": isSelected ? "checked" : "unchecked",
|
||
"aria-disabled": disabled || void 0,
|
||
"data-disabled": disabled ? "" : void 0,
|
||
tabIndex: disabled ? void 0 : -1,
|
||
...itemProps,
|
||
ref: composedRefs,
|
||
onFocus: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onFocus, ()=>setIsFocused(true)),
|
||
onBlur: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onBlur, ()=>setIsFocused(false)),
|
||
onClick: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onClick, ()=>{
|
||
if (pointerTypeRef.current !== "mouse") handleSelect();
|
||
}),
|
||
onPointerUp: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onPointerUp, ()=>{
|
||
if (pointerTypeRef.current === "mouse") handleSelect();
|
||
}),
|
||
onPointerDown: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onPointerDown, (event)=>{
|
||
pointerTypeRef.current = event.pointerType;
|
||
}),
|
||
onPointerMove: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onPointerMove, (event)=>{
|
||
pointerTypeRef.current = event.pointerType;
|
||
if (disabled) {
|
||
contentContext.onItemLeave?.();
|
||
} else if (pointerTypeRef.current === "mouse") {
|
||
event.currentTarget.focus({
|
||
preventScroll: true
|
||
});
|
||
}
|
||
}),
|
||
onPointerLeave: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onPointerLeave, (event)=>{
|
||
if (event.currentTarget === document.activeElement) {
|
||
contentContext.onItemLeave?.();
|
||
}
|
||
}),
|
||
onKeyDown: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(itemProps.onKeyDown, (event)=>{
|
||
const isTypingAhead = contentContext.searchRef?.current !== "";
|
||
if (isTypingAhead && event.key === " ") return;
|
||
if (SELECTION_KEYS.includes(event.key)) handleSelect();
|
||
if (event.key === " ") event.preventDefault();
|
||
})
|
||
})
|
||
})
|
||
});
|
||
});
|
||
SelectItem.displayName = ITEM_NAME;
|
||
var ITEM_TEXT_NAME = "SelectItemText";
|
||
var SelectItemText = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
||
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
||
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
||
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
||
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
||
const [itemTextNode, setItemTextNode] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](null);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, {
|
||
"SelectItemText.useComposedRefs[composedRefs]": (node)=>setItemTextNode(node)
|
||
}["SelectItemText.useComposedRefs[composedRefs]"], itemContext.onItemTextChange, {
|
||
"SelectItemText.useComposedRefs[composedRefs]": (node)=>contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)
|
||
}["SelectItemText.useComposedRefs[composedRefs]"]);
|
||
const textContent = itemTextNode?.textContent;
|
||
const nativeOption = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useMemo"]({
|
||
"SelectItemText.useMemo[nativeOption]": ()=>/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])("option", {
|
||
value: itemContext.value,
|
||
disabled: itemContext.disabled,
|
||
children: textContent
|
||
}, itemContext.value)
|
||
}["SelectItemText.useMemo[nativeOption]"], [
|
||
itemContext.disabled,
|
||
itemContext.value,
|
||
textContent
|
||
]);
|
||
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectItemText.useLayoutEffect": ()=>{
|
||
onNativeOptionAdd(nativeOption);
|
||
return ({
|
||
"SelectItemText.useLayoutEffect": ()=>onNativeOptionRemove(nativeOption)
|
||
})["SelectItemText.useLayoutEffect"];
|
||
}
|
||
}["SelectItemText.useLayoutEffect"], [
|
||
onNativeOptionAdd,
|
||
onNativeOptionRemove,
|
||
nativeOption
|
||
]);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Fragment"], {
|
||
children: [
|
||
/* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].span, {
|
||
id: itemContext.textId,
|
||
...itemTextProps,
|
||
ref: composedRefs
|
||
}),
|
||
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2d$dom$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["createPortal"](itemTextProps.children, context.valueNode) : null
|
||
]
|
||
});
|
||
});
|
||
SelectItemText.displayName = ITEM_TEXT_NAME;
|
||
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
||
var SelectItemIndicator = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, ...itemIndicatorProps } = props;
|
||
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
||
return itemContext.isSelected ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].span, {
|
||
"aria-hidden": true,
|
||
...itemIndicatorProps,
|
||
ref: forwardedRef
|
||
}) : null;
|
||
});
|
||
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
||
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
||
var SelectScrollUpButton = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
||
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
||
const [canScrollUp, setCanScrollUp] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](false);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, viewportContext.onScrollButtonChange);
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectScrollUpButton.useLayoutEffect": ()=>{
|
||
if (contentContext.viewport && contentContext.isPositioned) {
|
||
let handleScroll2 = {
|
||
"SelectScrollUpButton.useLayoutEffect.handleScroll2": function() {
|
||
const canScrollUp2 = viewport.scrollTop > 0;
|
||
setCanScrollUp(canScrollUp2);
|
||
}
|
||
}["SelectScrollUpButton.useLayoutEffect.handleScroll2"];
|
||
var handleScroll = handleScroll2;
|
||
const viewport = contentContext.viewport;
|
||
handleScroll2();
|
||
viewport.addEventListener("scroll", handleScroll2);
|
||
return ({
|
||
"SelectScrollUpButton.useLayoutEffect": ()=>viewport.removeEventListener("scroll", handleScroll2)
|
||
})["SelectScrollUpButton.useLayoutEffect"];
|
||
}
|
||
}
|
||
}["SelectScrollUpButton.useLayoutEffect"], [
|
||
contentContext.viewport,
|
||
contentContext.isPositioned
|
||
]);
|
||
return canScrollUp ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectScrollButtonImpl, {
|
||
...props,
|
||
ref: composedRefs,
|
||
onAutoScroll: ()=>{
|
||
const { viewport, selectedItem } = contentContext;
|
||
if (viewport && selectedItem) {
|
||
viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;
|
||
}
|
||
}
|
||
}) : null;
|
||
});
|
||
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
||
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
||
var SelectScrollDownButton = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
||
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
||
const [canScrollDown, setCanScrollDown] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useState"](false);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, viewportContext.onScrollButtonChange);
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectScrollDownButton.useLayoutEffect": ()=>{
|
||
if (contentContext.viewport && contentContext.isPositioned) {
|
||
let handleScroll2 = {
|
||
"SelectScrollDownButton.useLayoutEffect.handleScroll2": function() {
|
||
const maxScroll = viewport.scrollHeight - viewport.clientHeight;
|
||
const canScrollDown2 = Math.ceil(viewport.scrollTop) < maxScroll;
|
||
setCanScrollDown(canScrollDown2);
|
||
}
|
||
}["SelectScrollDownButton.useLayoutEffect.handleScroll2"];
|
||
var handleScroll = handleScroll2;
|
||
const viewport = contentContext.viewport;
|
||
handleScroll2();
|
||
viewport.addEventListener("scroll", handleScroll2);
|
||
return ({
|
||
"SelectScrollDownButton.useLayoutEffect": ()=>viewport.removeEventListener("scroll", handleScroll2)
|
||
})["SelectScrollDownButton.useLayoutEffect"];
|
||
}
|
||
}
|
||
}["SelectScrollDownButton.useLayoutEffect"], [
|
||
contentContext.viewport,
|
||
contentContext.isPositioned
|
||
]);
|
||
return canScrollDown ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(SelectScrollButtonImpl, {
|
||
...props,
|
||
ref: composedRefs,
|
||
onAutoScroll: ()=>{
|
||
const { viewport, selectedItem } = contentContext;
|
||
if (viewport && selectedItem) {
|
||
viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;
|
||
}
|
||
}
|
||
}) : null;
|
||
});
|
||
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
||
var SelectScrollButtonImpl = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
||
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
||
const autoScrollTimerRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](null);
|
||
const getItems = useCollection(__scopeSelect);
|
||
const clearAutoScrollTimer = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"SelectScrollButtonImpl.useCallback[clearAutoScrollTimer]": ()=>{
|
||
if (autoScrollTimerRef.current !== null) {
|
||
window.clearInterval(autoScrollTimerRef.current);
|
||
autoScrollTimerRef.current = null;
|
||
}
|
||
}
|
||
}["SelectScrollButtonImpl.useCallback[clearAutoScrollTimer]"], []);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"SelectScrollButtonImpl.useEffect": ()=>{
|
||
return ({
|
||
"SelectScrollButtonImpl.useEffect": ()=>clearAutoScrollTimer()
|
||
})["SelectScrollButtonImpl.useEffect"];
|
||
}
|
||
}["SelectScrollButtonImpl.useEffect"], [
|
||
clearAutoScrollTimer
|
||
]);
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$layout$2d$effect$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useLayoutEffect"])({
|
||
"SelectScrollButtonImpl.useLayoutEffect": ()=>{
|
||
const activeItem = getItems().find({
|
||
"SelectScrollButtonImpl.useLayoutEffect.activeItem": (item)=>item.ref.current === document.activeElement
|
||
}["SelectScrollButtonImpl.useLayoutEffect.activeItem"]);
|
||
activeItem?.ref.current?.scrollIntoView({
|
||
block: "nearest"
|
||
});
|
||
}
|
||
}["SelectScrollButtonImpl.useLayoutEffect"], [
|
||
getItems
|
||
]);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].div, {
|
||
"aria-hidden": true,
|
||
...scrollIndicatorProps,
|
||
ref: forwardedRef,
|
||
style: {
|
||
flexShrink: 0,
|
||
...scrollIndicatorProps.style
|
||
},
|
||
onPointerDown: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(scrollIndicatorProps.onPointerDown, ()=>{
|
||
if (autoScrollTimerRef.current === null) {
|
||
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
||
}
|
||
}),
|
||
onPointerMove: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(scrollIndicatorProps.onPointerMove, ()=>{
|
||
contentContext.onItemLeave?.();
|
||
if (autoScrollTimerRef.current === null) {
|
||
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
||
}
|
||
}),
|
||
onPointerLeave: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["composeEventHandlers"])(scrollIndicatorProps.onPointerLeave, ()=>{
|
||
clearAutoScrollTimer();
|
||
})
|
||
});
|
||
});
|
||
var SEPARATOR_NAME = "SelectSeparator";
|
||
var SelectSeparator = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, ...separatorProps } = props;
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].div, {
|
||
"aria-hidden": true,
|
||
...separatorProps,
|
||
ref: forwardedRef
|
||
});
|
||
});
|
||
SelectSeparator.displayName = SEPARATOR_NAME;
|
||
var ARROW_NAME = "SelectArrow";
|
||
var SelectArrow = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{
|
||
const { __scopeSelect, ...arrowProps } = props;
|
||
const popperScope = usePopperScope(__scopeSelect);
|
||
const context = useSelectContext(ARROW_NAME, __scopeSelect);
|
||
const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);
|
||
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$popper$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Arrow"], {
|
||
...popperScope,
|
||
...arrowProps,
|
||
ref: forwardedRef
|
||
}) : null;
|
||
});
|
||
SelectArrow.displayName = ARROW_NAME;
|
||
var BUBBLE_INPUT_NAME = "SelectBubbleInput";
|
||
var SelectBubbleInput = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["forwardRef"](({ __scopeSelect, value, ...props }, forwardedRef)=>{
|
||
const ref = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](null);
|
||
const composedRefs = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useComposedRefs"])(forwardedRef, ref);
|
||
const prevValue = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$previous$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["usePrevious"])(value);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"SelectBubbleInput.useEffect": ()=>{
|
||
const select = ref.current;
|
||
if (!select) return;
|
||
const selectProto = window.HTMLSelectElement.prototype;
|
||
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
||
const setValue = descriptor.set;
|
||
if (prevValue !== value && setValue) {
|
||
const event = new Event("change", {
|
||
bubbles: true
|
||
});
|
||
setValue.call(select, value);
|
||
select.dispatchEvent(event);
|
||
}
|
||
}
|
||
}["SelectBubbleInput.useEffect"], [
|
||
prevValue,
|
||
value
|
||
]);
|
||
return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$jsx$2d$runtime$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$select$2f$node_modules$2f40$radix$2d$ui$2f$react$2d$primitive$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["Primitive"].select, {
|
||
...props,
|
||
style: {
|
||
...__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$visually$2d$hidden$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["VISUALLY_HIDDEN_STYLES"],
|
||
...props.style
|
||
},
|
||
ref: composedRefs,
|
||
defaultValue: value
|
||
});
|
||
});
|
||
SelectBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
||
function shouldShowPlaceholder(value) {
|
||
return value === "" || value === void 0;
|
||
}
|
||
function useTypeaheadSearch(onSearchChange) {
|
||
const handleSearchChange = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$use$2d$callback$2d$ref$2f$dist$2f$index$2e$mjs__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallbackRef"])(onSearchChange);
|
||
const searchRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"]("");
|
||
const timerRef = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useRef"](0);
|
||
const handleTypeaheadSearch = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"useTypeaheadSearch.useCallback[handleTypeaheadSearch]": (key)=>{
|
||
const search = searchRef.current + key;
|
||
handleSearchChange(search);
|
||
(function updateSearch(value) {
|
||
searchRef.current = value;
|
||
window.clearTimeout(timerRef.current);
|
||
if (value !== "") timerRef.current = window.setTimeout({
|
||
"useTypeaheadSearch.useCallback[handleTypeaheadSearch].updateSearch": ()=>updateSearch("")
|
||
}["useTypeaheadSearch.useCallback[handleTypeaheadSearch].updateSearch"], 1e3);
|
||
})(search);
|
||
}
|
||
}["useTypeaheadSearch.useCallback[handleTypeaheadSearch]"], [
|
||
handleSearchChange
|
||
]);
|
||
const resetTypeahead = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useCallback"]({
|
||
"useTypeaheadSearch.useCallback[resetTypeahead]": ()=>{
|
||
searchRef.current = "";
|
||
window.clearTimeout(timerRef.current);
|
||
}
|
||
}["useTypeaheadSearch.useCallback[resetTypeahead]"], []);
|
||
__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["useEffect"]({
|
||
"useTypeaheadSearch.useEffect": ()=>{
|
||
return ({
|
||
"useTypeaheadSearch.useEffect": ()=>window.clearTimeout(timerRef.current)
|
||
})["useTypeaheadSearch.useEffect"];
|
||
}
|
||
}["useTypeaheadSearch.useEffect"], []);
|
||
return [
|
||
searchRef,
|
||
handleTypeaheadSearch,
|
||
resetTypeahead
|
||
];
|
||
}
|
||
function findNextItem(items, search, currentItem) {
|
||
const isRepeated = search.length > 1 && Array.from(search).every((char)=>char === search[0]);
|
||
const normalizedSearch = isRepeated ? search[0] : search;
|
||
const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;
|
||
let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));
|
||
const excludeCurrentItem = normalizedSearch.length === 1;
|
||
if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v)=>v !== currentItem);
|
||
const nextItem = wrappedItems.find((item)=>item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase()));
|
||
return nextItem !== currentItem ? nextItem : void 0;
|
||
}
|
||
function wrapArray(array, startIndex) {
|
||
return array.map((_, index)=>array[(startIndex + index) % array.length]);
|
||
}
|
||
var Root2 = Select;
|
||
var Trigger = SelectTrigger;
|
||
var Value = SelectValue;
|
||
var Icon = SelectIcon;
|
||
var Portal = SelectPortal;
|
||
var Content2 = SelectContent;
|
||
var Viewport = SelectViewport;
|
||
var Group = SelectGroup;
|
||
var Label = SelectLabel;
|
||
var Item = SelectItem;
|
||
var ItemText = SelectItemText;
|
||
var ItemIndicator = SelectItemIndicator;
|
||
var ScrollUpButton = SelectScrollUpButton;
|
||
var ScrollDownButton = SelectScrollDownButton;
|
||
var Separator = SelectSeparator;
|
||
var Arrow2 = SelectArrow;
|
||
;
|
||
//# sourceMappingURL=index.mjs.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/chevron-down.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>ChevronDown
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "m6 9 6 6 6-6",
|
||
key: "qrunsl"
|
||
}
|
||
]
|
||
];
|
||
const ChevronDown = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("chevron-down", __iconNode);
|
||
;
|
||
//# sourceMappingURL=chevron-down.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/chevron-down.js [app-client] (ecmascript) <export default as ChevronDownIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"ChevronDownIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$chevron$2d$down$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$chevron$2d$down$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/chevron-down.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/chevron-up.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>ChevronUp
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "m18 15-6-6-6 6",
|
||
key: "153udz"
|
||
}
|
||
]
|
||
];
|
||
const ChevronUp = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("chevron-up", __iconNode);
|
||
;
|
||
//# sourceMappingURL=chevron-up.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/chevron-up.js [app-client] (ecmascript) <export default as ChevronUpIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"ChevronUpIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$chevron$2d$up$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$chevron$2d$up$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/chevron-up.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/loader.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>Loader
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "M12 2v4",
|
||
key: "3427ic"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "m16.2 7.8 2.9-2.9",
|
||
key: "r700ao"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M18 12h4",
|
||
key: "wj9ykh"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "m16.2 16.2 2.9 2.9",
|
||
key: "1bxg5t"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M12 18v4",
|
||
key: "jadmvz"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "m4.9 19.1 2.9-2.9",
|
||
key: "bwix9q"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M2 12h4",
|
||
key: "j09sii"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "m4.9 4.9 2.9 2.9",
|
||
key: "giyufr"
|
||
}
|
||
]
|
||
];
|
||
const Loader = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("loader", __iconNode);
|
||
;
|
||
//# sourceMappingURL=loader.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/loader.js [app-client] (ecmascript) <export default as LoaderIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"LoaderIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$loader$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$loader$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/loader.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/play.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>Play
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
|
||
key: "10ikf1"
|
||
}
|
||
]
|
||
];
|
||
const Play = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("play", __iconNode);
|
||
;
|
||
//# sourceMappingURL=play.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/play.js [app-client] (ecmascript) <export default as PlayIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"PlayIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$play$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$play$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/play.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/copy.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>Copy
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"rect",
|
||
{
|
||
width: "14",
|
||
height: "14",
|
||
x: "8",
|
||
y: "8",
|
||
rx: "2",
|
||
ry: "2",
|
||
key: "17jyea"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
||
key: "zix9uf"
|
||
}
|
||
]
|
||
];
|
||
const Copy = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("copy", __iconNode);
|
||
;
|
||
//# sourceMappingURL=copy.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/copy.js [app-client] (ecmascript) <export default as CopyIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"CopyIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$copy$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$copy$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/copy.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/tags.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>Tags
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",
|
||
key: "16rjxf"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",
|
||
key: "178nd4"
|
||
}
|
||
],
|
||
[
|
||
"circle",
|
||
{
|
||
cx: "10.5",
|
||
cy: "6.5",
|
||
r: ".5",
|
||
fill: "currentColor",
|
||
key: "12ikhr"
|
||
}
|
||
]
|
||
];
|
||
const Tags = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("tags", __iconNode);
|
||
;
|
||
//# sourceMappingURL=tags.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/tags.js [app-client] (ecmascript) <export default as TagsIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"TagsIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$tags$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$tags$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/tags.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>ArrowUpDown
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "m21 16-4 4-4-4",
|
||
key: "f6ql7i"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M17 20V4",
|
||
key: "1ejh1v"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "m3 8 4-4 4 4",
|
||
key: "11wl7u"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M7 4v16",
|
||
key: "1glfcx"
|
||
}
|
||
]
|
||
];
|
||
const ArrowUpDown = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("arrow-up-down", __iconNode);
|
||
;
|
||
//# sourceMappingURL=arrow-up-down.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js [app-client] (ecmascript) <export default as ArrowUpDownIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"ArrowUpDownIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$arrow$2d$up$2d$down$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$arrow$2d$up$2d$down$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/arrow-up-down.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/arrow-up.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>ArrowUp
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "m5 12 7-7 7 7",
|
||
key: "hav0vg"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M12 19V5",
|
||
key: "x0mq9r"
|
||
}
|
||
]
|
||
];
|
||
const ArrowUp = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("arrow-up", __iconNode);
|
||
;
|
||
//# sourceMappingURL=arrow-up.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/arrow-up.js [app-client] (ecmascript) <export default as ArrowUpIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"ArrowUpIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$arrow$2d$up$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$arrow$2d$up$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/arrow-up.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/arrow-down.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>ArrowDown
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "M12 5v14",
|
||
key: "s699le"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "m19 12-7 7-7-7",
|
||
key: "1idqje"
|
||
}
|
||
]
|
||
];
|
||
const ArrowDown = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("arrow-down", __iconNode);
|
||
;
|
||
//# sourceMappingURL=arrow-down.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/arrow-down.js [app-client] (ecmascript) <export default as ArrowDownIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"ArrowDownIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$arrow$2d$down$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$arrow$2d$down$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/arrow-down.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/columns-3.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>Columns3
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"rect",
|
||
{
|
||
width: "18",
|
||
height: "18",
|
||
x: "3",
|
||
y: "3",
|
||
rx: "2",
|
||
key: "afitv7"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M9 3v18",
|
||
key: "fh3hqa"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M15 3v18",
|
||
key: "14nvp0"
|
||
}
|
||
]
|
||
];
|
||
const Columns3 = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("columns-3", __iconNode);
|
||
;
|
||
//# sourceMappingURL=columns-3.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/columns-3.js [app-client] (ecmascript) <export default as Columns3Icon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Columns3Icon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$columns$2d$3$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$columns$2d$3$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/columns-3.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/list-ordered.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"__iconNode",
|
||
()=>__iconNode,
|
||
"default",
|
||
()=>ListOrdered
|
||
]);
|
||
/**
|
||
* @license lucide-react v0.562.0 - ISC
|
||
*
|
||
* This source code is licensed under the ISC license.
|
||
* See the LICENSE file in the root directory of this source tree.
|
||
*/ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-client] (ecmascript)");
|
||
;
|
||
const __iconNode = [
|
||
[
|
||
"path",
|
||
{
|
||
d: "M11 5h10",
|
||
key: "1cz7ny"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M11 12h10",
|
||
key: "1438ji"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M11 19h10",
|
||
key: "11t30w"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M4 4h1v5",
|
||
key: "10yrso"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M4 9h2",
|
||
key: "r1h2o0"
|
||
}
|
||
],
|
||
[
|
||
"path",
|
||
{
|
||
d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",
|
||
key: "xtkcd5"
|
||
}
|
||
]
|
||
];
|
||
const ListOrdered = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])("list-ordered", __iconNode);
|
||
;
|
||
//# sourceMappingURL=list-ordered.js.map
|
||
}),
|
||
"[project]/node_modules/lucide-react/dist/esm/icons/list-ordered.js [app-client] (ecmascript) <export default as ListOrderedIcon>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"ListOrderedIcon",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$list$2d$ordered$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$list$2d$ordered$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/list-ordered.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_objectWithoutPropertiesLoose
|
||
]);
|
||
function _objectWithoutPropertiesLoose(r, e) {
|
||
if (null == r) return {};
|
||
var t = {};
|
||
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
||
if (-1 !== e.indexOf(n)) continue;
|
||
t[n] = r[n];
|
||
}
|
||
return t;
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_objectWithoutProperties
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$objectWithoutPropertiesLoose$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js [app-client] (ecmascript)");
|
||
;
|
||
function _objectWithoutProperties(e, t) {
|
||
if (null == e) return {};
|
||
var o, r, i = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$objectWithoutPropertiesLoose$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(e, t);
|
||
if (Object.getOwnPropertySymbols) {
|
||
var n = Object.getOwnPropertySymbols(e);
|
||
for(r = 0; r < n.length; r++)o = n[r], -1 === t.indexOf(o) && ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
||
}
|
||
return i;
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_arrayLikeToArray
|
||
]);
|
||
function _arrayLikeToArray(r, a) {
|
||
(null == a || a > r.length) && (a = r.length);
|
||
for(var e = 0, n = Array(a); e < a; e++)n[e] = r[e];
|
||
return n;
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_arrayWithoutHoles
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$arrayLikeToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js [app-client] (ecmascript)");
|
||
;
|
||
function _arrayWithoutHoles(r) {
|
||
if (Array.isArray(r)) return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$arrayLikeToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(r);
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/iterableToArray.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_iterableToArray
|
||
]);
|
||
function _iterableToArray(r) {
|
||
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_unsupportedIterableToArray
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$arrayLikeToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js [app-client] (ecmascript)");
|
||
;
|
||
function _unsupportedIterableToArray(r, a) {
|
||
if (r) {
|
||
if ("string" == typeof r) return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$arrayLikeToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(r, a);
|
||
var t = ({}).toString.call(r).slice(8, -1);
|
||
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$arrayLikeToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(r, a) : void 0;
|
||
}
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_nonIterableSpread
|
||
]);
|
||
function _nonIterableSpread() {
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_toConsumableArray
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$arrayWithoutHoles$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$iterableToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/iterableToArray.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$unsupportedIterableToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$nonIterableSpread$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
;
|
||
function _toConsumableArray(r) {
|
||
return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$arrayWithoutHoles$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(r) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$iterableToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(r) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$unsupportedIterableToArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(r) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$nonIterableSpread$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])();
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/typeof.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_typeof
|
||
]);
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
||
return typeof o;
|
||
} : function(o) {
|
||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
||
}, _typeof(o);
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/toPrimitive.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>toPrimitive
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$typeof$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/typeof.js [app-client] (ecmascript)");
|
||
;
|
||
function toPrimitive(t, r) {
|
||
if ("object" != (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$typeof$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(t) || !t) return t;
|
||
var e = t[Symbol.toPrimitive];
|
||
if (void 0 !== e) {
|
||
var i = e.call(t, r || "default");
|
||
if ("object" != (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$typeof$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(i)) return i;
|
||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||
}
|
||
return ("string" === r ? String : Number)(t);
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>toPropertyKey
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$typeof$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/typeof.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toPrimitive$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/toPrimitive.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
function toPropertyKey(t) {
|
||
var i = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toPrimitive$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(t, "string");
|
||
return "symbol" == (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$typeof$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(i) ? i : i + "";
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/defineProperty.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_defineProperty
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toPropertyKey$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js [app-client] (ecmascript)");
|
||
;
|
||
function _defineProperty(e, r, t) {
|
||
return (r = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toPropertyKey$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(r)) in e ? Object.defineProperty(e, r, {
|
||
value: t,
|
||
enumerable: !0,
|
||
configurable: !0,
|
||
writable: !0
|
||
}) : e[r] = t, e;
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/@babel/runtime/helpers/esm/extends.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>_extends
|
||
]);
|
||
function _extends() {
|
||
return _extends = ("TURBOPACK compile-time truthy", 1) ? Object.assign.bind() : "TURBOPACK unreachable", _extends.apply(null, arguments);
|
||
}
|
||
;
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/create-element.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"createChildren",
|
||
()=>createChildren,
|
||
"createClassNameString",
|
||
()=>createClassNameString,
|
||
"createStyleObject",
|
||
()=>createStyleObject,
|
||
"default",
|
||
()=>createElement
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$extends$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/extends.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$defineProperty$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/defineProperty.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
function ownKeys(e, r) {
|
||
var t = Object.keys(e);
|
||
if (Object.getOwnPropertySymbols) {
|
||
var o = Object.getOwnPropertySymbols(e);
|
||
r && (o = o.filter(function(r) {
|
||
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
||
})), t.push.apply(t, o);
|
||
}
|
||
return t;
|
||
}
|
||
function _objectSpread(e) {
|
||
for(var r = 1; r < arguments.length; r++){
|
||
var t = null != arguments[r] ? arguments[r] : {};
|
||
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$defineProperty$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(e, r, t[r]);
|
||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
||
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
||
});
|
||
}
|
||
return e;
|
||
}
|
||
;
|
||
// Get all possible permutations of all power sets
|
||
//
|
||
// Super simple, non-algorithmic solution since the
|
||
// number of class names will not be greater than 4
|
||
function powerSetPermutations(arr) {
|
||
var arrLength = arr.length;
|
||
if (arrLength === 0 || arrLength === 1) return arr;
|
||
if (arrLength === 2) {
|
||
// prettier-ignore
|
||
return [
|
||
arr[0],
|
||
arr[1],
|
||
"".concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[1], ".").concat(arr[0])
|
||
];
|
||
}
|
||
if (arrLength === 3) {
|
||
return [
|
||
arr[0],
|
||
arr[1],
|
||
arr[2],
|
||
"".concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[0], ".").concat(arr[2]),
|
||
"".concat(arr[1], ".").concat(arr[0]),
|
||
"".concat(arr[1], ".").concat(arr[2]),
|
||
"".concat(arr[2], ".").concat(arr[0]),
|
||
"".concat(arr[2], ".").concat(arr[1]),
|
||
"".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]),
|
||
"".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]),
|
||
"".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]),
|
||
"".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]),
|
||
"".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])
|
||
];
|
||
}
|
||
if (arrLength >= 4) {
|
||
// Currently does not support more than 4 extra
|
||
// class names (after `.token` has been removed)
|
||
return [
|
||
arr[0],
|
||
arr[1],
|
||
arr[2],
|
||
arr[3],
|
||
"".concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[0], ".").concat(arr[2]),
|
||
"".concat(arr[0], ".").concat(arr[3]),
|
||
"".concat(arr[1], ".").concat(arr[0]),
|
||
"".concat(arr[1], ".").concat(arr[2]),
|
||
"".concat(arr[1], ".").concat(arr[3]),
|
||
"".concat(arr[2], ".").concat(arr[0]),
|
||
"".concat(arr[2], ".").concat(arr[1]),
|
||
"".concat(arr[2], ".").concat(arr[3]),
|
||
"".concat(arr[3], ".").concat(arr[0]),
|
||
"".concat(arr[3], ".").concat(arr[1]),
|
||
"".concat(arr[3], ".").concat(arr[2]),
|
||
"".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]),
|
||
"".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]),
|
||
"".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]),
|
||
"".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]),
|
||
"".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]),
|
||
"".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]),
|
||
"".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]),
|
||
"".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]),
|
||
"".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]),
|
||
"".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]),
|
||
"".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]),
|
||
"".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]),
|
||
"".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]),
|
||
"".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0]),
|
||
"".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]),
|
||
"".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]),
|
||
"".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]),
|
||
"".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]),
|
||
"".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]),
|
||
"".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]),
|
||
"".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]),
|
||
"".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]),
|
||
"".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]),
|
||
"".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]),
|
||
"".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]),
|
||
"".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]),
|
||
"".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]),
|
||
"".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]),
|
||
"".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]),
|
||
"".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]),
|
||
"".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]),
|
||
"".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]),
|
||
"".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]),
|
||
"".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]),
|
||
"".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]),
|
||
"".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]),
|
||
"".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]),
|
||
"".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]),
|
||
"".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]),
|
||
"".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]),
|
||
"".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]),
|
||
"".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]),
|
||
"".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]),
|
||
"".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]),
|
||
"".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])
|
||
];
|
||
}
|
||
}
|
||
var classNameCombinations = {};
|
||
function getClassNameCombinations(classNames) {
|
||
if (classNames.length === 0 || classNames.length === 1) return classNames;
|
||
var key = classNames.join('.');
|
||
if (!classNameCombinations[key]) {
|
||
classNameCombinations[key] = powerSetPermutations(classNames);
|
||
}
|
||
return classNameCombinations[key];
|
||
}
|
||
function createStyleObject(classNames) {
|
||
var elementStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
var stylesheet = arguments.length > 2 ? arguments[2] : undefined;
|
||
var nonTokenClassNames = classNames.filter(function(className) {
|
||
return className !== 'token';
|
||
});
|
||
var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);
|
||
return classNamesCombinations.reduce(function(styleObject, className) {
|
||
return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);
|
||
}, elementStyle);
|
||
}
|
||
function createClassNameString(classNames) {
|
||
return classNames.join(' ');
|
||
}
|
||
function createChildren(stylesheet, useInlineStyles) {
|
||
var childrenCount = 0;
|
||
return function(children) {
|
||
childrenCount += 1;
|
||
return children.map(function(child, i) {
|
||
return createElement({
|
||
node: child,
|
||
stylesheet: stylesheet,
|
||
useInlineStyles: useInlineStyles,
|
||
key: "code-segment-".concat(childrenCount, "-").concat(i)
|
||
});
|
||
});
|
||
};
|
||
}
|
||
function createElement(_ref) {
|
||
var node = _ref.node, stylesheet = _ref.stylesheet, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, useInlineStyles = _ref.useInlineStyles, key = _ref.key;
|
||
var properties = node.properties, type = node.type, TagName = node.tagName, value = node.value;
|
||
if (type === 'text') {
|
||
return value;
|
||
} else if (TagName) {
|
||
var childrenCreator = createChildren(stylesheet, useInlineStyles);
|
||
var props;
|
||
if (!useInlineStyles) {
|
||
props = _objectSpread(_objectSpread({}, properties), {}, {
|
||
className: createClassNameString(properties.className)
|
||
});
|
||
} else {
|
||
var allStylesheetSelectors = Object.keys(stylesheet).reduce(function(classes, selector) {
|
||
selector.split('.').forEach(function(className) {
|
||
if (!classes.includes(className)) classes.push(className);
|
||
});
|
||
return classes;
|
||
}, []);
|
||
// For compatibility with older versions of react-syntax-highlighter
|
||
var startingClassName = properties.className && properties.className.includes('token') ? [
|
||
'token'
|
||
] : [];
|
||
var className = properties.className && startingClassName.concat(properties.className.filter(function(className) {
|
||
return !allStylesheetSelectors.includes(className);
|
||
}));
|
||
props = _objectSpread(_objectSpread({}, properties), {}, {
|
||
className: createClassNameString(className) || undefined,
|
||
style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)
|
||
});
|
||
}
|
||
var children = childrenCreator(node.children);
|
||
return /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement(TagName, (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$extends$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])({
|
||
key: key
|
||
}, props), children);
|
||
}
|
||
}
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>__TURBOPACK__default__export__
|
||
]);
|
||
const __TURBOPACK__default__export__ = function(astGenerator, language) {
|
||
var langs = astGenerator.listLanguages();
|
||
return langs.indexOf(language) !== -1;
|
||
};
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/highlight.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>__TURBOPACK__default__export__
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$objectWithoutProperties$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toConsumableArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$defineProperty$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@babel/runtime/helpers/esm/defineProperty.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/compiled/react/index.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$create$2d$element$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/react-syntax-highlighter/dist/esm/create-element.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$checkForListedLanguage$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
;
|
||
var _excluded = [
|
||
"language",
|
||
"children",
|
||
"style",
|
||
"customStyle",
|
||
"codeTagProps",
|
||
"useInlineStyles",
|
||
"showLineNumbers",
|
||
"showInlineLineNumbers",
|
||
"startingLineNumber",
|
||
"lineNumberContainerStyle",
|
||
"lineNumberStyle",
|
||
"wrapLines",
|
||
"wrapLongLines",
|
||
"lineProps",
|
||
"renderer",
|
||
"PreTag",
|
||
"CodeTag",
|
||
"code",
|
||
"astGenerator"
|
||
];
|
||
function ownKeys(e, r) {
|
||
var t = Object.keys(e);
|
||
if (Object.getOwnPropertySymbols) {
|
||
var o = Object.getOwnPropertySymbols(e);
|
||
r && (o = o.filter(function(r) {
|
||
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
||
})), t.push.apply(t, o);
|
||
}
|
||
return t;
|
||
}
|
||
function _objectSpread(e) {
|
||
for(var r = 1; r < arguments.length; r++){
|
||
var t = null != arguments[r] ? arguments[r] : {};
|
||
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
||
(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$defineProperty$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(e, r, t[r]);
|
||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
||
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
||
});
|
||
}
|
||
return e;
|
||
}
|
||
;
|
||
;
|
||
;
|
||
var newLineRegex = /\n/g;
|
||
function getNewLines(str) {
|
||
return str.match(newLineRegex);
|
||
}
|
||
function getAllLineNumbers(_ref) {
|
||
var lines = _ref.lines, startingLineNumber = _ref.startingLineNumber, style = _ref.style;
|
||
return lines.map(function(_, i) {
|
||
var number = i + startingLineNumber;
|
||
return /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement("span", {
|
||
key: "line-".concat(i),
|
||
className: "react-syntax-highlighter-line-number",
|
||
style: typeof style === 'function' ? style(number) : style
|
||
}, "".concat(number, "\n"));
|
||
});
|
||
}
|
||
function AllLineNumbers(_ref2) {
|
||
var codeString = _ref2.codeString, codeStyle = _ref2.codeStyle, _ref2$containerStyle = _ref2.containerStyle, containerStyle = _ref2$containerStyle === void 0 ? {
|
||
"float": 'left',
|
||
paddingRight: '10px'
|
||
} : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
|
||
return /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement("code", {
|
||
style: Object.assign({}, codeStyle, containerStyle)
|
||
}, getAllLineNumbers({
|
||
lines: codeString.replace(/\n$/, '').split('\n'),
|
||
style: numberStyle,
|
||
startingLineNumber: startingLineNumber
|
||
}));
|
||
}
|
||
function getEmWidthOfNumber(num) {
|
||
return "".concat(num.toString().length, ".25em");
|
||
}
|
||
function getInlineLineNumber(lineNumber, inlineLineNumberStyle) {
|
||
return {
|
||
type: 'element',
|
||
tagName: 'span',
|
||
properties: {
|
||
key: "line-number--".concat(lineNumber),
|
||
className: [
|
||
'comment',
|
||
'linenumber',
|
||
'react-syntax-highlighter-line-number'
|
||
],
|
||
style: inlineLineNumberStyle
|
||
},
|
||
children: [
|
||
{
|
||
type: 'text',
|
||
value: lineNumber
|
||
}
|
||
]
|
||
};
|
||
}
|
||
function assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber) {
|
||
// minimally necessary styling for line numbers
|
||
var defaultLineNumberStyle = {
|
||
display: 'inline-block',
|
||
minWidth: getEmWidthOfNumber(largestLineNumber),
|
||
paddingRight: '1em',
|
||
textAlign: 'right',
|
||
userSelect: 'none'
|
||
};
|
||
// prep custom styling
|
||
var customLineNumberStyle = typeof lineNumberStyle === 'function' ? lineNumberStyle(lineNumber) : lineNumberStyle;
|
||
// combine
|
||
var assembledStyle = _objectSpread(_objectSpread({}, defaultLineNumberStyle), customLineNumberStyle);
|
||
return assembledStyle;
|
||
}
|
||
function createLineElement(_ref3) {
|
||
var children = _ref3.children, lineNumber = _ref3.lineNumber, lineNumberStyle = _ref3.lineNumberStyle, largestLineNumber = _ref3.largestLineNumber, showInlineLineNumbers = _ref3.showInlineLineNumbers, _ref3$lineProps = _ref3.lineProps, lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps, _ref3$className = _ref3.className, className = _ref3$className === void 0 ? [] : _ref3$className, showLineNumbers = _ref3.showLineNumbers, wrapLongLines = _ref3.wrapLongLines, _ref3$wrapLines = _ref3.wrapLines, wrapLines = _ref3$wrapLines === void 0 ? false : _ref3$wrapLines;
|
||
var properties = wrapLines ? _objectSpread({}, typeof lineProps === 'function' ? lineProps(lineNumber) : lineProps) : {};
|
||
properties['className'] = properties['className'] ? [].concat((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toConsumableArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(properties['className'].trim().split(/\s+/)), (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toConsumableArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(className)) : className;
|
||
if (lineNumber && showInlineLineNumbers) {
|
||
var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);
|
||
children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));
|
||
}
|
||
if (wrapLongLines & showLineNumbers) {
|
||
properties.style = _objectSpread({
|
||
display: 'flex'
|
||
}, properties.style);
|
||
}
|
||
return {
|
||
type: 'element',
|
||
tagName: 'span',
|
||
properties: properties,
|
||
children: children
|
||
};
|
||
}
|
||
function flattenCodeTree(tree) {
|
||
var className = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
||
var newTree = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
||
for(var i = 0; i < tree.length; i++){
|
||
var node = tree[i];
|
||
if (node.type === 'text') {
|
||
newTree.push(createLineElement({
|
||
children: [
|
||
node
|
||
],
|
||
className: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$toConsumableArray$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(new Set(className))
|
||
}));
|
||
} else if (node.children) {
|
||
var classNames = className.concat(node.properties.className);
|
||
flattenCodeTree(node.children, classNames).forEach(function(i) {
|
||
return newTree.push(i);
|
||
});
|
||
}
|
||
}
|
||
return newTree;
|
||
}
|
||
function processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines) {
|
||
var _ref4;
|
||
var tree = flattenCodeTree(codeTree.value);
|
||
var newTree = [];
|
||
var lastLineBreakIndex = -1;
|
||
var index = 0;
|
||
function createWrappedLine(children, lineNumber) {
|
||
var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
||
return createLineElement({
|
||
children: children,
|
||
lineNumber: lineNumber,
|
||
lineNumberStyle: lineNumberStyle,
|
||
largestLineNumber: largestLineNumber,
|
||
showInlineLineNumbers: showInlineLineNumbers,
|
||
lineProps: lineProps,
|
||
className: className,
|
||
showLineNumbers: showLineNumbers,
|
||
wrapLongLines: wrapLongLines,
|
||
wrapLines: wrapLines
|
||
});
|
||
}
|
||
function createUnwrappedLine(children, lineNumber) {
|
||
if (showLineNumbers && lineNumber && showInlineLineNumbers) {
|
||
var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);
|
||
children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));
|
||
}
|
||
return children;
|
||
}
|
||
function createLine(children, lineNumber) {
|
||
var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
||
return wrapLines || className.length > 0 ? createWrappedLine(children, lineNumber, className) : createUnwrappedLine(children, lineNumber);
|
||
}
|
||
var _loop = function _loop() {
|
||
var node = tree[index];
|
||
var value = node.children[0].value;
|
||
var newLines = getNewLines(value);
|
||
if (newLines) {
|
||
var splitValue = value.split('\n');
|
||
splitValue.forEach(function(text, i) {
|
||
var lineNumber = showLineNumbers && newTree.length + startingLineNumber;
|
||
var newChild = {
|
||
type: 'text',
|
||
value: "".concat(text, "\n")
|
||
};
|
||
// if it's the first line
|
||
if (i === 0) {
|
||
var _children = tree.slice(lastLineBreakIndex + 1, index).concat(createLineElement({
|
||
children: [
|
||
newChild
|
||
],
|
||
className: node.properties.className
|
||
}));
|
||
var _line = createLine(_children, lineNumber);
|
||
newTree.push(_line);
|
||
// if it's the last line
|
||
} else if (i === splitValue.length - 1) {
|
||
var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];
|
||
var lastLineInPreviousSpan = {
|
||
type: 'text',
|
||
value: "".concat(text)
|
||
};
|
||
if (stringChild) {
|
||
var newElem = createLineElement({
|
||
children: [
|
||
lastLineInPreviousSpan
|
||
],
|
||
className: node.properties.className
|
||
});
|
||
tree.splice(index + 1, 0, newElem);
|
||
} else {
|
||
var _children2 = [
|
||
lastLineInPreviousSpan
|
||
];
|
||
var _line2 = createLine(_children2, lineNumber, node.properties.className);
|
||
newTree.push(_line2);
|
||
}
|
||
// if it's neither the first nor the last line
|
||
} else {
|
||
var _children3 = [
|
||
newChild
|
||
];
|
||
var _line3 = createLine(_children3, lineNumber, node.properties.className);
|
||
newTree.push(_line3);
|
||
}
|
||
});
|
||
lastLineBreakIndex = index;
|
||
}
|
||
index++;
|
||
};
|
||
while(index < tree.length){
|
||
_loop();
|
||
}
|
||
if (lastLineBreakIndex !== tree.length - 1) {
|
||
var children = tree.slice(lastLineBreakIndex + 1, tree.length);
|
||
if (children && children.length) {
|
||
var lineNumber = showLineNumbers && newTree.length + startingLineNumber;
|
||
var line = createLine(children, lineNumber);
|
||
newTree.push(line);
|
||
}
|
||
}
|
||
return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree);
|
||
}
|
||
function defaultRenderer(_ref5) {
|
||
var rows = _ref5.rows, stylesheet = _ref5.stylesheet, useInlineStyles = _ref5.useInlineStyles;
|
||
return rows.map(function(node, i) {
|
||
return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$create$2d$element$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])({
|
||
node: node,
|
||
stylesheet: stylesheet,
|
||
useInlineStyles: useInlineStyles,
|
||
key: "code-segment-".concat(i)
|
||
});
|
||
});
|
||
}
|
||
// only highlight.js has the highlightAuto method
|
||
function isHighlightJs(astGenerator) {
|
||
return astGenerator && typeof astGenerator.highlightAuto !== 'undefined';
|
||
}
|
||
function getCodeTree(_ref6) {
|
||
var astGenerator = _ref6.astGenerator, language = _ref6.language, code = _ref6.code, defaultCodeValue = _ref6.defaultCodeValue;
|
||
// figure out whether we're using lowlight/highlight or refractor/prism
|
||
// then attempt highlighting accordingly
|
||
// lowlight/highlight?
|
||
if (isHighlightJs(astGenerator)) {
|
||
var hasLanguage = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$checkForListedLanguage$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(astGenerator, language);
|
||
if (language === 'text') {
|
||
return {
|
||
value: defaultCodeValue,
|
||
language: 'text'
|
||
};
|
||
} else if (hasLanguage) {
|
||
return astGenerator.highlight(language, code);
|
||
} else {
|
||
return astGenerator.highlightAuto(code);
|
||
}
|
||
}
|
||
// must be refractor/prism, then
|
||
try {
|
||
return language && language !== 'text' ? {
|
||
value: astGenerator.highlight(code, language)
|
||
} : {
|
||
value: defaultCodeValue
|
||
};
|
||
} catch (e) {
|
||
return {
|
||
value: defaultCodeValue
|
||
};
|
||
}
|
||
}
|
||
function __TURBOPACK__default__export__(defaultAstGenerator, defaultStyle) {
|
||
return function SyntaxHighlighter(_ref7) {
|
||
var _code$match$length, _code$match;
|
||
var language = _ref7.language, children = _ref7.children, _ref7$style = _ref7.style, style = _ref7$style === void 0 ? defaultStyle : _ref7$style, _ref7$customStyle = _ref7.customStyle, customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle, _ref7$codeTagProps = _ref7.codeTagProps, codeTagProps = _ref7$codeTagProps === void 0 ? {
|
||
className: language ? "language-".concat(language) : undefined,
|
||
style: _objectSpread(_objectSpread({}, style['code[class*="language-"]']), style["code[class*=\"language-".concat(language, "\"]")])
|
||
} : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === void 0 ? 'pre' : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === void 0 ? 'code' : _ref7$CodeTag, _ref7$code = _ref7.code, code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || '' : _ref7$code, astGenerator = _ref7.astGenerator, rest = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$babel$2f$runtime$2f$helpers$2f$esm$2f$objectWithoutProperties$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(_ref7, _excluded);
|
||
astGenerator = astGenerator || defaultAstGenerator;
|
||
var allLineNumbers = showLineNumbers ? /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement(AllLineNumbers, {
|
||
containerStyle: lineNumberContainerStyle,
|
||
codeStyle: codeTagProps.style || {},
|
||
numberStyle: lineNumberStyle,
|
||
startingLineNumber: startingLineNumber,
|
||
codeString: code
|
||
}) : null;
|
||
var defaultPreStyle = style.hljs || style['pre[class*="language-"]'] || {
|
||
backgroundColor: '#fff'
|
||
};
|
||
var generatorClassName = isHighlightJs(astGenerator) ? 'hljs' : 'prismjs';
|
||
var preProps = useInlineStyles ? Object.assign({}, rest, {
|
||
style: Object.assign({}, defaultPreStyle, customStyle)
|
||
}) : Object.assign({}, rest, {
|
||
className: rest.className ? "".concat(generatorClassName, " ").concat(rest.className) : generatorClassName,
|
||
style: Object.assign({}, customStyle)
|
||
});
|
||
if (wrapLongLines) {
|
||
codeTagProps.style = _objectSpread({
|
||
whiteSpace: 'pre-wrap'
|
||
}, codeTagProps.style);
|
||
} else {
|
||
codeTagProps.style = _objectSpread({
|
||
whiteSpace: 'pre'
|
||
}, codeTagProps.style);
|
||
}
|
||
if (!astGenerator) {
|
||
return /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement(PreTag, preProps, allLineNumbers, /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement(CodeTag, codeTagProps, code));
|
||
}
|
||
/*
|
||
* Some custom renderers rely on individual row elements so we need to turn wrapLines on
|
||
* if renderer is provided and wrapLines is undefined.
|
||
*/ if (wrapLines === undefined && renderer || wrapLongLines) wrapLines = true;
|
||
renderer = renderer || defaultRenderer;
|
||
var defaultCodeValue = [
|
||
{
|
||
type: 'text',
|
||
value: code
|
||
}
|
||
];
|
||
var codeTree = getCodeTree({
|
||
astGenerator: astGenerator,
|
||
language: language,
|
||
code: code,
|
||
defaultCodeValue: defaultCodeValue
|
||
});
|
||
if (codeTree.language === null) {
|
||
codeTree.value = defaultCodeValue;
|
||
}
|
||
// pre-determine largest line number so that we can force minWidth on all linenumber elements
|
||
var lineBreakCount = (_code$match$length = (_code$match = code.match(/\n/g)) === null || _code$match === void 0 ? void 0 : _code$match.length) !== null && _code$match$length !== void 0 ? _code$match$length : 0;
|
||
var largestLineNumber = startingLineNumber + lineBreakCount;
|
||
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
||
return /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement(PreTag, preProps, /*#__PURE__*/ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$compiled$2f$react$2f$index$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
||
rows: rows,
|
||
stylesheet: style,
|
||
useInlineStyles: useInlineStyles
|
||
})));
|
||
};
|
||
}
|
||
}),
|
||
"[project]/node_modules/highlight.js/lib/core.js [app-client] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||
|
||
function deepFreeze(obj) {
|
||
if (obj instanceof Map) {
|
||
obj.clear = obj.delete = obj.set = function() {
|
||
throw new Error('map is read-only');
|
||
};
|
||
} else if (obj instanceof Set) {
|
||
obj.add = obj.clear = obj.delete = function() {
|
||
throw new Error('set is read-only');
|
||
};
|
||
}
|
||
// Freeze self
|
||
Object.freeze(obj);
|
||
Object.getOwnPropertyNames(obj).forEach(function(name) {
|
||
var prop = obj[name];
|
||
// Freeze prop if it is an object
|
||
if (typeof prop == 'object' && !Object.isFrozen(prop)) {
|
||
deepFreeze(prop);
|
||
}
|
||
});
|
||
return obj;
|
||
}
|
||
var deepFreezeEs6 = deepFreeze;
|
||
var _default = deepFreeze;
|
||
deepFreezeEs6.default = _default;
|
||
/** @implements CallbackResponse */ class Response {
|
||
/**
|
||
* @param {CompiledMode} mode
|
||
*/ constructor(mode){
|
||
// eslint-disable-next-line no-undefined
|
||
if (mode.data === undefined) mode.data = {};
|
||
this.data = mode.data;
|
||
this.isMatchIgnored = false;
|
||
}
|
||
ignoreMatch() {
|
||
this.isMatchIgnored = true;
|
||
}
|
||
}
|
||
/**
|
||
* @param {string} value
|
||
* @returns {string}
|
||
*/ function escapeHTML(value) {
|
||
return value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
||
}
|
||
/**
|
||
* performs a shallow merge of multiple objects into one
|
||
*
|
||
* @template T
|
||
* @param {T} original
|
||
* @param {Record<string,any>[]} objects
|
||
* @returns {T} a single new object
|
||
*/ function inherit(original, ...objects) {
|
||
/** @type Record<string,any> */ const result = Object.create(null);
|
||
for(const key in original){
|
||
result[key] = original[key];
|
||
}
|
||
objects.forEach(function(obj) {
|
||
for(const key in obj){
|
||
result[key] = obj[key];
|
||
}
|
||
});
|
||
return result;
|
||
}
|
||
/**
|
||
* @typedef {object} Renderer
|
||
* @property {(text: string) => void} addText
|
||
* @property {(node: Node) => void} openNode
|
||
* @property {(node: Node) => void} closeNode
|
||
* @property {() => string} value
|
||
*/ /** @typedef {{kind?: string, sublanguage?: boolean}} Node */ /** @typedef {{walk: (r: Renderer) => void}} Tree */ /** */ const SPAN_CLOSE = '</span>';
|
||
/**
|
||
* Determines if a node needs to be wrapped in <span>
|
||
*
|
||
* @param {Node} node */ const emitsWrappingTags = (node)=>{
|
||
return !!node.kind;
|
||
};
|
||
/** @type {Renderer} */ class HTMLRenderer {
|
||
/**
|
||
* Creates a new HTMLRenderer
|
||
*
|
||
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
||
* @param {{classPrefix: string}} options
|
||
*/ constructor(parseTree, options){
|
||
this.buffer = "";
|
||
this.classPrefix = options.classPrefix;
|
||
parseTree.walk(this);
|
||
}
|
||
/**
|
||
* Adds texts to the output stream
|
||
*
|
||
* @param {string} text */ addText(text) {
|
||
this.buffer += escapeHTML(text);
|
||
}
|
||
/**
|
||
* Adds a node open to the output stream (if needed)
|
||
*
|
||
* @param {Node} node */ openNode(node) {
|
||
if (!emitsWrappingTags(node)) return;
|
||
let className = node.kind;
|
||
if (!node.sublanguage) {
|
||
className = `${this.classPrefix}${className}`;
|
||
}
|
||
this.span(className);
|
||
}
|
||
/**
|
||
* Adds a node close to the output stream (if needed)
|
||
*
|
||
* @param {Node} node */ closeNode(node) {
|
||
if (!emitsWrappingTags(node)) return;
|
||
this.buffer += SPAN_CLOSE;
|
||
}
|
||
/**
|
||
* returns the accumulated buffer
|
||
*/ value() {
|
||
return this.buffer;
|
||
}
|
||
// helpers
|
||
/**
|
||
* Builds a span element
|
||
*
|
||
* @param {string} className */ span(className) {
|
||
this.buffer += `<span class="${className}">`;
|
||
}
|
||
}
|
||
/** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} | string} Node */ /** @typedef {{kind?: string, sublanguage?: boolean, children: Node[]} } DataNode */ /** */ class TokenTree {
|
||
constructor(){
|
||
/** @type DataNode */ this.rootNode = {
|
||
children: []
|
||
};
|
||
this.stack = [
|
||
this.rootNode
|
||
];
|
||
}
|
||
get top() {
|
||
return this.stack[this.stack.length - 1];
|
||
}
|
||
get root() {
|
||
return this.rootNode;
|
||
}
|
||
/** @param {Node} node */ add(node) {
|
||
this.top.children.push(node);
|
||
}
|
||
/** @param {string} kind */ openNode(kind) {
|
||
/** @type Node */ const node = {
|
||
kind,
|
||
children: []
|
||
};
|
||
this.add(node);
|
||
this.stack.push(node);
|
||
}
|
||
closeNode() {
|
||
if (this.stack.length > 1) {
|
||
return this.stack.pop();
|
||
}
|
||
// eslint-disable-next-line no-undefined
|
||
return undefined;
|
||
}
|
||
closeAllNodes() {
|
||
while(this.closeNode());
|
||
}
|
||
toJSON() {
|
||
return JSON.stringify(this.rootNode, null, 4);
|
||
}
|
||
/**
|
||
* @typedef { import("./html_renderer").Renderer } Renderer
|
||
* @param {Renderer} builder
|
||
*/ walk(builder) {
|
||
// this does not
|
||
return this.constructor._walk(builder, this.rootNode);
|
||
// this works
|
||
// return TokenTree._walk(builder, this.rootNode);
|
||
}
|
||
/**
|
||
* @param {Renderer} builder
|
||
* @param {Node} node
|
||
*/ static _walk(builder, node) {
|
||
if (typeof node === "string") {
|
||
builder.addText(node);
|
||
} else if (node.children) {
|
||
builder.openNode(node);
|
||
node.children.forEach((child)=>this._walk(builder, child));
|
||
builder.closeNode(node);
|
||
}
|
||
return builder;
|
||
}
|
||
/**
|
||
* @param {Node} node
|
||
*/ static _collapse(node) {
|
||
if (typeof node === "string") return;
|
||
if (!node.children) return;
|
||
if (node.children.every((el)=>typeof el === "string")) {
|
||
// node.text = node.children.join("");
|
||
// delete node.children;
|
||
node.children = [
|
||
node.children.join("")
|
||
];
|
||
} else {
|
||
node.children.forEach((child)=>{
|
||
TokenTree._collapse(child);
|
||
});
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
Currently this is all private API, but this is the minimal API necessary
|
||
that an Emitter must implement to fully support the parser.
|
||
|
||
Minimal interface:
|
||
|
||
- addKeyword(text, kind)
|
||
- addText(text)
|
||
- addSublanguage(emitter, subLanguageName)
|
||
- finalize()
|
||
- openNode(kind)
|
||
- closeNode()
|
||
- closeAllNodes()
|
||
- toHTML()
|
||
|
||
*/ /**
|
||
* @implements {Emitter}
|
||
*/ class TokenTreeEmitter extends TokenTree {
|
||
/**
|
||
* @param {*} options
|
||
*/ constructor(options){
|
||
super();
|
||
this.options = options;
|
||
}
|
||
/**
|
||
* @param {string} text
|
||
* @param {string} kind
|
||
*/ addKeyword(text, kind) {
|
||
if (text === "") {
|
||
return;
|
||
}
|
||
this.openNode(kind);
|
||
this.addText(text);
|
||
this.closeNode();
|
||
}
|
||
/**
|
||
* @param {string} text
|
||
*/ addText(text) {
|
||
if (text === "") {
|
||
return;
|
||
}
|
||
this.add(text);
|
||
}
|
||
/**
|
||
* @param {Emitter & {root: DataNode}} emitter
|
||
* @param {string} name
|
||
*/ addSublanguage(emitter, name) {
|
||
/** @type DataNode */ const node = emitter.root;
|
||
node.kind = name;
|
||
node.sublanguage = true;
|
||
this.add(node);
|
||
}
|
||
toHTML() {
|
||
const renderer = new HTMLRenderer(this, this.options);
|
||
return renderer.value();
|
||
}
|
||
finalize() {
|
||
return true;
|
||
}
|
||
}
|
||
/**
|
||
* @param {string} value
|
||
* @returns {RegExp}
|
||
* */ function escape(value) {
|
||
return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm');
|
||
}
|
||
/**
|
||
* @param {RegExp | string } re
|
||
* @returns {string}
|
||
*/ function source(re) {
|
||
if (!re) return null;
|
||
if (typeof re === "string") return re;
|
||
return re.source;
|
||
}
|
||
/**
|
||
* @param {...(RegExp | string) } args
|
||
* @returns {string}
|
||
*/ function concat(...args) {
|
||
const joined = args.map((x)=>source(x)).join("");
|
||
return joined;
|
||
}
|
||
/**
|
||
* Any of the passed expresssions may match
|
||
*
|
||
* Creates a huge this | this | that | that match
|
||
* @param {(RegExp | string)[] } args
|
||
* @returns {string}
|
||
*/ function either(...args) {
|
||
const joined = '(' + args.map((x)=>source(x)).join("|") + ")";
|
||
return joined;
|
||
}
|
||
/**
|
||
* @param {RegExp} re
|
||
* @returns {number}
|
||
*/ function countMatchGroups(re) {
|
||
return new RegExp(re.toString() + '|').exec('').length - 1;
|
||
}
|
||
/**
|
||
* Does lexeme start with a regular expression match at the beginning
|
||
* @param {RegExp} re
|
||
* @param {string} lexeme
|
||
*/ function startsWith(re, lexeme) {
|
||
const match = re && re.exec(lexeme);
|
||
return match && match.index === 0;
|
||
}
|
||
// BACKREF_RE matches an open parenthesis or backreference. To avoid
|
||
// an incorrect parse, it additionally matches the following:
|
||
// - [...] elements, where the meaning of parentheses and escapes change
|
||
// - other escape sequences, so we do not misparse escape sequences as
|
||
// interesting elements
|
||
// - non-matching or lookahead parentheses, which do not capture. These
|
||
// follow the '(' with a '?'.
|
||
const BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
||
// join logically computes regexps.join(separator), but fixes the
|
||
// backreferences so they continue to match.
|
||
// it also places each individual regular expression into it's own
|
||
// match group, keeping track of the sequencing of those match groups
|
||
// is currently an exercise for the caller. :-)
|
||
/**
|
||
* @param {(string | RegExp)[]} regexps
|
||
* @param {string} separator
|
||
* @returns {string}
|
||
*/ function join(regexps, separator = "|") {
|
||
let numCaptures = 0;
|
||
return regexps.map((regex)=>{
|
||
numCaptures += 1;
|
||
const offset = numCaptures;
|
||
let re = source(regex);
|
||
let out = '';
|
||
while(re.length > 0){
|
||
const match = BACKREF_RE.exec(re);
|
||
if (!match) {
|
||
out += re;
|
||
break;
|
||
}
|
||
out += re.substring(0, match.index);
|
||
re = re.substring(match.index + match[0].length);
|
||
if (match[0][0] === '\\' && match[1]) {
|
||
// Adjust the backreference.
|
||
out += '\\' + String(Number(match[1]) + offset);
|
||
} else {
|
||
out += match[0];
|
||
if (match[0] === '(') {
|
||
numCaptures++;
|
||
}
|
||
}
|
||
}
|
||
return out;
|
||
}).map((re)=>`(${re})`).join(separator);
|
||
}
|
||
// Common regexps
|
||
const MATCH_NOTHING_RE = /\b\B/;
|
||
const IDENT_RE = '[a-zA-Z]\\w*';
|
||
const UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
|
||
const NUMBER_RE = '\\b\\d+(\\.\\d+)?';
|
||
const C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
|
||
const BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
|
||
const RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
|
||
/**
|
||
* @param { Partial<Mode> & {binary?: string | RegExp} } opts
|
||
*/ const SHEBANG = (opts = {})=>{
|
||
const beginShebang = /^#![ ]*\//;
|
||
if (opts.binary) {
|
||
opts.begin = concat(beginShebang, /.*\b/, opts.binary, /\b.*/);
|
||
}
|
||
return inherit({
|
||
className: 'meta',
|
||
begin: beginShebang,
|
||
end: /$/,
|
||
relevance: 0,
|
||
/** @type {ModeCallback} */ "on:begin": (m, resp)=>{
|
||
if (m.index !== 0) resp.ignoreMatch();
|
||
}
|
||
}, opts);
|
||
};
|
||
// Common modes
|
||
const BACKSLASH_ESCAPE = {
|
||
begin: '\\\\[\\s\\S]',
|
||
relevance: 0
|
||
};
|
||
const APOS_STRING_MODE = {
|
||
className: 'string',
|
||
begin: '\'',
|
||
end: '\'',
|
||
illegal: '\\n',
|
||
contains: [
|
||
BACKSLASH_ESCAPE
|
||
]
|
||
};
|
||
const QUOTE_STRING_MODE = {
|
||
className: 'string',
|
||
begin: '"',
|
||
end: '"',
|
||
illegal: '\\n',
|
||
contains: [
|
||
BACKSLASH_ESCAPE
|
||
]
|
||
};
|
||
const PHRASAL_WORDS_MODE = {
|
||
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
||
};
|
||
/**
|
||
* Creates a comment mode
|
||
*
|
||
* @param {string | RegExp} begin
|
||
* @param {string | RegExp} end
|
||
* @param {Mode | {}} [modeOptions]
|
||
* @returns {Partial<Mode>}
|
||
*/ const COMMENT = function(begin, end, modeOptions = {}) {
|
||
const mode = inherit({
|
||
className: 'comment',
|
||
begin,
|
||
end,
|
||
contains: []
|
||
}, modeOptions);
|
||
mode.contains.push(PHRASAL_WORDS_MODE);
|
||
mode.contains.push({
|
||
className: 'doctag',
|
||
begin: '(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):',
|
||
relevance: 0
|
||
});
|
||
return mode;
|
||
};
|
||
const C_LINE_COMMENT_MODE = COMMENT('//', '$');
|
||
const C_BLOCK_COMMENT_MODE = COMMENT('/\\*', '\\*/');
|
||
const HASH_COMMENT_MODE = COMMENT('#', '$');
|
||
const NUMBER_MODE = {
|
||
className: 'number',
|
||
begin: NUMBER_RE,
|
||
relevance: 0
|
||
};
|
||
const C_NUMBER_MODE = {
|
||
className: 'number',
|
||
begin: C_NUMBER_RE,
|
||
relevance: 0
|
||
};
|
||
const BINARY_NUMBER_MODE = {
|
||
className: 'number',
|
||
begin: BINARY_NUMBER_RE,
|
||
relevance: 0
|
||
};
|
||
const CSS_NUMBER_MODE = {
|
||
className: 'number',
|
||
begin: NUMBER_RE + '(' + '%|em|ex|ch|rem' + '|vw|vh|vmin|vmax' + '|cm|mm|in|pt|pc|px' + '|deg|grad|rad|turn' + '|s|ms' + '|Hz|kHz' + '|dpi|dpcm|dppx' + ')?',
|
||
relevance: 0
|
||
};
|
||
const REGEXP_MODE = {
|
||
// this outer rule makes sure we actually have a WHOLE regex and not simply
|
||
// an expression such as:
|
||
//
|
||
// 3 / something
|
||
//
|
||
// (which will then blow up when regex's `illegal` sees the newline)
|
||
begin: /(?=\/[^/\n]*\/)/,
|
||
contains: [
|
||
{
|
||
className: 'regexp',
|
||
begin: /\//,
|
||
end: /\/[gimuy]*/,
|
||
illegal: /\n/,
|
||
contains: [
|
||
BACKSLASH_ESCAPE,
|
||
{
|
||
begin: /\[/,
|
||
end: /\]/,
|
||
relevance: 0,
|
||
contains: [
|
||
BACKSLASH_ESCAPE
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
};
|
||
const TITLE_MODE = {
|
||
className: 'title',
|
||
begin: IDENT_RE,
|
||
relevance: 0
|
||
};
|
||
const UNDERSCORE_TITLE_MODE = {
|
||
className: 'title',
|
||
begin: UNDERSCORE_IDENT_RE,
|
||
relevance: 0
|
||
};
|
||
const METHOD_GUARD = {
|
||
// excludes method names from keyword processing
|
||
begin: '\\.\\s*' + UNDERSCORE_IDENT_RE,
|
||
relevance: 0
|
||
};
|
||
/**
|
||
* Adds end same as begin mechanics to a mode
|
||
*
|
||
* Your mode must include at least a single () match group as that first match
|
||
* group is what is used for comparison
|
||
* @param {Partial<Mode>} mode
|
||
*/ const END_SAME_AS_BEGIN = function(mode) {
|
||
return Object.assign(mode, {
|
||
/** @type {ModeCallback} */ 'on:begin': (m, resp)=>{
|
||
resp.data._beginMatch = m[1];
|
||
},
|
||
/** @type {ModeCallback} */ 'on:end': (m, resp)=>{
|
||
if (resp.data._beginMatch !== m[1]) resp.ignoreMatch();
|
||
}
|
||
});
|
||
};
|
||
var MODES = /*#__PURE__*/ Object.freeze({
|
||
__proto__: null,
|
||
MATCH_NOTHING_RE: MATCH_NOTHING_RE,
|
||
IDENT_RE: IDENT_RE,
|
||
UNDERSCORE_IDENT_RE: UNDERSCORE_IDENT_RE,
|
||
NUMBER_RE: NUMBER_RE,
|
||
C_NUMBER_RE: C_NUMBER_RE,
|
||
BINARY_NUMBER_RE: BINARY_NUMBER_RE,
|
||
RE_STARTERS_RE: RE_STARTERS_RE,
|
||
SHEBANG: SHEBANG,
|
||
BACKSLASH_ESCAPE: BACKSLASH_ESCAPE,
|
||
APOS_STRING_MODE: APOS_STRING_MODE,
|
||
QUOTE_STRING_MODE: QUOTE_STRING_MODE,
|
||
PHRASAL_WORDS_MODE: PHRASAL_WORDS_MODE,
|
||
COMMENT: COMMENT,
|
||
C_LINE_COMMENT_MODE: C_LINE_COMMENT_MODE,
|
||
C_BLOCK_COMMENT_MODE: C_BLOCK_COMMENT_MODE,
|
||
HASH_COMMENT_MODE: HASH_COMMENT_MODE,
|
||
NUMBER_MODE: NUMBER_MODE,
|
||
C_NUMBER_MODE: C_NUMBER_MODE,
|
||
BINARY_NUMBER_MODE: BINARY_NUMBER_MODE,
|
||
CSS_NUMBER_MODE: CSS_NUMBER_MODE,
|
||
REGEXP_MODE: REGEXP_MODE,
|
||
TITLE_MODE: TITLE_MODE,
|
||
UNDERSCORE_TITLE_MODE: UNDERSCORE_TITLE_MODE,
|
||
METHOD_GUARD: METHOD_GUARD,
|
||
END_SAME_AS_BEGIN: END_SAME_AS_BEGIN
|
||
});
|
||
// Grammar extensions / plugins
|
||
// See: https://github.com/highlightjs/highlight.js/issues/2833
|
||
// Grammar extensions allow "syntactic sugar" to be added to the grammar modes
|
||
// without requiring any underlying changes to the compiler internals.
|
||
// `compileMatch` being the perfect small example of now allowing a grammar
|
||
// author to write `match` when they desire to match a single expression rather
|
||
// than being forced to use `begin`. The extension then just moves `match` into
|
||
// `begin` when it runs. Ie, no features have been added, but we've just made
|
||
// the experience of writing (and reading grammars) a little bit nicer.
|
||
// ------
|
||
// TODO: We need negative look-behind support to do this properly
|
||
/**
|
||
* Skip a match if it has a preceding dot
|
||
*
|
||
* This is used for `beginKeywords` to prevent matching expressions such as
|
||
* `bob.keyword.do()`. The mode compiler automatically wires this up as a
|
||
* special _internal_ 'on:begin' callback for modes with `beginKeywords`
|
||
* @param {RegExpMatchArray} match
|
||
* @param {CallbackResponse} response
|
||
*/ function skipIfhasPrecedingDot(match, response) {
|
||
const before = match.input[match.index - 1];
|
||
if (before === ".") {
|
||
response.ignoreMatch();
|
||
}
|
||
}
|
||
/**
|
||
* `beginKeywords` syntactic sugar
|
||
* @type {CompilerExt}
|
||
*/ function beginKeywords(mode, parent) {
|
||
if (!parent) return;
|
||
if (!mode.beginKeywords) return;
|
||
// for languages with keywords that include non-word characters checking for
|
||
// a word boundary is not sufficient, so instead we check for a word boundary
|
||
// or whitespace - this does no harm in any case since our keyword engine
|
||
// doesn't allow spaces in keywords anyways and we still check for the boundary
|
||
// first
|
||
mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')(?!\\.)(?=\\b|\\s)';
|
||
mode.__beforeBegin = skipIfhasPrecedingDot;
|
||
mode.keywords = mode.keywords || mode.beginKeywords;
|
||
delete mode.beginKeywords;
|
||
// prevents double relevance, the keywords themselves provide
|
||
// relevance, the mode doesn't need to double it
|
||
// eslint-disable-next-line no-undefined
|
||
if (mode.relevance === undefined) mode.relevance = 0;
|
||
}
|
||
/**
|
||
* Allow `illegal` to contain an array of illegal values
|
||
* @type {CompilerExt}
|
||
*/ function compileIllegal(mode, _parent) {
|
||
if (!Array.isArray(mode.illegal)) return;
|
||
mode.illegal = either(...mode.illegal);
|
||
}
|
||
/**
|
||
* `match` to match a single expression for readability
|
||
* @type {CompilerExt}
|
||
*/ function compileMatch(mode, _parent) {
|
||
if (!mode.match) return;
|
||
if (mode.begin || mode.end) throw new Error("begin & end are not supported with match");
|
||
mode.begin = mode.match;
|
||
delete mode.match;
|
||
}
|
||
/**
|
||
* provides the default 1 relevance to all modes
|
||
* @type {CompilerExt}
|
||
*/ function compileRelevance(mode, _parent) {
|
||
// eslint-disable-next-line no-undefined
|
||
if (mode.relevance === undefined) mode.relevance = 1;
|
||
}
|
||
// keywords that should have no default relevance value
|
||
const COMMON_KEYWORDS = [
|
||
'of',
|
||
'and',
|
||
'for',
|
||
'in',
|
||
'not',
|
||
'or',
|
||
'if',
|
||
'then',
|
||
'parent',
|
||
'list',
|
||
'value' // common variable name
|
||
];
|
||
const DEFAULT_KEYWORD_CLASSNAME = "keyword";
|
||
/**
|
||
* Given raw keywords from a language definition, compile them.
|
||
*
|
||
* @param {string | Record<string,string|string[]> | Array<string>} rawKeywords
|
||
* @param {boolean} caseInsensitive
|
||
*/ function compileKeywords(rawKeywords, caseInsensitive, className = DEFAULT_KEYWORD_CLASSNAME) {
|
||
/** @type KeywordDict */ const compiledKeywords = {};
|
||
// input can be a string of keywords, an array of keywords, or a object with
|
||
// named keys representing className (which can then point to a string or array)
|
||
if (typeof rawKeywords === 'string') {
|
||
compileList(className, rawKeywords.split(" "));
|
||
} else if (Array.isArray(rawKeywords)) {
|
||
compileList(className, rawKeywords);
|
||
} else {
|
||
Object.keys(rawKeywords).forEach(function(className) {
|
||
// collapse all our objects back into the parent object
|
||
Object.assign(compiledKeywords, compileKeywords(rawKeywords[className], caseInsensitive, className));
|
||
});
|
||
}
|
||
return compiledKeywords;
|
||
//TURBOPACK unreachable
|
||
;
|
||
// ---
|
||
/**
|
||
* Compiles an individual list of keywords
|
||
*
|
||
* Ex: "for if when while|5"
|
||
*
|
||
* @param {string} className
|
||
* @param {Array<string>} keywordList
|
||
*/ function compileList(className, keywordList) {
|
||
if (caseInsensitive) {
|
||
keywordList = keywordList.map((x)=>x.toLowerCase());
|
||
}
|
||
keywordList.forEach(function(keyword) {
|
||
const pair = keyword.split('|');
|
||
compiledKeywords[pair[0]] = [
|
||
className,
|
||
scoreForKeyword(pair[0], pair[1])
|
||
];
|
||
});
|
||
}
|
||
}
|
||
/**
|
||
* Returns the proper score for a given keyword
|
||
*
|
||
* Also takes into account comment keywords, which will be scored 0 UNLESS
|
||
* another score has been manually assigned.
|
||
* @param {string} keyword
|
||
* @param {string} [providedScore]
|
||
*/ function scoreForKeyword(keyword, providedScore) {
|
||
// manual scores always win over common keywords
|
||
// so you can force a score of 1 if you really insist
|
||
if (providedScore) {
|
||
return Number(providedScore);
|
||
}
|
||
return commonKeyword(keyword) ? 0 : 1;
|
||
}
|
||
/**
|
||
* Determines if a given keyword is common or not
|
||
*
|
||
* @param {string} keyword */ function commonKeyword(keyword) {
|
||
return COMMON_KEYWORDS.includes(keyword.toLowerCase());
|
||
}
|
||
// compilation
|
||
/**
|
||
* Compiles a language definition result
|
||
*
|
||
* Given the raw result of a language definition (Language), compiles this so
|
||
* that it is ready for highlighting code.
|
||
* @param {Language} language
|
||
* @param {{plugins: HLJSPlugin[]}} opts
|
||
* @returns {CompiledLanguage}
|
||
*/ function compileLanguage(language, { plugins }) {
|
||
/**
|
||
* Builds a regex with the case sensativility of the current language
|
||
*
|
||
* @param {RegExp | string} value
|
||
* @param {boolean} [global]
|
||
*/ function langRe(value, global) {
|
||
return new RegExp(source(value), 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : ''));
|
||
}
|
||
/**
|
||
Stores multiple regular expressions and allows you to quickly search for
|
||
them all in a string simultaneously - returning the first match. It does
|
||
this by creating a huge (a|b|c) regex - each individual item wrapped with ()
|
||
and joined by `|` - using match groups to track position. When a match is
|
||
found checking which position in the array has content allows us to figure
|
||
out which of the original regexes / match groups triggered the match.
|
||
|
||
The match object itself (the result of `Regex.exec`) is returned but also
|
||
enhanced by merging in any meta-data that was registered with the regex.
|
||
This is how we keep track of which mode matched, and what type of rule
|
||
(`illegal`, `begin`, end, etc).
|
||
*/ class MultiRegex {
|
||
constructor(){
|
||
this.matchIndexes = {};
|
||
// @ts-ignore
|
||
this.regexes = [];
|
||
this.matchAt = 1;
|
||
this.position = 0;
|
||
}
|
||
// @ts-ignore
|
||
addRule(re, opts) {
|
||
opts.position = this.position++;
|
||
// @ts-ignore
|
||
this.matchIndexes[this.matchAt] = opts;
|
||
this.regexes.push([
|
||
opts,
|
||
re
|
||
]);
|
||
this.matchAt += countMatchGroups(re) + 1;
|
||
}
|
||
compile() {
|
||
if (this.regexes.length === 0) {
|
||
// avoids the need to check length every time exec is called
|
||
// @ts-ignore
|
||
this.exec = ()=>null;
|
||
}
|
||
const terminators = this.regexes.map((el)=>el[1]);
|
||
this.matcherRe = langRe(join(terminators), true);
|
||
this.lastIndex = 0;
|
||
}
|
||
/** @param {string} s */ exec(s) {
|
||
this.matcherRe.lastIndex = this.lastIndex;
|
||
const match = this.matcherRe.exec(s);
|
||
if (!match) {
|
||
return null;
|
||
}
|
||
// eslint-disable-next-line no-undefined
|
||
const i = match.findIndex((el, i)=>i > 0 && el !== undefined);
|
||
// @ts-ignore
|
||
const matchData = this.matchIndexes[i];
|
||
// trim off any earlier non-relevant match groups (ie, the other regex
|
||
// match groups that make up the multi-matcher)
|
||
match.splice(0, i);
|
||
return Object.assign(match, matchData);
|
||
}
|
||
}
|
||
/*
|
||
Created to solve the key deficiently with MultiRegex - there is no way to
|
||
test for multiple matches at a single location. Why would we need to do
|
||
that? In the future a more dynamic engine will allow certain matches to be
|
||
ignored. An example: if we matched say the 3rd regex in a large group but
|
||
decided to ignore it - we'd need to started testing again at the 4th
|
||
regex... but MultiRegex itself gives us no real way to do that.
|
||
|
||
So what this class creates MultiRegexs on the fly for whatever search
|
||
position they are needed.
|
||
|
||
NOTE: These additional MultiRegex objects are created dynamically. For most
|
||
grammars most of the time we will never actually need anything more than the
|
||
first MultiRegex - so this shouldn't have too much overhead.
|
||
|
||
Say this is our search group, and we match regex3, but wish to ignore it.
|
||
|
||
regex1 | regex2 | regex3 | regex4 | regex5 ' ie, startAt = 0
|
||
|
||
What we need is a new MultiRegex that only includes the remaining
|
||
possibilities:
|
||
|
||
regex4 | regex5 ' ie, startAt = 3
|
||
|
||
This class wraps all that complexity up in a simple API... `startAt` decides
|
||
where in the array of expressions to start doing the matching. It
|
||
auto-increments, so if a match is found at position 2, then startAt will be
|
||
set to 3. If the end is reached startAt will return to 0.
|
||
|
||
MOST of the time the parser will be setting startAt manually to 0.
|
||
*/ class ResumableMultiRegex {
|
||
constructor(){
|
||
// @ts-ignore
|
||
this.rules = [];
|
||
// @ts-ignore
|
||
this.multiRegexes = [];
|
||
this.count = 0;
|
||
this.lastIndex = 0;
|
||
this.regexIndex = 0;
|
||
}
|
||
// @ts-ignore
|
||
getMatcher(index) {
|
||
if (this.multiRegexes[index]) return this.multiRegexes[index];
|
||
const matcher = new MultiRegex();
|
||
this.rules.slice(index).forEach(([re, opts])=>matcher.addRule(re, opts));
|
||
matcher.compile();
|
||
this.multiRegexes[index] = matcher;
|
||
return matcher;
|
||
}
|
||
resumingScanAtSamePosition() {
|
||
return this.regexIndex !== 0;
|
||
}
|
||
considerAll() {
|
||
this.regexIndex = 0;
|
||
}
|
||
// @ts-ignore
|
||
addRule(re, opts) {
|
||
this.rules.push([
|
||
re,
|
||
opts
|
||
]);
|
||
if (opts.type === "begin") this.count++;
|
||
}
|
||
/** @param {string} s */ exec(s) {
|
||
const m = this.getMatcher(this.regexIndex);
|
||
m.lastIndex = this.lastIndex;
|
||
let result = m.exec(s);
|
||
// The following is because we have no easy way to say "resume scanning at the
|
||
// existing position but also skip the current rule ONLY". What happens is
|
||
// all prior rules are also skipped which can result in matching the wrong
|
||
// thing. Example of matching "booger":
|
||
// our matcher is [string, "booger", number]
|
||
//
|
||
// ....booger....
|
||
// if "booger" is ignored then we'd really need a regex to scan from the
|
||
// SAME position for only: [string, number] but ignoring "booger" (if it
|
||
// was the first match), a simple resume would scan ahead who knows how
|
||
// far looking only for "number", ignoring potential string matches (or
|
||
// future "booger" matches that might be valid.)
|
||
// So what we do: We execute two matchers, one resuming at the same
|
||
// position, but the second full matcher starting at the position after:
|
||
// /--- resume first regex match here (for [number])
|
||
// |/---- full match here for [string, "booger", number]
|
||
// vv
|
||
// ....booger....
|
||
// Which ever results in a match first is then used. So this 3-4 step
|
||
// process essentially allows us to say "match at this position, excluding
|
||
// a prior rule that was ignored".
|
||
//
|
||
// 1. Match "booger" first, ignore. Also proves that [string] does non match.
|
||
// 2. Resume matching for [number]
|
||
// 3. Match at index + 1 for [string, "booger", number]
|
||
// 4. If #2 and #3 result in matches, which came first?
|
||
if (this.resumingScanAtSamePosition()) {
|
||
if (result && result.index === this.lastIndex) ;
|
||
else {
|
||
const m2 = this.getMatcher(0);
|
||
m2.lastIndex = this.lastIndex + 1;
|
||
result = m2.exec(s);
|
||
}
|
||
}
|
||
if (result) {
|
||
this.regexIndex += result.position + 1;
|
||
if (this.regexIndex === this.count) {
|
||
// wrap-around to considering all matches again
|
||
this.considerAll();
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
}
|
||
/**
|
||
* Given a mode, builds a huge ResumableMultiRegex that can be used to walk
|
||
* the content and find matches.
|
||
*
|
||
* @param {CompiledMode} mode
|
||
* @returns {ResumableMultiRegex}
|
||
*/ function buildModeRegex(mode) {
|
||
const mm = new ResumableMultiRegex();
|
||
mode.contains.forEach((term)=>mm.addRule(term.begin, {
|
||
rule: term,
|
||
type: "begin"
|
||
}));
|
||
if (mode.terminatorEnd) {
|
||
mm.addRule(mode.terminatorEnd, {
|
||
type: "end"
|
||
});
|
||
}
|
||
if (mode.illegal) {
|
||
mm.addRule(mode.illegal, {
|
||
type: "illegal"
|
||
});
|
||
}
|
||
return mm;
|
||
}
|
||
/** skip vs abort vs ignore
|
||
*
|
||
* @skip - The mode is still entered and exited normally (and contains rules apply),
|
||
* but all content is held and added to the parent buffer rather than being
|
||
* output when the mode ends. Mostly used with `sublanguage` to build up
|
||
* a single large buffer than can be parsed by sublanguage.
|
||
*
|
||
* - The mode begin ands ends normally.
|
||
* - Content matched is added to the parent mode buffer.
|
||
* - The parser cursor is moved forward normally.
|
||
*
|
||
* @abort - A hack placeholder until we have ignore. Aborts the mode (as if it
|
||
* never matched) but DOES NOT continue to match subsequent `contains`
|
||
* modes. Abort is bad/suboptimal because it can result in modes
|
||
* farther down not getting applied because an earlier rule eats the
|
||
* content but then aborts.
|
||
*
|
||
* - The mode does not begin.
|
||
* - Content matched by `begin` is added to the mode buffer.
|
||
* - The parser cursor is moved forward accordingly.
|
||
*
|
||
* @ignore - Ignores the mode (as if it never matched) and continues to match any
|
||
* subsequent `contains` modes. Ignore isn't technically possible with
|
||
* the current parser implementation.
|
||
*
|
||
* - The mode does not begin.
|
||
* - Content matched by `begin` is ignored.
|
||
* - The parser cursor is not moved forward.
|
||
*/ /**
|
||
* Compiles an individual mode
|
||
*
|
||
* This can raise an error if the mode contains certain detectable known logic
|
||
* issues.
|
||
* @param {Mode} mode
|
||
* @param {CompiledMode | null} [parent]
|
||
* @returns {CompiledMode | never}
|
||
*/ function compileMode(mode, parent) {
|
||
const cmode = mode;
|
||
if (mode.isCompiled) return cmode;
|
||
[
|
||
// do this early so compiler extensions generally don't have to worry about
|
||
// the distinction between match/begin
|
||
compileMatch
|
||
].forEach((ext)=>ext(mode, parent));
|
||
language.compilerExtensions.forEach((ext)=>ext(mode, parent));
|
||
// __beforeBegin is considered private API, internal use only
|
||
mode.__beforeBegin = null;
|
||
[
|
||
beginKeywords,
|
||
// do this later so compiler extensions that come earlier have access to the
|
||
// raw array if they wanted to perhaps manipulate it, etc.
|
||
compileIllegal,
|
||
// default to 1 relevance if not specified
|
||
compileRelevance
|
||
].forEach((ext)=>ext(mode, parent));
|
||
mode.isCompiled = true;
|
||
let keywordPattern = null;
|
||
if (typeof mode.keywords === "object") {
|
||
keywordPattern = mode.keywords.$pattern;
|
||
delete mode.keywords.$pattern;
|
||
}
|
||
if (mode.keywords) {
|
||
mode.keywords = compileKeywords(mode.keywords, language.case_insensitive);
|
||
}
|
||
// both are not allowed
|
||
if (mode.lexemes && keywordPattern) {
|
||
throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");
|
||
}
|
||
// `mode.lexemes` was the old standard before we added and now recommend
|
||
// using `keywords.$pattern` to pass the keyword pattern
|
||
keywordPattern = keywordPattern || mode.lexemes || /\w+/;
|
||
cmode.keywordPatternRe = langRe(keywordPattern, true);
|
||
if (parent) {
|
||
if (!mode.begin) mode.begin = /\B|\b/;
|
||
cmode.beginRe = langRe(mode.begin);
|
||
if (mode.endSameAsBegin) mode.end = mode.begin;
|
||
if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/;
|
||
if (mode.end) cmode.endRe = langRe(mode.end);
|
||
cmode.terminatorEnd = source(mode.end) || '';
|
||
if (mode.endsWithParent && parent.terminatorEnd) {
|
||
cmode.terminatorEnd += (mode.end ? '|' : '') + parent.terminatorEnd;
|
||
}
|
||
}
|
||
if (mode.illegal) cmode.illegalRe = langRe(mode.illegal);
|
||
if (!mode.contains) mode.contains = [];
|
||
mode.contains = [].concat(...mode.contains.map(function(c) {
|
||
return expandOrCloneMode(c === 'self' ? mode : c);
|
||
}));
|
||
mode.contains.forEach(function(c) {
|
||
compileMode(c, cmode);
|
||
});
|
||
if (mode.starts) {
|
||
compileMode(mode.starts, parent);
|
||
}
|
||
cmode.matcher = buildModeRegex(cmode);
|
||
return cmode;
|
||
}
|
||
if (!language.compilerExtensions) language.compilerExtensions = [];
|
||
// self is not valid at the top-level
|
||
if (language.contains && language.contains.includes('self')) {
|
||
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
||
}
|
||
// we need a null object, which inherit will guarantee
|
||
language.classNameAliases = inherit(language.classNameAliases || {});
|
||
return compileMode(language);
|
||
}
|
||
/**
|
||
* Determines if a mode has a dependency on it's parent or not
|
||
*
|
||
* If a mode does have a parent dependency then often we need to clone it if
|
||
* it's used in multiple places so that each copy points to the correct parent,
|
||
* where-as modes without a parent can often safely be re-used at the bottom of
|
||
* a mode chain.
|
||
*
|
||
* @param {Mode | null} mode
|
||
* @returns {boolean} - is there a dependency on the parent?
|
||
* */ function dependencyOnParent(mode) {
|
||
if (!mode) return false;
|
||
return mode.endsWithParent || dependencyOnParent(mode.starts);
|
||
}
|
||
/**
|
||
* Expands a mode or clones it if necessary
|
||
*
|
||
* This is necessary for modes with parental dependenceis (see notes on
|
||
* `dependencyOnParent`) and for nodes that have `variants` - which must then be
|
||
* exploded into their own individual modes at compile time.
|
||
*
|
||
* @param {Mode} mode
|
||
* @returns {Mode | Mode[]}
|
||
* */ function expandOrCloneMode(mode) {
|
||
if (mode.variants && !mode.cachedVariants) {
|
||
mode.cachedVariants = mode.variants.map(function(variant) {
|
||
return inherit(mode, {
|
||
variants: null
|
||
}, variant);
|
||
});
|
||
}
|
||
// EXPAND
|
||
// if we have variants then essentially "replace" the mode with the variants
|
||
// this happens in compileMode, where this function is called from
|
||
if (mode.cachedVariants) {
|
||
return mode.cachedVariants;
|
||
}
|
||
// CLONE
|
||
// if we have dependencies on parents then we need a unique
|
||
// instance of ourselves, so we can be reused with many
|
||
// different parents without issue
|
||
if (dependencyOnParent(mode)) {
|
||
return inherit(mode, {
|
||
starts: mode.starts ? inherit(mode.starts) : null
|
||
});
|
||
}
|
||
if (Object.isFrozen(mode)) {
|
||
return inherit(mode);
|
||
}
|
||
// no special dependency issues, just return ourselves
|
||
return mode;
|
||
}
|
||
var version = "10.7.3";
|
||
// @ts-nocheck
|
||
function hasValueOrEmptyAttribute(value) {
|
||
return Boolean(value || value === "");
|
||
}
|
||
function BuildVuePlugin(hljs) {
|
||
const Component = {
|
||
props: [
|
||
"language",
|
||
"code",
|
||
"autodetect"
|
||
],
|
||
data: function() {
|
||
return {
|
||
detectedLanguage: "",
|
||
unknownLanguage: false
|
||
};
|
||
},
|
||
computed: {
|
||
className () {
|
||
if (this.unknownLanguage) return "";
|
||
return "hljs " + this.detectedLanguage;
|
||
},
|
||
highlighted () {
|
||
// no idea what language to use, return raw code
|
||
if (!this.autoDetect && !hljs.getLanguage(this.language)) {
|
||
console.warn(`The language "${this.language}" you specified could not be found.`);
|
||
this.unknownLanguage = true;
|
||
return escapeHTML(this.code);
|
||
}
|
||
let result = {};
|
||
if (this.autoDetect) {
|
||
result = hljs.highlightAuto(this.code);
|
||
this.detectedLanguage = result.language;
|
||
} else {
|
||
result = hljs.highlight(this.language, this.code, this.ignoreIllegals);
|
||
this.detectedLanguage = this.language;
|
||
}
|
||
return result.value;
|
||
},
|
||
autoDetect () {
|
||
return !this.language || hasValueOrEmptyAttribute(this.autodetect);
|
||
},
|
||
ignoreIllegals () {
|
||
return true;
|
||
}
|
||
},
|
||
// this avoids needing to use a whole Vue compilation pipeline just
|
||
// to build Highlight.js
|
||
render (createElement) {
|
||
return createElement("pre", {}, [
|
||
createElement("code", {
|
||
class: this.className,
|
||
domProps: {
|
||
innerHTML: this.highlighted
|
||
}
|
||
})
|
||
]);
|
||
}
|
||
};
|
||
const VuePlugin = {
|
||
install (Vue) {
|
||
Vue.component('highlightjs', Component);
|
||
}
|
||
};
|
||
return {
|
||
Component,
|
||
VuePlugin
|
||
};
|
||
}
|
||
/* plugin itself */ /** @type {HLJSPlugin} */ const mergeHTMLPlugin = {
|
||
"after:highlightElement": ({ el, result, text })=>{
|
||
const originalStream = nodeStream(el);
|
||
if (!originalStream.length) return;
|
||
const resultNode = document.createElement('div');
|
||
resultNode.innerHTML = result.value;
|
||
result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
|
||
}
|
||
};
|
||
/* Stream merging support functions */ /**
|
||
* @typedef Event
|
||
* @property {'start'|'stop'} event
|
||
* @property {number} offset
|
||
* @property {Node} node
|
||
*/ /**
|
||
* @param {Node} node
|
||
*/ function tag(node) {
|
||
return node.nodeName.toLowerCase();
|
||
}
|
||
/**
|
||
* @param {Node} node
|
||
*/ function nodeStream(node) {
|
||
/** @type Event[] */ const result = [];
|
||
(function _nodeStream(node, offset) {
|
||
for(let child = node.firstChild; child; child = child.nextSibling){
|
||
if (child.nodeType === 3) {
|
||
offset += child.nodeValue.length;
|
||
} else if (child.nodeType === 1) {
|
||
result.push({
|
||
event: 'start',
|
||
offset: offset,
|
||
node: child
|
||
});
|
||
offset = _nodeStream(child, offset);
|
||
// Prevent void elements from having an end tag that would actually
|
||
// double them in the output. There are more void elements in HTML
|
||
// but we list only those realistically expected in code display.
|
||
if (!tag(child).match(/br|hr|img|input/)) {
|
||
result.push({
|
||
event: 'stop',
|
||
offset: offset,
|
||
node: child
|
||
});
|
||
}
|
||
}
|
||
}
|
||
return offset;
|
||
})(node, 0);
|
||
return result;
|
||
}
|
||
/**
|
||
* @param {any} original - the original stream
|
||
* @param {any} highlighted - stream of the highlighted source
|
||
* @param {string} value - the original source itself
|
||
*/ function mergeStreams(original, highlighted, value) {
|
||
let processed = 0;
|
||
let result = '';
|
||
const nodeStack = [];
|
||
function selectStream() {
|
||
if (!original.length || !highlighted.length) {
|
||
return original.length ? original : highlighted;
|
||
}
|
||
if (original[0].offset !== highlighted[0].offset) {
|
||
return original[0].offset < highlighted[0].offset ? original : highlighted;
|
||
}
|
||
/*
|
||
To avoid starting the stream just before it should stop the order is
|
||
ensured that original always starts first and closes last:
|
||
|
||
if (event1 == 'start' && event2 == 'start')
|
||
return original;
|
||
if (event1 == 'start' && event2 == 'stop')
|
||
return highlighted;
|
||
if (event1 == 'stop' && event2 == 'start')
|
||
return original;
|
||
if (event1 == 'stop' && event2 == 'stop')
|
||
return highlighted;
|
||
|
||
... which is collapsed to:
|
||
*/ return highlighted[0].event === 'start' ? original : highlighted;
|
||
}
|
||
/**
|
||
* @param {Node} node
|
||
*/ function open(node) {
|
||
/** @param {Attr} attr */ function attributeString(attr) {
|
||
return ' ' + attr.nodeName + '="' + escapeHTML(attr.value) + '"';
|
||
}
|
||
// @ts-ignore
|
||
result += '<' + tag(node) + [].map.call(node.attributes, attributeString).join('') + '>';
|
||
}
|
||
/**
|
||
* @param {Node} node
|
||
*/ function close(node) {
|
||
result += '</' + tag(node) + '>';
|
||
}
|
||
/**
|
||
* @param {Event} event
|
||
*/ function render(event) {
|
||
(event.event === 'start' ? open : close)(event.node);
|
||
}
|
||
while(original.length || highlighted.length){
|
||
let stream = selectStream();
|
||
result += escapeHTML(value.substring(processed, stream[0].offset));
|
||
processed = stream[0].offset;
|
||
if (stream === original) {
|
||
/*
|
||
On any opening or closing tag of the original markup we first close
|
||
the entire highlighted node stack, then render the original tag along
|
||
with all the following original tags at the same offset and then
|
||
reopen all the tags on the highlighted stack.
|
||
*/ nodeStack.reverse().forEach(close);
|
||
do {
|
||
render(stream.splice(0, 1)[0]);
|
||
stream = selectStream();
|
||
}while (stream === original && stream.length && stream[0].offset === processed)
|
||
nodeStack.reverse().forEach(open);
|
||
} else {
|
||
if (stream[0].event === 'start') {
|
||
nodeStack.push(stream[0].node);
|
||
} else {
|
||
nodeStack.pop();
|
||
}
|
||
render(stream.splice(0, 1)[0]);
|
||
}
|
||
}
|
||
return result + escapeHTML(value.substr(processed));
|
||
}
|
||
/*
|
||
|
||
For the reasoning behind this please see:
|
||
https://github.com/highlightjs/highlight.js/issues/2880#issuecomment-747275419
|
||
|
||
*/ /**
|
||
* @type {Record<string, boolean>}
|
||
*/ const seenDeprecations = {};
|
||
/**
|
||
* @param {string} message
|
||
*/ const error = (message)=>{
|
||
console.error(message);
|
||
};
|
||
/**
|
||
* @param {string} message
|
||
* @param {any} args
|
||
*/ const warn = (message, ...args)=>{
|
||
console.log(`WARN: ${message}`, ...args);
|
||
};
|
||
/**
|
||
* @param {string} version
|
||
* @param {string} message
|
||
*/ const deprecated = (version, message)=>{
|
||
if (seenDeprecations[`${version}/${message}`]) return;
|
||
console.log(`Deprecated as of ${version}. ${message}`);
|
||
seenDeprecations[`${version}/${message}`] = true;
|
||
};
|
||
/*
|
||
Syntax highlighting with language autodetection.
|
||
https://highlightjs.org/
|
||
*/ const escape$1 = escapeHTML;
|
||
const inherit$1 = inherit;
|
||
const NO_MATCH = Symbol("nomatch");
|
||
/**
|
||
* @param {any} hljs - object that is extended (legacy)
|
||
* @returns {HLJSApi}
|
||
*/ const HLJS = function(hljs) {
|
||
// Global internal variables used within the highlight.js library.
|
||
/** @type {Record<string, Language>} */ const languages = Object.create(null);
|
||
/** @type {Record<string, string>} */ const aliases = Object.create(null);
|
||
/** @type {HLJSPlugin[]} */ const plugins = [];
|
||
// safe/production mode - swallows more errors, tries to keep running
|
||
// even if a single syntax or parse hits a fatal error
|
||
let SAFE_MODE = true;
|
||
const fixMarkupRe = /(^(<[^>]+>|\t|)+|\n)/gm;
|
||
const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?";
|
||
/** @type {Language} */ const PLAINTEXT_LANGUAGE = {
|
||
disableAutodetect: true,
|
||
name: 'Plain text',
|
||
contains: []
|
||
};
|
||
// Global options used when within external APIs. This is modified when
|
||
// calling the `hljs.configure` function.
|
||
/** @type HLJSOptions */ let options = {
|
||
noHighlightRe: /^(no-?highlight)$/i,
|
||
languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
|
||
classPrefix: 'hljs-',
|
||
tabReplace: null,
|
||
useBR: false,
|
||
languages: null,
|
||
// beta configuration options, subject to change, welcome to discuss
|
||
// https://github.com/highlightjs/highlight.js/issues/1086
|
||
__emitter: TokenTreeEmitter
|
||
};
|
||
/* Utility functions */ /**
|
||
* Tests a language name to see if highlighting should be skipped
|
||
* @param {string} languageName
|
||
*/ function shouldNotHighlight(languageName) {
|
||
return options.noHighlightRe.test(languageName);
|
||
}
|
||
/**
|
||
* @param {HighlightedHTMLElement} block - the HTML element to determine language for
|
||
*/ function blockLanguage(block) {
|
||
let classes = block.className + ' ';
|
||
classes += block.parentNode ? block.parentNode.className : '';
|
||
// language-* takes precedence over non-prefixed class names.
|
||
const match = options.languageDetectRe.exec(classes);
|
||
if (match) {
|
||
const language = getLanguage(match[1]);
|
||
if (!language) {
|
||
warn(LANGUAGE_NOT_FOUND.replace("{}", match[1]));
|
||
warn("Falling back to no-highlight mode for this block.", block);
|
||
}
|
||
return language ? match[1] : 'no-highlight';
|
||
}
|
||
return classes.split(/\s+/).find((_class)=>shouldNotHighlight(_class) || getLanguage(_class));
|
||
}
|
||
/**
|
||
* Core highlighting function.
|
||
*
|
||
* OLD API
|
||
* highlight(lang, code, ignoreIllegals, continuation)
|
||
*
|
||
* NEW API
|
||
* highlight(code, {lang, ignoreIllegals})
|
||
*
|
||
* @param {string} codeOrlanguageName - the language to use for highlighting
|
||
* @param {string | HighlightOptions} optionsOrCode - the code to highlight
|
||
* @param {boolean} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
|
||
* @param {CompiledMode} [continuation] - current continuation mode, if any
|
||
*
|
||
* @returns {HighlightResult} Result - an object that represents the result
|
||
* @property {string} language - the language name
|
||
* @property {number} relevance - the relevance score
|
||
* @property {string} value - the highlighted HTML code
|
||
* @property {string} code - the original raw code
|
||
* @property {CompiledMode} top - top of the current mode stack
|
||
* @property {boolean} illegal - indicates whether any illegal matches were found
|
||
*/ function highlight(codeOrlanguageName, optionsOrCode, ignoreIllegals, continuation) {
|
||
let code = "";
|
||
let languageName = "";
|
||
if (typeof optionsOrCode === "object") {
|
||
code = codeOrlanguageName;
|
||
ignoreIllegals = optionsOrCode.ignoreIllegals;
|
||
languageName = optionsOrCode.language;
|
||
// continuation not supported at all via the new API
|
||
// eslint-disable-next-line no-undefined
|
||
continuation = undefined;
|
||
} else {
|
||
// old API
|
||
deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated.");
|
||
deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277");
|
||
languageName = codeOrlanguageName;
|
||
code = optionsOrCode;
|
||
}
|
||
/** @type {BeforeHighlightContext} */ const context = {
|
||
code,
|
||
language: languageName
|
||
};
|
||
// the plugin can change the desired language or the code to be highlighted
|
||
// just be changing the object it was passed
|
||
fire("before:highlight", context);
|
||
// a before plugin can usurp the result completely by providing it's own
|
||
// in which case we don't even need to call highlight
|
||
const result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals, continuation);
|
||
result.code = context.code;
|
||
// the plugin can change anything in result to suite it
|
||
fire("after:highlight", result);
|
||
return result;
|
||
}
|
||
/**
|
||
* private highlight that's used internally and does not fire callbacks
|
||
*
|
||
* @param {string} languageName - the language to use for highlighting
|
||
* @param {string} codeToHighlight - the code to highlight
|
||
* @param {boolean?} [ignoreIllegals] - whether to ignore illegal matches, default is to bail
|
||
* @param {CompiledMode?} [continuation] - current continuation mode, if any
|
||
* @returns {HighlightResult} - result of the highlight operation
|
||
*/ function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) {
|
||
/**
|
||
* Return keyword data if a match is a keyword
|
||
* @param {CompiledMode} mode - current mode
|
||
* @param {RegExpMatchArray} match - regexp match data
|
||
* @returns {KeywordData | false}
|
||
*/ function keywordData(mode, match) {
|
||
const matchText = language.case_insensitive ? match[0].toLowerCase() : match[0];
|
||
return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText];
|
||
}
|
||
function processKeywords() {
|
||
if (!top.keywords) {
|
||
emitter.addText(modeBuffer);
|
||
return;
|
||
}
|
||
let lastIndex = 0;
|
||
top.keywordPatternRe.lastIndex = 0;
|
||
let match = top.keywordPatternRe.exec(modeBuffer);
|
||
let buf = "";
|
||
while(match){
|
||
buf += modeBuffer.substring(lastIndex, match.index);
|
||
const data = keywordData(top, match);
|
||
if (data) {
|
||
const [kind, keywordRelevance] = data;
|
||
emitter.addText(buf);
|
||
buf = "";
|
||
relevance += keywordRelevance;
|
||
if (kind.startsWith("_")) {
|
||
// _ implied for relevance only, do not highlight
|
||
// by applying a class name
|
||
buf += match[0];
|
||
} else {
|
||
const cssClass = language.classNameAliases[kind] || kind;
|
||
emitter.addKeyword(match[0], cssClass);
|
||
}
|
||
} else {
|
||
buf += match[0];
|
||
}
|
||
lastIndex = top.keywordPatternRe.lastIndex;
|
||
match = top.keywordPatternRe.exec(modeBuffer);
|
||
}
|
||
buf += modeBuffer.substr(lastIndex);
|
||
emitter.addText(buf);
|
||
}
|
||
function processSubLanguage() {
|
||
if (modeBuffer === "") return;
|
||
/** @type HighlightResult */ let result = null;
|
||
if (typeof top.subLanguage === 'string') {
|
||
if (!languages[top.subLanguage]) {
|
||
emitter.addText(modeBuffer);
|
||
return;
|
||
}
|
||
result = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]);
|
||
continuations[top.subLanguage] = result.top;
|
||
} else {
|
||
result = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null);
|
||
}
|
||
// Counting embedded language score towards the host language may be disabled
|
||
// with zeroing the containing mode relevance. Use case in point is Markdown that
|
||
// allows XML everywhere and makes every XML snippet to have a much larger Markdown
|
||
// score.
|
||
if (top.relevance > 0) {
|
||
relevance += result.relevance;
|
||
}
|
||
emitter.addSublanguage(result.emitter, result.language);
|
||
}
|
||
function processBuffer() {
|
||
if (top.subLanguage != null) {
|
||
processSubLanguage();
|
||
} else {
|
||
processKeywords();
|
||
}
|
||
modeBuffer = '';
|
||
}
|
||
/**
|
||
* @param {Mode} mode - new mode to start
|
||
*/ function startNewMode(mode) {
|
||
if (mode.className) {
|
||
emitter.openNode(language.classNameAliases[mode.className] || mode.className);
|
||
}
|
||
top = Object.create(mode, {
|
||
parent: {
|
||
value: top
|
||
}
|
||
});
|
||
return top;
|
||
}
|
||
/**
|
||
* @param {CompiledMode } mode - the mode to potentially end
|
||
* @param {RegExpMatchArray} match - the latest match
|
||
* @param {string} matchPlusRemainder - match plus remainder of content
|
||
* @returns {CompiledMode | void} - the next mode, or if void continue on in current mode
|
||
*/ function endOfMode(mode, match, matchPlusRemainder) {
|
||
let matched = startsWith(mode.endRe, matchPlusRemainder);
|
||
if (matched) {
|
||
if (mode["on:end"]) {
|
||
const resp = new Response(mode);
|
||
mode["on:end"](match, resp);
|
||
if (resp.isMatchIgnored) matched = false;
|
||
}
|
||
if (matched) {
|
||
while(mode.endsParent && mode.parent){
|
||
mode = mode.parent;
|
||
}
|
||
return mode;
|
||
}
|
||
}
|
||
// even if on:end fires an `ignore` it's still possible
|
||
// that we might trigger the end node because of a parent mode
|
||
if (mode.endsWithParent) {
|
||
return endOfMode(mode.parent, match, matchPlusRemainder);
|
||
}
|
||
}
|
||
/**
|
||
* Handle matching but then ignoring a sequence of text
|
||
*
|
||
* @param {string} lexeme - string containing full match text
|
||
*/ function doIgnore(lexeme) {
|
||
if (top.matcher.regexIndex === 0) {
|
||
// no more regexs to potentially match here, so we move the cursor forward one
|
||
// space
|
||
modeBuffer += lexeme[0];
|
||
return 1;
|
||
} else {
|
||
// no need to move the cursor, we still have additional regexes to try and
|
||
// match at this very spot
|
||
resumeScanAtSamePosition = true;
|
||
return 0;
|
||
}
|
||
}
|
||
/**
|
||
* Handle the start of a new potential mode match
|
||
*
|
||
* @param {EnhancedMatch} match - the current match
|
||
* @returns {number} how far to advance the parse cursor
|
||
*/ function doBeginMatch(match) {
|
||
const lexeme = match[0];
|
||
const newMode = match.rule;
|
||
const resp = new Response(newMode);
|
||
// first internal before callbacks, then the public ones
|
||
const beforeCallbacks = [
|
||
newMode.__beforeBegin,
|
||
newMode["on:begin"]
|
||
];
|
||
for (const cb of beforeCallbacks){
|
||
if (!cb) continue;
|
||
cb(match, resp);
|
||
if (resp.isMatchIgnored) return doIgnore(lexeme);
|
||
}
|
||
if (newMode && newMode.endSameAsBegin) {
|
||
newMode.endRe = escape(lexeme);
|
||
}
|
||
if (newMode.skip) {
|
||
modeBuffer += lexeme;
|
||
} else {
|
||
if (newMode.excludeBegin) {
|
||
modeBuffer += lexeme;
|
||
}
|
||
processBuffer();
|
||
if (!newMode.returnBegin && !newMode.excludeBegin) {
|
||
modeBuffer = lexeme;
|
||
}
|
||
}
|
||
startNewMode(newMode);
|
||
// if (mode["after:begin"]) {
|
||
// let resp = new Response(mode);
|
||
// mode["after:begin"](match, resp);
|
||
// }
|
||
return newMode.returnBegin ? 0 : lexeme.length;
|
||
}
|
||
/**
|
||
* Handle the potential end of mode
|
||
*
|
||
* @param {RegExpMatchArray} match - the current match
|
||
*/ function doEndMatch(match) {
|
||
const lexeme = match[0];
|
||
const matchPlusRemainder = codeToHighlight.substr(match.index);
|
||
const endMode = endOfMode(top, match, matchPlusRemainder);
|
||
if (!endMode) {
|
||
return NO_MATCH;
|
||
}
|
||
const origin = top;
|
||
if (origin.skip) {
|
||
modeBuffer += lexeme;
|
||
} else {
|
||
if (!(origin.returnEnd || origin.excludeEnd)) {
|
||
modeBuffer += lexeme;
|
||
}
|
||
processBuffer();
|
||
if (origin.excludeEnd) {
|
||
modeBuffer = lexeme;
|
||
}
|
||
}
|
||
do {
|
||
if (top.className) {
|
||
emitter.closeNode();
|
||
}
|
||
if (!top.skip && !top.subLanguage) {
|
||
relevance += top.relevance;
|
||
}
|
||
top = top.parent;
|
||
}while (top !== endMode.parent)
|
||
if (endMode.starts) {
|
||
if (endMode.endSameAsBegin) {
|
||
endMode.starts.endRe = endMode.endRe;
|
||
}
|
||
startNewMode(endMode.starts);
|
||
}
|
||
return origin.returnEnd ? 0 : lexeme.length;
|
||
}
|
||
function processContinuations() {
|
||
const list = [];
|
||
for(let current = top; current !== language; current = current.parent){
|
||
if (current.className) {
|
||
list.unshift(current.className);
|
||
}
|
||
}
|
||
list.forEach((item)=>emitter.openNode(item));
|
||
}
|
||
/** @type {{type?: MatchType, index?: number, rule?: Mode}}} */ let lastMatch = {};
|
||
/**
|
||
* Process an individual match
|
||
*
|
||
* @param {string} textBeforeMatch - text preceeding the match (since the last match)
|
||
* @param {EnhancedMatch} [match] - the match itself
|
||
*/ function processLexeme(textBeforeMatch, match) {
|
||
const lexeme = match && match[0];
|
||
// add non-matched text to the current mode buffer
|
||
modeBuffer += textBeforeMatch;
|
||
if (lexeme == null) {
|
||
processBuffer();
|
||
return 0;
|
||
}
|
||
// we've found a 0 width match and we're stuck, so we need to advance
|
||
// this happens when we have badly behaved rules that have optional matchers to the degree that
|
||
// sometimes they can end up matching nothing at all
|
||
// Ref: https://github.com/highlightjs/highlight.js/issues/2140
|
||
if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") {
|
||
// spit the "skipped" character that our regex choked on back into the output sequence
|
||
modeBuffer += codeToHighlight.slice(match.index, match.index + 1);
|
||
if (!SAFE_MODE) {
|
||
/** @type {AnnotatedError} */ const err = new Error('0 width match regex');
|
||
err.languageName = languageName;
|
||
err.badRule = lastMatch.rule;
|
||
throw err;
|
||
}
|
||
return 1;
|
||
}
|
||
lastMatch = match;
|
||
if (match.type === "begin") {
|
||
return doBeginMatch(match);
|
||
} else if (match.type === "illegal" && !ignoreIllegals) {
|
||
// illegal match, we do not continue processing
|
||
/** @type {AnnotatedError} */ const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"');
|
||
err.mode = top;
|
||
throw err;
|
||
} else if (match.type === "end") {
|
||
const processed = doEndMatch(match);
|
||
if (processed !== NO_MATCH) {
|
||
return processed;
|
||
}
|
||
}
|
||
// edge case for when illegal matches $ (end of line) which is technically
|
||
// a 0 width match but not a begin/end match so it's not caught by the
|
||
// first handler (when ignoreIllegals is true)
|
||
if (match.type === "illegal" && lexeme === "") {
|
||
// advance so we aren't stuck in an infinite loop
|
||
return 1;
|
||
}
|
||
// infinite loops are BAD, this is a last ditch catch all. if we have a
|
||
// decent number of iterations yet our index (cursor position in our
|
||
// parsing) still 3x behind our index then something is very wrong
|
||
// so we bail
|
||
if (iterations > 100000 && iterations > match.index * 3) {
|
||
const err = new Error('potential infinite loop, way more iterations than matches');
|
||
throw err;
|
||
}
|
||
/*
|
||
Why might be find ourselves here? Only one occasion now. An end match that was
|
||
triggered but could not be completed. When might this happen? When an `endSameasBegin`
|
||
rule sets the end rule to a specific match. Since the overall mode termination rule that's
|
||
being used to scan the text isn't recompiled that means that any match that LOOKS like
|
||
the end (but is not, because it is not an exact match to the beginning) will
|
||
end up here. A definite end match, but when `doEndMatch` tries to "reapply"
|
||
the end rule and fails to match, we wind up here, and just silently ignore the end.
|
||
|
||
This causes no real harm other than stopping a few times too many.
|
||
*/ modeBuffer += lexeme;
|
||
return lexeme.length;
|
||
}
|
||
const language = getLanguage(languageName);
|
||
if (!language) {
|
||
error(LANGUAGE_NOT_FOUND.replace("{}", languageName));
|
||
throw new Error('Unknown language: "' + languageName + '"');
|
||
}
|
||
const md = compileLanguage(language, {
|
||
plugins
|
||
});
|
||
let result = '';
|
||
/** @type {CompiledMode} */ let top = continuation || md;
|
||
/** @type Record<string,CompiledMode> */ const continuations = {}; // keep continuations for sub-languages
|
||
const emitter = new options.__emitter(options);
|
||
processContinuations();
|
||
let modeBuffer = '';
|
||
let relevance = 0;
|
||
let index = 0;
|
||
let iterations = 0;
|
||
let resumeScanAtSamePosition = false;
|
||
try {
|
||
top.matcher.considerAll();
|
||
for(;;){
|
||
iterations++;
|
||
if (resumeScanAtSamePosition) {
|
||
// only regexes not matched previously will now be
|
||
// considered for a potential match
|
||
resumeScanAtSamePosition = false;
|
||
} else {
|
||
top.matcher.considerAll();
|
||
}
|
||
top.matcher.lastIndex = index;
|
||
const match = top.matcher.exec(codeToHighlight);
|
||
// console.log("match", match[0], match.rule && match.rule.begin)
|
||
if (!match) break;
|
||
const beforeMatch = codeToHighlight.substring(index, match.index);
|
||
const processedCount = processLexeme(beforeMatch, match);
|
||
index = match.index + processedCount;
|
||
}
|
||
processLexeme(codeToHighlight.substr(index));
|
||
emitter.closeAllNodes();
|
||
emitter.finalize();
|
||
result = emitter.toHTML();
|
||
return {
|
||
// avoid possible breakage with v10 clients expecting
|
||
// this to always be an integer
|
||
relevance: Math.floor(relevance),
|
||
value: result,
|
||
language: languageName,
|
||
illegal: false,
|
||
emitter: emitter,
|
||
top: top
|
||
};
|
||
} catch (err) {
|
||
if (err.message && err.message.includes('Illegal')) {
|
||
return {
|
||
illegal: true,
|
||
illegalBy: {
|
||
msg: err.message,
|
||
context: codeToHighlight.slice(index - 100, index + 100),
|
||
mode: err.mode
|
||
},
|
||
sofar: result,
|
||
relevance: 0,
|
||
value: escape$1(codeToHighlight),
|
||
emitter: emitter
|
||
};
|
||
} else if (SAFE_MODE) {
|
||
return {
|
||
illegal: false,
|
||
relevance: 0,
|
||
value: escape$1(codeToHighlight),
|
||
emitter: emitter,
|
||
language: languageName,
|
||
top: top,
|
||
errorRaised: err
|
||
};
|
||
} else {
|
||
throw err;
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* returns a valid highlight result, without actually doing any actual work,
|
||
* auto highlight starts with this and it's possible for small snippets that
|
||
* auto-detection may not find a better match
|
||
* @param {string} code
|
||
* @returns {HighlightResult}
|
||
*/ function justTextHighlightResult(code) {
|
||
const result = {
|
||
relevance: 0,
|
||
emitter: new options.__emitter(options),
|
||
value: escape$1(code),
|
||
illegal: false,
|
||
top: PLAINTEXT_LANGUAGE
|
||
};
|
||
result.emitter.addText(code);
|
||
return result;
|
||
}
|
||
/**
|
||
Highlighting with language detection. Accepts a string with the code to
|
||
highlight. Returns an object with the following properties:
|
||
|
||
- language (detected language)
|
||
- relevance (int)
|
||
- value (an HTML string with highlighting markup)
|
||
- second_best (object with the same structure for second-best heuristically
|
||
detected language, may be absent)
|
||
|
||
@param {string} code
|
||
@param {Array<string>} [languageSubset]
|
||
@returns {AutoHighlightResult}
|
||
*/ function highlightAuto(code, languageSubset) {
|
||
languageSubset = languageSubset || options.languages || Object.keys(languages);
|
||
const plaintext = justTextHighlightResult(code);
|
||
const results = languageSubset.filter(getLanguage).filter(autoDetection).map((name)=>_highlight(name, code, false));
|
||
results.unshift(plaintext); // plaintext is always an option
|
||
const sorted = results.sort((a, b)=>{
|
||
// sort base on relevance
|
||
if (a.relevance !== b.relevance) return b.relevance - a.relevance;
|
||
// always award the tie to the base language
|
||
// ie if C++ and Arduino are tied, it's more likely to be C++
|
||
if (a.language && b.language) {
|
||
if (getLanguage(a.language).supersetOf === b.language) {
|
||
return 1;
|
||
} else if (getLanguage(b.language).supersetOf === a.language) {
|
||
return -1;
|
||
}
|
||
}
|
||
// otherwise say they are equal, which has the effect of sorting on
|
||
// relevance while preserving the original ordering - which is how ties
|
||
// have historically been settled, ie the language that comes first always
|
||
// wins in the case of a tie
|
||
return 0;
|
||
});
|
||
const [best, secondBest] = sorted;
|
||
/** @type {AutoHighlightResult} */ const result = best;
|
||
result.second_best = secondBest;
|
||
return result;
|
||
}
|
||
/**
|
||
Post-processing of the highlighted markup:
|
||
|
||
- replace TABs with something more useful
|
||
- replace real line-breaks with '<br>' for non-pre containers
|
||
|
||
@param {string} html
|
||
@returns {string}
|
||
*/ function fixMarkup(html) {
|
||
if (!(options.tabReplace || options.useBR)) {
|
||
return html;
|
||
}
|
||
return html.replace(fixMarkupRe, (match)=>{
|
||
if (match === '\n') {
|
||
return options.useBR ? '<br>' : match;
|
||
} else if (options.tabReplace) {
|
||
return match.replace(/\t/g, options.tabReplace);
|
||
}
|
||
return match;
|
||
});
|
||
}
|
||
/**
|
||
* Builds new class name for block given the language name
|
||
*
|
||
* @param {HTMLElement} element
|
||
* @param {string} [currentLang]
|
||
* @param {string} [resultLang]
|
||
*/ function updateClassName(element, currentLang, resultLang) {
|
||
const language = currentLang ? aliases[currentLang] : resultLang;
|
||
element.classList.add("hljs");
|
||
if (language) element.classList.add(language);
|
||
}
|
||
/** @type {HLJSPlugin} */ const brPlugin = {
|
||
"before:highlightElement": ({ el })=>{
|
||
if (options.useBR) {
|
||
el.innerHTML = el.innerHTML.replace(/\n/g, '').replace(/<br[ /]*>/g, '\n');
|
||
}
|
||
},
|
||
"after:highlightElement": ({ result })=>{
|
||
if (options.useBR) {
|
||
result.value = result.value.replace(/\n/g, "<br>");
|
||
}
|
||
}
|
||
};
|
||
const TAB_REPLACE_RE = /^(<[^>]+>|\t)+/gm;
|
||
/** @type {HLJSPlugin} */ const tabReplacePlugin = {
|
||
"after:highlightElement": ({ result })=>{
|
||
if (options.tabReplace) {
|
||
result.value = result.value.replace(TAB_REPLACE_RE, (m)=>m.replace(/\t/g, options.tabReplace));
|
||
}
|
||
}
|
||
};
|
||
/**
|
||
* Applies highlighting to a DOM node containing code. Accepts a DOM node and
|
||
* two optional parameters for fixMarkup.
|
||
*
|
||
* @param {HighlightedHTMLElement} element - the HTML element to highlight
|
||
*/ function highlightElement(element) {
|
||
/** @type HTMLElement */ let node = null;
|
||
const language = blockLanguage(element);
|
||
if (shouldNotHighlight(language)) return;
|
||
// support for v10 API
|
||
fire("before:highlightElement", {
|
||
el: element,
|
||
language: language
|
||
});
|
||
node = element;
|
||
const text = node.textContent;
|
||
const result = language ? highlight(text, {
|
||
language,
|
||
ignoreIllegals: true
|
||
}) : highlightAuto(text);
|
||
// support for v10 API
|
||
fire("after:highlightElement", {
|
||
el: element,
|
||
result,
|
||
text
|
||
});
|
||
element.innerHTML = result.value;
|
||
updateClassName(element, language, result.language);
|
||
element.result = {
|
||
language: result.language,
|
||
// TODO: remove with version 11.0
|
||
re: result.relevance,
|
||
relavance: result.relevance
|
||
};
|
||
if (result.second_best) {
|
||
element.second_best = {
|
||
language: result.second_best.language,
|
||
// TODO: remove with version 11.0
|
||
re: result.second_best.relevance,
|
||
relavance: result.second_best.relevance
|
||
};
|
||
}
|
||
}
|
||
/**
|
||
* Updates highlight.js global options with the passed options
|
||
*
|
||
* @param {Partial<HLJSOptions>} userOptions
|
||
*/ function configure(userOptions) {
|
||
if (userOptions.useBR) {
|
||
deprecated("10.3.0", "'useBR' will be removed entirely in v11.0");
|
||
deprecated("10.3.0", "Please see https://github.com/highlightjs/highlight.js/issues/2559");
|
||
}
|
||
options = inherit$1(options, userOptions);
|
||
}
|
||
/**
|
||
* Highlights to all <pre><code> blocks on a page
|
||
*
|
||
* @type {Function & {called?: boolean}}
|
||
*/ // TODO: remove v12, deprecated
|
||
const initHighlighting = ()=>{
|
||
if (initHighlighting.called) return;
|
||
initHighlighting.called = true;
|
||
deprecated("10.6.0", "initHighlighting() is deprecated. Use highlightAll() instead.");
|
||
const blocks = document.querySelectorAll('pre code');
|
||
blocks.forEach(highlightElement);
|
||
};
|
||
// Higlights all when DOMContentLoaded fires
|
||
// TODO: remove v12, deprecated
|
||
function initHighlightingOnLoad() {
|
||
deprecated("10.6.0", "initHighlightingOnLoad() is deprecated. Use highlightAll() instead.");
|
||
wantsHighlight = true;
|
||
}
|
||
let wantsHighlight = false;
|
||
/**
|
||
* auto-highlights all pre>code elements on the page
|
||
*/ function highlightAll() {
|
||
// if we are called too early in the loading process
|
||
if (document.readyState === "loading") {
|
||
wantsHighlight = true;
|
||
return;
|
||
}
|
||
const blocks = document.querySelectorAll('pre code');
|
||
blocks.forEach(highlightElement);
|
||
}
|
||
function boot() {
|
||
// if a highlight was requested before DOM was loaded, do now
|
||
if (wantsHighlight) highlightAll();
|
||
}
|
||
// make sure we are in the browser environment
|
||
if (typeof window !== 'undefined' && window.addEventListener) {
|
||
window.addEventListener('DOMContentLoaded', boot, false);
|
||
}
|
||
/**
|
||
* Register a language grammar module
|
||
*
|
||
* @param {string} languageName
|
||
* @param {LanguageFn} languageDefinition
|
||
*/ function registerLanguage(languageName, languageDefinition) {
|
||
let lang = null;
|
||
try {
|
||
lang = languageDefinition(hljs);
|
||
} catch (error$1) {
|
||
error("Language definition for '{}' could not be registered.".replace("{}", languageName));
|
||
// hard or soft error
|
||
if (!SAFE_MODE) {
|
||
throw error$1;
|
||
} else {
|
||
error(error$1);
|
||
}
|
||
// languages that have serious errors are replaced with essentially a
|
||
// "plaintext" stand-in so that the code blocks will still get normal
|
||
// css classes applied to them - and one bad language won't break the
|
||
// entire highlighter
|
||
lang = PLAINTEXT_LANGUAGE;
|
||
}
|
||
// give it a temporary name if it doesn't have one in the meta-data
|
||
if (!lang.name) lang.name = languageName;
|
||
languages[languageName] = lang;
|
||
lang.rawDefinition = languageDefinition.bind(null, hljs);
|
||
if (lang.aliases) {
|
||
registerAliases(lang.aliases, {
|
||
languageName
|
||
});
|
||
}
|
||
}
|
||
/**
|
||
* Remove a language grammar module
|
||
*
|
||
* @param {string} languageName
|
||
*/ function unregisterLanguage(languageName) {
|
||
delete languages[languageName];
|
||
for (const alias of Object.keys(aliases)){
|
||
if (aliases[alias] === languageName) {
|
||
delete aliases[alias];
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* @returns {string[]} List of language internal names
|
||
*/ function listLanguages() {
|
||
return Object.keys(languages);
|
||
}
|
||
/**
|
||
intended usage: When one language truly requires another
|
||
|
||
Unlike `getLanguage`, this will throw when the requested language
|
||
is not available.
|
||
|
||
@param {string} name - name of the language to fetch/require
|
||
@returns {Language | never}
|
||
*/ function requireLanguage(name) {
|
||
deprecated("10.4.0", "requireLanguage will be removed entirely in v11.");
|
||
deprecated("10.4.0", "Please see https://github.com/highlightjs/highlight.js/pull/2844");
|
||
const lang = getLanguage(name);
|
||
if (lang) {
|
||
return lang;
|
||
}
|
||
const err = new Error('The \'{}\' language is required, but not loaded.'.replace('{}', name));
|
||
throw err;
|
||
}
|
||
/**
|
||
* @param {string} name - name of the language to retrieve
|
||
* @returns {Language | undefined}
|
||
*/ function getLanguage(name) {
|
||
name = (name || '').toLowerCase();
|
||
return languages[name] || languages[aliases[name]];
|
||
}
|
||
/**
|
||
*
|
||
* @param {string|string[]} aliasList - single alias or list of aliases
|
||
* @param {{languageName: string}} opts
|
||
*/ function registerAliases(aliasList, { languageName }) {
|
||
if (typeof aliasList === 'string') {
|
||
aliasList = [
|
||
aliasList
|
||
];
|
||
}
|
||
aliasList.forEach((alias)=>{
|
||
aliases[alias.toLowerCase()] = languageName;
|
||
});
|
||
}
|
||
/**
|
||
* Determines if a given language has auto-detection enabled
|
||
* @param {string} name - name of the language
|
||
*/ function autoDetection(name) {
|
||
const lang = getLanguage(name);
|
||
return lang && !lang.disableAutodetect;
|
||
}
|
||
/**
|
||
* Upgrades the old highlightBlock plugins to the new
|
||
* highlightElement API
|
||
* @param {HLJSPlugin} plugin
|
||
*/ function upgradePluginAPI(plugin) {
|
||
// TODO: remove with v12
|
||
if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) {
|
||
plugin["before:highlightElement"] = (data)=>{
|
||
plugin["before:highlightBlock"](Object.assign({
|
||
block: data.el
|
||
}, data));
|
||
};
|
||
}
|
||
if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) {
|
||
plugin["after:highlightElement"] = (data)=>{
|
||
plugin["after:highlightBlock"](Object.assign({
|
||
block: data.el
|
||
}, data));
|
||
};
|
||
}
|
||
}
|
||
/**
|
||
* @param {HLJSPlugin} plugin
|
||
*/ function addPlugin(plugin) {
|
||
upgradePluginAPI(plugin);
|
||
plugins.push(plugin);
|
||
}
|
||
/**
|
||
*
|
||
* @param {PluginEvent} event
|
||
* @param {any} args
|
||
*/ function fire(event, args) {
|
||
const cb = event;
|
||
plugins.forEach(function(plugin) {
|
||
if (plugin[cb]) {
|
||
plugin[cb](args);
|
||
}
|
||
});
|
||
}
|
||
/**
|
||
Note: fixMarkup is deprecated and will be removed entirely in v11
|
||
|
||
@param {string} arg
|
||
@returns {string}
|
||
*/ function deprecateFixMarkup(arg) {
|
||
deprecated("10.2.0", "fixMarkup will be removed entirely in v11.0");
|
||
deprecated("10.2.0", "Please see https://github.com/highlightjs/highlight.js/issues/2534");
|
||
return fixMarkup(arg);
|
||
}
|
||
/**
|
||
*
|
||
* @param {HighlightedHTMLElement} el
|
||
*/ function deprecateHighlightBlock(el) {
|
||
deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0");
|
||
deprecated("10.7.0", "Please use highlightElement now.");
|
||
return highlightElement(el);
|
||
}
|
||
/* Interface definition */ Object.assign(hljs, {
|
||
highlight,
|
||
highlightAuto,
|
||
highlightAll,
|
||
fixMarkup: deprecateFixMarkup,
|
||
highlightElement,
|
||
// TODO: Remove with v12 API
|
||
highlightBlock: deprecateHighlightBlock,
|
||
configure,
|
||
initHighlighting,
|
||
initHighlightingOnLoad,
|
||
registerLanguage,
|
||
unregisterLanguage,
|
||
listLanguages,
|
||
getLanguage,
|
||
registerAliases,
|
||
requireLanguage,
|
||
autoDetection,
|
||
inherit: inherit$1,
|
||
addPlugin,
|
||
// plugins for frameworks
|
||
vuePlugin: BuildVuePlugin(hljs).VuePlugin
|
||
});
|
||
hljs.debugMode = function() {
|
||
SAFE_MODE = false;
|
||
};
|
||
hljs.safeMode = function() {
|
||
SAFE_MODE = true;
|
||
};
|
||
hljs.versionString = version;
|
||
for(const key in MODES){
|
||
// @ts-ignore
|
||
if (typeof MODES[key] === "object") {
|
||
// @ts-ignore
|
||
deepFreezeEs6(MODES[key]);
|
||
}
|
||
}
|
||
// merge all the modes/regexs into our main object
|
||
Object.assign(hljs, MODES);
|
||
// built-in plugins, likely to be moved out of core in the future
|
||
hljs.addPlugin(brPlugin); // slated to be removed in v11
|
||
hljs.addPlugin(mergeHTMLPlugin);
|
||
hljs.addPlugin(tabReplacePlugin);
|
||
return hljs;
|
||
};
|
||
// export an "instance" of the highlighter
|
||
var highlight = HLJS({});
|
||
module.exports = highlight;
|
||
}),
|
||
"[project]/node_modules/format/format.js [app-client] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||
|
||
//
|
||
// format - printf-like string formatting for JavaScript
|
||
// github.com/samsonjs/format
|
||
// @_sjs
|
||
//
|
||
// Copyright 2010 - 2013 Sami Samhuri <sami@samhuri.net>
|
||
//
|
||
// MIT License
|
||
// http://sjs.mit-license.org
|
||
//
|
||
;
|
||
(function() {
|
||
//// Export the API
|
||
var namespace;
|
||
// CommonJS / Node module
|
||
if ("TURBOPACK compile-time truthy", 1) {
|
||
namespace = module.exports = format;
|
||
} else //TURBOPACK unreachable
|
||
;
|
||
namespace.format = format;
|
||
namespace.vsprintf = vsprintf;
|
||
if (typeof console !== 'undefined' && typeof console.log === 'function') {
|
||
namespace.printf = printf;
|
||
}
|
||
function printf() {
|
||
console.log(format.apply(null, arguments));
|
||
}
|
||
function vsprintf(fmt, replacements) {
|
||
return format.apply(null, [
|
||
fmt
|
||
].concat(replacements));
|
||
}
|
||
function format(fmt) {
|
||
var argIndex = 1 // skip initial format argument
|
||
, args = [].slice.call(arguments), i = 0, n = fmt.length, result = '', c, escaped = false, arg, tmp, leadingZero = false, precision, nextArg = function() {
|
||
return args[argIndex++];
|
||
}, slurpNumber = function() {
|
||
var digits = '';
|
||
while(/\d/.test(fmt[i])){
|
||
digits += fmt[i++];
|
||
c = fmt[i];
|
||
}
|
||
return digits.length > 0 ? parseInt(digits) : null;
|
||
};
|
||
for(; i < n; ++i){
|
||
c = fmt[i];
|
||
if (escaped) {
|
||
escaped = false;
|
||
if (c == '.') {
|
||
leadingZero = false;
|
||
c = fmt[++i];
|
||
} else if (c == '0' && fmt[i + 1] == '.') {
|
||
leadingZero = true;
|
||
i += 2;
|
||
c = fmt[i];
|
||
} else {
|
||
leadingZero = true;
|
||
}
|
||
precision = slurpNumber();
|
||
switch(c){
|
||
case 'b':
|
||
result += parseInt(nextArg(), 10).toString(2);
|
||
break;
|
||
case 'c':
|
||
arg = nextArg();
|
||
if (typeof arg === 'string' || arg instanceof String) result += arg;
|
||
else result += String.fromCharCode(parseInt(arg, 10));
|
||
break;
|
||
case 'd':
|
||
result += parseInt(nextArg(), 10);
|
||
break;
|
||
case 'f':
|
||
tmp = String(parseFloat(nextArg()).toFixed(precision || 6));
|
||
result += leadingZero ? tmp : tmp.replace(/^0/, '');
|
||
break;
|
||
case 'j':
|
||
result += JSON.stringify(nextArg());
|
||
break;
|
||
case 'o':
|
||
result += '0' + parseInt(nextArg(), 10).toString(8);
|
||
break;
|
||
case 's':
|
||
result += nextArg();
|
||
break;
|
||
case 'x':
|
||
result += '0x' + parseInt(nextArg(), 10).toString(16);
|
||
break;
|
||
case 'X':
|
||
result += '0x' + parseInt(nextArg(), 10).toString(16).toUpperCase();
|
||
break;
|
||
default:
|
||
result += c;
|
||
break;
|
||
}
|
||
} else if (c === '%') {
|
||
escaped = true;
|
||
} else {
|
||
result += c;
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
})();
|
||
}),
|
||
"[project]/node_modules/fault/index.js [app-client] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||
"use strict";
|
||
|
||
var formatter = __turbopack_context__.r("[project]/node_modules/format/format.js [app-client] (ecmascript)");
|
||
var fault = create(Error);
|
||
module.exports = fault;
|
||
fault.eval = create(EvalError);
|
||
fault.range = create(RangeError);
|
||
fault.reference = create(ReferenceError);
|
||
fault.syntax = create(SyntaxError);
|
||
fault.type = create(TypeError);
|
||
fault.uri = create(URIError);
|
||
fault.create = create;
|
||
// Create a new `EConstructor`, with the formatted `format` as a first argument.
|
||
function create(EConstructor) {
|
||
FormattedError.displayName = EConstructor.displayName || EConstructor.name;
|
||
return FormattedError;
|
||
//TURBOPACK unreachable
|
||
;
|
||
function FormattedError(format) {
|
||
if (format) {
|
||
format = formatter.apply(null, arguments);
|
||
}
|
||
return new EConstructor(format);
|
||
}
|
||
}
|
||
}),
|
||
"[project]/node_modules/lowlight/lib/core.js [app-client] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||
"use strict";
|
||
|
||
var high = __turbopack_context__.r("[project]/node_modules/highlight.js/lib/core.js [app-client] (ecmascript)");
|
||
var fault = __turbopack_context__.r("[project]/node_modules/fault/index.js [app-client] (ecmascript)");
|
||
exports.highlight = highlight;
|
||
exports.highlightAuto = highlightAuto;
|
||
exports.registerLanguage = registerLanguage;
|
||
exports.listLanguages = listLanguages;
|
||
exports.registerAlias = registerAlias;
|
||
Emitter.prototype.addText = text;
|
||
Emitter.prototype.addKeyword = addKeyword;
|
||
Emitter.prototype.addSublanguage = addSublanguage;
|
||
Emitter.prototype.openNode = open;
|
||
Emitter.prototype.closeNode = close;
|
||
Emitter.prototype.closeAllNodes = noop;
|
||
Emitter.prototype.finalize = noop;
|
||
Emitter.prototype.toHTML = toHtmlNoop;
|
||
var defaultPrefix = 'hljs-';
|
||
// Highlighting `value` in the language `name`.
|
||
function highlight(name, value, options) {
|
||
var before = high.configure({});
|
||
var settings = options || {};
|
||
var prefix = settings.prefix;
|
||
var result;
|
||
if (typeof name !== 'string') {
|
||
throw fault('Expected `string` for name, got `%s`', name);
|
||
}
|
||
if (!high.getLanguage(name)) {
|
||
throw fault('Unknown language: `%s` is not registered', name);
|
||
}
|
||
if (typeof value !== 'string') {
|
||
throw fault('Expected `string` for value, got `%s`', value);
|
||
}
|
||
if (prefix === null || prefix === undefined) {
|
||
prefix = defaultPrefix;
|
||
}
|
||
high.configure({
|
||
__emitter: Emitter,
|
||
classPrefix: prefix
|
||
});
|
||
result = high.highlight(value, {
|
||
language: name,
|
||
ignoreIllegals: true
|
||
});
|
||
high.configure(before || {});
|
||
/* istanbul ignore if - Highlight.js seems to use this (currently) for broken
|
||
* grammars, so let’s keep it in there just to be sure. */ if (result.errorRaised) {
|
||
throw result.errorRaised;
|
||
}
|
||
return {
|
||
relevance: result.relevance,
|
||
language: result.language,
|
||
value: result.emitter.rootNode.children
|
||
};
|
||
}
|
||
function highlightAuto(value, options) {
|
||
var settings = options || {};
|
||
var subset = settings.subset || high.listLanguages();
|
||
var prefix = settings.prefix;
|
||
var length = subset.length;
|
||
var index = -1;
|
||
var result;
|
||
var secondBest;
|
||
var current;
|
||
var name;
|
||
if (prefix === null || prefix === undefined) {
|
||
prefix = defaultPrefix;
|
||
}
|
||
if (typeof value !== 'string') {
|
||
throw fault('Expected `string` for value, got `%s`', value);
|
||
}
|
||
secondBest = {
|
||
relevance: 0,
|
||
language: null,
|
||
value: []
|
||
};
|
||
result = {
|
||
relevance: 0,
|
||
language: null,
|
||
value: []
|
||
};
|
||
while(++index < length){
|
||
name = subset[index];
|
||
if (!high.getLanguage(name)) {
|
||
continue;
|
||
}
|
||
current = highlight(name, value, options);
|
||
current.language = name;
|
||
if (current.relevance > secondBest.relevance) {
|
||
secondBest = current;
|
||
}
|
||
if (current.relevance > result.relevance) {
|
||
secondBest = result;
|
||
result = current;
|
||
}
|
||
}
|
||
if (secondBest.language) {
|
||
result.secondBest = secondBest;
|
||
}
|
||
return result;
|
||
}
|
||
// Register a language.
|
||
function registerLanguage(name, syntax) {
|
||
high.registerLanguage(name, syntax);
|
||
}
|
||
// Get a list of all registered languages.
|
||
function listLanguages() {
|
||
return high.listLanguages();
|
||
}
|
||
// Register more aliases for an already registered language.
|
||
function registerAlias(name, alias) {
|
||
var map = name;
|
||
var key;
|
||
if (alias) {
|
||
map = {};
|
||
map[name] = alias;
|
||
}
|
||
for(key in map){
|
||
high.registerAliases(map[key], {
|
||
languageName: key
|
||
});
|
||
}
|
||
}
|
||
function Emitter(options) {
|
||
this.options = options;
|
||
this.rootNode = {
|
||
children: []
|
||
};
|
||
this.stack = [
|
||
this.rootNode
|
||
];
|
||
}
|
||
function addKeyword(value, name) {
|
||
this.openNode(name);
|
||
this.addText(value);
|
||
this.closeNode();
|
||
}
|
||
function addSublanguage(other, name) {
|
||
var stack = this.stack;
|
||
var current = stack[stack.length - 1];
|
||
var results = other.rootNode.children;
|
||
var node = name ? {
|
||
type: 'element',
|
||
tagName: 'span',
|
||
properties: {
|
||
className: [
|
||
name
|
||
]
|
||
},
|
||
children: results
|
||
} : results;
|
||
current.children = current.children.concat(node);
|
||
}
|
||
function text(value) {
|
||
var stack = this.stack;
|
||
var current;
|
||
var tail;
|
||
if (value === '') return;
|
||
current = stack[stack.length - 1];
|
||
tail = current.children[current.children.length - 1];
|
||
if (tail && tail.type === 'text') {
|
||
tail.value += value;
|
||
} else {
|
||
current.children.push({
|
||
type: 'text',
|
||
value: value
|
||
});
|
||
}
|
||
}
|
||
function open(name) {
|
||
var stack = this.stack;
|
||
var className = this.options.classPrefix + name;
|
||
var current = stack[stack.length - 1];
|
||
var child = {
|
||
type: 'element',
|
||
tagName: 'span',
|
||
properties: {
|
||
className: [
|
||
className
|
||
]
|
||
},
|
||
children: []
|
||
};
|
||
current.children.push(child);
|
||
stack.push(child);
|
||
}
|
||
function close() {
|
||
this.stack.pop();
|
||
}
|
||
function toHtmlNoop() {
|
||
return '';
|
||
}
|
||
function noop() {}
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/light.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>__TURBOPACK__default__export__
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$highlight$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/react-syntax-highlighter/dist/esm/highlight.js [app-client] (ecmascript)");
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lowlight$2f$lib$2f$core$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lowlight/lib/core.js [app-client] (ecmascript)");
|
||
;
|
||
;
|
||
var SyntaxHighlighter = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$highlight$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lowlight$2f$lib$2f$core$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"], {});
|
||
SyntaxHighlighter.registerLanguage = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lowlight$2f$lib$2f$core$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"].registerLanguage;
|
||
const __TURBOPACK__default__export__ = SyntaxHighlighter;
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/light.js [app-client] (ecmascript) <export default as Light>", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"Light",
|
||
()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$light$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"]
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$react$2d$syntax$2d$highlighter$2f$dist$2f$esm$2f$light$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/react-syntax-highlighter/dist/esm/light.js [app-client] (ecmascript)");
|
||
}),
|
||
"[project]/node_modules/highlight.js/lib/languages/javascript.js [app-client] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||
|
||
const IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
|
||
const KEYWORDS = [
|
||
"as",
|
||
"in",
|
||
"of",
|
||
"if",
|
||
"for",
|
||
"while",
|
||
"finally",
|
||
"var",
|
||
"new",
|
||
"function",
|
||
"do",
|
||
"return",
|
||
"void",
|
||
"else",
|
||
"break",
|
||
"catch",
|
||
"instanceof",
|
||
"with",
|
||
"throw",
|
||
"case",
|
||
"default",
|
||
"try",
|
||
"switch",
|
||
"continue",
|
||
"typeof",
|
||
"delete",
|
||
"let",
|
||
"yield",
|
||
"const",
|
||
"class",
|
||
// JS handles these with a special rule
|
||
// "get",
|
||
// "set",
|
||
"debugger",
|
||
"async",
|
||
"await",
|
||
"static",
|
||
"import",
|
||
"from",
|
||
"export",
|
||
"extends"
|
||
];
|
||
const LITERALS = [
|
||
"true",
|
||
"false",
|
||
"null",
|
||
"undefined",
|
||
"NaN",
|
||
"Infinity"
|
||
];
|
||
const TYPES = [
|
||
"Intl",
|
||
"DataView",
|
||
"Number",
|
||
"Math",
|
||
"Date",
|
||
"String",
|
||
"RegExp",
|
||
"Object",
|
||
"Function",
|
||
"Boolean",
|
||
"Error",
|
||
"Symbol",
|
||
"Set",
|
||
"Map",
|
||
"WeakSet",
|
||
"WeakMap",
|
||
"Proxy",
|
||
"Reflect",
|
||
"JSON",
|
||
"Promise",
|
||
"Float64Array",
|
||
"Int16Array",
|
||
"Int32Array",
|
||
"Int8Array",
|
||
"Uint16Array",
|
||
"Uint32Array",
|
||
"Float32Array",
|
||
"Array",
|
||
"Uint8Array",
|
||
"Uint8ClampedArray",
|
||
"ArrayBuffer",
|
||
"BigInt64Array",
|
||
"BigUint64Array",
|
||
"BigInt"
|
||
];
|
||
const ERROR_TYPES = [
|
||
"EvalError",
|
||
"InternalError",
|
||
"RangeError",
|
||
"ReferenceError",
|
||
"SyntaxError",
|
||
"TypeError",
|
||
"URIError"
|
||
];
|
||
const BUILT_IN_GLOBALS = [
|
||
"setInterval",
|
||
"setTimeout",
|
||
"clearInterval",
|
||
"clearTimeout",
|
||
"require",
|
||
"exports",
|
||
"eval",
|
||
"isFinite",
|
||
"isNaN",
|
||
"parseFloat",
|
||
"parseInt",
|
||
"decodeURI",
|
||
"decodeURIComponent",
|
||
"encodeURI",
|
||
"encodeURIComponent",
|
||
"escape",
|
||
"unescape"
|
||
];
|
||
const BUILT_IN_VARIABLES = [
|
||
"arguments",
|
||
"this",
|
||
"super",
|
||
"console",
|
||
"window",
|
||
"document",
|
||
"localStorage",
|
||
"module",
|
||
"global" // Node.js
|
||
];
|
||
const BUILT_INS = [].concat(BUILT_IN_GLOBALS, BUILT_IN_VARIABLES, TYPES, ERROR_TYPES);
|
||
/**
|
||
* @param {string} value
|
||
* @returns {RegExp}
|
||
* */ /**
|
||
* @param {RegExp | string } re
|
||
* @returns {string}
|
||
*/ function source(re) {
|
||
if (!re) return null;
|
||
if (typeof re === "string") return re;
|
||
return re.source;
|
||
}
|
||
/**
|
||
* @param {RegExp | string } re
|
||
* @returns {string}
|
||
*/ function lookahead(re) {
|
||
return concat('(?=', re, ')');
|
||
}
|
||
/**
|
||
* @param {...(RegExp | string) } args
|
||
* @returns {string}
|
||
*/ function concat(...args) {
|
||
const joined = args.map((x)=>source(x)).join("");
|
||
return joined;
|
||
}
|
||
/*
|
||
Language: JavaScript
|
||
Description: JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions.
|
||
Category: common, scripting
|
||
Website: https://developer.mozilla.org/en-US/docs/Web/JavaScript
|
||
*/ /** @type LanguageFn */ function javascript(hljs) {
|
||
/**
|
||
* Takes a string like "<Booger" and checks to see
|
||
* if we can find a matching "</Booger" later in the
|
||
* content.
|
||
* @param {RegExpMatchArray} match
|
||
* @param {{after:number}} param1
|
||
*/ const hasClosingTag = (match, { after })=>{
|
||
const tag = "</" + match[0].slice(1);
|
||
const pos = match.input.indexOf(tag, after);
|
||
return pos !== -1;
|
||
};
|
||
const IDENT_RE$1 = IDENT_RE;
|
||
const FRAGMENT = {
|
||
begin: '<>',
|
||
end: '</>'
|
||
};
|
||
const XML_TAG = {
|
||
begin: /<[A-Za-z0-9\\._:-]+/,
|
||
end: /\/[A-Za-z0-9\\._:-]+>|\/>/,
|
||
/**
|
||
* @param {RegExpMatchArray} match
|
||
* @param {CallbackResponse} response
|
||
*/ isTrulyOpeningTag: (match, response)=>{
|
||
const afterMatchIndex = match[0].length + match.index;
|
||
const nextChar = match.input[afterMatchIndex];
|
||
// nested type?
|
||
// HTML should not include another raw `<` inside a tag
|
||
// But a type might: `<Array<Array<number>>`, etc.
|
||
if (nextChar === "<") {
|
||
response.ignoreMatch();
|
||
return;
|
||
}
|
||
// <something>
|
||
// This is now either a tag or a type.
|
||
if (nextChar === ">") {
|
||
// if we cannot find a matching closing tag, then we
|
||
// will ignore it
|
||
if (!hasClosingTag(match, {
|
||
after: afterMatchIndex
|
||
})) {
|
||
response.ignoreMatch();
|
||
}
|
||
}
|
||
}
|
||
};
|
||
const KEYWORDS$1 = {
|
||
$pattern: IDENT_RE,
|
||
keyword: KEYWORDS,
|
||
literal: LITERALS,
|
||
built_in: BUILT_INS
|
||
};
|
||
// https://tc39.es/ecma262/#sec-literals-numeric-literals
|
||
const decimalDigits = '[0-9](_?[0-9])*';
|
||
const frac = `\\.(${decimalDigits})`;
|
||
// DecimalIntegerLiteral, including Annex B NonOctalDecimalIntegerLiteral
|
||
// https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
|
||
const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`;
|
||
const NUMBER = {
|
||
className: 'number',
|
||
variants: [
|
||
// DecimalLiteral
|
||
{
|
||
begin: `(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))` + `[eE][+-]?(${decimalDigits})\\b`
|
||
},
|
||
{
|
||
begin: `\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\b`
|
||
},
|
||
// DecimalBigIntegerLiteral
|
||
{
|
||
begin: `\\b(0|[1-9](_?[0-9])*)n\\b`
|
||
},
|
||
// NonDecimalIntegerLiteral
|
||
{
|
||
begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"
|
||
},
|
||
{
|
||
begin: "\\b0[bB][0-1](_?[0-1])*n?\\b"
|
||
},
|
||
{
|
||
begin: "\\b0[oO][0-7](_?[0-7])*n?\\b"
|
||
},
|
||
// LegacyOctalIntegerLiteral (does not include underscore separators)
|
||
// https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals
|
||
{
|
||
begin: "\\b0[0-7]+n?\\b"
|
||
}
|
||
],
|
||
relevance: 0
|
||
};
|
||
const SUBST = {
|
||
className: 'subst',
|
||
begin: '\\$\\{',
|
||
end: '\\}',
|
||
keywords: KEYWORDS$1,
|
||
contains: [] // defined later
|
||
};
|
||
const HTML_TEMPLATE = {
|
||
begin: 'html`',
|
||
end: '',
|
||
starts: {
|
||
end: '`',
|
||
returnEnd: false,
|
||
contains: [
|
||
hljs.BACKSLASH_ESCAPE,
|
||
SUBST
|
||
],
|
||
subLanguage: 'xml'
|
||
}
|
||
};
|
||
const CSS_TEMPLATE = {
|
||
begin: 'css`',
|
||
end: '',
|
||
starts: {
|
||
end: '`',
|
||
returnEnd: false,
|
||
contains: [
|
||
hljs.BACKSLASH_ESCAPE,
|
||
SUBST
|
||
],
|
||
subLanguage: 'css'
|
||
}
|
||
};
|
||
const TEMPLATE_STRING = {
|
||
className: 'string',
|
||
begin: '`',
|
||
end: '`',
|
||
contains: [
|
||
hljs.BACKSLASH_ESCAPE,
|
||
SUBST
|
||
]
|
||
};
|
||
const JSDOC_COMMENT = hljs.COMMENT(/\/\*\*(?!\/)/, '\\*/', {
|
||
relevance: 0,
|
||
contains: [
|
||
{
|
||
className: 'doctag',
|
||
begin: '@[A-Za-z]+',
|
||
contains: [
|
||
{
|
||
className: 'type',
|
||
begin: '\\{',
|
||
end: '\\}',
|
||
relevance: 0
|
||
},
|
||
{
|
||
className: 'variable',
|
||
begin: IDENT_RE$1 + '(?=\\s*(-)|$)',
|
||
endsParent: true,
|
||
relevance: 0
|
||
},
|
||
// eat spaces (not newlines) so we can find
|
||
// types or variables
|
||
{
|
||
begin: /(?=[^\n])\s/,
|
||
relevance: 0
|
||
}
|
||
]
|
||
}
|
||
]
|
||
});
|
||
const COMMENT = {
|
||
className: "comment",
|
||
variants: [
|
||
JSDOC_COMMENT,
|
||
hljs.C_BLOCK_COMMENT_MODE,
|
||
hljs.C_LINE_COMMENT_MODE
|
||
]
|
||
};
|
||
const SUBST_INTERNALS = [
|
||
hljs.APOS_STRING_MODE,
|
||
hljs.QUOTE_STRING_MODE,
|
||
HTML_TEMPLATE,
|
||
CSS_TEMPLATE,
|
||
TEMPLATE_STRING,
|
||
NUMBER,
|
||
hljs.REGEXP_MODE
|
||
];
|
||
SUBST.contains = SUBST_INTERNALS.concat({
|
||
// we need to pair up {} inside our subst to prevent
|
||
// it from ending too early by matching another }
|
||
begin: /\{/,
|
||
end: /\}/,
|
||
keywords: KEYWORDS$1,
|
||
contains: [
|
||
"self"
|
||
].concat(SUBST_INTERNALS)
|
||
});
|
||
const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains);
|
||
const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([
|
||
// eat recursive parens in sub expressions
|
||
{
|
||
begin: /\(/,
|
||
end: /\)/,
|
||
keywords: KEYWORDS$1,
|
||
contains: [
|
||
"self"
|
||
].concat(SUBST_AND_COMMENTS)
|
||
}
|
||
]);
|
||
const PARAMS = {
|
||
className: 'params',
|
||
begin: /\(/,
|
||
end: /\)/,
|
||
excludeBegin: true,
|
||
excludeEnd: true,
|
||
keywords: KEYWORDS$1,
|
||
contains: PARAMS_CONTAINS
|
||
};
|
||
return {
|
||
name: 'Javascript',
|
||
aliases: [
|
||
'js',
|
||
'jsx',
|
||
'mjs',
|
||
'cjs'
|
||
],
|
||
keywords: KEYWORDS$1,
|
||
// this will be extended by TypeScript
|
||
exports: {
|
||
PARAMS_CONTAINS
|
||
},
|
||
illegal: /#(?![$_A-z])/,
|
||
contains: [
|
||
hljs.SHEBANG({
|
||
label: "shebang",
|
||
binary: "node",
|
||
relevance: 5
|
||
}),
|
||
{
|
||
label: "use_strict",
|
||
className: 'meta',
|
||
relevance: 10,
|
||
begin: /^\s*['"]use (strict|asm)['"]/
|
||
},
|
||
hljs.APOS_STRING_MODE,
|
||
hljs.QUOTE_STRING_MODE,
|
||
HTML_TEMPLATE,
|
||
CSS_TEMPLATE,
|
||
TEMPLATE_STRING,
|
||
COMMENT,
|
||
NUMBER,
|
||
{
|
||
begin: concat(/[{,\n]\s*/, // we need to look ahead to make sure that we actually have an
|
||
// attribute coming up so we don't steal a comma from a potential
|
||
// "value" container
|
||
//
|
||
// NOTE: this might not work how you think. We don't actually always
|
||
// enter this mode and stay. Instead it might merely match `,
|
||
// <comments up next>` and then immediately end after the , because it
|
||
// fails to find any actual attrs. But this still does the job because
|
||
// it prevents the value contain rule from grabbing this instead and
|
||
// prevening this rule from firing when we actually DO have keys.
|
||
lookahead(concat(// we also need to allow for multiple possible comments inbetween
|
||
// the first key:value pairing
|
||
/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/, IDENT_RE$1 + '\\s*:'))),
|
||
relevance: 0,
|
||
contains: [
|
||
{
|
||
className: 'attr',
|
||
begin: IDENT_RE$1 + lookahead('\\s*:'),
|
||
relevance: 0
|
||
}
|
||
]
|
||
},
|
||
{
|
||
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
|
||
keywords: 'return throw case',
|
||
contains: [
|
||
COMMENT,
|
||
hljs.REGEXP_MODE,
|
||
{
|
||
className: 'function',
|
||
// we have to count the parens to make sure we actually have the
|
||
// correct bounding ( ) before the =>. There could be any number of
|
||
// sub-expressions inside also surrounded by parens.
|
||
begin: '(\\(' + '[^()]*(\\(' + '[^()]*(\\(' + '[^()]*' + '\\)[^()]*)*' + '\\)[^()]*)*' + '\\)|' + hljs.UNDERSCORE_IDENT_RE + ')\\s*=>',
|
||
returnBegin: true,
|
||
end: '\\s*=>',
|
||
contains: [
|
||
{
|
||
className: 'params',
|
||
variants: [
|
||
{
|
||
begin: hljs.UNDERSCORE_IDENT_RE,
|
||
relevance: 0
|
||
},
|
||
{
|
||
className: null,
|
||
begin: /\(\s*\)/,
|
||
skip: true
|
||
},
|
||
{
|
||
begin: /\(/,
|
||
end: /\)/,
|
||
excludeBegin: true,
|
||
excludeEnd: true,
|
||
keywords: KEYWORDS$1,
|
||
contains: PARAMS_CONTAINS
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
begin: /,/,
|
||
relevance: 0
|
||
},
|
||
{
|
||
className: '',
|
||
begin: /\s/,
|
||
end: /\s*/,
|
||
skip: true
|
||
},
|
||
{
|
||
variants: [
|
||
{
|
||
begin: FRAGMENT.begin,
|
||
end: FRAGMENT.end
|
||
},
|
||
{
|
||
begin: XML_TAG.begin,
|
||
// we carefully check the opening tag to see if it truly
|
||
// is a tag and not a false positive
|
||
'on:begin': XML_TAG.isTrulyOpeningTag,
|
||
end: XML_TAG.end
|
||
}
|
||
],
|
||
subLanguage: 'xml',
|
||
contains: [
|
||
{
|
||
begin: XML_TAG.begin,
|
||
end: XML_TAG.end,
|
||
skip: true,
|
||
contains: [
|
||
'self'
|
||
]
|
||
}
|
||
]
|
||
}
|
||
],
|
||
relevance: 0
|
||
},
|
||
{
|
||
className: 'function',
|
||
beginKeywords: 'function',
|
||
end: /[{;]/,
|
||
excludeEnd: true,
|
||
keywords: KEYWORDS$1,
|
||
contains: [
|
||
'self',
|
||
hljs.inherit(hljs.TITLE_MODE, {
|
||
begin: IDENT_RE$1
|
||
}),
|
||
PARAMS
|
||
],
|
||
illegal: /%/
|
||
},
|
||
{
|
||
// prevent this from getting swallowed up by function
|
||
// since they appear "function like"
|
||
beginKeywords: "while if switch catch for"
|
||
},
|
||
{
|
||
className: 'function',
|
||
// we have to count the parens to make sure we actually have the correct
|
||
// bounding ( ). There could be any number of sub-expressions inside
|
||
// also surrounded by parens.
|
||
begin: hljs.UNDERSCORE_IDENT_RE + '\\(' + // first parens
|
||
'[^()]*(\\(' + '[^()]*(\\(' + '[^()]*' + '\\)[^()]*)*' + '\\)[^()]*)*' + '\\)\\s*\\{',
|
||
returnBegin: true,
|
||
contains: [
|
||
PARAMS,
|
||
hljs.inherit(hljs.TITLE_MODE, {
|
||
begin: IDENT_RE$1
|
||
})
|
||
]
|
||
},
|
||
// hack: prevents detection of keywords in some circumstances
|
||
// .keyword()
|
||
// $keyword = x
|
||
{
|
||
variants: [
|
||
{
|
||
begin: '\\.' + IDENT_RE$1
|
||
},
|
||
{
|
||
begin: '\\$' + IDENT_RE$1
|
||
}
|
||
],
|
||
relevance: 0
|
||
},
|
||
{
|
||
className: 'class',
|
||
beginKeywords: 'class',
|
||
end: /[{;=]/,
|
||
excludeEnd: true,
|
||
illegal: /[:"[\]]/,
|
||
contains: [
|
||
{
|
||
beginKeywords: 'extends'
|
||
},
|
||
hljs.UNDERSCORE_TITLE_MODE
|
||
]
|
||
},
|
||
{
|
||
begin: /\b(?=constructor)/,
|
||
end: /[{;]/,
|
||
excludeEnd: true,
|
||
contains: [
|
||
hljs.inherit(hljs.TITLE_MODE, {
|
||
begin: IDENT_RE$1
|
||
}),
|
||
'self',
|
||
PARAMS
|
||
]
|
||
},
|
||
{
|
||
begin: '(get|set)\\s+(?=' + IDENT_RE$1 + '\\()',
|
||
end: /\{/,
|
||
keywords: "get set",
|
||
contains: [
|
||
hljs.inherit(hljs.TITLE_MODE, {
|
||
begin: IDENT_RE$1
|
||
}),
|
||
{
|
||
begin: /\(\)/
|
||
},
|
||
PARAMS
|
||
]
|
||
},
|
||
{
|
||
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
||
}
|
||
]
|
||
};
|
||
}
|
||
module.exports = javascript;
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/languages/hljs/javascript.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>__TURBOPACK__default__export__
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$highlight$2e$js$2f$lib$2f$languages$2f$javascript$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/highlight.js/lib/languages/javascript.js [app-client] (ecmascript)");
|
||
;
|
||
const __TURBOPACK__default__export__ = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$highlight$2e$js$2f$lib$2f$languages$2f$javascript$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"];
|
||
}),
|
||
"[project]/node_modules/highlight.js/lib/languages/json.js [app-client] (ecmascript)", ((__turbopack_context__, module, exports) => {
|
||
|
||
/*
|
||
Language: JSON
|
||
Description: JSON (JavaScript Object Notation) is a lightweight data-interchange format.
|
||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||
Website: http://www.json.org
|
||
Category: common, protocols
|
||
*/ function json(hljs) {
|
||
const LITERALS = {
|
||
literal: 'true false null'
|
||
};
|
||
const ALLOWED_COMMENTS = [
|
||
hljs.C_LINE_COMMENT_MODE,
|
||
hljs.C_BLOCK_COMMENT_MODE
|
||
];
|
||
const TYPES = [
|
||
hljs.QUOTE_STRING_MODE,
|
||
hljs.C_NUMBER_MODE
|
||
];
|
||
const VALUE_CONTAINER = {
|
||
end: ',',
|
||
endsWithParent: true,
|
||
excludeEnd: true,
|
||
contains: TYPES,
|
||
keywords: LITERALS
|
||
};
|
||
const OBJECT = {
|
||
begin: /\{/,
|
||
end: /\}/,
|
||
contains: [
|
||
{
|
||
className: 'attr',
|
||
begin: /"/,
|
||
end: /"/,
|
||
contains: [
|
||
hljs.BACKSLASH_ESCAPE
|
||
],
|
||
illegal: '\\n'
|
||
},
|
||
hljs.inherit(VALUE_CONTAINER, {
|
||
begin: /:/
|
||
})
|
||
].concat(ALLOWED_COMMENTS),
|
||
illegal: '\\S'
|
||
};
|
||
const ARRAY = {
|
||
begin: '\\[',
|
||
end: '\\]',
|
||
contains: [
|
||
hljs.inherit(VALUE_CONTAINER)
|
||
],
|
||
illegal: '\\S'
|
||
};
|
||
TYPES.push(OBJECT, ARRAY);
|
||
ALLOWED_COMMENTS.forEach(function(rule) {
|
||
TYPES.push(rule);
|
||
});
|
||
return {
|
||
name: 'JSON',
|
||
contains: TYPES,
|
||
keywords: LITERALS,
|
||
illegal: '\\S'
|
||
};
|
||
}
|
||
module.exports = json;
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/languages/hljs/json.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>__TURBOPACK__default__export__
|
||
]);
|
||
var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$highlight$2e$js$2f$lib$2f$languages$2f$json$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/highlight.js/lib/languages/json.js [app-client] (ecmascript)");
|
||
;
|
||
const __TURBOPACK__default__export__ = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$highlight$2e$js$2f$lib$2f$languages$2f$json$2e$js__$5b$app$2d$client$5d$__$28$ecmascript$29$__["default"];
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/github.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>__TURBOPACK__default__export__
|
||
]);
|
||
const __TURBOPACK__default__export__ = {
|
||
"hljs": {
|
||
"display": "block",
|
||
"overflowX": "auto",
|
||
"padding": "0.5em",
|
||
"color": "#333",
|
||
"background": "#f8f8f8"
|
||
},
|
||
"hljs-comment": {
|
||
"color": "#998",
|
||
"fontStyle": "italic"
|
||
},
|
||
"hljs-quote": {
|
||
"color": "#998",
|
||
"fontStyle": "italic"
|
||
},
|
||
"hljs-keyword": {
|
||
"color": "#333",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-selector-tag": {
|
||
"color": "#333",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-subst": {
|
||
"color": "#333",
|
||
"fontWeight": "normal"
|
||
},
|
||
"hljs-number": {
|
||
"color": "#008080"
|
||
},
|
||
"hljs-literal": {
|
||
"color": "#008080"
|
||
},
|
||
"hljs-variable": {
|
||
"color": "#008080"
|
||
},
|
||
"hljs-template-variable": {
|
||
"color": "#008080"
|
||
},
|
||
"hljs-tag .hljs-attr": {
|
||
"color": "#008080"
|
||
},
|
||
"hljs-string": {
|
||
"color": "#d14"
|
||
},
|
||
"hljs-doctag": {
|
||
"color": "#d14"
|
||
},
|
||
"hljs-title": {
|
||
"color": "#900",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-section": {
|
||
"color": "#900",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-selector-id": {
|
||
"color": "#900",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-type": {
|
||
"color": "#458",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-class .hljs-title": {
|
||
"color": "#458",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-tag": {
|
||
"color": "#000080",
|
||
"fontWeight": "normal"
|
||
},
|
||
"hljs-name": {
|
||
"color": "#000080",
|
||
"fontWeight": "normal"
|
||
},
|
||
"hljs-attribute": {
|
||
"color": "#000080",
|
||
"fontWeight": "normal"
|
||
},
|
||
"hljs-regexp": {
|
||
"color": "#009926"
|
||
},
|
||
"hljs-link": {
|
||
"color": "#009926"
|
||
},
|
||
"hljs-symbol": {
|
||
"color": "#990073"
|
||
},
|
||
"hljs-bullet": {
|
||
"color": "#990073"
|
||
},
|
||
"hljs-built_in": {
|
||
"color": "#0086b3"
|
||
},
|
||
"hljs-builtin-name": {
|
||
"color": "#0086b3"
|
||
},
|
||
"hljs-meta": {
|
||
"color": "#999",
|
||
"fontWeight": "bold"
|
||
},
|
||
"hljs-deletion": {
|
||
"background": "#fdd"
|
||
},
|
||
"hljs-addition": {
|
||
"background": "#dfd"
|
||
},
|
||
"hljs-emphasis": {
|
||
"fontStyle": "italic"
|
||
},
|
||
"hljs-strong": {
|
||
"fontWeight": "bold"
|
||
}
|
||
};
|
||
}),
|
||
"[project]/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/atom-one-dark.js [app-client] (ecmascript)", ((__turbopack_context__) => {
|
||
"use strict";
|
||
|
||
__turbopack_context__.s([
|
||
"default",
|
||
()=>__TURBOPACK__default__export__
|
||
]);
|
||
const __TURBOPACK__default__export__ = {
|
||
"hljs": {
|
||
"display": "block",
|
||
"overflowX": "auto",
|
||
"padding": "0.5em",
|
||
"color": "#abb2bf",
|
||
"background": "#282c34"
|
||
},
|
||
"hljs-comment": {
|
||
"color": "#5c6370",
|
||
"fontStyle": "italic"
|
||
},
|
||
"hljs-quote": {
|
||
"color": "#5c6370",
|
||
"fontStyle": "italic"
|
||
},
|
||
"hljs-doctag": {
|
||
"color": "#c678dd"
|
||
},
|
||
"hljs-keyword": {
|
||
"color": "#c678dd"
|
||
},
|
||
"hljs-formula": {
|
||
"color": "#c678dd"
|
||
},
|
||
"hljs-section": {
|
||
"color": "#e06c75"
|
||
},
|
||
"hljs-name": {
|
||
"color": "#e06c75"
|
||
},
|
||
"hljs-selector-tag": {
|
||
"color": "#e06c75"
|
||
},
|
||
"hljs-deletion": {
|
||
"color": "#e06c75"
|
||
},
|
||
"hljs-subst": {
|
||
"color": "#e06c75"
|
||
},
|
||
"hljs-literal": {
|
||
"color": "#56b6c2"
|
||
},
|
||
"hljs-string": {
|
||
"color": "#98c379"
|
||
},
|
||
"hljs-regexp": {
|
||
"color": "#98c379"
|
||
},
|
||
"hljs-addition": {
|
||
"color": "#98c379"
|
||
},
|
||
"hljs-attribute": {
|
||
"color": "#98c379"
|
||
},
|
||
"hljs-meta-string": {
|
||
"color": "#98c379"
|
||
},
|
||
"hljs-built_in": {
|
||
"color": "#e6c07b"
|
||
},
|
||
"hljs-class .hljs-title": {
|
||
"color": "#e6c07b"
|
||
},
|
||
"hljs-attr": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-variable": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-template-variable": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-type": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-selector-class": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-selector-attr": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-selector-pseudo": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-number": {
|
||
"color": "#d19a66"
|
||
},
|
||
"hljs-symbol": {
|
||
"color": "#61aeee"
|
||
},
|
||
"hljs-bullet": {
|
||
"color": "#61aeee"
|
||
},
|
||
"hljs-link": {
|
||
"color": "#61aeee",
|
||
"textDecoration": "underline"
|
||
},
|
||
"hljs-meta": {
|
||
"color": "#61aeee"
|
||
},
|
||
"hljs-selector-id": {
|
||
"color": "#61aeee"
|
||
},
|
||
"hljs-title": {
|
||
"color": "#61aeee"
|
||
},
|
||
"hljs-emphasis": {
|
||
"fontStyle": "italic"
|
||
},
|
||
"hljs-strong": {
|
||
"fontWeight": "bold"
|
||
}
|
||
};
|
||
}),
|
||
]);
|
||
|
||
//# sourceMappingURL=node_modules_dbbe8be6._.js.map
|