first commit

This commit is contained in:
2024-01-19 11:09:11 +01:00
commit b18af7a943
29473 changed files with 4500547 additions and 0 deletions

208
node_modules/@angular/compiler-cli/bundles/chunk-3IBJEGH3.js generated vendored Executable file
View File

@@ -0,0 +1,208 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/api.mjs
var PerfPhase;
(function(PerfPhase2) {
PerfPhase2[PerfPhase2["Unaccounted"] = 0] = "Unaccounted";
PerfPhase2[PerfPhase2["Setup"] = 1] = "Setup";
PerfPhase2[PerfPhase2["TypeScriptProgramCreate"] = 2] = "TypeScriptProgramCreate";
PerfPhase2[PerfPhase2["Reconciliation"] = 3] = "Reconciliation";
PerfPhase2[PerfPhase2["ResourceUpdate"] = 4] = "ResourceUpdate";
PerfPhase2[PerfPhase2["TypeScriptDiagnostics"] = 5] = "TypeScriptDiagnostics";
PerfPhase2[PerfPhase2["Analysis"] = 6] = "Analysis";
PerfPhase2[PerfPhase2["Resolve"] = 7] = "Resolve";
PerfPhase2[PerfPhase2["CycleDetection"] = 8] = "CycleDetection";
PerfPhase2[PerfPhase2["TcbGeneration"] = 9] = "TcbGeneration";
PerfPhase2[PerfPhase2["TcbUpdateProgram"] = 10] = "TcbUpdateProgram";
PerfPhase2[PerfPhase2["TypeScriptEmit"] = 11] = "TypeScriptEmit";
PerfPhase2[PerfPhase2["Compile"] = 12] = "Compile";
PerfPhase2[PerfPhase2["TtcAutocompletion"] = 13] = "TtcAutocompletion";
PerfPhase2[PerfPhase2["TtcDiagnostics"] = 14] = "TtcDiagnostics";
PerfPhase2[PerfPhase2["TtcSymbol"] = 15] = "TtcSymbol";
PerfPhase2[PerfPhase2["LsReferencesAndRenames"] = 16] = "LsReferencesAndRenames";
PerfPhase2[PerfPhase2["LsQuickInfo"] = 17] = "LsQuickInfo";
PerfPhase2[PerfPhase2["LsDefinition"] = 18] = "LsDefinition";
PerfPhase2[PerfPhase2["LsCompletions"] = 19] = "LsCompletions";
PerfPhase2[PerfPhase2["LsTcb"] = 20] = "LsTcb";
PerfPhase2[PerfPhase2["LsDiagnostics"] = 21] = "LsDiagnostics";
PerfPhase2[PerfPhase2["LsComponentLocations"] = 22] = "LsComponentLocations";
PerfPhase2[PerfPhase2["LsSignatureHelp"] = 23] = "LsSignatureHelp";
PerfPhase2[PerfPhase2["OutliningSpans"] = 24] = "OutliningSpans";
PerfPhase2[PerfPhase2["LAST"] = 25] = "LAST";
PerfPhase2[PerfPhase2["LsCodeFixes"] = 26] = "LsCodeFixes";
PerfPhase2[PerfPhase2["LsCodeFixesAll"] = 27] = "LsCodeFixesAll";
})(PerfPhase || (PerfPhase = {}));
var PerfEvent;
(function(PerfEvent2) {
PerfEvent2[PerfEvent2["InputDtsFile"] = 0] = "InputDtsFile";
PerfEvent2[PerfEvent2["InputTsFile"] = 1] = "InputTsFile";
PerfEvent2[PerfEvent2["AnalyzeComponent"] = 2] = "AnalyzeComponent";
PerfEvent2[PerfEvent2["AnalyzeDirective"] = 3] = "AnalyzeDirective";
PerfEvent2[PerfEvent2["AnalyzeInjectable"] = 4] = "AnalyzeInjectable";
PerfEvent2[PerfEvent2["AnalyzeNgModule"] = 5] = "AnalyzeNgModule";
PerfEvent2[PerfEvent2["AnalyzePipe"] = 6] = "AnalyzePipe";
PerfEvent2[PerfEvent2["TraitAnalyze"] = 7] = "TraitAnalyze";
PerfEvent2[PerfEvent2["TraitReuseAnalysis"] = 8] = "TraitReuseAnalysis";
PerfEvent2[PerfEvent2["SourceFilePhysicalChange"] = 9] = "SourceFilePhysicalChange";
PerfEvent2[PerfEvent2["SourceFileLogicalChange"] = 10] = "SourceFileLogicalChange";
PerfEvent2[PerfEvent2["SourceFileReuseAnalysis"] = 11] = "SourceFileReuseAnalysis";
PerfEvent2[PerfEvent2["GenerateTcb"] = 12] = "GenerateTcb";
PerfEvent2[PerfEvent2["SkipGenerateTcbNoInline"] = 13] = "SkipGenerateTcbNoInline";
PerfEvent2[PerfEvent2["ReuseTypeCheckFile"] = 14] = "ReuseTypeCheckFile";
PerfEvent2[PerfEvent2["UpdateTypeCheckProgram"] = 15] = "UpdateTypeCheckProgram";
PerfEvent2[PerfEvent2["EmitSkipSourceFile"] = 16] = "EmitSkipSourceFile";
PerfEvent2[PerfEvent2["EmitSourceFile"] = 17] = "EmitSourceFile";
PerfEvent2[PerfEvent2["LAST"] = 18] = "LAST";
})(PerfEvent || (PerfEvent = {}));
var PerfCheckpoint;
(function(PerfCheckpoint2) {
PerfCheckpoint2[PerfCheckpoint2["Initial"] = 0] = "Initial";
PerfCheckpoint2[PerfCheckpoint2["TypeScriptProgramCreate"] = 1] = "TypeScriptProgramCreate";
PerfCheckpoint2[PerfCheckpoint2["PreAnalysis"] = 2] = "PreAnalysis";
PerfCheckpoint2[PerfCheckpoint2["Analysis"] = 3] = "Analysis";
PerfCheckpoint2[PerfCheckpoint2["Resolve"] = 4] = "Resolve";
PerfCheckpoint2[PerfCheckpoint2["TtcGeneration"] = 5] = "TtcGeneration";
PerfCheckpoint2[PerfCheckpoint2["TtcUpdateProgram"] = 6] = "TtcUpdateProgram";
PerfCheckpoint2[PerfCheckpoint2["PreEmit"] = 7] = "PreEmit";
PerfCheckpoint2[PerfCheckpoint2["Emit"] = 8] = "Emit";
PerfCheckpoint2[PerfCheckpoint2["LAST"] = 9] = "LAST";
})(PerfCheckpoint || (PerfCheckpoint = {}));
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/noop.mjs
var NoopPerfRecorder = class {
eventCount() {
}
memory() {
}
phase() {
return PerfPhase.Unaccounted;
}
inPhase(phase, fn) {
return fn();
}
reset() {
}
};
var NOOP_PERF_RECORDER = new NoopPerfRecorder();
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/clock.mjs
function mark() {
return process.hrtime();
}
function timeSinceInMicros(mark2) {
const delta = process.hrtime(mark2);
return delta[0] * 1e6 + Math.floor(delta[1] / 1e3);
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/perf/src/recorder.mjs
var ActivePerfRecorder = class {
static zeroedToNow() {
return new ActivePerfRecorder(mark());
}
constructor(zeroTime) {
this.zeroTime = zeroTime;
this.currentPhase = PerfPhase.Unaccounted;
this.currentPhaseEntered = this.zeroTime;
this.counters = Array(PerfEvent.LAST).fill(0);
this.phaseTime = Array(PerfPhase.LAST).fill(0);
this.bytes = Array(PerfCheckpoint.LAST).fill(0);
this.memory(PerfCheckpoint.Initial);
}
reset() {
this.counters = Array(PerfEvent.LAST).fill(0);
this.phaseTime = Array(PerfPhase.LAST).fill(0);
this.bytes = Array(PerfCheckpoint.LAST).fill(0);
this.zeroTime = mark();
this.currentPhase = PerfPhase.Unaccounted;
this.currentPhaseEntered = this.zeroTime;
}
memory(after) {
this.bytes[after] = process.memoryUsage().heapUsed;
}
phase(phase) {
const previous = this.currentPhase;
this.phaseTime[this.currentPhase] += timeSinceInMicros(this.currentPhaseEntered);
this.currentPhase = phase;
this.currentPhaseEntered = mark();
return previous;
}
inPhase(phase, fn) {
const previousPhase = this.phase(phase);
try {
return fn();
} finally {
this.phase(previousPhase);
}
}
eventCount(counter, incrementBy = 1) {
this.counters[counter] += incrementBy;
}
finalize() {
this.phase(PerfPhase.Unaccounted);
const results = {
events: {},
phases: {},
memory: {}
};
for (let i = 0; i < this.phaseTime.length; i++) {
if (this.phaseTime[i] > 0) {
results.phases[PerfPhase[i]] = this.phaseTime[i];
}
}
for (let i = 0; i < this.phaseTime.length; i++) {
if (this.counters[i] > 0) {
results.events[PerfEvent[i]] = this.counters[i];
}
}
for (let i = 0; i < this.bytes.length; i++) {
if (this.bytes[i] > 0) {
results.memory[PerfCheckpoint[i]] = this.bytes[i];
}
}
return results;
}
};
var DelegatingPerfRecorder = class {
constructor(target) {
this.target = target;
}
eventCount(counter, incrementBy) {
this.target.eventCount(counter, incrementBy);
}
phase(phase) {
return this.target.phase(phase);
}
inPhase(phase, fn) {
const previousPhase = this.target.phase(phase);
try {
return fn();
} finally {
this.target.phase(previousPhase);
}
}
memory(after) {
this.target.memory(after);
}
reset() {
this.target.reset();
}
};
export {
PerfPhase,
PerfEvent,
PerfCheckpoint,
ActivePerfRecorder,
DelegatingPerfRecorder
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-3IBJEGH3.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../packages/compiler-cli/src/ngtsc/perf/src/api.ts", "../../../../../../packages/compiler-cli/src/ngtsc/perf/src/noop.ts", "../../../../../../packages/compiler-cli/src/ngtsc/perf/src/clock.ts", "../../../../../../packages/compiler-cli/src/ngtsc/perf/src/recorder.ts"],
"mappings": ";;;;;;AAWA,IAAY;CAAZ,SAAYA,YAAS;AAInB,EAAAA,WAAAA,WAAA,iBAAA,KAAA;AAOA,EAAAA,WAAAA,WAAA,WAAA,KAAA;AAQA,EAAAA,WAAAA,WAAA,6BAAA,KAAA;AAOA,EAAAA,WAAAA,WAAA,oBAAA,KAAA;AAOA,EAAAA,WAAAA,WAAA,oBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,2BAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,cAAA,KAAA;AAMA,EAAAA,WAAAA,WAAA,aAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,oBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,mBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,sBAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,oBAAA,MAAA;AAQA,EAAAA,WAAAA,WAAA,aAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,uBAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,oBAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,eAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,4BAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,iBAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,kBAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,mBAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,WAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,mBAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,0BAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,qBAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,oBAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,UAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,iBAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,oBAAA,MAAA;AACF,GA/JY,cAAA,YAAS,CAAA,EAAA;AAoKrB,IAAY;CAAZ,SAAYC,YAAS;AAInB,EAAAA,WAAAA,WAAA,kBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,iBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,sBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,sBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,uBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,qBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,iBAAA,KAAA;AAOA,EAAAA,WAAAA,WAAA,kBAAA,KAAA;AAMA,EAAAA,WAAAA,WAAA,wBAAA,KAAA;AAKA,EAAAA,WAAAA,WAAA,8BAAA,KAAA;AAMA,EAAAA,WAAAA,WAAA,6BAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,6BAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,iBAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,6BAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,wBAAA,MAAA;AAMA,EAAAA,WAAAA,WAAA,4BAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,wBAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,oBAAA,MAAA;AAKA,EAAAA,WAAAA,WAAA,UAAA,MAAA;AACF,GAvGY,cAAA,YAAS,CAAA,EAAA;AA6GrB,IAAY;CAAZ,SAAYC,iBAAc;AAKxB,EAAAA,gBAAAA,gBAAA,aAAA,KAAA;AAKA,EAAAA,gBAAAA,gBAAA,6BAAA,KAAA;AASA,EAAAA,gBAAAA,gBAAA,iBAAA,KAAA;AAKA,EAAAA,gBAAAA,gBAAA,cAAA,KAAA;AAKA,EAAAA,gBAAAA,gBAAA,aAAA,KAAA;AAKA,EAAAA,gBAAAA,gBAAA,mBAAA,KAAA;AAKA,EAAAA,gBAAAA,gBAAA,sBAAA,KAAA;AAQA,EAAAA,gBAAAA,gBAAA,aAAA,KAAA;AAKA,EAAAA,gBAAAA,gBAAA,UAAA,KAAA;AAKA,EAAAA,gBAAAA,gBAAA,UAAA,KAAA;AACF,GA1DY,mBAAA,iBAAc,CAAA,EAAA;;;ACnR1B,IAAM,mBAAN,MAAsB;EACpB,aAAU;EAAU;EAEpB,SAAM;EAAU;EAEhB,QAAK;AACH,WAAO,UAAU;EACnB;EAEA,QAAW,OAAkB,IAAW;AACtC,WAAO,GAAE;EACX;EAEA,QAAK;EAAU;;AAIV,IAAM,qBAAmC,IAAI,iBAAgB;;;ACb9D,SAAU,OAAI;AAClB,SAAO,QAAQ,OAAM;AACvB;AAEM,SAAU,kBAAkBC,OAAY;AAC5C,QAAM,QAAQ,QAAQ,OAAOA,KAAI;AACjC,SAAQ,MAAM,KAAK,MAAW,KAAK,MAAM,MAAM,KAAK,GAAI;AAC1D;;;ACIM,IAAO,qBAAP,MAAyB;EAW7B,OAAO,cAAW;AAChB,WAAO,IAAI,mBAAmB,KAAI,CAAE;EACtC;EAEA,YAA4B,UAAgB;AAAhB,SAAA,WAAA;AAVpB,SAAA,eAAe,UAAU;AAW/B,SAAK,sBAAsB,KAAK;AAChC,SAAK,WAAW,MAAM,UAAU,IAAI,EAAE,KAAK,CAAC;AAC5C,SAAK,YAAY,MAAM,UAAU,IAAI,EAAE,KAAK,CAAC;AAC7C,SAAK,QAAQ,MAAM,eAAe,IAAI,EAAE,KAAK,CAAC;AAG9C,SAAK,OAAO,eAAe,OAAO;EACpC;EAEA,QAAK;AACH,SAAK,WAAW,MAAM,UAAU,IAAI,EAAE,KAAK,CAAC;AAC5C,SAAK,YAAY,MAAM,UAAU,IAAI,EAAE,KAAK,CAAC;AAC7C,SAAK,QAAQ,MAAM,eAAe,IAAI,EAAE,KAAK,CAAC;AAC9C,SAAK,WAAW,KAAI;AACpB,SAAK,eAAe,UAAU;AAC9B,SAAK,sBAAsB,KAAK;EAClC;EAEA,OAAO,OAAqB;AAC1B,SAAK,MAAM,SAAS,QAAQ,YAAW,EAAG;EAC5C;EAEA,MAAM,OAAgB;AACpB,UAAM,WAAW,KAAK;AACtB,SAAK,UAAU,KAAK,iBAAiB,kBAAkB,KAAK,mBAAmB;AAC/E,SAAK,eAAe;AACpB,SAAK,sBAAsB,KAAI;AAC/B,WAAO;EACT;EAEA,QAAW,OAAkB,IAAW;AACtC,UAAM,gBAAgB,KAAK,MAAM,KAAK;AACtC,QAAI;AACF,aAAO,GAAE;;AAET,WAAK,MAAM,aAAa;;EAE5B;EAEA,WAAW,SAAoB,cAAsB,GAAC;AACpD,SAAK,SAAS,YAAY;EAC5B;EAKA,WAAQ;AAEN,SAAK,MAAM,UAAU,WAAW;AAEhC,UAAM,UAAuB;MAC3B,QAAQ,CAAA;MACR,QAAQ,CAAA;MACR,QAAQ,CAAA;;AAGV,aAAS,IAAI,GAAG,IAAI,KAAK,UAAU,QAAQ,KAAK;AAC9C,UAAI,KAAK,UAAU,KAAK,GAAG;AACzB,gBAAQ,OAAO,UAAU,MAAM,KAAK,UAAU;;;AAIlD,aAAS,IAAI,GAAG,IAAI,KAAK,UAAU,QAAQ,KAAK;AAC9C,UAAI,KAAK,SAAS,KAAK,GAAG;AACxB,gBAAQ,OAAO,UAAU,MAAM,KAAK,SAAS;;;AAIjD,aAAS,IAAI,GAAG,IAAI,KAAK,MAAM,QAAQ,KAAK;AAC1C,UAAI,KAAK,MAAM,KAAK,GAAG;AACrB,gBAAQ,OAAO,eAAe,MAAM,KAAK,MAAM;;;AAInD,WAAO;EACT;;AAUI,IAAO,yBAAP,MAA6B;EACjC,YAAmB,QAAoB;AAApB,SAAA,SAAA;EAAuB;EAE1C,WAAW,SAAoB,aAAoB;AACjD,SAAK,OAAO,WAAW,SAAS,WAAW;EAC7C;EAEA,MAAM,OAAgB;AACpB,WAAO,KAAK,OAAO,MAAM,KAAK;EAChC;EAEA,QAAW,OAAkB,IAAW;AAGtC,UAAM,gBAAgB,KAAK,OAAO,MAAM,KAAK;AAC7C,QAAI;AACF,aAAO,GAAE;;AAET,WAAK,OAAO,MAAM,aAAa;;EAEnC;EAEA,OAAO,OAAqB;AAC1B,SAAK,OAAO,OAAO,KAAK;EAC1B;EAEA,QAAK;AACH,SAAK,OAAO,MAAK;EACnB;;",
"names": ["PerfPhase", "PerfEvent", "PerfCheckpoint", "mark"]
}

7640
node_modules/@angular/compiler-cli/bundles/chunk-B5URQIVL.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

410
node_modules/@angular/compiler-cli/bundles/chunk-CSOLWS7O.js generated vendored Executable file
View File

@@ -0,0 +1,410 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
__require
} from "./chunk-XI2RTGAL.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/util.mjs
var TS_DTS_JS_EXTENSION = /(?:\.d)?\.ts$|\.js$/;
function normalizeSeparators(path) {
return path.replace(/\\/g, "/");
}
function stripExtension(path) {
return path.replace(TS_DTS_JS_EXTENSION, "");
}
function getSourceFileOrError(program, fileName) {
const sf = program.getSourceFile(fileName);
if (sf === void 0) {
throw new Error(`Program does not contain "${fileName}" - available files are ${program.getSourceFiles().map((sf2) => sf2.fileName).join(", ")}`);
}
return sf;
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/invalid_file_system.mjs
var InvalidFileSystem = class {
exists(path) {
throw makeError();
}
readFile(path) {
throw makeError();
}
readFileBuffer(path) {
throw makeError();
}
writeFile(path, data, exclusive) {
throw makeError();
}
removeFile(path) {
throw makeError();
}
symlink(target, path) {
throw makeError();
}
readdir(path) {
throw makeError();
}
lstat(path) {
throw makeError();
}
stat(path) {
throw makeError();
}
pwd() {
throw makeError();
}
chdir(path) {
throw makeError();
}
extname(path) {
throw makeError();
}
copyFile(from, to) {
throw makeError();
}
moveFile(from, to) {
throw makeError();
}
ensureDir(path) {
throw makeError();
}
removeDeep(path) {
throw makeError();
}
isCaseSensitive() {
throw makeError();
}
resolve(...paths) {
throw makeError();
}
dirname(file) {
throw makeError();
}
join(basePath, ...paths) {
throw makeError();
}
isRoot(path) {
throw makeError();
}
isRooted(path) {
throw makeError();
}
relative(from, to) {
throw makeError();
}
basename(filePath, extension) {
throw makeError();
}
realpath(filePath) {
throw makeError();
}
getDefaultLibLocation() {
throw makeError();
}
normalize(path) {
throw makeError();
}
};
function makeError() {
return new Error("FileSystem has not been configured. Please call `setFileSystem()` before calling this method.");
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/helpers.mjs
var fs = new InvalidFileSystem();
function getFileSystem() {
return fs;
}
function setFileSystem(fileSystem) {
fs = fileSystem;
}
function absoluteFrom(path) {
if (!fs.isRooted(path)) {
throw new Error(`Internal Error: absoluteFrom(${path}): path is not absolute`);
}
return fs.resolve(path);
}
var ABSOLUTE_PATH = Symbol("AbsolutePath");
function absoluteFromSourceFile(sf) {
const sfWithPatch = sf;
if (sfWithPatch[ABSOLUTE_PATH] === void 0) {
sfWithPatch[ABSOLUTE_PATH] = fs.resolve(sfWithPatch.fileName);
}
return sfWithPatch[ABSOLUTE_PATH];
}
function relativeFrom(path) {
const normalized = normalizeSeparators(path);
if (fs.isRooted(normalized)) {
throw new Error(`Internal Error: relativeFrom(${path}): path is not relative`);
}
return normalized;
}
function dirname(file) {
return fs.dirname(file);
}
function join(basePath, ...paths) {
return fs.join(basePath, ...paths);
}
function resolve(basePath, ...paths) {
return fs.resolve(basePath, ...paths);
}
function isRoot(path) {
return fs.isRoot(path);
}
function isRooted(path) {
return fs.isRooted(path);
}
function relative(from, to) {
return fs.relative(from, to);
}
function basename(filePath, extension) {
return fs.basename(filePath, extension);
}
function isLocalRelativePath(relativePath) {
return !isRooted(relativePath) && !relativePath.startsWith("..");
}
function toRelativeImport(relativePath) {
return isLocalRelativePath(relativePath) ? `./${relativePath}` : relativePath;
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/compiler_host.mjs
import * as os from "os";
import ts from "typescript";
var NgtscCompilerHost = class {
constructor(fs3, options = {}) {
this.fs = fs3;
this.options = options;
}
getSourceFile(fileName, languageVersion) {
const text = this.readFile(fileName);
return text !== void 0 ? ts.createSourceFile(fileName, text, languageVersion, true) : void 0;
}
getDefaultLibFileName(options) {
return this.fs.join(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options));
}
getDefaultLibLocation() {
return this.fs.getDefaultLibLocation();
}
writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles) {
const path = absoluteFrom(fileName);
this.fs.ensureDir(this.fs.dirname(path));
this.fs.writeFile(path, data);
}
getCurrentDirectory() {
return this.fs.pwd();
}
getCanonicalFileName(fileName) {
return this.useCaseSensitiveFileNames() ? fileName : fileName.toLowerCase();
}
useCaseSensitiveFileNames() {
return this.fs.isCaseSensitive();
}
getNewLine() {
switch (this.options.newLine) {
case ts.NewLineKind.CarriageReturnLineFeed:
return "\r\n";
case ts.NewLineKind.LineFeed:
return "\n";
default:
return os.EOL;
}
}
fileExists(fileName) {
const absPath = this.fs.resolve(fileName);
return this.fs.exists(absPath) && this.fs.stat(absPath).isFile();
}
readFile(fileName) {
const absPath = this.fs.resolve(fileName);
if (!this.fileExists(absPath)) {
return void 0;
}
return this.fs.readFile(absPath);
}
realpath(path) {
return this.fs.realpath(this.fs.resolve(path));
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/logical.mjs
var LogicalProjectPath = {
relativePathBetween: function(from, to) {
const relativePath = relative(dirname(resolve(from)), resolve(to));
return toRelativeImport(relativePath);
}
};
var LogicalFileSystem = class {
constructor(rootDirs, compilerHost) {
this.compilerHost = compilerHost;
this.cache = /* @__PURE__ */ new Map();
this.rootDirs = rootDirs.concat([]).sort((a, b) => b.length - a.length);
this.canonicalRootDirs = this.rootDirs.map((dir) => this.compilerHost.getCanonicalFileName(dir));
}
logicalPathOfSf(sf) {
return this.logicalPathOfFile(absoluteFromSourceFile(sf));
}
logicalPathOfFile(physicalFile) {
if (!this.cache.has(physicalFile)) {
const canonicalFilePath = this.compilerHost.getCanonicalFileName(physicalFile);
let logicalFile = null;
for (let i = 0; i < this.rootDirs.length; i++) {
const rootDir = this.rootDirs[i];
const canonicalRootDir = this.canonicalRootDirs[i];
if (isWithinBasePath(canonicalRootDir, canonicalFilePath)) {
logicalFile = this.createLogicalProjectPath(physicalFile, rootDir);
if (logicalFile.indexOf("/node_modules/") !== -1) {
logicalFile = null;
} else {
break;
}
}
}
this.cache.set(physicalFile, logicalFile);
}
return this.cache.get(physicalFile);
}
createLogicalProjectPath(file, rootDir) {
const logicalPath = stripExtension(file.slice(rootDir.length));
return logicalPath.startsWith("/") ? logicalPath : "/" + logicalPath;
}
};
function isWithinBasePath(base, path) {
return isLocalRelativePath(relative(base, path));
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/file_system/src/node_js_file_system.mjs
import fs2 from "fs";
import module from "module";
import * as p from "path";
import { fileURLToPath } from "url";
var NodeJSPathManipulation = class {
pwd() {
return this.normalize(process.cwd());
}
chdir(dir) {
process.chdir(dir);
}
resolve(...paths) {
return this.normalize(p.resolve(...paths));
}
dirname(file) {
return this.normalize(p.dirname(file));
}
join(basePath, ...paths) {
return this.normalize(p.join(basePath, ...paths));
}
isRoot(path) {
return this.dirname(path) === this.normalize(path);
}
isRooted(path) {
return p.isAbsolute(path);
}
relative(from, to) {
return this.normalize(p.relative(from, to));
}
basename(filePath, extension) {
return p.basename(filePath, extension);
}
extname(path) {
return p.extname(path);
}
normalize(path) {
return path.replace(/\\/g, "/");
}
};
var isCommonJS = typeof __filename !== "undefined";
var currentFileUrl = isCommonJS ? null : import.meta.url;
var currentFileName = isCommonJS ? __filename : fileURLToPath(currentFileUrl);
var NodeJSReadonlyFileSystem = class extends NodeJSPathManipulation {
constructor() {
super(...arguments);
this._caseSensitive = void 0;
}
isCaseSensitive() {
if (this._caseSensitive === void 0) {
this._caseSensitive = !fs2.existsSync(this.normalize(toggleCase(currentFileName)));
}
return this._caseSensitive;
}
exists(path) {
return fs2.existsSync(path);
}
readFile(path) {
return fs2.readFileSync(path, "utf8");
}
readFileBuffer(path) {
return fs2.readFileSync(path);
}
readdir(path) {
return fs2.readdirSync(path);
}
lstat(path) {
return fs2.lstatSync(path);
}
stat(path) {
return fs2.statSync(path);
}
realpath(path) {
return this.resolve(fs2.realpathSync(path));
}
getDefaultLibLocation() {
const requireFn = isCommonJS ? __require : module.createRequire(currentFileUrl);
return this.resolve(requireFn.resolve("typescript"), "..");
}
};
var NodeJSFileSystem = class extends NodeJSReadonlyFileSystem {
writeFile(path, data, exclusive = false) {
fs2.writeFileSync(path, data, exclusive ? { flag: "wx" } : void 0);
}
removeFile(path) {
fs2.unlinkSync(path);
}
symlink(target, path) {
fs2.symlinkSync(target, path);
}
copyFile(from, to) {
fs2.copyFileSync(from, to);
}
moveFile(from, to) {
fs2.renameSync(from, to);
}
ensureDir(path) {
fs2.mkdirSync(path, { recursive: true });
}
removeDeep(path) {
fs2.rmdirSync(path, { recursive: true });
}
};
function toggleCase(str) {
return str.replace(/\w/g, (ch) => ch.toUpperCase() === ch ? ch.toLowerCase() : ch.toUpperCase());
}
export {
stripExtension,
getSourceFileOrError,
getFileSystem,
setFileSystem,
absoluteFrom,
absoluteFromSourceFile,
relativeFrom,
dirname,
join,
resolve,
isRoot,
isRooted,
relative,
basename,
isLocalRelativePath,
toRelativeImport,
NgtscCompilerHost,
LogicalProjectPath,
LogicalFileSystem,
NodeJSFileSystem
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-CSOLWS7O.js.map

File diff suppressed because one or more lines are too long

1644
node_modules/@angular/compiler-cli/bundles/chunk-G64XB6AU.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1059
node_modules/@angular/compiler-cli/bundles/chunk-GT7FGHLZ.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

419
node_modules/@angular/compiler-cli/bundles/chunk-GYHDNUIK.js generated vendored Executable file
View File

@@ -0,0 +1,419 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file.mjs
import { decode, encode } from "@jridgewell/sourcemap-codec";
import mapHelpers from "convert-source-map";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/segment_marker.mjs
function compareSegments(a, b) {
return a.position - b.position;
}
function offsetSegment(startOfLinePositions, marker, offset) {
if (offset === 0) {
return marker;
}
let line = marker.line;
const position = marker.position + offset;
while (line < startOfLinePositions.length - 1 && startOfLinePositions[line + 1] <= position) {
line++;
}
while (line > 0 && startOfLinePositions[line] > position) {
line--;
}
const column = position - startOfLinePositions[line];
return { line, column, position, next: void 0 };
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file.mjs
function removeSourceMapComments(contents) {
return mapHelpers.removeMapFileComments(mapHelpers.removeComments(contents)).replace(/\n\n$/, "\n");
}
var SourceFile = class {
constructor(sourcePath, contents, rawMap, sources, fs) {
this.sourcePath = sourcePath;
this.contents = contents;
this.rawMap = rawMap;
this.sources = sources;
this.fs = fs;
this.contents = removeSourceMapComments(contents);
this.startOfLinePositions = computeStartOfLinePositions(this.contents);
this.flattenedMappings = this.flattenMappings();
}
renderFlattenedSourceMap() {
const sources = new IndexedMap();
const names = new IndexedSet();
const mappings = [];
const sourcePathDir = this.fs.dirname(this.sourcePath);
const relativeSourcePathCache = new Cache((input) => this.fs.relative(sourcePathDir, input));
for (const mapping of this.flattenedMappings) {
const sourceIndex = sources.set(relativeSourcePathCache.get(mapping.originalSource.sourcePath), mapping.originalSource.contents);
const mappingArray = [
mapping.generatedSegment.column,
sourceIndex,
mapping.originalSegment.line,
mapping.originalSegment.column
];
if (mapping.name !== void 0) {
const nameIndex = names.add(mapping.name);
mappingArray.push(nameIndex);
}
const line = mapping.generatedSegment.line;
while (line >= mappings.length) {
mappings.push([]);
}
mappings[line].push(mappingArray);
}
const sourceMap = {
version: 3,
file: this.fs.relative(sourcePathDir, this.sourcePath),
sources: sources.keys,
names: names.values,
mappings: encode(mappings),
sourcesContent: sources.values
};
return sourceMap;
}
getOriginalLocation(line, column) {
if (this.flattenedMappings.length === 0) {
return null;
}
let position;
if (line < this.startOfLinePositions.length) {
position = this.startOfLinePositions[line] + column;
} else {
position = this.contents.length;
}
const locationSegment = { line, column, position, next: void 0 };
let mappingIndex = findLastMappingIndexBefore(this.flattenedMappings, locationSegment, false, 0);
if (mappingIndex < 0) {
mappingIndex = 0;
}
const { originalSegment, originalSource, generatedSegment } = this.flattenedMappings[mappingIndex];
const offset = locationSegment.position - generatedSegment.position;
const offsetOriginalSegment = offsetSegment(originalSource.startOfLinePositions, originalSegment, offset);
return {
file: originalSource.sourcePath,
line: offsetOriginalSegment.line,
column: offsetOriginalSegment.column
};
}
flattenMappings() {
const mappings = parseMappings(this.rawMap && this.rawMap.map, this.sources, this.startOfLinePositions);
ensureOriginalSegmentLinks(mappings);
const flattenedMappings = [];
for (let mappingIndex = 0; mappingIndex < mappings.length; mappingIndex++) {
const aToBmapping = mappings[mappingIndex];
const bSource = aToBmapping.originalSource;
if (bSource.flattenedMappings.length === 0) {
flattenedMappings.push(aToBmapping);
continue;
}
const incomingStart = aToBmapping.originalSegment;
const incomingEnd = incomingStart.next;
let outgoingStartIndex = findLastMappingIndexBefore(bSource.flattenedMappings, incomingStart, false, 0);
if (outgoingStartIndex < 0) {
outgoingStartIndex = 0;
}
const outgoingEndIndex = incomingEnd !== void 0 ? findLastMappingIndexBefore(bSource.flattenedMappings, incomingEnd, true, outgoingStartIndex) : bSource.flattenedMappings.length - 1;
for (let bToCmappingIndex = outgoingStartIndex; bToCmappingIndex <= outgoingEndIndex; bToCmappingIndex++) {
const bToCmapping = bSource.flattenedMappings[bToCmappingIndex];
flattenedMappings.push(mergeMappings(this, aToBmapping, bToCmapping));
}
}
return flattenedMappings;
}
};
function findLastMappingIndexBefore(mappings, marker, exclusive, lowerIndex) {
let upperIndex = mappings.length - 1;
const test = exclusive ? -1 : 0;
if (compareSegments(mappings[lowerIndex].generatedSegment, marker) > test) {
return -1;
}
let matchingIndex = -1;
while (lowerIndex <= upperIndex) {
const index = upperIndex + lowerIndex >> 1;
if (compareSegments(mappings[index].generatedSegment, marker) <= test) {
matchingIndex = index;
lowerIndex = index + 1;
} else {
upperIndex = index - 1;
}
}
return matchingIndex;
}
function mergeMappings(generatedSource, ab, bc) {
const name = bc.name || ab.name;
const diff = compareSegments(bc.generatedSegment, ab.originalSegment);
if (diff > 0) {
return {
name,
generatedSegment: offsetSegment(generatedSource.startOfLinePositions, ab.generatedSegment, diff),
originalSource: bc.originalSource,
originalSegment: bc.originalSegment
};
} else {
return {
name,
generatedSegment: ab.generatedSegment,
originalSource: bc.originalSource,
originalSegment: offsetSegment(bc.originalSource.startOfLinePositions, bc.originalSegment, -diff)
};
}
}
function parseMappings(rawMap, sources, generatedSourceStartOfLinePositions) {
if (rawMap === null) {
return [];
}
const rawMappings = decode(rawMap.mappings);
if (rawMappings === null) {
return [];
}
const mappings = [];
for (let generatedLine = 0; generatedLine < rawMappings.length; generatedLine++) {
const generatedLineMappings = rawMappings[generatedLine];
for (const rawMapping of generatedLineMappings) {
if (rawMapping.length >= 4) {
const originalSource = sources[rawMapping[1]];
if (originalSource === null || originalSource === void 0) {
continue;
}
const generatedColumn = rawMapping[0];
const name = rawMapping.length === 5 ? rawMap.names[rawMapping[4]] : void 0;
const line = rawMapping[2];
const column = rawMapping[3];
const generatedSegment = {
line: generatedLine,
column: generatedColumn,
position: generatedSourceStartOfLinePositions[generatedLine] + generatedColumn,
next: void 0
};
const originalSegment = {
line,
column,
position: originalSource.startOfLinePositions[line] + column,
next: void 0
};
mappings.push({ name, generatedSegment, originalSegment, originalSource });
}
}
}
return mappings;
}
function extractOriginalSegments(mappings) {
const originalSegments = /* @__PURE__ */ new Map();
for (const mapping of mappings) {
const originalSource = mapping.originalSource;
if (!originalSegments.has(originalSource)) {
originalSegments.set(originalSource, []);
}
const segments = originalSegments.get(originalSource);
segments.push(mapping.originalSegment);
}
originalSegments.forEach((segmentMarkers) => segmentMarkers.sort(compareSegments));
return originalSegments;
}
function ensureOriginalSegmentLinks(mappings) {
const segmentsBySource = extractOriginalSegments(mappings);
segmentsBySource.forEach((markers) => {
for (let i = 0; i < markers.length - 1; i++) {
markers[i].next = markers[i + 1];
}
});
}
function computeStartOfLinePositions(str) {
const NEWLINE_MARKER_OFFSET = 1;
const lineLengths = computeLineLengths(str);
const startPositions = [0];
for (let i = 0; i < lineLengths.length - 1; i++) {
startPositions.push(startPositions[i] + lineLengths[i] + NEWLINE_MARKER_OFFSET);
}
return startPositions;
}
function computeLineLengths(str) {
return str.split(/\n/).map((s) => s.length);
}
var IndexedMap = class {
constructor() {
this.map = /* @__PURE__ */ new Map();
this.keys = [];
this.values = [];
}
set(key, value) {
if (this.map.has(key)) {
return this.map.get(key);
}
const index = this.values.push(value) - 1;
this.keys.push(key);
this.map.set(key, index);
return index;
}
};
var IndexedSet = class {
constructor() {
this.map = /* @__PURE__ */ new Map();
this.values = [];
}
add(value) {
if (this.map.has(value)) {
return this.map.get(value);
}
const index = this.values.push(value) - 1;
this.map.set(value, index);
return index;
}
};
var Cache = class {
constructor(computeFn) {
this.computeFn = computeFn;
this.map = /* @__PURE__ */ new Map();
}
get(input) {
if (!this.map.has(input)) {
this.map.set(input, this.computeFn(input));
}
return this.map.get(input);
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file_loader.mjs
import mapHelpers2 from "convert-source-map";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/content_origin.mjs
var ContentOrigin;
(function(ContentOrigin2) {
ContentOrigin2[ContentOrigin2["Provided"] = 0] = "Provided";
ContentOrigin2[ContentOrigin2["Inline"] = 1] = "Inline";
ContentOrigin2[ContentOrigin2["FileSystem"] = 2] = "FileSystem";
})(ContentOrigin || (ContentOrigin = {}));
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/sourcemaps/src/source_file_loader.mjs
var SCHEME_MATCHER = /^([a-z][a-z0-9.-]*):\/\//i;
var SourceFileLoader = class {
constructor(fs, logger, schemeMap) {
this.fs = fs;
this.logger = logger;
this.schemeMap = schemeMap;
this.currentPaths = [];
}
loadSourceFile(sourcePath, contents = null, mapAndPath = null) {
const contentsOrigin = contents !== null ? ContentOrigin.Provided : ContentOrigin.FileSystem;
const sourceMapInfo = mapAndPath && { origin: ContentOrigin.Provided, ...mapAndPath };
return this.loadSourceFileInternal(sourcePath, contents, contentsOrigin, sourceMapInfo);
}
loadSourceFileInternal(sourcePath, contents, sourceOrigin, sourceMapInfo) {
const previousPaths = this.currentPaths.slice();
try {
if (contents === null) {
if (!this.fs.exists(sourcePath)) {
return null;
}
contents = this.readSourceFile(sourcePath);
}
if (sourceMapInfo === null) {
sourceMapInfo = this.loadSourceMap(sourcePath, contents, sourceOrigin);
}
let sources = [];
if (sourceMapInfo !== null) {
const basePath = sourceMapInfo.mapPath || sourcePath;
sources = this.processSources(basePath, sourceMapInfo);
}
return new SourceFile(sourcePath, contents, sourceMapInfo, sources, this.fs);
} catch (e) {
this.logger.warn(`Unable to fully load ${sourcePath} for source-map flattening: ${e.message}`);
return null;
} finally {
this.currentPaths = previousPaths;
}
}
loadSourceMap(sourcePath, sourceContents, sourceOrigin) {
const lastLine = this.getLastNonEmptyLine(sourceContents);
const inline = mapHelpers2.commentRegex.exec(lastLine);
if (inline !== null) {
return {
map: mapHelpers2.fromComment(inline.pop()).sourcemap,
mapPath: null,
origin: ContentOrigin.Inline
};
}
if (sourceOrigin === ContentOrigin.Inline) {
return null;
}
const external = mapHelpers2.mapFileCommentRegex.exec(lastLine);
if (external) {
try {
const fileName = external[1] || external[2];
const externalMapPath = this.fs.resolve(this.fs.dirname(sourcePath), fileName);
return {
map: this.readRawSourceMap(externalMapPath),
mapPath: externalMapPath,
origin: ContentOrigin.FileSystem
};
} catch (e) {
this.logger.warn(`Unable to fully load ${sourcePath} for source-map flattening: ${e.message}`);
return null;
}
}
const impliedMapPath = this.fs.resolve(sourcePath + ".map");
if (this.fs.exists(impliedMapPath)) {
return {
map: this.readRawSourceMap(impliedMapPath),
mapPath: impliedMapPath,
origin: ContentOrigin.FileSystem
};
}
return null;
}
processSources(basePath, { map, origin: sourceMapOrigin }) {
const sourceRoot = this.fs.resolve(this.fs.dirname(basePath), this.replaceSchemeWithPath(map.sourceRoot || ""));
return map.sources.map((source, index) => {
const path = this.fs.resolve(sourceRoot, this.replaceSchemeWithPath(source));
const content = map.sourcesContent && map.sourcesContent[index] || null;
const sourceOrigin = content !== null && sourceMapOrigin !== ContentOrigin.Provided ? ContentOrigin.Inline : ContentOrigin.FileSystem;
return this.loadSourceFileInternal(path, content, sourceOrigin, null);
});
}
readSourceFile(sourcePath) {
this.trackPath(sourcePath);
return this.fs.readFile(sourcePath);
}
readRawSourceMap(mapPath) {
this.trackPath(mapPath);
return JSON.parse(this.fs.readFile(mapPath));
}
trackPath(path) {
if (this.currentPaths.includes(path)) {
throw new Error(`Circular source file mapping dependency: ${this.currentPaths.join(" -> ")} -> ${path}`);
}
this.currentPaths.push(path);
}
getLastNonEmptyLine(contents) {
let trailingWhitespaceIndex = contents.length - 1;
while (trailingWhitespaceIndex > 0 && (contents[trailingWhitespaceIndex] === "\n" || contents[trailingWhitespaceIndex] === "\r")) {
trailingWhitespaceIndex--;
}
let lastRealLineIndex = contents.lastIndexOf("\n", trailingWhitespaceIndex - 1);
if (lastRealLineIndex === -1) {
lastRealLineIndex = 0;
}
return contents.slice(lastRealLineIndex + 1);
}
replaceSchemeWithPath(path) {
return path.replace(SCHEME_MATCHER, (_, scheme) => this.schemeMap[scheme.toLowerCase()] || "");
}
};
export {
SourceFile,
SourceFileLoader
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-GYHDNUIK.js.map

File diff suppressed because one or more lines are too long

8872
node_modules/@angular/compiler-cli/bundles/chunk-KDLK7PF4.js generated vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

812
node_modules/@angular/compiler-cli/bundles/chunk-O55FKOOW.js generated vendored Executable file
View File

@@ -0,0 +1,812 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
AmbientImport,
ImportFlags,
NoopImportRewriter,
Reference,
assertSuccessfulReferenceEmit
} from "./chunk-G64XB6AU.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/context.mjs
var Context = class {
constructor(isStatement) {
this.isStatement = isStatement;
}
get withExpressionMode() {
return this.isStatement ? new Context(false) : this;
}
get withStatementMode() {
return !this.isStatement ? new Context(true) : this;
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/translator.mjs
import * as o from "@angular/compiler";
var UNARY_OPERATORS = /* @__PURE__ */ new Map([
[o.UnaryOperator.Minus, "-"],
[o.UnaryOperator.Plus, "+"]
]);
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
[o.BinaryOperator.And, "&&"],
[o.BinaryOperator.Bigger, ">"],
[o.BinaryOperator.BiggerEquals, ">="],
[o.BinaryOperator.BitwiseAnd, "&"],
[o.BinaryOperator.Divide, "/"],
[o.BinaryOperator.Equals, "=="],
[o.BinaryOperator.Identical, "==="],
[o.BinaryOperator.Lower, "<"],
[o.BinaryOperator.LowerEquals, "<="],
[o.BinaryOperator.Minus, "-"],
[o.BinaryOperator.Modulo, "%"],
[o.BinaryOperator.Multiply, "*"],
[o.BinaryOperator.NotEquals, "!="],
[o.BinaryOperator.NotIdentical, "!=="],
[o.BinaryOperator.Or, "||"],
[o.BinaryOperator.Plus, "+"],
[o.BinaryOperator.NullishCoalesce, "??"]
]);
var ExpressionTranslatorVisitor = class {
constructor(factory, imports, options) {
this.factory = factory;
this.imports = imports;
this.downlevelTaggedTemplates = options.downlevelTaggedTemplates === true;
this.downlevelVariableDeclarations = options.downlevelVariableDeclarations === true;
this.recordWrappedNode = options.recordWrappedNode || (() => {
});
}
visitDeclareVarStmt(stmt, context) {
var _a;
const varType = this.downlevelVariableDeclarations ? "var" : stmt.hasModifier(o.StmtModifier.Final) ? "const" : "let";
return this.attachComments(this.factory.createVariableDeclaration(stmt.name, (_a = stmt.value) == null ? void 0 : _a.visitExpression(this, context.withExpressionMode), varType), stmt.leadingComments);
}
visitDeclareFunctionStmt(stmt, context) {
return this.attachComments(this.factory.createFunctionDeclaration(stmt.name, stmt.params.map((param) => param.name), this.factory.createBlock(this.visitStatements(stmt.statements, context.withStatementMode))), stmt.leadingComments);
}
visitExpressionStmt(stmt, context) {
return this.attachComments(this.factory.createExpressionStatement(stmt.expr.visitExpression(this, context.withStatementMode)), stmt.leadingComments);
}
visitReturnStmt(stmt, context) {
return this.attachComments(this.factory.createReturnStatement(stmt.value.visitExpression(this, context.withExpressionMode)), stmt.leadingComments);
}
visitIfStmt(stmt, context) {
return this.attachComments(this.factory.createIfStatement(stmt.condition.visitExpression(this, context), this.factory.createBlock(this.visitStatements(stmt.trueCase, context.withStatementMode)), stmt.falseCase.length > 0 ? this.factory.createBlock(this.visitStatements(stmt.falseCase, context.withStatementMode)) : null), stmt.leadingComments);
}
visitReadVarExpr(ast, _context) {
const identifier = this.factory.createIdentifier(ast.name);
this.setSourceMapRange(identifier, ast.sourceSpan);
return identifier;
}
visitWriteVarExpr(expr, context) {
const assignment = this.factory.createAssignment(this.setSourceMapRange(this.factory.createIdentifier(expr.name), expr.sourceSpan), expr.value.visitExpression(this, context));
return context.isStatement ? assignment : this.factory.createParenthesizedExpression(assignment);
}
visitWriteKeyExpr(expr, context) {
const exprContext = context.withExpressionMode;
const target = this.factory.createElementAccess(expr.receiver.visitExpression(this, exprContext), expr.index.visitExpression(this, exprContext));
const assignment = this.factory.createAssignment(target, expr.value.visitExpression(this, exprContext));
return context.isStatement ? assignment : this.factory.createParenthesizedExpression(assignment);
}
visitWritePropExpr(expr, context) {
const target = this.factory.createPropertyAccess(expr.receiver.visitExpression(this, context), expr.name);
return this.factory.createAssignment(target, expr.value.visitExpression(this, context));
}
visitInvokeFunctionExpr(ast, context) {
return this.setSourceMapRange(this.factory.createCallExpression(ast.fn.visitExpression(this, context), ast.args.map((arg) => arg.visitExpression(this, context)), ast.pure), ast.sourceSpan);
}
visitTaggedTemplateExpr(ast, context) {
return this.setSourceMapRange(this.createTaggedTemplateExpression(ast.tag.visitExpression(this, context), {
elements: ast.template.elements.map((e) => {
var _a;
return createTemplateElement({
cooked: e.text,
raw: e.rawText,
range: (_a = e.sourceSpan) != null ? _a : ast.sourceSpan
});
}),
expressions: ast.template.expressions.map((e) => e.visitExpression(this, context))
}), ast.sourceSpan);
}
visitInstantiateExpr(ast, context) {
return this.factory.createNewExpression(ast.classExpr.visitExpression(this, context), ast.args.map((arg) => arg.visitExpression(this, context)));
}
visitLiteralExpr(ast, _context) {
return this.setSourceMapRange(this.factory.createLiteral(ast.value), ast.sourceSpan);
}
visitLocalizedString(ast, context) {
const elements = [createTemplateElement(ast.serializeI18nHead())];
const expressions = [];
for (let i = 0; i < ast.expressions.length; i++) {
const placeholder = this.setSourceMapRange(ast.expressions[i].visitExpression(this, context), ast.getPlaceholderSourceSpan(i));
expressions.push(placeholder);
elements.push(createTemplateElement(ast.serializeI18nTemplatePart(i + 1)));
}
const localizeTag = this.factory.createIdentifier("$localize");
return this.setSourceMapRange(this.createTaggedTemplateExpression(localizeTag, { elements, expressions }), ast.sourceSpan);
}
createTaggedTemplateExpression(tag, template) {
return this.downlevelTaggedTemplates ? this.createES5TaggedTemplateFunctionCall(tag, template) : this.factory.createTaggedTemplate(tag, template);
}
createES5TaggedTemplateFunctionCall(tagHandler, { elements, expressions }) {
const { moduleImport, symbol } = this.imports.generateNamedImport("tslib", "__makeTemplateObject");
const __makeTemplateObjectHelper = moduleImport === null ? this.factory.createIdentifier(symbol) : this.factory.createPropertyAccess(moduleImport, symbol);
const cooked = [];
const raw = [];
for (const element of elements) {
cooked.push(this.factory.setSourceMapRange(this.factory.createLiteral(element.cooked), element.range));
raw.push(this.factory.setSourceMapRange(this.factory.createLiteral(element.raw), element.range));
}
const templateHelperCall = this.factory.createCallExpression(
__makeTemplateObjectHelper,
[this.factory.createArrayLiteral(cooked), this.factory.createArrayLiteral(raw)],
false
);
return this.factory.createCallExpression(
tagHandler,
[templateHelperCall, ...expressions],
false
);
}
visitExternalExpr(ast, _context) {
if (ast.value.name === null) {
if (ast.value.moduleName === null) {
throw new Error("Invalid import without name nor moduleName");
}
return this.imports.generateNamespaceImport(ast.value.moduleName);
}
if (ast.value.moduleName !== null) {
const { moduleImport, symbol } = this.imports.generateNamedImport(ast.value.moduleName, ast.value.name);
if (moduleImport === null) {
return this.factory.createIdentifier(symbol);
} else {
return this.factory.createPropertyAccess(moduleImport, symbol);
}
} else {
return this.factory.createIdentifier(ast.value.name);
}
}
visitConditionalExpr(ast, context) {
let cond = ast.condition.visitExpression(this, context);
if (ast.condition instanceof o.ConditionalExpr) {
cond = this.factory.createParenthesizedExpression(cond);
}
return this.factory.createConditional(cond, ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context));
}
visitDynamicImportExpr(ast, context) {
return this.factory.createDynamicImport(ast.url);
}
visitNotExpr(ast, context) {
return this.factory.createUnaryExpression("!", ast.condition.visitExpression(this, context));
}
visitFunctionExpr(ast, context) {
var _a;
return this.factory.createFunctionExpression((_a = ast.name) != null ? _a : null, ast.params.map((param) => param.name), this.factory.createBlock(this.visitStatements(ast.statements, context)));
}
visitArrowFunctionExpr(ast, context) {
return this.factory.createArrowFunctionExpression(ast.params.map((param) => param.name), Array.isArray(ast.body) ? this.factory.createBlock(this.visitStatements(ast.body, context)) : ast.body.visitExpression(this, context));
}
visitBinaryOperatorExpr(ast, context) {
if (!BINARY_OPERATORS.has(ast.operator)) {
throw new Error(`Unknown binary operator: ${o.BinaryOperator[ast.operator]}`);
}
return this.factory.createBinaryExpression(ast.lhs.visitExpression(this, context), BINARY_OPERATORS.get(ast.operator), ast.rhs.visitExpression(this, context));
}
visitReadPropExpr(ast, context) {
return this.factory.createPropertyAccess(ast.receiver.visitExpression(this, context), ast.name);
}
visitReadKeyExpr(ast, context) {
return this.factory.createElementAccess(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context));
}
visitLiteralArrayExpr(ast, context) {
return this.factory.createArrayLiteral(ast.entries.map((expr) => this.setSourceMapRange(expr.visitExpression(this, context), ast.sourceSpan)));
}
visitLiteralMapExpr(ast, context) {
const properties = ast.entries.map((entry) => {
return {
propertyName: entry.key,
quoted: entry.quoted,
value: entry.value.visitExpression(this, context)
};
});
return this.setSourceMapRange(this.factory.createObjectLiteral(properties), ast.sourceSpan);
}
visitCommaExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitWrappedNodeExpr(ast, _context) {
this.recordWrappedNode(ast);
return ast.node;
}
visitTypeofExpr(ast, context) {
return this.factory.createTypeOfExpression(ast.expr.visitExpression(this, context));
}
visitUnaryOperatorExpr(ast, context) {
if (!UNARY_OPERATORS.has(ast.operator)) {
throw new Error(`Unknown unary operator: ${o.UnaryOperator[ast.operator]}`);
}
return this.factory.createUnaryExpression(UNARY_OPERATORS.get(ast.operator), ast.expr.visitExpression(this, context));
}
visitStatements(statements, context) {
return statements.map((stmt) => stmt.visitStatement(this, context)).filter((stmt) => stmt !== void 0);
}
setSourceMapRange(ast, span) {
return this.factory.setSourceMapRange(ast, createRange(span));
}
attachComments(statement, leadingComments) {
if (leadingComments !== void 0) {
this.factory.attachComments(statement, leadingComments);
}
return statement;
}
};
function createTemplateElement({ cooked, raw, range }) {
return { cooked, raw, range: createRange(range) };
}
function createRange(span) {
if (span === null) {
return null;
}
const { start, end } = span;
const { url, content } = start.file;
if (!url) {
return null;
}
return {
url,
content,
start: { offset: start.offset, line: start.line, column: start.col },
end: { offset: end.offset, line: end.line, column: end.col }
};
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/import_manager.mjs
import ts from "typescript";
var ImportManager = class {
constructor(rewriter = new NoopImportRewriter(), prefix = "i") {
this.rewriter = rewriter;
this.prefix = prefix;
this.specifierToIdentifier = /* @__PURE__ */ new Map();
this.nextIndex = 0;
}
generateNamespaceImport(moduleName) {
if (!this.specifierToIdentifier.has(moduleName)) {
this.specifierToIdentifier.set(moduleName, ts.factory.createIdentifier(`${this.prefix}${this.nextIndex++}`));
}
return this.specifierToIdentifier.get(moduleName);
}
generateNamedImport(moduleName, originalSymbol) {
const symbol = this.rewriter.rewriteSymbol(originalSymbol, moduleName);
if (!this.rewriter.shouldImportSymbol(symbol, moduleName)) {
return { moduleImport: null, symbol };
}
const moduleImport = this.generateNamespaceImport(moduleName);
return { moduleImport, symbol };
}
getAllImports(contextPath) {
const imports = [];
for (const [originalSpecifier, qualifier] of this.specifierToIdentifier) {
const specifier = this.rewriter.rewriteSpecifier(originalSpecifier, contextPath);
imports.push({
specifier,
qualifier
});
}
return imports;
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/type_emitter.mjs
import ts2 from "typescript";
var INELIGIBLE = {};
function canEmitType(type, canEmit) {
return canEmitTypeWorker(type);
function canEmitTypeWorker(type2) {
return visitNode(type2) !== INELIGIBLE;
}
function visitNode(node) {
if (ts2.isImportTypeNode(node)) {
return INELIGIBLE;
}
if (ts2.isTypeReferenceNode(node) && !canEmitTypeReference(node)) {
return INELIGIBLE;
} else {
return ts2.forEachChild(node, visitNode);
}
}
function canEmitTypeReference(type2) {
if (!canEmit(type2)) {
return false;
}
return type2.typeArguments === void 0 || type2.typeArguments.every(canEmitTypeWorker);
}
}
var TypeEmitter = class {
constructor(translator) {
this.translator = translator;
}
emitType(type) {
const typeReferenceTransformer = (context) => {
const visitNode = (node) => {
if (ts2.isImportTypeNode(node)) {
throw new Error("Unable to emit import type");
}
if (ts2.isTypeReferenceNode(node)) {
return this.emitTypeReference(node);
} else if (ts2.isLiteralExpression(node)) {
let clone;
if (ts2.isStringLiteral(node)) {
clone = ts2.factory.createStringLiteral(node.text);
} else if (ts2.isNumericLiteral(node)) {
clone = ts2.factory.createNumericLiteral(node.text);
} else if (ts2.isBigIntLiteral(node)) {
clone = ts2.factory.createBigIntLiteral(node.text);
} else if (ts2.isNoSubstitutionTemplateLiteral(node)) {
clone = ts2.factory.createNoSubstitutionTemplateLiteral(node.text, node.rawText);
} else if (ts2.isRegularExpressionLiteral(node)) {
clone = ts2.factory.createRegularExpressionLiteral(node.text);
} else {
throw new Error(`Unsupported literal kind ${ts2.SyntaxKind[node.kind]}`);
}
ts2.setTextRange(clone, { pos: -1, end: -1 });
return clone;
} else {
return ts2.visitEachChild(node, visitNode, context);
}
};
return (node) => ts2.visitNode(node, visitNode, ts2.isTypeNode);
};
return ts2.transform(type, [typeReferenceTransformer]).transformed[0];
}
emitTypeReference(type) {
const translatedType = this.translator(type);
if (translatedType === null) {
throw new Error("Unable to emit an unresolved reference");
}
let typeArguments = void 0;
if (type.typeArguments !== void 0) {
typeArguments = ts2.factory.createNodeArray(type.typeArguments.map((typeArg) => this.emitType(typeArg)));
}
return ts2.factory.updateTypeReferenceNode(type, translatedType.typeName, typeArguments);
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/type_translator.mjs
import * as o2 from "@angular/compiler";
import ts3 from "typescript";
function translateType(type, contextFile, reflector, refEmitter, imports) {
return type.visitType(new TypeTranslatorVisitor(imports, contextFile, reflector, refEmitter), new Context(false));
}
var TypeTranslatorVisitor = class {
constructor(imports, contextFile, reflector, refEmitter) {
this.imports = imports;
this.contextFile = contextFile;
this.reflector = reflector;
this.refEmitter = refEmitter;
}
visitBuiltinType(type, context) {
switch (type.name) {
case o2.BuiltinTypeName.Bool:
return ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.BooleanKeyword);
case o2.BuiltinTypeName.Dynamic:
return ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.AnyKeyword);
case o2.BuiltinTypeName.Int:
case o2.BuiltinTypeName.Number:
return ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.NumberKeyword);
case o2.BuiltinTypeName.String:
return ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.StringKeyword);
case o2.BuiltinTypeName.None:
return ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.NeverKeyword);
default:
throw new Error(`Unsupported builtin type: ${o2.BuiltinTypeName[type.name]}`);
}
}
visitExpressionType(type, context) {
const typeNode = this.translateExpression(type.value, context);
if (type.typeParams === null) {
return typeNode;
}
if (!ts3.isTypeReferenceNode(typeNode)) {
throw new Error("An ExpressionType with type arguments must translate into a TypeReferenceNode");
} else if (typeNode.typeArguments !== void 0) {
throw new Error(`An ExpressionType with type arguments cannot have multiple levels of type arguments`);
}
const typeArgs = type.typeParams.map((param) => this.translateType(param, context));
return ts3.factory.createTypeReferenceNode(typeNode.typeName, typeArgs);
}
visitArrayType(type, context) {
return ts3.factory.createArrayTypeNode(this.translateType(type.of, context));
}
visitMapType(type, context) {
const parameter = ts3.factory.createParameterDeclaration(void 0, void 0, "key", void 0, ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.StringKeyword));
const typeArgs = type.valueType !== null ? this.translateType(type.valueType, context) : ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.UnknownKeyword);
const indexSignature = ts3.factory.createIndexSignature(void 0, [parameter], typeArgs);
return ts3.factory.createTypeLiteralNode([indexSignature]);
}
visitTransplantedType(ast, context) {
const node = ast.type instanceof Reference ? ast.type.node : ast.type;
if (!ts3.isTypeNode(node)) {
throw new Error(`A TransplantedType must wrap a TypeNode`);
}
const viaModule = ast.type instanceof Reference ? ast.type.bestGuessOwningModule : null;
const emitter = new TypeEmitter((typeRef) => this.translateTypeReference(typeRef, context, viaModule));
return emitter.emitType(node);
}
visitReadVarExpr(ast, context) {
if (ast.name === null) {
throw new Error(`ReadVarExpr with no variable name in type`);
}
return ts3.factory.createTypeQueryNode(ts3.factory.createIdentifier(ast.name));
}
visitWriteVarExpr(expr, context) {
throw new Error("Method not implemented.");
}
visitWriteKeyExpr(expr, context) {
throw new Error("Method not implemented.");
}
visitWritePropExpr(expr, context) {
throw new Error("Method not implemented.");
}
visitInvokeFunctionExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitTaggedTemplateExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitInstantiateExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitLiteralExpr(ast, context) {
if (ast.value === null) {
return ts3.factory.createLiteralTypeNode(ts3.factory.createNull());
} else if (ast.value === void 0) {
return ts3.factory.createKeywordTypeNode(ts3.SyntaxKind.UndefinedKeyword);
} else if (typeof ast.value === "boolean") {
return ts3.factory.createLiteralTypeNode(ast.value ? ts3.factory.createTrue() : ts3.factory.createFalse());
} else if (typeof ast.value === "number") {
return ts3.factory.createLiteralTypeNode(ts3.factory.createNumericLiteral(ast.value));
} else {
return ts3.factory.createLiteralTypeNode(ts3.factory.createStringLiteral(ast.value));
}
}
visitLocalizedString(ast, context) {
throw new Error("Method not implemented.");
}
visitExternalExpr(ast, context) {
if (ast.value.moduleName === null || ast.value.name === null) {
throw new Error(`Import unknown module or symbol`);
}
const { moduleImport, symbol } = this.imports.generateNamedImport(ast.value.moduleName, ast.value.name);
const symbolIdentifier = ts3.factory.createIdentifier(symbol);
const typeName = moduleImport ? ts3.factory.createQualifiedName(moduleImport, symbolIdentifier) : symbolIdentifier;
const typeArguments = ast.typeParams !== null ? ast.typeParams.map((type) => this.translateType(type, context)) : void 0;
return ts3.factory.createTypeReferenceNode(typeName, typeArguments);
}
visitConditionalExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitDynamicImportExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitNotExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitFunctionExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitArrowFunctionExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitUnaryOperatorExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitBinaryOperatorExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitReadPropExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitReadKeyExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitLiteralArrayExpr(ast, context) {
const values = ast.entries.map((expr) => this.translateExpression(expr, context));
return ts3.factory.createTupleTypeNode(values);
}
visitLiteralMapExpr(ast, context) {
const entries = ast.entries.map((entry) => {
const { key, quoted } = entry;
const type = this.translateExpression(entry.value, context);
return ts3.factory.createPropertySignature(
void 0,
quoted ? ts3.factory.createStringLiteral(key) : key,
void 0,
type
);
});
return ts3.factory.createTypeLiteralNode(entries);
}
visitCommaExpr(ast, context) {
throw new Error("Method not implemented.");
}
visitWrappedNodeExpr(ast, context) {
const node = ast.node;
if (ts3.isEntityName(node)) {
return ts3.factory.createTypeReferenceNode(node, void 0);
} else if (ts3.isTypeNode(node)) {
return node;
} else if (ts3.isLiteralExpression(node)) {
return ts3.factory.createLiteralTypeNode(node);
} else {
throw new Error(`Unsupported WrappedNodeExpr in TypeTranslatorVisitor: ${ts3.SyntaxKind[node.kind]}`);
}
}
visitTypeofExpr(ast, context) {
const typeNode = this.translateExpression(ast.expr, context);
if (!ts3.isTypeReferenceNode(typeNode)) {
throw new Error(`The target of a typeof expression must be a type reference, but it was
${ts3.SyntaxKind[typeNode.kind]}`);
}
return ts3.factory.createTypeQueryNode(typeNode.typeName);
}
translateType(type, context) {
const typeNode = type.visitType(this, context);
if (!ts3.isTypeNode(typeNode)) {
throw new Error(`A Type must translate to a TypeNode, but was ${ts3.SyntaxKind[typeNode.kind]}`);
}
return typeNode;
}
translateExpression(expr, context) {
const typeNode = expr.visitExpression(this, context);
if (!ts3.isTypeNode(typeNode)) {
throw new Error(`An Expression must translate to a TypeNode, but was ${ts3.SyntaxKind[typeNode.kind]}`);
}
return typeNode;
}
translateTypeReference(type, context, viaModule) {
const target = ts3.isIdentifier(type.typeName) ? type.typeName : type.typeName.right;
const declaration = this.reflector.getDeclarationOfIdentifier(target);
if (declaration === null) {
throw new Error(`Unable to statically determine the declaration file of type node ${target.text}`);
}
let owningModule = viaModule;
if (typeof declaration.viaModule === "string") {
owningModule = {
specifier: declaration.viaModule,
resolutionContext: type.getSourceFile().fileName
};
}
const reference = new Reference(declaration.node, declaration.viaModule === AmbientImport ? AmbientImport : owningModule);
const emittedType = this.refEmitter.emit(reference, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports | ImportFlags.AllowAmbientReferences);
assertSuccessfulReferenceEmit(emittedType, target, "type");
const typeNode = this.translateExpression(emittedType.expression, context);
if (!ts3.isTypeReferenceNode(typeNode)) {
throw new Error(`Expected TypeReferenceNode for emitted reference, got ${ts3.SyntaxKind[typeNode.kind]}.`);
}
return typeNode;
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/typescript_ast_factory.mjs
import ts4 from "typescript";
var PureAnnotation;
(function(PureAnnotation2) {
PureAnnotation2["CLOSURE"] = "* @pureOrBreakMyCode ";
PureAnnotation2["TERSER"] = "@__PURE__";
})(PureAnnotation || (PureAnnotation = {}));
var UNARY_OPERATORS2 = {
"+": ts4.SyntaxKind.PlusToken,
"-": ts4.SyntaxKind.MinusToken,
"!": ts4.SyntaxKind.ExclamationToken
};
var BINARY_OPERATORS2 = {
"&&": ts4.SyntaxKind.AmpersandAmpersandToken,
">": ts4.SyntaxKind.GreaterThanToken,
">=": ts4.SyntaxKind.GreaterThanEqualsToken,
"&": ts4.SyntaxKind.AmpersandToken,
"/": ts4.SyntaxKind.SlashToken,
"==": ts4.SyntaxKind.EqualsEqualsToken,
"===": ts4.SyntaxKind.EqualsEqualsEqualsToken,
"<": ts4.SyntaxKind.LessThanToken,
"<=": ts4.SyntaxKind.LessThanEqualsToken,
"-": ts4.SyntaxKind.MinusToken,
"%": ts4.SyntaxKind.PercentToken,
"*": ts4.SyntaxKind.AsteriskToken,
"!=": ts4.SyntaxKind.ExclamationEqualsToken,
"!==": ts4.SyntaxKind.ExclamationEqualsEqualsToken,
"||": ts4.SyntaxKind.BarBarToken,
"+": ts4.SyntaxKind.PlusToken,
"??": ts4.SyntaxKind.QuestionQuestionToken
};
var VAR_TYPES = {
"const": ts4.NodeFlags.Const,
"let": ts4.NodeFlags.Let,
"var": ts4.NodeFlags.None
};
var TypeScriptAstFactory = class {
constructor(annotateForClosureCompiler) {
this.annotateForClosureCompiler = annotateForClosureCompiler;
this.externalSourceFiles = /* @__PURE__ */ new Map();
this.attachComments = attachComments;
this.createArrayLiteral = ts4.factory.createArrayLiteralExpression;
this.createElementAccess = ts4.factory.createElementAccessExpression;
this.createExpressionStatement = ts4.factory.createExpressionStatement;
this.createIdentifier = ts4.factory.createIdentifier;
this.createParenthesizedExpression = ts4.factory.createParenthesizedExpression;
this.createPropertyAccess = ts4.factory.createPropertyAccessExpression;
this.createThrowStatement = ts4.factory.createThrowStatement;
this.createTypeOfExpression = ts4.factory.createTypeOfExpression;
}
createAssignment(target, value) {
return ts4.factory.createBinaryExpression(target, ts4.SyntaxKind.EqualsToken, value);
}
createBinaryExpression(leftOperand, operator, rightOperand) {
return ts4.factory.createBinaryExpression(leftOperand, BINARY_OPERATORS2[operator], rightOperand);
}
createBlock(body) {
return ts4.factory.createBlock(body);
}
createCallExpression(callee, args, pure) {
const call = ts4.factory.createCallExpression(callee, void 0, args);
if (pure) {
ts4.addSyntheticLeadingComment(
call,
ts4.SyntaxKind.MultiLineCommentTrivia,
this.annotateForClosureCompiler ? PureAnnotation.CLOSURE : PureAnnotation.TERSER,
false
);
}
return call;
}
createConditional(condition, whenTrue, whenFalse) {
return ts4.factory.createConditionalExpression(condition, void 0, whenTrue, void 0, whenFalse);
}
createDynamicImport(url) {
return ts4.factory.createCallExpression(
ts4.factory.createToken(ts4.SyntaxKind.ImportKeyword),
void 0,
[ts4.factory.createStringLiteral(url)]
);
}
createFunctionDeclaration(functionName, parameters, body) {
if (!ts4.isBlock(body)) {
throw new Error(`Invalid syntax, expected a block, but got ${ts4.SyntaxKind[body.kind]}.`);
}
return ts4.factory.createFunctionDeclaration(void 0, void 0, functionName, void 0, parameters.map((param) => ts4.factory.createParameterDeclaration(void 0, void 0, param)), void 0, body);
}
createFunctionExpression(functionName, parameters, body) {
if (!ts4.isBlock(body)) {
throw new Error(`Invalid syntax, expected a block, but got ${ts4.SyntaxKind[body.kind]}.`);
}
return ts4.factory.createFunctionExpression(void 0, void 0, functionName != null ? functionName : void 0, void 0, parameters.map((param) => ts4.factory.createParameterDeclaration(void 0, void 0, param)), void 0, body);
}
createArrowFunctionExpression(parameters, body) {
if (ts4.isStatement(body) && !ts4.isBlock(body)) {
throw new Error(`Invalid syntax, expected a block, but got ${ts4.SyntaxKind[body.kind]}.`);
}
return ts4.factory.createArrowFunction(void 0, void 0, parameters.map((param) => ts4.factory.createParameterDeclaration(void 0, void 0, param)), void 0, void 0, body);
}
createIfStatement(condition, thenStatement, elseStatement) {
return ts4.factory.createIfStatement(condition, thenStatement, elseStatement != null ? elseStatement : void 0);
}
createLiteral(value) {
if (value === void 0) {
return ts4.factory.createIdentifier("undefined");
} else if (value === null) {
return ts4.factory.createNull();
} else if (typeof value === "boolean") {
return value ? ts4.factory.createTrue() : ts4.factory.createFalse();
} else if (typeof value === "number") {
return ts4.factory.createNumericLiteral(value);
} else {
return ts4.factory.createStringLiteral(value);
}
}
createNewExpression(expression, args) {
return ts4.factory.createNewExpression(expression, void 0, args);
}
createObjectLiteral(properties) {
return ts4.factory.createObjectLiteralExpression(properties.map((prop) => ts4.factory.createPropertyAssignment(prop.quoted ? ts4.factory.createStringLiteral(prop.propertyName) : ts4.factory.createIdentifier(prop.propertyName), prop.value)));
}
createReturnStatement(expression) {
return ts4.factory.createReturnStatement(expression != null ? expression : void 0);
}
createTaggedTemplate(tag, template) {
let templateLiteral;
const length = template.elements.length;
const head = template.elements[0];
if (length === 1) {
templateLiteral = ts4.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
} else {
const spans = [];
for (let i = 1; i < length - 1; i++) {
const { cooked, raw, range } = template.elements[i];
const middle = createTemplateMiddle(cooked, raw);
if (range !== null) {
this.setSourceMapRange(middle, range);
}
spans.push(ts4.factory.createTemplateSpan(template.expressions[i - 1], middle));
}
const resolvedExpression = template.expressions[length - 2];
const templatePart = template.elements[length - 1];
const templateTail = createTemplateTail(templatePart.cooked, templatePart.raw);
if (templatePart.range !== null) {
this.setSourceMapRange(templateTail, templatePart.range);
}
spans.push(ts4.factory.createTemplateSpan(resolvedExpression, templateTail));
templateLiteral = ts4.factory.createTemplateExpression(ts4.factory.createTemplateHead(head.cooked, head.raw), spans);
}
if (head.range !== null) {
this.setSourceMapRange(templateLiteral, head.range);
}
return ts4.factory.createTaggedTemplateExpression(tag, void 0, templateLiteral);
}
createUnaryExpression(operator, operand) {
return ts4.factory.createPrefixUnaryExpression(UNARY_OPERATORS2[operator], operand);
}
createVariableDeclaration(variableName, initializer, type) {
return ts4.factory.createVariableStatement(void 0, ts4.factory.createVariableDeclarationList([ts4.factory.createVariableDeclaration(variableName, void 0, void 0, initializer != null ? initializer : void 0)], VAR_TYPES[type]));
}
setSourceMapRange(node, sourceMapRange) {
if (sourceMapRange === null) {
return node;
}
const url = sourceMapRange.url;
if (!this.externalSourceFiles.has(url)) {
this.externalSourceFiles.set(url, ts4.createSourceMapSource(url, sourceMapRange.content, (pos) => pos));
}
const source = this.externalSourceFiles.get(url);
ts4.setSourceMapRange(node, { pos: sourceMapRange.start.offset, end: sourceMapRange.end.offset, source });
return node;
}
};
function createTemplateMiddle(cooked, raw) {
const node = ts4.factory.createTemplateHead(cooked, raw);
node.kind = ts4.SyntaxKind.TemplateMiddle;
return node;
}
function createTemplateTail(cooked, raw) {
const node = ts4.factory.createTemplateHead(cooked, raw);
node.kind = ts4.SyntaxKind.TemplateTail;
return node;
}
function attachComments(statement, leadingComments) {
for (const comment of leadingComments) {
const commentKind = comment.multiline ? ts4.SyntaxKind.MultiLineCommentTrivia : ts4.SyntaxKind.SingleLineCommentTrivia;
if (comment.multiline) {
ts4.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
} else {
for (const line of comment.toString().split("\n")) {
ts4.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
}
}
}
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/translator/src/typescript_translator.mjs
function translateExpression(expression, imports, options = {}) {
return expression.visitExpression(new ExpressionTranslatorVisitor(new TypeScriptAstFactory(options.annotateForClosureCompiler === true), imports, options), new Context(false));
}
function translateStatement(statement, imports, options = {}) {
return statement.visitStatement(new ExpressionTranslatorVisitor(new TypeScriptAstFactory(options.annotateForClosureCompiler === true), imports, options), new Context(true));
}
export {
Context,
ImportManager,
ExpressionTranslatorVisitor,
canEmitType,
TypeEmitter,
translateType,
translateExpression,
translateStatement
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-O55FKOOW.js.map

File diff suppressed because one or more lines are too long

56
node_modules/@angular/compiler-cli/bundles/chunk-SBDNBITT.js generated vendored Executable file
View File

@@ -0,0 +1,56 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/logger.mjs
var LogLevel;
(function(LogLevel2) {
LogLevel2[LogLevel2["debug"] = 0] = "debug";
LogLevel2[LogLevel2["info"] = 1] = "info";
LogLevel2[LogLevel2["warn"] = 2] = "warn";
LogLevel2[LogLevel2["error"] = 3] = "error";
})(LogLevel || (LogLevel = {}));
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/logging/src/console_logger.mjs
var RESET = "\x1B[0m";
var RED = "\x1B[31m";
var YELLOW = "\x1B[33m";
var BLUE = "\x1B[36m";
var DEBUG = `${BLUE}Debug:${RESET}`;
var WARN = `${YELLOW}Warning:${RESET}`;
var ERROR = `${RED}Error:${RESET}`;
var ConsoleLogger = class {
constructor(level) {
this.level = level;
}
debug(...args) {
if (this.level <= LogLevel.debug)
console.debug(DEBUG, ...args);
}
info(...args) {
if (this.level <= LogLevel.info)
console.info(...args);
}
warn(...args) {
if (this.level <= LogLevel.warn)
console.warn(WARN, ...args);
}
error(...args) {
if (this.level <= LogLevel.error)
console.error(ERROR, ...args);
}
};
export {
LogLevel,
ConsoleLogger
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-SBDNBITT.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../packages/compiler-cli/src/ngtsc/logging/src/logger.ts", "../../../../../../packages/compiler-cli/src/ngtsc/logging/src/console_logger.ts"],
"mappings": ";;;;;;AAoBA,IAAY;CAAZ,SAAYA,WAAQ;AAClB,EAAAA,UAAAA,UAAA,WAAA,KAAA;AACA,EAAAA,UAAAA,UAAA,UAAA,KAAA;AACA,EAAAA,UAAAA,UAAA,UAAA,KAAA;AACA,EAAAA,UAAAA,UAAA,WAAA,KAAA;AACF,GALY,aAAA,WAAQ,CAAA,EAAA;;;ACXpB,IAAM,QAAQ;AACd,IAAM,MAAM;AACZ,IAAM,SAAS;AACf,IAAM,OAAO;AAEN,IAAM,QAAQ,GAAG,aAAa;AAC9B,IAAM,OAAO,GAAG,iBAAiB;AACjC,IAAM,QAAQ,GAAG,YAAY;AAQ9B,IAAO,gBAAP,MAAoB;EACxB,YAAmB,OAAe;AAAf,SAAA,QAAA;EAAkB;EACrC,SAAS,MAAc;AACrB,QAAI,KAAK,SAAS,SAAS;AAAO,cAAQ,MAAM,OAAO,GAAG,IAAI;EAChE;EACA,QAAQ,MAAc;AACpB,QAAI,KAAK,SAAS,SAAS;AAAM,cAAQ,KAAK,GAAG,IAAI;EACvD;EACA,QAAQ,MAAc;AACpB,QAAI,KAAK,SAAS,SAAS;AAAM,cAAQ,KAAK,MAAM,GAAG,IAAI;EAC7D;EACA,SAAS,MAAc;AACrB,QAAI,KAAK,SAAS,SAAS;AAAO,cAAQ,MAAM,OAAO,GAAG,IAAI;EAChE;;",
"names": ["LogLevel"]
}

345
node_modules/@angular/compiler-cli/bundles/chunk-T6CN22EQ.js generated vendored Executable file
View File

@@ -0,0 +1,345 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
DEFAULT_ERROR_CODE,
EmitFlags,
SOURCE,
createCompilerHost,
createMessageDiagnostic,
exitCodeFromResult,
formatDiagnostics,
performCompilation,
readConfiguration
} from "./chunk-KDLK7PF4.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/main.mjs
import ts2 from "typescript";
import yargs from "yargs";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/perform_watch.mjs
import * as chokidar from "chokidar";
import * as path from "path";
import ts from "typescript";
function totalCompilationTimeDiagnostic(timeInMillis) {
let duration;
if (timeInMillis > 1e3) {
duration = `${(timeInMillis / 1e3).toPrecision(2)}s`;
} else {
duration = `${timeInMillis}ms`;
}
return {
category: ts.DiagnosticCategory.Message,
messageText: `Total time: ${duration}`,
code: DEFAULT_ERROR_CODE,
source: SOURCE,
file: void 0,
start: void 0,
length: void 0
};
}
var FileChangeEvent;
(function(FileChangeEvent2) {
FileChangeEvent2[FileChangeEvent2["Change"] = 0] = "Change";
FileChangeEvent2[FileChangeEvent2["CreateDelete"] = 1] = "CreateDelete";
FileChangeEvent2[FileChangeEvent2["CreateDeleteDir"] = 2] = "CreateDeleteDir";
})(FileChangeEvent || (FileChangeEvent = {}));
function createPerformWatchHost(configFileName, reportDiagnostics, existingOptions, createEmitCallback) {
return {
reportDiagnostics,
createCompilerHost: (options) => createCompilerHost({ options }),
readConfiguration: () => readConfiguration(configFileName, existingOptions),
createEmitCallback: (options) => createEmitCallback ? createEmitCallback(options) : void 0,
onFileChange: (options, listener, ready) => {
if (!options.basePath) {
reportDiagnostics([{
category: ts.DiagnosticCategory.Error,
messageText: "Invalid configuration option. baseDir not specified",
source: SOURCE,
code: DEFAULT_ERROR_CODE,
file: void 0,
start: void 0,
length: void 0
}]);
return { close: () => {
} };
}
const watcher = chokidar.watch(options.basePath, {
ignored: /((^[\/\\])\..)|(\.js$)|(\.map$)|(\.metadata\.json|node_modules)/,
ignoreInitial: true,
persistent: true
});
watcher.on("all", (event, path2) => {
switch (event) {
case "change":
listener(FileChangeEvent.Change, path2);
break;
case "unlink":
case "add":
listener(FileChangeEvent.CreateDelete, path2);
break;
case "unlinkDir":
case "addDir":
listener(FileChangeEvent.CreateDeleteDir, path2);
break;
}
});
watcher.on("ready", ready);
return { close: () => watcher.close(), ready };
},
setTimeout: ts.sys.clearTimeout && ts.sys.setTimeout || setTimeout,
clearTimeout: ts.sys.setTimeout && ts.sys.clearTimeout || clearTimeout
};
}
function performWatchCompilation(host) {
let cachedProgram;
let cachedCompilerHost;
let cachedOptions;
let timerHandleForRecompilation;
const ignoreFilesForWatch = /* @__PURE__ */ new Set();
const fileCache = /* @__PURE__ */ new Map();
const firstCompileResult = doCompilation();
let resolveReadyPromise;
const readyPromise = new Promise((resolve) => resolveReadyPromise = resolve);
const fileWatcher = host.onFileChange(cachedOptions.options, watchedFileChanged, resolveReadyPromise);
return { close, ready: (cb) => readyPromise.then(cb), firstCompileResult };
function cacheEntry(fileName) {
fileName = path.normalize(fileName);
let entry = fileCache.get(fileName);
if (!entry) {
entry = {};
fileCache.set(fileName, entry);
}
return entry;
}
function close() {
fileWatcher.close();
if (timerHandleForRecompilation) {
host.clearTimeout(timerHandleForRecompilation.timerHandle);
timerHandleForRecompilation = void 0;
}
}
function doCompilation() {
if (!cachedOptions) {
cachedOptions = host.readConfiguration();
}
if (cachedOptions.errors && cachedOptions.errors.length) {
host.reportDiagnostics(cachedOptions.errors);
return cachedOptions.errors;
}
const startTime = Date.now();
if (!cachedCompilerHost) {
cachedCompilerHost = host.createCompilerHost(cachedOptions.options);
const originalWriteFileCallback = cachedCompilerHost.writeFile;
cachedCompilerHost.writeFile = function(fileName, data, writeByteOrderMark, onError, sourceFiles = []) {
ignoreFilesForWatch.add(path.normalize(fileName));
return originalWriteFileCallback(fileName, data, writeByteOrderMark, onError, sourceFiles);
};
const originalFileExists = cachedCompilerHost.fileExists;
cachedCompilerHost.fileExists = function(fileName) {
const ce = cacheEntry(fileName);
if (ce.exists == null) {
ce.exists = originalFileExists.call(this, fileName);
}
return ce.exists;
};
const originalGetSourceFile = cachedCompilerHost.getSourceFile;
cachedCompilerHost.getSourceFile = function(fileName, languageVersion) {
const ce = cacheEntry(fileName);
if (!ce.sf) {
ce.sf = originalGetSourceFile.call(this, fileName, languageVersion);
}
return ce.sf;
};
const originalReadFile = cachedCompilerHost.readFile;
cachedCompilerHost.readFile = function(fileName) {
const ce = cacheEntry(fileName);
if (ce.content == null) {
ce.content = originalReadFile.call(this, fileName);
}
return ce.content;
};
cachedCompilerHost.getModifiedResourceFiles = function() {
if (timerHandleForRecompilation === void 0) {
return void 0;
}
return timerHandleForRecompilation.modifiedResourceFiles;
};
}
ignoreFilesForWatch.clear();
const oldProgram = cachedProgram;
cachedProgram = void 0;
const compileResult = performCompilation({
rootNames: cachedOptions.rootNames,
options: cachedOptions.options,
host: cachedCompilerHost,
oldProgram,
emitCallback: host.createEmitCallback(cachedOptions.options)
});
if (compileResult.diagnostics.length) {
host.reportDiagnostics(compileResult.diagnostics);
}
const endTime = Date.now();
if (cachedOptions.options.diagnostics) {
const totalTime = (endTime - startTime) / 1e3;
host.reportDiagnostics([totalCompilationTimeDiagnostic(endTime - startTime)]);
}
const exitCode = exitCodeFromResult(compileResult.diagnostics);
if (exitCode == 0) {
cachedProgram = compileResult.program;
host.reportDiagnostics([createMessageDiagnostic("Compilation complete. Watching for file changes.")]);
} else {
host.reportDiagnostics([createMessageDiagnostic("Compilation failed. Watching for file changes.")]);
}
return compileResult.diagnostics;
}
function resetOptions() {
cachedProgram = void 0;
cachedCompilerHost = void 0;
cachedOptions = void 0;
}
function watchedFileChanged(event, fileName) {
const normalizedPath = path.normalize(fileName);
if (cachedOptions && event === FileChangeEvent.Change && normalizedPath === path.normalize(cachedOptions.project)) {
resetOptions();
} else if (event === FileChangeEvent.CreateDelete || event === FileChangeEvent.CreateDeleteDir) {
cachedOptions = void 0;
}
if (event === FileChangeEvent.CreateDeleteDir) {
fileCache.clear();
} else {
fileCache.delete(normalizedPath);
}
if (!ignoreFilesForWatch.has(normalizedPath)) {
startTimerForRecompilation(normalizedPath);
}
}
function startTimerForRecompilation(changedPath) {
if (timerHandleForRecompilation) {
host.clearTimeout(timerHandleForRecompilation.timerHandle);
} else {
timerHandleForRecompilation = {
modifiedResourceFiles: /* @__PURE__ */ new Set(),
timerHandle: void 0
};
}
timerHandleForRecompilation.timerHandle = host.setTimeout(recompile, 250);
timerHandleForRecompilation.modifiedResourceFiles.add(changedPath);
}
function recompile() {
host.reportDiagnostics([createMessageDiagnostic("File change detected. Starting incremental compilation.")]);
doCompilation();
timerHandleForRecompilation = void 0;
}
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/main.mjs
function main(args, consoleError = console.error, config, customTransformers, programReuse, modifiedResourceFiles) {
let { project, rootNames, options, errors: configErrors, watch: watch2, emitFlags } = config || readNgcCommandLineAndConfiguration(args);
if (configErrors.length) {
return reportErrorsAndExit(configErrors, void 0, consoleError);
}
if (watch2) {
const result = watchMode(project, options, consoleError);
return reportErrorsAndExit(result.firstCompileResult, options, consoleError);
}
let oldProgram;
if (programReuse !== void 0) {
oldProgram = programReuse.program;
}
const { diagnostics: compileDiags, program } = performCompilation({ rootNames, options, emitFlags, oldProgram, customTransformers, modifiedResourceFiles });
if (programReuse !== void 0) {
programReuse.program = program;
}
return reportErrorsAndExit(compileDiags, options, consoleError);
}
function readNgcCommandLineAndConfiguration(args) {
const options = {};
const parsedArgs = yargs(args).parserConfiguration({ "strip-aliased": true }).option("i18nFile", { type: "string" }).option("i18nFormat", { type: "string" }).option("locale", { type: "string" }).option("missingTranslation", { type: "string", choices: ["error", "warning", "ignore"] }).option("outFile", { type: "string" }).option("watch", { type: "boolean", alias: ["w"] }).parseSync();
if (parsedArgs.i18nFile)
options.i18nInFile = parsedArgs.i18nFile;
if (parsedArgs.i18nFormat)
options.i18nInFormat = parsedArgs.i18nFormat;
if (parsedArgs.locale)
options.i18nInLocale = parsedArgs.locale;
if (parsedArgs.missingTranslation)
options.i18nInMissingTranslations = parsedArgs.missingTranslation;
const config = readCommandLineAndConfiguration(args, options, ["i18nFile", "i18nFormat", "locale", "missingTranslation", "watch"]);
return { ...config, watch: parsedArgs.watch };
}
function readCommandLineAndConfiguration(args, existingOptions = {}, ngCmdLineOptions = []) {
let cmdConfig = ts2.parseCommandLine(args);
const project = cmdConfig.options.project || ".";
const cmdErrors = cmdConfig.errors.filter((e) => {
if (typeof e.messageText === "string") {
const msg = e.messageText;
return !ngCmdLineOptions.some((o) => msg.indexOf(o) >= 0);
}
return true;
});
if (cmdErrors.length) {
return {
project,
rootNames: [],
options: cmdConfig.options,
errors: cmdErrors,
emitFlags: EmitFlags.Default
};
}
const config = readConfiguration(project, cmdConfig.options);
const options = { ...config.options, ...existingOptions };
if (options.locale) {
options.i18nInLocale = options.locale;
}
return {
project,
rootNames: config.rootNames,
options,
errors: config.errors,
emitFlags: config.emitFlags
};
}
function getFormatDiagnosticsHost(options) {
const basePath = options ? options.basePath : void 0;
return {
getCurrentDirectory: () => basePath || ts2.sys.getCurrentDirectory(),
getCanonicalFileName: (fileName) => fileName.replace(/\\/g, "/"),
getNewLine: () => {
if (options && options.newLine !== void 0) {
return options.newLine === ts2.NewLineKind.LineFeed ? "\n" : "\r\n";
}
return ts2.sys.newLine;
}
};
}
function reportErrorsAndExit(allDiagnostics, options, consoleError = console.error) {
const errorsAndWarnings = allDiagnostics.filter((d) => d.category !== ts2.DiagnosticCategory.Message);
printDiagnostics(errorsAndWarnings, options, consoleError);
return exitCodeFromResult(allDiagnostics);
}
function watchMode(project, options, consoleError) {
return performWatchCompilation(createPerformWatchHost(project, (diagnostics) => {
printDiagnostics(diagnostics, options, consoleError);
}, options, void 0));
}
function printDiagnostics(diagnostics, options, consoleError) {
if (diagnostics.length === 0) {
return;
}
const formatHost = getFormatDiagnosticsHost(options);
consoleError(formatDiagnostics(diagnostics, formatHost));
}
export {
main,
readCommandLineAndConfiguration
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-T6CN22EQ.js.map

File diff suppressed because one or more lines are too long

16
node_modules/@angular/compiler-cli/bundles/chunk-XI2RTGAL.js generated vendored Executable file
View File

@@ -0,0 +1,16 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
}) : x)(function(x) {
if (typeof require !== "undefined")
return require.apply(this, arguments);
throw new Error('Dynamic require of "' + x + '" is not supported');
});
export {
__require
};
//# sourceMappingURL=chunk-XI2RTGAL.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

347
node_modules/@angular/compiler-cli/bundles/chunk-XXICUNOF.js generated vendored Executable file
View File

@@ -0,0 +1,347 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
TypeScriptReflectionHost,
isAliasImportDeclaration,
loadIsReferencedAliasDeclarationPatch
} from "./chunk-G64XB6AU.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/transformers/downlevel_decorators_transform/downlevel_decorators_transform.mjs
import ts from "typescript";
function isAngularDecorator(decorator, isCore) {
return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
}
var DECORATOR_INVOCATION_JSDOC_TYPE = "!Array<{type: !Function, args: (undefined|!Array<?>)}>";
function extractMetadataFromSingleDecorator(decorator, diagnostics) {
const metadataProperties = [];
const expr = decorator.expression;
switch (expr.kind) {
case ts.SyntaxKind.Identifier:
metadataProperties.push(ts.factory.createPropertyAssignment("type", expr));
break;
case ts.SyntaxKind.CallExpression:
const call = expr;
metadataProperties.push(ts.factory.createPropertyAssignment("type", call.expression));
if (call.arguments.length) {
const args = [];
for (const arg of call.arguments) {
args.push(arg);
}
const argsArrayLiteral = ts.factory.createArrayLiteralExpression(ts.factory.createNodeArray(args, true));
metadataProperties.push(ts.factory.createPropertyAssignment("args", argsArrayLiteral));
}
break;
default:
diagnostics.push({
file: decorator.getSourceFile(),
start: decorator.getStart(),
length: decorator.getEnd() - decorator.getStart(),
messageText: `${ts.SyntaxKind[decorator.kind]} not implemented in gathering decorator metadata.`,
category: ts.DiagnosticCategory.Error,
code: 0
});
break;
}
return ts.factory.createObjectLiteralExpression(metadataProperties);
}
function createCtorParametersClassProperty(diagnostics, entityNameToExpression, ctorParameters, isClosureCompilerEnabled) {
const params = [];
for (const ctorParam of ctorParameters) {
if (!ctorParam.type && ctorParam.decorators.length === 0) {
params.push(ts.factory.createNull());
continue;
}
const paramType = ctorParam.type ? typeReferenceToExpression(entityNameToExpression, ctorParam.type) : void 0;
const members = [ts.factory.createPropertyAssignment("type", paramType || ts.factory.createIdentifier("undefined"))];
const decorators = [];
for (const deco of ctorParam.decorators) {
decorators.push(extractMetadataFromSingleDecorator(deco, diagnostics));
}
if (decorators.length) {
members.push(ts.factory.createPropertyAssignment("decorators", ts.factory.createArrayLiteralExpression(decorators)));
}
params.push(ts.factory.createObjectLiteralExpression(members));
}
const initializer = ts.factory.createArrowFunction(void 0, void 0, [], void 0, ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), ts.factory.createArrayLiteralExpression(params, true));
const ctorProp = ts.factory.createPropertyDeclaration([ts.factory.createToken(ts.SyntaxKind.StaticKeyword)], "ctorParameters", void 0, void 0, initializer);
if (isClosureCompilerEnabled) {
ts.setSyntheticLeadingComments(ctorProp, [
{
kind: ts.SyntaxKind.MultiLineCommentTrivia,
text: [
`*`,
` * @type {function(): !Array<(null|{`,
` * type: ?,`,
` * decorators: (undefined|${DECORATOR_INVOCATION_JSDOC_TYPE}),`,
` * })>}`,
` * @nocollapse`,
` `
].join("\n"),
pos: -1,
end: -1,
hasTrailingNewLine: true
}
]);
}
return ctorProp;
}
function typeReferenceToExpression(entityNameToExpression, node) {
let kind = node.kind;
if (ts.isLiteralTypeNode(node)) {
kind = node.literal.kind;
}
switch (kind) {
case ts.SyntaxKind.FunctionType:
case ts.SyntaxKind.ConstructorType:
return ts.factory.createIdentifier("Function");
case ts.SyntaxKind.ArrayType:
case ts.SyntaxKind.TupleType:
return ts.factory.createIdentifier("Array");
case ts.SyntaxKind.TypePredicate:
case ts.SyntaxKind.TrueKeyword:
case ts.SyntaxKind.FalseKeyword:
case ts.SyntaxKind.BooleanKeyword:
return ts.factory.createIdentifier("Boolean");
case ts.SyntaxKind.StringLiteral:
case ts.SyntaxKind.StringKeyword:
return ts.factory.createIdentifier("String");
case ts.SyntaxKind.ObjectKeyword:
return ts.factory.createIdentifier("Object");
case ts.SyntaxKind.NumberKeyword:
case ts.SyntaxKind.NumericLiteral:
return ts.factory.createIdentifier("Number");
case ts.SyntaxKind.TypeReference:
const typeRef = node;
return entityNameToExpression(typeRef.typeName);
case ts.SyntaxKind.UnionType:
const childTypeNodes = node.types.filter((t) => !(ts.isLiteralTypeNode(t) && t.literal.kind === ts.SyntaxKind.NullKeyword));
return childTypeNodes.length === 1 ? typeReferenceToExpression(entityNameToExpression, childTypeNodes[0]) : void 0;
default:
return void 0;
}
}
function symbolIsRuntimeValue(typeChecker, symbol) {
if (symbol.flags & ts.SymbolFlags.Alias) {
symbol = typeChecker.getAliasedSymbol(symbol);
}
return (symbol.flags & ts.SymbolFlags.Value & ts.SymbolFlags.ConstEnumExcludes) !== 0;
}
function getDownlevelDecoratorsTransform(typeChecker, host, diagnostics, isCore, isClosureCompilerEnabled) {
function addJSDocTypeAnnotation(node, jsdocType) {
if (!isClosureCompilerEnabled) {
return;
}
ts.setSyntheticLeadingComments(node, [
{
kind: ts.SyntaxKind.MultiLineCommentTrivia,
text: `* @type {${jsdocType}} `,
pos: -1,
end: -1,
hasTrailingNewLine: true
}
]);
}
function createPropDecoratorsClassProperty(diagnostics2, properties) {
const entries = [];
for (const [name, decorators] of properties.entries()) {
entries.push(ts.factory.createPropertyAssignment(name, ts.factory.createArrayLiteralExpression(decorators.map((deco) => extractMetadataFromSingleDecorator(deco, diagnostics2)))));
}
const initializer = ts.factory.createObjectLiteralExpression(entries, true);
const prop = ts.factory.createPropertyDeclaration([ts.factory.createToken(ts.SyntaxKind.StaticKeyword)], "propDecorators", void 0, void 0, initializer);
addJSDocTypeAnnotation(prop, `!Object<string, ${DECORATOR_INVOCATION_JSDOC_TYPE}>`);
return prop;
}
return (context) => {
const referencedParameterTypes = loadIsReferencedAliasDeclarationPatch(context);
function entityNameToExpression(name) {
const symbol = typeChecker.getSymbolAtLocation(name);
if (!symbol || !symbolIsRuntimeValue(typeChecker, symbol) || !symbol.declarations || symbol.declarations.length === 0) {
return void 0;
}
if (ts.isQualifiedName(name)) {
const containerExpr = entityNameToExpression(name.left);
if (containerExpr === void 0) {
return void 0;
}
return ts.factory.createPropertyAccessExpression(containerExpr, name.right);
}
const decl = symbol.declarations[0];
if (isAliasImportDeclaration(decl)) {
referencedParameterTypes.add(decl);
if (decl.name !== void 0) {
return ts.setOriginalNode(ts.factory.createIdentifier(decl.name.text), decl.name);
}
}
return ts.setOriginalNode(ts.factory.createIdentifier(name.text), name);
}
function transformClassElement(element) {
element = ts.visitEachChild(element, decoratorDownlevelVisitor, context);
const decoratorsToKeep = [];
const toLower = [];
const decorators = host.getDecoratorsOfDeclaration(element) || [];
for (const decorator of decorators) {
const decoratorNode = decorator.node;
if (!isAngularDecorator(decorator, isCore)) {
decoratorsToKeep.push(decoratorNode);
continue;
}
toLower.push(decoratorNode);
}
if (!toLower.length)
return [void 0, element, []];
if (!element.name || !ts.isIdentifier(element.name)) {
diagnostics.push({
file: element.getSourceFile(),
start: element.getStart(),
length: element.getEnd() - element.getStart(),
messageText: `Cannot process decorators for class element with non-analyzable name.`,
category: ts.DiagnosticCategory.Error,
code: 0
});
return [void 0, element, []];
}
const elementModifiers = ts.canHaveModifiers(element) ? ts.getModifiers(element) : void 0;
let modifiers;
if (decoratorsToKeep.length || (elementModifiers == null ? void 0 : elementModifiers.length)) {
modifiers = ts.setTextRange(ts.factory.createNodeArray([...decoratorsToKeep, ...elementModifiers || []]), element.modifiers);
}
return [element.name.text, cloneClassElementWithModifiers(element, modifiers), toLower];
}
function transformConstructor(ctor) {
ctor = ts.visitEachChild(ctor, decoratorDownlevelVisitor, context);
const newParameters = [];
const oldParameters = ctor.parameters;
const parametersInfo = [];
for (const param of oldParameters) {
const decoratorsToKeep = [];
const paramInfo = { decorators: [], type: null };
const decorators = host.getDecoratorsOfDeclaration(param) || [];
for (const decorator of decorators) {
const decoratorNode = decorator.node;
if (!isAngularDecorator(decorator, isCore)) {
decoratorsToKeep.push(decoratorNode);
continue;
}
paramInfo.decorators.push(decoratorNode);
}
if (param.type) {
paramInfo.type = param.type;
}
parametersInfo.push(paramInfo);
let modifiers;
const paramModifiers = ts.getModifiers(param);
if (decoratorsToKeep.length || (paramModifiers == null ? void 0 : paramModifiers.length)) {
modifiers = [...decoratorsToKeep, ...paramModifiers || []];
}
const newParam = ts.factory.updateParameterDeclaration(param, modifiers, param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer);
newParameters.push(newParam);
}
const updated = ts.factory.updateConstructorDeclaration(ctor, ts.getModifiers(ctor), newParameters, ctor.body);
return [updated, parametersInfo];
}
function transformClassDeclaration(classDecl) {
const newMembers = [];
const decoratedProperties = /* @__PURE__ */ new Map();
let classParameters = null;
for (const member of classDecl.members) {
switch (member.kind) {
case ts.SyntaxKind.PropertyDeclaration:
case ts.SyntaxKind.GetAccessor:
case ts.SyntaxKind.SetAccessor:
case ts.SyntaxKind.MethodDeclaration: {
const [name, newMember, decorators] = transformClassElement(member);
newMembers.push(newMember);
if (name)
decoratedProperties.set(name, decorators);
continue;
}
case ts.SyntaxKind.Constructor: {
const ctor = member;
if (!ctor.body)
break;
const [newMember, parametersInfo] = transformConstructor(member);
classParameters = parametersInfo;
newMembers.push(newMember);
continue;
}
default:
break;
}
newMembers.push(ts.visitEachChild(member, decoratorDownlevelVisitor, context));
}
const possibleAngularDecorators = host.getDecoratorsOfDeclaration(classDecl) || [];
const hasAngularDecorator = possibleAngularDecorators.some((d) => isAngularDecorator(d, isCore));
if (classParameters) {
if (hasAngularDecorator || classParameters.some((p) => !!p.decorators.length)) {
newMembers.push(createCtorParametersClassProperty(diagnostics, entityNameToExpression, classParameters, isClosureCompilerEnabled));
}
}
if (decoratedProperties.size) {
newMembers.push(createPropDecoratorsClassProperty(diagnostics, decoratedProperties));
}
const members = ts.setTextRange(ts.factory.createNodeArray(newMembers, classDecl.members.hasTrailingComma), classDecl.members);
return ts.factory.updateClassDeclaration(classDecl, classDecl.modifiers, classDecl.name, classDecl.typeParameters, classDecl.heritageClauses, members);
}
function decoratorDownlevelVisitor(node) {
if (ts.isClassDeclaration(node)) {
return transformClassDeclaration(node);
}
return ts.visitEachChild(node, decoratorDownlevelVisitor, context);
}
return (sf) => {
return ts.visitEachChild(sf, decoratorDownlevelVisitor, context);
};
};
}
function cloneClassElementWithModifiers(node, modifiers) {
let clone;
if (ts.isMethodDeclaration(node)) {
clone = ts.factory.createMethodDeclaration(modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
} else if (ts.isPropertyDeclaration(node)) {
clone = ts.factory.createPropertyDeclaration(modifiers, node.name, node.questionToken, node.type, node.initializer);
} else if (ts.isGetAccessor(node)) {
clone = ts.factory.createGetAccessorDeclaration(modifiers, node.name, node.parameters, node.type, node.body);
} else if (ts.isSetAccessor(node)) {
clone = ts.factory.createSetAccessorDeclaration(modifiers, node.name, node.parameters, node.body);
} else {
throw new Error(`Unsupported decorated member with kind ${ts.SyntaxKind[node.kind]}`);
}
return ts.setOriginalNode(clone, node);
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/private/tooling.mjs
var GLOBAL_DEFS_FOR_TERSER = {
ngDevMode: false,
ngI18nClosureMode: false
};
var GLOBAL_DEFS_FOR_TERSER_WITH_AOT = {
...GLOBAL_DEFS_FOR_TERSER,
ngJitMode: false
};
function constructorParametersDownlevelTransform(program) {
const typeChecker = program.getTypeChecker();
const reflectionHost = new TypeScriptReflectionHost(typeChecker);
return getDownlevelDecoratorsTransform(
typeChecker,
reflectionHost,
[],
false,
false
);
}
export {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
constructorParametersDownlevelTransform
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-XXICUNOF.js.map

File diff suppressed because one or more lines are too long

210
node_modules/@angular/compiler-cli/bundles/index.js generated vendored Executable file
View File

@@ -0,0 +1,210 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
constructorParametersDownlevelTransform
} from "./chunk-XXICUNOF.js";
import {
DEFAULT_ERROR_CODE,
DecoratorType,
EmitFlags,
EntryType,
MemberTags,
MemberType,
NgCompiler,
NgCompilerHost,
NgtscProgram,
PatchedProgramIncrementalBuildStrategy,
SOURCE,
TsCreateProgramDriver,
UNKNOWN_ERROR_CODE,
calcProjectFileAndBasePath,
createCompilerHost,
createProgram,
defaultGatherDiagnostics,
exitCodeFromResult,
formatDiagnostics,
freshCompilationTicket,
incrementalFromStateTicket,
isTsDiagnostic,
performCompilation,
readConfiguration,
untagAllTsFiles
} from "./chunk-KDLK7PF4.js";
import {
OptimizeFor
} from "./chunk-B5URQIVL.js";
import "./chunk-O55FKOOW.js";
import "./chunk-G64XB6AU.js";
import {
ActivePerfRecorder,
PerfPhase
} from "./chunk-3IBJEGH3.js";
import {
ConsoleLogger,
LogLevel
} from "./chunk-SBDNBITT.js";
import {
LogicalFileSystem,
LogicalProjectPath,
NgtscCompilerHost,
NodeJSFileSystem,
absoluteFrom,
absoluteFromSourceFile,
basename,
dirname,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
join,
relative,
relativeFrom,
resolve,
setFileSystem,
toRelativeImport
} from "./chunk-CSOLWS7O.js";
import "./chunk-XI2RTGAL.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/version.mjs
import { Version } from "@angular/compiler";
var VERSION = new Version("17.0.8");
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/tsc_plugin.mjs
var NgTscPlugin = class {
get compiler() {
if (this._compiler === null) {
throw new Error("Lifecycle error: setupCompilation() must be called first.");
}
return this._compiler;
}
constructor(ngOptions) {
this.ngOptions = ngOptions;
this.name = "ngtsc";
this.options = null;
this.host = null;
this._compiler = null;
setFileSystem(new NodeJSFileSystem());
}
wrapHost(host, inputFiles, options) {
this.options = { ...this.ngOptions, ...options };
this.host = NgCompilerHost.wrap(host, inputFiles, this.options, null);
return this.host;
}
setupCompilation(program, oldProgram) {
var _a;
const perfRecorder = ActivePerfRecorder.zeroedToNow();
if (this.host === null || this.options === null) {
throw new Error("Lifecycle error: setupCompilation() before wrapHost().");
}
this.host.postProgramCreationCleanup();
untagAllTsFiles(program);
const programDriver = new TsCreateProgramDriver(program, this.host, this.options, this.host.shimExtensionPrefixes);
const strategy = new PatchedProgramIncrementalBuildStrategy();
const oldState = oldProgram !== void 0 ? strategy.getIncrementalState(oldProgram) : null;
let ticket;
const modifiedResourceFiles = /* @__PURE__ */ new Set();
if (this.host.getModifiedResourceFiles !== void 0) {
for (const resourceFile of (_a = this.host.getModifiedResourceFiles()) != null ? _a : []) {
modifiedResourceFiles.add(resolve(resourceFile));
}
}
if (oldProgram === void 0 || oldState === null) {
ticket = freshCompilationTicket(
program,
this.options,
strategy,
programDriver,
perfRecorder,
false,
false
);
} else {
strategy.toNextBuildStrategy().getIncrementalState(oldProgram);
ticket = incrementalFromStateTicket(oldProgram, oldState, program, this.options, strategy, programDriver, modifiedResourceFiles, perfRecorder, false, false);
}
this._compiler = NgCompiler.fromTicket(ticket, this.host);
return {
ignoreForDiagnostics: this._compiler.ignoreForDiagnostics,
ignoreForEmit: this._compiler.ignoreForEmit
};
}
getDiagnostics(file) {
if (file === void 0) {
return this.compiler.getDiagnostics();
}
return this.compiler.getDiagnosticsForFile(file, OptimizeFor.WholeProgram);
}
getOptionDiagnostics() {
return this.compiler.getOptionDiagnostics();
}
getNextProgram() {
return this.compiler.getCurrentProgram();
}
createTransformers() {
this.compiler.perfRecorder.phase(PerfPhase.TypeScriptEmit);
return this.compiler.prepareEmit().transformers;
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/index.mjs
setFileSystem(new NodeJSFileSystem());
export {
ConsoleLogger,
DEFAULT_ERROR_CODE,
DecoratorType,
EmitFlags,
EntryType,
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
LogLevel,
LogicalFileSystem,
LogicalProjectPath,
MemberTags,
MemberType,
NgTscPlugin,
NgtscCompilerHost,
NgtscProgram,
NodeJSFileSystem,
OptimizeFor,
SOURCE,
UNKNOWN_ERROR_CODE,
VERSION,
absoluteFrom,
absoluteFromSourceFile,
basename,
calcProjectFileAndBasePath,
constructorParametersDownlevelTransform,
createCompilerHost,
createProgram,
defaultGatherDiagnostics,
dirname,
exitCodeFromResult,
formatDiagnostics,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
isTsDiagnostic,
join,
performCompilation,
readConfiguration,
relative,
relativeFrom,
resolve,
setFileSystem,
toRelativeImport
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=index.js.map

6
node_modules/@angular/compiler-cli/bundles/index.js.map generated vendored Executable file
View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../packages/compiler-cli/src/version.ts", "../../../../../../packages/compiler-cli/src/ngtsc/tsc_plugin.ts", "../../../../../../packages/compiler-cli/index.ts"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,SAAQ,eAAc;AAEf,IAAM,UAAU,IAAI,QAAQ,mBAAmB;;;AC+ChD,IAAO,cAAP,MAAkB;EAOtB,IAAI,WAAQ;AACV,QAAI,KAAK,cAAc,MAAM;AAC3B,YAAM,IAAI,MAAM,2DAA2D;;AAE7E,WAAO,KAAK;EACd;EAEA,YAAoB,WAAa;AAAb,SAAA,YAAA;AAbpB,SAAA,OAAO;AAEC,SAAA,UAAkC;AAClC,SAAA,OAA4B;AAC5B,SAAA,YAA6B;AAUnC,kBAAc,IAAI,iBAAgB,CAAE;EACtC;EAEA,SACI,MAAmD,YACnD,SAA2B;AAI7B,SAAK,UAAU,EAAC,GAAG,KAAK,WAAW,GAAG,QAAO;AAC7C,SAAK,OAAO,eAAe,KAAK,MAAM,YAAY,KAAK,SAA0B,IAAI;AACrF,WAAO,KAAK;EACd;EAEA,iBAAiB,SAAqB,YAAuB;AA5F/D;AAsGI,UAAM,eAAe,mBAAmB,YAAW;AACnD,QAAI,KAAK,SAAS,QAAQ,KAAK,YAAY,MAAM;AAC/C,YAAM,IAAI,MAAM,wDAAwD;;AAE1E,SAAK,KAAK,2BAA0B;AACpC,oBAAgB,OAAO;AACvB,UAAM,gBAAgB,IAAI,sBACtB,SAAS,KAAK,MAAM,KAAK,SAAS,KAAK,KAAK,qBAAqB;AACrE,UAAM,WAAW,IAAI,uCAAsC;AAC3D,UAAM,WAAW,eAAe,SAAY,SAAS,oBAAoB,UAAU,IAAI;AACvF,QAAI;AAEJ,UAAM,wBAAwB,oBAAI,IAAG;AACrC,QAAI,KAAK,KAAK,6BAA6B,QAAW;AACpD,iBAAW,iBAAgB,UAAK,KAAK,yBAAwB,MAAlC,YAAwC,CAAA,GAAI;AACrE,8BAAsB,IAAI,QAAQ,YAAY,CAAC;;;AAInD,QAAI,eAAe,UAAa,aAAa,MAAM;AACjD,eAAS;QACL;QAAS,KAAK;QAAS;QAAU;QAAe;QAChB;QAA6B;MAAK;WACjE;AACL,eAAS,oBAAmB,EAAG,oBAAoB,UAAU;AAC7D,eAAS,2BACL,YAAY,UAAU,SAAS,KAAK,SAAS,UAAU,eACvD,uBAAuB,cAAc,OAAO,KAAK;;AAEvD,SAAK,YAAY,WAAW,WAAW,QAAQ,KAAK,IAAI;AACxD,WAAO;MACL,sBAAsB,KAAK,UAAU;MACrC,eAAe,KAAK,UAAU;;EAElC;EAEA,eAAe,MAAoB;AACjC,QAAI,SAAS,QAAW;AACtB,aAAO,KAAK,SAAS,eAAc;;AAErC,WAAO,KAAK,SAAS,sBAAsB,MAAM,YAAY,YAAY;EAC3E;EAEA,uBAAoB;AAClB,WAAO,KAAK,SAAS,qBAAoB;EAC3C;EAEA,iBAAc;AACZ,WAAO,KAAK,SAAS,kBAAiB;EACxC;EAEA,qBAAkB;AAGhB,SAAK,SAAS,aAAa,MAAM,UAAU,cAAc;AACzD,WAAO,KAAK,SAAS,YAAW,EAAG;EACrC;;;;ACrHF,cAAc,IAAI,iBAAgB,CAAE;",
"names": []
}

View File

@@ -0,0 +1,418 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
FatalLinkerError,
FileLinker,
LinkerEnvironment,
assert,
isFatalLinkerError
} from "../../chunk-GT7FGHLZ.js";
import "../../chunk-O55FKOOW.js";
import "../../chunk-G64XB6AU.js";
import {
ConsoleLogger,
LogLevel
} from "../../chunk-SBDNBITT.js";
import "../../chunk-GYHDNUIK.js";
import {
NodeJSFileSystem
} from "../../chunk-CSOLWS7O.js";
import "../../chunk-XI2RTGAL.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/es2015_linker_plugin.mjs
import { types as t4 } from "@babel/core";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_factory.mjs
import { types as t } from "@babel/core";
var BabelAstFactory = class {
constructor(sourceUrl) {
this.sourceUrl = sourceUrl;
this.createArrayLiteral = t.arrayExpression;
this.createBlock = t.blockStatement;
this.createConditional = t.conditionalExpression;
this.createExpressionStatement = t.expressionStatement;
this.createIdentifier = t.identifier;
this.createIfStatement = t.ifStatement;
this.createNewExpression = t.newExpression;
this.createParenthesizedExpression = t.parenthesizedExpression;
this.createReturnStatement = t.returnStatement;
this.createThrowStatement = t.throwStatement;
this.createUnaryExpression = t.unaryExpression;
}
attachComments(statement, leadingComments) {
for (let i = leadingComments.length - 1; i >= 0; i--) {
const comment = leadingComments[i];
t.addComment(statement, "leading", comment.toString(), !comment.multiline);
}
}
createAssignment(target, value) {
assert(target, isLExpression, "must be a left hand side expression");
return t.assignmentExpression("=", target, value);
}
createBinaryExpression(leftOperand, operator, rightOperand) {
switch (operator) {
case "&&":
case "||":
case "??":
return t.logicalExpression(operator, leftOperand, rightOperand);
default:
return t.binaryExpression(operator, leftOperand, rightOperand);
}
}
createCallExpression(callee, args, pure) {
const call = t.callExpression(callee, args);
if (pure) {
t.addComment(call, "leading", " @__PURE__ ", false);
}
return call;
}
createElementAccess(expression, element) {
return t.memberExpression(expression, element, true);
}
createFunctionDeclaration(functionName, parameters, body) {
assert(body, t.isBlockStatement, "a block");
return t.functionDeclaration(t.identifier(functionName), parameters.map((param) => t.identifier(param)), body);
}
createArrowFunctionExpression(parameters, body) {
if (t.isStatement(body)) {
assert(body, t.isBlockStatement, "a block");
}
return t.arrowFunctionExpression(parameters.map((param) => t.identifier(param)), body);
}
createFunctionExpression(functionName, parameters, body) {
assert(body, t.isBlockStatement, "a block");
const name = functionName !== null ? t.identifier(functionName) : null;
return t.functionExpression(name, parameters.map((param) => t.identifier(param)), body);
}
createDynamicImport(url) {
return this.createCallExpression(t.import(), [t.stringLiteral(url)], false);
}
createLiteral(value) {
if (typeof value === "string") {
return t.stringLiteral(value);
} else if (typeof value === "number") {
return t.numericLiteral(value);
} else if (typeof value === "boolean") {
return t.booleanLiteral(value);
} else if (value === void 0) {
return t.identifier("undefined");
} else if (value === null) {
return t.nullLiteral();
} else {
throw new Error(`Invalid literal: ${value} (${typeof value})`);
}
}
createObjectLiteral(properties) {
return t.objectExpression(properties.map((prop) => {
const key = prop.quoted ? t.stringLiteral(prop.propertyName) : t.identifier(prop.propertyName);
return t.objectProperty(key, prop.value);
}));
}
createPropertyAccess(expression, propertyName) {
return t.memberExpression(expression, t.identifier(propertyName), false);
}
createTaggedTemplate(tag, template) {
const elements = template.elements.map((element, i) => this.setSourceMapRange(t.templateElement(element, i === template.elements.length - 1), element.range));
return t.taggedTemplateExpression(tag, t.templateLiteral(elements, template.expressions));
}
createTypeOfExpression(expression) {
return t.unaryExpression("typeof", expression);
}
createVariableDeclaration(variableName, initializer, type) {
return t.variableDeclaration(type, [t.variableDeclarator(t.identifier(variableName), initializer)]);
}
setSourceMapRange(node, sourceMapRange) {
if (sourceMapRange === null) {
return node;
}
node.loc = {
filename: sourceMapRange.url !== this.sourceUrl ? sourceMapRange.url : void 0,
start: {
line: sourceMapRange.start.line + 1,
column: sourceMapRange.start.column
},
end: {
line: sourceMapRange.end.line + 1,
column: sourceMapRange.end.column
}
};
node.start = sourceMapRange.start.offset;
node.end = sourceMapRange.end.offset;
return node;
}
};
function isLExpression(expr) {
return t.isLVal(expr);
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/ast/babel_ast_host.mjs
import { types as t2 } from "@babel/core";
var BabelAstHost = class {
constructor() {
this.isStringLiteral = t2.isStringLiteral;
this.isNumericLiteral = t2.isNumericLiteral;
this.isArrayLiteral = t2.isArrayExpression;
this.isObjectLiteral = t2.isObjectExpression;
this.isCallExpression = t2.isCallExpression;
}
getSymbolName(node) {
if (t2.isIdentifier(node)) {
return node.name;
} else if (t2.isMemberExpression(node) && t2.isIdentifier(node.property)) {
return node.property.name;
} else {
return null;
}
}
parseStringLiteral(str) {
assert(str, t2.isStringLiteral, "a string literal");
return str.value;
}
parseNumericLiteral(num) {
assert(num, t2.isNumericLiteral, "a numeric literal");
return num.value;
}
isBooleanLiteral(bool) {
return t2.isBooleanLiteral(bool) || isMinifiedBooleanLiteral(bool);
}
parseBooleanLiteral(bool) {
if (t2.isBooleanLiteral(bool)) {
return bool.value;
} else if (isMinifiedBooleanLiteral(bool)) {
return !bool.argument.value;
} else {
throw new FatalLinkerError(bool, "Unsupported syntax, expected a boolean literal.");
}
}
parseArrayLiteral(array) {
assert(array, t2.isArrayExpression, "an array literal");
return array.elements.map((element) => {
assert(element, isNotEmptyElement, "element in array not to be empty");
assert(element, isNotSpreadElement, "element in array not to use spread syntax");
return element;
});
}
parseObjectLiteral(obj) {
assert(obj, t2.isObjectExpression, "an object literal");
const result = /* @__PURE__ */ new Map();
for (const property of obj.properties) {
assert(property, t2.isObjectProperty, "a property assignment");
assert(property.value, t2.isExpression, "an expression");
assert(property.key, isObjectExpressionPropertyName, "a property name");
const key = t2.isIdentifier(property.key) ? property.key.name : property.key.value;
result.set(`${key}`, property.value);
}
return result;
}
isFunctionExpression(node) {
return t2.isFunction(node);
}
parseReturnValue(fn) {
assert(fn, this.isFunctionExpression, "a function");
if (!t2.isBlockStatement(fn.body)) {
return fn.body;
}
if (fn.body.body.length !== 1) {
throw new FatalLinkerError(fn.body, "Unsupported syntax, expected a function body with a single return statement.");
}
const stmt = fn.body.body[0];
assert(stmt, t2.isReturnStatement, "a function body with a single return statement");
if (stmt.argument === null || stmt.argument === void 0) {
throw new FatalLinkerError(stmt, "Unsupported syntax, expected function to return a value.");
}
return stmt.argument;
}
parseCallee(call) {
assert(call, t2.isCallExpression, "a call expression");
assert(call.callee, t2.isExpression, "an expression");
return call.callee;
}
parseArguments(call) {
assert(call, t2.isCallExpression, "a call expression");
return call.arguments.map((arg) => {
assert(arg, isNotSpreadArgument, "argument not to use spread syntax");
assert(arg, t2.isExpression, "argument to be an expression");
return arg;
});
}
getRange(node) {
if (node.loc == null || node.start == null || node.end == null) {
throw new FatalLinkerError(node, "Unable to read range for node - it is missing location information.");
}
return {
startLine: node.loc.start.line - 1,
startCol: node.loc.start.column,
startPos: node.start,
endPos: node.end
};
}
};
function isNotEmptyElement(e) {
return e !== null;
}
function isNotSpreadElement(e) {
return !t2.isSpreadElement(e);
}
function isObjectExpressionPropertyName(n) {
return t2.isIdentifier(n) || t2.isStringLiteral(n) || t2.isNumericLiteral(n);
}
function isNotSpreadArgument(arg) {
return !t2.isSpreadElement(arg);
}
function isMinifiedBooleanLiteral(node) {
return t2.isUnaryExpression(node) && node.prefix && node.operator === "!" && t2.isNumericLiteral(node.argument) && (node.argument.value === 0 || node.argument.value === 1);
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_declaration_scope.mjs
import { types as t3 } from "@babel/core";
var BabelDeclarationScope = class {
constructor(declarationScope) {
this.declarationScope = declarationScope;
}
getConstantScopeRef(expression) {
let bindingExpression = expression;
while (t3.isMemberExpression(bindingExpression)) {
bindingExpression = bindingExpression.object;
}
if (!t3.isIdentifier(bindingExpression)) {
return null;
}
const binding = this.declarationScope.getBinding(bindingExpression.name);
if (binding === void 0) {
return null;
}
const path = binding.scope.path;
if (!path.isFunctionDeclaration() && !path.isFunctionExpression() && !(path.isProgram() && path.node.sourceType === "module")) {
return null;
}
return path;
}
};
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/es2015_linker_plugin.mjs
function createEs2015LinkerPlugin({ fileSystem, logger, ...options }) {
let fileLinker = null;
return {
visitor: {
Program: {
enter(path) {
var _a, _b;
assertNull(fileLinker);
const file = path.hub.file;
const filename = (_a = file.opts.filename) != null ? _a : file.opts.filenameRelative;
if (!filename) {
throw new Error("No filename (nor filenameRelative) provided by Babel. This is required for the linking of partially compiled directives and components.");
}
const sourceUrl = fileSystem.resolve((_b = file.opts.cwd) != null ? _b : ".", filename);
const linkerEnvironment = LinkerEnvironment.create(fileSystem, logger, new BabelAstHost(), new BabelAstFactory(sourceUrl), options);
fileLinker = new FileLinker(linkerEnvironment, sourceUrl, file.code);
},
exit() {
assertNotNull(fileLinker);
for (const { constantScope, statements } of fileLinker.getConstantStatements()) {
insertStatements(constantScope, statements);
}
fileLinker = null;
}
},
CallExpression(call) {
if (fileLinker === null) {
return;
}
try {
const calleeName = getCalleeName(call);
if (calleeName === null) {
return;
}
const args = call.node.arguments;
if (!fileLinker.isPartialDeclaration(calleeName) || !isExpressionArray(args)) {
return;
}
const declarationScope = new BabelDeclarationScope(call.scope);
const replacement = fileLinker.linkPartialDeclaration(calleeName, args, declarationScope);
call.replaceWith(replacement);
} catch (e) {
const node = isFatalLinkerError(e) ? e.node : call.node;
throw buildCodeFrameError(call.hub.file, e.message, node);
}
}
}
};
}
function insertStatements(path, statements) {
if (path.isProgram()) {
insertIntoProgram(path, statements);
} else {
insertIntoFunction(path, statements);
}
}
function insertIntoFunction(fn, statements) {
const body = fn.get("body");
body.unshiftContainer("body", statements);
}
function insertIntoProgram(program, statements) {
const body = program.get("body");
const importStatements = body.filter((statement) => statement.isImportDeclaration());
if (importStatements.length === 0) {
program.unshiftContainer("body", statements);
} else {
importStatements[importStatements.length - 1].insertAfter(statements);
}
}
function getCalleeName(call) {
const callee = call.node.callee;
if (t4.isIdentifier(callee)) {
return callee.name;
} else if (t4.isMemberExpression(callee) && t4.isIdentifier(callee.property)) {
return callee.property.name;
} else if (t4.isMemberExpression(callee) && t4.isStringLiteral(callee.property)) {
return callee.property.value;
} else {
return null;
}
}
function isExpressionArray(nodes) {
return nodes.every((node) => t4.isExpression(node));
}
function assertNull(obj) {
if (obj !== null) {
throw new Error("BUG - expected `obj` to be null");
}
}
function assertNotNull(obj) {
if (obj === null) {
throw new Error("BUG - expected `obj` not to be null");
}
}
function buildCodeFrameError(file, message, node) {
const filename = file.opts.filename || "(unknown file)";
const error = file.buildCodeFrameError(node, message);
return `${filename}: ${error.message}`;
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/src/babel_plugin.mjs
function defaultLinkerPlugin(api, options) {
api.assertVersion(7);
return createEs2015LinkerPlugin({
...options,
fileSystem: new NodeJSFileSystem(),
logger: new ConsoleLogger(LogLevel.info)
});
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/linker/babel/index.mjs
var babel_default = defaultLinkerPlugin;
export {
createEs2015LinkerPlugin,
babel_default as default
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

28
node_modules/@angular/compiler-cli/bundles/linker/index.js generated vendored Executable file
View File

@@ -0,0 +1,28 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
DEFAULT_LINKER_OPTIONS,
FatalLinkerError,
FileLinker,
LinkerEnvironment,
assert,
isFatalLinkerError,
needsLinking
} from "../chunk-GT7FGHLZ.js";
import "../chunk-O55FKOOW.js";
import "../chunk-G64XB6AU.js";
import "../chunk-GYHDNUIK.js";
import "../chunk-CSOLWS7O.js";
import "../chunk-XI2RTGAL.js";
export {
DEFAULT_LINKER_OPTIONS,
FatalLinkerError,
FileLinker,
LinkerEnvironment,
assert,
isFatalLinkerError,
needsLinking
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

52
node_modules/@angular/compiler-cli/bundles/ngcc/index.js generated vendored Executable file
View File

@@ -0,0 +1,52 @@
#!/usr/bin/env node
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/ngcc/index.mjs
function stringEncaseCRLFWithFirstIndex(value, prefix, postfix, index) {
let endIndex = 0;
let returnValue = "";
do {
const gotCR = value[index - 1] === "\r";
returnValue += value.substring(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
endIndex = index + 1;
index = value.indexOf("\n", endIndex);
} while (index !== -1);
returnValue += value.substring(endIndex);
return returnValue;
}
function styleMessage(message) {
const open = "\x1B[31m\x1B[1m";
const close = "\x1B[22m\x1B[39m";
let styledMessage = message;
const lfIndex = styledMessage.indexOf("\n");
if (lfIndex !== -1) {
styledMessage = stringEncaseCRLFWithFirstIndex(styledMessage, close, open, lfIndex);
}
return open + styledMessage + close;
}
var warningMsg = `
==========================================
ALERT: As of Angular 16, "ngcc" is no longer required and not invoked during CLI builds. You are seeing this message because the current operation invoked the "ngcc" command directly. This "ngcc" invocation can be safely removed.
A common reason for this is invoking "ngcc" from a "postinstall" hook in package.json.
In Angular 17, this command will be removed. Remove this and any other invocations to prevent errors in later versions.
==========================================
`;
console.warn(styleMessage(warningMsg));
process.exit(0);
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../../packages/compiler-cli/ngcc/index.ts"],
"mappings": ";;;;;;;AAUA,SAAS,+BACL,OAAe,QAAgB,SAAiB,OAAa;AAC/D,MAAI,WAAW;AACf,MAAI,cAAc;AAElB,KAAG;AACD,UAAM,QAAQ,MAAM,QAAQ,OAAO;AACnC,mBAAe,MAAM,UAAU,UAAU,QAAQ,QAAQ,IAAI,KAAK,IAAI,UACjE,QAAQ,SAAS,QAAQ;AAC9B,eAAW,QAAQ;AACnB,YAAQ,MAAM,QAAQ,MAAM,QAAQ;WAC7B,UAAU;AAEnB,iBAAe,MAAM,UAAU,QAAQ;AACvC,SAAO;AACT;AAIA,SAAS,aAAa,SAAe;AAEnC,QAAM,OAAO;AACb,QAAM,QAAQ;AAEd,MAAI,gBAAgB;AACpB,QAAM,UAAU,cAAc,QAAQ,IAAI;AAC1C,MAAI,YAAY,IAAI;AAClB,oBAAgB,+BAA+B,eAAe,OAAO,MAAM,OAAO;;AAGpF,SAAO,OAAO,gBAAgB;AAChC;AAEA,IAAM,aAAa;;;;;;;;;;;;;AAcnB,QAAQ,KAAK,aAAa,UAAU,CAAC;AACrC,QAAQ,KAAK,CAAC;",
"names": []
}

19
node_modules/@angular/compiler-cli/bundles/private/bazel.js generated vendored Executable file
View File

@@ -0,0 +1,19 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
PerfPhase
} from "../chunk-3IBJEGH3.js";
import "../chunk-XI2RTGAL.js";
export {
PerfPhase
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=bazel.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View File

@@ -0,0 +1,67 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
ConsoleLogger,
LogLevel
} from "../chunk-SBDNBITT.js";
import {
SourceFile,
SourceFileLoader
} from "../chunk-GYHDNUIK.js";
import {
LogicalFileSystem,
LogicalProjectPath,
NgtscCompilerHost,
NodeJSFileSystem,
absoluteFrom,
absoluteFromSourceFile,
basename,
dirname,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
join,
relative,
relativeFrom,
resolve,
setFileSystem,
toRelativeImport
} from "../chunk-CSOLWS7O.js";
import "../chunk-XI2RTGAL.js";
export {
ConsoleLogger,
LogLevel,
LogicalFileSystem,
LogicalProjectPath,
NgtscCompilerHost,
NodeJSFileSystem,
SourceFile,
SourceFileLoader,
absoluteFrom,
absoluteFromSourceFile,
basename,
dirname,
getFileSystem,
getSourceFileOrError,
isLocalRelativePath,
isRoot,
isRooted,
join,
relative,
relativeFrom,
resolve,
setFileSystem,
toRelativeImport
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=localize.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View File

@@ -0,0 +1,40 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
DynamicValue,
PartialEvaluator,
PotentialImportKind,
PotentialImportMode,
StaticInterpreter,
forwardRefResolver
} from "../chunk-B5URQIVL.js";
import "../chunk-O55FKOOW.js";
import {
Reference,
TypeScriptReflectionHost,
reflectObjectLiteral
} from "../chunk-G64XB6AU.js";
import "../chunk-3IBJEGH3.js";
import "../chunk-CSOLWS7O.js";
import "../chunk-XI2RTGAL.js";
export {
DynamicValue,
PartialEvaluator,
PotentialImportKind,
PotentialImportMode,
Reference,
StaticInterpreter,
TypeScriptReflectionHost,
forwardRefResolver,
reflectObjectLiteral
};
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=migrations.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View File

@@ -0,0 +1,18 @@
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
constructorParametersDownlevelTransform
} from "../chunk-XXICUNOF.js";
import "../chunk-G64XB6AU.js";
import "../chunk-CSOLWS7O.js";
import "../chunk-XI2RTGAL.js";
export {
GLOBAL_DEFS_FOR_TERSER,
GLOBAL_DEFS_FOR_TERSER_WITH_AOT,
constructorParametersDownlevelTransform
};
//# sourceMappingURL=tooling.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": [],
"mappings": "",
"names": []
}

View File

@@ -0,0 +1,61 @@
#!/usr/bin/env node
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
main,
readCommandLineAndConfiguration
} from "../../chunk-T6CN22EQ.js";
import {
EmitFlags
} from "../../chunk-KDLK7PF4.js";
import "../../chunk-B5URQIVL.js";
import "../../chunk-O55FKOOW.js";
import "../../chunk-G64XB6AU.js";
import "../../chunk-3IBJEGH3.js";
import {
NodeJSFileSystem,
setFileSystem
} from "../../chunk-CSOLWS7O.js";
import "../../chunk-XI2RTGAL.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs
import "reflect-metadata";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/extract_i18n.mjs
import yargs from "yargs";
function mainXi18n(args2, consoleError = console.error) {
const config = readXi18nCommandLineAndConfiguration(args2);
return main(args2, consoleError, config, void 0, void 0, void 0);
}
function readXi18nCommandLineAndConfiguration(args2) {
const options = {};
const parsedArgs = yargs(args2).option("i18nFormat", { type: "string" }).option("locale", { type: "string" }).option("outFile", { type: "string" }).parseSync();
if (parsedArgs.outFile)
options.i18nOutFile = parsedArgs.outFile;
if (parsedArgs.i18nFormat)
options.i18nOutFormat = parsedArgs.i18nFormat;
if (parsedArgs.locale)
options.i18nOutLocale = parsedArgs.locale;
const config = readCommandLineAndConfiguration(args2, options, [
"outFile",
"i18nFormat",
"locale"
]);
return { ...config, emitFlags: EmitFlags.I18nBundle };
}
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/bin/ng_xi18n.mjs
process.title = "Angular i18n Message Extractor (ng-xi18n)";
var args = process.argv.slice(2);
setFileSystem(new NodeJSFileSystem());
process.exitCode = mainXi18n(args);
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=ng_xi18n.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../../../packages/compiler-cli/src/bin/ng_xi18n.ts", "../../../../../../../../packages/compiler-cli/src/extract_i18n.ts"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAUA,OAAO;;;ACEP,OAAO,WAAW;AAMZ,SAAU,UACZA,OAAgB,eAAsC,QAAQ,OAAK;AACrE,QAAM,SAAS,qCAAqCA,KAAI;AACxD,SAAO,KAAKA,OAAM,cAAc,QAAQ,QAAW,QAAW,MAAS;AACzE;AAEA,SAAS,qCAAqCA,OAAc;AAC1D,QAAM,UAA+B,CAAA;AACrC,QAAM,aAAa,MAAMA,KAAI,EACL,OAAO,cAAc,EAAC,MAAM,SAAQ,CAAC,EACrC,OAAO,UAAU,EAAC,MAAM,SAAQ,CAAC,EACjC,OAAO,WAAW,EAAC,MAAM,SAAQ,CAAC,EAClC,UAAS;AAEjC,MAAI,WAAW;AAAS,YAAQ,cAAc,WAAW;AACzD,MAAI,WAAW;AAAY,YAAQ,gBAAgB,WAAW;AAC9D,MAAI,WAAW;AAAQ,YAAQ,gBAAgB,WAAW;AAE1D,QAAM,SAAS,gCAAgCA,OAAM,SAAS;IAC5D;IACA;IACA;GACD;AAED,SAAO,EAAC,GAAG,QAAQ,WAAe,UAAU,WAAU;AACxD;;;AD5BA,QAAQ,QAAQ;AAChB,IAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,cAAc,IAAI,iBAAgB,CAAE;AACpC,QAAQ,WAAW,UAAU,IAAI;",
"names": ["args"]
}

39
node_modules/@angular/compiler-cli/bundles/src/bin/ngc.js generated vendored Executable file
View File

@@ -0,0 +1,39 @@
#!/usr/bin/env node
import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);
import {
main
} from "../../chunk-T6CN22EQ.js";
import "../../chunk-KDLK7PF4.js";
import "../../chunk-B5URQIVL.js";
import "../../chunk-O55FKOOW.js";
import "../../chunk-G64XB6AU.js";
import "../../chunk-3IBJEGH3.js";
import {
NodeJSFileSystem,
setFileSystem
} from "../../chunk-CSOLWS7O.js";
import "../../chunk-XI2RTGAL.js";
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/bin/ngc.mjs
import "reflect-metadata";
async function runNgcComamnd() {
process.title = "Angular Compiler (ngc)";
const args = process.argv.slice(2);
setFileSystem(new NodeJSFileSystem());
process.exitCode = main(args, void 0, void 0, void 0, void 0, void 0);
}
runNgcComamnd().catch((e) => {
console.error(e);
process.exitCode = 1;
});
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=ngc.js.map

View File

@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["../../../../../../../../packages/compiler-cli/src/bin/ngc.ts"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAUA,OAAO;AAKP,eAAe,gBAAa;AAC1B,UAAQ,QAAQ;AAChB,QAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,gBAAc,IAAI,iBAAgB,CAAE;AAEpC,UAAQ,WAAW,KAAK,MAAM,QAAW,QAAW,QAAW,QAAW,MAAS;AACrF;AAEA,cAAa,EAAG,MAAM,OAAI;AACxB,UAAQ,MAAM,CAAC;AACf,UAAQ,WAAW;AACrB,CAAC;",
"names": []
}