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,MAAQ,EAAE,IACZ,MAAM,MAAM,kCAEhB,OAAO,IAAI,eAAe,EAAE,IAAK,YAAY,MAAM,EAAE,MAAO,EAAE,OAClE,EAEJ,QAAQ,eAAiB","file":"/npm/@composita/source-location@0.2.0/dist/cjs/location.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@composita/source-location@0.2.0/dist/cjs/location.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SourceLocation = exports.SourceRange = exports.SourcePosition = void 0;\nconst ts_utility_types_1 = require(\"@composita/ts-utility-types\");\nclass SourcePosition {\n    constructor(line, character) {\n        this.line = line;\n        this.character = character;\n    }\n    static from(other) {\n        return other instanceof SourcePosition ? other : new SourcePosition(other.line, other.character);\n    }\n    compareTo(other) {\n        if (this.line < other.line || (this.line === other.line && this.character < other.character)) {\n            return ts_utility_types_1.CompareValue.LT;\n        }\n        if (this.line > other.line || (this.line === other.line && this.character > other.character)) {\n            return ts_utility_types_1.CompareValue.GT;\n        }\n        return ts_utility_types_1.CompareValue.EQ;\n    }\n}\nexports.SourcePosition = SourcePosition;\nclass SourceRange {\n    constructor(start, end) {\n        this.start = start;\n        this.end = end;\n    }\n    static merge(a, b) {\n        const startACompare = SourcePosition.from(a.start).compareTo(b.start);\n        const endACompare = SourcePosition.from(a.end).compareTo(b.end);\n        const startRange = startACompare === ts_utility_types_1.CompareValue.LT ? a.start : startACompare === ts_utility_types_1.CompareValue.GT ? b.start : a.start;\n        const endRange = endACompare === ts_utility_types_1.CompareValue.LT ? b.end : endACompare === ts_utility_types_1.CompareValue.GT ? a.end : b.end;\n        return new SourceRange(startRange, endRange);\n    }\n}\nexports.SourceRange = SourceRange;\nclass SourceLocation {\n    constructor(uri, range) {\n        this.uri = uri;\n        this.range = range;\n    }\n    static merge(a, b) {\n        if (a.uri !== b.uri) {\n            throw Error('Source location URI missmatch.');\n        }\n        return new SourceLocation(a.uri, SourceRange.merge(a.range, b.range));\n    }\n}\nexports.SourceLocation = SourceLocation;\n"]}