@cyclonedx/cyclonedx-library
Version:
Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).
2 lines • 117 kB
JavaScript
/*! For license information please see lib.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CycloneDX_library=t():e.CycloneDX_library=t()}(self,()=>(()=>{"use strict";var e={48:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNotUndefined=function(e){return void 0!==e}},94:function(e,t,r){var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)},s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&o(t,e,r[a]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.XML=t.JSON=t.Types=void 0,a(r(7676),t),a(r(8070),t),t.Types=s(r(8440)),a(r(8352),t),t.JSON=s(r(4212)),a(r(8127),t),t.XML=s(r(1007)),a(r(4889),t)},162:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9979),t)},204:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XmlSerializer=void 0;const n=r(48),o=r(4889);class i extends o.XmlBaseSerializer{_serialize(e,{space:t}={}){const r=this.#e(e);return(new XMLSerializer).serializeToString(r)}#e(e){const t=document.implementation.createDocument(null,null);return t.appendChild(this.#t(e,t,null)),t}#r(e){const t=(e.namespace??e.attributes?.xmlns)?.toString()??"";return t.length>0?t:null}#t(e,t,r){const o=this.#r(e)??r,i=t.createElementNS(o,e.name);return(0,n.isNotUndefined)(e.attributes)&&this.#n(i,e.attributes),(0,n.isNotUndefined)(e.children)&&this.#o(i,e.children,o),i}#n(e,t){for(const[r,o]of Object.entries(t))(0,n.isNotUndefined)(o)&&"xmlns"!==r&&e.setAttribute(r,`${o}`)}#o(e,t,r=null){if(void 0===t)return;if("string"==typeof t||"number"==typeof t)return void(e.textContent=t.toString());const n=e.ownerDocument;for(const o of t)"element"===o.type&&e.appendChild(this.#t(o,n,r))}}t.XmlSerializer=i},382:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(656),t),o(r(4196),t),o(r(2971),t)},428:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PackageUrlFactory=void 0;const n=r(3899),o=r(3321);t.PackageUrlFactory=class{#i;constructor(e){this.#i=e}get type(){return this.#i}makeFromComponent(e,t=!1){const r={};let i;r.__proto__=null;const a=t?e.externalReferences.sorted():e.externalReferences;for(const e of a){const t=e.url.toString();if(!(t.length<=0))switch(e.type){case o.ExternalReferenceType.VCS:[r[n.PurlQualifierNames.VcsUrl],i]=t.split("#",2);break;case o.ExternalReferenceType.Distribution:r[n.PurlQualifierNames.DownloadUrl]=t}}const s=e.hashes;s.size>0&&(r[n.PurlQualifierNames.Checksum]=Array.from(t?s.sorted():s,([e,t])=>`${e.toLowerCase()}:${t.toLowerCase()}`).join(","));try{return new n.PackageURL(this.#i,e.group,e.name,e.version,r,i)}catch{return}}}},608:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCPE=function(e){return"string"==typeof e&&r.test(e)};const r=/^([c][pP][eE]:\/[AHOaho]?(:[A-Za-z0-9\._\-~%]*){0,6})$|^(cpe:2\.3:[aho\*\-](:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,\/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\*\-]))(:(((\?*|\*?)([a-zA-Z0-9\-\._]|(\\[\\\*\?!"#$$%&'\(\)\+,\/:;<=>@\[\]\^`\{\|}~]))+(\?*|\*?))|[\*\-])){4})$/},625:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Source=void 0,t.Source=class{name;url;constructor(e={}){this.name=e.name,this.url=e.url}compare(e){return(this.url?.toString()??"").localeCompare(e.url?.toString()??"")||(this.name??"").localeCompare(e.name??"")}}},656:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpecVersionDict=t.Spec1dot7=t.Spec1dot6=t.Spec1dot5=t.Spec1dot4=t.Spec1dot3=t.Spec1dot2=void 0;const n=r(5866),o=r(3321),i=r(1525),a=r(5486),s=r(1699),l=r(4196);t.Spec1dot2=Object.freeze(new s._Spec(l.Version.v1dot2,[l.Format.XML,l.Format.JSON],[n.ComponentType.Application,n.ComponentType.Framework,n.ComponentType.Library,n.ComponentType.Container,n.ComponentType.OperatingSystem,n.ComponentType.Device,n.ComponentType.Firmware,n.ComponentType.File],[i.HashAlgorithm.MD5,i.HashAlgorithm["SHA-1"],i.HashAlgorithm["SHA-256"],i.HashAlgorithm["SHA-384"],i.HashAlgorithm["SHA-512"],i.HashAlgorithm["SHA3-256"],i.HashAlgorithm["SHA3-384"],i.HashAlgorithm["SHA3-512"],i.HashAlgorithm["BLAKE2b-256"],i.HashAlgorithm["BLAKE2b-384"],i.HashAlgorithm["BLAKE2b-512"],i.HashAlgorithm.BLAKE3],/^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,[o.ExternalReferenceType.VCS,o.ExternalReferenceType.IssueTracker,o.ExternalReferenceType.Website,o.ExternalReferenceType.Advisories,o.ExternalReferenceType.BOM,o.ExternalReferenceType.MailingList,o.ExternalReferenceType.Social,o.ExternalReferenceType.Chat,o.ExternalReferenceType.Documentation,o.ExternalReferenceType.Support,o.ExternalReferenceType.Distribution,o.ExternalReferenceType.License,o.ExternalReferenceType.BuildMeta,o.ExternalReferenceType.BuildSystem,o.ExternalReferenceType.Other],!0,!1,!0,!1,!1,[],!1,!1,!1,!1,!1,!1,!0,!1)),t.Spec1dot3=Object.freeze(new s._Spec(l.Version.v1dot3,[l.Format.XML,l.Format.JSON],[n.ComponentType.Application,n.ComponentType.Framework,n.ComponentType.Library,n.ComponentType.Container,n.ComponentType.OperatingSystem,n.ComponentType.Device,n.ComponentType.Firmware,n.ComponentType.File],[i.HashAlgorithm.MD5,i.HashAlgorithm["SHA-1"],i.HashAlgorithm["SHA-256"],i.HashAlgorithm["SHA-384"],i.HashAlgorithm["SHA-512"],i.HashAlgorithm["SHA3-256"],i.HashAlgorithm["SHA3-384"],i.HashAlgorithm["SHA3-512"],i.HashAlgorithm["BLAKE2b-256"],i.HashAlgorithm["BLAKE2b-384"],i.HashAlgorithm["BLAKE2b-512"],i.HashAlgorithm.BLAKE3],/^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,[o.ExternalReferenceType.VCS,o.ExternalReferenceType.IssueTracker,o.ExternalReferenceType.Website,o.ExternalReferenceType.Advisories,o.ExternalReferenceType.BOM,o.ExternalReferenceType.MailingList,o.ExternalReferenceType.Social,o.ExternalReferenceType.Chat,o.ExternalReferenceType.Documentation,o.ExternalReferenceType.Support,o.ExternalReferenceType.Distribution,o.ExternalReferenceType.License,o.ExternalReferenceType.BuildMeta,o.ExternalReferenceType.BuildSystem,o.ExternalReferenceType.Other],!0,!1,!0,!0,!1,[],!0,!1,!0,!0,!0,!1,!0,!1)),t.Spec1dot4=Object.freeze(new s._Spec(l.Version.v1dot4,[l.Format.XML,l.Format.JSON],[n.ComponentType.Application,n.ComponentType.Framework,n.ComponentType.Library,n.ComponentType.Container,n.ComponentType.OperatingSystem,n.ComponentType.Device,n.ComponentType.Firmware,n.ComponentType.File],[i.HashAlgorithm.MD5,i.HashAlgorithm["SHA-1"],i.HashAlgorithm["SHA-256"],i.HashAlgorithm["SHA-384"],i.HashAlgorithm["SHA-512"],i.HashAlgorithm["SHA3-256"],i.HashAlgorithm["SHA3-384"],i.HashAlgorithm["SHA3-512"],i.HashAlgorithm["BLAKE2b-256"],i.HashAlgorithm["BLAKE2b-384"],i.HashAlgorithm["BLAKE2b-512"],i.HashAlgorithm.BLAKE3],/^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,[o.ExternalReferenceType.VCS,o.ExternalReferenceType.IssueTracker,o.ExternalReferenceType.Website,o.ExternalReferenceType.Advisories,o.ExternalReferenceType.BOM,o.ExternalReferenceType.MailingList,o.ExternalReferenceType.Social,o.ExternalReferenceType.Chat,o.ExternalReferenceType.Documentation,o.ExternalReferenceType.Support,o.ExternalReferenceType.Distribution,o.ExternalReferenceType.License,o.ExternalReferenceType.BuildMeta,o.ExternalReferenceType.BuildSystem,o.ExternalReferenceType.ReleaseNotes,o.ExternalReferenceType.Other],!0,!0,!1,!0,!0,[a.RatingMethod.CVSSv2,a.RatingMethod.CVSSv3,a.RatingMethod.CVSSv31,a.RatingMethod.OWASP,a.RatingMethod.Other],!0,!1,!0,!0,!0,!1,!0,!1)),t.Spec1dot5=Object.freeze(new s._Spec(l.Version.v1dot5,[l.Format.XML,l.Format.JSON],[n.ComponentType.Application,n.ComponentType.Framework,n.ComponentType.Library,n.ComponentType.Container,n.ComponentType.Platform,n.ComponentType.OperatingSystem,n.ComponentType.Device,n.ComponentType.DeviceDriver,n.ComponentType.Firmware,n.ComponentType.File,n.ComponentType.MachineLearningModel,n.ComponentType.Data],[i.HashAlgorithm.MD5,i.HashAlgorithm["SHA-1"],i.HashAlgorithm["SHA-256"],i.HashAlgorithm["SHA-384"],i.HashAlgorithm["SHA-512"],i.HashAlgorithm["SHA3-256"],i.HashAlgorithm["SHA3-384"],i.HashAlgorithm["SHA3-512"],i.HashAlgorithm["BLAKE2b-256"],i.HashAlgorithm["BLAKE2b-384"],i.HashAlgorithm["BLAKE2b-512"],i.HashAlgorithm.BLAKE3],/^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,[o.ExternalReferenceType.VCS,o.ExternalReferenceType.IssueTracker,o.ExternalReferenceType.Website,o.ExternalReferenceType.Advisories,o.ExternalReferenceType.BOM,o.ExternalReferenceType.MailingList,o.ExternalReferenceType.Social,o.ExternalReferenceType.Chat,o.ExternalReferenceType.Documentation,o.ExternalReferenceType.Support,o.ExternalReferenceType.Distribution,o.ExternalReferenceType.DistributionIntake,o.ExternalReferenceType.License,o.ExternalReferenceType.BuildMeta,o.ExternalReferenceType.BuildSystem,o.ExternalReferenceType.ReleaseNotes,o.ExternalReferenceType.SecurityContact,o.ExternalReferenceType.ModelCard,o.ExternalReferenceType.Log,o.ExternalReferenceType.Configuration,o.ExternalReferenceType.Evidence,o.ExternalReferenceType.Formulation,o.ExternalReferenceType.Attestation,o.ExternalReferenceType.ThreatModel,o.ExternalReferenceType.AdversaryModel,o.ExternalReferenceType.RiskAssessment,o.ExternalReferenceType.VulnerabilityAssertion,o.ExternalReferenceType.ExploitabilityStatement,o.ExternalReferenceType.PentestReport,o.ExternalReferenceType.StaticAnalysisReport,o.ExternalReferenceType.DynamicAnalysisReport,o.ExternalReferenceType.RuntimeAnalysisReport,o.ExternalReferenceType.ComponentAnalysisReport,o.ExternalReferenceType.MaturityReport,o.ExternalReferenceType.CertificationReport,o.ExternalReferenceType.CodifiedInfrastructure,o.ExternalReferenceType.QualityMetrics,o.ExternalReferenceType.POAM,o.ExternalReferenceType.Other],!0,!0,!1,!0,!0,[a.RatingMethod.CVSSv2,a.RatingMethod.CVSSv3,a.RatingMethod.CVSSv31,a.RatingMethod.CVSSv4,a.RatingMethod.OWASP,a.RatingMethod.SSVC,a.RatingMethod.Other],!0,!0,!0,!0,!0,!1,!0,!0)),t.Spec1dot6=Object.freeze(new s._Spec(l.Version.v1dot6,[l.Format.XML,l.Format.JSON],[n.ComponentType.Application,n.ComponentType.Framework,n.ComponentType.Library,n.ComponentType.Container,n.ComponentType.Platform,n.ComponentType.OperatingSystem,n.ComponentType.Device,n.ComponentType.DeviceDriver,n.ComponentType.Firmware,n.ComponentType.File,n.ComponentType.MachineLearningModel,n.ComponentType.Data,n.ComponentType.CryptographicAsset],[i.HashAlgorithm.MD5,i.HashAlgorithm["SHA-1"],i.HashAlgorithm["SHA-256"],i.HashAlgorithm["SHA-384"],i.HashAlgorithm["SHA-512"],i.HashAlgorithm["SHA3-256"],i.HashAlgorithm["SHA3-384"],i.HashAlgorithm["SHA3-512"],i.HashAlgorithm["BLAKE2b-256"],i.HashAlgorithm["BLAKE2b-384"],i.HashAlgorithm["BLAKE2b-512"],i.HashAlgorithm.BLAKE3],/^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,[o.ExternalReferenceType.VCS,o.ExternalReferenceType.IssueTracker,o.ExternalReferenceType.Website,o.ExternalReferenceType.Advisories,o.ExternalReferenceType.BOM,o.ExternalReferenceType.MailingList,o.ExternalReferenceType.Social,o.ExternalReferenceType.Chat,o.ExternalReferenceType.Documentation,o.ExternalReferenceType.Support,o.ExternalReferenceType.SourceDistribution,o.ExternalReferenceType.Distribution,o.ExternalReferenceType.DistributionIntake,o.ExternalReferenceType.License,o.ExternalReferenceType.BuildMeta,o.ExternalReferenceType.BuildSystem,o.ExternalReferenceType.ReleaseNotes,o.ExternalReferenceType.SecurityContact,o.ExternalReferenceType.ModelCard,o.ExternalReferenceType.Log,o.ExternalReferenceType.Configuration,o.ExternalReferenceType.Evidence,o.ExternalReferenceType.Formulation,o.ExternalReferenceType.Attestation,o.ExternalReferenceType.ThreatModel,o.ExternalReferenceType.AdversaryModel,o.ExternalReferenceType.RiskAssessment,o.ExternalReferenceType.VulnerabilityAssertion,o.ExternalReferenceType.ExploitabilityStatement,o.ExternalReferenceType.PentestReport,o.ExternalReferenceType.StaticAnalysisReport,o.ExternalReferenceType.DynamicAnalysisReport,o.ExternalReferenceType.RuntimeAnalysisReport,o.ExternalReferenceType.ComponentAnalysisReport,o.ExternalReferenceType.MaturityReport,o.ExternalReferenceType.CertificationReport,o.ExternalReferenceType.CodifiedInfrastructure,o.ExternalReferenceType.QualityMetrics,o.ExternalReferenceType.POAM,o.ExternalReferenceType.ElectronicSignature,o.ExternalReferenceType.DigitalSignature,o.ExternalReferenceType.RFC9116,o.ExternalReferenceType.Other],!0,!0,!1,!0,!0,[a.RatingMethod.CVSSv2,a.RatingMethod.CVSSv3,a.RatingMethod.CVSSv31,a.RatingMethod.CVSSv4,a.RatingMethod.OWASP,a.RatingMethod.SSVC,a.RatingMethod.Other],!0,!0,!0,!0,!0,!0,!0,!0)),t.Spec1dot7=Object.freeze(new s._Spec(l.Version.v1dot7,[l.Format.XML,l.Format.JSON],[n.ComponentType.Application,n.ComponentType.Framework,n.ComponentType.Library,n.ComponentType.Container,n.ComponentType.Platform,n.ComponentType.OperatingSystem,n.ComponentType.Device,n.ComponentType.DeviceDriver,n.ComponentType.Firmware,n.ComponentType.File,n.ComponentType.MachineLearningModel,n.ComponentType.Data,n.ComponentType.CryptographicAsset],[i.HashAlgorithm.MD5,i.HashAlgorithm["SHA-1"],i.HashAlgorithm["SHA-256"],i.HashAlgorithm["SHA-384"],i.HashAlgorithm["SHA-512"],i.HashAlgorithm["SHA3-256"],i.HashAlgorithm["SHA3-384"],i.HashAlgorithm["SHA3-512"],i.HashAlgorithm["BLAKE2b-256"],i.HashAlgorithm["BLAKE2b-384"],i.HashAlgorithm["BLAKE2b-512"],i.HashAlgorithm.BLAKE3,i.HashAlgorithm["Streebog-256"],i.HashAlgorithm["Streebog-512"]],/^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,[o.ExternalReferenceType.VCS,o.ExternalReferenceType.IssueTracker,o.ExternalReferenceType.Website,o.ExternalReferenceType.Advisories,o.ExternalReferenceType.BOM,o.ExternalReferenceType.MailingList,o.ExternalReferenceType.Social,o.ExternalReferenceType.Chat,o.ExternalReferenceType.Documentation,o.ExternalReferenceType.Support,o.ExternalReferenceType.SourceDistribution,o.ExternalReferenceType.Distribution,o.ExternalReferenceType.DistributionIntake,o.ExternalReferenceType.License,o.ExternalReferenceType.BuildMeta,o.ExternalReferenceType.BuildSystem,o.ExternalReferenceType.ReleaseNotes,o.ExternalReferenceType.SecurityContact,o.ExternalReferenceType.ModelCard,o.ExternalReferenceType.Log,o.ExternalReferenceType.Configuration,o.ExternalReferenceType.Evidence,o.ExternalReferenceType.Formulation,o.ExternalReferenceType.Attestation,o.ExternalReferenceType.ThreatModel,o.ExternalReferenceType.AdversaryModel,o.ExternalReferenceType.RiskAssessment,o.ExternalReferenceType.VulnerabilityAssertion,o.ExternalReferenceType.ExploitabilityStatement,o.ExternalReferenceType.PentestReport,o.ExternalReferenceType.StaticAnalysisReport,o.ExternalReferenceType.DynamicAnalysisReport,o.ExternalReferenceType.RuntimeAnalysisReport,o.ExternalReferenceType.ComponentAnalysisReport,o.ExternalReferenceType.MaturityReport,o.ExternalReferenceType.CertificationReport,o.ExternalReferenceType.CodifiedInfrastructure,o.ExternalReferenceType.QualityMetrics,o.ExternalReferenceType.POAM,o.ExternalReferenceType.ElectronicSignature,o.ExternalReferenceType.DigitalSignature,o.ExternalReferenceType.RFC9116,o.ExternalReferenceType.Citation,o.ExternalReferenceType.Patent,o.ExternalReferenceType.PatentAssertion,o.ExternalReferenceType.PatentFamily,o.ExternalReferenceType.RFC9116,o.ExternalReferenceType.Other],!0,!0,!1,!0,!0,[a.RatingMethod.CVSSv2,a.RatingMethod.CVSSv3,a.RatingMethod.CVSSv31,a.RatingMethod.CVSSv4,a.RatingMethod.OWASP,a.RatingMethod.SSVC,a.RatingMethod.Other],!0,!0,!0,!0,!0,!0,!0,!0)),t.SpecVersionDict=Object.freeze({[l.Version.v1dot7]:t.Spec1dot7,[l.Version.v1dot6]:t.Spec1dot6,[l.Version.v1dot5]:t.Spec1dot5,[l.Version.v1dot4]:t.Spec1dot4,[l.Version.v1dot3]:t.Spec1dot3,[l.Version.v1dot2]:t.Spec1dot2})},734:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;const n=r(7988),o=r(4799),i=r(4477),a=r(4654),s=r(7645);t.Metadata=class{timestamp;lifecycles;tools;authors;component;manufacture;supplier;licenses;properties;constructor(e={}){this.timestamp=e.timestamp,this.lifecycles=e.lifecycles??new o.LifecycleRepository,this.tools=e.tools??new s.Tools,this.authors=e.authors??new i.OrganizationalContactRepository,this.component=e.component,this.manufacture=e.manufacture,this.supplier=e.supplier,this.licenses=e.licenses??new n.LicenseRepository,this.properties=e.properties??new a.PropertyRepository}}},759:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CweRepository=void 0,t.isCWE=function(e){return(0,o.isPositiveInteger)(e)};const n=r(1507),o=r(9708);class i extends n.SortableNumbers{}t.CweRepository=i},785:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AffectedVersionRepository=t.AffectedVersionRange=t.AffectedSingleVersion=t.AffectRepository=t.Affect=void 0;const n=r(1507);t.Affect=class{ref;versions;constructor(e,t={}){this.ref=e,this.versions=t.versions??new i}compare(e){return this.ref.compare(e.ref)||this.versions.compare(e.versions)}};class o extends n.SortableComparables{}t.AffectRepository=o,t.AffectedSingleVersion=class{version;status;constructor(e,t={}){this.version=e,this.status=t.status}compare(e){return this.version.localeCompare(e.version)||(this.status??"").localeCompare(e.status??"")}},t.AffectedVersionRange=class{range;status;constructor(e,t={}){this.range=e,this.status=t.status}compare(e){return this.range.localeCompare(e.range)||(this.status??"").localeCompare(e.status??"")}};class i extends n.SortableComparables{}t.AffectedVersionRepository=i},857:function(e,t,r){var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||o(t,e,r)},s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&o(t,e,r[a]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Vulnerability=void 0,a(r(4277),t),a(r(2904),t),a(r(5866),t),a(r(3321),t),a(r(1525),t),a(r(1688),t),a(r(7894),t),t.Vulnerability=s(r(4880))},870:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5026),t),o(r(7472),t)},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Analysis=void 0;const n=r(9511);t.Analysis=class{state;justification;response;detail;constructor(e={}){this.state=e.state,this.justification=e.justification,this.response=e.response??new n.AnalysisResponseRepository,this.detail=e.detail}}},1007:function(e,t,r){var n,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),a=0;a<r.length;a++)"default"!==r[a]&&o(t,e,r[a]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Types=t.Normalize=void 0,t.Normalize=a(r(1280)),t.Types=a(r(2970))},1089:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.chainI=function*(...e){for(const t of e)for(const e of t)yield e}},1280:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VulnerabilityAffectedVersionNormalizer=t.VulnerabilityAffectNormalizer=t.VulnerabilityAnalysisNormalizer=t.VulnerabilityCreditsNormalizer=t.VulnerabilityAdvisoryNormalizer=t.VulnerabilityRatingNormalizer=t.VulnerabilityReferenceNormalizer=t.VulnerabilitySourceNormalizer=t.VulnerabilityNormalizer=t.DependencyGraphNormalizer=t.PropertyNormalizer=t.AttachmentNormalizer=t.ExternalReferenceNormalizer=t.SWIDNormalizer=t.LicenseNormalizer=t.ComponentEvidenceNormalizer=t.ServiceNormalizer=t.ComponentNormalizer=t.OrganizationalEntityNormalizer=t.OrganizationalContactNormalizer=t.HashNormalizer=t.ToolsNormalizer=t.ToolNormalizer=t.LifecycleNormalizer=t.MetadataNormalizer=t.BomNormalizer=t.Factory=void 0;const n=r(1089),o=r(48),i=r(9027),a=r(7977),s=r(8207),l=r(7988),c=r(4799),p=r(785),m=r(4317),u=r(4196),d=r(2931),f=r(2970);t.Factory=class{#a;constructor(e){this.#a=e}get spec(){return this.#a}makeForBom(){return new v(this)}makeForMetadata(){return new b(this)}makeForLifecycle(){return new g(this)}makeForComponent(){return new L(this)}makeForService(){return new R(this)}makeForComponentEvidence(){return new z(this)}makeForTool(){return new S(this)}makeForTools(){return new C(this)}makeForOrganizationalContact(){return new _(this)}makeForOrganizationalEntity(){return new A(this)}makeForHash(){return new x(this)}makeForLicense(){return new P(this)}makeForSWID(){return new O(this)}makeForExternalReference(){return new T(this)}makeForAttachment(){return new E(this)}makeForProperty(){return new M(this)}makeForDependencyGraph(){return new N(this)}makeForVulnerability(){return new w(this)}makeForVulnerabilitySource(){return new D(this)}makeForVulnerabilityReference(){return new F(this)}makeForVulnerabilityRating(){return new k(this)}makeForVulnerabilityAdvisory(){return new j(this)}makeForVulnerabilityCredits(){return new I(this)}makeForVulnerabilityAffect(){return new V(this)}makeForVulnerabilityAffectedVersion(){return new H(this)}makeForVulnerabilityAnalysis(){return new B(this)}};const h=new Map([[u.Version.v1dot7,"http://cyclonedx.org/schema/bom/1.7"],[u.Version.v1dot6,"http://cyclonedx.org/schema/bom/1.6"],[u.Version.v1dot5,"http://cyclonedx.org/schema/bom/1.5"],[u.Version.v1dot4,"http://cyclonedx.org/schema/bom/1.4"],[u.Version.v1dot3,"http://cyclonedx.org/schema/bom/1.3"],[u.Version.v1dot2,"http://cyclonedx.org/schema/bom/1.2"],[u.Version.v1dot1,"http://cyclonedx.org/schema/bom/1.1"],[u.Version.v1dot0,"http://cyclonedx.org/schema/bom/1.0"]]);class y{_factory;constructor(e){this._factory=e}get factory(){return this._factory}}class v extends y{normalize(e,t){const r={type:"element",name:"components",children:e.components.size>0?this._factory.makeForComponent().normalizeIterable(e.components,t,"component"):void 0},n=this._factory.spec.supportsServices&&e.services.size>0?{type:"element",name:"services",children:this._factory.makeForService().normalizeIterable(e.services,t,"service")}:void 0,i=this._factory.spec.supportsVulnerabilities&&e.vulnerabilities.size>0?{type:"element",name:"vulnerabilities",children:this._factory.makeForVulnerability().normalizeIterable(e.vulnerabilities,t,"vulnerability")}:void 0;return{type:"element",name:"bom",namespace:h.get(this._factory.spec.version),attributes:{version:e.version,serialNumber:this.#s(e.serialNumber)?e.serialNumber:void 0},children:[this._factory.makeForMetadata().normalize(e.metadata,t,"metadata"),r,n,this._factory.spec.supportsDependencyGraph?this._factory.makeForDependencyGraph().normalize(e,t,"dependencies"):void 0,i].filter(o.isNotUndefined)}}#s(e){return void 0!==e&&/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|^\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}$/.test(e)}}t.BomNormalizer=v;class b extends y{normalize(e,t,r){const n=this._factory.makeForOrganizationalEntity(),i=this._factory.spec.supportsMetadataLifecycles&&e.lifecycles.size>0?{type:"element",name:"lifecycles",children:this._factory.makeForLifecycle().normalizeIterable(e.lifecycles,t,"lifecycle")}:void 0,a=e.tools.size>0?this._factory.makeForTools().normalize(e.tools,t,"tools"):void 0,s=e.authors.size>0?{type:"element",name:"authors",children:this._factory.makeForOrganizationalContact().normalizeIterable(e.authors,t,"author")}:void 0,l=this._factory.spec.supportsMetadataLicenses&&e.licenses.size>0?{type:"element",name:"licenses",children:this._factory.makeForLicense().normalizeIterable(e.licenses,t)}:void 0,c=this._factory.spec.supportsMetadataProperties&&e.properties.size>0?{type:"element",name:"properties",children:this._factory.makeForProperty().normalizeIterable(e.properties,t,"property")}:void 0;return{type:"element",name:r,children:[K(e.timestamp,"timestamp"),i,a,s,void 0===e.component?void 0:this._factory.makeForComponent().normalize(e.component,t,"component"),void 0===e.manufacture?void 0:n.normalize(e.manufacture,t,"manufacture"),void 0===e.supplier?void 0:n.normalize(e.supplier,t,"supplier"),l,c].filter(o.isNotUndefined)}}}t.MetadataNormalizer=b;class g extends y{normalize(e,t,r){return e instanceof c.NamedLifecycle?{type:"element",name:r,children:[$(e.name,"name",d.normalizedString),G(e.description,"description")].filter(o.isNotUndefined)}:{type:"element",name:r,children:[$(e,"phase")]}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.LifecycleNormalizer=g;class S extends y{normalize(e,t,r){const n=e.hashes.size>0?{type:"element",name:"hashes",children:this._factory.makeForHash().normalizeIterable(e.hashes,t,"hash")}:void 0,i=this._factory.spec.supportsToolReferences&&e.externalReferences.size>0?{type:"element",name:"externalReferences",children:this._factory.makeForExternalReference().normalizeIterable(e.externalReferences,t,"reference")}:void 0;return{type:"element",name:r,children:[G(e.vendor,"vendor",d.normalizedString),G(e.name,"name",d.normalizedString),G(e.version,"version",d.normalizedString),n,i].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.ToolNormalizer=S;class C extends y{normalize(e,t,r){let o=[];return e.tools.size>0||!this._factory.spec.supportsToolsComponentsServices?o=this._factory.makeForTool().normalizeIterable(new s.ToolRepository((0,n.chainI)(Array.from(e.components,s.Tool.fromComponent),Array.from(e.services,s.Tool.fromService),e.tools)),t,"tool"):(e.components.size>0&&o.push({type:"element",name:"components",children:this._factory.makeForComponent().normalizeIterable(e.components,t,"component")}),e.services.size>0&&o.push({type:"element",name:"services",children:this._factory.makeForService().normalizeIterable(e.services,t,"service")})),{type:"element",name:r,children:o}}}t.ToolsNormalizer=C;class x extends y{normalize([e,t],r,n){const o=this._factory.spec;return o.supportsHashAlgorithm(e)&&o.supportsHashValue(t)?{type:"element",name:n,attributes:{alg:e},children:(0,d.token)(t)}:void 0}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r)).filter(o.isNotUndefined)}}t.HashNormalizer=x;class _ extends y{normalize(e,t,r){return{type:"element",name:r,children:[G(e.name,"name",d.normalizedString),G(e.email,"email",d.normalizedString),G(e.phone,"phone",d.normalizedString)].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.OrganizationalContactNormalizer=_;class A extends y{normalize(e,t,r){return{type:"element",name:r,children:[G(e.name,"name",d.normalizedString),...Y(Array.from(e.url,e=>(0,a.escapeUri)(e.toString())),t,"url").filter(({children:e})=>f.XmlSchema.isAnyURI(e)),...this._factory.makeForOrganizationalContact().normalizeIterable(e.contact,t,"contact")].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.OrganizationalEntityNormalizer=A;class L extends y{normalize(e,t,r){const n=this._factory.spec;if(!n.supportsComponentType(e.type))return;const i=void 0===e.supplier?void 0:this._factory.makeForOrganizationalEntity().normalize(e.supplier,t,"supplier"),a=(n.requiresComponentVersion?$:G)(e.version??"","version",d.normalizedString),s=e.hashes.size>0?{type:"element",name:"hashes",children:this._factory.makeForHash().normalizeIterable(e.hashes,t,"hash")}:void 0,l=e.licenses.size>0?{type:"element",name:"licenses",children:this._factory.makeForLicense().normalizeIterable(e.licenses,t)}:void 0,c=void 0===e.swid?void 0:this._factory.makeForSWID().normalize(e.swid,t,"swid"),p=e.externalReferences.size>0?{type:"element",name:"externalReferences",children:this._factory.makeForExternalReference().normalizeIterable(e.externalReferences,t,"reference")}:void 0,m=n.supportsProperties(e)&&e.properties.size>0?{type:"element",name:"properties",children:this._factory.makeForProperty().normalizeIterable(e.properties,t,"property")}:void 0,u=e.components.size>0?{type:"element",name:"components",children:this.normalizeIterable(e.components,t,"component")}:void 0,f=n.supportsComponentEvidence&&void 0!==e.evidence?this._factory.makeForComponentEvidence().normalize(e.evidence,t,"evidence"):void 0;return{type:"element",name:r,attributes:{type:e.type,"bom-ref":e.bomRef.value},children:[i,G(e.author,"author",d.normalizedString),G(e.publisher,"publisher",d.normalizedString),G(e.group,"group",d.normalizedString),$(e.name,"name",d.normalizedString),a,G(e.description,"description",d.normalizedString),G(e.scope,"scope"),s,l,G(e.copyright,"copyright",d.normalizedString),G(e.cpe,"cpe"),G(e.purl,"purl"),c,p,m,u,f].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r)).filter(o.isNotUndefined)}}t.ComponentNormalizer=L;class R extends y{normalize(e,t,r){const n=this._factory.spec,i=void 0===e.provider?void 0:this._factory.makeForOrganizationalEntity().normalize(e.provider,t,"provider"),a=e.licenses.size>0?{type:"element",name:"licenses",children:this._factory.makeForLicense().normalizeIterable(e.licenses,t)}:void 0,s=e.externalReferences.size>0?{type:"element",name:"externalReferences",children:this._factory.makeForExternalReference().normalizeIterable(e.externalReferences,t,"reference")}:void 0,l=n.supportsProperties(e)&&e.properties.size>0?{type:"element",name:"properties",children:this._factory.makeForProperty().normalizeIterable(e.properties,t,"property")}:void 0,c=e.services.size>0?{type:"element",name:"services",children:this.normalizeIterable(e.services,t,"service")}:void 0;return{type:"element",name:r,attributes:{"bom-ref":e.bomRef.value},children:[i,G(e.group,"group",d.normalizedString),$(e.name,"name",d.normalizedString),G(e.version,"version",d.normalizedString),G(e.description,"description",d.normalizedString),a,s,l,c].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.ServiceNormalizer=R;class z extends y{normalize(e,t,r){return{type:"element",name:r,children:[e.licenses.size>0?{type:"element",name:"licenses",children:this._factory.makeForLicense().normalizeIterable(e.licenses,t)}:void 0,e.copyright.size>0?{type:"element",name:"copyright",children:Y(e.copyright,t,"text")}:void 0].filter(o.isNotUndefined)}}}t.ComponentEvidenceNormalizer=z;class P extends y{normalize(e,t){switch(!0){case e instanceof l.NamedLicense:return this.#l(e,t);case e instanceof l.SpdxLicense:return(0,m.isSupportedSpdxId)(e.id)?this.#c(e,t):this.#l(new l.NamedLicense(e.id,{url:e.url}),t);case e instanceof l.LicenseExpression:return this.#p(e);default:throw new TypeError("Unexpected LicenseChoice")}}#l(e,t){const r=(0,a.escapeUri)(e.url?.toString());return{type:"element",name:"license",attributes:{acknowledgement:this._factory.spec.supportsLicenseAcknowledgement?e.acknowledgement:void 0},children:[$(e.name,"name",d.normalizedString),void 0===e.text?void 0:this._factory.makeForAttachment().normalize(e.text,t,"text"),f.XmlSchema.isAnyURI(r)?$(r,"url"):void 0].filter(o.isNotUndefined)}}#c(e,t){const r=(0,a.escapeUri)(e.url?.toString());return{type:"element",name:"license",attributes:{acknowledgement:this._factory.spec.supportsLicenseAcknowledgement?e.acknowledgement:void 0},children:[$(e.id,"id"),void 0===e.text?void 0:this._factory.makeForAttachment().normalize(e.text,t,"text"),f.XmlSchema.isAnyURI(r)?$(r,"url"):void 0].filter(o.isNotUndefined)}}#p(e){const t=$(e.expression,"expression",d.normalizedString);return t.attributes={acknowledgement:this._factory.spec.supportsLicenseAcknowledgement?e.acknowledgement:void 0},t}normalizeIterable(e,t){const r=t.sortLists?e.sorted():Array.from(e);if(r.length>1){const e=r.filter(e=>e instanceof l.LicenseExpression);if(e.length>0)return[this.#p(e[0])]}return r.map(e=>this.normalize(e,t))}}t.LicenseNormalizer=P;class O extends y{normalize(e,t,r){const n=(0,a.escapeUri)(e.url?.toString());return{type:"element",name:r,attributes:{tagId:e.tagId,name:e.name,version:e.version||void 0,tagVersion:e.tagVersion,patch:void 0===e.patch?void 0:e.patch?"true":"false"},children:[void 0===e.text?void 0:this._factory.makeForAttachment().normalize(e.text,t,"text"),f.XmlSchema.isAnyURI(n)?$(n,"url"):void 0].filter(o.isNotUndefined)}}}t.SWIDNormalizer=O;class T extends y{normalize(e,t,r){const n=(0,a.escapeUri)(e.url.toString()),i=this._factory.spec.supportsExternalReferenceHashes&&e.hashes.size>0?{type:"element",name:"hashes",children:this._factory.makeForHash().normalizeIterable(e.hashes,t,"hash")}:void 0;return this._factory.spec.supportsExternalReferenceType(e.type)&&f.XmlSchema.isAnyURI(n)?{type:"element",name:r,attributes:{type:e.type},children:[$(n,"url"),G(e.comment,"comment"),i].filter(o.isNotUndefined)}:void 0}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r)).filter(o.isNotUndefined)}}t.ExternalReferenceNormalizer=T;class E extends y{normalize(e,t,r){return{type:"element",name:r,attributes:{"content-type":e.contentType?(0,d.normalizedString)(e.contentType):void 0,encoding:e.encoding||void 0},children:e.content.toString()}}}t.AttachmentNormalizer=E;class M extends y{normalize(e,t,r){return{type:"element",name:r,attributes:{name:e.name},children:(0,d.normalizedString)(e.value)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.PropertyNormalizer=M;class N extends y{normalize(e,t,r){const n=new Map;if(void 0!==e.metadata.component){n.set(e.metadata.component.bomRef,e.metadata.component.dependencies);for(const t of e.metadata.component.components[i.treeIteratorSymbol]())n.set(t.bomRef,t.dependencies)}for(const t of e.components[i.treeIteratorSymbol]())n.set(t.bomRef,t.dependencies);for(const t of e.services[i.treeIteratorSymbol]())n.set(t.bomRef,t.dependencies);const a=[];for(const[e,r]of n){const i=this.#m(e,r,n,t);(0,o.isNotUndefined)(i)&&a.push(i)}return t.sortLists&&a.sort(({attributes:{ref:e}},{attributes:{ref:t}})=>e.localeCompare(t)),{type:"element",name:r,children:a}}#m(e,t,r,n){const o=e.toString();if(0===o.length)return;const i=Array.from(t).filter(t=>r.has(t)&&t!==e).map(e=>e.toString()).filter(e=>e.length>0);return n.sortLists&&i.sort((e,t)=>e.localeCompare(t)),{type:"element",name:"dependency",attributes:{ref:o},children:i.map(e=>({type:"element",name:"dependency",attributes:{ref:e}}))}}}t.DependencyGraphNormalizer=N;class w extends y{normalize(e,t,r){const n=e.references.size>0?{type:"element",name:"references",children:this._factory.makeForVulnerabilityReference().normalizeIterable(e.references,t,"reference")}:void 0,i=e.ratings.size>0?{type:"element",name:"ratings",children:this._factory.makeForVulnerabilityRating().normalizeIterable(e.ratings,t,"rating")}:void 0,a=e.cwes.size>0?{type:"element",name:"cwes",children:(t.sortLists?e.cwes.sorted():Array.from(e.cwes)).map(e=>$(e,"cwe"))}:void 0,s=e.advisories.size>0?{type:"element",name:"advisories",children:this._factory.makeForVulnerabilityAdvisory().normalizeIterable(e.advisories,t,"advisory")}:void 0,l=e.tools.size>0?this._factory.makeForTools().normalize(e.tools,t,"tools"):void 0,c=e.affects.size>0?{type:"element",name:"affects",children:this._factory.makeForVulnerabilityAffect().normalizeIterable(e.affects,t,"target")}:void 0,p=e.properties.size>0?{type:"element",name:"properties",children:this._factory.makeForProperty().normalizeIterable(e.properties,t,"property")}:void 0;return{type:"element",name:r,attributes:{"bom-ref":e.bomRef.value||void 0},children:[G(e.id,"id",d.normalizedString),void 0===e.source?void 0:this._factory.makeForVulnerabilitySource().normalize(e.source,t,"source"),n,i,a,G(e.description,"description"),G(e.detail,"detail"),G(e.recommendation,"recommendation"),s,K(e.created,"created"),K(e.created,"published"),K(e.created,"updated"),void 0===e.credits?void 0:this._factory.makeForVulnerabilityCredits().normalize(e.credits,t,"credits"),l,void 0===e.analysis?void 0:this._factory.makeForVulnerabilityAnalysis().normalize(e.analysis,t,"analysis"),c,p].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.VulnerabilityNormalizer=w;class D extends y{normalize(e,t,r){const n=(0,a.escapeUri)(e.url?.toString());return{type:"element",name:r,children:[G(e.name,"name",d.normalizedString),f.XmlSchema.isAnyURI(n)?$(n,"url"):void 0].filter(o.isNotUndefined)}}}t.VulnerabilitySourceNormalizer=D;class F extends y{normalize(e,t,r){return{type:"element",name:r,children:[$(e.id,"id"),this._factory.makeForVulnerabilitySource().normalize(e.source,t,"source")]}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.VulnerabilityReferenceNormalizer=F;class k extends y{normalize(e,t,r){return{type:"element",name:r,children:[void 0===e.source?void 0:this._factory.makeForVulnerabilitySource().normalize(e.source,t,"source"),G(e.score,"score"),G(e.severity,"severity"),this._factory.spec.supportsVulnerabilityRatingMethod(e.method)?G(e.method,"method"):void 0,G(e.vector,"vector",d.normalizedString),G(e.justification,"justification")].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.VulnerabilityRatingNormalizer=k;class j extends y{normalize(e,t,r){const n=(0,a.escapeUri)(e.url.toString());if(f.XmlSchema.isAnyURI(n))return{type:"element",name:r,children:[G(e.title,"title"),$(n,"url")].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r)).filter(o.isNotUndefined)}}t.VulnerabilityAdvisoryNormalizer=j;class I extends y{normalize(e,t,r){return{type:"element",name:r,children:[e.organizations.size>0?{type:"element",name:"organizations",children:this._factory.makeForOrganizationalEntity().normalizeIterable(e.organizations,t,"organization")}:void 0,e.individuals.size>0?{type:"element",name:"individuals",children:this._factory.makeForOrganizationalContact().normalizeIterable(e.individuals,t,"individual")}:void 0].filter(o.isNotUndefined)}}}t.VulnerabilityCreditsNormalizer=I;class B extends y{normalize(e,t,r){const n=e.response.size>0?{type:"element",name:"responses",children:(t.sortLists?e.response.sorted():Array.from(e.response)).map(e=>$(e,"response"))}:void 0;return{type:"element",name:r,children:[G(e.state,"state"),G(e.justification,"justification"),n,G(e.detail,"detail")].filter(o.isNotUndefined)}}}t.VulnerabilityAnalysisNormalizer=B;class V extends y{normalize(e,t,r){const n=e.versions.size>0?{type:"element",name:"versions",children:this._factory.makeForVulnerabilityAffectedVersion().normalizeIterable(e.versions,t,"version")}:void 0;return{type:"element",name:r,children:[$(e.ref,"ref"),n].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.VulnerabilityAffectNormalizer=V;class H extends y{normalize(e,t,r){switch(!0){case e instanceof p.AffectedSingleVersion:return this.#u(e,r);case e instanceof p.AffectedVersionRange:return this.#d(e,r);default:throw new TypeError("Unexpected Vulnerability AffectedVersion")}}#u(e,t){return{type:"element",name:t,children:[$(e.version,"version",d.normalizedString),G(e.status,"status")].filter(o.isNotUndefined)}}#d(e,t){return{type:"element",name:t,children:[$(e.range,"range",d.normalizedString),G(e.status,"status")].filter(o.isNotUndefined)}}normalizeIterable(e,t,r){return(t.sortLists?e.sorted():Array.from(e)).map(e=>this.normalize(e,t,r))}}t.VulnerabilityAffectedVersionNormalizer=H;const U=e=>e;function G(e,t,r=U){const n=r(e?.toString()??"");return n.length>0?$(n,t):void 0}function $(e,t,r=U){return{type:"element",name:t,children:r(e.toString())}}function Y(e,t,r,n=U){const o=Array.from(e,e=>$(e,r,n));return t.sortLists&&o.sort(({children:e},{children:t})=>e.localeCompare(t)),o}function K(e,t,r=U){const n=e?.toISOString();return void 0===n?void 0:$(n,t,r)}},1322:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNodePackageJson=function(e){throw new Error("Not implemented")},t.assertNodePackageJson=function(e){throw new Error("Not implemented")}},1507:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortableNumbers=t.SortableStringables=t.SortableComparables=t.SortableSet=t.compareObjectsSymbol=void 0,t.compareObjectsSymbol=Symbol("internal compare function");class r extends Set{sorted(){return Array.from(this).sort(this[t.compareObjectsSymbol])}compare(e){const r=e.sorted(),n=this.sorted();if(n.length!==r.length)return n.length-r.length;for(let e=n.length-1;e>=0;--e){const o=this[t.compareObjectsSymbol](n[e],r[e]);if(0!==o)return o}return 0}}t.SortableSet=r;class n extends r{[t.compareObjectsSymbol](e,t){return e.constructor===t.constructor?e.compare(t):e.constructor.name.localeCompare(t.constructor.name)}}t.SortableComparables=n;class o extends r{[t.compareObjectsSymbol](e,t){return e.toString().localeCompare(t.toString())}}t.SortableStringables=o;class i extends r{[t.compareObjectsSymbol](e,t){return e-t}}t.SortableNumbers=i},1525:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HashAlgorithm=void 0,function(e){e.MD5="MD5",e["SHA-1"]="SHA-1",e["SHA-256"]="SHA-256",e["SHA-384"]="SHA-384",e["SHA-512"]="SHA-512",e["SHA3-256"]="SHA3-256",e["SHA3-384"]="SHA3-384",e["SHA3-512"]="SHA3-512",e["BLAKE2b-256"]="BLAKE2b-256",e["BLAKE2b-384"]="BLAKE2b-384",e["BLAKE2b-512"]="BLAKE2b-512",e.BLAKE3="BLAKE3",e["Streebog-256"]="Streebog-256",e["Streebog-512"]="Streebog-512"}(r||(t.HashAlgorithm=r={}))},1588:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BomRefRepository=t.BomRef=void 0,t.BomRef=class{value;constructor(e){this.value=e}compare(e){return this.toString().localeCompare(e.toString())}toString(){return this.value??""}};class r extends Set{}t.BomRefRepository=r},1592:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.AnalysisJustification=void 0,function(e){e.CodeNotPresent="code_not_present",e.CodeNotReachable="code_not_reachable",e.RequiresConfiguration="requires_configuration",e.RequiresDependency="requires_dependency",e.RequiresEnvironment="requires_environment",e.ProtectedByCompiler="protected_by_compiler",e.ProtectedAtRuntime="protected_at_runtime",e.ProtectedAtPerimeter="protected_at_perimeter",e.ProtectedByMitigatingControl="protected_by_mitigating_control"}(r||(t.AnalysisJustification=r={}))},1688:(e,t)=>{var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseAcknowledgement=void 0,function(e){e.Declared="declared",e.Concluded="concluded"}(r||(t.LicenseAcknowledgement=r={}))},1699:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._Spec=void 0,t._Spec=class{#f;#h;#y;#v;#b;#g;#S;#C;#x;#_;#A;#L;#R;#z;#P;#O;#T;#E;#M;#N;constructor(e,t,r,n,o,i,a,s,l,c,p,m,u,d,f,h,y,v,b,g){this.#f=e,this.#h=new Set(t),this.#y=new Set(r),this.#v=new Set(n),this.#b=o,this.#g=new Set(i),this.#C=a,this.#x=s,this.#_=l,this.#A=c,this.#L=p,this.#S=new Set(m),this.#R=u,this.#z=d,this.#P=f,this.#O=h,this.#T=y,this.#E=v,this.#M=b,this.#N=g}get version(){return this.#f}supportsFormat(e){return this.#h.has(e)}supportsComponentType(e){return this.#y.has(e)}supportsHashAlgorithm(e){return this.#v.has(e)}supportsHashValue(e){return"string"==typeof e&&this.#b.test(e)}supportsExternalReferenceType(e){return this.#g.has(e)}get supportsDependencyGraph(){return this.#C}get supportsToolReferences(){return this.#x}get requiresComponentVersion(){return this.#_}supportsProperties(){return this.#A}get supportsVulnerabilities(){return this.#L}supportsVulnerabilityRatingMethod(e){return this.#S.has(e)}get supportsComponentEvidence(){return this.#R}get supportsMetadataLifecycles(){return this.#z}get supportsMetadataLicenses(){return this.#P}get supportsMetadataProperties(){return this.#O}get supportsExternalReferenceHashes(){return this.#T}get supportsLicenseAcknowledgement(){return this.#E}get supportsServices(){return this.#M}get supportsToolsComponentsServices(){return this.#N}}},1722:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(7715),t)},1723:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VulnerabilityAnalysisNormalizer=t.VulnerabilityAffectedVersionNormalizer=t.VulnerabilityAffectNormalizer=t.VulnerabilityCreditsNormalizer=t.VulnerabilityAdvisoryNormalizer=t.VulnerabilityRatingNormalizer=t.VulnerabilityReferenceNormalizer=t.VulnerabilitySourceNormalizer=t.VulnerabilityNormalizer=t.DependencyGraphNormalizer=t.PropertyNormalizer=t.AttachmentNormalizer=t.ExternalReferenceNormalizer=t.SWIDNormalizer=t.LicenseNormalizer=t.ComponentEvidenceNormalizer=t.ServiceNormalizer=t.ComponentNormalizer=t.OrganizationalEntityNormalizer=t.OrganizationalContactNormalizer=t.HashNormalizer=t.ToolsNormalizer=t.ToolNormalizer=t.LifecycleNormalizer=t.MetadataNormalizer=t.BomNormalizer=t.Factory=void 0;const n=r(1089),o=r(48),i=r(9027),a=r(7977),s=r(7988),l=r(4799),c=r(7645),p=r(785),m=r(4317),u=r(4196),d=r(3349);t.Factory=class{#a;constructor(e){this.#a=e}get spec(){return this.#a}makeForBom(){return new y(this)}makeForMetadata(){return new v(this)}makeForComponent(){return new A(this)}makeForService(){return new L(this)}makeForComponentEvidence(){return new R(this)}makeForLifecycle(){return new b(this)}makeForTool(){return new g(this)}makeForTools(){return new S(this)}makeForOrganizationalContact(){return new x(this)}makeForOrganizationalEntity(){return new _(this)}makeForHash(){return new C(this)}makeForLicense(){return new z(this)}makeForSWID(){return new P(this)}makeForExternalReference(){return new O(this)}makeForAttachment(){return new T(this)}makeForProperty(){return new E(this)}makeForDependencyGraph(){return new M(this)}makeForVulnerability(){return new N(this)}makeForVulnerabilitySource(){return new w(this)}makeForVulnerabilityReference(){return new D(this)}makeForVulnerabilityRating(){return new F(this)}makeForVulnerabilityAdvisory(){return new k(this)}makeForVulnerabilityCredits(){return new j(this)}makeForVulnerabilityAffect(){return new I(this)}makeForVulnerabilityAffectedVersion(){return new B(this)}makeForVulnerabilityAnalysis(){return new V(this)}};const f=new Map([[u.Version.v1dot7,"http://cyclonedx.org/schema/bom-1.