// muse-ui v4.0.0-alpha.1
// © 2024 kjxbyz. All Rights Reserved.
"use client";
"use strict";
function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_without_holes(arr) {
    if (Array.isArray(arr)) return _array_like_to_array(arr);
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _iterable_to_array(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _non_iterable_spread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object);
    if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) {
            symbols = symbols.filter(function(sym) {
                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
            });
        }
        keys.push.apply(keys, symbols);
    }
    return keys;
}
function _object_spread_props(target, source) {
    source = source != null ? source : {};
    if (Object.getOwnPropertyDescriptors) {
        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
        ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
    }
    return target;
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = _object_without_properties_loose(source, excluded);
    var key, i;
    if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceSymbolKeys.length; i++){
            key = sourceSymbolKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        target[key] = source[key];
    }
    return target;
}
function _to_consumable_array(arr) {
    return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = function(target, all) {
    for(var name in all)__defProp(target, name, {
        get: all[name],
        enumerable: true
    });
};
var __copyProps = function(to, from, except, desc) {
    if (from && typeof from === "object" || typeof from === "function") {
        var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
        try {
            var _loop = function() {
                var key = _step.value;
                if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
                    get: function() {
                        return from[key];
                    },
                    enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
                });
            };
            for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
        } catch (err) {
            _didIteratorError = true;
            _iteratorError = err;
        } finally{
            try {
                if (!_iteratorNormalCompletion && _iterator.return != null) {
                    _iterator.return();
                }
            } finally{
                if (_didIteratorError) {
                    throw _iteratorError;
                }
            }
        }
    }
    return to;
};
var __toESM = function(mod, isNodeMode, target) {
    return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
    // file that has been converted to a CommonJS file using a Babel-
    // compatible transform (i.e. "__esModule" has not been set), then set
    // "default" to the CommonJS "module.exports" for node compatibility.
    isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
        value: mod,
        enumerable: true
    }) : target, mod);
};
var __toCommonJS = function(mod) {
    return __copyProps(__defProp({}, "__esModule", {
        value: true
    }), mod);
};
// registry/new-york/ui/separator.tsx
var separator_exports = {};
__export(separator_exports, {
    Separator: function() {
        return Separator;
    }
});
module.exports = __toCommonJS(separator_exports);
var React = __toESM(require("react"));
// ../../node_modules/.pnpm/@babel+runtime@7.22.3/node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() {
    _extends = Object.assign ? Object.assign.bind() : function _extends(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends.apply(this, arguments);
}
// ../../node_modules/.pnpm/@radix-ui+react-separator@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-separator/dist/index.mjs
var import_react4 = require("react");
// ../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/esm/extends.js
function _extends2() {
    _extends2 = Object.assign ? Object.assign.bind() : function _extends2(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends2.apply(this, arguments);
}
// ../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs
var import_react3 = require("react");
var import_react_dom = require("react-dom");
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
var import_react2 = require("react");
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
var import_react = require("react");
function $6ed0406888f73fc4$var$setRef(ref, value) {
    if (typeof ref === "function") ref(value);
    else if (ref !== null && ref !== void 0) ref.current = value;
}
function $6ed0406888f73fc4$export$43e446d32b3d21af() {
    for(var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++){
        refs[_key] = arguments[_key];
    }
    return function(node) {
        return refs.forEach(function(ref) {
            return $6ed0406888f73fc4$var$setRef(ref, node);
        });
    };
}
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ (0, import_react2.forwardRef)(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    var childrenArray = import_react2.Children.toArray(children);
    var slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
    if (slottable) {
        var newElement = slottable.props.children;
        var newChildren = childrenArray.map(function(child) {
            if (child === slottable) {
                if (import_react2.Children.count(newElement) > 1) return import_react2.Children.only(null);
                return /* @__PURE__ */ (0, import_react2.isValidElement)(newElement) ? newElement.props.children : null;
            } else return child;
        });
        return /* @__PURE__ */ (0, import_react2.createElement)($5e63c961fc1ce211$var$SlotClone, _extends2({}, slotProps, {
            ref: forwardedRef
        }), /* @__PURE__ */ (0, import_react2.isValidElement)(newElement) ? /* @__PURE__ */ (0, import_react2.cloneElement)(newElement, void 0, newChildren) : null);
    }
    return /* @__PURE__ */ (0, import_react2.createElement)($5e63c961fc1ce211$var$SlotClone, _extends2({}, slotProps, {
        ref: forwardedRef
    }), children);
});
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
var $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ (0, import_react2.forwardRef)(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    if (/* @__PURE__ */ (0, import_react2.isValidElement)(children)) return /* @__PURE__ */ (0, import_react2.cloneElement)(children, _object_spread_props(_object_spread({}, $5e63c961fc1ce211$var$mergeProps(slotProps, children.props)), {
        ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
    }));
    return import_react2.Children.count(children) > 1 ? import_react2.Children.only(null) : null;
});
$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
var $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = function(param) {
    var children = param.children;
    return /* @__PURE__ */ (0, import_react2.createElement)(import_react2.Fragment, null, children);
};
function $5e63c961fc1ce211$var$isSlottable(child) {
    return /* @__PURE__ */ (0, import_react2.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
}
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
    var _loop = function(propName) {
        var slotPropValue = slotProps[propName];
        var childPropValue = childProps[propName];
        var isHandler = /^on[A-Z]/.test(propName);
        if (isHandler) {
            if (slotPropValue && childPropValue) overrideProps[propName] = function() {
                for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                    args[_key] = arguments[_key];
                }
                childPropValue.apply(void 0, _to_consumable_array(args));
                slotPropValue.apply(void 0, _to_consumable_array(args));
            };
            else if (slotPropValue) overrideProps[propName] = slotPropValue;
        } else if (propName === "style") overrideProps[propName] = _object_spread({}, slotPropValue, childPropValue);
        else if (propName === "className") overrideProps[propName] = [
            slotPropValue,
            childPropValue
        ].filter(Boolean).join(" ");
    };
    var overrideProps = _object_spread({}, childProps);
    for(var propName in childProps)_loop(propName);
    return _object_spread({}, slotProps, overrideProps);
}
// ../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs
var $8927f6f2acc4f386$var$NODES = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "span",
    "svg",
    "ul"
];
var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce(function(primitive, node) {
    var Node = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, forwardedRef) {
        var asChild = props.asChild, primitiveProps = _object_without_properties(props, [
            "asChild"
        ]);
        var Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
        (0, import_react3.useEffect)(function() {
            window[Symbol.for("radix-ui")] = true;
        }, []);
        return /* @__PURE__ */ (0, import_react3.createElement)(Comp, _extends2({}, primitiveProps, {
            ref: forwardedRef
        }));
    });
    Node.displayName = "Primitive.".concat(node);
    return _object_spread_props(_object_spread({}, primitive), _define_property({}, node, Node));
}, {});
// ../../node_modules/.pnpm/@radix-ui+react-separator@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-separator/dist/index.mjs
var $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
var $89eedd556c436f6a$var$ORIENTATIONS = [
    "horizontal",
    "vertical"
];
var $89eedd556c436f6a$export$1ff3c3f08ae963c0 = /* @__PURE__ */ (0, import_react4.forwardRef)(function(props, forwardedRef) {
    var decorative = props.decorative, tmp = props.orientation, orientationProp = tmp === void 0 ? $89eedd556c436f6a$var$DEFAULT_ORIENTATION : tmp, domProps = _object_without_properties(props, [
        "decorative",
        "orientation"
    ]);
    var orientation = $89eedd556c436f6a$var$isValidOrientation(orientationProp) ? orientationProp : $89eedd556c436f6a$var$DEFAULT_ORIENTATION;
    var ariaOrientation = orientation === "vertical" ? orientation : void 0;
    var semanticProps = decorative ? {
        role: "none"
    } : {
        "aria-orientation": ariaOrientation,
        role: "separator"
    };
    return /* @__PURE__ */ (0, import_react4.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
        "data-orientation": orientation
    }, semanticProps, domProps, {
        ref: forwardedRef
    }));
});
$89eedd556c436f6a$export$1ff3c3f08ae963c0.propTypes = {
    orientation: function orientation(props, propName, componentName) {
        var propValue = props[propName];
        var strVal = String(propValue);
        if (propValue && !$89eedd556c436f6a$var$isValidOrientation(propValue)) return new Error($89eedd556c436f6a$var$getInvalidOrientationError(strVal, componentName));
        return null;
    }
};
function $89eedd556c436f6a$var$getInvalidOrientationError(value, componentName) {
    return "Invalid prop `orientation` of value `".concat(value, "` supplied to `").concat(componentName, "`, expected one of:\n  - horizontal\n  - vertical\n\nDefaulting to `").concat($89eedd556c436f6a$var$DEFAULT_ORIENTATION, "`.");
}
function $89eedd556c436f6a$var$isValidOrientation(orientation) {
    return $89eedd556c436f6a$var$ORIENTATIONS.includes(orientation);
}
var $89eedd556c436f6a$export$be92b6f5f03c0fe9 = $89eedd556c436f6a$export$1ff3c3f08ae963c0;
// lib/utils.ts
var import_clsx = require("clsx");
var import_tailwind_merge = require("tailwind-merge");
function cn() {
    for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
        inputs[_key] = arguments[_key];
    }
    return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
}
// registry/new-york/ui/separator.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Separator = React.forwardRef(function(_param, ref) {
    var className = _param.className, _param_orientation = _param.orientation, orientation = _param_orientation === void 0 ? "horizontal" : _param_orientation, _param_decorative = _param.decorative, decorative = _param_decorative === void 0 ? true : _param_decorative, props = _object_without_properties(_param, [
        "className",
        "orientation",
        "decorative"
    ]);
    return /* @__PURE__ */ (0, import_jsx_runtime.jsx)($89eedd556c436f6a$export$be92b6f5f03c0fe9, _object_spread({
        ref: ref,
        decorative: decorative,
        orientation: orientation,
        className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className)
    }, props));
});
Separator.displayName = $89eedd556c436f6a$export$be92b6f5f03c0fe9.displayName;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
    Separator: Separator
});
//# sourceMappingURL=separator.js.map