/* @alwatr/dedupe v5.0.0 */ "use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/main.ts var main_exports = {}; __export(main_exports, { deduplicate: () => deduplicate, definePackage: () => definePackage }); module.exports = __toCommonJS(main_exports); var import_global_this = require("@alwatr/global-this"); var import_package_tracer = require("@alwatr/package-tracer"); var import_polyfill_has_own = require("@alwatr/polyfill-has-own"); __dev_mode__: import_package_tracer.packageTracer.add("@alwatr/dedupe", "5.0.0"); var globalThis_ = (0, import_global_this.getGlobalThis)(); if (typeof globalThis_.__alwatr_dedupe__ === "undefined") { globalThis_.__alwatr_dedupe__ = "5.0.0"; } else { if (globalThis_.__alwatr_dedupe__ === true) { globalThis_.__alwatr_dedupe__ = "1.0.x"; } console.error( new Error("duplication_detected", { cause: { name: "@alwatr/dedupe", oldVersion: globalThis_.__alwatr_dedupe__, newVersion: "5.0.0" } }) ); } var list = {}; function deduplicate(args) { if (Object.hasOwn(list, args.name)) { const error = new Error("duplication_detected", { cause: { name: args.name } }); if (args.strict) { throw error; } else { console.error(error); } } list[args.name] = true; } deduplicate({ name: "@alwatr/dedupe" }); function definePackage(packageName, _) { console.warn("`definePackage` in `@alwatr/dedupe` is deprecated. Use `deduplicate` instead."); deduplicate({ name: packageName }); } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { deduplicate, definePackage }); /*! For license information please see main.cjs.LEGAL.txt */ //# sourceMappingURL=main.cjs.map