"use strict";
exports.id = 319;
exports.ids = [319];
exports.modules = {

/***/ 34306:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* unused harmony export slugifyPackageName */
/* harmony import */ var slugify__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(24264);
/* harmony import */ var slugify__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(slugify__WEBPACK_IMPORTED_MODULE_0__);

/**
 * Takes a package name and converts it into a URL-friendly slug.
 * Replaces slashes (/) with hyphens (-) and removes any non-URL-safe characters.
 *
 * @param packageName - The package name to be slugified.
 * @returns The slugified package name.
 */ const slugifyPackageName = (packageName)=>{
    const replacementRegex = /\//g;
    if (!packageName) {
        return "";
    }
    const packageNameWithoutScopeSlash = packageName.replace(replacementRegex, "-");
    return slugify(packageNameWithoutScopeSlash, {
        strict: true,
        lower: true
    });
};


/***/ }),

/***/ 71617:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   I6: () => (/* binding */ bindRenderGraphEvents)
/* harmony export */ });
/* unused harmony exports handleNodeMouseover, handleNodeMouseout, handleEdgeMouseover, handleEdgeMouseout */
/* harmony import */ var _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58976);

/**********************************
 *            NODES               *
 **********************************/ const handleNodeMouseover = ({ target, renderGraph })=>{
    const neighborhood = target.closedNeighborhood();
    renderGraph?.elements().difference(neighborhood).filter((ele)=>{
        return !ele.selected();
    }).addClass("dim");
    const forceEdgeColor = renderGraph.scratch("forceEdgeColor");
    if (!forceEdgeColor) {
        target.connectedEdges().map((element)=>{
            const type = element.data("type");
            element.addClass(type);
        });
    }
    target.addClass("hover");
};
const handleNodeMouseout = ({ target, renderGraph })=>{
    const neighborhood = target.neighborhood();
    const focusedElements = renderGraph.collection([
        neighborhood,
        target
    ]);
    renderGraph?.elements().difference(focusedElements).removeClass("dim");
    const forceEdgeColor = renderGraph.scratch("forceEdgeColor");
    if (!forceEdgeColor) {
        target.connectedEdges().map((element)=>{
            element.removeClass([
                _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PRODUCTION,
                _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.DEVELOPMENT,
                _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PEER
            ]);
        });
    }
    target.removeClass("hover");
};
/**********************************
 *            EDGES               *
 **********************************/ const handleEdgeMouseover = ({ target, renderGraph, violations = [] })=>{
    const forceEdgeColor = renderGraph.scratch("forceEdgeColor");
    target.addClass("hover");
    if (forceEdgeColor) return;
    const type = target.data("type");
    const sourcePackageName = target.source().id();
    const targetPackageName = target.target().id();
    const hasViolation = violations.some((violation)=>{
        return violation.sourcePackageName === sourcePackageName && violation.targetPackageName === targetPackageName;
    });
    if (!hasViolation) {
        target.addClass(type);
    }
};
const handleEdgeMouseout = ({ target, renderGraph })=>{
    const forceEdgeColor = renderGraph.scratch("forceEdgeColor");
    target.removeClass("hover");
    if (forceEdgeColor) return;
    target.removeClass([
        _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PRODUCTION,
        _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.DEVELOPMENT,
        _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PEER
    ]);
};
/**********************************
 *         GENERAL               *
 **********************************/ const bindRenderGraphEvents = (args)=>{
    const { renderGraph } = args;
    renderGraph.nodes().on("mouseover", (event)=>handleNodeMouseover({
            ...args,
            target: event.target
        }));
    renderGraph.nodes().on("mouseout", (event)=>handleNodeMouseout({
            ...args,
            target: event.target
        }));
    renderGraph.edges().on("mouseover", (event)=>handleEdgeMouseover({
            ...args,
            target: event.target
        }));
    renderGraph.edges().on("mouseout", (event)=>handleEdgeMouseout({
            ...args,
            target: event.target
        }));
};


/***/ }),

/***/ 52613:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   E: () => (/* binding */ edgeStyles)
/* harmony export */ });
/* harmony import */ var _commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58976);

const colors = {
    light: {
        default: "#e4e4e7",
        development: "#0284c7",
        peer: "#0284c7",
        production: "#059669",
        violation: "#FF0000"
    },
    dark: {
        default: "#27272a",
        development: "#0284c7",
        peer: "#0284c7",
        production: "#059669",
        violation: "#FF0000"
    }
};
const edgeStyles = [
    {
        selector: "edge",
        style: {
            width: 3,
            "target-arrow-color": colors.light.default,
            "target-arrow-shape": "triangle",
            "curve-style": "unbundled-bezier",
            "source-endpoint": "0% 50%",
            "target-endpoint": "0% -50%",
            "arrow-scale": 1.3,
            "line-color": colors.light.default
        }
    },
    {
        selector: "edge.dark",
        style: {
            "line-color": colors.dark.default,
            "target-arrow-color": colors.dark.default
        }
    },
    {
        selector: `edge.${_commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PRODUCTION}`,
        style: {
            "line-color": colors.light.production,
            "target-arrow-color": colors.light.production,
            "overlay-color": colors.light.production,
            width: 3
        }
    },
    {
        selector: `edge.${_commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.DEVELOPMENT}`,
        style: {
            "line-color": colors.light.development,
            "target-arrow-color": colors.light.development,
            "overlay-color": colors.light.development,
            width: 3
        }
    },
    {
        selector: `edge.${_commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PEER}`,
        style: {
            "line-color": colors.light.peer,
            "target-arrow-color": colors.light.peer,
            "overlay-color": colors.light.peer,
            width: 3
        }
    },
    {
        selector: `edge.dark.${_commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PRODUCTION}`,
        style: {
            "line-color": colors.dark.production,
            "target-arrow-color": colors.dark.production,
            "overlay-color": colors.dark.production,
            width: 3
        }
    },
    {
        selector: `edge.dark.${_commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.DEVELOPMENT}`,
        style: {
            "line-color": colors.dark.development,
            "target-arrow-color": colors.dark.development,
            "overlay-color": colors.dark.development,
            width: 3
        }
    },
    {
        selector: `edge.dark.${_commonalityco_utils_core__WEBPACK_IMPORTED_MODULE_0__/* .DependencyType */ .D1.PEER}`,
        style: {
            "line-color": colors.dark.peer,
            "target-arrow-color": colors.dark.peer,
            "overlay-color": colors.dark.peer,
            width: 3
        }
    },
    {
        selector: "edge.violation",
        style: {
            "line-color": colors.dark.violation,
            "target-arrow-color": colors.dark.violation,
            "overlay-color": colors.dark.violation,
            "z-index": 10
        }
    },
    {
        selector: "edge.dim",
        style: {
            "z-index": 0,
            opacity: 0.1
        }
    },
    {
        selector: "edge.dark.dim",
        style: {
            "z-index": 0,
            opacity: 0.2
        }
    },
    {
        selector: "edge.hover",
        style: {
            "z-index": 100,
            "overlay-padding": 8,
            "overlay-opacity": 0.35
        }
    }
];


/***/ }),

/***/ 62836:
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   j: () => (/* binding */ withTiming)
/* harmony export */ });
function withTiming(name, function_) {
    return (...arguments_)=>{
        const startTime = Date.now();
        const result = function_(...arguments_);
        const endTime = Date.now();
        const duration = (endTime - startTime) / 1000;
        console.log({
            seconds: duration.toFixed(2)
        }, `${name} executed`);
        return result;
    };
}


/***/ })

};
;